/* Sodak skin - shared styles (tokens, sky, nav, header, grid, tiles, footer).
   Page-specific styles live in home.css / records.css / reports.css. */
:root {
  --sky-1: #3d4d64; --sky-2: #5a6c85; --sky-3: #7a8ba2;
  --tile: rgba(255, 255, 255, 0.9);
  --tile-solid: #ffffff;
  --tile-edge: rgba(255, 255, 255, 0.75);
  --tile-quiet: rgba(255, 255, 255, 0.62);
  --border: rgba(20, 28, 44, 0.09);
  --border-strong: rgba(20, 28, 44, 0.16);
  --text: #121316;
  --muted: #565b64;
  --faint: #7d828b;
  --track: rgba(20, 28, 44, 0.07);
  --accent: #3b5bdb;
  --accent-soft: rgba(59, 91, 219, 0.10);
  --accent-mid: rgba(59, 91, 219, 0.45);
  --dew: #8f96a3;
  --good: #23885a;
  --warm: #e0592a;
  --warm-soft: rgba(224, 89, 42, 0.11);
  --band: rgba(59, 91, 219, 0.11);
  --warn: #b26a00;
  --warn-soft: rgba(214, 140, 0, 0.13);
  --moon-lit: #f1efe8;
  --moon-dark: #2a2c31;
  --zebra: rgba(20, 28, 44, 0.025);
  --hover: rgba(59, 91, 219, 0.06);
  --rain: #3b7fdb;
  --heat: #e0703a;
  --cool: #3b8fd9;
  --nav-h: 60px;
  --shadow: 0 1px 1px rgba(15, 25, 45, 0.04), 0 12px 32px -14px rgba(15, 25, 45, 0.35);
  --on-sky: #ffffff;
  --on-sky-muted: rgba(255, 255, 255, 0.78);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-edge: rgba(255, 255, 255, 0.22);
  --sky-dim: rgba(6, 10, 20, 0);
  --radius: 16px;
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --tile: rgba(15, 19, 27, 0.76);
  --tile-solid: #141922;
  --tile-edge: rgba(255, 255, 255, 0.07);
  --tile-quiet: rgba(15, 19, 27, 0.5);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef0f4;
  --muted: #a6acb8;
  --faint: #737a88;
  --track: rgba(255, 255, 255, 0.08);
  --accent: #8ea2ff;
  --accent-soft: rgba(142, 162, 255, 0.14);
  --accent-mid: rgba(142, 162, 255, 0.5);
  --dew: #7a8292;
  --good: #4cc38a;
  --warm: #ff8a5c;
  --warm-soft: rgba(255, 138, 92, 0.14);
  --band: rgba(142, 162, 255, 0.14);
  --warn: #f2b84b;
  --warn-soft: rgba(242, 184, 75, 0.14);
  --moon-lit: #e6e4dc;
  --moon-dark: #262a33;
  --zebra: rgba(255, 255, 255, 0.022);
  --hover: rgba(142, 162, 255, 0.08);
  --rain: #6aa8ff;
  --heat: #f08a55;
  --cool: #62aef0;
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 16px 36px -16px rgba(0, 0, 0, 0.6);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --sky-dim: rgba(6, 10, 20, 0.38);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--sky-3);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "tnum" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 50%, var(--sky-3) 100%); }
.sky::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 70% at 50% 0%, rgba(255,255,255,.12), transparent 60%),
              linear-gradient(180deg, transparent 55%, rgba(10,18,30,.22)),
              linear-gradient(var(--sky-dim), var(--sky-dim));
  transition: background .3s ease; }
.cloud { position: absolute; border-radius: 50%; filter: blur(60px);
  background: radial-gradient(closest-side, rgba(225,232,242,.34), rgba(225,232,242,0));
  animation: drift 90s linear infinite alternate; }
.cloud.c1 { width: 900px; height: 360px; top: -120px; left: -200px; }
.cloud.c2 { width: 760px; height: 300px; top: 140px; right: -260px; animation-duration: 120s; animation-direction: alternate-reverse; }
.cloud.c3 { width: 1100px; height: 420px; top: 46%; left: 8%; opacity: .6; animation-duration: 150s; }
.cloud.c4 { width: 640px; height: 260px; bottom: -80px; right: 5%; opacity: .5; animation-duration: 110s; }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- Nav (on sky) ---------- */
.nav { position: sticky; top: 0; z-index: 1000; color: var(--on-sky);
  background: color-mix(in srgb, var(--sky-1) 55%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(255,255,255,.10); }
.nav .wrap { display: flex; align-items: center; height: var(--nav-h); gap: 28px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.015em; font-size: 16px; white-space: nowrap; }
.glyph { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.55);
  display: grid; place-items: center; flex: none; }
.glyph i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.85); }
.brand-img { height: 32px; width: auto; display: block; flex: none; }
.links { display: flex; gap: 2px; }
.links a, .links .soon { padding: 6px 11px; border-radius: 9px; color: var(--on-sky-muted); font-size: 13.5px; transition: color .15s, background .15s; }
.links a:hover { color: #fff; background: rgba(255,255,255,.12); }
.links a.active { color: #121316; background: rgba(255,255,255,.92); font-weight: 500; }
.links .soon { cursor: default; opacity: .55; display: inline-flex; align-items: center; gap: 6px; }
.links .soon em { font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.35); line-height: 1.3; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--glass-edge); background: var(--glass);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, opacity .15s; flex: none; padding: 0; }
.icon-btn:hover { background: rgba(255,255,255,.22); }
.icon-btn:disabled { opacity: .35; cursor: default; background: var(--glass); }
#theme .i-sun { display: none; }
:root[data-theme="dark"] #theme .i-moon { display: none; }
:root[data-theme="dark"] #theme .i-sun { display: block; }
:root[data-theme="dark"] body { background: color-mix(in srgb, var(--sky-3) 62%, #060a14); }
.menu-btn { display: none; }

/* ---------- Sky header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 44px 0 26px; color: var(--on-sky); }
.page-head h1 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.page-head p { margin: 8px 0 0; color: var(--on-sky-muted); font-size: 14px; }
.page-head p b { color: #fff; font-weight: 500; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-sky-muted); margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-edge); color: #fff; font-size: 12.5px; white-space: nowrap;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #5ee0a0; box-shadow: 0 0 0 3px rgba(94,224,160,.22); }
.chip .dot.stale { background: #ffd27a; box-shadow: 0 0 0 3px rgba(255,210,122,.22); }
.chip.mono { font-family: var(--mono); font-size: 12px; }
.chip.alert { background: rgba(234,88,12,.85); border-color: rgba(255,255,255,.3); }

/* Section headings sit on the sky, between bento groups */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; color: var(--on-sky); padding: 40px 0 14px; }
.sec-head:first-of-type { padding-top: 6px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.sec-head p { margin: 4px 0 0; color: var(--on-sky-muted); font-size: 13px; }
.sec-head .aside { color: var(--on-sky-muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }

/* ---------- Grid + tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--tile); border-radius: var(--radius); padding: 20px; min-width: 0; position: relative;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--tile-edge);
  backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35); }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }

.t-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 22px; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.label svg { color: var(--faint); }
.meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.muted { color: var(--muted); }
.ago { display: inline-flex; align-items: center; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--track); color: var(--muted); white-space: nowrap; }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.kv + .kv { margin-top: 4px; }
.kv b { color: var(--text); font-weight: 500; white-space: nowrap; }
.mv { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
.mv small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 3px; }
.mfoot { margin-top: auto; padding-top: 14px; }
.mfoot svg.spark { width: 100%; height: 34px; }
.unavail { display: grid; place-items: center; text-align: center; min-height: 80px; color: var(--muted); font-size: 13px; }

/* ---------- Footer (on sky) ---------- */
footer { padding: 28px 0 44px; color: var(--on-sky-muted); font-size: 12.5px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer b { color: #fff; font-weight: 500; }
footer .mono { font-family: var(--mono); font-size: 11.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .span-2 { grid-column: span 4; }
}
@media (max-width: 1000px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
}
@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .wrap { padding: 0 16px; }
  .nav .wrap { gap: 12px; }
  .links { display: none; }
  .menu-btn { display: grid; }
  .nav.open .links { display: flex; flex-direction: column; gap: 2px; position: absolute; top: calc(var(--nav-h) + 6px); left: 12px; right: 12px;
    padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--sky-1) 92%, #000 8%);
    border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
  .nav.open .links a, .nav.open .links .soon { padding: 10px 12px; font-size: 15px; }
  .page-head { flex-direction: column; align-items: flex-start; padding: 28px 0 18px; gap: 14px; }
  .page-head h1 { font-size: 27px; }
  .chips { justify-content: flex-start; }
  .sec-head { padding: 32px 0 12px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .sec-head h2 { font-size: 18px; }
  .sec-head .aside { white-space: normal; }
  .grid { gap: 12px; }
  .tile { padding: 16px; }
  .t-head { flex-wrap: wrap; row-gap: 6px; }
  .span-2, .span-3 { grid-column: span 6; }
  .mv { font-size: 26px; }
  footer .wrap { flex-direction: column; gap: 4px; }
}
