@font-face { font-family: 'Bricolage Grotesque'; src: url('preview/fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-stretch: 75% 125%; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('preview/fonts/schibsted-upright.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('preview/fonts/schibsted-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  /* EM heritage inks: Lee's original 0-21 sticker colourways (logob.ai / logop.ai) */
  --her-blue: #4896D1;
  --her-pink: #F6AECD;
  --her-ink: #070908;
  --run-unknown: #8a96a3;
}
[data-theme="bluebird"] { --hill: #4896D1; --hill-a: .42; --hill-b: .06; --lift-ink: #5c6f84; --band: rgba(72,150,209,.10); }
[data-theme="apres"]    { --hill: #4896D1; --hill-a: .50; --hill-b: .04; --lift-ink: #8aa0ba; --piste-black: #c9d3de; --band: rgba(72,150,209,.13); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink-1);
  font-family: var(--font-text); font-size: var(--text-body); line-height: 1.5;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 80px) 16px 0; }
.n { font-family: var(--font-data); font-size: .86em; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-h3); letter-spacing: -.01em; }
.note { font-size: var(--text-small); color: var(--ink-3); }
.sample-tag { display: inline-block; font-family: var(--font-data); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-fire); border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }

/* ---------- top line ---------- */
.top { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 22px; }
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; text-decoration: none; }
.wordmark b { color: var(--her-blue); }
.top .crumb { font-size: var(--text-small); color: var(--ink-3); }

/* ---------- 2. the lift pass: self-contained (own inks, own fonts), so it can be lifted out as the share picture ---------- */
.pass {
  --p-blue: #4896D1; --p-pink: #F6AECD; --p-ink: #070908; --p-paper: #fbfaf6; --p-grey: #3b4651;
  --p-display: 'Bricolage Grotesque', 'Schibsted Grotesk', system-ui, sans-serif;
  --p-text: 'Schibsted Grotesk', system-ui, sans-serif;
  --p-data: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --notch: 14px; --stub: 210px;
  position: relative; display: grid; grid-template-columns: 1fr var(--stub);
  color: var(--p-ink); font-family: var(--p-text); line-height: 1.4; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(7,9,8,.25), 0 14px 34px rgba(16, 42, 74, .16);
  -webkit-mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.pass-main {
  background-color: var(--p-blue);
  background-image: radial-gradient(rgba(7,9,8,.13) .9px, transparent 1.3px); /* screen-print halftone */
  background-size: 5px 5px;
  padding: 18px 26px 0; display: flex; flex-direction: column;
}
.pass-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--p-data); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.pass-row .em { font-family: var(--p-display); font-weight: 800; letter-spacing: 0; font-size: .95rem; text-transform: none; }
.pass-row .hole { width: 34px; height: 9px; border-radius: 9px; background: rgba(7,9,8,.42); box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
.resort {
  margin: 10px 0 0; font-family: var(--p-display); font-weight: 800; font-stretch: 78%;
  font-size: clamp(3rem, 1.2rem + 7.4vw, 6.6rem); line-height: .86; letter-spacing: -.02em; text-transform: uppercase;
}
.when { margin: 10px 0 18px; font-weight: 600; font-size: 1.02rem; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.when time { font-family: var(--p-data); font-weight: 600; font-size: .95rem; }
.four {
  margin: 0 -26px; padding: 14px 26px 16px; background: var(--p-paper);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; border-top: 2px solid var(--p-ink);
}
.four div { min-width: 0; }
.four dd { margin: 0; font-family: var(--p-display); font-weight: 750; font-stretch: 85%; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.four dd small { font-family: var(--p-text); font-weight: 600; font-size: .4em; letter-spacing: 0; margin-left: 3px; }
.four dt { margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--p-grey); }
.four dt em { font-style: normal; font-weight: 500; color: #5d6873; }
.pass-stub {
  position: relative; background-color: var(--p-pink);
  background-image: radial-gradient(rgba(7,9,8,.10) .9px, transparent 1.3px); background-size: 5px 5px;
  border-left: 2px dashed rgba(7,9,8,.55);
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 9px;
  font-family: var(--p-data); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.pass-stub .no { font-size: .8rem; letter-spacing: .06em; }
.pass-stub .big { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.15; text-transform: none; }
.pass-stub .bars { width: 100%; height: 50px; display: block; margin-top: auto; }
.pass-stub .src { display: inline-block; align-self: flex-start; border: 1.5px solid var(--p-ink); border-radius: 99px; padding: 2px 9px; }
.pass-stub .url { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .68rem; }
.stamp {
  position: absolute; right: calc(var(--stub) + 26px); top: 128px; width: 92px; height: 92px; border-radius: 50%;
  border: 2.5px solid var(--p-ink); display: grid; place-content: center; text-align: center; color: var(--p-ink);
  transform: rotate(-14deg); opacity: .78; font-family: var(--p-data); font-weight: 700; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  mix-blend-mode: multiply;
}
.stamp b { display: block; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.1; }

/* ---------- 1. the day skyline ---------- */
.skyline { position: relative; margin: 34px 0 0; }
.readout { font-family: var(--font-data); font-size: .85rem; color: var(--ink-2); min-height: 1.4em; }
.readout b { color: var(--ink-1); font-weight: 700; }
.sky-svg { display: block; width: 100%; height: 400px; margin-top: 8px; touch-action: pan-y; cursor: crosshair; user-select: none; }
.sky-svg .lbl { font-size: 13px; font-weight: 700; fill: var(--ink-1); font-family: var(--font-text); }
.sky-svg .lbl-sub { font-size: 12px; fill: var(--ink-2); font-family: var(--font-data); }
.sky-svg .axis { font-size: 11px; fill: var(--ink-3); font-family: var(--font-data); }
.sky-svg .runno { font-size: 11px; font-weight: 700; font-family: var(--font-data); }
.ribbon-key { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0 0; font-size: var(--text-small); color: var(--ink-2); }
.ribbon-key span::before { content: ''; display: inline-block; width: 18px; height: 6px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.ribbon-key .k-ski::before { background: linear-gradient(90deg, var(--piste-green) 0 60%, var(--piste-red) 60%); }
.ribbon-key .k-lift::before { background: var(--lift-ink); }
.ribbon-key .k-btw::before { height: 2px; background: var(--line-strong); }
.ribbon-key b { color: var(--ink-1); font-family: var(--font-data); font-weight: 700; }

/* ---------- 3. the match report ---------- */
.report { display: grid; grid-template-columns: 300px 1fr; gap: 40px; margin: 52px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
.kicker { font-family: var(--font-data); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ice); font-weight: 700; }
.report h2 { margin: 8px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.7rem); line-height: 1.02; letter-spacing: -.02em; }
.byline { margin: 14px 0 0; font-size: var(--text-small); color: var(--ink-3); }
.report-body p { margin: 0 0 1em; font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem); line-height: 1.62; max-width: 62ch; text-wrap: pretty; }
.report-body p.lead::first-letter { font-family: var(--font-display); font-weight: 800; float: left; font-size: 3.6em; line-height: .8; margin: .08em .1em 0 0; color: var(--her-blue); }
.report-body p.cond { color: var(--ink-2); }
.m { text-decoration: none; border-bottom: 2px dotted var(--mc, var(--line-strong)); cursor: pointer; }
.m:hover, .m:focus-visible { background: color-mix(in srgb, var(--mc, var(--accent-ice)) 16%, transparent); outline: none; }
.m.red { --mc: var(--piste-red); } .m.green { --mc: var(--piste-green); } .m.lift { --mc: var(--lift-ink); }
.report-body p.sample { font-size: var(--text-small); line-height: 1.5; color: var(--ink-3); }

/* ---------- 4. your stats: a box score, ruled columns, no cards ---------- */
.stats { margin: 56px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
.box { columns: 3 260px; column-gap: 44px; column-rule: 1px solid var(--line); margin-top: 18px; }
.grp { break-inside: avoid; margin: 0 0 22px; }
.grp h3 { margin: 0 0 4px; font-family: var(--font-data); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.grp dl { margin: 0; }
.grp dl > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.grp dt { color: var(--ink-2); flex: none; }
.grp dl > div::after { content: none; }
.grp .lead-dots { flex: 1; border-bottom: 1.5px dotted var(--line-strong); transform: translateY(-4px); min-width: 12px; }
.grp dd { margin: 0 0 0 auto; min-width: 0; text-align: right; font-family: var(--font-data); font-weight: 600; font-size: .92rem; }
.grp dd .nm { font-family: var(--font-text); font-weight: 650; font-size: 1.04rem; margin-right: 6px; }
.grp dd .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.split { margin-top: 6px; }
.split-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; gap: 2px; }
.split-bar i { display: block; }
.split-key { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 8px; font-size: var(--text-small); color: var(--ink-2); }
.split-key b { font-family: var(--font-data); color: var(--ink-1); font-weight: 700; }
.split-key span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; background: var(--c); }

/* ---------- 5. conditions that day ---------- */
.cond-sec { margin: 56px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
.cond-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; margin-top: 18px; align-items: start; }
.hours { width: 100%; border-collapse: collapse; font-size: .95rem; table-layout: fixed; }
.hours th, .hours td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.hours thead th { font-family: var(--font-data); font-weight: 700; font-size: .85rem; color: var(--ink-2); border-bottom: 2px solid var(--ink-1); }
.hours tbody th { text-align: left; font-weight: 500; color: var(--ink-2); font-size: .9rem; width: 26%; }
.hours tbody th small { display: block; font-family: var(--font-data); font-size: .72rem; color: var(--ink-3); }
.hours td { font-family: var(--font-data); font-weight: 600; font-size: .9rem; }
.hours td small { display: block; font-weight: 500; color: var(--ink-3); font-size: .74rem; }
.hours .out { background: var(--band); }
.hours thead .out { color: var(--ink-1); }
.hours .off { color: var(--ink-3); }
.hours img { width: 38px; height: 38px; display: block; margin: -4px auto -6px; }
.hours .sky td { font-family: var(--font-text); font-size: .74rem; font-weight: 500; color: var(--ink-2); }
.cold { color: var(--accent-ice); }
.out-key { margin: 8px 0 0; font-size: var(--text-small); color: var(--ink-3); }
.out-key::before { content: ''; display: inline-block; width: 14px; height: 10px; background: var(--band); border: 1px solid var(--line); margin-right: 7px; vertical-align: -1px; }
.snow dl { margin: 0; }
.snow .row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.snow dt { color: var(--ink-2); }
.snow dd { margin: 0; font-family: var(--font-data); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; }
.snow dd small { font-size: .55em; font-weight: 500; margin-left: 2px; color: var(--ink-2); }
.snow .depth { display: flex; gap: 14px; align-items: flex-end; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.snow .gauge { flex: 1; text-align: center; }
.snow .gauge .col { height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.snow .gauge i { display: block; width: 34px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #ffffff, #d9e8f6); border: 1.5px solid var(--line-strong); border-bottom: 0; }
.snow .gauge b { display: block; font-family: var(--font-data); font-size: 1.35rem; margin-top: 4px; }
.snow .gauge span { font-size: var(--text-small); color: var(--ink-2); }
.avy { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.avy .lvl { width: 46px; height: 46px; flex: none; display: grid; place-items: center; font-family: var(--font-data); font-weight: 800; font-size: 1.5rem; color: #070908;
  background: #ffff00; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.avy b { display: block; }
.avy span { font-size: var(--text-small); color: var(--ink-3); }

.foot { margin: 56px 0 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--text-small); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .pass { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
  .pass-main { padding: 14px 16px 0; }
  .four { margin: 0 -16px; padding: 12px 16px 14px; grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .pass-stub { border-left: 0; border-top: 2px dashed rgba(7,9,8,.55); display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 104px 12px 16px; gap: 6px 10px; }
  .pass-stub .bars { grid-column: 1 / -1; height: 28px; margin-top: 2px; }
  .pass-stub .big { font-size: 1.1rem; }
  .pass-stub .no { font-size: .72rem; white-space: nowrap; }
  .pass-stub .url { font-size: .62rem; white-space: nowrap; }
  .stamp { right: 16px; top: auto; bottom: 30px; width: 74px; height: 74px; font-size: .52rem; }
  .stamp b { font-size: 1.05rem; }
  .sky-svg { height: 300px; }
  .report { grid-template-columns: 1fr; gap: 14px; margin-top: 40px; }
  .cond-grid { grid-template-columns: 1fr; gap: 26px; }
  .hours { font-size: .85rem; }
  .hours tbody th { width: 25%; font-size: .8rem; }
  .hours td { font-size: .8rem; padding: 7px 1px; }
  .hours img { width: 30px; height: 30px; }
  .hours .sky td { font-size: .66rem; }
  .snow .gauge .col { height: 76px; }
}

/* ---------- D1a additions: the file drop, states, the time boxes, marks ---------- */
[hidden] { display: none !important; }
:root { --t-queue: #e39b2d; --t-wait: #9aa6b2; --t-walk: #8d6fd6; --t-slide: #4fb3a2; --t-wander: #c3a3e6; --t-nodata: #c9ced4; --t-paused: #2b3a4a; }
[data-theme="apres"] { --t-paused: #dfe6ee; }
.ribbon-key .k-paused::before { background: var(--t-paused); }
[data-theme="apres"] { --t-wait: #6f7b88; --t-nodata: #4a525c; }
.drop { margin: 8px 0 0; padding: 40px 22px; border: 2px dashed var(--line-strong); border-radius: 14px; text-align: center; background: var(--band); }
.drop.over { border-color: var(--her-blue); background: color-mix(in srgb, var(--her-blue) 14%, transparent); }
.drop h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); letter-spacing: -.02em; }
.drop p { margin: 10px auto 0; max-width: 560px; color: var(--ink-2); }
.drop label.pick { display: inline-block; margin-top: 18px; padding: 10px 20px; border-radius: 99px; background: var(--ink-1); color: var(--bg); font-weight: 700; cursor: pointer; }
.drop label.pick:focus-within { outline: 3px solid var(--her-blue); outline-offset: 2px; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .small { font-size: var(--text-small); color: var(--ink-3); }
.state { margin: 18px 0 0; font-size: var(--text-small); color: var(--ink-2); }
.state.err { color: var(--accent-fire); font-weight: 600; }
/* 3b. heart rate (D1d): the card, the quiet line and the section */
.hr-sec { margin: 56px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
.hr-card { border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 18px 20px; max-width: 640px; }
.hr-card h2, .hr-sec h2 { margin: 0 0 8px; }
.hr-card p { margin: 0 0 12px; color: var(--ink-2); }
.hr-btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.hr-sec button { font: inherit; font-size: var(--text-small); min-height: 44px; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: none; color: var(--ink-1); cursor: pointer; }
.hr-sec button.textlink { border: 0; min-height: 44px; padding: 8px 4px; text-decoration: underline; color: var(--ink-2); }
.hr-sec button:focus-visible, .hr-sec input:focus-visible, .hr-sec a:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
.hr-sec h2:focus { outline: none; }
.hr-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--ink-2); margin: 0; }
.hr-quiet p { margin: 0; }
.zones { list-style: none; margin: 6px 0 0; padding: 0; }
.zones li { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr auto; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.zones .zb { height: 10px; border-radius: 3px; background: var(--her-blue); min-width: 1px; }
.zones .zt { font-family: var(--font-data); font-weight: 600; font-size: .92rem; text-align: right; }
.zones small { color: var(--ink-3); display: block; }
.hr-max { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0; }
.hr-max input { font: inherit; width: 6em; min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink-1); }
.hr-consent { margin: 18px 0 0; color: var(--ink-2); font-size: var(--text-small); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hr-consent p { margin: 0; }
.charts-svg.with-hr { height: 430px; }
@media (max-width: 720px) { .charts-svg.with-hr { height: 380px; } .zones li { grid-template-columns: 1fr auto; } .zones .zb { grid-column: 1 / -1; } }
/* D1e-2: a run in the flyby or in 3D */
.legs td.see { white-space: nowrap; }
.legs td.see .see-it + .see-it { margin-left: 6px; }
.fly-note { margin: 10px 0 0; max-width: 820px; }
/* 7. download your day (D1e-3) */
.exp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; }
.exp-btn { font: inherit; min-height: 44px; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: none; color: var(--ink-1); cursor: pointer; }
.exp-btn small { color: var(--ink-2); margin-left: 6px; }
.exp-btn:focus-visible, .exp-hr input:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
.exp-hr { margin: 6px 0 0; }
.exp-hr label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.exp-hr input { width: 20px; height: 20px; margin: 0; }
.legs button.see-it { font: inherit; font-size: var(--text-small); min-height: 36px; padding: 4px 12px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: none; color: var(--ink-1); cursor: pointer; white-space: nowrap; }
.legs button.see-it:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
/* the whole day's doors, under the lift pass (the after-trip hub) */
.see-day { margin: var(--s6, 24px) 0; }
.see-day h2 { margin: 0 0 4px; }
.see-day p { margin: 0 0 12px; color: var(--ink-2); }
.see-day-go { display: flex; flex-wrap: wrap; gap: 10px; }
.see-day button.see-it { font: inherit; font-weight: 700; min-height: 44px; padding: 6px 20px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: none; color: var(--ink-1); cursor: pointer; }
.see-day button.see-it:first-child { background: var(--her-blue); border-color: var(--her-blue); color: #fff; }
.see-day button.see-it:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.again { margin: 22px 0 0; }
.again button { font: inherit; font-size: var(--text-small); padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: none; color: var(--ink-1); cursor: pointer; }
.ribbon-key .k-queue::before { background: var(--t-queue); } .ribbon-key .k-wait::before { background: var(--t-wait); }
.ribbon-key .k-walk::before { background: var(--t-walk); } .ribbon-key .k-slide::before { background: var(--t-slide); }
.ribbon-key .k-wander::before { background: var(--t-wander); } .ribbon-key .k-nodata::before { background: repeating-linear-gradient(90deg, var(--t-nodata) 0 3px, transparent 3px 6px); }
.ribbon-key .est { color: var(--ink-3); font-size: .85em; }
.hours-wrap { overflow-x: auto; max-width: calc(100vw - 32px); }   /* its grid parent would otherwise grow to the table and widen the page on phones */
.hours-wrap .hours { min-width: 520px; }
.marks-sec { margin: 56px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
/* 5b. where these numbers come from */
.src-sec { margin: 56px 0 0; padding-top: 22px; border-top: 3px solid var(--ink-1); }
.src-list { margin: 10px 0 0; display: grid; gap: 0; max-width: 820px; }
.src-list > div { display: grid; grid-template-columns: 11em 1fr; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.src-list dt { font-weight: 600; color: var(--ink-1); }
.src-list dd { margin: 0; color: var(--ink-2); }
.src-h3 { margin: 18px 0 6px; font-size: 1rem; }
.src-est { margin: 0; padding-left: 1.2em; color: var(--ink-2); max-width: 820px; }
.src-est li { margin: 4px 0; }
@media (max-width: 720px) { .src-list > div { grid-template-columns: 1fr; } }
.marks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.marks li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.marks svg { width: 30px; height: 30px; flex: none; }
.marks b { display: block; }
.marks span { font-size: var(--text-small); color: var(--ink-2); }
.src-note { margin: 10px 0 0; font-size: var(--text-small); color: var(--ink-3); }
.ribbon-key .est::before { content: none; }
.cond-grid > *, .report > * { min-width: 0; }

/* ---------- D1b: the map, the charts, every run and ride ---------- */
.map-sec, .charts-sec, .legs-sec { margin: 46px 0 0; }
.map-frame { position: relative; }
.map-svg { display: block; width: 100%; height: 440px; margin-top: 10px; border-radius: 14px; background: var(--band); touch-action: pan-y; cursor: crosshair; }
.map-whole { position: absolute; top: 14px; right: 10px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 99px; background: var(--bg); color: var(--ink-1); box-shadow: 0 2px 8px color-mix(in srgb, var(--ink-1) 18%, transparent); font: inherit; font-weight: 700; cursor: pointer; }
.map-whole:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
.charts-svg { display: block; width: 100%; height: 300px; margin-top: 8px; touch-action: pan-y; cursor: crosshair; user-select: none; }
.charts-svg .axis, .map-svg .axis { font-size: 11px; fill: var(--ink-3); font-family: var(--font-data); }
.charts-svg .ttl { font-size: 12px; font-weight: 700; fill: var(--ink-2); font-family: var(--font-text); }
.legs-wrap { overflow-x: auto; margin-top: 12px; position: relative; }   /* (its hidden "See it" heading is clipped here, not by the page: no sideways scroll on a phone) */
.legs { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 640px; }
.legs th, .legs td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.legs th:nth-child(2), .legs td:nth-child(2) { text-align: left; white-space: normal; }
.legs thead th { font-family: var(--font-data); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; border-bottom: 2px solid var(--ink-1); }
.legs td { font-family: var(--font-data); font-weight: 600; }
.legs td:nth-child(2) { font-family: var(--font-text); font-weight: 600; }
.legs tbody tr.leg-row { cursor: pointer; }
.legs tbody tr.leg-row:hover { background: var(--band); }
.legs .go { font: inherit; cursor: pointer; border: 0; }
.legs .go:focus-visible { outline: 3px solid var(--ink-1); outline-offset: 2px; text-decoration: underline; }
.legs .lift-go, .legs .btw-go { background: none; color: var(--ink-2); font-family: var(--font-data); font-size: .74rem; padding: 2px 4px; border-radius: 4px; border: 1px solid var(--line-strong); }
.legs tbody tr.leg-row.now { box-shadow: inset 3px 0 0 var(--her-blue); background: var(--band); }
.legs tbody tr.shape-picked { box-shadow: inset 4px 0 0 var(--her-blue); background: var(--band); }
.legs tbody tr.shape-picked td { font-weight: 800; }
.legs .chip { display: inline-block; min-width: 26px; padding: 1px 6px; border-radius: 4px; color: #fff; font-family: var(--font-data); font-size: .78rem; text-align: center; }
.legs .grade { display: block; font-size: .74rem; font-weight: 500; color: var(--ink-3); }
.legs tr.lift td:nth-child(2) { color: var(--ink-2); }
.legs tr.btw td { font-family: var(--font-text); font-weight: 500; color: var(--ink-3); font-size: .85rem; text-align: left; }
.legs .est { color: var(--ink-3); font-weight: 500; }
.legs tr.leg-detail-row td { padding: 0; border-bottom: 2px solid var(--line-strong); text-align: left; white-space: normal; }
.leg-detail { padding: 16px; background: var(--band); font-family: var(--font-text); font-weight: 400; }
.leg-detail h3 { margin: 0 0 12px; font-size: 1.1rem; }
.leg-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(180px, .8fr); gap: 12px; }
.leg-detail figure { min-width: 0; margin: 0; }
.leg-detail figcaption { margin: 0 0 5px; color: var(--ink-3); font-family: var(--font-data); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.leg-map, .leg-profile { display: block; width: 100%; border-radius: 10px; background: var(--bg); }
.leg-map { height: 210px; }
.leg-profile { height: 90px; }
.leg-stats { margin: 12px 0 0; color: var(--ink-2); font-family: var(--font-data); font-size: var(--text-small); font-weight: 600; }
.leg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.leg-actions button, .leg-actions a { display: inline-flex; align-items: center; min-height: 44px; font: inherit; cursor: pointer; }
.leg-actions button { padding: 7px 16px; border: 1.5px solid var(--line-strong); border-radius: 99px; background: var(--bg); color: var(--ink-1); }
.leg-actions a { color: var(--ink-1); font-weight: 700; }
.leg-actions button:focus-visible, .leg-actions a:focus-visible { outline: 3px solid var(--her-blue); outline-offset: 2px; }
@media (max-width: 720px) { .map-svg { height: 330px; } .charts-svg { height: 260px; } }
@media (max-width: 560px) {
  .legs-wrap { overflow-x: visible; }
  .legs { min-width: 0; }
  .legs thead { display: none; }
  .legs tbody, .legs tr, .legs td { display: block; }
  .legs tr.leg-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
  .legs tr.leg-row td { padding: 7px 6px; border: 0; white-space: normal; }
  .legs tr.leg-row td:nth-child(n+3):nth-child(-n+9) { display: none; }
  .legs tr.leg-row td.see { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
  .legs td.see .see-it + .see-it { margin-left: 0; }
  .legs button.go, .legs button.see-it { min-height: 44px; }
  .legs tr.btw { grid-template-columns: 52px minmax(0, 1fr); }
  .legs tr.btw td:last-child { grid-column: 2 / -1; }
  .leg-detail { width: 100%; box-sizing: border-box; padding: 14px 10px; }
  .leg-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .leg-map { height: 190px; }
  .leg-profile { height: 82px; }
}

/* the honesty box: collapsed by default, same quiet note style as the rest */
.cant-sec { margin: 40px 0 0; }
.cant { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.cant summary { cursor: pointer; font-weight: 600; color: var(--ink-1); }
.cant ul { margin: 10px 0 2px; padding-left: 20px; font-size: var(--text-small); color: var(--ink-3); line-height: 1.6; }
.cant li { margin-bottom: 6px; }
