/* PhoneJSA | pj.css v2.0 (Nov 23 2026 refit)
   Shared look for every phonejsa.com page: tokens, self-hosted fonts, top bar, gear sheet, in-page dialogs.
   Look: the ANSI Z535 sign every crew already reads. Orange = the brand and caution. Blue = tap this.
   Green = done. Red = stop. Monospace is for data only. ASCII only. */
@font-face { font-family: 'PJ Display'; src: url(/fonts/pj-display.woff2) format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'PJ Wide'; src: url(/fonts/pj-wide.woff2) format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'PJ Text'; src: url(/fonts/pj-text.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'PJ Data'; src: url(/fonts/pj-data.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light;
  --pj-ink: #16181b;
  --pj-ink2: #2b3036;
  --pj-muted: #5c626b;
  --pj-line: #dedbd3;
  --pj-edge: #8d9299;
  --pj-bg: #f3f2ee;
  --pj-card: #ffffff;
  --pj-orange: #f26a1b;
  --pj-orange-d: #b04a0a;
  --pj-act: #1d5fc4;
  --pj-act-d: #164a99;
  --pj-ok: #1e7b34;
  --pj-ok-l: #e1f1e4;
  --pj-stop: #c62828;
  --pj-caution: #f5c518;
  --pj-caution-l: #fff6cf;
  --pj-disp: 'PJ Display', 'Arial Narrow', sans-serif;
  --pj-wide: 'PJ Wide', 'Arial Black', sans-serif;
  --pj-text: 'PJ Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pj-data: 'PJ Data', ui-monospace, Menlo, monospace;
  --pj-r: 10px;
}
html { background: var(--pj-bg); }

/* ---- top bar (same on every page) ---- */
.pj-top { position: sticky; top: 0; z-index: 50; background: var(--pj-ink); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 4px solid var(--pj-orange); }
.pj-top .pj-home { display: flex; align-items: center; text-decoration: none; min-height: 44px; }
.pj-top .pj-home img { height: 34px; width: auto; display: block; }
.pj-top .pj-sp { flex: 1; }
.pj-top a { white-space: nowrap; }
@media (max-width: 400px) { .pj-top .pj-home img { height: 28px; } .pj-top .pj-link, .pj-top .pj-btn { padding: 8px 10px; font-size: 14px; } }
.pj-top .pj-link { color: #fff; text-decoration: none; font: 600 15px var(--pj-text); padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
.pj-top .pj-link:hover { background: rgba(255,255,255,.1); }
.pj-top .pj-btn { background: var(--pj-act); color: #fff; text-decoration: none; font: 700 15px var(--pj-text); padding: 10px 14px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; border: 0; }
@media (max-width: 420px) { .pj-top .pj-hide-sm { display: none; } }

/* ---- the gear: same gear, same spot, every page ---- */
.pj-gear { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: 0 0 auto; }
.pj-gear svg { width: 24px; height: 24px; fill: currentColor; }
.pj-gear:focus-visible, .pj-sheet button:focus-visible, .pj-dlg button:focus-visible { outline: 3px solid var(--pj-caution); outline-offset: 2px; }

.pj-veil { position: fixed; inset: 0; background: rgba(10,12,14,.55); z-index: 900; display: none; }
.pj-veil.on { display: block; }
.pj-sheet { position: fixed; z-index: 901; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; background: var(--pj-card); color: var(--pj-ink); border-radius: 16px 16px 0 0; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .22s ease; font: 16px/1.5 var(--pj-text); max-width: 640px; margin: 0 auto; box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
.pj-sheet.on { transform: none; }
.pj-sheet__head { position: sticky; top: 0; background: var(--pj-card); display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; border-bottom: 1px solid var(--pj-line); margin-bottom: 6px; }
.pj-sheet__head h2 { flex: 1; margin: 0; font: 800 22px var(--pj-disp); letter-spacing: .01em; }
.pj-sheet__head button { min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--pj-line); background: #fff; font: 700 15px var(--pj-text); cursor: pointer; }
.pj-tabs { display: flex; gap: 6px; margin: 8px 0 12px; }
.pj-tabs button { flex: 1; min-height: 44px; border: 1px solid var(--pj-line); background: var(--pj-bg); border-radius: 8px; font: 600 15px var(--pj-text); color: var(--pj-ink); cursor: pointer; }
.pj-tabs button.on { background: var(--pj-ink); color: #fff; border-color: var(--pj-ink); }
.pj-pane { display: none; }
.pj-pane.on { display: block; }
.pj-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pj-line); }
.pj-row b { display: block; font-weight: 600; }
.pj-row span { display: block; font-size: 14px; color: var(--pj-muted); }
.pj-row > div { flex: 1; }
.pj-switch { position: relative; width: 56px; height: 32px; border-radius: 16px; border: 0; background: #c9c6be; cursor: pointer; flex: 0 0 auto; transition: background .15s; }
.pj-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: left .15s; }
.pj-switch[aria-checked="true"] { background: var(--pj-ok); }
.pj-switch[aria-checked="true"]::after { left: 27px; }
.pj-sheet h3 { font: 800 17px var(--pj-disp); margin: 18px 0 6px; letter-spacing: .01em; }
.pj-sheet ol, .pj-sheet ul { padding-left: 20px; margin: 6px 0; }
.pj-sheet li { margin: 5px 0; }
.pj-sheet a { color: var(--pj-act); font-weight: 600; }
.pj-sheet .pj-fine { font-size: 13px; color: var(--pj-muted); margin-top: 14px; }
.pj-sheet .pj-wide-btn { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 8px 0; border-radius: 8px; background: var(--pj-act); color: #fff !important; text-decoration: none; font: 700 16px var(--pj-text); }
.pj-sheet .pj-wide-btn.ghost { background: #fff; color: var(--pj-ink) !important; border: 2px solid var(--pj-ink); }
.pj-ver { font: 600 12px var(--pj-data); color: var(--pj-muted); }

/* ---- in-page dialogs (no native alert / confirm / prompt) ---- */
.pj-dlg { position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 440px); background: var(--pj-card); color: var(--pj-ink); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; font: 17px/1.45 var(--pj-text); }
.pj-dlg__band { height: 8px; background: var(--pj-orange); }
.pj-dlg__body { padding: 18px 18px 6px; white-space: pre-line; }
.pj-dlg input { width: 100%; box-sizing: border-box; margin-top: 12px; font: 18px var(--pj-text); padding: 12px; border: 2px solid var(--pj-edge); border-radius: 8px; }
.pj-dlg__go { display: flex; gap: 10px; padding: 14px 18px 18px; }
.pj-dlg__go button { flex: 1; min-height: 50px; border-radius: 8px; font: 700 17px var(--pj-text); cursor: pointer; border: 2px solid var(--pj-ink); background: #fff; color: var(--pj-ink); }
.pj-dlg__go button.yes { background: var(--pj-act); border-color: var(--pj-act); color: #fff; }
.pj-dlg-veil { position: fixed; inset: 0; background: rgba(10,12,14,.55); z-index: 1000; }

/* Motion off: nothing slides or fades */
html.pj-still *, html.pj-still *::before, html.pj-still *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { .pj-sheet { transition: none; } }
@media print { .pj-top, .pj-gear, .pj-sheet, .pj-veil { display: none !important; } }
