:root {
  --bg: #0d1013;
  --panel: #15191d;
  --well: #0b0e11;
  --border: #343c44;
  --rule: #282f35;
  --accent: #f3ba76;
  --muted: #a5afb7;
  --ink: #eff1f2;
  --signal: #86cdb2;
  --ui-font: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --instrument-font: "Bahnschrift", "Cascadia Mono", ui-monospace, monospace;
}
body { background: var(--bg); color: var(--ink); font-family: var(--ui-font); font-size: 15px; }
header { background: #101316; border-color: var(--rule); }
h1 { font-size: clamp(1.125rem, 2.3vw, 1.6rem); font-weight: 640; letter-spacing: -.025em; }
header small { color: var(--muted); }
.identity { gap: 12px; }
.brand-icon {
  display: grid; position: relative; flex: 0 0 40px; width: 40px; height: 40px;
  border: 1px solid #71593e; border-radius: 5px; background: #241c16;
}
.brand-icon::before {
  content: ""; width: 13px; height: 22px; border: 1.5px solid var(--accent);
  transform: rotate(27deg); align-self: center; justify-self: center;
}
.brand-icon::after {
  content: ""; position: absolute; height: 12px; width: 1px; left: calc(50% - .5px); top: calc(50% - 6px);
  background: repeating-linear-gradient(to bottom,var(--accent) 0 3px,transparent 3px 5px);
  transform: rotate(27deg);
}
#runTag {
  display: inline-flex; align-items: center; gap: 7px; background: #1c1a17; color: #e1b98b;
  border: 1px solid #4a4035; border-radius: 4px; padding: 6px 9px; white-space: nowrap;
}
#runTag::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
#runTag[data-running="true"] { color: var(--signal); background: #151f1b; border-color: #36524a; }
.card { border-color: var(--rule); border-radius: 8px; box-shadow: none; }
.head { border-color: var(--rule); }
.head h2 { color: var(--ink); font-size: .98rem; font-weight: 650; text-transform: none; letter-spacing: .005em; }
.button, button, select, input {
  border-color: #3c444c; border-radius: 5px; background: #20262c; color: var(--ink);
}
button, .tag.file { letter-spacing: 0; }
button:hover { background: #303840; border-color: #65717a; }
button.primary, .tag.file {
  background: var(--accent); color: #22160a; border: 1px solid #e4aa66;
}
button.primary:hover, .tag.file:hover { background: #ffd095; }
button:disabled { opacity: .48; }
[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
input:not(.fcu-value) { background: #12171c; }
input::placeholder { color: #98a3ae; }
select { color: #e8ebed; }
.avionics { background: #13171b; }
.fcu-strip {
  background: #21272c; border-color: #3c454d; border-radius: 6px; box-shadow: inset 0 1px #ffffff09;
}
.avionics-title, .screen h3 { color: #d5dbe0; font: 600 .78rem var(--instrument-font); letter-spacing: .055em; }
.avionics-title small, .radnav small { color: var(--muted); font-family: var(--ui-font); font-weight: 400; }
.dial .fcu-value, .course-dial .fcu-value, .rad-grid .fcu-value {
  background: #0f1113; color: #ffca8d; border-color: #404850;
  font-family: var(--instrument-font); font-variant-numeric: tabular-nums; border-radius: 3px;
}
.dial label, .rad-grid label { color: #d1d7dc; font-family: var(--instrument-font); }
.rotary, .rotary:hover {
  border-color: #69737d; border-radius: 50%; background: repeating-conic-gradient(#48515a 0deg 8deg,#30373e 8deg 16deg);
  box-shadow: inset 0 0 0 3px #282e34, 0 2px 3px #0007;
}
.rotary::after { background: #ecded0; height: 9px; width: 3px; left: calc(50% - 1.5px); }
.course-panel { background: #171c21; border-color: #343c44; border-radius: 5px; }
.dial-help, .notice, .muted, label.field { color: var(--muted); }
.screen { background: #1d2329; border-color: #39434b; border-radius: 5px; }
.screen svg { background: var(--well); border-color: #101417; border-radius: 3px; }
.screen h3 { margin-bottom: 6px; }
.radnav { background: #171b20; border-color: #373f47; border-radius: 5px; }
.radnav summary, .chart-guide summary, .manual-radios summary { color: #e5be91; }
.rad-grid select { color: #a0dfc2; background: #101714; }
.metrics { gap: 0; background: #111519; border: 1px solid var(--rule); border-radius: 5px; }
.metric { border: 0; background: transparent; border-radius: 0; }
.metric + .metric { border-inline-start: 1px solid var(--rule); }
.metric b { color: var(--signal); font-family: var(--instrument-font); font-variant-numeric: tabular-nums; }
.map, .map.pdf { background: #0d1116; scrollbar-color: #545c64 #15191d; }
.map.pdf { background: #282e34; }
.chart-help { color: #abb6bf; }
.chart-cal-tools button:disabled { background: #232930; color: #c3cbd2; border-color: var(--border); opacity: .58; }
.cal-banner { border-color: #785b37; background: #2d241a; color: #efd4b5; border-radius: 5px; }
#summary, #profileReport { background: #1b2326; border-color: #43514f; border-radius: 5px; }
.exercise { background: #11161a; border-radius: 5px; }
@media (max-width: 460px) {
  .brand-icon { display: none; }
  .metric:nth-child(3) { border-inline-start: 0; }
  .metric:nth-child(n+3) { border-block-start: 1px solid var(--rule); }
}

.cockpit-view {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 9px;
  font-size: .875rem;
}
#nd text:not([font-size]), #nd2 text:not([font-size]) { font-size: 14.5px; }
#pfd text[x="57"], #pfd text[x="361"] { font-size: 19px; }
body.cockpit-focused main {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1540px;
}
body.cockpit-focused .chart-column { display: none; }
@media (min-width: 1100px) {
  main { max-width: 1900px; grid-template-columns: minmax(0, 1.67fr) minmax(0, 1fr); }
  header { padding-inline: max(20px, calc((100vw - 1840px) / 2)); }
  body.cockpit-focused .flight-screens { max-width: 1450px; margin-inline: auto; }
}
@media (min-width: 650px) and (max-width: 1099px) {
  body.cockpit-focused main { max-width: 1040px; }
  body.cockpit-focused .flight-screens { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body.cockpit-focused .pfd-screen { grid-column: auto; width: 100%; }
}
@media (max-width: 600px) {
  .flight-screens { grid-template-columns: minmax(0,1fr); }
  .pfd-screen { grid-column: auto; width: 100%; }
}

.chart-icon {
  width: 40px;
  min-height: 40px;
  padding: 8px;
  display: inline-grid;
  place-items: center;
}
.chart-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-slash { display: none; }
[aria-pressed="true"] .icon-slash { display: initial; }

.course-dial-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-inline-start: 1px solid var(--border);
  padding-inline-start: 10px;
}
.course-dial-secondary label { white-space: nowrap; }
.course-dial-secondary .rotary { margin: 0; }
@media (max-width: 460px) {
  .course-dial-secondary { border-inline-start: 0; padding-inline-start: 0; }
}

/* Flight-deck identity: compact aviation typography and restrained accent. */
:root{--bg:#0c141c;--panel:#131e29;--well:#080d12;--border:#30424f;--rule:#263845;--accent:#91ddbd;--signal:#91ddbd;--muted:#a5b4c1;--ink:#e8eff4}
body{background:var(--bg)}
header{background:#111c26;position:sticky;top:0;z-index:5;min-height:78px;border-bottom:1px solid #30434f}
.brand-logo{width:48px;height:48px;flex:none}
.identity h1{font-weight:760;color:#f5f8fa;letter-spacing:-.045em}
.identity h1 span{font-weight:520;letter-spacing:-.035em}
.identity small{font-size:13px;letter-spacing:.02em;color:#a0b5c5}
.header-actions,.mode-tabs{display:flex;align-items:center;gap:8px}
.mode-tabs{padding:4px;border:1px solid #344655;background:#0b141d;border-radius:7px}
.mode-tabs button{padding:9px 14px;background:transparent;border:1px solid transparent;color:#acbfcb;font-size:14px;white-space:nowrap}
.mode-tabs button[aria-pressed=true]{background:#26423f;border-color:#456e62;color:#c4ffdf}
.card{border-color:#2b3c49;border-radius:9px;background:#131e29}
.head{background:#182532;padding:12px 14px;min-height:52px}
.avionics{background:#111a23}
.fcu-strip{background:#273944;border-color:#52656f}
.course-panel,.radnav{background:#162430;border-color:#344958}
.rotary,.rotary:hover{box-shadow:inset 0 0 0 3px #273740,0 2px 3px #0008}
button,select,input{background:#263541;border-color:#455663}
button.primary,.tag.file{background:#91ddbd;color:#102a24;border-color:#91ddbd}
button.primary:hover,.tag.file:hover{background:#b2f2d5}
.screen{background:#2d3e49;border:1px solid #50636d;padding:7px;border-radius:5px}
.screen svg{border:3px solid #0a1015;box-shadow:inset 0 0 0 1px #71858d}
.screen h3{font-size:13px;letter-spacing:.08em}
.metrics{background:#101a22}
.ils-setup{margin-top:10px;padding:13px;background:#142430;border:1px solid #496372;border-radius:7px}
.ils-title{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:10px}
.ils-title h3{font-size:16px;margin:0;color:#e7f1f7}
.ils-title p{margin:6px 0;font-size:13px}
.ils-setup .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.ils-setup #ilsStatus{color:#f0a6e5;margin-bottom:0}
.radnav summary,.chart-guide summary,.manual-radios summary{color:#a5dbc7}
@media(min-width:1100px){main{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px;padding:16px}.chart-column{min-width:0}.flight-screens{gap:8px}}
@media(max-width:700px){header{position:static;flex-wrap:wrap;gap:8px;padding:12px}.brand-logo{width:40px;height:40px}.header-actions{width:100%;justify-content:space-between}.ils-title{flex-direction:column}.ils-setup .grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.avionics{display:flex;flex-direction:column}
.approach-controls{display:flex;align-items:center;gap:8px;grid-column:1/-1;margin-top:8px}
.approach-controls button{font-family:var(--instrument-font);font-size:13px;padding:7px 13px;min-width:64px}
.approach-controls button[aria-pressed=true],#selectNav[aria-pressed=true],#selectHdg[aria-pressed=true]{color:#9af8bf;border-color:#6bbb91;background:#203b32}
#guidanceStatus{font-size:13px;color:#a5d8cb}
.procedure-library{margin:0 14px 14px;padding:12px;border:1px solid #3b5964;border-radius:7px;background:#14242e}
.procedure-top,.procedure-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.procedure-top{justify-content:space-between}
.procedure-top h3{margin:0;font-size:16px;color:#e3f4ed}
.procedure-top p{margin:4px 0;font-size:13px;color:var(--muted)}
.procedure-row input,.procedure-row select{flex:1;min-width:0}
.procedure-row button,.procedure-top button{white-space:nowrap}
#procedureStatus{margin:4px 0 0}
@media(max-width:460px){.procedure-row{flex-wrap:wrap}.procedure-row select{flex-basis:100%}}
.fcu-strip{order:0}.transport{order:1}.flight-screens{order:2}.course-panel{order:3}.ils-setup{order:4}.radnav{order:5}
@media(min-width:1100px) and (max-width:1499px){.flight-screens{grid-template-columns:repeat(2,minmax(0,1fr))}.flight-screens .screen:nth-child(3){grid-column:1/-1;width:50%;justify-self:center}}
