/* ════════════════════════════════════════════════════════════════════════
   PlatAtlas FieldOps — field tablet stylesheet
   A vanilla recreation of the "Plat Atlas survey office" design (claude.ai/design
   handoff). Composes the Plat Atlas design tokens, the design-system component
   CSS (button / badge / card / callout / cartouche / statcard / avatar /
   wordmark), and the FieldOps app shell + view styles into one file.

   Source of truth: the design bundle's _ds/tokens/*.css, _ds/_ds_bundle.js
   component CSS, and app/app.css. Recreated here pixel-faithfully, self-hosted
   so the site stays CSP-clean (script-src 'self') and build-step-free.
   ════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════ TOKENS · color (light "Drafting Paper") ═════════ */
:root {
  /* base · paper */
  --paper:#ede4ce; --paper-2:#e5dabe; --paper-3:#d8c9a3; --paper-deep:#b9a677;
  /* base · ink */
  --ink:#1a1611; --ink-2:#4a4239; --ink-faint:#8a7f6c;
  /* base · rules */
  --rule:#c8ba96; --rule-soft:#d9cba8; --rule-deep:#ab986a;
  /* base · Highway Red accent */
  --highway:#b14a3a; --highway-deep:#8c3a2c; --highway-soft:#c96a55;
  --highway-tint:rgba(177,74,58,0.10); --highway-glow:rgba(177,74,58,0.00);
  /* base · legend swatches (map symbology + semantic states) */
  --water:#4a6688; --sage:#5a6e4a; --brass:#8b6a3a; --mustard:#b98a2e; --emerg:#6a5a7e;
  /* semantic · surfaces */
  --bg:var(--paper); --bg-elev:#f5eedb; --bg-sunk:#e3d7b9;
  --surface-panel:#f7f1e1; --surface-rail:#e7ddc3; --surface-card:var(--surface-panel);
  /* semantic · text */
  --text-strong:var(--ink); --text-body:var(--ink-2); --text-muted:var(--ink-faint);
  --text-on-accent:#f4ecd8;
  /* semantic · lines + accent */
  --border:var(--rule); --border-soft:var(--rule-soft); --border-strong:var(--rule-deep);
  --accent:var(--highway); --accent-deep:var(--highway-deep); --accent-soft:var(--highway-soft);
  --accent-tint:var(--highway-tint); --accent-glow:var(--highway-glow); --on-accent:var(--text-on-accent);
  /* semantic · states */
  --state-ok:var(--sage); --state-run:var(--mustard); --state-wait:var(--ink-faint);
  --state-err:var(--highway); --state-info:var(--water);
  --grain:rgba(26,22,17,0.014);

  /* ── typography ── */
  --font-serif:"Spectral","Iowan Old Style",Georgia,serif;
  --font-sans:"Archivo","Helvetica Neue",system-ui,sans-serif;
  --font-mono:"IBM Plex Mono","SF Mono",ui-monospace,Menlo,monospace;
  --ls-display:-0.025em; --ls-tight:-0.01em; --ls-label:0.16em; --ls-plate:0.20em;
  --fw-regular:400; --fw-medium:500; --fw-semibold:600; --fw-bold:700;

  /* ── spacing / radii / shadow / motion ── */
  --radius-print:1px; --radius-xs:5px; --radius-sm:7px; --radius-md:9px;
  --radius-lg:11px; --radius-xl:14px; --radius-pill:999px;
  --shadow-sm:0 1px 0 var(--rule-soft);
  --shadow:0 24px 50px -36px rgba(60,40,14,0.45), 0 2px 6px -3px rgba(60,40,14,0.25);
  --shadow-lg:0 40px 80px -40px rgba(60,40,14,0.55), 0 6px 18px -8px rgba(60,40,14,0.30);
  --focus-ring:0 0 0 3px var(--accent-tint);
  --ease-out:cubic-bezier(0.2,0.7,0.2,1); --ease-std:ease;
  --dur-fast:140ms; --dur-base:200ms; --dur-slow:400ms;
}

/* ════ dark · "Ink & Ember" (explicit [data-theme=dark] wins) ════ */
:root[data-theme="dark"] {
  --paper:#14110c; --paper-2:#1d1811; --paper-3:#221c14; --paper-deep:#4a3f2c;
  --ink:#ece3cc; --ink-2:#b9ab8d; --ink-faint:#837754;
  --rule:#352d20; --rule-soft:#2a2318; --rule-deep:#4a3f2c;
  --highway:#d9744f; --highway-deep:#b8543a; --highway-soft:#e08a66;
  --highway-tint:rgba(217,116,79,0.14); --highway-glow:rgba(217,116,79,0.18);
  --water:#6f8db0; --sage:#93a56e; --brass:#c79a5a; --mustard:#d6a847; --emerg:#9d89b6;
  --bg-elev:#1d1811; --bg-sunk:#0e0b08; --surface-panel:#221c14; --surface-rail:#181309;
  --text-on-accent:#1a1208; --grain:rgba(255,244,220,0.018);
  --shadow-sm:0 1px 0 rgba(0,0,0,.4);
  --shadow:0 30px 60px -34px rgba(0,0,0,.8), 0 2px 8px -3px rgba(0,0,0,.6);
  --shadow-lg:0 40px 80px -34px rgba(0,0,0,.85), 0 6px 18px -8px rgba(0,0,0,.7);
}

/* ══════════════════════ BASE ══════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* match the design's global rendering hints (DS base.css) so Spectral/Archivo
   kern + ligate and antialias the same way the cascade into .screen expects */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "kern" 1, "liga" 1; }
::selection { background: var(--accent-tint); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* family utilities */
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }
.sans { font-family: var(--font-sans); }
.italic { font-style: italic; }
.swash { font-style: italic; font-weight: var(--fw-medium); color: var(--accent-deep); }

/* mono small-caps survey label */
.sc {
  display: inline-block; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: var(--ls-label); font-size: 10.5px; font-weight: var(--fw-medium);
  color: var(--ink-faint);
}

/* dash-dot cartographer's rule + crop-marks */
.dashdot { position: relative; height: 1px; border: 0; background: transparent; border-top: 1px dashed var(--rule-deep); opacity: .9; }
.dashdot::after { content: ''; position: absolute; inset: 0; border-top: 1px dotted var(--rule-deep); transform: translateY(2px); opacity: .55; }
.cropmark { position: relative; }
.cropmark::before, .cropmark::after { content: ''; position: absolute; width: 9px; height: 9px; pointer-events: none; opacity: .5; border: 1.5px solid var(--ink-faint); }
.cropmark::before { top: 7px; left: 7px; border-right: 0; border-bottom: 0; }
.cropmark::after { bottom: 7px; right: 7px; border-left: 0; border-top: 0; }

/* ══════════════════════ DS COMPONENTS ══════════════════════ */
/* Avatar */
.pa-avatar { display:inline-grid; place-items:center; border-radius:50%; color:#fff; font-family:var(--font-sans); font-weight:600; flex:none; overflow:hidden; }
.pa-avatar img { width:100%; height:100%; object-fit:cover; }
.pa-avatar--sq { border-radius:var(--radius-xs); }

/* Badge */
.pa-badge { display:inline-flex; align-items:center; gap:5px; font-family:var(--font-mono); font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; font-weight:600; padding:3px 8px; border-radius:var(--radius-xs); white-space:nowrap; }
.pa-badge--dot::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.pa-badge--ok { color:var(--sage); background:color-mix(in srgb, var(--sage) 15%, transparent); }
.pa-badge--run { color:var(--mustard); background:color-mix(in srgb, var(--mustard) 16%, transparent); }
.pa-badge--wait { color:var(--ink-faint); background:color-mix(in srgb, var(--ink-faint) 14%, transparent); }
.pa-badge--err { color:var(--accent); background:var(--accent-tint); }
.pa-badge--info { color:var(--water); background:color-mix(in srgb, var(--water) 14%, transparent); }
.pa-badge--accent { color:var(--accent-deep); background:var(--accent-tint); }
.pa-badge--neutral { color:var(--ink-2); background:transparent; border:1px solid var(--rule); }

/* Button */
.pa-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--font-sans); font-weight:600; font-size:13px; line-height:1; padding:9px 15px; border-radius:var(--radius-sm); border:1px solid var(--rule-deep); background:var(--bg-elev); color:var(--ink); cursor:pointer; white-space:nowrap; transition:background var(--dur-fast) var(--ease-std), border-color var(--dur-fast) var(--ease-std), color var(--dur-fast) var(--ease-std); text-decoration:none; }
.pa-btn:hover { border-color:var(--ink-faint); background:var(--surface-panel); }
.pa-btn:focus-visible { outline:none; box-shadow:var(--focus-ring); }
.pa-btn .pa-btn-ic { width:15px; height:15px; display:inline-flex; }
.pa-btn .pa-btn-ic svg { width:100%; height:100%; }
.pa-btn--primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.pa-btn--primary:hover { background:var(--accent-deep); border-color:var(--accent-deep); }
.pa-btn--ghost { background:transparent; border-color:transparent; color:var(--ink-2); }
.pa-btn--ghost:hover { background:var(--bg-elev); color:var(--ink); border-color:var(--rule); }
.pa-btn--danger { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.pa-btn--danger:hover { background:var(--accent-deep); border-color:var(--accent-deep); }
.pa-btn--sm { padding:6px 11px; font-size:12px; }
.pa-btn--lg { padding:12px 22px; font-size:14.5px; border-radius:var(--radius-md); }
.pa-btn[aria-disabled="true"], .pa-btn:disabled { opacity:.45; cursor:not-allowed; pointer-events:none; }

/* Wordmark + Mark */
.pa-wordmark { display:inline-flex; align-items:center; gap:10px; color:var(--ink); }
.pa-wordmark .pa-wm-text { font-family:var(--font-serif); font-weight:600; letter-spacing:-0.01em; line-height:1; }
.pa-wordmark .pa-wm-text em { font-style:italic; font-weight:500; color:var(--accent-deep); }

/* Callout */
.pa-callout { display:grid; grid-template-columns:auto 1fr; gap:14px; padding:16px 18px; border-radius:var(--radius-md); background:var(--bg-elev); border:1px solid var(--rule); border-left:3px solid var(--accent); }
.pa-callout .pa-co-ic { width:18px; height:18px; color:var(--accent); margin-top:1px; }
.pa-callout .pa-co-ic svg { width:100%; height:100%; }
.pa-callout h4 { margin:0 0 3px; font-family:var(--font-sans); font-size:13.5px; font-weight:700; color:var(--ink); }
.pa-callout p { margin:0; font-family:var(--font-sans); font-size:12.5px; color:var(--ink-2); line-height:1.55; }
.pa-callout code { font-family:var(--font-mono); font-size:11.5px; background:var(--bg-sunk); padding:1px 5px; border-radius:4px; }
.pa-callout--info { border-left-color:var(--water); } .pa-callout--info .pa-co-ic { color:var(--water); }
.pa-callout--ok { border-left-color:var(--sage); } .pa-callout--ok .pa-co-ic { color:var(--sage); }
.pa-callout--warn { border-left-color:var(--mustard); } .pa-callout--warn .pa-co-ic { color:var(--mustard); }

/* Card */
.pa-card { background:var(--surface-panel); border:1px solid var(--rule); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); overflow:hidden; }
.pa-card-head { display:flex; align-items:center; gap:12px; padding:15px 18px; border-bottom:1px solid var(--rule); }
.pa-card-head h3 { margin:0; font-family:var(--font-serif); font-size:17px; font-weight:600; letter-spacing:-.01em; color:var(--ink); }
.pa-card-head .pa-card-aside { margin-left:auto; font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.16em; color:var(--ink-faint); }
.pa-card-body { padding:18px; }
.pa-card-body.flush { padding:0; }

/* Cartouche */
.pa-cartouche { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; border-bottom:1px solid var(--rule-deep); padding-bottom:12px; }
.pa-cartouche .pa-ct-plate { font-family:var(--font-mono); font-size:10px; letter-spacing:.2em; text-transform:uppercase; color:var(--ink-faint); }
.pa-cartouche .pa-ct-title { font-family:var(--font-serif); font-style:italic; font-weight:500; font-size:23px; margin:4px 0 0; color:var(--ink); line-height:1.1; }
.pa-cartouche .pa-ct-title b { font-style:normal; font-weight:600; }
.pa-cartouche .pa-ct-meta { text-align:right; font-family:var(--font-mono); font-size:9.5px; color:var(--ink-faint); letter-spacing:.08em; line-height:1.7; text-transform:uppercase; white-space:nowrap; }

/* StatCard */
.pa-stat { position:relative; background:var(--surface-panel); border:1px solid var(--rule); border-radius:var(--radius-lg); padding:18px 18px 16px; box-shadow:var(--shadow-sm); overflow:hidden; }
.pa-stat .pa-stat-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.pa-stat .pa-stat-label { font-family:var(--font-mono); font-size:10px; text-transform:uppercase; letter-spacing:.16em; color:var(--ink-faint); }
.pa-stat .pa-stat-value { font-family:var(--font-serif); font-weight:600; font-size:30px; letter-spacing:-.02em; line-height:1; color:var(--ink); }
.pa-stat .pa-stat-sub { font-family:var(--font-mono); font-size:11.5px; color:var(--ink-faint); margin-top:5px; }

/* ════════════════════════════════════════════════════════════════════════
   APP SHELL — the field tablet: masthead → manila folder tabs → paper sheet
   ════════════════════════════════════════════════════════════════════════ */
.stage {
  position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden;
  background-color: #1d1810;
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgba(177,74,58,0.10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,244,220,0.020) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(255,244,220,0.020) 0 1px, transparent 1px 46px);
}
/* narrow-screen fallback: align the tablet to the top and let the stage scroll/pan (the tablet is
   width-fit at a legibility floor by fit() in main.mjs, so phones get a usable, scrollable view). */
.fo-compact .stage { place-items: start center; overflow: auto; padding: 8px 0 20px; }
.tablet { transform-origin: center center; }
.tablet.framed {
  padding: 34px 40px; border-radius: 44px; position: relative;
  background: linear-gradient(158deg, #322a1d 0%, #211a10 70%, #181307 100%);
  box-shadow: 0 50px 130px -30px rgba(0,0,0,0.75),
              inset 0 0 0 1px rgba(255,255,255,0.05),
              inset 0 3px 4px rgba(255,255,255,0.06),
              inset 0 -4px 10px rgba(0,0,0,0.5);
}
.tablet-cam {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #0b0905;
  box-shadow: inset 0 0 2px rgba(255,255,255,0.25), 0 0 0 2px rgba(0,0,0,0.4);
}
.screen {
  width: 1194px; height: 834px; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, var(--grain) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--grain) 0 1px, transparent 1px 4px);
  color: var(--text-body); font-family: var(--font-sans);
}
.tablet.framed .screen { border-radius: 16px; box-shadow: 0 0 0 2px rgba(0,0,0,0.45); }

/* ── masthead ── */
.mast { flex: none; height: 52px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rule); background: var(--surface-rail); }
.mast-brand { display: flex; align-items: center; gap: 12px; }
.mast-sep { width: 1px; height: 18px; background: var(--rule-deep); }
.mast-app { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.mast-crumb { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.mast-right { display: flex; align-items: center; gap: 12px; }
.mast-env { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.mast-env-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.mast-key { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: var(--radius-pill); }
.mast-ic { background: none; border: none; color: var(--ink-faint); cursor: pointer; padding: 5px; border-radius: 6px; display: inline-flex; }
.mast-ic:hover { color: var(--ink); background: var(--bg-elev); }
.mast-ic:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mast-av { width: 28px; height: 28px; border-radius: var(--radius-xs); background: var(--accent); color: var(--on-accent); font-family: var(--font-sans); font-weight: 700; font-size: 11px; display: grid; place-items: center; }

/* ── folder-tab rail ── */
.tabs { flex: none; display: flex; align-items: flex-end; gap: 5px; padding: 7px 18px 0; background: var(--surface-rail); position: relative; z-index: 2; margin-bottom: -1px; }
.tab { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; padding: 8px 16px 10px; border: 1px solid var(--rule); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--paper-3); transition: background var(--dur-fast), transform var(--dur-fast); }
.tab:hover:not(.active) { background: var(--paper-2); }
.tab:focus-visible { outline: none; box-shadow: var(--focus-ring); z-index: 4; }
.tab.active { background: var(--bg); border-color: var(--rule-deep); z-index: 3; }
.tab.active::before { content: ''; position: absolute; top: -1px; left: 9px; right: 9px; height: 3px; border-radius: 0 0 2px 2px; background: var(--accent); }
.tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--bg); }
.tab-ic { display: inline-flex; color: var(--ink-faint); }
.tab.active .tab-ic { color: var(--accent); }
.tab-lbl { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tab.active .tab-lbl { color: var(--ink); }
.tab-flag { position: absolute; top: 5px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tabs-fill { flex: 1; }

/* ── the sheet ── */
.sheet { flex: 1; min-height: 0; border-top: 1px solid var(--rule-deep); background: var(--bg); position: relative; z-index: 1; }
.sheet-body { height: 100%; overflow: auto; padding: 22px 24px; }
.sheet-body.enter { animation: fo-rise 0.4s var(--ease-out); }

/* ════════════════════════ TODAY ════════════════════════ */
.t-grid { display: grid; grid-template-columns: 444px 1fr; gap: 24px; height: 100%; min-height: 0; }
.t-decision { overflow: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 16px; }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-title { font-family: var(--font-serif); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 3px 0 4px; line-height: 1.04; }
.t-sub { font-size: 12.5px; color: var(--ink-faint); }
.t-summary { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.t-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.t-fact { display: flex; gap: 9px; padding: 11px; border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); }
.t-fact-ic { color: var(--accent); flex: none; margin-top: 1px; display: inline-flex; }
.t-fact-lbl { margin-bottom: 3px; }
.t-fact-val { font-family: var(--font-sans); font-weight: 700; font-size: 13.5px; color: var(--ink); line-height: 1.15; }
.t-fact-sub { font-size: 10.5px; color: var(--ink-faint); margin-top: 2px; line-height: 1.3; }
.t-figures { display: flex; align-items: center; gap: 22px; padding: 15px 18px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface-panel); }
.t-fig-n { font-family: var(--font-serif); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent-deep); line-height: 1; }
.t-fig-u { font-size: 14px; color: var(--ink-faint); font-weight: 500; }
.t-fig .sc { margin-top: 4px; }
.t-fig-note { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-faint); margin-top: 4px; letter-spacing: 0.04em; }
.t-fig-div { width: 1px; align-self: stretch; background: var(--rule); }
.t-grounding-h { margin-bottom: 4px; }
.t-ground-row { display: flex; gap: 8px; font-size: 12px; color: var(--ink-2); padding: 4px 0; line-height: 1.4; }
.t-ground-ic { color: var(--water); flex: none; margin-top: 1px; display: inline-flex; }
.t-decide { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }
.t-verbs { display: flex; flex-wrap: wrap; gap: 8px; }
.t-verb-approve { flex: 1 1 100%; justify-content: center; }
.t-verb { flex: 1 1 auto; }
.t-mods { display: flex; gap: 12px; }
.t-mod-chip { font-family: var(--font-mono); font-size: 10px; color: var(--sage); display: inline-flex; gap: 4px; align-items: center; }
.t-running { display: flex; gap: 13px; align-items: center; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface-panel); }
.t-running-spin { flex: none; width: 18px; height: 18px; border: 2px solid var(--accent-tint); border-top-color: var(--accent); border-radius: 50%; animation: fo-spin 0.8s linear infinite; }
.t-running-lbl { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.t-running-det { font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }

.t-live { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 0; }
.t-map-wrap { flex: none; border: 1px solid var(--rule-deep); border-radius: var(--radius-md); overflow: hidden; background: #ede4ce; box-shadow: var(--shadow-sm); }
.t-map-cartouche { display: flex; justify-content: space-between; padding: 8px 13px; border-bottom: 1px solid #cabd98; background: #e5dabe; }
.t-map-cartouche .sc { color: #8a7f6c; }
.t-map-inner { height: 270px; }
.t-traverse { display: flex; align-items: flex-start; padding: 2px 4px; }
.t-tv-node { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.t-tv-dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rule-deep); display: grid; place-items: center; background: var(--bg); color: var(--ink-faint); transition: all var(--dur-base) var(--ease-out); }
.t-tv-num { font-family: var(--font-mono); font-size: 10px; font-weight: 600; }
.t-tv-node.done .t-tv-dot { background: var(--sage); border-color: var(--sage); color: #fff; }
.t-tv-node.active .t-tv-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.t-tv-lbl { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); text-align: center; width: 58px; line-height: 1.2; }
.t-tv-node.active .t-tv-lbl { color: var(--accent-deep); font-weight: 600; }
.t-tv-link { flex: 1; height: 2px; background: var(--rule); margin: 10px 1px 0; border-radius: 1px; transition: background var(--dur-base); }
.t-tv-link.walked { background: var(--accent); }
.t-phase-line { font-size: 12px; color: var(--ink-2); line-height: 1.45; padding: 9px 13px; background: var(--surface-panel); border: 1px solid var(--rule); border-radius: var(--radius-sm); border-left: 3px solid var(--accent); }
.t-phase-line b { color: var(--ink); }
.t-evidence { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.t-evid, .t-evid-gauge { border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); padding: 8px; }
.t-evid-img { width: 100%; height: 92px; object-fit: cover; border-radius: 7px; display: block; background: #0b1220; }
.t-evid-locked { opacity: 0.5; }
.t-evid-cap { margin-top: 6px; }
.t-evid-cap b { display: block; font-size: 11px; color: var(--ink); }
.t-evid-cap span { font-size: 10px; color: var(--ink-faint); }
.t-evid-gauge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.t-gauge { display: flex; flex-direction: column; align-items: center; }
.t-gauge-rd { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); }

/* ════════════════════════ MAP ════════════════════════ */
.m-grid { display: grid; grid-template-columns: 1fr 288px; gap: 20px; height: 100%; min-height: 0; }
.m-sheet { display: flex; flex-direction: column; border: 1px solid var(--rule-deep); border-radius: var(--radius-sm); overflow: hidden; background: #ede4ce; box-shadow: var(--shadow); min-height: 0; }
.m-sheet-cart { padding: 15px 18px 0; background: #ede4ce; }
.m-sheet-cart .pa-cartouche { border-color: #b9a677; }
.m-sheet-cart .pa-ct-plate, .m-sheet-cart .pa-ct-meta { color: #8a7f6c; }
.m-sheet-cart .pa-ct-title { color: #1a1611; }
.m-sheet-map { flex: 1; min-height: 0; padding: 6px; display: flex; }
.m-side { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.m-legend { display: flex; flex-direction: column; gap: 10px; }
.m-legend-row { display: flex; align-items: center; gap: 11px; font-size: 12px; color: var(--ink-2); }
.m-legend-sw { width: 20px; display: inline-flex; justify-content: center; align-items: center; flex: none; }
.m-sw-ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; }
.m-sw-dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid currentColor; }
.m-sw-line { width: 20px; border-top: 2px solid currentColor; }
.m-sw-line.dash { border-top-style: dashed; }
.m-sw-line.dashdot { border-top-style: dotted; border-top-width: 2.5px; }
.m-sw-hatch { width: 16px; height: 12px; background: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 4px); opacity: 0.55; }
.m-mission { display: flex; flex-direction: column; gap: 11px; }
.m-mission-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink); }
.m-mission-row b { font-weight: 600; }

/* ════════════════════════ FLEET ════════════════════════ */
.f-wrap { display: flex; flex-direction: column; gap: 18px; }
.f-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.f-title { font-family: var(--font-serif); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 3px; color: var(--ink); }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f-card { border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface-panel); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
.f-card-sim { background: var(--bg-sunk); }
.f-card-head { display: flex; align-items: center; gap: 12px; }
.f-card-id { flex: 1; }
.f-card-name { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.f-rrn { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--ink-faint); margin-top: 1px; }
.f-hw { font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.f-hw .sc, .f-meta .sc, .f-caps-h { margin-bottom: 3px; }
.f-meta { display: flex; gap: 24px; font-size: 12px; color: var(--ink); }
.f-meta span { display: flex; flex-direction: column; }
.f-caps { border-top: 1px solid var(--rule); padding-top: 11px; display: flex; flex-direction: column; gap: 9px; }
.f-cap { display: flex; gap: 10px; align-items: center; }
.f-cap-ic { color: var(--accent); flex: none; display: inline-flex; }
.f-cap-body { flex: 1; }
.f-cap-name { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.f-cap-desc { font-size: 11px; color: var(--ink-faint); margin-top: 1px; }
.f-cap-gate { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.f-cap-gate.gated { color: var(--accent-deep); background: var(--accent-tint); }
.f-cap-gate.open { color: var(--water); background: color-mix(in srgb, var(--water) 12%, transparent); }
.f-sim-note { font-size: 11px; color: var(--ink-faint); font-style: italic; line-height: 1.4; }

/* ════════════════════════ AUDIT ════════════════════════ */
.a-wrap { display: flex; flex-direction: column; gap: 18px; max-width: 780px; }
.a-chain { display: flex; flex-direction: column; }
.a-entry { display: flex; gap: 15px; }
.a-spine { display: flex; flex-direction: column; align-items: center; flex: none; }
.a-node { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--rule-deep); display: grid; place-items: center; background: var(--surface-panel); color: var(--ink-2); transition: all var(--dur-base); }
.a-entry.refuse .a-node { border-color: var(--accent); color: var(--accent); }
.a-entry.ok .a-node { border-color: var(--sage); color: var(--sage); }
.a-link { width: 2px; flex: 1; min-height: 16px; background: var(--rule); margin: 3px 0; }
.a-entry.ok .a-link { background: var(--sage); }
.a-body { padding-bottom: 18px; flex: 1; }
.a-row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.a-action { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--ink); }
.a-ts { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.a-detail { font-size: 12.5px; color: var(--ink-2); margin: 3px 0 7px; line-height: 1.45; }
.a-meta { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.a-actor, .a-hash { font-size: 11px; color: var(--ink-faint); display: inline-flex; gap: 5px; align-items: center; }
.a-actor .sc, .a-hash .sc { color: var(--ink-faint); }
.a-hash code { font-family: var(--font-mono); color: var(--ink-2); }
.a-ok { font-family: var(--font-mono); font-size: 10px; color: var(--sage); display: inline-flex; gap: 3px; align-items: center; }

/* ════════════════════════ HOW IT WORKS ════════════════════════ */
.h-wrap { display: flex; flex-direction: column; gap: 28px; max-width: 940px; margin: 0 auto; }
.h-lede { font-family: var(--font-serif); font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 16px 0 0; max-width: 760px; }
.h-sec { display: flex; flex-direction: column; gap: 14px; }
.h-sec-h { color: var(--ink-faint); }
.h-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.h-chain-node { display: flex; align-items: center; gap: 8px; padding: 11px 15px; border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink); }
.h-chain-ic { color: var(--accent); display: inline-flex; }
.h-chain-arrow { color: var(--ink-faint); display: inline-flex; }
.h-note { font-size: 12px; color: var(--ink-faint); line-height: 1.5; margin: 0; }
.h-twolevel { border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface-panel); padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.h-tl-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; }
.h-tl-label { display: flex; flex-direction: column; gap: 3px; }
.h-tl-num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--ink-faint); }
.h-tl-label b { font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.h-tl-label span:last-child { font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; }
.h-tl-phases { display: flex; align-items: stretch; gap: 6px; }
.h-tl-phase { flex: 1; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 11px; background: var(--bg); }
.h-tl-phase.spine { border-color: var(--accent); background: var(--accent-tint); border-width: 1.5px; }
.h-tl-pk { font-family: var(--font-sans); font-size: 12px; font-weight: 700; color: var(--ink); }
.h-tl-phase.spine .h-tl-pk { color: var(--accent-deep); }
.h-tl-pd { font-size: 10.5px; color: var(--ink-faint); margin-top: 3px; line-height: 1.3; }
.h-tl-arrow { display: flex; align-items: center; color: var(--ink-faint); }
.h-tl-spineline { text-align: center; padding-top: 12px; border-top: 1px dashed var(--rule); }
.h-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.h-trust-card { border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius-md); background: var(--surface-panel); padding: 16px; }
.h-trust-ic { color: var(--accent); display: inline-flex; margin-bottom: 8px; }
.h-trust-card b { display: block; font-family: var(--font-sans); font-size: 14px; color: var(--ink); margin-bottom: 5px; }
.h-trust-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.h-built { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.h-built-item { border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); padding: 14px; }
.h-built-item b { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink); margin-bottom: 5px; }
.h-built-item span { font-size: 11.5px; color: var(--ink-faint); line-height: 1.45; }

/* ════════════════════════ REPORT (Ecosystem / Managed Agents editions) ═══ */
.r-wrap { max-width: 940px; }
.r-hero { gap: 14px; }
.r-sec { gap: 10px; }
.r-h2 { font-family: var(--font-serif); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0; line-height: 1.1; }
.r-p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.r-muted { color: var(--ink-faint); font-size: 12.5px; }
.r-ul, .r-ol { margin: 2px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.r-ul li, .r-ol li { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
/* verdict: the short honest headline reads first; full verdict is a read-more */
.r-verdict { display: flex; flex-direction: column; gap: 8px; }
.r-verdict-lead { margin: 0; font-family: var(--font-serif); font-size: 15.5px; line-height: 1.55; font-weight: 500; color: var(--ink); }
.r-verdict-more > summary { cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); list-style: none; padding: 2px 0; }
.r-verdict-more > summary::-webkit-details-marker { display: none; }
.r-verdict-more > summary::before { content: '▸ '; }
.r-verdict-more[open] > summary::before { content: '▾ '; }
.r-verdict-full { margin: 8px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.r-ul li::marker { color: var(--accent); }
.r-ol li::marker { font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); }

/* key/value plate */
.r-kv { border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); overflow: hidden; }
.r-kv-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.r-kv-row:last-child { border-bottom: none; }
.r-kv-k { color: var(--ink-faint); align-self: start; padding-top: 1px; }
.r-kv-v { font-size: 12.5px; color: var(--ink); line-height: 1.5; font-family: var(--font-sans); }
.r-kv-v code, .r-p code, .r-ul code { font-family: var(--font-mono); font-size: 11.5px; background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; }

/* code block */
.r-code { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: var(--ink-2); background: var(--bg-sunk); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 0; }

/* gaps register */
.r-gaps { display: flex; flex-direction: column; gap: 10px; }
.r-gap { border: 1px solid var(--rule); border-left: 3px solid var(--mustard); border-radius: var(--radius-md); background: var(--surface-panel); padding: 12px 14px; }
.r-gap--warn { border-left-color: var(--mustard); }
.r-gap--info { border-left-color: var(--water); }
.r-gap--ok { border-left-color: var(--sage); }
.r-gap-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.r-gap-sev { color: var(--mustard); font-size: 9px; }
.r-gap--info .r-gap-sev { color: var(--water); }
.r-gap--ok .r-gap-sev { color: var(--sage); }
.r-gap-title { font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--ink); }
.r-gap-text { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }

/* report figures — layer stack + gate ledger (inline SVG, scale within the 940px column) */
.r-stack, .r-ledger { margin: 4px 0 0; }
.r-stack-svg, .r-ledger-svg { display: block; width: 100%; height: auto; }
.r-stack-name { font: 700 15px var(--font-sans); }
.r-stack-sub { font: 11px var(--font-mono); }
.r-stack-tag { font: 9px var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; }
.r-led-coord { font: 11px var(--font-mono); }
.r-led-who { font: 700 12px var(--font-sans); }
.r-led-act { font: 11px var(--font-mono); }
.r-led-hash { font: 10px var(--font-mono); }
.r-led-genesis { font: 9px var(--font-mono); }
.r-fig-cap { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 9px; letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--ink-faint); }
.r-fig-legend { text-transform: none; letter-spacing: 0; }

/* live conformance proof panel — a ledger of checks fetched from the committed proof artifacts.
   Tokens flip with [data-theme=dark] so this is dark-mode safe with no extra rules. */
.r-proof { border: 1px solid var(--rule); border-radius: var(--radius-md); background: var(--surface-panel); overflow: hidden; }
.r-proof-load { padding: 14px; color: var(--ink-faint); }
.r-proof-ledger { display: flex; flex-direction: column; }
.r-proof-row { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.r-proof-row:last-child { border-bottom: none; }
.r-proof-lamp { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px; }
.r-proof-lamp.is-ok { color: var(--sage); background: color-mix(in srgb, var(--sage) 16%, transparent); }
.r-proof-lamp.is-bad { color: var(--accent); background: var(--accent-tint); }
.r-proof-rowtext { display: flex; flex-direction: column; gap: 2px; }
.r-proof-label { font-size: 13px; color: var(--ink); font-weight: 600; }
.r-proof-detail { font-size: 11.5px; color: var(--ink-faint); line-height: 1.45; }
.r-proof-model { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--rule); background: var(--bg-sunk); }
.r-proof-mhead { width: 100%; color: var(--ink-faint); margin-bottom: 2px; }
.r-proof-kv { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 4px 9px; background: var(--surface-panel); }
.r-proof-kvk { color: var(--ink-faint); }
.r-proof-kvv { font-family: var(--font-mono); font-size: 11px; color: var(--ink); word-break: break-all; }
.r-proof-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--rule); }
.r-proof-vers { color: var(--ink-faint); }
.r-proof-links { display: inline-flex; gap: 13px; }
.r-proof-raw { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent-deep); text-decoration: none; border-bottom: 1px dotted var(--accent-deep); }
.r-proof-raw:hover { color: var(--accent); }

/* citations */
.r-cites { display: flex; flex-direction: column; gap: 7px; }
.r-cite { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: baseline; font-size: 12px; }
.r-cite-n { color: var(--ink-faint); font-size: 9.5px; }
.r-cite-link { color: var(--accent-deep); border-bottom: 1px solid var(--accent-tint); }
.r-cite-link:hover { border-bottom-color: var(--accent); }
.r-cite-url { grid-column: 2; font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); word-break: break-all; }

/* ── map svg ── */
.fo-map { width: 100%; height: 100%; display: block; }

/* ── motion ── */
@keyframes fo-rise { from { transform: translateY(9px); } to { transform: none; } }
@keyframes fo-spin { to { transform: rotate(360deg); } }
@keyframes fo-pulse { 0% { opacity: 0.65; transform: scale(0.6); } 70% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; transform: scale(1.7); } }
.fo-leak-pulse { transform-box: fill-box; transform-origin: center; animation: fo-pulse 1.9s var(--ease-out) infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── no-JS / loading fallback ── */
.boot-note { position: fixed; inset: 0; display: grid; place-items: center; color: #8a7f6c; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* ════════════════════════ PHONE MODE (.fo-phone) ════════════════════════ */
/* Farmer-friendly single-screen action inbox. The phone DOM mounts ONLY on
   phones (main.mjs device detection), so these rules are plain + token-based
   (day/night for free). Desktop tablet styles are untouched. */
:root { --tap: 54px; }
.ph-shell { position: fixed; inset: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); overflow: hidden; }
.ph-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--surface-rail); }
.ph-top-brand { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ph-top-app { font-weight: 700; font-size: 13px; }
.ph-top-org { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-top-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface-panel); color: var(--ink-2); cursor: pointer; }
.ph-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ph-tabbar { flex: none; display: flex; border-top: 1px solid var(--rule); background: var(--surface-rail); padding-bottom: env(safe-area-inset-bottom, 0); }
.ph-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 11px; background: none; border: 0; color: var(--ink-faint); font: 600 11px/1 var(--font-mono, monospace); cursor: pointer; min-height: var(--tap); }
.ph-tab.active { color: var(--accent); }

/* INBOX — the one decision above the fold; action bar always visible (no scroll to act) */
.ph-inbox { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.ph-card { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; background: var(--surface-panel); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.ph-card-head { display: flex; align-items: center; justify-content: space-between; }
.ph-title { font-family: var(--font-serif, Spectral, Georgia, serif); font-size: 21px; font-weight: 600; margin: 0; line-height: 1.15; }
.ph-sub { font-size: 13px; color: var(--ink-faint); margin-top: -4px; }
.ph-facts { display: flex; flex-direction: column; gap: 8px; }
.ph-fact { display: flex; align-items: center; gap: 10px; }
.ph-fact-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink-2); }
.ph-fact-v { font-weight: 600; font-size: 15px; }
.ph-fact-s { font-size: 12px; color: var(--ink-faint); }
.ph-reentry { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rule)); }
.ph-reentry-ic { color: var(--accent); flex: none; }
.ph-reentry-n { font-family: var(--font-mono, monospace); font-size: 19px; font-weight: 700; color: var(--accent-deep, var(--accent)); }
.ph-reentry-l { font-size: 11.5px; color: var(--ink-2); }
.ph-actbar { flex: none; display: flex; flex-direction: column; gap: 9px; }
.ph-actrow { display: flex; gap: 9px; }
.ph-actrow > * { flex: 1; }
.ph-act-wide { width: 100%; }
.fo-phone .pa-btn--lg { min-height: var(--tap); font-size: 16px; border-radius: var(--radius-md); }
.ph-running { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.ph-running-det { font-size: 12px; color: var(--ink-faint); }
.ph-running-spin { flex: none; width: 20px; height: 20px; border: 2.5px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: ph-spin .8s linear infinite; }
@keyframes ph-spin { to { transform: rotate(360deg); } }

/* FEED — unified human / AI / robot big tappable cards */
.ph-feed { height: 100%; overflow: auto; display: flex; flex-direction: column; gap: 9px; padding: 14px; -webkit-overflow-scrolling: touch; }
.ph-feed-card { display: flex; align-items: center; gap: 11px; min-height: 70px; width: 100%; text-align: left; font: inherit; appearance: none; -webkit-appearance: none; background: var(--surface-panel); border: 1px solid var(--rule); border-left-width: 3px; border-radius: var(--radius-md); padding: 11px 13px; color: var(--ink); }
button.ph-feed-card { cursor: pointer; }
.ph-feed-card.needs { border-left-color: var(--accent); }
.ph-actor { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm); }
.ph-actor.human { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ph-actor.ai { color: var(--water); background: color-mix(in srgb, var(--water) 14%, transparent); }
.ph-actor.robot { color: var(--sage); background: color-mix(in srgb, var(--sage) 14%, transparent); }
.ph-feed-body { flex: 1; min-width: 0; }
.ph-feed-act { font-weight: 600; font-size: 14px; }
.ph-feed-det { font-size: 12px; color: var(--ink-faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-pill { flex: none; font: 600 9.5px/1.4 var(--font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--rule); border-radius: var(--radius-pill); padding: 3px 8px; white-space: nowrap; }
.ph-pill.err { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }

/* MAP — full-bleed */
.ph-map { height: 100%; display: flex; flex-direction: column; }
.ph-map-cart { flex: none; display: flex; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--rule); }
.ph-map-inner { flex: 1; min-height: 0; overflow: hidden; }
.ph-map-inner svg { width: 100%; height: 100%; display: block; }
