@font-face {
  font-family: "Shuyan Display";
  src: url("/assets/fonts/ZCOOLQingKeHuangYou-UI-subset.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shuyan Sans";
  src: url("/assets/fonts/NotoSansSC-UI-subset.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Shuyan Mono";
  src: url("/assets/fonts/JetBrainsMono-Data-subset.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #e8f3ff;
  --ink: #071c4b;
  --muted: #49627d;
  --line: #94bfff;
  --teal: #00a8d7;
  --teal-2: #00d8c0;
  --cobalt: #075bff;
  --cobalt-soft: #dce9ff;
  --amber: #b9ff19;
  --amber-soft: #ecffad;
  --mint: #d8fff8;
  --deep: #003590;
  --pink: #ff3d81;
  --danger: #d31f55;
  --shadow: 0 12px 28px rgba(0, 70, 190, .14);
  --radius: 18px;
  font-family: "Shuyan Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #061331;
  --surface: #0c214f;
  --surface-2: #14366f;
  --ink: #f7fbff;
  --muted: #b9ccef;
  --line: #3868bb;
  --teal: #22d8ff;
  --teal-2: #22f0c9;
  --cobalt: #4c89ff;
  --cobalt-soft: #173a7b;
  --amber: #c9ff36;
  --amber-soft: #405d13;
  --mint: #0b4d58;
  --deep: #031a4a;
  --pink: #ff68a4;
  --danger: #ff89ac;
  --shadow: 0 14px 32px rgba(0, 5, 22, .38);
}

* { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; background: var(--canvas); }
body { position: relative; min-width: 0; margin: 0; background: var(--canvas); color: var(--ink); font-family: inherit; line-height: 1.42; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: #fff url("/assets/shuyan28-main-grid-v1.png") center top / max(1320px, 100vw) auto no-repeat; opacity: .62; }
:root[data-theme="dark"] body::before { background-color: #061331; background-blend-mode: luminosity; filter: saturate(1.45) brightness(.62); opacity: .42; }
button, select, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: "Shuyan Display", "Shuyan Sans", sans-serif; font-weight: 400; line-height: 1.05; letter-spacing: .01em; }
.skip-link { position: fixed; left: 10px; top: -70px; z-index: 100; padding: 9px 13px; border-radius: 8px; color: #fff; background: #001d55; }
.skip-link:focus { top: 10px; }

.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 3px solid var(--amber); color: #fff; background: linear-gradient(105deg, #003da8 0 42%, #0769ff 72%, #00aee8); box-shadow: 0 6px 20px rgba(0, 48, 142, .22); }
.header-inner { width: min(1220px, calc(100% - 24px)); min-height: 64px; margin: auto; display: flex; align-items: center; gap: 16px; }
.brand { display: grid; flex: 0 0 auto; gap: 0; padding: 5px 9px 4px; border: 2px solid rgba(255,255,255,.78); border-radius: 14px; color: #092355; background: #fff; text-decoration: none; box-shadow: 0 5px 0 rgba(0, 27, 91, .17); }
.brand img { display: block; width: 145px; height: auto; }
.brand > span { margin-top: -7px; padding-left: 40px; color: #31547c; font-size: 8px; font-weight: 750; letter-spacing: .05em; }
.main-nav { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.nav-card { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 11px; color: #fff; background: rgba(0, 29, 102, .27); text-decoration: none; box-shadow: inset 0 1px rgba(255,255,255,.2); }
.nav-card strong { font-size: 12px; font-weight: 850; white-space: nowrap; }
.nav-icon { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-card:hover { transform: translateY(-1px); background: rgba(255,255,255,.18); }
.nav-card[aria-current="page"] { border-color: var(--amber); color: #092353; background: var(--amber); box-shadow: 0 4px 0 #75b400; }
.nav-scratch { border-color: #42f1ff; }
.nav-chat { border-color: #ff9bc2; }
.theme-toggle { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.72); border-radius: 11px; color: #fff; background: #001d63; cursor: pointer; }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

main { width: min(1220px, calc(100% - 24px)); margin: 14px auto 40px; }
.live-strip, .panel { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.live-strip { position: relative; overflow: hidden; border: 3px solid #075bff; border-radius: 22px; background: #fff; box-shadow: 0 11px 0 rgba(0, 55, 164, .1), 0 22px 38px rgba(0, 77, 204, .14); }
.live-strip::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 0 68%, rgba(185,255,25,.18)); }
.live-heading { position: relative; z-index: 1; display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px 6px 15px; color: #fff; background: linear-gradient(100deg, #002d86, #075bff 66%, #00aee8); }
.live-heading::after { content: ""; position: absolute; inset: 0 82px 0 auto; width: min(36vw, 390px); pointer-events: none; background: url("/assets/shuyan28-draw-overlay-v1.png") right center / auto 112px no-repeat; opacity: .72; }
.live-heading > * { position: relative; z-index: 1; }
.live-heading > div:first-child { display: flex; align-items: center; gap: 9px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(185,255,25,.2); }
.live-heading h1 { margin: 0; font-size: 18px; }
.live-actions { display: flex; align-items: center; gap: 7px; }
.status-pill { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; color: #fff; background: rgba(0,24,88,.25); font-size: 11px; font-weight: 800; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(185,255,25,.19); }
.status-pill[data-state="conflict"], .status-pill[data-state="unavailable"] { color: #fff; background: #b6154c; }
.live-actions button { min-height: 32px; padding: 5px 12px; border: 1px solid #7aadff; border-radius: 9px; color: #07245d; background: var(--amber); cursor: pointer; font-size: 11px; font-weight: 900; box-shadow: 0 3px 0 #76b900; }
.live-actions button:disabled { opacity: .55; cursor: wait; }
.live-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.85fr 1.15fr .9fr; min-height: 128px; align-items: stretch; }
.live-content > div { min-width: 0; padding: 14px 18px; }
.live-content > div + div { border-left: 1px solid #b5d1ff; }
.issue-block, .countdown-block { display: grid; align-content: center; gap: 3px; }
.issue-block { position: relative; overflow: hidden; background: #eaf3ff; }
.issue-block::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 104px; pointer-events: none; background: url("/assets/shuyan28-draw-overlay-v1.png") right center / auto 106px no-repeat; opacity: .66; -webkit-mask-image: linear-gradient(90deg, transparent, #000 58%); mask-image: linear-gradient(90deg, transparent, #000 58%); }
.issue-block > * { position: relative; z-index: 1; }
.issue-block small, .countdown-block small { color: #52709b; font-size: 10px; font-weight: 800; }
.issue-block strong, .countdown-block strong, .number-ball, .equation em, .mini-equation, .matrix-cell, .bar-row, .equality-grid, table { font-family: "Shuyan Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.issue-block strong { color: #075bff; font-size: clamp(21px, 2.5vw, 31px); letter-spacing: -.04em; }
.issue-block time, .countdown-block span { color: #57718f; font-size: 10px; font-weight: 650; }
.equation { display: flex; align-items: center; justify-content: center; gap: clamp(5px, .9vw, 11px); color: #fff; background: linear-gradient(125deg, #001e66, #064ed7); }
.equation i, .mini-equation i { color: currentColor; font-style: normal; font-weight: 800; opacity: .74; }
.number-ball { display: grid; width: clamp(40px, 4.8vw, 56px); aspect-ratio: 1; place-items: center; border: 3px solid rgba(255,255,255,.85); border-radius: 50%; color: #06215c; background: var(--amber); box-shadow: inset 0 -6px rgba(74,126,0,.18), 0 5px 0 rgba(0,15,70,.24); font-size: clamp(22px, 2.7vw, 31px); font-weight: 800; }
.number-ball.b { color: #042c62; background: #25e8ff; }
.number-ball.c { color: #fff; background: var(--pink); }
.equation em { min-width: 56px; color: var(--amber); font-size: clamp(31px, 3.8vw, 45px); font-style: normal; font-weight: 800; text-align: center; text-shadow: 0 3px rgba(0,0,0,.16); }
.classifications { display: flex; align-content: center; justify-content: center; flex-wrap: wrap; gap: 6px; background: #fff; }
.classifications span { padding: 4px 9px; border: 2px solid #075bff; border-radius: 8px; color: #073475; background: #e8f3ff; font-size: 11px; font-weight: 900; box-shadow: 0 2px 0 #b1ccff; }
.classifications span:nth-child(2n) { border-color: #00bfa7; color: #004e43; background: #d9fff7; }
.classifications span:last-child { border-color: #ff4e8a; color: #86143d; background: #ffe3ee; }
.countdown-block { color: #061a45; background: var(--amber); }
.countdown-block small, .countdown-block span { color: #284c0b; }
.countdown-block strong { color: #003c99; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.04em; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .72fr); gap: 12px; margin-top: 12px; align-items: stretch; }
.home-grid > *, .analysis-grid > * { min-width: 0; }
.panel { min-width: 0; border-radius: var(--radius); padding: 16px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-title-row h2, .analysis-grid h2 { margin: 0; font-size: clamp(19px, 2vw, 25px); }
.panel-title-row > span, .sample-badge { color: var(--muted); font-size: 10px; font-weight: 800; }
.sample-badge { padding: 4px 8px; border-radius: 7px; color: #06235d; background: var(--amber); }
.eyebrow { color: var(--cobalt); font-size: 9px; font-weight: 900; letter-spacing: .14em; }

.matrix-panel { position: relative; overflow: hidden; border: 2px solid #075bff; background: rgba(255,255,255,.96); box-shadow: inset 0 6px #075bff, var(--shadow); }
.matrix-panel::after { content: ""; position: absolute; width: 160px; height: 160px; right: -78px; top: -85px; border-radius: 50%; background: rgba(185,255,25,.55); pointer-events: none; }
.matrix-panel .panel-title-row, .matrix-controls, .matrix-axis, .matrix-scroll, .legend { position: relative; z-index: 1; }
.matrix-panel h2 { color: #003c9f; }
.matrix-controls { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 12px; padding: 7px; border: 1px solid #a8c8ff; border-radius: 12px; background: #edf5ff; }
.segmented { display: inline-flex; padding: 2px; border-radius: 9px; background: #cfe1ff; }
.live-actions button, .matrix-controls button, .matrix-controls select { border-radius: 8px; font: inherit; }
.matrix-controls .segmented button { min-width: 68px; min-height: 34px; border: 0; color: #31547d; background: transparent; cursor: pointer; font-size: 11px; font-weight: 850; }
.matrix-controls .segmented button[aria-pressed="true"] { color: #fff; background: #075bff; box-shadow: 0 3px 0 #003da8; }
.matrix-controls label { display: flex; align-items: center; gap: 6px; color: #4c6482; font-size: 10px; font-weight: 800; }
.matrix-controls select { min-height: 34px; padding: 5px 26px 5px 8px; border: 1px solid #76a8ff; color: #073475; background: #fff; cursor: pointer; font-size: 10px; font-weight: 800; }
.matrix-axis { display: inline-block; margin: 8px 0 4px; padding: 3px 8px; border-radius: 6px; color: #003da8; background: var(--amber); font-family: "Shuyan Mono", monospace; font-size: 10px; font-weight: 800; }
.matrix-scroll { width: 100%; min-width: 0; max-width: 100%; overflow: auto; padding: 2px 2px 7px; overscroll-behavior-inline: contain; }
.matrix-grid { display: grid; min-width: 485px; grid-template-columns: 31px repeat(10, minmax(38px, 1fr)); gap: 4px; }
.axis-corner, .axis-label { display: grid; min-height: 25px; place-items: center; color: #4b6485; font: 800 9px "Shuyan Mono", monospace; }
.axis-corner { color: #075bff; }
.matrix-cell { position: relative; min-height: 34px; border: 1px solid #8db6fa; border-radius: 6px; color: #093267; background: #f4f8ff; font-size: 11px; font-weight: 800; cursor: pointer; }
.matrix-cell.heat-1 { background: #d9f5ff; }
.matrix-cell.heat-2 { background: #9eeeff; }
.matrix-cell.heat-3 { background: #43d9ef; }
.matrix-cell.heat-4 { color: #fff; background: #167dff; }
.matrix-cell.heat-5 { color: #061a45; background: var(--amber); border-color: #78b300; }
.matrix-cell:hover, .matrix-cell:focus-visible { z-index: 2; outline: 3px solid #ff3d81; outline-offset: 1px; }
.matrix-cell[aria-pressed="true"] { color: #fff; border-color: #ff3d81; background: #ff3d81; box-shadow: inset 0 0 0 2px #fff; }
.legend { display: flex; align-items: center; gap: 4px; margin-top: 5px; color: #54708f; font-size: 9px; }
.legend i { width: 17px; height: 7px; border-radius: 2px; background: #d9f5ff; }
.legend i:nth-of-type(2) { background: #9eeeff; }
.legend i:nth-of-type(3) { background: #43d9ef; }
.legend i:nth-of-type(4) { background: #167dff; }
.legend i:nth-of-type(5) { background: var(--amber); }
.legend b { margin-left: auto; color: #073475; }

.recent-panel { display: flex; min-height: 100%; flex-direction: column; overflow: hidden; padding: 0; border: 2px solid #075bff; background: #fff; box-shadow: inset 0 -5px var(--amber), var(--shadow); }
.recent-panel .panel-title-row { min-height: 48px; padding: 10px 13px; color: #fff; background: linear-gradient(105deg, #003da8, #075bff 70%, #00aee8); }
.recent-panel .panel-title-row h2, .recent-panel .panel-title-row > span { color: #fff; }
.recent-panel .panel-title-row > span { padding: 3px 6px; border: 1px solid rgba(255,255,255,.4); border-radius: 6px; }
.recent-list { display: grid; gap: 0; list-style: none; margin: 4px 12px 0; padding: 0; }
.recent-list li { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; min-height: 50px; padding: 7px 2px; border-bottom: 1px solid #c9dcff; }
.recent-list li:nth-child(even) { margin-inline: -6px; padding-inline: 6px; background: #edf5ff; }
.recent-list li > * { min-width: 0; }
.recent-list li > div:first-child { display: grid; gap: 0; }
.recent-list strong { color: #074ccf; font: 800 12px "Shuyan Mono", monospace; }
.recent-list time { color: #54708f; font-size: 8px; }
.recent-list li > span { grid-column: 1 / -1; color: #49627d; font-size: 9px; font-weight: 700; }
.mini-equation { display: flex; align-items: center; gap: 3px; color: #49627d; }
.mini-equation b { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; color: #052b6d; background: var(--amber); font-size: 10px; box-shadow: inset 0 -2px rgba(78,119,0,.2); }
.mini-equation b:nth-of-type(2) { background: #41e4ff; }
.mini-equation b:nth-of-type(3) { color: #fff; background: #ff4c8b; }
.mini-equation em { color: #075bff; font-style: normal; font-weight: 850; }
.panel-link { display: flex; justify-content: space-between; margin: auto 12px 8px; padding-top: 6px; color: #075bff; text-decoration: none; font-size: 10px; font-weight: 850; }
.empty { padding: 20px !important; color: var(--muted); text-align: center; }

.details-panel { margin-top: 12px; border: 2px solid #00b9d8; border-top-width: 6px; scroll-margin-top: 80px; }
.table-scroll { max-width: 100%; overflow: auto; margin-top: 10px; border: 1px solid #9fc3ff; border-radius: 11px; }
table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 11px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #c9dcff; text-align: left; }
th { position: sticky; top: 0; z-index: 1; color: #fff; background: #075bff; font-size: 9px; letter-spacing: .03em; }
tbody tr:nth-child(even) { background: #f0f6ff; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; color: var(--muted); font-size: 8px; }
.table-equation { font-weight: 700; }

.analysis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.analysis-grid article { position: relative; overflow: hidden; padding-top: 19px; border-width: 2px; }
.analysis-grid article::before { content: ""; position: absolute; inset: 0 0 auto; height: 7px; background: #00d8c0; }
.analysis-grid article:nth-child(1) { border-color: #00cdb6; background: #f0fffb; }
.analysis-grid article:nth-child(2) { border-color: #075bff; background: #f1f6ff; }
.analysis-grid article:nth-child(2)::before { background: #075bff; }
.analysis-grid article:nth-child(3) { border-color: #8fc800; background: #fbffe8; }
.analysis-grid article:nth-child(3)::before { background: var(--amber); }
.analysis-grid h2 { margin-bottom: 10px; color: #073d9e; }
.bar-chart { display: grid; gap: 5px; }
.bar-chart.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 9px; }
.bar-row { display: grid; min-width: 0; grid-template-columns: 23px 1fr 24px; align-items: center; gap: 5px; color: #244a75; font-size: 9px; }
.bar-row i { position: relative; height: 7px; overflow: hidden; border-radius: 2px; background: #dbe9ff; }
.bar-row i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #00d8c0, #075bff); }
.bar-row i.bar-1::after { width: 10%; } .bar-row i.bar-2::after { width: 20%; } .bar-row i.bar-3::after { width: 30%; } .bar-row i.bar-4::after { width: 40%; } .bar-row i.bar-5::after { width: 50%; }
.bar-row i.bar-6::after { width: 60%; } .bar-row i.bar-7::after { width: 70%; } .bar-row i.bar-8::after { width: 80%; } .bar-row i.bar-9::after { width: 90%; } .bar-row i.bar-10::after { width: 100%; }
.bar-row b { text-align: right; }
.equality-grid { margin: 0; border: 1px solid #b8d2ff; border-radius: 9px; }
.equality-grid > div { display: contents; }
.equality-grid dt, .equality-grid dd { display: inline-block; width: 78%; margin: 0; padding: 7px 9px; border-bottom: 1px solid #cbdcff; }
.equality-grid dd { width: 22%; color: #075bff; text-align: right; font-weight: 850; }
.equality-grid .equality-total dt, .equality-grid .equality-total dd { border-bottom: 0; color: #06235d; background: var(--amber); }

footer { display: flex; width: min(1220px, calc(100% - 24px)); align-items: center; justify-content: space-between; gap: 14px; margin: 0 auto 14px; padding: 12px 14px; border: 2px solid #075bff; border-radius: 13px; color: #fff; background: #003a9d; font-size: 10px; }
footer > a { color: var(--amber); font-family: "Shuyan Display", sans-serif; font-size: 17px; text-decoration: none; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 12px; }
footer nav a { color: #fff; text-decoration: none; font-weight: 750; }
.not-found { max-width: 760px; margin: 70px auto; border: 3px solid #075bff; border-top: 9px solid var(--amber); background: #fff; }

:root[data-theme="dark"] .brand { color: #092355; background: #fff; }
:root[data-theme="dark"] .brand > span { color: #31547c; }
:root[data-theme="dark"] .live-strip { background: #081c48; }
:root[data-theme="dark"] .issue-block, :root[data-theme="dark"] .classifications { background: #102d67; }
:root[data-theme="dark"] .issue-block small, :root[data-theme="dark"] .issue-block time { color: #bdd2f7; }
:root[data-theme="dark"] .issue-block strong { color: #83e9ff; text-shadow: 0 1px 0 #001b55; }
:root[data-theme="dark"] .issue-block::after { opacity: .8; }
:root[data-theme="dark"] .classifications span { color: #f4f8ff; background: #173f83; }
:root[data-theme="dark"] .countdown-block { color: #071c4b; background: var(--amber); }
:root[data-theme="dark"] .countdown-block small, :root[data-theme="dark"] .countdown-block span { color: #284c0b; }
:root[data-theme="dark"] .matrix-panel, :root[data-theme="dark"] .recent-panel { background: rgba(8,28,70,.97); }
:root[data-theme="dark"] .matrix-panel h2, :root[data-theme="dark"] .recent-list strong, :root[data-theme="dark"] .panel-link, :root[data-theme="dark"] .analysis-grid h2 { color: #80aeff; }
:root[data-theme="dark"] .sample-badge { color: #061a45; }
:root[data-theme="dark"] .matrix-controls { border-color: #3868bb; background: #102e68; }
:root[data-theme="dark"] .segmented { background: #173b78; }
:root[data-theme="dark"] .matrix-controls .segmented button:not([aria-pressed="true"]) { color: #e0ebff; }
:root[data-theme="dark"] .matrix-controls label { color: #b9ccef; }
:root[data-theme="dark"] .matrix-controls select { color: #fff; background: #102b61; }
:root[data-theme="dark"] .axis-label { color: #d3e2ff; }
:root[data-theme="dark"] .axis-corner { color: #b9ff19; }
:root[data-theme="dark"] .matrix-cell { color: #eaf3ff; background: #163770; }
:root[data-theme="dark"] .matrix-cell.heat-1 { background: #125173; }
:root[data-theme="dark"] .matrix-cell.heat-2 { background: #087a8f; }
:root[data-theme="dark"] .matrix-cell.heat-3 { background: #00a6b8; }
:root[data-theme="dark"] .matrix-cell.heat-4 { background: #167dff; }
:root[data-theme="dark"] .matrix-cell.heat-5 { color: #061a45; background: var(--amber); }
:root[data-theme="dark"] .recent-list li:nth-child(even), :root[data-theme="dark"] tbody tr:nth-child(even) { background: #112f68; }
:root[data-theme="dark"] .recent-list li, :root[data-theme="dark"] th, :root[data-theme="dark"] td { border-color: #315fa9; }
:root[data-theme="dark"] .recent-list time, :root[data-theme="dark"] .recent-list li > span, :root[data-theme="dark"] .mini-equation { color: #cfdef8; }
:root[data-theme="dark"] .mini-equation em { color: #80aeff; }
:root[data-theme="dark"] .details-panel { background: #0b214f; }
:root[data-theme="dark"] .analysis-grid article:nth-child(1), :root[data-theme="dark"] .analysis-grid article:nth-child(2), :root[data-theme="dark"] .analysis-grid article:nth-child(3) { background: #0b214f; }
:root[data-theme="dark"] .bar-row { color: #c2d4f4; }
:root[data-theme="dark"] .equality-grid .equality-total dt, :root[data-theme="dark"] .equality-grid .equality-total dd { color: #061a45; }
:root[data-theme="dark"] footer { background: #061b4a; }

@media (max-width: 900px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; padding: 6px 0; }
  .brand { grid-column: 1; grid-row: 1; width: max-content; }
  .theme-toggle { grid-column: 2; grid-row: 1; justify-self: end; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .nav-card { justify-content: center; }
  .live-content { grid-template-columns: 1fr 1.5fr; grid-template-areas: "issue equation" "classifications countdown"; }
  .issue-block { grid-area: issue; }
  .equation { grid-area: equation; }
  .classifications { grid-area: classifications; }
  .countdown-block { grid-area: countdown; }
  .live-content > div { border: 0 !important; }
  .equation, .countdown-block { border-left: 1px solid #b5d1ff !important; }
  .classifications, .countdown-block { border-top: 1px solid #b5d1ff !important; }
  .home-grid { grid-template-columns: 1fr; }
  .recent-panel { order: -1; }
}

@media (max-width: 620px) {
  body::before { background-size: auto 820px; background-position: right top; opacity: .5; }
  .header-inner { width: calc(100% - 12px); }
  .brand { padding: 3px 6px 2px; border-radius: 10px; }
  .brand img { width: 113px; }
  .brand > span { display: none; }
  .theme-toggle { width: 36px; height: 36px; flex-basis: 36px; border-radius: 9px; }
  .main-nav { gap: 4px; }
  .nav-card { min-height: 36px; gap: 5px; padding: 5px 4px; border-radius: 8px; }
  .nav-card strong { font-size: 10px; }
  .nav-icon { flex-basis: 17px; width: 17px; height: 17px; }
  main { width: calc(100% - 12px); margin: 7px auto 26px; }
  .live-strip { border-width: 2px; border-radius: 14px; box-shadow: 0 7px 0 rgba(0,55,164,.1); }
  .live-heading { min-height: 40px; padding: 5px 7px 5px 9px; }
  .live-heading::after { right: 74px; width: 128px; background-size: auto 88px; opacity: .54; }
  .live-heading h1 { font-size: 15px; }
  .live-dot { width: 7px; height: 7px; }
  .live-actions { gap: 4px; }
  .status-pill { min-height: 25px; padding: 3px 6px; font-size: 9px; }
  .live-actions button { min-height: 29px; padding: 4px 9px; }
  .live-content { grid-template-columns: 1fr 1fr; grid-template-areas: "issue countdown" "equation equation" "classifications classifications"; min-height: 0; }
  .live-content > div { padding: 7px 10px; }
  .issue-block, .countdown-block { min-height: 58px; }
  .issue-block::after { width: 72px; background-size: auto 76px; }
  .countdown-block { border-left: 1px solid #b5d1ff !important; border-top: 0 !important; }
  .equation { min-height: 66px; border-top: 1px solid #b5d1ff !important; border-left: 0 !important; }
  .classifications { min-height: 34px; padding-block: 5px !important; border-top: 1px solid #b5d1ff !important; }
  .issue-block strong, .countdown-block strong { font-size: 21px; }
  .number-ball { width: 39px; border-width: 2px; font-size: 21px; }
  .equation em { min-width: 45px; font-size: 31px; }
  .classifications span { padding: 3px 7px; font-size: 9px; }
  .home-grid { gap: 8px; margin-top: 8px; }
  .panel { padding: 12px; border-radius: 13px; }
  .recent-panel { padding: 0; }
  .recent-panel .panel-title-row { min-height: 41px; padding: 7px 10px; }
  .recent-panel .panel-title-row h2 { font-size: 18px; }
  .recent-list { margin: 2px 9px 0; }
  .recent-list li { min-height: 44px; padding: 5px 1px; }
  .recent-list li:nth-child(n+4) { display: none; }
  .recent-list li > span { display: none; }
  .panel-link { margin: 3px 9px 6px; }
  .matrix-controls { align-items: stretch; flex-direction: column; }
  .segmented { display: grid; grid-template-columns: repeat(3, 1fr); }
  .matrix-controls .segmented button { min-width: 0; }
  .matrix-controls label { justify-content: space-between; }
  .matrix-controls select { min-width: 112px; }
  .details-panel { margin-top: 8px; }
  .analysis-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .analysis-grid article { padding-top: 17px; }
  footer { width: calc(100% - 12px); align-items: flex-start; flex-direction: column; margin-bottom: 8px; }
}

@media (max-width: 350px) {
  .nav-card strong { font-size: 9px; }
  .live-heading h1 { font-size: 14px; }
  .status-pill { max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-content > div { padding-inline: 7px; }
  .equation { gap: 4px; }
  .number-ball { width: 35px; font-size: 19px; }
  .equation em { min-width: 40px; font-size: 28px; }
}
