/* Vuruseo 5.3 — Ink & brass operations workspace.
   Components remain semantic; provider data, scores and states come from the API. */
:root {
  color-scheme: dark;
  --bg: #111820;
  --bg2: #151f29;
  --panel: #19232e;
  --panel2: #202e3c;
  --line: #2a3948;
  --line2: #405164;
  --text: #edf1f5;
  --muted: #a9b7c6;
  --accent: #eeb862;
  --accent2: #f4ca86;
  --gold: #eeb862;
  --ok: #82d5b4;
  --warn: #f3c77c;
  --bad: #ff9d9f;
  --info: #94c9ef;
  --radius: 12px;
  --mono: 'IBM Plex Mono', 'Cascadia Code', Consolas, monospace;
  --font-ui: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-display: 'Manrope', 'Segoe UI', sans-serif;
  --lift: 0 12px 32px #00000024;
  --glow: 0 0 0 1px #eeb86230;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-padding-top: 24px; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 14px/1.6 var(--font-ui); background: var(--bg); }
::selection { background: #eeb86244; color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #405164; border-radius: 8px; border: 2px solid var(--bg); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 20px; z-index: 200; color: #111820; background: var(--accent); font-weight: 700; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }

/* Frame: a quiet rail and a generous working canvas. */
#app { display: flex; min-height: 100vh; }
#sidebar { width: 254px; flex: 0 0 254px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #0d141c; border-right: 1px solid var(--line); transition: width .2s, flex-basis .2s; }
#main { flex: 1; min-width: 0; padding: 0 34px 64px; }
#view, .workspace-bar { max-width: 1320px; margin-right: auto; margin-left: auto; }
#view { padding-top: 27px; animation: workspace-enter .24s ease-out; }
@keyframes workspace-enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; border-bottom: 1px solid var(--line); }
.workspace-signature { display: flex; align-items: center; gap: 12px; color: #d3dce5; font: 10px/1.4 var(--mono); letter-spacing: .12em; }
.workspace-signature b { display: block; color: #8b9eb1; font-weight: 400; letter-spacing: .16em; margin-top: 2px; }
.workspace-symbol { color: var(--accent); width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #615039; border-radius: 8px; font-size: 18px; }
.workspace-links { display: flex; gap: 20px; align-items: center; }
#app .workspace-links a { display: inline-flex; align-items: center; gap: 7px; color: #b6c5d3; font-size: 12px; }
#app .workspace-links a:hover { color: var(--accent2); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 86px; padding: 20px 18px; }
.brand-mark { width: 37px; height: 40px; flex: 0 0 37px; display: grid; place-items: center; border: 1px solid #7c633d; border-radius: 10px 3px 10px 3px; color: var(--accent); background: #2c281f; font: 800 22px var(--font-display); }
.brand-text { font: 800 20px/1.1 var(--font-display); letter-spacing: -.05em; white-space: nowrap; }
.brand-text em { display: block; color: #9badbf; margin-top: 7px; font: 400 9px var(--mono); letter-spacing: .25em; }
#app #side-toggle { margin-left: auto; padding: 0; width: 27px; height: 30px; min-height: 30px; color: #95a9bc; background: transparent; border: 1px solid var(--line); border-radius: 7px; box-shadow: none; }
#app #side-toggle:hover { border-color: var(--accent); color: var(--accent); transform: none; }
.ic-toggle { transition: transform .2s; }
.nav-intro { display: flex; align-items: center; gap: 8px; padding: 3px 20px 12px; color: #9aabbd; font-size: 11px; border-bottom: 1px solid #202d39; }
.nav-intro-line { width: 15px; height: 2px; background: #7a8da0; }
#nav { padding: 12px 10px 18px; display: flex; flex-direction: column; gap: 3px; }
.nav-group-label { margin: 15px 10px 5px; color: #8c9eaf; font: 9px/1.5 var(--mono); letter-spacing: .08em; }
.nav-group-label:first-child { margin-top: 3px; }
#app #nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 7px; color: #aebdcc; font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
#app #nav a:hover { color: #fff; background: #1a2631; border-color: #2d3c4b; }
#app #nav a.active { background: #2c281f; color: #f7d49d; border-color: #584a34; }
#nav a.active::before { content: ''; position: absolute; left: -11px; top: 10px; bottom: 10px; width: 3px; background: var(--accent); border-radius: 0 3px 3px 0; }
.ic, svg.lucide { width: 17px; height: 17px; stroke-width: 1.7; flex: 0 0 auto; }
.ic-sm, .btn svg.lucide, .badge svg.lucide, .chip svg.lucide { width: 14px; height: 14px; }
.side-footer { margin-top: auto; padding: 20px; border-top: 1px solid #253340; }
.side-domain { color: #dae2ea; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.side-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 9px; color: #8d9fb1; font-size: 10px; }
.side-note .ver { color: #f4ca86; font: 10px var(--mono); padding: 3px 6px; border: 1px solid #504433; border-radius: 4px; }
body.side-collapsed #sidebar { width: 76px; flex-basis: 76px; }
body.side-collapsed .brand-text, body.side-collapsed .nav-label, body.side-collapsed .nav-intro, body.side-collapsed .nav-group-label, body.side-collapsed .side-footer { display: none; }
body.side-collapsed .brand { padding: 18px 8px; flex-wrap: wrap; justify-content: center; }
body.side-collapsed #side-toggle { margin: 0; }
body.side-collapsed #side-toggle .ic-toggle { transform: rotate(180deg); }
body.side-collapsed #nav a { justify-content: center; gap: 0; min-height: 43px; padding: 9px; }

/* Typographic hierarchy and panels. */
h1 { font: 800 clamp(23px, 2.3vw, 32px)/1.22 var(--font-display); margin: 0 0 8px; letter-spacing: -.045em; color: #f6f8fa; }
h2 { font: 700 17px/1.4 var(--font-display); margin: 0 0 12px; letter-spacing: -.02em; }
h3 { font: 700 14px/1.5 var(--font-display); }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
.sub, .page-desc { color: var(--muted); font-size: 13px; margin: 0; max-width: 800px; }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; flex-wrap: wrap; }
.view-head > div:first-child { flex: 1; min-width: min(100%, 240px); }
.card, .stat, .shot, .verdict { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card { padding: 23px; margin-bottom: 18px; min-width: 0; box-shadow: 0 2px 1px #00000008; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-title { display: flex; align-items: center; gap: 8px; font: 700 15px/1.5 var(--font-display); letter-spacing: -.015em; }
.card-head .card-title svg { color: var(--accent); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.stat { position: relative; padding: 21px; overflow: hidden; }
.stat::after { content: ''; position: absolute; top: 21px; right: 18px; width: 5px; height: 5px; border-radius: 1px; background: currentColor; opacity: .35; }
.stat .k { color: #b4c2cf; font: 500 10px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; max-width: calc(100% - 12px); }
.stat .v { font: 700 30px/1.25 var(--font-display); margin-top: 13px; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--muted); font-size: 11px; margin-top: 7px; }
.stat.ok .v { color: var(--ok); } .stat.warn .v { color: var(--warn); } .stat.bad .v { color: var(--bad); } .stat.info .v { color: var(--info); } .stat.gold .v { color: var(--gold); }

/* Data tables have their own scroll boundary, never the whole viewport. */
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 9px; scrollbar-width: thin; }
#app table { width: 100%; border-collapse: collapse; font-size: 12px; }
#app th { text-align: left; color: #b2c3d2; background: #15212c; font: 500 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 13px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
#app td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
#app tr:last-child td { border-bottom: none; }
#app tbody tr { transition: background .12s; }
#app tbody tr:hover { background: #253342; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono, td .mono { font: 12px/1.6 var(--mono); }
tr.clickable { cursor: pointer; }

/* Controls: one primary action, subdued secondary and explicit destructive state. */
#app label { display: block; color: #c2ced9; font-size: 12px; font-weight: 500; margin-bottom: 7px; }
#app input, #app select, #app textarea { width: 100%; min-height: 43px; background: #111c26; border: 1px solid #405164; color: var(--text); border-radius: 7px; padding: 10px 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
#app input::placeholder, #app textarea::placeholder { color: #8497a9; opacity: 1; }
#app input:focus, #app select:focus, #app textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #eeb86220; }
#app textarea { min-height: 100px; resize: vertical; }
#app input[type=checkbox], #app input[type=radio] { width: 17px; min-height: 17px; height: 17px; accent-color: var(--accent); vertical-align: middle; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: min(100%, 160px); }
.form-row > .shrink { flex: 0 0 auto; min-width: 0; }
#app button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; color: #201a10; background: var(--accent); border: 1px solid transparent; border-radius: 7px; padding: 10px 16px; font: 600 12px/1.4 var(--font-ui); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; box-shadow: 0 2px 0 #00000018; text-decoration: none; }
#app button:hover, .btn:hover { background: #f6cc8a; transform: translateY(-1px); text-decoration: none; }
#app button:active, .btn:active { transform: translateY(0); }
#app button:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
#app .btn-ghost, #app .btn-soft, .btn-ghost, .btn-soft { background: #263646; border-color: #405164; color: #e3eaf0; box-shadow: none; }
#app .btn-ghost:hover, #app .btn-soft:hover { color: #fff; border-color: #7c8fa3; background: #304457; }
#app .btn-danger, .btn-danger { color: #ffe6e6; border-color: #96585c; background: #663d44; }
#app .btn-danger:hover { background: #834b53; }
#app .btn-sm, .btn-sm { min-height: 35px; padding: 7px 12px; font-size: 12px; }
#app .btn-xs, .btn-xs { min-height: 30px; padding: 5px 10px; font-size: 11px; }
#app a.btn { color: #201a10; }
#app a.btn-soft, #app a.btn-ghost { color: #e3eaf0; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
#app .link-btn, .link-btn { display: inline; min-height: auto; color: var(--accent2); background: transparent; border: none; padding: 0; font: inherit; box-shadow: none; }
#app .link-btn:hover { text-decoration: underline; transform: none; background: transparent; }

/* Evidence states are textual, not dependent on a color or animation. */
.badge, .chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line2); background: #263342; color: #c6d2de; border-radius: 5px; font-weight: 500; }
.badge { padding: 3px 8px; font: 10px/1.5 var(--mono); white-space: nowrap; }
.badge.ok { background: #173d36; color: #9be4c7; border-color: #386d5d; }
.badge.warn { background: #40331f; color: #f3ce8b; border-color: #7a6036; }
.badge.bad { background: #432831; color: #ffb6ba; border-color: #81515e; }
.badge.info { background: #20384c; color: #afd8f5; border-color: #456782; }
.badge.gold { background: #40331f; color: #f3ce8b; border-color: #7a6036; }
.badge.dim { background: #28323d; color: #afbdc9; }
.chip { padding: 5px 10px; font-size: 12px; margin: 0 6px 6px 0; }
.chip .x { cursor: pointer; color: var(--muted); font-weight: 700; }
.chip .x:hover { color: var(--bad); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.off { background: #7d8c9b; }
.err-box, .warn-box, .ok-box { padding: 14px 16px; margin-bottom: 16px; border: 1px solid; border-left-width: 3px; border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.err-box { background: #35232c; border-color: #88515e; color: #ffc5c7; white-space: pre-wrap; }
.warn-box { background: #322b20; border-color: #80643c; color: #efd4a8; }
.ok-box { background: #17332f; border-color: #37685a; color: #abe1cb; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #201a1040; border-top-color: #201a10; display: inline-block; animation: spin .8s linear infinite; }
.btn-ghost .spinner, .btn-soft .spinner, .loading .spinner { border-color: #ffffff30; border-top-color: var(--accent2); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: var(--muted); display: flex; align-items: center; gap: 9px; padding: 18px 0; }

/* Existing charts, media and report components. */
.hero-section { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid #405164; min-height: 250px; display: flex; align-items: center; margin-bottom: 24px; background: #182632 url('/assets/hero-bg.webp') center right / cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, #111c28f5 0%, #111c28e6 35%, #111c2870 72%, #111c2830 100%); }
.hero-content { position: relative; z-index: 1; padding: 36px; max-width: 690px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent2); font: 10px/1.5 var(--mono); letter-spacing: .17em; text-transform: uppercase; }
.hero-eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--accent); }
.hero-title { margin: 14px 0 12px; color: #f8fafb; font: 800 clamp(26px, 3vw, 38px)/1.22 var(--font-display); letter-spacing: -.045em; }
.hero-sub { color: #c7d3df; font-size: 14px; max-width: 500px; margin: 0; }
.hero-sub b { color: #fff; }
.hero-chips { display: flex; gap: 8px; margin-top: 23px; flex-wrap: wrap; align-items: center; }
.hero-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; color: #dce5ee; background: #182b3ccf; border: 1px solid #4b5f71; border-radius: 5px; font-size: 11px; }
.hero-chip svg.lucide { color: var(--accent2); width: 13px; height: 13px; }
.hero-chip.gold svg.lucide { color: var(--gold); }
.ring { position: relative; width: 92px; height: 92px; }
.ring svg { transform: rotate(-90deg); }
.ring .bg { fill: none; stroke: #ffffff15; stroke-width: 8; }
.ring .fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .5s; }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font: 700 21px var(--font-display); }
.ring .lbl { font-size: 10px; color: var(--muted); text-align: center; margin-top: -14px; }
.chart-box { width: 100%; overflow: hidden; } .chart-box svg { display: block; width: 100%; height: auto; } .spark { display: inline-block; vertical-align: middle; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.shot { overflow: hidden; transition: border-color .15s; }
.shot:hover { border-color: #768c9f; }
.shot img { width: 100%; display: block; max-height: 300px; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); background: #101820; }
.shot .meta { padding: 11px 12px; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; }
.shot .meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verdict { padding: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.verdict.high { background: #35232c; border-color: #88515e; } .verdict.medium { background: #322b20; border-color: #80643c; } .verdict.low { background: #17332f; border-color: #37685a; }
.verdict .big { font: 700 21px var(--font-display); display: flex; align-items: center; gap: 9px; }
.verdict.high .big { color: var(--bad); } .verdict.medium .big { color: var(--warn); } .verdict.low .big { color: var(--ok); } .verdict .score { font-size: 13px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 5px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.ind-list { list-style: none; margin: 0; padding: 0; }
.ind-list li { padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid var(--line); font-size: 13px; }
.ind-list li:last-child { border-bottom: none; } .ind-list li::before { content: '›'; position: absolute; left: 4px; color: var(--accent2); }
details.acc { padding: 13px 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: #131e29; }
details.acc summary { cursor: pointer; color: var(--text); font-size: 13px; font-weight: 600; }
details.acc[open] summary { margin-bottom: 12px; }
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(380px,calc(100vw - 32px)); }
.toast-item { color: var(--text); background: #243342; border: 1px solid #55687a; border-left: 3px solid var(--accent); border-radius: 8px; padding: 13px 16px; font-size: 13px; box-shadow: var(--lift); animation: slidein .18s ease-out; }
.toast-item.ok { border-left-color: var(--ok); } .toast-item.bad { border-left-color: var(--bad); }
@keyframes slidein { from { transform: translateX(16px); opacity: 0; } }
#app a { color: var(--accent2); text-decoration: none; } #app a:hover { text-decoration: underline; }
.spacer { flex: 1; } .mt { margin-top: 16px; } .nowrap { white-space: nowrap; }
.chain-progress-visual { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }

/* Technical workflow: stages, measurements and evidence remain separate. */
.seo-pipeline { counter-reset: seo-stage; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; padding: 0; list-style: none; margin: 22px 0 6px; border: 1px solid #405164; border-radius: 9px; overflow: hidden; }
.seo-pipeline li { position: relative; padding: 18px 16px 18px 37px; background: #15222f; border-right: 1px solid #405164; color: #cad8e5; font: 500 11px/1.6 var(--font-ui); }
.seo-pipeline li:last-child { border: none; }
.seo-pipeline li::before { content: ''; position: absolute; left: 17px; top: 24px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 2px; }
.seo-result { padding: 18px; margin: 12px 0; border: 1px solid var(--line2); border-radius: 9px; background: #14212c; overflow-wrap: anywhere; }
.seo-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.seo-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.seo-summary-grid > div { padding: 18px; background: #12212d; border: 1px solid #344b5d; border-top: 2px solid #597f97; border-radius: 7px; }
.seo-summary-grid strong { font: 700 28px/1.3 var(--font-display); color: #edf4f8; display: block; letter-spacing: -.04em; }
.seo-summary-grid span { font-size: 11px; color: #a7bdce; }
#ms-seo-box summary { cursor: pointer; line-height: 1.6; overflow-wrap: anywhere; }
#ms-seo-box details[open] > summary { color: var(--accent2); }

/* Model IDs and provider pricing JSON must wrap inside the working canvas. */
#or-cost, #or-recommendation, #or-output { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
#or-output pre { max-width: 100%; overflow-wrap: anywhere; }
#or-test-form .form-row > * { min-width: 0; max-width: 100%; flex-basis: 160px; }
#app input, #app select, #app textarea { min-width: 0; max-width: 100%; }
#app select { text-overflow: ellipsis; }

/* Guide: a navigable field manual rather than a long undifferentiated list. */
.guide-hero { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 32px; padding: 32px; margin-bottom: 22px; border: 1px solid #5e503c; background: #26251f; border-radius: 12px; }
.guide-kicker { color: #dfb979; font: 10px var(--mono); letter-spacing: .14em; margin-bottom: 14px; }
.guide-hero h1 { max-width: 680px; font-size: clamp(26px,3vw,38px); }
.guide-hero p { max-width: 690px; color: #c6c3ba; margin-top: 14px; }
.guide-legend { border-left: 1px solid #5a503f; padding-left: 24px; display: flex; flex-direction: column; justify-content: center; gap: 15px; }
.guide-legend > div { display: flex; gap: 10px; align-items: center; color: #c8c6bd; font-size: 11px; }
.guide-number { display: inline-block; color: #e9bc76; font: 10px var(--mono); margin-bottom: 7px; letter-spacing: .08em; }
.guide-layout { display: grid; grid-template-columns: 205px minmax(0,1fr); gap: 22px; align-items: start; }
.guide-index { position: sticky; top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #131e28; }
.guide-index h2 { color: #98adbf; font: 500 10px var(--mono); letter-spacing: .1em; margin-bottom: 13px; }
#app .guide-index button { width: 100%; justify-content: flex-start; padding: 9px 0; min-height: 36px; background: transparent; border: none; box-shadow: none; color: #bfcedb; font-size: 12px; white-space: normal; text-align: left; }
#app .guide-index button:hover { color: var(--accent2); transform: none; }
.guide-body .card { scroll-margin-top: 20px; padding: 25px; }
.guide-body p, .guide-body li { color: #c4cfd9; font-size: 13px; line-height: 1.8; }
.guide-body li { margin-bottom: 7px; }
.guide-body ul, .guide-body ol { padding-left: 20px; margin: 14px 0; }
.guide-body h3 { margin: 19px 0 8px; color: #e8eef3; }
.guide-callout { margin-top: 18px; padding: 15px 17px; background: #122b38; border-left: 2px solid #79abc3; color: #bdd5e2; font-size: 12px; }
.guide-body .table-wrap { margin-top: 15px; }
.guide-body td { color: #c4cfd9; }
.guide-action-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

@media (min-width: 1600px) { #main { padding-left: 48px; padding-right: 48px; } }
@media (max-width: 1100px) and (min-width: 901px) { #sidebar { width: 222px; flex-basis: 222px; } #main { padding-right: 24px; padding-left: 24px; } .brand { padding-left: 14px; padding-right: 14px; } .brand-text { font-size: 18px; } #app #nav a { font-size: 11.5px; gap: 8px; } .guide-layout { grid-template-columns: 170px minmax(0,1fr); gap: 15px; } }
@media (max-width: 900px) {
  #app { display: block; }
  #sidebar, body.side-collapsed #sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 20; border-right: none; border-bottom: 1px solid #405164; overflow: visible; }
  .brand, body.side-collapsed .brand { min-height: 59px; height: 59px; padding: 9px 16px; flex-wrap: nowrap; justify-content: flex-start; }
  .brand-mark { width: 30px; height: 31px; flex-basis: 30px; font-size: 17px; border-radius: 7px 2px; }
  .brand-text, body.side-collapsed .brand-text { display: block; font-size: 17px; }
  .brand-text em { display: inline; margin: 0 0 0 9px; font-size: 8px; letter-spacing: .1em; }
  #app #side-toggle, .nav-intro, .side-footer, .nav-group-label { display: none; }
  #nav { flex-direction: row; gap: 4px; overflow-x: auto; overflow-y: hidden; padding: 0 12px 10px; scrollbar-width: thin; }
  #app #nav a, body.side-collapsed #nav a { flex: 0 0 auto; gap: 7px; padding: 8px 11px; min-height: 35px; font-size: 11px; }
  #nav a.active::before { display: none; }
  .nav-label, body.side-collapsed .nav-label { display: inline; }
  #nav .ic { width: 14px; height: 14px; }
  #main { padding: 0 18px 40px; }
  .workspace-bar { min-height: 49px; gap: 12px; }
  .workspace-signature { font-size: 8px; gap: 8px; }
  .workspace-signature b { display: none; }
  .workspace-symbol { width: 23px; height: 23px; font-size: 14px; }
  .workspace-links { gap: 14px; }
  #app .workspace-links a { font-size: 10px; }
  #view { padding-top: 23px; }
  .guide-index { position: static; display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .guide-index h2 { width: 100%; margin-bottom: 5px; }
  #app .guide-index button { width: auto; min-height: 32px; padding: 6px 0; }
  .guide-layout { grid-template-columns: minmax(0,1fr); }
  .guide-body .card { scroll-margin-top: 130px; }
}
@media (max-width: 620px) {
  #main { padding-right: 12px; padding-left: 12px; }
  .workspace-signature { display: none; }
  .workspace-links { justify-content: space-between; width: 100%; }
  .view-head { gap: 14px; margin-bottom: 19px; }
  .view-head > .actions { width: 100%; }
  .card { padding: 17px; }
  .card > *, .card-head > * { min-width: 0; max-width: 100%; }
  #or-test-form .form-row > * { flex: 1 1 100%; }
  #or-test-form label { overflow-wrap: anywhere; }
  .card-head { gap: 10px; }
  .card-head .actions { width: 100%; }
  .card-head .actions .small { overflow-wrap: anywhere; }
  .hero-content { padding: 24px; }
  .hero-section { min-height: 260px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat { padding: 17px; }
  .stat .v { font-size: 25px; }
  .form-row > .shrink { flex-grow: 1; }
  #app .actions > button, #app .actions > .btn { white-space: normal; text-align: center; }
  .seo-pipeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .seo-pipeline li { border-bottom: 1px solid #405164; padding-left: 30px; }
  .seo-pipeline li::before { left: 13px; }
  .seo-pipeline li:nth-child(2) { border-right: 0; }
  .seo-pipeline li:nth-child(3) { border-bottom: 0; }
  .seo-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .seo-summary-grid > div { padding: 14px; }
  .seo-summary-grid strong { font-size: 24px; }
  .guide-hero { grid-template-columns: minmax(0,1fr); gap: 22px; padding: 23px; }
  .guide-legend { flex-direction: row; justify-content: flex-start; flex-wrap: wrap; border-left: 0; border-top: 1px solid #5a503f; padding: 18px 0 0; gap: 12px 18px; }
  .guide-body .card { padding: 20px; }
  .kv { grid-template-columns: 105px minmax(0,1fr); font-size: 12px; }
  #toast { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* V5.7 evidence inventory: readable measurements, bounded dense tables. */
#view:has(#cn-rows) .stat{min-height:124px;display:flex;flex-direction:column;gap:8px}
#view:has(#cn-rows) .stat .s{line-height:1.6}
#cn-rows td{vertical-align:top;padding-block:14px}
#cn-rows td:first-child{min-width:240px;max-width:330px;overflow-wrap:anywhere}
#cn-rows td:nth-child(5){max-width:260px;overflow-wrap:anywhere}
#cn-rows [data-check]{display:block;margin-top:8px}
#cn-progress{padding:14px 18px;border:1px solid var(--line, #334155);border-radius:12px;line-height:1.65}
#cn-source{padding-block:8px;line-height:1.65}
@media(max-width:760px){#view:has(#cn-rows) .view-head .actions{width:100%}#cn-filter,#cn-q{width:100%}#cn-source .form-row>div{min-width:100%}}
