/* Pitot-static article: static figures, worked example and the instrument panel widget.
 * Shares tokens with home.css / article.css. The panel itself stays dark in
 * both themes, like a real instrument panel. */
:root { --ps-green: #1f7a4d; --ps-amber: #c98a12; }
@media (prefers-color-scheme: dark) { :root { --ps-green: #5fc493; --ps-amber: #e0a63a; } }

/* Static figures */
.ps-air { stroke: var(--blue); stroke-width: 2; fill: none; stroke-linecap: round; }
.ps-ah { fill: var(--blue); }
.ps-tube { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.6; }
.ps-skin { fill: none; stroke: var(--ink); stroke-width: 2; }
.ps-pt { stroke: var(--magenta); stroke-width: 3; fill: none; stroke-linejoin: round; }
.ps-st { stroke: var(--blue); stroke-width: 3; fill: none; stroke-linejoin: round; }
.ps-box { fill: var(--card); stroke: var(--ink); stroke-width: 1.6; }
.ps-cap { fill: color-mix(in srgb, var(--magenta) 20%, var(--card)); stroke: var(--magenta); stroke-width: 1.6; }
.ps-cap.st { fill: color-mix(in srgb, var(--blue) 30%, var(--card)); stroke: var(--blue); }
.ps-case {fill: color-mix(in srgb, var(--blue) 14%, var(--card)); stroke: var(--blue); stroke-width: 1.6; }
.ps-hole { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.ps-t { font: 600 12px var(--mono); fill: var(--ink); }
.ps-ts { font: 500 11px var(--mono); fill: var(--ink-soft); }
.ps-tm { font: 600 12px var(--mono); fill: var(--magenta); }
.ps-tb { font: 600 12px var(--mono); fill: var(--blue); }
.prose .fig.ps-fig svg { max-width: 600px; margin: 0 auto; }

/* Worked example: one step per line, the "=" signs in one column */
.ps-calc { margin: 1.2em 0 0; padding: 14px 18px; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--blue); border-radius: 10px; font: 500 15px/1.7 var(--mono); color: var(--ink); }
.ps-calc .row { display: grid; grid-template-columns: 3.2em 1.2em minmax(0, 1fr); align-items: baseline; }
.ps-calc .row > span:nth-child(1) { text-align: right; padding-right: 0.3em; }
.ps-calc .row > span:nth-child(2) { text-align: center; }
.ps-calc .row b { font-weight: 600; }
.ps-calc .key { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--rule); font: 400 15px/1.5 var(--body); color: var(--ink-soft); }
.ps-calc .key p { margin: 0; font-size: 15px; }
.ps-calc .key p + p { margin-top: 3px; }

/* Summary table colours */
.prose td.up { color: var(--magenta); font-weight: 600; }
.prose td.ok { color: var(--ps-green); }

/* Widget */
.widget.ps { grid-template-columns: 1fr; gap: 14px; }
.ps-panel { --pn: #1b2733; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; background: var(--pn); border-radius: 14px; padding: 14px 10px 10px; }
.ps-inst { margin: 0; min-width: 0; text-align: center; }
.ps-dial { display: block; width: 100%; max-width: 190px; height: auto; margin: 0 auto; }
.ps-inst figcaption { margin-top: 6px; font: 500 12px/1.35 var(--mono); color: #b9c4d0; }
.ps-inst figcaption b { display: block; font: 600 15px var(--mono); color: #f2efe6; }
.ps-bezel { fill: #0b1118; stroke: #3a4756; stroke-width: 2; }
.ps-face { fill: #10171f; }
.ps-tk { stroke: #e9edf2; stroke-width: 1.4; }
.ps-red { stroke: #e0443c; stroke-width: 3; }
.ps-arc { fill: none; stroke-width: 5; }
.ps-arc.w { stroke: #e9edf2; stroke-width: 3; }
.ps-arc.g { stroke: #2fa86a; }
.ps-arc.y { stroke: #e2b33a; }
.ps-dn { font: 600 9px var(--mono); fill: #e9edf2; }
.ps-du { font: 500 6.5px var(--mono); fill: #9fb0c3; letter-spacing: 0.06em; }
.ps-needle { fill: #f2efe6; }
.ps-needle.sh { fill: #c9d2dc; }
.ps-hub { fill: #2a3542; stroke: #f2efe6; stroke-width: 1; }
.ps-real { margin: 0; font: 500 14px var(--mono); color: var(--ink-soft); }
.ps-real b { color: var(--ink); font-weight: 600; }
.w-note.ps-say { font-size: 16px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; border-left: 4px solid var(--ps-green); background: color-mix(in srgb, var(--ps-green) 9%, transparent); color: var(--ink); min-height: 4.6em; }
.w-note.ps-say.warn { color: var(--ink); font-weight: 500; border-left-color: var(--magenta); background: color-mix(in srgb, var(--magenta) 8%, transparent); }
.ps-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.ps-group { display: grid; gap: 6px; align-content: start; }
.ps-lbl { font-size: 15px; color: var(--ink-soft); }
.ps-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-seg button, .ps-btn { font: 600 14px var(--body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; text-align: left; }
.ps-vs button { font-family: var(--mono); font-size: 13px; padding: 7px 10px; }
.ps-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ps-seg button:focus-visible, .ps-btn:focus-visible, .ps-range input:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
.ps-range { display: grid; gap: 6px; font-size: 15px; color: var(--ink-soft); align-content: start; }
.ps-range b { font-family: var(--mono); color: var(--ink); }
.ps-range input { width: 100%; accent-color: var(--magenta); }
.ps-btns { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.w-note.ps-warp { font-size: 13px; }

@media (max-width: 720px) {
  .ps-ctl { grid-template-columns: 1fr; }
  .ps-panel { gap: 4px; padding: 10px 4px 8px; }
  .ps-inst figcaption { font-size: 11px; }
  .ps-inst figcaption b { font-size: 13px; }
  .ps-calc { font-size: 13.5px; padding: 12px; }
  .prose table.ps-tbl { font-size: 14px; }
  .prose .ps-tbl th { font-size: 10px; letter-spacing: 0; padding: 8px 5px; }
  .prose .ps-tbl td { padding: 8px 5px; hyphens: auto; }
}

/* Pitot-static schematic (first figure) */
.prose .fig.ps-fig svg.pf { max-width: 720px; }
.pf text { font-family: var(--mono); }
.pf .sb { font-size: 75%; }
.pf-h { font: 700 13px var(--mono); fill: var(--ink); letter-spacing: 0.04em; }
.pf-h.pt { fill: var(--magenta); } .pf-h.ps { fill: var(--blue); }
.pf-s { font: 500 12px var(--mono); fill: var(--ink-soft); }
.pf-r { font: 600 12px var(--mono); fill: var(--ink); }
.pf-sym { font: 700 15px var(--mono); }
.pf-sym.pt, .pf-k.pt { fill: var(--magenta); } .pf-sym.ps, .pf-k.ps { fill: var(--blue); }
.pf-k { font-weight: 700; }
.pf-air { stroke: var(--ink-soft); stroke-width: 1.4; }
.pf-ah { fill: var(--ink-soft); }
.pf-body { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.8; }
.pf-bore { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.pf-ptfill { fill: color-mix(in srgb, var(--magenta) 22%, var(--card)); }
.pf-psfill { fill: color-mix(in srgb, var(--blue) 26%, var(--card)); }
.pf-wall { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.pf-wing { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.pf-heat { fill: none; stroke: #c98a12; stroke-width: 1.2; stroke-linejoin: round; }
.pf-gap { fill: var(--card); }
.pf-drip { stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 2 2; }
.pf-dot { fill: var(--magenta); }
.pf-lead { stroke: var(--ink-soft); stroke-width: 1; }
.pf-hl { stroke: var(--ink-soft); stroke-width: 1; }
.pf-skin { stroke: none; }
.pf-skinedge { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.pf-pt { stroke: var(--magenta); stroke-width: 3; fill: none; stroke-linejoin: round; }
.pf-ps { stroke: var(--blue); stroke-width: 3; fill: none; stroke-linejoin: round; }
.pf-psthin { stroke: var(--blue); stroke-width: 1.4; }
.pf-meter { fill: var(--ink); }
.pf-case { fill: color-mix(in srgb, var(--blue) 10%, var(--card)); stroke: var(--blue); stroke-width: 1.6; }
.pf-cap { stroke-width: 1.6; stroke-linejoin: round; }
.pf-cap.pt { fill: color-mix(in srgb, var(--magenta) 22%, var(--card)); stroke: var(--magenta); }
.pf-cap.st { fill: color-mix(in srgb, var(--blue) 30%, var(--card)); stroke: var(--blue); }
.pf-cap.vac { fill: var(--card); stroke: var(--ink); }
