/* Koeru — a runner's page. Light, on top of home.css (it reuses the cards). */

.runner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar-xl { width: 84px; height: 84px; font-size: 30px; }
.runner-id { flex: 1; min-width: 200px; }
.runner-id h1 {
  margin: 0; font-size: clamp(34px, 5vw, 48px); line-height: 1;
  font-variation-settings: 'wdth' 125, 'wght' 800; letter-spacing: -.015em;
}
.handle { margin: 6px 0 0; font-size: 15px; color: var(--k-granite); }
.runner-actions { margin-left: auto; display: flex; gap: 8px; }

.totals {
  display: flex; flex-wrap: wrap; gap: 14px 0; padding: 20px 0;
  border-top: 1px solid var(--k-rule); border-bottom: 1px solid var(--k-rule);
}
.totals.inner { border: 0; padding: 0; gap: 14px 0; }
.total { display: grid; gap: 4px; padding: 2px 28px; }
.totals .total:first-child { padding-left: 0; }
.total + .total { border-left: 1px solid var(--k-rule); }
.total .label { font-size: 13px; color: var(--k-granite); }
.total .value {
  font-size: clamp(24px, 3vw, 32px); line-height: 1.05; white-space: nowrap;
  font-variation-settings: 'wdth' 88, 'wght' 700; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums;
}
.total .value small { margin-left: 4px; font-size: 14px; color: var(--k-granite); font-variation-settings: 'wdth' 100, 'wght' 400; }

.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }

.best-list { display: grid; gap: 2px; }
.best {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline;
  padding: 12px 10px; margin: 0 -10px; border-radius: 8px; text-decoration: none; color: var(--k-night);
}
.best:hover { background: var(--k-snow); }
.best-label { font-size: 14px; }
.best-value {
  grid-row: span 2; align-self: center; font-size: 26px; white-space: nowrap;
  font-variation-settings: 'wdth' 88, 'wght' 700; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums;
}
.best-run { font-size: 13px; color: var(--k-granite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.run-list { display: grid; gap: 2px; }
.run-line {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: 44px minmax(0, 1fr) repeat(3, 84px) 96px;
  padding: 10px 12px; margin: 0 -12px; border-radius: 8px;
  text-decoration: none; color: var(--k-night);
}
.run-line:hover { background: #fff; box-shadow: 0 2px 10px rgb(19 28 46 / .06); }
.run-line .spark { width: 44px; height: 26px; }
.run-line-title {
  min-width: 0; font-size: 15px; font-variation-settings: 'wdth' 108, 'wght' 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.run-line .tag {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--k-rule);
  font-size: 11px; color: var(--k-granite); font-variation-settings: 'wdth' 100, 'wght' 400;
}
.run-line .num {
  text-align: right; font-size: 14px;
  font-variation-settings: 'wdth' 88, 'wght' 700; font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums;
}
.run-line .num small { color: var(--k-granite); font-variation-settings: 'wdth' 100, 'wght' 400; }
.run-line .when { text-align: right; font-size: 13px; color: var(--k-granite); }

@media (max-width: 860px) {
  .run-line { grid-template-columns: 44px minmax(0, 1fr) 84px; gap: 12px; }
  /* Distance stays; the rest goes. (By class, not nth-of-type: the title and
     the date are spans too, and counting them hid the distance as well.) */
  .run-line .num.ascent, .run-line .num.time, .run-line .when { display: none; }
}

@media (max-width: 640px) {
  .runner { gap: 14px; }
  .avatar-xl { width: 60px; height: 60px; font-size: 22px; }
  .runner-actions { margin-left: 0; width: 100%; }
  .runner-actions .btn { flex: 1; justify-content: center; }
  .totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .total, .totals .total:first-child { padding: 0; }
  .total + .total { border-left: 0; }
  .two-up { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* --- privacy ------------------------------------------------------------- */

.lock-tag { display: inline-grid; vertical-align: middle; margin-left: 6px; color: var(--k-granite); }
.lock-tag svg, .locked-icon svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

.locked {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  max-width: 440px; margin: 24px auto 16px; padding: 36px 24px;
  background: #fff; border: 1px solid var(--k-rule); border-radius: 12px;
}
.locked-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px;
  border-radius: 50%; background: var(--k-snow); color: var(--k-night);
}
.locked h2 { margin: 0; font-size: 22px; font-variation-settings: 'wdth' 108, 'wght' 700; }
.locked p { margin: 4px 0 0; color: var(--k-granite); line-height: 1.5; }
.locked-actions { margin: 16px 0 4px; }
.locked .muted { font-size: 13px; }

.privacy { display: grid; gap: 4px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-top: 1px solid var(--k-rule); cursor: pointer;
}
.switch-row:first-of-type { border-top: 0; }
.switch-row > span { display: grid; gap: 2px; }
.switch-row b { font-size: 15px; font-variation-settings: 'wdth' 100, 'wght' 600; }
.switch-row small { font-size: 13px; color: var(--k-granite); }
.switch-row select {
  font: inherit; font-size: 14px; height: 36px; padding: 0 10px;
  border: 1px solid var(--k-rule); border-radius: var(--k-radius); background: #fff; color: var(--k-night);
}
.switch-row input[type="checkbox"] {
  appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 999px;
  background: var(--k-rule); position: relative; cursor: pointer; transition: background .15s;
}
.switch-row input[type="checkbox"]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(19 28 46 / .25); transition: transform .15s;
}
.switch-row input[type="checkbox"]:checked { background: var(--k-night); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(18px); }
.switch-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--k-signal); outline-offset: 2px; }

.requests { padding-top: 12px; border-top: 1px solid var(--k-rule); }
.requests h3 { margin: 0 0 8px; font-size: 14px; font-variation-settings: 'wdth' 100, 'wght' 600; }
.requests ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.request { display: flex; align-items: center; gap: 10px; }
.request-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .runner-actions { margin-left: 0; width: 100%; }
  .runner-actions .btn { flex: 1; justify-content: center; }
  .switch-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .switch-row input[type="checkbox"] { align-self: flex-start; }
}

/* --- a person's own words and picture ---------------------------------------- */

.runner .bio { margin: 10px 0 0; max-width: 560px; font-size: 16px; line-height: 1.5; color: var(--k-night); }
.runner .bio p { margin: 0; }
.runner .bio p + p { margin-top: 6px; }
.owner-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px;
  border-radius: 10px; background: #fff; border: 1px solid var(--k-rule); text-decoration: none; color: var(--k-night);
}
.owner-note span { font-variation-settings: 'wdth' 100, 'wght' 650; }
