@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #060912;
  --card: rgba(22, 30, 48, .62);
  --card-solid: #141b2c;
  --line: rgba(120, 150, 210, .16);
  --line-2: rgba(120, 150, 210, .30);
  --ink: #eaf0fb;
  --ink-dim: #9fb0cc;
  --ink-faint: #6b7c99;
  --accent: #4cc9f0;
  --green: #45e0a8;
  --amber: #ffc94d;
  --red: #ff6b8b;
  --violet: #b78bff;
  --glow: 0 0 40px;
  --r: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ---------- animated aurora background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -3; overflow: hidden; }
.aurora {
  position: absolute; width: 70vw; height: 70vw; border-radius: 50%;
  filter: blur(90px); opacity: .5; mix-blend-mode: screen;
  animation: drift 22s ease-in-out infinite;
}
.aurora.a { background: #1b4bff; top: -25vw; left: -15vw; }
.aurora.b { background: #7a2bff; top: -10vw; right: -20vw; animation-delay: -7s; }
.aurora.c { background: #00b3b3; bottom: -30vw; left: 20vw; animation-delay: -14s; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(6vw,4vh) scale(1.12); }
  66% { transform: translate(-5vw,-3vh) scale(.95); }
}

/* body storm tint intensifies with level (set on <body data-lvl>) */
body[data-lvl="severe"] .aurora.b,
body[data-lvl="catastrophic"] .aurora.b { background: #ff2b6b; opacity: .55; }

.wrap { max-width: 760px; margin: 0 auto; padding: 30px 18px 90px; position: relative; z-index: 1; }

/* ---------- header ---------- */
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand .dot { color: var(--accent); text-shadow: var(--glow) var(--accent); }
.tag { color: var(--ink-dim); font-size: 13px; font-style: italic; }

/* ---------- forecast hero with live weather ---------- */
.hero {
  margin-top: 20px; position: relative; overflow: hidden;
  border-radius: 24px; padding: 30px 26px 26px;
  background: linear-gradient(180deg, rgba(30,42,68,.7), rgba(14,20,34,.7));
  border: 1px solid var(--line-2);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}
.hero .weather-scene {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 24px;
}
.sun {
  position: absolute; top: -60px; right: -40px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,120,.5), transparent 62%);
  opacity: 0; transition: opacity 1s; animation: sunpulse 6s ease-in-out infinite;
}
@keyframes sunpulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
.cloud {
  position: absolute; font-size: 84px; opacity: 0; filter: blur(.4px);
  animation: floatby linear infinite; will-change: transform;
}
@keyframes floatby { from { transform: translateX(-30%); } to { transform: translateX(860px); } }
.rain {
  position: absolute; inset: 0; opacity: 0; transition: opacity .8s;
  background-image: repeating-linear-gradient(105deg, transparent 0 8px, rgba(160,200,255,.28) 8px 9px);
  animation: pour .5s linear infinite; background-size: 100% 40px;
}
@keyframes pour { from { background-position: 0 0; } to { background-position: -20px 40px; } }
.lightning {
  position: absolute; inset: 0; background: rgba(220,235,255,.9); opacity: 0; z-index: 2; mix-blend-mode: screen;
}
.hero-content { position: relative; z-index: 3; }

.hero .date { position: absolute; top: 0; right: 2px; font-size: 12px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; font-family: 'Space Grotesk', sans-serif; z-index: 4; }
.hero .sky { font-size: 60px; line-height: 1; filter: drop-shadow(0 6px 20px rgba(0,0,0,.5)); }
.hero .verdict {
  font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700;
  letter-spacing: -.03em; margin: 12px 0 8px; line-height: 1.1;
}
.hero .level {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid currentColor;
  text-transform: uppercase; letter-spacing: .08em;
}
.hero .forecast { color: var(--ink-dim); margin-top: 14px; font-size: 15px; max-width: 52ch; }

.lvl-clear   { color: var(--green);  text-shadow: var(--glow) rgba(69,224,168,.5); }
.lvl-cloudy  { color: var(--accent); text-shadow: var(--glow) rgba(76,201,240,.5); }
.lvl-stormy  { color: var(--amber);  text-shadow: var(--glow) rgba(255,201,77,.5); }
.lvl-severe  { color: var(--red);    text-shadow: var(--glow) rgba(255,107,139,.55); }
.lvl-catastrophic { color: var(--violet); text-shadow: var(--glow) rgba(183,139,255,.6); }

/* ---------- Slonik the mascot ---------- */
.mascot { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; }
.mascot .elephant { font-size: 40px; line-height: 1; animation: bob 3.2s ease-in-out infinite; flex: none; }
@keyframes bob { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-5px) rotate(2deg)} }
.bubble {
  position: relative; background: var(--card-solid); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 11px 15px; font-size: 14px; color: var(--ink-dim);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.bubble::before {
  content: ''; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px;
  background: var(--card-solid); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  transform: rotate(45deg);
}
.bubble b { color: var(--ink); }

/* ---------- section titles ---------- */
.sec-title { font-family: 'Space Grotesk', sans-serif; font-size: 13px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--ink-dim); margin: 30px 4px 14px; font-weight: 600; }

/* ---------- check-in grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 580px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.chip {
  appearance: none; cursor: pointer; text-align: left; position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  border-radius: 16px; padding: 15px 14px 13px; min-height: 104px;
  display: flex; flex-direction: column; gap: 7px; backdrop-filter: blur(8px);
  transition: transform .16s cubic-bezier(.2,.8,.2,1), border-color .16s, box-shadow .16s;
}
.chip::after {
  content: ''; position: absolute; inset: 0; border-radius: 16px; opacity: 0;
  background: radial-gradient(120px 80px at 50% 0%, rgba(76,201,240,.18), transparent 70%);
  transition: opacity .2s;
}
.chip:hover { transform: translateY(-4px) scale(1.015); border-color: var(--line-2); box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.chip:hover::after { opacity: 1; }
.chip:active { transform: translateY(-1px) scale(.99); }
.chip .e { font-size: 27px; line-height: 1; }
.chip .l { font-weight: 700; font-size: 13.5px; letter-spacing: -.01em; }
.chip .n { font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; margin-top: auto;
  font-family: 'Space Grotesk', sans-serif; }
.chip.logged { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset, 0 0 24px rgba(69,224,168,.25); }
.chip.logged .l { color: var(--green); }
.chip.surge { border-color: var(--amber); animation: surgepulse 1.8s ease-in-out infinite; }
.chip.surge .n { color: var(--amber); font-weight: 700; }
@keyframes surgepulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,201,77,.4) inset, 0 0 0 rgba(255,201,77,0); }
  50% { box-shadow: 0 0 0 1px rgba(255,201,77,.7) inset, 0 0 26px rgba(255,201,77,.35); }
}
.chip .flame { position: absolute; top: 8px; right: 10px; font-size: 13px; }

/* ---------- reaction ---------- */
.reaction {
  margin-top: 16px; border-radius: 16px; padding: 18px 20px;
  border: 1px solid var(--line-2); background: var(--card); backdrop-filter: blur(10px);
  animation: pop .3s cubic-bezier(.2,.9,.3,1.2);
}
.reaction.hidden { display: none; }
.reaction .head { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; margin-bottom: 5px; }
.reaction .sub { color: var(--ink-dim); font-size: 14.5px; line-height: 1.5; }
.reaction.big {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(255,201,77,.12), var(--card));
  box-shadow: 0 0 40px rgba(255,201,77,.15);
}
.reaction.big .head { color: var(--amber); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Today's log (per-occurrence) ---------- */
.today-log { margin-bottom: 18px; }
.tl-empty { font-size: 13px; color: var(--ink-dim); background: var(--card); border: 1px dashed var(--line-2); border-radius: 14px; padding: 14px 16px; line-height: 1.5; }
.tl-head { font-size: 12px; color: var(--ink-dim); margin: 2px 2px 8px; letter-spacing: .01em; }
.tl-list { display: flex; flex-direction: column; gap: 8px; }
.tl-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.tl-time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.tl-inc { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-inc .tl-e { margin-right: 4px; }
.tl-res { font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.tl-res.unset { color: var(--ink-faint); font-style: italic; }
.tl-edit { font-size: 12px; background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2); border-radius: 9px; padding: 5px 8px; max-width: 150px; }
.tl-del { font-size: 15px; line-height: 1; background: transparent; color: var(--ink-faint); border: 1px solid var(--line-2); border-radius: 9px; width: 34px; height: 34px; cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.tl-del:hover { color: var(--red); border-color: var(--red); }
.tl-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-dim); font-style: italic; padding-top: 2px; }
/* per-occurrence mini-RCA (private, on-device): a collapsible Symptom/Cause/Resolution note */
.tl-rca-wrap { grid-column: 1 / -1; }
.tl-rca-toggle { font-size: 11.5px; line-height: 1; background: transparent; color: var(--ink-faint);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 9px; cursor: pointer;
  transition: color .15s ease, border-color .15s ease; }
.tl-rca-toggle:hover { color: var(--ink-dim); border-color: var(--ink-faint); }
.tl-rca-toggle.has { color: var(--green); border-color: var(--green); }
.tl-rca-toggle.has::after { content: ' ✓'; }
.tl-rca-panel { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px;
  background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 10px; }
.tl-rca-panel.hidden { display: none; }
.rca-f { display: flex; flex-direction: column; gap: 4px; }
.rca-l { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px;
  font-weight: 600; color: var(--ink-dim); }
.rca-c { font-variant-numeric: tabular-nums; font-size: 10.5px; font-weight: 400; font-style: normal;
  color: var(--ink-faint); }
.rca-i { width: 100%; box-sizing: border-box; resize: vertical; min-height: 40px; font: inherit;
  font-size: 12.5px; line-height: 1.45; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 9px; }
.rca-i:focus { outline: none; border-color: var(--accent); }
.rca-i::placeholder { color: var(--ink-faint); }
.rca-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.rca-copy { font-size: 11.5px; background: transparent; color: var(--accent); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 5px 9px; cursor: pointer; transition: border-color .15s ease; }
.rca-copy:hover { border-color: var(--accent); }
.rca-priv { font-size: 11px; color: var(--ink-faint); margin-left: auto; }
@media (max-width: 560px) {
  .tl-row { grid-template-columns: auto 1fr auto; grid-auto-rows: auto; }
  .tl-res { grid-column: 2 / 3; }
  .tl-edit { grid-column: 1 / 3; max-width: none; min-height: 40px; }
  .tl-del { grid-column: 3 / 4; grid-row: 1 / 2; width: 44px; height: 44px; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  text-align: center; backdrop-filter: blur(8px); }
.stat .big { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.stat .lbl { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
#stat-streak { color: var(--amber); }

/* ---------- storm board ---------- */
.board { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px;
  backdrop-filter: blur(8px); }
.bar-row { display: grid; grid-template-columns: 158px 1fr 54px; align-items: center; gap: 12px; padding: 7px 0; }
.bar-row .name { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 11px; background: rgba(255,255,255,.05); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  transition: width .8s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(76,201,240,.4); }
.bar-row.surge .bar-fill { background: linear-gradient(90deg, var(--amber), var(--red)); box-shadow: 0 0 14px rgba(255,107,139,.5); }
.bar-row .val { text-align: right; font-size: 12.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums;
  font-family: 'Space Grotesk', sans-serif; }

/* ---------- buttons ---------- */
.actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn { appearance: none; cursor: pointer; border-radius: 14px; padding: 12px 18px; font-weight: 700; font-size: 13.5px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); transition: .15s; backdrop-filter: blur(8px);
  font-family: 'Space Grotesk', sans-serif; }
.btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #6a8bff); color: #04121d; border: none;
  box-shadow: 0 8px 28px rgba(76,201,240,.35); }

footer { margin-top: 40px; color: var(--ink-dim); font-size: 13px; text-align: center; line-height: 1.75;
  max-width: 66ch; margin-left: auto; margin-right: auto; }
footer b { color: var(--ink); font-weight: 600; }

/* live/preview status callout — the one-glance "is this real crowd data?" line */
#foot-mode { display: block; max-width: 60ch; margin: 0 auto 16px; padding: 10px 16px;
  border-radius: 12px; font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--ink);
  border: 1px solid var(--line-2); background: var(--card); }
#foot-mode.live { border-color: rgba(69, 224, 168, .5); background: rgba(69, 224, 168, .09); }
#foot-mode.preview { border-color: rgba(255, 201, 77, .45); background: rgba(255, 201, 77, .08); }

.hidden { display: none; }

/* ---------- setup bar ---------- */
.setup { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; backdrop-filter: blur(8px); }
.setup-label { font-weight: 700; font-size: 13.5px; font-family: 'Space Grotesk', sans-serif; }
.setup-hint { font-size: 12px; color: var(--ink-faint); font-style: italic; }
#seg-select {
  background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; max-width: 100%;
}
#seg-select:focus { outline: none; border-color: var(--accent); }

/* ---------- booked badge on chip ---------- */
.chip .booked { position: absolute; top: 8px; right: 10px; font-size: 9.5px; font-weight: 800;
  letter-spacing: .06em; color: var(--green); font-family: 'Space Grotesk', sans-serif; }
/* When a chip is BOTH surging (🔥 top-right) and logged, shift the count badge left so they don't overlap. */
.chip.surge .booked { right: 30px; }

/* ---------- graph controls ---------- */
.board-controls { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.sim-note { margin: -4px 0 12px; padding: 9px 13px; border-radius: 11px; font-size: 12.5px; line-height: 1.45;
  color: var(--ink-dim); background: rgba(183,139,255,0.09); border: 1px dashed rgba(183,139,255,0.42); }
.sim-note:empty { display: none; }
.sim-note b { color: var(--ink); }
.feed-status { margin: -2px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .01em; color: var(--ink-dim); }
.feed-status:empty { display: none; }
.seg-btn { appearance: none; cursor: pointer; border-radius: 999px; padding: 7px 15px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-dim); transition: .14s;
  font-family: 'Space Grotesk', sans-serif; }
.seg-btn:hover { border-color: var(--accent); color: var(--ink); }
.seg-btn.on { background: var(--accent); color: #04121d; border-color: var(--accent); box-shadow: 0 6px 18px rgba(76,201,240,.3); }

/* ---------- ratio badges in board ---------- */
.ratio { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; margin-left: 6px;
  font-family: 'Space Grotesk', sans-serif; vertical-align: middle; }
.ratio.hi { color: var(--red); background: rgba(255,107,139,.14); border: 1px solid rgba(255,107,139,.35); }
.ratio.lo { color: var(--green); background: rgba(69,224,168,.12); border: 1px solid rgba(69,224,168,.3); }

/* ---------- insight line ---------- */
.insight { margin-top: 14px; padding: 14px 18px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  background: linear-gradient(180deg, rgba(76,201,240,.10), var(--card)); border: 1px solid var(--line-2);
  color: var(--ink-dim); backdrop-filter: blur(8px); }
.insight b { color: var(--ink); }
.muted { color: var(--ink-faint); }

/* ---------- resolution picker ---------- */
.res-picker { margin-top: 14px; }
.res-q { font-size: 13px; color: var(--ink-dim); margin-bottom: 8px; font-weight: 600; }
.note-input { width: 100%; box-sizing: border-box; margin: 2px 0 14px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); color: var(--ink);
  font-family: inherit; font-size: 13.5px; outline: none; transition: border-color .15s, background .15s; }
.note-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }
.note-input::placeholder { color: var(--ink-faint); }
.notes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { font-size: 13px; color: var(--ink-dim); padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.notes .muted { color: var(--ink-faint); font-size: 12px; }
.notes li.wi-repeat { color: var(--ink); border-color: rgba(255,201,77,.38); background: rgba(255,201,77,.07);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wi-badge { font-size: 11px; font-weight: 700; color: var(--amber); white-space: nowrap; }
.res-row { display: flex; gap: 8px; flex-wrap: wrap; }
.res-btn { appearance: none; cursor: pointer; border-radius: 10px; padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--card-solid); color: var(--ink-dim); transition: .14s; }
.res-btn:hover { border-color: var(--accent); color: var(--ink); }
.res-btn.on { background: var(--accent); color: #04121d; border-color: var(--accent); }

/* ---------- monthly report ---------- */
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; backdrop-filter: blur(8px); }
.report-cta .rc-head { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; }
.report-cta .rc-sub { color: var(--ink-dim); font-size: 13.5px; margin: 8px 0 16px; line-height: 1.5; max-width: 60ch; }
.rc-form { display: flex; gap: 10px; flex-wrap: wrap; }
.rc-form input { background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 13px; font-size: 13.5px; min-width: 200px; }
.rc-form input:focus { outline: none; border-color: var(--accent); }
.btn.tiny { padding: 5px 10px; font-size: 11.5px; }

.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.report-head .who { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; }
/* Personalized report headline: "🗓️ What [ @handle ▾ ] worked on this month". The <select> is
   inlined into the sentence so switching whose record you're viewing is one obvious tap. */
.who-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.4; }
.who-line .who-q { color: var(--ink); }
.who-line .muted { font-weight: 500; }
.who-select { font: inherit; font-weight: 700; color: var(--ink); background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px 26px 3px 9px; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.who-select:hover, .who-select:focus { border-color: var(--accent); outline: none; }
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- accessibility: respect reduced-motion ---------- */
/* Users who ask their OS for less motion get a calm page: the ambient/looping
   animations (aurora drift, floating clouds, rain, sun & surge pulse) and the
   entrance pop are turned off. Strobing lightning is separately disabled in JS. */
@media (prefers-reduced-motion: reduce) {
  .aurora, .cloud, .rain, .sun, .chip.surge, .reaction { animation: none !important; }
}
.local-note { font-size: 12px; color: var(--ink-dim); background: var(--card-solid); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; margin-bottom: 16px; }
.empty { color: var(--ink-dim); font-size: 14px; } .empty a { color: var(--accent); }

.report-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.report-stats .rs { text-align: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; }
.report-stats .rs b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 24px; }
.report-stats .rs span { font-size: 10.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }

.mix-title, .gaps-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; margin: 6px 0 10px; }
.mix { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; }
.mix-seg { display: flex; align-items: center; justify-content: center; background: rgba(76,201,240,.22); min-width: 26px; font-size: 13px; }
.mix-seg.untag { background: rgba(255,255,255,.06); color: var(--ink-faint); }
.mix-legend { font-size: 11.5px; color: var(--ink-faint); margin-top: 8px; }

.gaps-title { margin-top: 22px; } .gaps-sub { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 12px; }
.gaps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .gaps, .report-stats { grid-template-columns: repeat(2, 1fr); } }
.gap { border-radius: 14px; padding: 14px; border: 1px solid var(--line-2); background: var(--card-solid); }
.gap-high { border-color: rgba(255,107,139,.5); box-shadow: 0 0 24px rgba(255,107,139,.12); }
.gap-med { border-color: rgba(255,201,77,.4); }
.gap-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gap-name { font-weight: 700; font-size: 14px; }
.gap-score { font-family: 'Space Grotesk', sans-serif; font-size: 11px; color: var(--ink-faint); }
.gap-high .gap-score { color: var(--red); } .gap-med .gap-score { color: var(--amber); }
.gap-advice { font-size: 12.5px; color: var(--ink-dim); margin: 8px 0 10px; line-height: 1.5; }
.gap-advice b { color: var(--ink); }
.gap-learn { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.gap-learn:hover { text-decoration: underline; }

/* Sample-preview banner in the monthly record (demo data is tagged demo:true so it can be cleared). */
.sample-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; line-height: 1.5;
  color: var(--ink); background: rgba(255,201,77,.10); border: 1px solid rgba(255,201,77,.42);
  border-radius: 10px; padding: 9px 12px; margin: -4px 0 16px; }
.sample-banner b { color: var(--amber); }
.sb-clear { margin-left: auto; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--amber);
  background: var(--card-solid); border: 1px solid rgba(255,201,77,.5); border-radius: 8px; padding: 5px 11px; transition: .14s; }
.sb-clear:hover { background: rgba(255,201,77,.16); }

/* Personal rolling 30-day trend — its own section, separate from the calendar-month record. */
.trend { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; backdrop-filter: blur(8px); }
.trend-empty { color: var(--ink-dim); font-size: 13.5px; line-height: 1.55; }
.trend-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.trend-stats .rs { text-align: center; background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; }
.trend-stats .rs b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 22px; line-height: 1.1; }
.trend-stats .rs span { font-size: 10.5px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .05em; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 68px; padding: 4px 2px 0; }
.tbar { flex: 1; min-width: 0; background: linear-gradient(180deg, var(--accent), rgba(76,201,240,.35));
  border-radius: 3px 3px 0 0; transition: height .2s ease; }
.tbar.zero { background: var(--line-2); }
.spark-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-dim);
  margin-top: 6px; letter-spacing: .04em; }
.movers-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px; margin: 18px 0 9px; }
.movers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.movers .mv { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink);
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.movers .mv-name { flex: 1; }
.movers .mv-n { font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.movers .mv-cmp { font-weight: 400; font-size: 11px; color: var(--ink-dim); }
.movers .mv.up .mv-n { color: var(--red); }
.movers .mv.down .mv-n { color: var(--green); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--card-solid); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 16px; font-size: 13px; box-shadow: 0 10px 40px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 9999; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
