
/* Layout: test-report page. Controls column + live test section; results read like a NACA data sheet below. */
:root {
  --bg: #eef1f0; --surface: #ffffff; --sunk: #e4e9e8; --ink: #13212a; --muted: #586972; --line: #d3dbdb;
  --accent: #d9581c; --accent-ink: #ffffff; --lower: #1c6ea4; --good: #2f7d4f; --warn: #b7791f; --bad: #b42318;
  --hold1: #6d5bd0; --hold2: #0f8b8d; --hold3: #8a6d3b; --grid: rgba(19,33,42,.08); --particle: rgba(19,33,42,.62);
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1317; --surface: #121c22; --sunk: #0f171c; --ink: #e2e9ec; --muted: #8d9ea7; --line: #22313a;
  --accent: #ff7a3d; --accent-ink: #1a0d05; --lower: #5aaee6; --good: #5cc488; --warn: #e8b04a; --bad: #ff6b5e;
  --hold1: #a598ff; --hold2: #3fc8c9; --hold3: #d2b27a; --grid: rgba(226,233,236,.07); --particle: rgba(226,233,236,.62); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0c1317; --surface: #121c22; --sunk: #0f171c; --ink: #e2e9ec; --muted: #8d9ea7; --line: #22313a;
  --accent: #ff7a3d; --accent-ink: #1a0d05; --lower: #5aaee6; --good: #5cc488; --warn: #e8b04a; --bad: #ff6b5e;
  --hold1: #a598ff; --hold2: #3fc8c9; --hold3: #d2b27a; --grid: rgba(226,233,236,.07); --particle: rgba(226,233,236,.62); color-scheme: dark; }

* { box-sizing: border-box; }
.aoa-page { background: var(--bg); color: var(--ink); }
.lab-root { font-family: var(--f-body); font-size: 14px; line-height: 1.5; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 56px; }
.lab-root.wrap { max-width: 1272px; margin: 0 auto; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding-block: 28px 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(38px, 6vw, 64px); line-height: .92; letter-spacing: -.01em; margin: 6px 0 0; text-transform: uppercase; text-wrap: balance; }
h1 .alpha { color: var(--accent); font-family: var(--f-body); font-weight: 500; text-transform: none; font-size: .78em; vertical-align: .04em; margin-left: .06em; }
.top p { margin: 0; max-width: 46ch; color: var(--muted); }

/* app grid */
.app { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }


.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.controls { display: grid; gap: 14px; }
.ctl { padding: 14px 14px 16px; display: grid; gap: 12px; min-width: 0; }
.ctl h2 { font-family: var(--f-display); font-weight: 600; font-size: 17px; letter-spacing: .06em; text-transform: uppercase; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ctl h2 small { font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 4px; border-radius: 4px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

.field { display: grid; gap: 5px; }
.field label, .lbl { font-size: 12px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.field label output { font-family: var(--f-mono); color: var(--ink); font-weight: 400; }
input[type="text"], select, textarea { width: 100%; background: var(--sunk); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; }
input[type="text"]#naca { font-family: var(--f-mono); font-size: 18px; letter-spacing: .06em; }
textarea { font-family: var(--f-mono); font-size: 12px; min-height: 120px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-family: var(--f-mono); }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.desc { font-size: 12.5px; border-left: 2px solid var(--line); padding: 2px 0 2px 10px; color: var(--muted); }
.desc b { color: var(--ink); font-weight: 600; }
.err { color: var(--bad); font-size: 12.5px; }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 5px; padding: 7px 12px; cursor: pointer; font-weight: 500; font-size: 13px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.derived { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; background: var(--sunk); border-radius: 5px; padding: 8px 10px; }
.derived span:nth-child(even) { color: var(--ink); text-align: right; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }

/* stage */
.stage { display: grid; gap: 14px; min-width: 0; }
.tunnel { position: relative; overflow: hidden; padding: 0; }
.tunnel canvas { display: block; width: 100%; height: 100%; }
.tunnel-box { position: relative; aspect-ratio: 16 / 8.2; max-height: 520px; width: 100%; max-width: 100%; }
.overlay { position: absolute; inset: 10px 10px 10px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; flex-wrap: wrap; }
.status { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 8px; font-size: 12.5px; font-weight: 500; backdrop-filter: blur(4px); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; }
.status[data-s="warn"] .dot { background: var(--warn); } .status[data-s="bad"] .dot { background: var(--bad); }
.layers { pointer-events: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.layers button { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); cursor: pointer; color: var(--muted); }
.layers button[aria-pressed="true"] { color: var(--ink); border-color: var(--muted); }
.legend { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); pointer-events: none; }
.legend i { display: block; width: 120px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), transparent 62%, var(--lower)); border: 1px solid var(--line); }
.windlbl { position: absolute; right: 12px; bottom: 10px; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); }

.aoa { padding: 14px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 18px; align-items: center; }
.aoa .big { font-family: var(--f-display); font-weight: 600; font-size: 46px; line-height: 1; min-width: 4.2ch; font-variant-numeric: tabular-nums; }
.aoa .big small { font-size: 15px; color: var(--muted); display: block; font-family: var(--f-mono); font-weight: 400; letter-spacing: .04em; margin-bottom: 4px; text-transform: uppercase; }
.aoa .scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.aoa .ctrls { display: flex; gap: 6px; }
.iconbtn { width: 36px; height: 36px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.iconbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 560px) { .aoa { grid-template-columns: 1fr auto; } .aoa .sl { grid-column: 1 / -1; grid-row: 2; } }
.say { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.say b { color: var(--ink); }

.readouts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ro { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.ro:last-child { border-right: 0; }
.ro .k { font-size: 11px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.ro .v { font-family: var(--f-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ro .s { font-size: 11px; color: var(--muted); font-family: var(--f-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ro:nth-child(3) { border-right: 0; } .ro:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
.realworld { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; border-top: 1px solid var(--line); }
.realworld b { font-family: var(--f-mono); font-weight: 500; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .charts { grid-template-columns: minmax(0, 1fr); } }
.chart { padding: 12px 12px 10px; display: grid; gap: 8px; min-width: 0; }
.chart header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart h3 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: .05em; text-transform: uppercase; }
.chart .cv { position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 100%; }
.chart canvas { width: 100%; height: 100%; display: block; }
.tabs { display: flex; gap: 2px; background: var(--sunk); padding: 2px; border-radius: 5px; border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; font-size: 11.5px; padding: 4px 8px; border-radius: 3px; cursor: pointer; color: var(--muted); font-family: var(--f-mono); }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.how { font-size: 12px; color: var(--muted); margin: 0; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); font-family: var(--f-mono); }
.keys span::before { content: ""; display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; background: var(--c, var(--ink)); }
.keys span.d::before { background: repeating-linear-gradient(90deg, var(--c) 0 3px, transparent 3px 6px); }
.keys button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 13px; }

.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.summary > div { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary > div .k { font-size: 11px; color: var(--muted); }
.summary .v { font-family: var(--f-mono); font-size: 15px; }
.tools { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tools textarea { flex: 1 1 100%; }
.toast { font-size: 12.5px; color: var(--good); }

/* report sections */
.report { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .report { grid-template-columns: minmax(0, 1fr); } }
.report section { padding: 18px 20px; min-width: 0; }
.report h2 { font-family: var(--f-display); font-weight: 600; font-size: 24px; letter-spacing: .03em; text-transform: uppercase; margin: 0 0 4px; }
.report p, .report li { max-width: 68ch; }
.report ol { padding-left: 20px; margin: 10px 0; display: grid; gap: 8px; }
.report li b { font-weight: 600; }
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { font-weight: 500; color: var(--muted); font-size: 11.5px; }
td { font-family: var(--f-mono); }
th:first-child, td:first-child { text-align: left; }
.refs { font-size: 12.5px; color: var(--muted); }
.refs li { margin-bottom: 4px; }
footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
footer a { color: var(--ink); }
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .stage { display: contents; }
  .stage > .tunnel { order: 1; } .stage > .aoa { order: 2; } .controls { order: 3; } .stage > .res { order: 4; } .stage > .charts { order: 5; } .stage > .sumcard { order: 6; }
}
@media (max-width: 600px) {
  .tunnel-box { aspect-ratio: 4 / 3.6; }
  .overlay { inset: 8px; }
  .layers button { font-size: 10.5px; padding: 2px 7px; }
  .status { font-size: 11.5px; }
  .legend, .windlbl { display: none; }
  .layers { position: absolute; right: 8px; bottom: 8px; left: 8px; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Portfolio integration: site palette and type, no web fonts (CSP font-src 'self') */
.aoa-page { --f-display: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; --f-body: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif; --f-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace; --r: 0px;
  --bg: #070d13; --surface: #0f1b25; --sunk: #0b151d; --ink: #eef3f5; --muted: #a9b8c3; --line: #22323d; --accent: #ff8a4c; --accent-ink: #160a03; --lower: #a3d8e3; }
.aoa-page h1 { text-transform: none; font-weight: 500; letter-spacing: -.04em; font-size: clamp(40px, 5.4vw, 70px); line-height: 1; }
.aoa-page h1 .alpha { color: #9cc2d0; }
.aoa-page .ctl h2, .aoa-page .chart h3, .aoa-page .report h2 { text-transform: none; letter-spacing: -.01em; font-weight: 500; }
.aoa-page .report h2 { font-size: 26px; }
.aoa-page .top { padding-top: 8px; }
.aoa-page .top p { font-size: 17px; line-height: 1.6; }
.aoa-page .breadcrumbs { padding-block: 22px 0; }
.aoa-page .site-masthead, .aoa-page .breadcrumbs, .aoa-page .site-end { --accent: #a3d8e3; }
.aoa-page .top { padding-top: 0; }
