/* Geist (variable, 400–800), served from this site: no third-party font requests. Latin first; the extended set
   (₹ and accented letters) loads only if a page uses those characters. SIL Open Font License 1.1, see assets/fonts/README.md */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/geist-latin.woff2?v=ee4b1e53db") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/geist-latin-ext.woff2?v=68bb93eba7") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f3ede3; --ink: #27242c; --muted: #7b7480; --line: #e6ded1; --card: rgba(255, 253, 249, 0.92); --accent: #E8452C;
  --soft: #f7f2ea; --ok: #2f9e6a; --warn: #d98b1a;
  --r: 12px; --shadow: 0 1px 2px rgba(39, 36, 44, 0.05), 0 8px 24px rgba(39, 36, 44, 0.08);
  font-family: "Geist", system-ui, sans-serif; color: var(--ink);
}
:root.night { --card: rgba(34, 36, 50, 0.9); --ink: #f1ece4; --muted: #a8a2ae; --line: #3a3d50; --soft: #2b2e3f; --shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--bg); overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul { list-style: none; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.card, .bar, .kpi, .panel, .tracker, .table { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background 600ms, color 600ms, border-color 600ms; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* top bar */
.bar { position: fixed; top: 12px; left: 12px; right: 12px; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 10px 0 14px; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.brand strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.brand em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); position: relative; }
.logo::before { content: ""; position: absolute; inset: 8px 7px 9px; border-radius: 3px 3px 6px 6px; border: 2px solid #fff; border-top-width: 4px; }
.search { position: relative; flex: 1 1 260px; max-width: 340px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; }
.search:focus-within { border-color: var(--accent); }
.results { position: absolute; left: 0; right: 0; top: 42px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.results li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.results li span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.results li[aria-selected="true"], .results li:hover { background: var(--soft); }
.zones { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); flex: none; }
.zones button, .seasons button { height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.zones button[aria-pressed="true"], .seasons button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.zones select { display: none; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.seasons { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
#daynight .moon { display: none; }
#daynight[aria-pressed="true"] .moon { display: inline; }
#daynight[aria-pressed="true"] .sun { display: none; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; }
.alerts { position: relative; }
.alert-list { position: absolute; right: 0; top: 44px; width: 300px; max-height: 320px; overflow: auto; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.alert-list li { display: grid; grid-template-columns: 8px 1fr; gap: 4px 10px; padding: 9px 8px; font-size: 13px; line-height: 1.35; border-bottom: 1px solid var(--line); }
.alert-list li:last-child { border-bottom: 0; }
.alert-list li::before { content: ""; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.alert-list li.warn::before { background: var(--warn); }
.alert-list time { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; padding: 0 6px; min-width: 92px; text-align: right; }
.clock::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); animation: live 1.6s ease-in-out infinite; vertical-align: 1px; }
@keyframes live { 50% { opacity: 0.3; } }

/* KPIs */
.kpis { position: fixed; top: 80px; left: 12px; display: flex; gap: 10px; z-index: 5; }
.kpi { width: 178px; padding: 12px 14px 12px; }
.kpi h2 { font-size: 12px; font-weight: 500; color: var(--muted); }
.kpi .val { margin-top: 4px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .val small { font-size: 14px; font-weight: 500; color: var(--muted); }
.kpi .sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.kpi .sub .up { color: var(--ok); font-weight: 600; }

/* right detail panel */
.panel { position: fixed; top: 80px; right: 12px; bottom: 12px; width: 320px; padding: 16px; overflow: auto; z-index: 5; }
.panel h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.panel .kind { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.panel .meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.panel dl div { padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.panel dt { font-size: 11.5px; color: var(--muted); }
.panel dd { margin-top: 2px; font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.panel h4 { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.panel .list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.panel .list li span { color: var(--muted); }
.panel .close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); font-size: 16px; line-height: 1; }
.panel .bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.panel .meter { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.panel .meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 600ms; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--soft); }
.pill.go { background: rgba(232, 69, 44, 0.12); color: var(--accent); }
.pill.done { background: rgba(47, 158, 106, 0.12); color: var(--ok); }

/* bottom-left tracker */
.tracker { position: fixed; left: 12px; bottom: 12px; width: 380px; padding: 14px 16px; z-index: 5; }
.tracker header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tracker h3 { font-size: 15px; font-weight: 700; }
.tracker .who { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tracker .eta { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 14px; }
.steps li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.15; }
.steps li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 5px; left: 50%; width: 100%; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--accent); border-color: var(--accent); }
.steps li.done::after { background: var(--accent); }
.steps li.now::before { box-shadow: 0 0 0 5px rgba(232, 69, 44, 0.18); }
.tracker .items { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.tracker .items b { color: var(--ink); font-weight: 600; }

/* bottom table */
.table { position: fixed; left: 404px; right: 344px; bottom: 12px; height: 214px; display: flex; flex-direction: column; z-index: 5; overflow: hidden; transition: height 300ms; }
.table.collapsed { height: 44px; }
.tabs { display: flex; gap: 4px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); }
.tabs [role="tab"] { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.collapse { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; }
.collapse svg { width: 16px; height: 16px; transition: transform 300ms; }
.table.collapsed .collapse svg { transform: rotate(180deg); }
.rows { flex: 1; overflow: auto; }
.rows table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rows th { position: sticky; top: 0; background: var(--card); text-align: left; font-weight: 500; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rows td { padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rows tr[data-pick] { cursor: pointer; }
.rows tr[data-pick]:hover td { background: var(--soft); }

.label { position: fixed; left: 0; top: 0; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); z-index: 4; box-shadow: 0 4px 12px rgba(232, 69, 44, 0.3); }
.hint { position: fixed; left: 50%; transform: translateX(-50%); bottom: 300px; font-size: 12px; color: var(--muted); background: var(--card); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); z-index: 3; transition: opacity 600ms; pointer-events: none; }
.hint.gone { opacity: 0; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; font-size: 16px; }

@media (max-width: 1280px) { .zones button { padding: 0 8px; } .kpi { width: 158px; } .table { left: 12px; right: 344px; bottom: 210px; height: 150px; } .tracker { width: 360px; } .hint { display: none; } }
@media (max-width: 1100px) { .zones { display: none; } .zone-select { display: block !important; } .seasons button { padding: 0 8px; } }
.zone-select, .season-select { display: none; height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); font-size: 13px; }

/* phones: compact bar, KPI chips, panel and lists as sheets */
@media (max-width: 760px) {
  .bar { top: 8px; left: 8px; right: 8px; height: auto; flex-wrap: wrap; padding: 8px; gap: 8px; }
  .brand em { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .tools { gap: 6px; }
  .seasons { display: none; }
  .season-select { display: block !important; max-width: 104px; }
  .zone-select { max-width: 118px; }
  .clock { display: none; }
  .kpis { top: auto; bottom: calc(132px + env(safe-area-inset-bottom)); left: 8px; right: 8px; gap: 6px; }
  .kpi { flex: 1; width: auto; padding: 8px 10px; }
  .kpi .val { font-size: 19px; }
  .kpi .sub { display: none; }
  .tracker { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; padding: 10px 12px; }
  .steps li { font-size: 9px; }
  .tracker .items { display: none; }
  .panel { top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; max-height: 52vh; z-index: 8; }
  .panel:not(.has-sel) { display: none; }
  .table { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 46vh; z-index: 9; display: none; }
  .table.open { display: flex; }
  .lists-btn { display: grid !important; }
  .alert-list { position: fixed; left: 8px; right: 8px; width: auto; top: 112px; }
}
.lists-btn { display: none; }

/* the way back to Nervure: a floating call to action above the lists */
.cta-float { position: fixed; z-index: 7; left: calc((404px + 100vw - 344px) / 2); bottom: 240px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; box-shadow: 0 10px 28px rgba(232, 69, 44, 0.35); transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1), box-shadow 300ms; }
.cta-float span { transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1); }
.cta-float:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 14px 34px rgba(232, 69, 44, 0.42); }
.cta-float:hover span { transform: translateX(3px); }
.cta-float:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 1280px) { .cta-float { left: calc((12px + 100vw - 344px) / 2); bottom: 372px; } }
@media (max-width: 760px) { .cta-float { left: 50%; bottom: calc(222px + env(safe-area-inset-bottom)); height: 44px; font-size: 14px; } }
