/* Anthropic Pre-IPO model. Loads after /app/styles.css and re-maps its tokens per theme.
   Theme is set on <html data-theme> by /app/theme.js before first paint.
   Colours for charts and inline styles: use the --c-* series tokens and the semantic tokens below,
   never raw hex, so both themes work. */

/* Tokens live in /app/styles.css. App-only aliases: */
:root,
:root[data-theme] {
  /* Legacy aliases kept for page stylesheets. */
  --ant-clay: var(--accent);
  --ant-clay-soft: var(--accent-soft);
  --ant-clay-line: var(--accent-soft);
  --ant-risk: var(--risk);
  --ant-risk-soft: var(--risk-soft);
  --ant-ok: var(--ok);
  --ant-ok-soft: var(--ok-soft);
  --ant-chart-grid: var(--line);
}


html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-feature-settings: "cv11", "ss01"; }
::selection { color: var(--text); background: var(--accent-soft); }
a { color: inherit; }

.ant-shell {
  width: min(100%, var(--dtmw-shell-max));
  margin: 0 auto;
  padding: 0 var(--dtmw-shell-gutter) 80px;
}

/* ---- Header -------------------------------------------------------------- */
.ant-topbar { margin: 0 0 36px; border-bottom: 1px solid var(--line); }
.ant-bar { display: flex; align-items: center; gap: 22px; min-height: 60px; }
.ant-brand-row { display: contents; }
.ant-home { display: inline-flex; align-items: center; flex: none; }
.ant-bar .dtmw-logo-lockup { height: 26px; width: auto; display: block; }
.ant-heading { display: inline-flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--line); text-decoration: none; flex: none; }
.ant-name { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; color: var(--text); }
.ant-heading:hover .ant-name { color: var(--accent); }
.ant-sections { display: flex; align-items: stretch; align-self: stretch; gap: 22px; margin-left: 6px; }
.ant-section-link {
  display: inline-flex; align-items: center; font-size: 0.9rem; font-weight: 500; color: var(--muted);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ant-section-link:hover { color: var(--text); }
.ant-section-link.active { color: var(--text); border-bottom-color: var(--text); }
.ant-bar-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ant-icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.ant-icon-btn:hover { color: var(--text); background: var(--surface-2); }
.ant-icon-btn svg { width: 17px; height: 17px; }

.ant-nav {
  display: flex; gap: 24px; min-height: 44px; align-items: stretch;
  overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line);
}
.ant-nav::-webkit-scrollbar { display: none; }
.ant-nav-link {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: 0.86rem; font-weight: 500; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ant-nav-link svg { width: 15px; height: 15px; opacity: 0.8; }
.ant-nav-link:hover { color: var(--text); }
.ant-nav-link.active { color: var(--text); border-bottom-color: var(--accent); }
.ant-nav-group, .ant-nav-group-label { display: none; }

:where(.ant-nav-link, .ant-section-link, .ant-icon-btn, .ant-btn, .ant-seg button, .ant-chip, .ant-qcard, .ant-path, a):focus-visible,
.ant-toggle input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

/* ---- Page head ----------------------------------------------------------- */
.ant-head { margin: 0 0 36px; max-width: 860px; }
.ant-kicker { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.84rem; font-weight: 500; color: var(--muted); }
.ant-status { color: var(--muted); font-weight: 400; }
.ant-status::before { content: "·"; margin-right: 8px; }
.ant-head h1 {
  margin: 10px 0 12px; font-size: clamp(1.75rem, 2.8vw, 2.4rem); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 600; color: var(--text);
}
.ant-lede { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--text-2); max-width: 74ch; }
.ant-lede strong { color: var(--text); font-weight: 600; }

/* ---- Layout -------------------------------------------------------------- */
.ant-grid { display: grid; gap: var(--ant-gap); grid-template-columns: minmax(0, 1fr); }
.ant-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ant-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Side layout. With an <aside>, it becomes content left + control rail right (the aside stays
   first in the DOM so phones show controls first). Without one, the first child is a left column. */
.ant-grid-side { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; column-gap: 40px; }
.ant-grid-side:has(> aside) { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); row-gap: 0; }
.ant-grid-side:has(> aside) > aside { grid-column: 2; grid-row: 1 / span 40; }
.ant-grid-side:has(> aside) > :not(aside) { grid-column: 1; }
/* The rail spans many implicit rows, so space the content with margins rather than row gaps. */
.ant-grid-side:has(> aside) > :not(aside) ~ :not(aside) { margin-top: var(--ant-gap); }
.ant-section { margin-top: 48px; }
.ant-section > h2 { margin: 0 0 4px; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.015em; }
.ant-section > .ant-section-sub { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; line-height: 1.55; max-width: 80ch; }

.ant-panel { border-top: 1px solid var(--line); padding: 18px 0 0; min-width: 0; background: transparent; }
.ant-panel-title { margin: 0 0 3px; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.ant-panel-sub { margin: 0 0 16px; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.ant-sticky { position: sticky; top: 20px; }
.ant-grid-side > aside.ant-panel {
  border-top: 0; border-left: 1px solid var(--line); padding: 2px 0 8px 26px;
  max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin;
}

/* ---- Stats --------------------------------------------------------------- */
.ant-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 28px; }
.ant-stat { border-top: 1px solid var(--line); padding: 12px 0 4px; min-width: 0; }
.ant-stat-label { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.ant-stat-value { margin-top: 6px; font-size: 1.55rem; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.ant-stat-sub { margin-top: 3px; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.ant-stat.is-risk .ant-stat-value { color: var(--risk); }
.ant-stat.is-ok .ant-stat-value { color: var(--ok); }
.ant-stat.is-clay .ant-stat-value { color: var(--accent); }

/* ---- Answer -------------------------------------------------------------- */
.ant-answer {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 22px; align-items: center;
  padding: 0 0 22px; border-bottom: 1px solid var(--line);
}
.ant-answer-value { font-size: 3rem; font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; grid-row: span 2; }
.ant-answer-label { font-weight: 600; font-size: 1rem; }
.ant-answer-sub { color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }
.ant-answer-sub a { color: var(--accent); font-weight: 500; }
.ant-answer.is-risk .ant-answer-value { color: var(--risk); }
.ant-answer.is-ok .ant-answer-value { color: var(--ok); }

/* ---- Question cards (overview) ------------------------------------------ */
.ant-qcard {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  border-top: 1px solid var(--line); padding: 16px 0 6px;
}
.ant-qcard-q { font-size: 0.84rem; font-weight: 500; color: var(--muted); }
.ant-qcard-a { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.ant-qcard-body { font-size: 0.9rem; line-height: 1.55; color: var(--text-2); }
.ant-qcard-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.ant-qcard-go svg { width: 15px; height: 15px; transition: transform 140ms ease; }
.ant-qcard:hover .ant-qcard-go { color: var(--accent); }
.ant-qcard:hover .ant-qcard-go svg { transform: translateX(2px); }

.ant-studies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.ant-study {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 16px; gap: 16px; align-items: baseline;
  padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text-2);
}
.ant-study-name { font-weight: 600; color: var(--text); font-size: 0.92rem; }
.ant-study-q { font-size: 0.9rem; line-height: 1.5; }
.ant-study svg { width: 15px; height: 15px; color: var(--soft); align-self: center; transition: transform 140ms ease; }
.ant-study:hover .ant-study-name { color: var(--accent); }
.ant-study:hover svg { color: var(--accent); transform: translateX(2px); }
@media (max-width: 860px) {
  .ant-studies { grid-template-columns: minmax(0, 1fr); }
  .ant-study { grid-template-columns: minmax(0, 1fr) 16px; gap: 2px 12px; }
  .ant-study-name { grid-column: 1; }
  .ant-study-q { grid-column: 1; }
  .ant-study svg { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---- Controls ------------------------------------------------------------ */
/* Segmented choices render as underlined text options. */
.ant-seg { display: flex; flex-wrap: wrap; gap: 2px 16px; border: 0; background: transparent; }
.ant-seg button {
  border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 6px 0 5px;
  font: inherit; font-size: 0.86rem; font-weight: 500; line-height: 1.25; color: var(--muted); cursor: pointer; text-align: left;
}
.ant-seg button + button { border-left: 0; }
.ant-seg button:hover { color: var(--text); background: transparent; }
.ant-seg button[aria-pressed="true"] { color: var(--text); background: transparent; border-bottom-color: var(--accent); }
.ant-seg-wrap { display: flex; }
.ant-seg-wrap button { font-size: 0.86rem; padding: 6px 0 5px; }
.ant-preset-blurb { margin: 10px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-2); min-height: 2.9em; }

.ant-field { margin-top: 18px; }
.ant-field-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ant-field label { font-size: 0.86rem; font-weight: 500; color: var(--text); }
.ant-field output { font-size: 0.88rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.ant-field-hint { margin: 4px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.ant-field-hint a { color: var(--accent); font-weight: 500; }
.ant-field input[type="number"] {
  width: 100%; margin-top: 6px; padding: 8px 10px; font: inherit; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; font-variant-numeric: tabular-nums;
}
.ant-field input[type="number"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Thin slider: 2px track, filled to --fill (set by lever-controls). */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 6px 0 0;
  background: transparent; cursor: pointer; --fill: 0%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--text-2) var(--fill), var(--line-strong) var(--fill));
}
input[type="range"]::-moz-range-track { height: 2px; border-radius: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 2px; border-radius: 2px; background: var(--text-2); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -6px;
  border-radius: 50%; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-strong);
}
input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-strong);
}
input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--text-2); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }

.ant-divider { height: 1px; background: var(--line); margin: 20px 0 4px; border: 0; }
.ant-group-title { margin: 26px 0 4px; font-size: 0.8rem; font-weight: 600; color: var(--text); letter-spacing: 0; text-transform: none; }
aside > .ant-group-title:first-child, .ant-panel > .ant-group-title:first-child { margin-top: 0; }

.ant-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.ant-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ant-toggle-box {
  flex: none; width: 15px; height: 15px; margin-top: 2px; border-radius: 4px;
  border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center;
}
.ant-toggle input:checked + .ant-toggle-box { background: var(--text); border-color: var(--text); }
.ant-toggle input:checked + .ant-toggle-box::after {
  content: ""; width: 4px; height: 8px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg);
}
.ant-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ant-toggle-name { font-size: 0.86rem; font-weight: 500; }
.ant-toggle-meta { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.ant-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 500;
  vertical-align: 1px; background: var(--surface-2); color: var(--text-2);
}
.ant-tag.is-clay { background: var(--accent-soft); color: var(--accent); }

.ant-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  font: inherit; font-size: 0.82rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.ant-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.ant-btn svg { width: 14px; height: 14px; }

/* ---- Charts -------------------------------------------------------------- */
.ant-chart { width: 100%; min-height: 260px; position: relative; }
.ant-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ant-chart text { font-family: inherit; font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.ant-chart .grid line { stroke: var(--line); stroke-dasharray: 1 3; }
.ant-chart .grid path, .ant-chart .axis path { display: none; }
.ant-chart .axis line { stroke: var(--line-strong); }
.ant-chart .val-label { font-size: 11px; font-weight: 600; fill: var(--text-2); }
.ant-chart .end-label { font-size: 12px; font-weight: 500; }
.ant-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 0.8rem; color: var(--text-2); }
.ant-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ant-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ant-legend i.line { width: 14px; height: 2px; border-radius: 2px; }
.ant-tooltip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0;
  padding: 9px 11px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-text);
  border: 1px solid var(--line-strong);
  font-size: 0.8rem; line-height: 1.5; box-shadow: var(--dtmw-shadow-md); max-width: 270px;
  font-variant-numeric: tabular-nums; transition: opacity 90ms ease;
}
.ant-tooltip.visible { opacity: 1; }
.ant-tooltip strong { display: block; margin-bottom: 2px; font-weight: 600; }

/* ---- Tables -------------------------------------------------------------- */
.ant-table-wrap { overflow-x: auto; border: 0; background: transparent; }
.ant-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ant-table th, .ant-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ant-table th:first-child, .ant-table td:first-child { padding-left: 0; }
.ant-table th:last-child, .ant-table td:last-child { padding-right: 0; }
.ant-table th {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted);
  background: transparent; white-space: nowrap; border-bottom-color: var(--line-strong);
}
.ant-table tbody tr:last-child td { border-bottom: 0; }
.ant-table tbody tr:hover td { background: var(--surface); }
.ant-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ant-table .muted { color: var(--muted); }
.ant-table .neg { color: var(--risk); font-weight: 500; }
.ant-table .pos { color: var(--ok); font-weight: 500; }
.ant-table tr.is-off td { color: var(--soft); text-decoration: line-through; text-decoration-color: var(--soft); }
.ant-table tfoot td { font-weight: 600; background: transparent; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.ant-table .is-hit { background: var(--ok-soft); color: var(--ok); }

/* ---- Lists, flags, notes ------------------------------------------------- */
.ant-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ant-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.55; color: var(--text-2); }
.ant-list li svg { flex: none; width: 15px; height: 15px; margin-top: 3px; color: var(--muted); }

.ant-chips { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.ant-chip {
  padding: 8px 0 7px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent;
  font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer; color: var(--muted);
}
.ant-chip:hover { color: var(--text); }
.ant-chip[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--accent); background: transparent; }
.ant-chip .count { margin-left: 5px; font-variant-numeric: tabular-nums; color: var(--soft); }

.ant-flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 32px; }
.ant-flag { border-top: 1px solid var(--line); padding: 16px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.ant-flag-cat { font-size: 0.78rem; font-weight: 500; color: var(--accent); }
.ant-flag h3 { margin: 0; font-size: 0.98rem; line-height: 1.35; font-weight: 600; }
.ant-flag p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-2); }
.ant-flag-src { margin-top: auto; font-size: 0.76rem; color: var(--muted); }

.ant-note { margin-top: 14px; font-size: 0.8rem; line-height: 1.55; color: var(--muted); max-width: 90ch; }
.ant-note a { color: var(--accent); font-weight: 500; }

.ant-footer { margin-top: 64px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.8rem; line-height: 1.6; color: var(--muted); max-width: 110ch; }
.ant-footer a { color: var(--text-2); font-weight: 500; }
.ant-footer a:hover { color: var(--accent); }

/* ---- Horizontal bars ----------------------------------------------------- */
.ant-split { display: grid; gap: 12px; }
.ant-split-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 16px; align-items: center; }
.ant-split-label { font-size: 0.86rem; font-weight: 500; color: var(--text-2); }
.ant-split-bar { display: flex; height: 28px; border-radius: 4px; overflow: hidden; border: 0; background: var(--surface); }
.ant-split-seg {
  display: flex; align-items: center; padding: 0 10px; min-width: 0;
  font-size: 0.78rem; font-weight: 600; color: var(--on-fill); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.ant-split-seg.light { color: var(--text); }

.ant-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 0 20px; }
.ant-person { border-top: 1px solid var(--line); padding: 12px 0; }
.ant-person-name { font-weight: 600; font-size: 0.92rem; }
.ant-person-role { font-size: 0.8rem; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ant-person-seat { margin-top: 8px; }

/* ---- Scenario Lab / Solver ---------------------------------------------- */
.ant-scn-actions { display: inline-flex; gap: 6px; }
.ant-table-compact th, .ant-table-compact td { padding: 7px 10px; font-size: 0.8rem; }
.ant-path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ant-path {
  text-align: left; font: inherit; color: var(--text); cursor: pointer; background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.ant-path:hover { border-color: var(--line-strong); background: var(--surface); }
.ant-path[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ant-path-num { font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.ant-path-title { font-weight: 600; font-size: 0.98rem; }
.ant-path-blurb { font-size: 0.82rem; line-height: 1.45; color: var(--text-2); }
.ant-path-value { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ant-pill { align-self: flex-start; padding: 2px 8px; border-radius: 999px; font-size: 0.76rem; font-weight: 500; }
.ant-pill.ok { background: var(--ok-soft); color: var(--ok); }
.ant-pill.bad { background: var(--risk-soft); color: var(--risk); }

details.ant-more { border-top: 1px solid var(--line); margin-top: 22px; }
details.ant-more > summary { padding: 12px 0; font-size: 0.86rem; font-weight: 500; color: var(--text-2); cursor: pointer; list-style: none; }
details.ant-more > summary::-webkit-details-marker { display: none; }
details.ant-more > summary::after { content: "+"; float: right; color: var(--muted); }
details.ant-more[open] > summary::after { content: "–"; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .ant-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .ant-grid-side { grid-template-columns: minmax(0, 1fr); }
  .ant-grid-side:has(> aside) { grid-template-columns: minmax(0, 1fr); }
  .ant-grid-side:has(> aside) > aside, .ant-grid-side:has(> aside) > :not(aside) { grid-column: 1; grid-row: auto; }
  .ant-grid-side > aside { margin-bottom: var(--ant-gap); }
  .ant-grid-side > aside.ant-panel { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0 0; max-height: none; overflow: visible; }
  .ant-sticky { position: static; }
}
@media (max-width: 860px) {
  .ant-sections { display: none; }
  .ant-nav { gap: 20px; }
}
@media (max-width: 760px) {
  :root, :root[data-theme] { --dtmw-shell-gutter: 16px; --ant-gap: 22px; }
  .ant-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ant-bar { gap: 14px; min-height: 54px; }
  .ant-heading { padding-left: 14px; }
  .ant-bar .dtmw-logo-lockup { height: 22px; }
  .ant-answer { grid-template-columns: minmax(0, 1fr); }
  .ant-answer-value { grid-row: auto; font-size: 2.4rem; }
  .ant-split-row { grid-template-columns: 1fr; gap: 6px; }
  .ant-stat-value { font-size: 1.35rem; }
  .ant-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
}
@media (max-width: 420px) {
  .ant-name { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ant-qcard-go svg, .ant-tooltip { transition: none; }
}
