/* Design tokens + component styles, ported from the Kudova Claude Artifact prototype so the
   real app looks and feels identical. Light/dark themes both follow the OS preference. */
:root{
  --bg:oklch(97% 0.006 85);
  --page-bg:oklch(93% 0.008 85);
  --surface:oklch(100% 0 0);
  --surface-2:oklch(99% 0.004 85);
  --border:oklch(91% 0.012 270);
  --border-soft:oklch(94% 0.008 270);
  --text:oklch(20% 0.014 270);
  --text-2:oklch(50% 0.012 270);
  --text-3:oklch(60% 0.01 270);
  --accent:oklch(52% 0.16 265);
  --accent-glass-a:oklch(66% 0.170 265);
  --accent-glass-b:oklch(48% 0.180 265);
  --accent-glass-shadow:oklch(42% 0.170 265 / 0.4);
  --accent-glass-fg:oklch(99% 0.004 265);
  --accent-ink:oklch(99% 0.006 265);
  --accent-soft:oklch(94% 0.03 265);
  --accent-soft-fg:oklch(48% 0.16 265);
  --success:oklch(50% 0.13 150);
  --success-glass-a:oklch(64% 0.140 150);
  --success-glass-b:oklch(46% 0.150 150);
  --success-glass-shadow:oklch(40% 0.140 150 / 0.4);
  --success-glass-fg:oklch(99% 0.004 150);
  --success-soft:oklch(95% 0.025 145);
  --warn:oklch(56% 0.14 65);
  --warn-glass-a:oklch(70% 0.150 65);
  --warn-glass-b:oklch(52% 0.160 65);
  --warn-glass-shadow:oklch(46% 0.150 65 / 0.4);
  --warn-glass-fg:oklch(99% 0.004 65);
  --warn-soft:oklch(94% 0.035 70);
  --rose:oklch(55% 0.17 15);
  --rose-glass-a:oklch(69% 0.180 15);
  --rose-glass-b:oklch(51% 0.190 15);
  --rose-glass-shadow:oklch(45% 0.180 15 / 0.4);
  --rose-glass-fg:oklch(99% 0.004 15);
  --rose-soft:oklch(94% 0.035 15);
  --violet:oklch(50% 0.16 300);
  --violet-glass-a:oklch(64% 0.170 300);
  --violet-glass-b:oklch(46% 0.180 300);
  --violet-glass-shadow:oklch(40% 0.170 300 / 0.4);
  --violet-glass-fg:oklch(99% 0.004 300);
  --violet-soft:oklch(94% 0.03 300);
  --teal:oklch(50% 0.1 195);
  --teal-glass-a:oklch(64% 0.110 195);
  --teal-glass-b:oklch(46% 0.120 195);
  --teal-glass-shadow:oklch(40% 0.110 195 / 0.4);
  --teal-glass-fg:oklch(99% 0.004 195);
  --teal-soft:oklch(93% 0.03 195);
  --amber:oklch(62% 0.14 80);
  --amber-glass-a:oklch(76% 0.150 80);
  --amber-glass-b:oklch(58% 0.160 80);
  --amber-glass-shadow:oklch(52% 0.150 80 / 0.4);
  --amber-glass-fg:oklch(99% 0.004 80);
  --amber-soft:oklch(94% 0.04 85);
  --pink:oklch(58% 0.190 350);
  --pink-glass-a:oklch(72% 0.200 350);
  --pink-glass-b:oklch(54% 0.210 350);
  --pink-glass-shadow:oklch(48% 0.200 350 / 0.4);
  --pink-glass-fg:oklch(99% 0.004 350);
  --lightblue:oklch(58% 0.120 230);
  --lightblue-glass-a:oklch(72% 0.130 230);
  --lightblue-glass-b:oklch(54% 0.140 230);
  --lightblue-glass-shadow:oklch(48% 0.130 230 / 0.4);
  --lightblue-glass-fg:oklch(99% 0.004 230);
  --orange:oklch(60% 0.170 55);
  --orange-glass-a:oklch(74% 0.180 55);
  --orange-glass-b:oklch(56% 0.190 55);
  --orange-glass-shadow:oklch(50% 0.180 55 / 0.4);
  --orange-glass-fg:oklch(99% 0.004 55);
  --yellow:oklch(64% 0.150 98);
  --yellow-glass-a:oklch(78% 0.160 98);
  --yellow-glass-b:oklch(60% 0.170 98);
  --yellow-glass-shadow:oklch(54% 0.160 98 / 0.4);
  --yellow-glass-fg:oklch(99% 0.004 98);
  --red:oklch(54% 0.200 25);
  --red-glass-a:oklch(68% 0.210 25);
  --red-glass-b:oklch(50% 0.220 25);
  --red-glass-shadow:oklch(44% 0.210 25 / 0.4);
  --red-glass-fg:oklch(99% 0.004 25);
  --maroon:oklch(38% 0.140 20);
  --maroon-glass-a:oklch(52% 0.150 20);
  --maroon-glass-b:oklch(34% 0.160 20);
  --maroon-glass-shadow:oklch(28% 0.150 20 / 0.4);
  --maroon-glass-fg:oklch(99% 0.004 20);
  /* Standardized-testing percentile chart series (Sept 2026) -- a small fixed categorical set,
     separate from the category badge colors above, picked and validated (dataviz skill's
     CVD-safety checks: lightness band, chroma floor, adjacent + all-pairs CVD Delta-E, contrast)
     against BOTH the light surface (#fcfcfb) and the dark surface (#20242c) at once -- these
     five hex values pass both, so unlike most tokens above they don't need separate dark-mode
     values. Never reused for category badges/other UI -- keeps this chart's subject->color
     mapping the only thing these mean. Assigned in this fixed order (never cycled/reassigned by
     rank) to subjects sorted alphabetically -- see TEST_SUBJECT_PALETTE in app.js. */
  --test-series-1:#c62c58; /* rose */
  --test-series-2:#9c6700; /* amber -- Reading family (previously the single ELA/English family; split Sept 2026 v4, see testing.js) */
  --test-series-3:#00908a; /* teal */
  --test-series-4:#0072da; /* blue */
  --test-series-5:#a041b5; /* violet */
  --test-series-6:#1f8a3d; /* green -- Overall/Composite family, Sept 2026 correlation redesign; validated with the dataviz skill's validate_palette.js alongside series 1-5 (categorical, light+dark, both pass) */
  --test-series-7:#c2185b; /* magenta -- Language & Writing family, Sept 2026 v4 ELA-split redesign (see testing.js); validated with the dataviz skill's validate_palette.js alongside series 1-6 (categorical, light+dark, both pass) */
  --shadow-soft:0 1px 2px oklch(20% 0.02 270 / 0.06), 0 8px 20px oklch(20% 0.02 270 / 0.05);
  --shadow-accent:0 10px 22px oklch(52% 0.16 265 / 0.32);
  --shadow-elevated:0 1px 3px oklch(20% 0.02 270 / 0.09), 0 12px 26px oklch(20% 0.02 270 / 0.12);
  --danger:oklch(52% 0.19 25);
  --danger-glass-a:oklch(66% 0.200 25);
  --danger-glass-b:oklch(48% 0.210 25);
  --danger-glass-shadow:oklch(42% 0.200 25 / 0.4);
  --danger-glass-fg:oklch(99% 0.004 25);
  --danger-soft:oklch(94% 0.04 25);
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:10px;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:oklch(21% 0.014 265);
    --page-bg:oklch(15% 0.012 265);
    --surface:oklch(26% 0.016 265);
    --surface-2:oklch(29% 0.017 265);
    --border:oklch(35% 0.02 265);
    --border-soft:oklch(31% 0.018 265);
    --text:oklch(95% 0.006 265);
    --text-2:oklch(76% 0.012 265);
    --text-3:oklch(64% 0.012 265);
    --accent:oklch(74% 0.13 265);
  --accent-glass-a:oklch(82% 0.150 265);
  --accent-glass-b:oklch(60% 0.160 265);
  --accent-glass-shadow:oklch(49% 0.150 265 / 0.55);
  --accent-glass-fg:oklch(98% 0.006 265);
    --accent-ink:oklch(16% 0.03 265);
    --accent-soft:oklch(32% 0.055 265);
    --accent-soft-fg:oklch(84% 0.09 265);
    --success:oklch(74% 0.15 150);
  --success-glass-a:oklch(82% 0.170 150);
  --success-glass-b:oklch(60% 0.180 150);
  --success-glass-shadow:oklch(49% 0.170 150 / 0.55);
  --success-glass-fg:oklch(98% 0.006 150);
    --success-soft:oklch(30% 0.05 150);
    --warn:oklch(78% 0.13 75);
  --warn-glass-a:oklch(86% 0.150 75);
  --warn-glass-b:oklch(64% 0.160 75);
  --warn-glass-shadow:oklch(53% 0.150 75 / 0.55);
  --warn-glass-fg:oklch(98% 0.006 75);
    --warn-soft:oklch(32% 0.05 75);
    --rose:oklch(75% 0.14 15);
  --rose-glass-a:oklch(83% 0.160 15);
  --rose-glass-b:oklch(61% 0.170 15);
  --rose-glass-shadow:oklch(50% 0.160 15 / 0.55);
  --rose-glass-fg:oklch(98% 0.006 15);
    --rose-soft:oklch(32% 0.05 15);
    --violet:oklch(76% 0.12 300);
  --violet-glass-a:oklch(84% 0.140 300);
  --violet-glass-b:oklch(62% 0.150 300);
  --violet-glass-shadow:oklch(51% 0.140 300 / 0.55);
  --violet-glass-fg:oklch(98% 0.006 300);
    --violet-soft:oklch(32% 0.05 300);
    --teal:oklch(74% 0.1 195);
  --teal-glass-a:oklch(82% 0.120 195);
  --teal-glass-b:oklch(60% 0.130 195);
  --teal-glass-shadow:oklch(49% 0.120 195 / 0.55);
  --teal-glass-fg:oklch(98% 0.006 195);
    --teal-soft:oklch(30% 0.045 195);
    --amber:oklch(78% 0.11 85);
  --amber-glass-a:oklch(86% 0.130 85);
  --amber-glass-b:oklch(64% 0.140 85);
  --amber-glass-shadow:oklch(53% 0.130 85 / 0.55);
  --amber-glass-fg:oklch(98% 0.006 85);
    --amber-soft:oklch(33% 0.05 85);
    --pink:oklch(80% 0.160 350);
    --pink-glass-a:oklch(88% 0.180 350);
    --pink-glass-b:oklch(66% 0.190 350);
    --pink-glass-shadow:oklch(55% 0.180 350 / 0.55);
    --pink-glass-fg:oklch(98% 0.006 350);
    --lightblue:oklch(80% 0.100 230);
    --lightblue-glass-a:oklch(88% 0.120 230);
    --lightblue-glass-b:oklch(66% 0.130 230);
    --lightblue-glass-shadow:oklch(55% 0.120 230 / 0.55);
    --lightblue-glass-fg:oklch(98% 0.006 230);
    --orange:oklch(82% 0.150 55);
    --orange-glass-a:oklch(90% 0.170 55);
    --orange-glass-b:oklch(68% 0.180 55);
    --orange-glass-shadow:oklch(57% 0.170 55 / 0.55);
    --orange-glass-fg:oklch(98% 0.006 55);
    --yellow:oklch(86% 0.130 98);
    --yellow-glass-a:oklch(94% 0.150 98);
    --yellow-glass-b:oklch(72% 0.160 98);
    --yellow-glass-shadow:oklch(61% 0.150 98 / 0.55);
    --yellow-glass-fg:oklch(98% 0.006 98);
    --red:oklch(76% 0.180 25);
    --red-glass-a:oklch(84% 0.200 25);
    --red-glass-b:oklch(62% 0.210 25);
    --red-glass-shadow:oklch(51% 0.200 25 / 0.55);
    --red-glass-fg:oklch(98% 0.006 25);
    --maroon:oklch(58% 0.130 20);
    --maroon-glass-a:oklch(66% 0.150 20);
    --maroon-glass-b:oklch(44% 0.160 20);
    --maroon-glass-shadow:oklch(33% 0.150 20 / 0.55);
    --maroon-glass-fg:oklch(98% 0.006 20);
    --danger:oklch(74% 0.15 25);
  --danger-glass-a:oklch(82% 0.170 25);
  --danger-glass-b:oklch(60% 0.180 25);
  --danger-glass-shadow:oklch(49% 0.170 25 / 0.55);
  --danger-glass-fg:oklch(98% 0.006 25);
    --danger-soft:oklch(32% 0.06 25);
    --shadow-soft:0 1px 2px oklch(0% 0 0 / 0.3), 0 10px 24px oklch(0% 0 0 / 0.35);
    --shadow-accent:0 10px 24px oklch(0% 0 0 / 0.45);
    --shadow-elevated:0 2px 5px oklch(0% 0 0 / 0.35), 0 16px 32px oklch(0% 0 0 / 0.4);
  }
}
:root[data-theme="dark"]{
  --bg:oklch(21% 0.014 265);
  --page-bg:oklch(15% 0.012 265);
  --surface:oklch(26% 0.016 265);
  --surface-2:oklch(29% 0.017 265);
  --border:oklch(35% 0.02 265);
  --border-soft:oklch(31% 0.018 265);
  --text:oklch(95% 0.006 265);
  --text-2:oklch(76% 0.012 265);
  --text-3:oklch(64% 0.012 265);
  --accent:oklch(74% 0.13 265);
  --accent-glass-a:oklch(82% 0.150 265);
  --accent-glass-b:oklch(60% 0.160 265);
  --accent-glass-shadow:oklch(49% 0.150 265 / 0.55);
  --accent-glass-fg:oklch(98% 0.006 265);
  --accent-ink:oklch(16% 0.03 265);
  --accent-soft:oklch(32% 0.055 265);
  --accent-soft-fg:oklch(84% 0.09 265);
  --success:oklch(74% 0.15 150);
  --success-glass-a:oklch(82% 0.170 150);
  --success-glass-b:oklch(60% 0.180 150);
  --success-glass-shadow:oklch(49% 0.170 150 / 0.55);
  --success-glass-fg:oklch(98% 0.006 150);
  --success-soft:oklch(30% 0.05 150);
  --warn:oklch(78% 0.13 75);
  --warn-glass-a:oklch(86% 0.150 75);
  --warn-glass-b:oklch(64% 0.160 75);
  --warn-glass-shadow:oklch(53% 0.150 75 / 0.55);
  --warn-glass-fg:oklch(98% 0.006 75);
  --warn-soft:oklch(32% 0.05 75);
  --rose:oklch(75% 0.14 15);
  --rose-glass-a:oklch(83% 0.160 15);
  --rose-glass-b:oklch(61% 0.170 15);
  --rose-glass-shadow:oklch(50% 0.160 15 / 0.55);
  --rose-glass-fg:oklch(98% 0.006 15);
  --rose-soft:oklch(32% 0.05 15);
  --violet:oklch(76% 0.12 300);
  --violet-glass-a:oklch(84% 0.140 300);
  --violet-glass-b:oklch(62% 0.150 300);
  --violet-glass-shadow:oklch(51% 0.140 300 / 0.55);
  --violet-glass-fg:oklch(98% 0.006 300);
  --violet-soft:oklch(32% 0.05 300);
  --teal:oklch(74% 0.1 195);
  --teal-glass-a:oklch(82% 0.120 195);
  --teal-glass-b:oklch(60% 0.130 195);
  --teal-glass-shadow:oklch(49% 0.120 195 / 0.55);
  --teal-glass-fg:oklch(98% 0.006 195);
  --teal-soft:oklch(30% 0.045 195);
  --amber:oklch(78% 0.11 85);
  --amber-glass-a:oklch(86% 0.130 85);
  --amber-glass-b:oklch(64% 0.140 85);
  --amber-glass-shadow:oklch(53% 0.130 85 / 0.55);
  --amber-glass-fg:oklch(98% 0.006 85);
  --amber-soft:oklch(33% 0.05 85);
  --pink:oklch(80% 0.160 350);
  --pink-glass-a:oklch(88% 0.180 350);
  --pink-glass-b:oklch(66% 0.190 350);
  --pink-glass-shadow:oklch(55% 0.180 350 / 0.55);
  --pink-glass-fg:oklch(98% 0.006 350);
  --lightblue:oklch(80% 0.100 230);
  --lightblue-glass-a:oklch(88% 0.120 230);
  --lightblue-glass-b:oklch(66% 0.130 230);
  --lightblue-glass-shadow:oklch(55% 0.120 230 / 0.55);
  --lightblue-glass-fg:oklch(98% 0.006 230);
  --orange:oklch(82% 0.150 55);
  --orange-glass-a:oklch(90% 0.170 55);
  --orange-glass-b:oklch(68% 0.180 55);
  --orange-glass-shadow:oklch(57% 0.170 55 / 0.55);
  --orange-glass-fg:oklch(98% 0.006 55);
  --yellow:oklch(86% 0.130 98);
  --yellow-glass-a:oklch(94% 0.150 98);
  --yellow-glass-b:oklch(72% 0.160 98);
  --yellow-glass-shadow:oklch(61% 0.150 98 / 0.55);
  --yellow-glass-fg:oklch(98% 0.006 98);
  --red:oklch(76% 0.180 25);
  --red-glass-a:oklch(84% 0.200 25);
  --red-glass-b:oklch(62% 0.210 25);
  --red-glass-shadow:oklch(51% 0.200 25 / 0.55);
  --red-glass-fg:oklch(98% 0.006 25);
  --maroon:oklch(58% 0.130 20);
  --maroon-glass-a:oklch(66% 0.150 20);
  --maroon-glass-b:oklch(44% 0.160 20);
  --maroon-glass-shadow:oklch(33% 0.150 20 / 0.55);
  --maroon-glass-fg:oklch(98% 0.006 20);
  --danger:oklch(74% 0.15 25);
  --danger-glass-a:oklch(82% 0.170 25);
  --danger-glass-b:oklch(60% 0.180 25);
  --danger-glass-shadow:oklch(49% 0.170 25 / 0.55);
  --danger-glass-fg:oklch(98% 0.006 25);
  --danger-soft:oklch(32% 0.06 25);
  --shadow-soft:0 1px 2px oklch(0% 0 0 / 0.3), 0 10px 24px oklch(0% 0 0 / 0.35);
  --shadow-accent:0 10px 24px oklch(0% 0 0 / 0.45);
  --shadow-elevated:0 2px 5px oklch(0% 0 0 / 0.35), 0 16px 32px oklch(0% 0 0 / 0.4);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--page-bg);
  font-family:'Source Sans 3', system-ui, sans-serif;
  color:var(--text);
  min-height:100dvh;
  display:flex;
  justify-content:center;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:'Sora', system-ui, sans-serif; margin:0; text-wrap:balance;}
p{margin:0;}
button{font-family:inherit; cursor:pointer; border:none; background:none; color:inherit;}
input,textarea,select{font-family:inherit; color:inherit;}
a{color:inherit;}
::selection{background:var(--accent-soft); color:var(--accent-soft-fg);}
@media (prefers-reduced-motion: reduce){
  *{animation-duration:0.01ms !important; transition-duration:0.01ms !important;}
}

#app-shell{
  width:100%;
  max-width:460px;
  min-height:100dvh;
  background:var(--bg);
  display:flex;
  flex-direction:column;
  position:relative;
  box-shadow:var(--shadow-soft);
}
@media (min-width:560px){
  body{padding:28px 12px;}
  #app-shell{min-height:min(844px, calc(100dvh - 56px)); border-radius:32px; overflow:hidden; border:1px solid var(--border-soft);}
}

/* .app-main (Sept 2026, tablet/desktop layout): the new appBar+scroll-area wrapper needs its
   own flex:1/min-height:0 here, at every width, not just inside the >=1024px query below --
   without it, .scroll-area's flex:1 has nothing definite to flex against, so .scroll-area (and
   with it, the whole page) grows to the height of its content instead of staying pinned to
   #app-shell's 100dvh box and scrolling internally. The visible symptom on a tall tab (Goals)
   was the bottom tab bar -- position:absolute; bottom:0 against .app-frame's 100dvh box --
   ending up stranded partway down the page once the page itself became scrollable, instead of
   staying pinned to the bottom of the viewport. min-height:0 overrides the flex default of
   min-height:auto, which is what let .app-main's content force it taller than its flex-basis. */
.app-main{flex:1; min-height:0;}
.scroll-area{flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;}
.pad{padding:18px 20px 110px;}
.stack{display:flex; flex-direction:column;}
.row{display:flex; align-items:center;}
.g2{gap:2px;} .g4{gap:4px;} .g6{gap:6px;} .g8{gap:8px;} .g10{gap:10px;} .g12{gap:12px;} .g14{gap:14px;} .g16{gap:16px;} .g18{gap:18px;} .g20{gap:20px;} .g22{gap:22px;} .g24{gap:24px;}
.grow{flex:1;}
.center{align-items:center; justify-content:center;}
.between{justify-content:space-between;}
.eyebrow{font-size:13.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-3);}
.muted{color:var(--text-2);}
.tiny{font-size:13.5px;}
.num{font-variant-numeric:tabular-nums;}
.tap{-webkit-tap-highlight-color:transparent;}
.tap:focus-visible, button:focus-visible, [tabindex]:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:6px;}

.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:16px; box-shadow:var(--shadow-elevated);}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:999px; padding:13.5px 21px; font-weight:700; font-size:16px; transition:transform .12s ease, opacity .12s ease;}
.btn:active{transform:scale(0.97);}
.btn-primary{background:linear-gradient(180deg, var(--accent-glass-a), var(--accent) 70%); color:var(--accent-ink); padding:15px 22px; font-size:16.5px; box-shadow:var(--shadow-accent), inset 0 1px 0 oklch(100% 0 0 / .3), inset 0 -2px 3px oklch(0% 0 0 / .12);}
.btn-primary:disabled{opacity:.45; box-shadow:none;}
.btn-ghost{background:var(--surface-2); color:var(--text); border:1px solid var(--border); box-shadow:0 1px 2px oklch(20% 0.02 270 / .06);}
.btn-ghost:disabled{opacity:.5;}
.btn-text{color:var(--accent); font-weight:700; font-size:15px;}
.btn-text:disabled{opacity:.5;}
.btn-block{width:100%;}
.chip{display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px; font-size:14.5px; font-weight:600; border:1px solid var(--border); background:var(--surface); color:var(--text);}
.icon-box{border-radius:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative; overflow:hidden; box-shadow:0 4px 10px var(--icb-shadow, oklch(20% 0.02 270 / .14)), inset 0 1.5px 1.5px oklch(100% 0 0 / .4), inset 0 -2px 3px oklch(0% 0 0 / .16);}
.icon-box::before{content:""; position:absolute; top:-35%; left:-8%; width:75%; height:65%; background:radial-gradient(ellipse at center, oklch(100% 0 0 / .55), oklch(100% 0 0 / 0) 72%); pointer-events:none;}
.icon-wrap{display:inline-flex; align-items:center; justify-content:center; line-height:0;}
.avatar{border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-family:'Sora',sans-serif; font-weight:700; color:white; box-shadow:inset 0 1.5px 1.5px oklch(100% 0 0 / .4), inset 0 -2px 3px oklch(0% 0 0 / .13), 0 1px 2px oklch(0% 0 0 / .15);}
.field{display:flex; flex-direction:column; gap:6px;}
.field label{font-size:14px; font-weight:700; color:var(--text-2);}
.field input, .field select, .field textarea{
  border:1px solid var(--border); background:var(--surface); border-radius:12px; padding:12px 13px; font-size:16px; color:var(--text); width:100%;
}
.field input:focus, .field select:focus, .field textarea:focus{outline:2px solid var(--accent); outline-offset:-1px;}
.field textarea{resize:vertical; min-height:72px;}
/* Line-item row inputs (lineItemRow, app.js) sit three-across in a flex row, not inside a
   .field wrapper, so they never picked up .field input's background/border/color -- only the
   bare `input{color:inherit}` reset (line ~320). That's invisible-looking on most browsers
   because Firefox/Chrome auto-dark-style native form controls to match a dark page even with
   no explicit background set; iOS Safari does NOT do this, so it fell back to the UA default
   white input background with the inherited light theme text color on top of it -- readable-
   but-just-barely on a screenshot, effectively "empty-looking" at a glance (Oct 2026, iOS 27
   Safari bug report). Same declarations as .field input, sans width:100% so flex still sizes
   these three columns independently. */
.li-input{border:1px solid var(--border); background:var(--surface); border-radius:12px; padding:12px 13px; font-size:16px; color:var(--text);}
.li-input:focus{outline:2px solid var(--accent); outline-offset:-1px;}
.progress-track{height:9px; border-radius:999px; background:var(--border-soft); overflow:hidden;}
.progress-fill{height:100%; border-radius:999px; background:var(--accent);}
.sheet-backdrop{position:absolute; inset:0; background:oklch(15% 0.02 265 / 0.45); z-index:40; animation:fade-in .18s ease;}
.sheet{position:absolute; left:0; right:0; bottom:0; background:var(--surface); border-radius:22px 22px 0 0; z-index:41; max-height:88%; display:flex; flex-direction:column; box-shadow:0 -12px 32px oklch(0% 0 0 / 0.18); animation:sheet-up .22s cubic-bezier(.2,.9,.3,1);}
/* 2026-10-24: a persistent corner close button for every sheet (sheetShell, app.js) -- see its own comment. position:absolute against .sheet (not .scroll-area), so it never scrolls away on long sheets. */
.sheet-close-fixed{position:absolute; top:14px; right:14px; z-index:3; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--surface); color:var(--text-3); box-shadow:0 2px 8px oklch(0% 0 0 / 0.16); border:1px solid var(--border-soft);}
.sheet-grab{width:36px; height:4px; border-radius:99px; background:var(--border); margin:10px auto 2px;}
/* Oct 2026, flash fix: applied by sheetShell() (app.js) to the backdrop/.sheet elements when a
   sheet was already open at the end of the previous render -- see sheetWasOpenAtLastRender --
   so a re-render that only changes content INSIDE an already-open sheet (an FAQ row expanding,
   a different catalog entry opening, a live search keystroke) doesn't replay the fade-in/
   slide-up entrance animation on the brand-new DOM nodes root.innerHTML just created. */
.no-anim{animation:none;}
.toast{position:absolute; left:50%; transform:translateX(-50%); bottom:104px; background:var(--text); color:var(--bg); padding:11px 18px; border-radius:999px; font-size:14.5px; font-weight:600; z-index:60; box-shadow:0 8px 20px oklch(0% 0 0 /.25); animation:toast-in .2s ease; max-width:82%; text-align:center;}
/* Oct 2026 (update-UX round): unlike .toast above, this does NOT auto-dismiss -- it stays until
   the user taps Refresh or the dismiss x, since "a new version is ready" remains true until
   they act on it. Positioned above .tabbar (78px tall) rather than centered like .toast, so it
   never collides with it if both happen to be showing; reuses the same toast-in entrance. */
/* Oct 2026 redesign (direct user feedback -- "visually stand out more noticeably"): the
 * accent gradient + inset-highlight treatment is the SAME language as .fab and the onboarding
 * icon chips (see their own comments) -- a deliberately recognizable "something good/new"
 * signal in this app, not a new color invented just for this banner. Previously plain
 * var(--surface) with a hairline border, effectively indistinguishable at a glance from an
 * ordinary card. */
.update-banner{position:absolute; left:16px; right:16px; bottom:96px; display:flex; align-items:flex-start; gap:12px; background:linear-gradient(155deg, var(--accent), var(--violet)); color:var(--accent-ink); padding:14px 16px; border-radius:18px; font-size:13.5px; z-index:55; box-shadow:var(--shadow-accent), inset 0 1.5px 0 oklch(100% 0 0 / .18), inset 0 -2px 4px oklch(0% 0 0 / .16); animation:toast-in .2s ease;}
.update-banner-icon{width:34px; height:34px; border-radius:11px; background:oklch(100% 0 0 / .16); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:inset 0 1.5px 1.5px oklch(100% 0 0 / .3);}
.update-banner-title{font-weight:800; font-size:14.5px; line-height:1.3;}
.update-banner-notes{font-size:12.5px; line-height:1.45; opacity:.92;}
.update-banner-help{font-size:11.5px; line-height:1.4; opacity:.78;}
.update-banner-refresh{background:oklch(100% 0 0 / .94); color:var(--accent); font-weight:800; font-size:13px; padding:7px 15px; border-radius:999px;}
@keyframes fade-in{from{opacity:0} to{opacity:1}}
@keyframes sheet-up{from{transform:translateY(16px); opacity:.6} to{transform:translateY(0); opacity:1}}
@keyframes toast-in{from{transform:translate(-50%,8px); opacity:0} to{transform:translate(-50%,0); opacity:1}}
@keyframes spin{to{transform:rotate(360deg)}}
.spinner{width:16px; height:16px; border-radius:50%; border:2.5px solid currentColor; border-right-color:transparent; animation:spin .7s linear infinite; opacity:.7; flex-shrink:0;}

.appbar{flex:0 0 auto; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; column-gap:8px; padding:calc(env(safe-area-inset-top) + 10px) 16px 10px; background:var(--surface); border-bottom:1px solid var(--border); z-index:35;}
.appbar-center{display:flex; justify-content:center; align-items:center; min-width:0;}
.appbar-side-end{display:flex; justify-content:flex-end; align-items:center; min-width:0;}
.tabbar{position:absolute; bottom:0; left:0; right:0; height:78px; padding-bottom:env(safe-area-inset-bottom); background:var(--surface); border-top:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-around; padding-top:10px; z-index:30;}
.tab-item{display:flex; flex-direction:column; align-items:center; gap:4px; color:var(--text-3); width:64px;}
.tab-item.active{color:var(--accent); font-weight:700;}
.tab-item span{font-size:12.5px; margin-top:1px;}
.fab{width:56px; height:56px; border-radius:50%; background:linear-gradient(155deg, var(--accent), var(--violet)); color:var(--accent-ink); display:flex; align-items:center; justify-content:center; margin-top:-26px; box-shadow:var(--shadow-accent), inset 0 1.5px 0 oklch(100% 0 0 / .3), inset 0 -2px 4px oklch(0% 0 0 / .18);}
.fab-label{display:none;} /* base: hidden on the circular mobile/tablet FAB; shown as a pill label only at the >=1024px sidebar breakpoint below */
/* Oct 2026 (first-run walkthrough, step 2): a small inline echo of the real .fab "Add
 * achievement" button, meant to sit mid-sentence in walkthrough body copy so the tour points
 * at the ACTUAL button shape rather than just naming it in words. Reuses .fab's own colors/
 * gradient/icon treatment and the real >=1024px breakpoint below (same media query) so it
 * switches from a circular icon-only badge to a labeled pill at exactly the same width the
 * real tab bar's FAB does -- genuinely "device format specific" rather than a static picture
 * that would look wrong on whichever form factor it wasn't drawn for. Deliberately NOT the
 * .fab class itself reused verbatim: .fab's negative margin-top and fixed 56px size exist to
 * seat it correctly inside .tabbar and would look broken inline in a paragraph. */
.fab-inline{display:inline-flex; width:28px; height:28px; border-radius:50%; background:linear-gradient(155deg, var(--accent), var(--violet)); color:var(--accent-ink); align-items:center; justify-content:center; vertical-align:middle; margin:0 2px -5px; box-shadow:var(--shadow-accent), inset 0 1.5px 0 oklch(100% 0 0 / .3), inset 0 -2px 4px oklch(0% 0 0 / .18);}
.fab-inline .fab-label{display:none;}

.topbar{position:sticky; top:0; z-index:20; background:var(--bg); padding:16px 20px 10px; display:flex; align-items:center; gap:12px;}
.banner{background:var(--warn-soft); color:var(--text); border-radius:12px; padding:10px 13px; font-size:13.5px; display:flex; align-items:center; gap:9px;}
.banner.danger{background:var(--danger-soft);}
.empty-illo{width:56px; height:56px; border-radius:16px; background:linear-gradient(150deg, var(--accent-soft), var(--violet-soft)); display:flex; align-items:center; justify-content:center; color:var(--accent-soft-fg); box-shadow:inset 0 1px 1px oklch(100% 0 0 / .4);}

#root{width:100%; height:100%; display:flex; flex-direction:column;}
#root:focus{outline:none;}

/* ============================== TABLET / DESKTOP LAYOUT (Sept 2026) ==============================
   Phone layout (below 768px) is completely unchanged -- app-shell stays capped at 460px, tabbar
   stays a bottom bar, sheets stay bottom sheets. Two new breakpoints widen the same rendered
   markup via CSS only:
   - tablet (>=768px): app-shell gets more width and Home's badges/updates sit side by side.
     Navigation stays bottom-anchored -- still a touch-first form factor.
   - desktop (>=1024px): app-frame becomes a row (tabBar()'s existing markup repositions into a
     left sidebar purely via CSS -- no duplicate render, see screenApp()'s comment in app.js),
     and sheets become centered modals instead of bottom drawers, since a mobile-style bottom
     sheet spanning a 1000px+ shell reads as broken, not responsive. */
/* .home-analytics (Sept 2026): the Home tab's right-hand GPA/transcript companion column
   (homeAnalyticsPanel() in app.js) -- hidden by default since phones already reach this data
   via the Dashboard tab, and shown only once .home-split becomes a two-column layout below.
   .card-row-grid is different: it wraps EXISTING mobile lists (Dashboard's Categories/
   Documents/Updates) that are just single-file buttons on phone and become a multi-column grid
   once there's width to fill -- nothing hidden, nothing new. */
.home-analytics{display:none;}
.card-row-grid{display:flex; flex-direction:column; gap:8px;}
/* .goals-mobile / .goals-desktop (Sept 2026 v2, whitespace fix): Goals tab markup is rendered
   TWICE -- once as .goals-mobile (a flat .stack.g22, correct top-to-bottom reading order) and
   once as .goals-desktop (two independently-flowing columns) -- only one is ever visible at a
   time, below vs. the >=768px rule further down. This replaced a single shared CSS Grid: pairing
   "Your priority goals" (which can run several hundred px once a family tracks a handful of
   goals) in the same grid row as "Your own goals" (a couple hundred px, fixed) forced that row
   to match the taller one's height -- measured at ~590px of dead space before the next section
   could start underneath the shorter column. Two independent flex columns never share a row, so
   neither has to match the other's height. .goals-desktop is display:none until the >=768px
   rule turns it on and hides .goals-mobile instead -- a hidden copy is excluded from
   hit-testing, tab order and the accessibility tree, so duplicating this markup never double-
   fires a click or creates a second tab stop. */
.goals-mobile{display:flex; flex-direction:column; gap:22px;}
.goals-desktop{display:none;}
/* Missions tab mobile spacing fix (Oct 2026, user-reported): below the 768px breakpoint
   .missions-split has no rule of its own and falls back to plain block flow (see the
   .missions-split comment below), so its two direct children -- the Tasks section and the
   Missions section, each its own `.stack g10` -- sit back to back with zero margin between
   them: the "Missions" eyebrow header ends up jammed directly under the last Tasks card,
   inconsistent with the 22px (g22) spacing used everywhere else between stacked sections on
   this tab. Reset to 0 inside the >=768px rule below, where .missions-split switches to a
   side-by-side grid and the two sections are column siblings, not stacked -- a stray
   margin-top there would shift the Missions column down relative to Tasks. */
.missions-split > div + div{margin-top:22px;}

@media (min-width:768px){
  #app-shell{max-width:760px;}
  .home-split{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start;}
  .home-analytics{display:flex; flex-direction:column;}

  /* Missions (Sept 2026 v2): Tasks and Missions are direct children of .missions-split, one
     per column at this breakpoint -- side by side rather than stacked, now that both sections
     show their full list by default (no "see more" click) and there's no third companion
     column competing for the row. Below this breakpoint .missions-split has no rule of its own,
     so the two sections fall back to plain block flow, Tasks then Missions. The earlier
     focus-goals-progress companion column (missionsGoalsPanel()) was removed -- that's now
     well covered on the Goals tab's own "Areas of Focus" section. */
  .missions-split{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start;}
  .missions-split > div + div{margin-top:0;}

  /* Goals (Sept 2026 v2): .goals-mobile's flat order (priority, own goals, playbook, focus,
     other goals) alternates left/right into .goals-desktop's two columns -- 1st & 3rd & 5th
     items left, 2nd & 4th right -- same assignment a row-major grid auto-placement would give,
     but each column is its own independent flex stack (see the .goals-mobile/.goals-desktop
     comment above), so a short column never gets stretched to match a taller row partner. */
  .goals-mobile{display:none;}
  .goals-desktop{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start;}

  .card-row-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(300px,1fr)); gap:10px;}

  /* Trends sub-tab (Sept 2026, user feedback: tablet-width cards were stretching edge to edge).
     Same 2-column grid pattern as .home-split/.missions-split above -- below this breakpoint
     .trends-split has no rule of its own, so its 4 cards fall back to plain block flow, stacked
     in DOM order (GPA trend, Standardized testing, Most recent transcript, Participation
     tracker). At and above it, row-major grid auto-placement alone pairs GPA+Testing on row 1
     and Transcript+Participation on row 2, since that's already their DOM order. */
  .trends-split{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start;}

  /* Outputs sub-tab (Sept 2026): same tablet-stretch fix as Trends above, applied to the 5
     export/download cards (Activities & Honors Extract, Readiness checklist, Transcript
     summary, Brag sheet, Document bundle). No base rule for .outputs-split, so phone widths
     keep the original single-column stacked flow. Row-major grid auto-placement pairs cards
     1+2 and 3+4 on rows 1-2; the 5th card (Document bundle) is last in DOM order so it lands
     alone on row 3 rather than stranding a different card. */
  .outputs-split{display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start;}
}

@media (min-width:1024px){
  body{padding:0;}
  #app-shell{
    max-width:1180px;
    min-height:100dvh;
    border-radius:0;
    border:none;
    box-shadow:none;
  }
  .app-frame{flex-direction:row;}
  .app-main{flex:1; min-width:0;}

  .tabbar{
    position:static;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    width:228px;
    height:100dvh;
    padding:24px 14px;
    gap:5px;
    border-top:none;
    border-right:1px solid var(--border);
    flex-shrink:0;
  }
  .tab-item{
    flex-direction:row;
    justify-content:flex-start;
    width:auto;
    gap:12px;
    padding:11px 14px;
    border-radius:12px;
  }
  .tab-item:hover{background:var(--surface-2);}
  .tab-item.active{background:var(--accent-soft); color:var(--accent-soft-fg);}
  .tab-item span{font-size:14.5px; margin-top:0;}

  .fab{
    width:auto; height:46px; border-radius:12px; margin:6px 0 12px; order:-1;
    justify-content:flex-start; padding-left:16px;
  }
  .fab .fab-label{display:inline; font-family:'Sora', sans-serif; font-weight:700; font-size:14.5px; margin-left:2px;} /* base .fab-label rule above already hides it below this breakpoint */
  .fab-inline{width:auto; height:24px; border-radius:7px; padding:0 9px; margin:0 2px -6px;}
  .fab-inline .fab-label{display:inline; font-family:'Sora', sans-serif; font-weight:700; font-size:12.5px; margin-left:3px;}

  .sheet{
    left:50%; right:auto; bottom:auto; top:50%;
    transform:translate(-50%,-50%);
    width:min(560px, 88%);
    max-height:85dvh;
    border-radius:22px;
  }
  .sheet-grab{display:none;} /* mobile-only "swipe down to close" affordance; centered modals close via the X/backdrop instead */
  .sheet.sheet-wide{width:min(760px, 92%);} /* transcript grid, outputs builder, brag sheet, document bundle, edit-child -- content that's genuinely wide, not just tall */
  @keyframes sheet-up{from{transform:translate(-50%,-46%); opacity:.6} to{transform:translate(-50%,-50%); opacity:1}}
}

/* Sept 2026: a brief flash on the element a pendingScrollTarget jump (app.js render()) lands
   on, so a family clicking a participation-tracker year chip can actually SEE which entry card
   they were taken to, not just that the page scrolled somewhere. Self-resolving (both ends are
   transparent) so no JS cleanup is needed -- the next render() wipes it anyway. */
@keyframes kudova-highlight-flash{0%{background-color:transparent;}15%{background-color:var(--accent-soft);}100%{background-color:transparent;}}
.flash-highlight{animation:kudova-highlight-flash 1.6s ease-out;}
