:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #183b35; background: #edf1ed; font-synthesis: none;
  --border:#d6dfd8; --muted:#61766c; --accent:#235744;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; padding:max(22px,env(safe-area-inset-top)) 18px max(28px,env(safe-area-inset-bottom)); }
.app { max-width:1040px; margin:0 auto; }
.app-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:12px 0 24px; }
.eyebrow { font-size:.75rem; font-weight:700; letter-spacing:.13em; margin:0 0 8px; color:var(--muted); }
h1 { font-size:clamp(1.5rem,4vw,2.3rem); margin:0; letter-spacing:-.04em; }
h2 { margin:0 0 14px; font-size:1.1rem; letter-spacing:-.02em; }
p { line-height:1.6; }
.language { display:grid; gap:4px; font-size:.75rem; }
input,select,button { font:inherit; }
input[type=text],select { min-height:44px; border:1px solid #aebeb5; border-radius:9px; padding:9px 11px; background:#fff; color:inherit; }
input[type=text] { width:108px; text-align:right; font-size:1.12rem; font-variant-numeric:tabular-nums; }
input[type=checkbox] { width:23px; height:23px; margin:0; accent-color:var(--accent); flex-shrink:0; }
input:disabled,select:disabled { background:#f0f3ef; border-color:#e0e6df; color:#61766c; cursor:default; opacity:1; -webkit-text-fill-color:#61766c; }
input[aria-invalid=true] { border:2px solid #b63125; background:#fff6f3; }
input:focus-visible,select:focus-visible,button:focus-visible,summary:focus-visible { outline:3px solid #c67524; outline-offset:3px; }
.settings { margin-bottom:14px; }
summary { cursor:pointer; width:fit-content; min-height:44px; padding:10px 0; font-size:.9rem; font-weight:600; }
.settings-content { padding:6px 18px 16px; border:1px solid var(--border); border-radius:12px; background:#f7f9f5; }
.check-row { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:44px; cursor:pointer; }
.panel { background:#fff; border:1px solid var(--border); border-radius:14px; padding:22px; }
.automatic-panel { margin-bottom:18px; border-top:4px solid #326957; }
.auto-label { font-weight:650; }
.target-field { margin-top:3px; }
.inactive label { color:var(--muted); }
.hint { display:block; font-size:.75rem; font-weight:400; line-height:1.45; color:var(--muted); margin-top:5px; }
.percent-help { margin:4px 0 0; }
.workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:18px; }
.result-column { display:grid; gap:14px; min-width:0; }
.field { display:grid; grid-template-columns:minmax(0,1fr) 108px; gap:6px 16px; align-items:center; min-height:70px; padding:10px 0; border-bottom:1px solid #e9ede7; }
.field:last-child { border-bottom:0; }
.field label { line-height:1.35; font-size:.93rem; }
.fixed-field { min-height:58px; font-size:.88rem; color:var(--muted); }
.fixed-field output { text-align:right; font-variant-numeric:tabular-nums; }
.field-error { grid-column:1/-1; text-align:right; color:#a3261b; font-size:.78rem; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.section-heading h2 { margin:0; }
.status { border-radius:20px; padding:6px 9px; font-size:.68rem; font-weight:700; text-align:center; }
.result-row { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:66px; padding:12px 10px; border-radius:8px; margin-bottom:4px; font-size:.9rem; }
.result-row output { font-size:1.4rem; font-weight:650; letter-spacing:-.03em; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cg-row { border-top:1px solid var(--border); border-radius:0 0 8px 8px; margin-top:10px; }
[data-level=ok].status { background:#e5f0e5; color:#285239; }
[data-level=error].status,.result-row[data-level=error] { background:#fbe8e1; color:#8b251a; }
[data-level=warning].status,.result-row[data-level=warning] { background:#fff1d5; color:#73501c; }
.warnings-panel h2 { font-size:.95rem; }
#warnings { padding-left:19px; margin:0; font-size:.85rem; }
#warnings li { padding:3px 0; line-height:1.5; }
#warnings li[data-level=error] { color:#a3261b; }
#warnings li[data-level=warning] { color:#815b1b; }
#no-warnings { margin:0; }
.performance-panel { background:#f7f9f5; }
.performance-panel h2 { font-size:.9rem; }
dl { margin:0; font-size:.8rem; }
dl>div { display:flex; justify-content:space-between; gap:14px; padding:8px 0; }
dd { margin:0; text-align:right; font-variant-numeric:tabular-nums; }
.dump-section { margin-top:20px; }
.dump-button { width:100%; padding:16px 20px; min-height:58px; border:1px solid #235744; border-radius:12px; background:#235744; color:#fff; font-weight:650; cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.dump-button[aria-pressed=true] { background:#9e6225; border-color:#9e6225; }
.dump-button:disabled { background:#8b9c92; border-color:#8b9c92; cursor:default; }
.simulation-banner,.validation-banner { background:#fff1d5; border:1px solid #e1c694; border-radius:10px; padding:14px 18px; font-size:.85rem; line-height:1.5; }
.simulation-banner { display:flex; flex-wrap:wrap; gap:4px 15px; margin-bottom:10px; }
.validation-banner { margin:0; }
@media (max-width:700px) { .app { max-width:520px; } .workspace { grid-template-columns:1fr; } .app-header { padding-top:4px; } }
@media (max-width:380px) { body { padding-left:12px; padding-right:12px; } .panel { padding:18px; } .field { grid-template-columns:minmax(0,1fr) 88px; gap:6px 10px; } input[type=text] { width:88px; } .field label { font-size:.85rem; } .status { font-size:.62rem; } }

.aircraft-photo { max-width:428px; margin:0 auto 18px; }
.aircraft-photo img { display:block; width:100%; height:auto; border-radius:12px; }


.graph-panel { margin-top:20px; min-width:0; }
.graph-panel .section-heading { flex-wrap:wrap; }
.graph-summary { color:var(--muted); font-size:.85rem; font-variant-numeric:tabular-nums; }
.graph-help { margin:-2px 0 12px; }
#cg-graph { min-width:0; width:100%; }
.cg-plot { display:block; width:100%; height:auto; overflow:visible; font-family:inherit; }
.cg-grid { stroke:#dce4db; stroke-width:1; }
.cg-tick { fill:#61766c; font-size:11px; font-variant-numeric:tabular-nums; }
.cg-axis-label { fill:#3e594d; font-size:12px; font-weight:600; }
.cg-envelope-edge { stroke:#b74a3e; stroke-width:2; }
.cg-limit-label { fill:#9e4236; font-size:10px; font-variant-numeric:tabular-nums; }
.cg-point { cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.cg-point:focus-visible { outline:2px solid #c67524; outline-offset:2px; }
.graph-limits { display:flex; align-items:center; gap:8px; margin:0 0 12px; }
.graph-limit-swatch { display:inline-block; width:22px; height:0; border-top:2px solid #b74a3e; flex-shrink:0; }
.graph-legend { display:flex; flex-wrap:wrap; gap:4px 12px; list-style:none; padding:0; margin:0; }
.graph-legend-item { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:.72rem; white-space:nowrap; }
.graph-swatch { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.graph-inspection { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; padding:14px 16px; margin-top:12px; background:#edf3ec; border-radius:9px; font-size:.85rem; }
.graph-values { font-variant-numeric:tabular-nums; }


.graph-values strong { white-space:nowrap; }


.graph-current-swatch { outline:1px solid currentColor; outline-offset:2px; }
@media (max-width:700px) {
  .graph-legend { gap:3px 10px; }
  .graph-legend-item { font-size:.68rem; }
  .graph-inspection { gap:4px 12px; padding:10px 12px; margin-top:8px; }
  .graph-values { line-height:1.55; }
  .graph-limits { margin-bottom:7px; }
  .graph-help { margin-bottom:6px; }
  .graph-panel .section-heading { margin-bottom:8px; }
  .dump-section { margin-top:10px; }
}

/* Axis labels must not become Chrome's selected text during a sustained touch. */
.cg-plot,.cg-plot * { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.cg-plot text { pointer-events:none; }
