/* ROBERT 70 website. Survey-sheet look shared with route/map/overview-map.html: map paper, ink, discipline colours. */
:root {
  --paper: #eef1ec;
  --sheet: #f8faf6;
  --ink: #1f2b29;
  --muted: #5d6b67;
  --line: #c4cec6;
  --bike: #2c5f8f;
  --hike: #94571c;
  --fly: #b82e7f;
  --home: #c8281c;
  --ok: #3f7d4e;
  --warn: #b7791f;
  --alert: #c2410c;
  --danger: #b91c1c;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141a19; --sheet: #1b2321; --ink: #e3ebe7; --muted: #98a6a1; --line: #36423e;
    --bike: #78a9da; --hike: #d79a5c; --fly: #e277b6; --home: #f0675b;
    --ok: #6fbf84; --warn: #e3b25a; --alert: #f08a4b; --danger: #f07171; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; }
a { color: var(--bike); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--bike); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 16px; }
main.wrap { display: grid; gap: 40px; padding-block: 32px 48px; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; border-bottom: 1px solid var(--line); background: var(--sheet); position: sticky; top: 0; z-index: 1000; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; color: var(--ink); text-decoration: none; }
.brand span { font-weight: 500; color: var(--hike); margin-left: 4px; }
nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--home); }
nav .sep { width: 1px; background: var(--line); align-self: stretch; }

h1, h2 { font-family: var(--font-display); text-wrap: balance; margin: 0 0 12px; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 12px; max-width: 65ch; }
.eyebrow { font-family: var(--font-data); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lead { font-size: 1.15rem; }
.note { font-size: 0.88rem; color: var(--muted); }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.figures div { background: var(--sheet); padding: 16px; display: grid; gap: 2px; }
.figures b { font-family: var(--font-display); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.figures span { color: var(--muted); font-size: 0.9rem; }

.milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.milestones li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.milestones .mid { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--home); }
.milestones .when { font-family: var(--font-data); font-size: 0.8rem; color: var(--muted); margin-left: 6px; }
.milestones p { margin: 4px 0 0; font-size: 0.92rem; }
.milestones .count { font-family: var(--font-data); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

.days { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; }
.days li { display: flex; gap: 12px; align-items: baseline; }
.days .num { font-family: var(--font-display); font-weight: 700; width: 1.5rem; }

.button { display: inline-block; padding: 8px 14px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; margin: 4px 8px 4px 0; }
.button.ghost { background: none; color: var(--ink); border: 1px solid var(--ink); }

.notice { padding: 12px 14px; background: var(--sheet); border: 1px solid var(--line); }
.notice.warn { border-color: var(--warn); }
.live-links { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.live-links .notice { grid-column: 1 / -1; }
.button.live { background: var(--home); border-color: var(--home); color: #fff; margin: 0; }
.link-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.link-form label { grid-column: 1 / -1; }
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs [role="tab"] { background: none; color: var(--muted); border: 1px solid transparent; border-bottom: none; padding: 8px 14px; font-weight: 600; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--sheet); border-color: var(--line); margin-bottom: -1px; }
.live-frame { width: 100%; height: min(75vh, 720px); display: block; }
.route-frame { width: 100%; height: min(80vh, 820px); display: block; }
.map[hidden] { display: none; }
.map { height: min(60vh, 520px); margin-top: 12px; border: 1px solid var(--line); background: var(--sheet); }

.forecast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.forecast { background: var(--sheet); border: 1px solid var(--line); padding: 12px 14px; min-width: 0; }
.forecast h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.forecast h3 small { font-family: var(--font-data); font-weight: 400; color: var(--muted); }
.forecast ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.forecast li { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 8px; }
.risk { font-family: var(--font-data); font-size: 0.75rem; padding: 0 5px; border: 1px solid currentColor; }
.risk.mässig { color: var(--warn); }
.risk.hoch { color: var(--danger); }

.warning-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.warning-list li { padding: 8px 12px; border-left: 4px solid var(--warn); background: var(--sheet); }
.warning-list li.l3 { border-left-color: var(--alert); }
.warning-list li.l4 { border-left-color: var(--danger); }
.warning-list li.l1 { border-left-color: var(--ok); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card { display: grid; gap: 4px; padding: 14px; background: var(--sheet); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.card b { font-family: var(--font-display); font-size: 1.15rem; }
.card span { color: var(--muted); font-size: 0.9rem; }

.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 600; color: var(--muted); }
td.status.open { color: var(--warn); }
td.status.available, td.status.done { color: var(--ok); }

.weeks td, .weeks th { white-space: nowrap; }
.weeks tr.partial td { color: var(--muted); }
.barcell { width: 30%; min-width: 120px; }
.bar { position: relative; display: block; height: 10px; background: var(--paper); border: 1px solid var(--line); }
.bar .target { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 25%, transparent); }
.bar .fill { position: absolute; top: 2px; bottom: 2px; left: 0; background: var(--bike); }
.pill { font-family: var(--font-data); font-size: 0.75rem; padding: 1px 6px; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); }
.pill.low { color: var(--warn); }
.pill.high { color: var(--alert); }
.narrow { max-width: 480px; }
.form { display: grid; gap: 8px; margin-bottom: 12px; }
input, select, button { font: inherit; padding: 8px 10px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); }
button { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 600; cursor: pointer; }
select { margin: 4px 0 12px; max-width: 100%; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px 32px; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
