/* Think Fluent v111 · visual refinement. Colors/surfaces only: no layout changes. */
:root{
 --tf-glow:rgba(31,120,223,.08);--tf-glow-2:rgba(208,39,79,.045);
 --tf-surface-top:#ffffff;--tf-surface-bottom:#f8fbff;
 --tf-surface-border:#d8e3f1;--tf-surface-shadow:0 10px 30px rgba(21,60,109,.078),0 1px 2px rgba(18,55,98,.045);
 --tf-chart-surface:#fff;--tf-chart-text:#244561;--tf-chart-grid:#dce6f1;
 --tf-average-line:#485b70;--tf-trend-line:#182a42;
 --tf-radar-stroke:#206fd2;--tf-radar-fill:#65adf4;
 --tf-trace-t:#ca670e;--tf-trace-r:#c93468;--tf-trace-a:#00816b;
 --tf-trace-c:#794ac9;--tf-trace-e:#176ece;
}
:root[data-theme="dark"]{
 --tf-glow:rgba(31,133,253,.13);--tf-glow-2:rgba(238,53,102,.075);
 --tf-surface-top:#213953;--tf-surface-bottom:#182b43;
 --tf-surface-border:#405a76;--tf-surface-shadow:0 12px 34px rgba(0,8,22,.24),0 1px 0 rgba(235,246,255,.045) inset;
 --tf-chart-surface:#13263d;--tf-chart-text:#edf6ff;--tf-chart-grid:#42607c;
 --tf-average-line:#ffe18a;--tf-trend-line:#f4f9ff;
 --tf-radar-stroke:#85c8ff;--tf-radar-fill:#4f9ff5;
 --tf-trace-t:#ffb24b;--tf-trace-r:#ff729c;--tf-trace-a:#44e4b8;
 --tf-trace-c:#c29bff;--tf-trace-e:#5cb9ff;
 --ink:#f0f6ff;--muted:#bad0e8;--line:#3e5775;--panel:#1b304a;
}
/* Fine architectural texture in the free space, and dimensional but restrained lighting. */
body,
html[data-theme="dark"] body{
 background-image:
  radial-gradient(ellipse at 81% 6%,var(--tf-glow) 0%,transparent 43%),
  radial-gradient(ellipse at 12% 78%,var(--tf-glow-2) 0%,transparent 48%),
  repeating-linear-gradient(115deg,rgba(83,117,156,.027) 0px,rgba(83,117,156,.027) 1px,transparent 1px,transparent 32px),
  url("/assets/pattern-light.svg");
 background-size:auto,auto,auto,920px 600px;
}
html[data-theme="dark"] body{
 background-color:#0e1b2c;
 background-image:
  radial-gradient(ellipse at 81% 5%,var(--tf-glow) 0%,transparent 42%),
  radial-gradient(ellipse at 12% 85%,var(--tf-glow-2) 0%,transparent 48%),
  repeating-linear-gradient(115deg,rgba(145,181,227,.032) 0px,rgba(145,181,227,.032) 1px,transparent 1px,transparent 32px),
  url("/assets/pattern-dark.svg");
}
/* A single visual language for every existing panel, without modifying grid or spacing. */
:is(.panel,.card,.student-panel,.student-summary-card,.student-skill,.report-chart-card,.report-kpi,.report-score-band,.tf-ld-stat,.tf-ld-viz-radar,.tf-ld-chart-wrap,.student-classwork-item,.tf-v104-health-card,.tf-v104-section-card){
 background:linear-gradient(157deg,var(--tf-surface-top) 0%,var(--tf-surface-bottom) 100%);
 border-color:var(--tf-surface-border);
 box-shadow:var(--tf-surface-shadow);
}
/* Keep the existing structure, add crisp hierarchy to header & fields. */
:is(.panel-header,.student-panel-head,.report-chart-head,.tf-ld-radar-head){color:var(--ink)}
:is(.topbar,.student-brand-bar){box-shadow:0 2px 20px rgba(15,46,88,.055)}
html[data-theme="dark"] :is(.topbar,.student-brand-bar){box-shadow:0 6px 24px rgba(0,8,25,.22);background-image:linear-gradient(118deg,rgba(80,148,228,.08),transparent 48%)}
:is(button,.text-button,.ghost-button,.tf-ld-view,.tf-ld-radar-toggle button):not(:disabled){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease}
:is(.tf-ld-view,.tf-ld-radar-toggle button)[aria-pressed="true"]{box-shadow:0 0 0 1px rgba(104,173,245,.19),0 3px 11px rgba(14,77,140,.12)}
html[data-theme="dark"] :is(.tf-ld-view,.tf-ld-radar-toggle button)[aria-pressed="true"]{background:#37638a;color:#fff;border-color:#5798d5;box-shadow:0 0 0 1px rgba(123,196,255,.28),0 3px 12px rgba(8,20,35,.2)}
html[data-theme="dark"] :is(.tf-ld-view,.tf-ld-radar-toggle button):hover{background:#294b6a;border-color:#6097c9}
/* Admin reports: brighter chart surfaces, legible grid and visible observed samples. */
.report-chart-card{border-color:var(--tf-surface-border)}
.report-chart-host{background:linear-gradient(180deg,rgba(94,164,232,.028),transparent 75%)}
.report-chart-host .report-grid-line{stroke:var(--tf-chart-grid);stroke-width:1}
.report-chart-host .report-axis-label{fill:var(--tf-chart-text);opacity:.80;font-weight:600}
.report-chart-host .report-point{opacity:1;stroke:var(--tf-chart-surface);stroke-width:1.9px;paint-order:stroke}
.report-chart-host .report-point:hover{stroke-width:3px;filter:drop-shadow(0 0 3px rgba(73,150,228,.5))}
.report-chart-legend span{color:var(--ink)}
.report-chart-legend i{width:11px;height:11px;box-shadow:0 0 0 2px var(--tf-chart-surface),0 0 0 3px var(--tf-surface-border)}
.report-class-bar-track,.report-stacked-bar{background:#e5eef9;border-color:#cfdeef}
.report-class-bar-fill{background:linear-gradient(90deg,#176fcd,#4d9ef0)}
.report-score-pill{background:#e3f0ff;color:#124d94;border:1px solid #bcd8fa}
.report-comparison-strip strong{color:var(--ink)}
.report-focus-metric{background:var(--tf-surface-bottom);border-color:var(--tf-surface-border)}
.report-kpi{border-color:var(--tf-surface-border)}
.report-kpi strong{color:var(--ink)}
.report-chart-tooltip{background:#0a2747;border:1px solid #69a4db;box-shadow:0 12px 30px rgba(3,18,38,.33)}
html[data-theme="dark"] .report-chart-host{background:linear-gradient(180deg,rgba(73,140,216,.07),transparent 80%)}
html[data-theme="dark"] .report-chart-card{background:linear-gradient(156deg,#203a56,#172b43)}
html[data-theme="dark"] .report-chart-legend span{color:#e2efff}
html[data-theme="dark"] .report-class-bar-track,
html[data-theme="dark"] .report-stacked-bar{background:#101f33;border-color:#3e5e7d}
html[data-theme="dark"] .report-class-bar-fill{background:linear-gradient(90deg,#55adff,#71d9fa)}
html[data-theme="dark"] .report-score-pill{background:#23496c;color:#bde1ff;border-color:#447db3}
html[data-theme="dark"] .report-kpi{background:linear-gradient(150deg,#294561,#192c44)}
html[data-theme="dark"] .report-focus-metric{background:#1d3651;border-color:#415f7d}
html[data-theme="dark"] .report-comparison-strip strong{color:#edf6ff}
html[data-theme="dark"] .report-chart-tooltip{background:#0a223b;border-color:#61a5ed}
/* TRACE: rich, coordinated yet distinct 5-way palette in both modes. */
.tf-ld-stat:nth-child(5n+1){border-top:2px solid var(--tf-trace-t)}
.tf-ld-stat:nth-child(5n+2){border-top:2px solid var(--tf-trace-r)}
.tf-ld-stat:nth-child(5n+3){border-top:2px solid var(--tf-trace-a)}
.tf-ld-stat:nth-child(5n+4){border-top:2px solid var(--tf-trace-c)}
.tf-ld-stat:nth-child(5n+5){border-top:2px solid var(--tf-trace-e)}
.tf-ld-stat-name{color:var(--ink)}
.tf-ld-stat-score{color:var(--ink);font-weight:900}
.tf-ld-chart-wrap,.tf-ld-viz-radar{background:var(--tf-chart-surface)}
.tf-ld-chart-note{background:var(--tf-surface-bottom);color:var(--muted);border-color:var(--tf-surface-border)}
.tf-ld-chart-scroll svg .tf-ld-gridline{stroke:var(--tf-chart-grid)!important}
.tf-ld-chart-scroll svg .tf-ld-tick{stroke:var(--tf-chart-grid)!important}
.tf-ld-chart-scroll svg .tf-ld-axis-label{fill:var(--tf-chart-text)!important;opacity:.84}
.tf-ld-chart-scroll svg [data-tf-ld-average-line]{stroke:var(--tf-average-line)!important;opacity:1}
.tf-ld-chart-scroll svg [data-tf-ld-trend-line]{stroke:var(--tf-trend-line)!important;opacity:.92}
.tf-ld-chart-scroll svg .tf-ld-point{stroke:var(--tf-chart-surface)!important}
.tf-ld-chart-key{color:var(--ink)}
.tf-ld-line-swatch{border-top-color:var(--tf-average-line)}
.tf-ld-line-swatch.tf-ld-swatch-trend{border-top-color:var(--tf-trend-line)}
.tf-ld-radar-svg .tf-ld-radar-grid,
.tf-ld-radar-svg .tf-ld-radar-axis{stroke:var(--tf-chart-grid)!important}
.tf-ld-radar-svg [data-tf-ld-radar-shape]{fill:var(--tf-radar-fill)!important;stroke:var(--tf-radar-stroke)!important;fill-opacity:.22}
.tf-ld-radar-svg text{fill:var(--tf-chart-text)}
.tf-ld-radar-legend-item{color:var(--muted)}
.tf-ld-radar-legend-item strong{color:var(--ink)}
.tf-ld-stat[aria-current="true"]{box-shadow:0 0 0 1px rgba(62,151,245,.22),var(--tf-surface-shadow)}
.tf-ld-table-wrap{border-color:var(--tf-surface-border)}
.tf-ld-table th{background:#e7f2ff;color:#183e69}
.tf-ld-table tbody tr:nth-child(even){background:rgba(72,143,217,.055)}
html[data-theme="dark"] .tf-ld-stat,
html[data-theme="dark"] .tf-ld-chart-wrap,
html[data-theme="dark"] .tf-ld-viz-radar{background:linear-gradient(160deg,#213b57,#182d46);border-color:#43627e}
html[data-theme="dark"] .tf-ld-chart-note{background:#1b314b;color:#bdd6f2;border-color:#405f7e}
html[data-theme="dark"] .tf-ld-table th{background:#264662;color:#eef6ff}
html[data-theme="dark"] .tf-ld-table tbody tr:nth-child(even){background:#243b56}
html[data-theme="dark"] .tf-ld-stat-score{color:#fff}
html[data-theme="dark"] .tf-ld-stat-name{color:#daecff}
html[data-theme="dark"] .tf-ld-stat:nth-child(5n+1){border-top-color:var(--tf-trace-t)}
html[data-theme="dark"] .tf-ld-stat:nth-child(5n+2){border-top-color:var(--tf-trace-r)}
html[data-theme="dark"] .tf-ld-stat:nth-child(5n+3){border-top-color:var(--tf-trace-a)}
html[data-theme="dark"] .tf-ld-stat:nth-child(5n+4){border-top-color:var(--tf-trace-c)}
html[data-theme="dark"] .tf-ld-stat:nth-child(5n+5){border-top-color:var(--tf-trace-e)}
html[data-theme="dark"] .tf-ld-radar-legend-item strong{color:#f1f8ff}
/* Student charts stay structurally and chromatically intact; apply surface polish only. */
html[data-theme="dark"] :is(.student-panel,.student-summary-card,.student-skill,.card,.panel){border-color:#3f5977;background:linear-gradient(155deg,#213854,#182b43);box-shadow:var(--tf-surface-shadow)}
html[data-theme="dark"] .student-chart .grid-line{stroke:#4a6380}
html[data-theme="dark"] .student-chart text{fill:#d6e6f8}
/* Maintain existing dimensions and accessibility features. */
@media(prefers-reduced-motion:reduce){:is(button,.tf-ld-view,.report-point){transition:none!important}}
