/* Horizon Project - discuss. Horizon Engines design language 1:1 (light-native, teal #0B6E62).
   Tokens mirrored from @360/design tokens.css (ADR-0007). Coder voice = JetBrains Mono labels. */

:root {
  /* palette - ink on paper (Horizon, light-native) */
  --paper: #F5F6F7;
  --surface: #FFFFFF;
  --surface-sunken: #ECEEF0;
  --ink: #15181B;
  --ink-soft: #565B61;
  --ink-faint: #62686E;
  --line: #E2E5E8;
  --line-strong: #D2D6DA;
  /* accent - teal (ADR-0007 LOCKED) */
  --accent: #0B6E62;
  --accent-press: #095A50;
  --accent-tint: #E2F1EE;
  --on-accent: #FFFFFF;
  --live: #2FD0B6;
  /* status */
  --ok: #2E7D32; --ok-tint: #E8F5E9;
  --danger: #A23A2E; --danger-tint: #FDECEA;
  /* status badge tints - Horizon secondary language (mirrors the command-centre blue/amber) */
  --st-blue: #0C5BA8; --st-blue-tint: #E7F0FA;
  --st-amber: #8A5A10; --st-amber-tint: #FBF1DE;
  /* type */
  --font-sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem; --text-lg: 1.125rem;
  --text-xl: 1.375rem; --text-2xl: 1.75rem; --text-3xl: 2.25rem;
  --leading-tight: 1.15; --leading-normal: 1.5;
  --tracking-tight: -0.018em; --tracking-wide: 0.04em;
  /* radius / elevation / motion */
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(21,24,27,0.06);
  --shadow-md: 0 2px 4px rgba(21,24,27,0.05), 0 8px 24px -12px rgba(21,24,27,0.18);
  --shadow-lg: 0 12px 40px -16px rgba(21,24,27,0.32);
  --ease: cubic-bezier(0.22,0.61,0.36,1);
  --dur-fast: 130ms; --dur: 190ms;
  --content-max: 1000px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: clip; /* safety net: nothing may force a horizontal scroll (does not break sticky) */
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--ink); }
h1 { font-size: var(--text-2xl); line-height: var(--leading-tight); }
code { font-family: var(--font-mono); font-size: 0.86em; color: var(--accent); }

/* ---- Horizon logo lockup (logo.css 1:1) ---- */
.logo { display: inline-flex; align-items: center; gap: 0.55em; color: var(--ink); font-family: var(--font-sans); line-height: 1; }
.logo__mark { width: 1.7em; height: 1.7em; flex: 0 0 auto; display: block; color: inherit; }
.logo__wm { font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--ink); }
.logo__eng { font-weight: 400; color: var(--ink-soft); }

/* ---- top bar ---- */
.hp-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.hp-brand { display: inline-flex; align-items: center; font-size: var(--text-base); }
.hp-nav { display: flex; gap: 4px; margin-left: 8px; }
.hp-nav a { padding: 6px 12px; border-radius: var(--radius-md); color: var(--ink-soft); font-size: var(--text-sm); font-weight: 500; transition: background var(--dur-fast), color var(--dur-fast); }
.hp-nav a:hover { color: var(--ink); background: var(--surface-sunken); }
.hp-nav a.is-active { color: var(--accent); background: var(--accent-tint); }
.hp-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.hp-user-name { font-size: var(--text-sm); color: var(--ink); }
.hp-role { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 2px 8px; }
.hp-logout { margin: 0; }
.hp-logout button { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-soft); font: inherit; font-size: var(--text-sm); padding: 5px 12px; border-radius: var(--radius-md); cursor: pointer; white-space: nowrap; transition: border-color var(--dur-fast), color var(--dur-fast); }
.hp-logout button:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ---- layout ---- */
.hp-main { max-width: var(--content-max); margin: 0 auto; padding: 40px 24px 80px; }
.hp-page-head { margin-bottom: 28px; }
.hp-sub { color: var(--ink-soft); margin: 8px 0 0; font-size: var(--text-base); max-width: 60ch; }
.hp-faint { color: var(--ink-faint); }
.hp-crumbs { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-faint); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hp-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hp-headrow .hp-crumbs { margin-bottom: 0; }
.hp-back { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink-soft); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; flex: none; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.hp-back:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }
.hp-crumbs a:hover { color: var(--accent); }
.hp-crumbs strong { color: var(--ink-soft); font-weight: 500; }

/* ---- team world clocks ---- */
.hp-clocks-wrap { margin-bottom: 28px; }
.hp-clocks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hp-clocks-label { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); margin-right: 2px; }
.hp-clock { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hp-clock.is-you { border-color: var(--accent); background: var(--accent-tint); }
.hp-clock-city { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-clock.is-you .hp-clock-city { color: var(--accent); }
.hp-clock-you { color: var(--accent); font-weight: 600; }
.hp-clock-time { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.hp-clock.is-you .hp-clock-time { color: var(--accent-press); }
.hp-clock-off { font-family: var(--font-mono); font-size: 0.5625rem; color: var(--ink-faint); }
.hp-clocks-note { margin: 12px 0 0; font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.7; color: var(--ink-faint); }

/* ---- infrastructure board ---- */
.hp-infra { margin-bottom: 24px; }
.hp-infra-label { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-nodes { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.hp-node { display: flex; align-items: center; gap: 12px; padding: 8px 14px; font-family: var(--font-mono); font-size: 0.72rem; border-top: 1px solid var(--line); }
.hp-node:first-child { border-top: none; }
.hp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hp-dot-active { background: var(--ok); box-shadow: 0 0 0 3px rgba(46,125,50,0.14); animation: hp-pulse 2.4s ease-in-out infinite; }
.hp-dot-maintenance { background: var(--warn); box-shadow: 0 0 0 3px rgba(140,109,31,0.14); }
.hp-dot-inactive { background: var(--ink-faint); }
@keyframes hp-pulse { 50% { box-shadow: 0 0 0 5px rgba(46,125,50,0.04); } }
.hp-node-name { color: var(--ink); font-weight: 600; min-width: 116px; }
.hp-node-loc { color: var(--ink-soft); }
.hp-node-st { color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.625rem; }
.hp-node-time { margin-left: auto; color: var(--ink-faint); }
.hp-node-sync { margin-left: auto; font-family: var(--font-mono); color: var(--accent); }
.hp-node-sync-off { color: var(--ink-faint); }
.hp-live-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; font-family: var(--font-mono); font-size: 0.5625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ok); }
.hp-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,125,50,0.14); animation: hp-pulse 2.4s ease-in-out infinite; }
.hp-move { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: top; margin-right: 6px; }
.hp-move form { margin: 0; line-height: 1; }
.hp-move button { background: var(--surface-sunken); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; width: 22px; height: 16px; line-height: 1; border-radius: var(--radius-sm); font-size: 0.7rem; padding: 0; }
.hp-move button:hover { color: var(--accent); border-color: var(--accent); }

/* ---- append-only notice ---- */
.hp-notice { margin-bottom: 28px; padding: 14px 16px; border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--radius-md); background: var(--surface); }
.hp-notice-head { display: block; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 6px; }
.hp-notice p { margin: 0; font-size: 0.78rem; line-height: 1.6; color: var(--ink-soft); max-width: 82ch; }

/* ---- admin moderation controls ---- */
.hp-admin-actions { display: flex; gap: 10px; margin-top: 10px; }
.hp-del summary { color: var(--danger); }
.hp-btn-danger { background: var(--danger); color: #fff; border: none; border-radius: var(--radius-sm); padding: 6px 12px; margin-top: 6px; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hp-btn-danger:hover { filter: brightness(0.92); }
.hp-badge-warn { color: var(--warn); border-color: var(--warn); }
.hp-post-head .hp-inline { margin-left: 8px; }
.hp-post-head .hp-inline summary { font-size: 0.625rem; }

/* ---- engineering conduct (top of areas, the operating standard, gray slab) ---- */
.hp-manifesto { margin-bottom: 28px; padding: 26px 28px; background: var(--surface-sunken); border: 1px solid var(--line-strong); border-left: 4px solid var(--ink-soft); border-radius: var(--radius-md); }
.hp-manifesto-tag { display: block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 10px; }
.hp-manifesto-title { font-size: 1.5rem; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--ink); margin: 0 0 12px; }
.hp-manifesto-lead { margin: 0 0 16px; font-size: 0.98rem; line-height: 1.7; color: var(--ink); max-width: 80ch; overflow-wrap: anywhere; }
.hp-manifesto-list { margin: 0; padding-left: 0; list-style: none; counter-reset: hpm; max-width: 84ch; }
.hp-manifesto-list li { position: relative; counter-increment: hpm; padding-left: 40px; margin-bottom: 14px; font-size: 0.95rem; line-height: 1.65; color: var(--ink-soft); overflow-wrap: anywhere; }
.hp-manifesto-list li:last-child { margin-bottom: 0; }
.hp-manifesto-list li::before { content: counter(hpm); position: absolute; left: 0; top: 1px; width: 25px; height: 25px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--accent); font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.hp-manifesto-list li strong { color: var(--ink); font-weight: 600; }
.hp-manifesto-close { margin: 18px 0 0; font-size: 0.98rem; line-height: 1.6; color: var(--ink); font-weight: 500; max-width: 80ch; }
/* signature: same font and colour as the conduct text, room above it. */
.hp-manifesto-sign { margin: 14px 0 0; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink); }

/* ---- first-login password banner ---- */
.hp-pwbanner { padding: 9px 24px; text-align: center; font-size: var(--text-sm); color: var(--ink); background: var(--accent-tint); border-bottom: 1px solid var(--accent); }
.hp-pwbanner a { color: var(--accent-press); font-weight: 600; text-decoration: underline; }

/* ---- notification bell + topic tools ---- */
.hp-bell { display: inline-block; margin-left: 6px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 0.6rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 0 4px; vertical-align: 1px; }
.hp-topic-tools { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hp-bm-add summary { color: var(--accent); }

/* ---- account ---- */
.hp-account { max-width: 520px; }
.hp-ok-msg { background: var(--ok-tint); border: 1px solid rgba(46,125,50,0.3); color: var(--ok); padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--text-sm); }

/* ---- saved & reminders ---- */
.hp-saved-h { font-size: var(--text-base); margin: 0 0 12px; }
.hp-saved-due { margin-bottom: 28px; }
.hp-bm { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); margin-bottom: 8px; }
.hp-bm-due { border-color: var(--accent); border-left: 2px solid var(--accent); background: var(--accent-tint); }
.hp-bm-main { min-width: 0; }
.hp-bm-flag { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); }
.hp-bm-tag { font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 7px; }
.hp-bm-title { font-weight: 600; color: var(--ink); }
.hp-bm-title:hover { color: var(--accent); }
.hp-bm-note { margin: 6px 0 0; font-size: var(--text-sm); color: var(--ink-soft); }
.hp-bm-preview { margin: 6px 0 0; font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.5; }
.hp-bm-rem { font-family: var(--font-mono); font-size: 0.625rem; color: var(--accent); }
.hp-bm-meta { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-faint); }
.hp-bm-actions { display: flex; gap: 8px; flex: none; }
.hp-bm-actions form { margin: 0; }
.hp-bm-actions .hp-btn-ghost { margin: 0; font-size: var(--text-sm); background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 4px 10px; color: var(--ink-soft); cursor: pointer; }
.hp-bm-actions .hp-btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }

/* ---- worklist (per-area task board) ---- */
.hp-worklist { margin-bottom: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.hp-wl-acc > summary { list-style: none; cursor: pointer; }
.hp-wl-acc > summary::-webkit-details-marker { display: none; }
.hp-wl-sum { display: flex; align-items: center; gap: 12px; }
.hp-wl-title { font-size: var(--text-base); font-weight: 600; color: var(--ink); letter-spacing: var(--tracking-tight); }
.hp-wl-count { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-wl-sum .hp-wl-count { margin-left: auto; }
.hp-wl-content { margin-top: 14px; }
.hp-wl-note { margin: 0 0 14px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--accent-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--text-xs); line-height: 1.55; color: var(--ink-soft); max-width: 88ch; }
.hp-wl-items { margin-bottom: 12px; }
.hp-wl-empty { padding: 6px 0; }
.hp-task { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hp-task:last-child { border-bottom: none; }
.hp-task-toggle { margin: 0; }
.hp-task-toggle button { background: none; border: none; cursor: pointer; padding: 0; display: flex; }
.hp-task-box { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); position: relative; box-sizing: border-box; flex: none; transition: border-color .15s, background .15s; }
.hp-task--doing .hp-task-box { border-color: var(--warn); }
.hp-task--doing .hp-task-box::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--warn); }
.hp-task--done .hp-task-box { border-color: var(--accent); background: var(--accent); }
.hp-task--done .hp-task-box::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hp-task-title { flex: 1; font-size: var(--text-sm); color: var(--ink); }
.hp-task--done .hp-task-title { text-decoration: line-through; color: var(--ink-faint); }
.hp-task-who { font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-faint); white-space: nowrap; }
.hp-task-admin { display: inline-flex; gap: 4px; align-items: center; }
.hp-task-admin form { margin: 0; }
.hp-task-admin button { background: var(--surface-sunken); border: 1px solid var(--line); color: var(--ink-soft); cursor: pointer; width: 22px; height: 18px; border-radius: var(--radius-sm); font-size: 0.7rem; padding: 0; line-height: 1; }
.hp-task-admin button:hover { border-color: var(--accent); color: var(--accent); }
.hp-task-x:hover { border-color: var(--danger); color: var(--danger); }
.hp-wl-add { display: flex; gap: 8px; }
.hp-wl-add input { flex: 1; background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 8px 12px; font-size: var(--text-sm); font-family: var(--font-sans); }
.hp-wl-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.hp-wl-add button { background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-md); padding: 8px 16px; font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.hp-wl-add button:hover { background: var(--accent-press); }
.hp-wl-pending { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.hp-wl-pending-label { display: block; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); margin-bottom: 6px; }
.hp-task--pending { opacity: 0.66; border-bottom: 1px dashed var(--line); }
.hp-task--pending .hp-task-title { color: var(--ink-soft); }
.hp-task-box--ghost { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px dashed var(--line-strong); box-sizing: border-box; flex: none; }
.hp-task-waiting { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-task-pend { display: inline-flex; gap: 6px; }
.hp-task-pend form { margin: 0; }
.hp-task-approve { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 4px 12px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hp-task-approve:hover { background: var(--accent-press); }
.hp-task-reject { background: none; border: 1px solid var(--line-strong); color: var(--ink-soft); border-radius: var(--radius-sm); padding: 4px 12px; font-size: var(--text-sm); cursor: pointer; }
.hp-task-reject:hover { border-color: var(--danger); color: var(--danger); }

/* ---- task description (expandable) ---- */
.hp-task-body { flex: 1; min-width: 0; }
.hp-task-detail summary { list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px; }
.hp-task-detail summary::-webkit-details-marker { display: none; }
.hp-task-detail summary::before { content: "\25B8"; color: var(--ink-faint); font-size: 0.7rem; }
.hp-task-detail[open] summary::before { content: "\25BE"; }
.hp-task-desc { margin: 6px 0 0 18px; font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.55; }
.hp-task-editform { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px 18px; max-width: 460px; }
.hp-task-editform input, .hp-task-editform textarea { background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 6px 10px; font-size: var(--text-sm); font-family: var(--font-sans); }
.hp-task-editform textarea { resize: vertical; line-height: 1.5; }
.hp-task-editform button { align-self: flex-start; background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm); padding: 5px 12px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hp-wl-add { flex-direction: column; align-items: stretch; }
.hp-wl-add-row { display: flex; gap: 8px; }
.hp-wl-adddetail { margin-top: 2px; }
.hp-wl-adddetail summary { cursor: pointer; font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); }
.hp-wl-adddetail textarea { display: block; width: 100%; margin-top: 6px; background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 8px 12px; font-size: var(--text-sm); font-family: var(--font-sans); resize: vertical; line-height: 1.5; box-sizing: border-box; }

/* shared chevron: a clear, tappable open/close affordance for the accordions */
.hp-chev { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--accent-tint); display: inline-flex; align-items: center; justify-content: center; transition: transform var(--dur) var(--ease), background var(--dur-fast); }
.hp-chev::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateY(-2px) rotate(45deg); }
details[open] > summary .hp-chev { transform: rotate(180deg); }
summary:hover .hp-chev { background: var(--accent); }
summary:hover .hp-chev::before { border-color: #fff; }

/* ---- unread accordion (area) ---- */
.hp-unread { margin-bottom: 18px; }
.hp-unread details { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hp-unread-sum { list-style: none; cursor: pointer; padding: 12px 12px 12px 16px; font-size: var(--text-sm); color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.hp-unread-sum::-webkit-details-marker { display: none; }
.hp-unread-main { display: inline-flex; align-items: center; gap: 8px; }
.hp-unread-tail { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; flex: none; }
.hp-unread-hint { font-family: var(--font-mono); font-size: 0.625rem; color: var(--accent); white-space: nowrap; }
.hp-unread-sum.has-unread { color: var(--ink); font-weight: 500; }
.hp-unread-n { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; text-align: center; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 0 5px; }
.hp-unread-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.hp-unread-row:hover { background: var(--surface-sunken); }
.hp-unread-t { min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.hp-unread-badge { flex: none; font-family: var(--font-mono); font-size: 0.625rem; color: var(--danger); white-space: nowrap; }
.hp-unread-note { margin: 0; padding: 10px 16px 12px; font-size: var(--text-xs); color: var(--ink-faint); line-height: 1.5; border-top: 1px solid var(--line); }

/* ---- team reading ledger + read performance (shared visibility, accountability) ---- */
.hp-ledger { margin-bottom: 12px; }
.hp-ledger details { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hp-ledger-sum { list-style: none; cursor: pointer; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 12px; }
.hp-ledger-sum::-webkit-details-marker { display: none; }
.hp-ledger-title { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.hp-ledger-meta { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); margin-left: auto; white-space: nowrap; }
.hp-ledger-body { padding: 0 16px 14px; }
.hp-ledger-purpose { margin: 0 0 12px; font-size: var(--text-xs); line-height: 1.55; color: var(--ink-faint); max-width: 90ch; border-top: 1px solid var(--line); padding-top: 12px; }
.hp-ledger-list { display: flex; flex-direction: column; gap: 3px; }
.hp-ledger-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.hp-ledger-name { flex: 0 0 116px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hp-ledger-detail { flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.5; overflow-wrap: anywhere; }
.hp-ledger-detail strong { color: var(--danger); font-family: var(--font-mono); }
.hp-ledger-ot { font-family: var(--font-mono); font-size: 0.625rem; color: var(--ok); white-space: nowrap; }
.hp-ledger-current { margin: 10px 0 0; font-size: var(--text-xs); color: var(--ink-faint); }
/* live, per topic read receipts, open to the whole area (no 24h wait) */
.hp-rr details { border-left: 2px solid var(--accent); }
.hp-rr-pending { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--danger); background: var(--danger-tint); border: 1px solid var(--danger); border-radius: var(--radius-sm); padding: 2px 8px; white-space: nowrap; }
.hp-rr-read { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ok); background: var(--ok-tint); border: 1px solid var(--ok); border-radius: var(--radius-sm); padding: 2px 8px; white-space: nowrap; }
.hp-rr-readlist { margin-top: 6px; }

/* ---- read receipts ---- */
.hp-post--unread { border-left: 2px solid var(--accent); }
.hp-post-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.hp-ack-btn { background: var(--danger-tint); border: 1px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 6px 14px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; font-family: var(--font-sans); }
.hp-ack-btn:hover { background: var(--danger); color: #fff; }
.hp-ack-done { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ok); }
.hp-markall { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); color: var(--ink-soft); font-size: var(--text-sm); }
.hp-markall:hover { border-color: var(--accent); color: var(--accent); }
.hp-pin-form { display: inline; margin: 0; }
.hp-pinbtn { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-soft); border-radius: var(--radius-md); padding: 6px 12px; font-size: var(--text-sm); font-family: var(--font-sans); cursor: pointer; }
.hp-pinbtn:hover { border-color: var(--accent); color: var(--accent); }
.hp-pinbtn.is-pinned { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }

/* ---- read-all confirmation ---- */
.hp-confirm { max-width: 640px; padding: 22px 24px; border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.hp-confirm-tag { display: block; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--danger); margin-bottom: 10px; }
.hp-confirm h1 { font-size: var(--text-xl); margin-bottom: 12px; }
.hp-confirm p { font-size: var(--text-sm); line-height: 1.6; color: var(--ink-soft); margin: 0 0 10px; max-width: 64ch; }
.hp-confirm-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.hp-confirm-yes { background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-md); padding: 10px 18px; font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.hp-confirm-yes:hover { background: var(--accent-press); }

/* ---- area grid ---- */
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 16px; }
.hp-card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), border-color var(--dur), box-shadow var(--dur); }
.hp-card.is-open:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.hp-card.is-locked { background: var(--surface-sunken); box-shadow: none; cursor: not-allowed; }
.hp-card.is-locked .hp-card-head h3, .hp-card.is-locked .hp-card-desc { color: var(--ink-faint); }
.hp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-card-head h3 { font-size: var(--text-lg); }
.hp-card-desc { color: var(--ink-soft); font-size: var(--text-sm); margin: 8px 0 0; }
.hp-card-meta { margin-top: 16px; display: flex; gap: 8px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-faint); }
.hp-lock { text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.hp-lock-icon { width: 16px; height: 16px; color: var(--ink-faint); flex: none; }
.hp-lock-lg { width: 32px; height: 32px; color: var(--accent); margin-bottom: 10px; }

/* ---- topics ---- */
.hp-newtopic { margin-bottom: 16px; }
.hp-newtopic summary { display: inline-block; cursor: pointer; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent); padding: 8px 14px; border: 1px solid var(--accent); border-radius: var(--radius-md); background: var(--surface); list-style: none; transition: background var(--dur-fast); }
.hp-newtopic summary:hover { background: var(--accent-tint); }
.hp-newtopic summary::-webkit-details-marker { display: none; }
.hp-newtopic details[open] summary { margin-bottom: 16px; }
.hp-topics { display: flex; flex-direction: column; gap: 2px; }
.hp-topic-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: background var(--dur-fast), border-color var(--dur-fast); }
.hp-topic-row:hover { background: var(--surface-sunken); border-color: var(--line-strong); }
.hp-topic-title { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.hp-topic-row.has-unread .hp-topic-title { font-weight: 600; }
.hp-topic-row.is-pinned { border-color: var(--accent); }
.hp-topic-pin { display: inline-block; margin-right: 8px; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.hp-topic-doc { display: inline-block; margin-right: 8px; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.hp-topic-row.is-doc { border-color: var(--accent); background: var(--accent-tint); }
/* Optional per-topic colour label (admin set). Placed after .is-doc so it overrides the default doc
   tint by source order; the document pill matches the chosen colour. Palette is the theme's own
   tokens so it stays on-brand: teal (accent), blue (st-blue), red (danger), neutral (plain surface). */
.hp-topic-row.tc-teal { border-color: var(--accent); background: var(--accent-tint); }
.hp-topic-row.tc-teal .hp-topic-doc { background: var(--accent); }
.hp-topic-row.tc-blue { border-color: var(--st-blue); background: var(--st-blue-tint); }
.hp-topic-row.tc-blue .hp-topic-doc { background: var(--st-blue); }
.hp-topic-row.tc-red { border-color: var(--danger); background: var(--danger-tint); }
.hp-topic-row.tc-red .hp-topic-doc { background: var(--danger); }
.hp-topic-row.tc-neutral { border-color: var(--line); background: var(--surface); }
.hp-topic-row.tc-neutral .hp-topic-doc { background: var(--ink-soft); }
.hp-colour-form { display: flex; gap: 9px; padding: 4px 2px 2px; }
.hp-sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); padding: 0; cursor: pointer; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.hp-sw:hover { transform: scale(1.1); }
.hp-sw--teal { background: var(--accent); border-color: var(--accent); }
.hp-sw--blue { background: var(--st-blue); border-color: var(--st-blue); }
.hp-sw--red { background: var(--danger); border-color: var(--danger); }
.hp-sw--neutral { background: var(--surface); border-color: var(--line-strong); }
.hp-sw.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink-soft); }
.hp-topic-unread { display: inline-block; margin-left: 9px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--danger); border-radius: 999px; padding: 1px 8px; vertical-align: middle; white-space: nowrap; }
.hp-topic-meta { flex: none; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-faint); white-space: nowrap; }

/* ---- thread ---- */
.hp-thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.hp-post { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); padding: 18px 20px; }
.hp-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: var(--text-sm); }
.hp-author { font-weight: 600; color: var(--ink); }
.hp-post-time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-faint); margin-left: auto; }
.hp-post-body { color: var(--ink); line-height: 1.65; word-wrap: break-word; overflow-wrap: anywhere; }
.hp-badge { font-family: var(--font-mono); font-size: 0.5625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 2px 7px; }
.hp-badge-op { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }
.hp-badge-fail { color: var(--danger); border-color: var(--danger); }

/* ---- per-post reply and quote ---- */
.hp-post-head .hp-replylink { margin-left: 8px; font-family: var(--font-mono); font-size: 0.625rem; color: var(--accent); }
.hp-post-head .hp-replylink:hover { color: var(--accent-press); text-decoration: underline; }
.hp-quote { display: block; margin: 0 0 12px; padding: 8px 12px; border-left: 2px solid var(--line-strong); background: var(--surface-sunken); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--text-sm); line-height: 1.5; }
.hp-quote:hover { border-left-color: var(--accent); }
.hp-quote-who { font-weight: 600; color: var(--ink); }
.hp-quote-who::before { content: "\21B3"; margin-right: 6px; color: var(--ink-faint); }
.hp-quote-snip { color: var(--ink-faint); }
.hp-replyctx { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; border-left: 2px solid var(--accent); background: var(--accent-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--text-sm); }
.hp-replyctx-head { color: var(--ink); white-space: nowrap; }
.hp-replyctx-snip { color: var(--ink-soft); flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.hp-replyctx-x { margin-left: auto; font-family: var(--font-mono); font-size: 0.625rem; color: var(--accent); }
.hp-replyctx-x:hover { color: var(--danger); }
.hp-thread-empty { padding: 8px 0 4px; }

/* ---- prepared multilingual document (CSS-only language tabs, CSP safe) ---- */
.hp-doc-toolsrow { margin-bottom: 16px; }
.hp-discuss-head { font-size: var(--text-lg); margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.hp-discuss-n { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 9px; }
.hp-doc { margin: 0 0 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.hp-doc-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hp-doc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface-sunken); }
.hp-doc-kicker { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); }
.hp-doc-tabs { display: inline-flex; gap: 6px; margin-left: auto; }
.hp-doc-tab { cursor: pointer; padding: 5px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: var(--text-sm); color: var(--ink-soft); background: var(--surface); user-select: none; transition: border-color var(--dur-fast), color var(--dur-fast); }
.hp-doc-tab:hover { border-color: var(--accent); color: var(--accent); }
#hpdoc-en:checked ~ .hp-doc-bar .hp-doc-tab-en,
#hpdoc-sk:checked ~ .hp-doc-bar .hp-doc-tab-sk,
#hpdoc-tr:checked ~ .hp-doc-bar .hp-doc-tab-tr { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hp-doc-body { display: none; }
#hpdoc-en:checked ~ .hp-doc-collapsible .hp-doc-en,
#hpdoc-sk:checked ~ .hp-doc-collapsible .hp-doc-sk,
#hpdoc-tr:checked ~ .hp-doc-collapsible .hp-doc-tr { display: block; }
.hp-doc-prose { padding: 26px 32px 32px; max-width: 78ch; }
.hp-doc-prose h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 8px; color: var(--ink); }
.hp-doc-prose h2 { font-size: 1.2rem; line-height: 1.3; margin: 28px 0 10px; color: var(--ink); }
.hp-doc-prose h3 { font-size: 1rem; margin: 22px 0 8px; color: var(--ink); }
.hp-doc-prose h4 { font-size: 0.95rem; font-weight: 600; margin: 20px 0 7px; color: var(--ink); }
.hp-doc-prose p { margin: 0 0 12px; line-height: 1.7; color: var(--ink-soft); font-size: 0.95rem; }
.hp-doc-prose strong { color: var(--ink); font-weight: 600; }
.hp-doc-prose ul, .hp-doc-prose ol { margin: 0 0 14px; padding-left: 22px; }
.hp-doc-prose li { margin: 5px 0; line-height: 1.6; color: var(--ink-soft); font-size: 0.95rem; }
.hp-doc-prose li::marker { color: var(--ink-faint); }
.hp-doc-prose hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }
/* long-document expander: collapsed shows about half a page, with a fade and a clear button */
.hp-doc-collapsible { position: relative; }
.hp-doc-expand-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hp-doc-collapsible .hp-doc-prose { max-height: 56vh; overflow: hidden; }
#hpdoc-expand:checked ~ .hp-doc-prose { max-height: none; overflow: visible; }
.hp-doc-collapsible--short .hp-doc-prose { max-height: none; overflow: visible; }
.hp-doc-fade { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; padding: 72px 16px 20px; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--surface) 72%); pointer-events: none; }
#hpdoc-expand:checked ~ .hp-doc-fade { display: none; }
.hp-doc-expand-btn { pointer-events: auto; cursor: pointer; background: var(--accent); color: var(--on-accent); padding: 11px 22px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--text-sm); box-shadow: var(--shadow-md); user-select: none; }
.hp-doc-expand-btn:hover { background: var(--accent-press); }
.hp-doc-collapse-btn { display: none; }
#hpdoc-expand:checked ~ .hp-doc-collapse-btn { display: block; text-align: center; cursor: pointer; padding: 14px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); user-select: none; }
#hpdoc-expand:checked ~ .hp-doc-collapse-btn:hover { color: var(--accent-press); }

/* long-message expander: same CSS-only pattern as documents, but the reveal keys off the
   .hp-msg-expand-cb class (not a hardcoded id) so each post carries its own per-post
   checkbox id for the label pairing and every message toggles independently. CSP safe. */
.hp-msg-collapsible { position: relative; }
.hp-msg-expand-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hp-msg-collapsible .hp-msg-prose { max-height: 360px; overflow: hidden; }
.hp-msg-expand-cb:checked ~ .hp-msg-prose { max-height: none; overflow: visible; }
.hp-msg-fade { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; padding: 64px 16px 14px; background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--surface) 78%); pointer-events: none; }
.hp-msg-expand-cb:checked ~ .hp-msg-fade { display: none; }
.hp-msg-expand-btn { pointer-events: auto; cursor: pointer; background: var(--accent); color: var(--on-accent); padding: 9px 20px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--text-sm); box-shadow: var(--shadow-md); user-select: none; }
.hp-msg-expand-btn:hover { background: var(--accent-press); }
.hp-msg-collapse-btn { display: none; }
.hp-msg-expand-cb:checked ~ .hp-msg-collapse-btn { display: block; text-align: center; cursor: pointer; padding: 10px; margin-top: 8px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); user-select: none; }
.hp-msg-expand-cb:checked ~ .hp-msg-collapse-btn:hover { color: var(--accent-press); }

/* document acknowledgement (read and understood) shown directly under the document */
.hp-doc-foot { margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-md); background: var(--surface-sunken); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hp-doc-ackhint { font-size: var(--text-sm); color: var(--ink-soft); }
.hp-doc-foot form { margin: 0; }
.hp-doc-act { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hp-status-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.hp-status-form select { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 6px 10px; max-width: 210px; cursor: pointer; }
.hp-status-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.hp-status { flex: none; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.01em; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 3px 9px; white-space: nowrap; }
.hp-rr .hp-status { margin-left: auto; }
.hp-status--read { background: var(--accent-tint); color: var(--accent-press); border-color: var(--accent); }
.hp-status--good { background: var(--ok-tint); color: var(--ok); border-color: var(--ok); }
.hp-status--alert { background: var(--danger-tint); color: var(--danger); border-color: var(--danger); }
.hp-status--active { background: var(--st-blue-tint); color: var(--st-blue); border-color: var(--st-blue); }
.hp-status--attention { background: var(--st-amber-tint); color: var(--st-amber); border-color: var(--st-amber); }
.hp-status--neutral { background: var(--surface-sunken); color: var(--ink-soft); border-color: var(--line-strong); }
.hp-statgroup { margin-bottom: 14px; }
.hp-statgroup:last-child { margin-bottom: 0; }
.hp-statgroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hp-statgroup-n { font-family: var(--font-mono); font-size: 0.625rem; color: var(--ink-faint); }
.hp-statitem { background: var(--surface-sunken); border-radius: var(--radius-sm); padding: 8px 11px; margin-bottom: 6px; }
.hp-statitem:last-child { margin-bottom: 0; }
.hp-statitem-link { font-size: var(--text-sm); font-weight: 500; color: var(--ink); text-decoration: none; }
.hp-statitem-link:hover { color: var(--accent-press); }
.hp-note { display: inline; margin-left: 10px; }
.hp-note summary { display: inline; cursor: pointer; list-style: none; font-family: var(--font-mono); font-size: 0.625rem; color: var(--accent); }
.hp-note summary::-webkit-details-marker { display: none; }
.hp-note summary:hover { color: var(--accent-press); }
.hp-note-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.hp-note-form textarea { width: 100%; font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 9px; resize: vertical; }
.hp-note-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.hp-note-form button { align-self: flex-start; background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-sm); padding: 5px 12px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.hp-note-form button:hover { background: var(--accent-press); }
.hp-note-text { margin: 7px 0 0; padding: 7px 10px; background: var(--surface); border-left: 2px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--text-sm); color: var(--ink-soft); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- decision records (structured topic + lifecycle status) ---- */
.hp-decision { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-lg); background: var(--surface); padding: 22px 24px; margin: 0 0 18px; }
.hp-decision--decided { border-left-color: var(--ok); }
.hp-decision--superseded { border-left-color: var(--ink-faint); }
.hp-dec-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hp-dec-tag { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-dec-status { font-family: var(--font-mono); font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.hp-dec-status--proposed { color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent); }
.hp-dec-status--decided { color: var(--ok); background: var(--ok-tint); border: 1px solid var(--ok); }
.hp-dec-status--superseded { color: var(--ink-faint); background: var(--surface-sunken); border: 1px solid var(--line-strong); }
.hp-dec-title { font-size: 1.6rem; line-height: 1.15; letter-spacing: var(--tracking-tight); color: var(--ink); margin: 0 0 8px; }
.hp-dec-meta { font-size: var(--text-sm); color: var(--ink-faint); margin: 0 0 18px; }
.hp-dec-statusnote { color: var(--ink-faint); }
.hp-dec-fields { display: flex; flex-direction: column; gap: 16px; }
.hp-dec-label { display: block; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 5px; }
.hp-dec-text { font-size: 1rem; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.hp-dec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.hp-dec-btn { font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 600; cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: var(--radius-sm); padding: 6px 14px; }
.hp-dec-btn:hover { border-color: var(--accent); color: var(--accent); }
.hp-dec-btn--go { border-color: var(--ok); color: var(--ok); background: var(--ok-tint); }
.hp-dec-btn--go:hover { background: var(--ok); color: #fff; }
.hp-dec-edit { margin-top: 14px; }
.hp-dec-edit > summary { cursor: pointer; font-size: var(--text-sm); color: var(--ink-soft); }
.hp-dec-edit > summary:hover { color: var(--accent); }
.hp-dec-hint { margin: 0 0 12px; font-size: var(--text-xs); line-height: 1.55; color: var(--ink-faint); max-width: 80ch; }
.hp-topic-decision { display: inline-block; margin-right: 6px; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.hp-topic-row.is-decision { border-color: var(--accent); }

/* ---- presence (online / last active) in the admin people table ---- */
.hp-pres { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink-soft); white-space: nowrap; }
.hp-pres-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.hp-pres--on { color: var(--ok); font-weight: 600; }
.hp-pres--on .hp-pres-dot, .hp-pres-dot--on { background: var(--ok); box-shadow: 0 0 0 3px rgba(46,125,50,0.16); }
.hp-pres--never { color: var(--ink-faint); }
.hp-people-online { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ok); vertical-align: middle; }

/* ---- rich document: hero, stat cards, SVG charts, comparisons (CSP safe) ---- */
.hp-hero { padding: 4px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.hp-hero-kicker { display: inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 12px; }
.hp-hero-title { font-size: 2.3rem; line-height: 1.1; letter-spacing: var(--tracking-tight); color: var(--ink); margin: 0 0 14px; max-width: 20ch; }
.hp-hero-sub { font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); max-width: 66ch; margin: 0; }
/* vision hero: pill badge + oversized headline + lead + rule + two supporting columns */
.hp-hero--lead { padding: 8px 0 30px; }
.hp-hero-pill { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; padding: 7px 15px 7px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: var(--tracking-wide); color: var(--ink-soft); }
.hp-hero-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.hp-hero-headline { font-size: clamp(2.3rem, 5.2vw, 3.5rem); line-height: 1.04; font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--ink); margin: 0 0 24px; max-width: 18ch; }
.hp-hero-lead { font-size: clamp(1.1rem, 1.9vw, 1.35rem); line-height: 1.5; color: var(--ink); max-width: 58ch; margin: 0; }
.hp-hero-rule { border: none; border-top: 1px solid var(--line); margin: 30px 0 26px; }
.hp-hero-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; }
.hp-hero-cols p { margin: 0; font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); }
.hp-hero-360 { display: flex; gap: 11px; align-items: flex-start; margin: 24px 0 0; padding: 14px 16px; background: var(--accent-tint); border-left: 3px solid var(--accent); border-radius: var(--radius-md); font-size: 0.95rem; line-height: 1.6; color: var(--ink); }
.hp-hero-360-ic { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
/* vision index (table of contents) */
.hp-vis-toc { margin: 30px 0 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.hp-vis-toc-head { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); margin-bottom: 14px; }
.hp-vis-toc-list { list-style: none; margin: 0; padding: 0; column-count: 2; column-gap: 36px; }
.hp-vis-toc-list li { break-inside: avoid; margin: 0; }
.hp-vis-toc-link { display: flex; gap: 12px; align-items: baseline; padding: 5px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-soft); transition: background var(--dur-fast), color var(--dur-fast); }
.hp-vis-toc-link:hover { background: var(--accent-tint); color: var(--accent-press); }
.hp-vis-toc-n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); flex: none; }
.hp-vis-toc-t { font-size: 0.92rem; line-height: 1.4; }
/* prominent main-section heading: hairline rule + teal section eyebrow + larger title */
.hp-doc-rich .hp-vis-h2 { font-size: 1.55rem; line-height: 1.2; margin: 58px 0 18px; padding-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 84px; }
.hp-vis-h2-n { display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 7px; }
.hp-vis-h2-t { display: block; }
.hp-vis-h2:target .hp-vis-h2-n { color: var(--accent-press); }

/* floating index button + slide-in drawer (CSS-only :target, CSP safe) */
.hp-vis-fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px 11px 13px; background: var(--accent); color: #fff; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 500; text-decoration: none; box-shadow: 0 8px 22px rgba(11,110,98,.28); transition: background var(--dur-fast), transform var(--dur-fast); }
.hp-vis-fab:hover { background: var(--accent-press); transform: translateY(-1px); }
.hp-vis-fab svg { width: 17px; height: 17px; }
.hp-vis-drw { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.hp-vis-drw:target { visibility: visible; }
.hp-vis-drw-bg { position: absolute; inset: 0; background: rgba(15,23,32,.34); opacity: 0; transition: opacity .25s ease; }
.hp-vis-drw:target .hp-vis-drw-bg { opacity: 1; }
.hp-vis-drw-panel { position: absolute; top: 0; right: 0; width: min(340px, 86vw); height: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -10px 0 34px rgba(0,0,0,.14); transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); overflow-y: auto; padding: 16px 16px 40px; }
.hp-vis-drw:target .hp-vis-drw-panel { transform: translateX(0); }
.hp-vis-drw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 4px 6px; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-vis-drw-x { font-size: 1.5rem; line-height: 1; color: var(--ink-soft); text-decoration: none; padding: 0 4px; }
.hp-vis-drw-x:hover { color: var(--ink); }
.hp-vis-drw-list { list-style: none; margin: 0; padding: 0; }
.hp-vis-drw-list a { display: flex; gap: 11px; align-items: baseline; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: 0.9rem; line-height: 1.35; }
.hp-vis-drw-list a:hover { background: var(--accent-tint); color: var(--accent-press); }
.hp-vis-drw-n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); flex: none; }

/* horizontal numbered stepper with icons */
.hp-vis-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 24px 0; }
.hp-vis-stp { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.hp-vis-stp:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 50%; width: 100%; height: 1.5px; background: var(--accent); opacity: .3; z-index: 0; }
.hp-vis-stp-num { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent); font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; justify-content: center; }
.hp-vis-stp-ic { margin: 14px 0 8px; color: var(--accent); line-height: 0; }
.hp-vis-stp-ic svg { width: 22px; height: 22px; }
.hp-vis-stp-t { font-weight: 600; font-size: 1.02rem; color: var(--ink); margin-bottom: 6px; }
.hp-vis-stp-d { font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); }

/* window-framed UI mock-up (illustrative) */
.hp-mk { margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.hp-mk-bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--surface-sunken); border-bottom: 1px solid var(--line); }
.hp-mk-dots { display: inline-flex; gap: 6px; }
.hp-mk-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.hp-mk-dots i:nth-child(1) { background: #f06a5a; }
.hp-mk-dots i:nth-child(2) { background: #f3bf4d; }
.hp-mk-dots i:nth-child(3) { background: #37c26b; }
.hp-mk-bt { font-size: 0.82rem; color: var(--ink-faint); }
.hp-mk-pre { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: var(--tracking-wide); color: var(--accent); background: var(--accent-tint); padding: 3px 9px; border-radius: var(--radius-pill); }
.hp-mk-body { display: flex; }
.hp-mk-side { width: 168px; flex: none; border-right: 1px solid var(--line); padding: 16px 12px; }
.hp-mk-brand { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin: 4px 6px 18px; }
.hp-mk-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hp-mk-nav-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--ink-soft); }
.hp-mk-nav-i.is-active { background: var(--accent-tint); color: var(--accent-press); font-weight: 600; }
.hp-mk-nav-d { width: 16px; height: 16px; border-radius: 5px; background: var(--line); flex: none; }
.hp-mk-nav-i.is-active .hp-mk-nav-d { background: var(--accent); }
.hp-mk-main { flex: 1; padding: 16px 18px; min-width: 0; }
.hp-mk-main-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hp-mk-main-h span:first-child { font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.hp-mk-tag { font-size: 0.7rem; color: var(--accent); background: var(--accent-tint); padding: 4px 10px; border-radius: var(--radius-pill); }
.hp-mk-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.hp-mk-region { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.hp-mk-region-h { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.hp-mk-region-s { font-size: 0.72rem; color: var(--ink-faint); margin: 2px 0 9px; }
.hp-mk-meter { height: 7px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.hp-mk-meter-f { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.hp-mk-region-n { font-size: 0.72rem; color: var(--ink-soft); margin-top: 6px; }
.hp-mk-map { position: relative; height: 150px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-sunken); overflow: hidden; margin-bottom: 14px; }
.hp-mk-mapgrid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 34px 34px; opacity: .55; }
.hp-mk-pin { position: absolute; width: 15px; height: 15px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid var(--surface); box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.hp-mk-pin--blue { background: #2f74ff; }
.hp-mk-pin--green { background: #19b36b; }
.hp-mk-pin--a { left: 28%; top: 34%; }
.hp-mk-pin--b { left: 46%; top: 64%; }
.hp-mk-pin--c { left: 60%; top: 46%; }
.hp-mk-pin--d { left: 78%; top: 28%; }
.hp-mk-reqs { display: flex; flex-direction: column; gap: 8px; }
.hp-mk-req { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; }
.hp-mk-req-n { font-weight: 600; font-size: 0.85rem; color: var(--ink); }
.hp-mk-req-l { font-size: 0.78rem; color: var(--ink-soft); }
.hp-mk-req-b { margin-left: auto; display: inline-flex; gap: 8px; }
.hp-mk-bpri { font-size: 0.75rem; color: #fff; background: var(--accent); padding: 5px 11px; border-radius: var(--radius-sm); }
.hp-mk-bsec { font-size: 0.75rem; color: var(--accent); background: var(--accent-tint); padding: 5px 11px; border-radius: var(--radius-sm); }
.hp-mk-cap { padding: 11px 16px; margin: 0; font-size: 0.78rem; color: var(--ink-faint); line-height: 1.5; border-top: 1px solid var(--line); background: var(--surface-sunken); }
.hp-mk-w-0{width:0}.hp-mk-w-10{width:10%}.hp-mk-w-20{width:20%}.hp-mk-w-30{width:30%}.hp-mk-w-40{width:40%}.hp-mk-w-50{width:50%}.hp-mk-w-60{width:60%}.hp-mk-w-70{width:70%}.hp-mk-w-80{width:80%}.hp-mk-w-90{width:90%}.hp-mk-w-100{width:100%}

/* shared 360 stage backdrop */
.hp-mk-stage { position: relative; height: 230px; overflow: hidden; background: linear-gradient(180deg, #eef3f9 0%, #e2ebf4 52%, #d4dfec 100%); }
.hp-mk-room { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hp-mk-chip { position: absolute; left: 16px; bottom: 16px; z-index: 2; background: rgba(15,23,32,.72); color: #fff; font-size: 0.74rem; padding: 6px 12px; border-radius: var(--radius-pill); }
.hp-mk-chip--tl { top: 16px; bottom: auto; }
.hp-mk-pointer { position: absolute; left: 52%; top: 44%; z-index: 2; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(11,110,98,.22); }
.hp-mk-360 { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(15,23,32,.74); color: #fff; font-size: 0.68rem; padding: 5px 12px; border-radius: var(--radius-pill); white-space: nowrap; }
.hp-mk-360 svg { width: 14px; height: 14px; }

/* live tour: two camera tiles + control bar */
.hp-mk-stage--live { height: 256px; }
.hp-mk-vtiles { position: absolute; right: 14px; top: 14px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.hp-mk-vtile { display: flex; align-items: center; gap: 8px; width: 142px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 10px 6px 6px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.hp-mk-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: none; }
.hp-mk-av--b { background: #2f74ff; }
.hp-mk-vmeta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.hp-mk-vn { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.hp-mk-vlbl { font-size: 0.64rem; color: var(--ink-faint); }
.hp-mk-dot-live { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; margin-left: auto; flex: none; }
.hp-mk-livebar { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 7px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.hp-mk-cpill { font-size: 0.72rem; color: var(--ink-soft); background: var(--surface-sunken); padding: 5px 11px; border-radius: var(--radius-pill); }
.hp-mk-cpill.is-on { color: #fff; background: var(--accent); }
.hp-mk-livebar-io { margin-left: auto; display: inline-flex; gap: 6px; }
.hp-mk-io { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-sunken); border: 1px solid var(--line); }

/* tour editor: scenes | stage | tools */
.hp-mk-body--ed { display: grid; grid-template-columns: 132px 1fr 132px; align-items: stretch; }
.hp-mk-scenes { border-right: 1px solid var(--line); padding: 12px 10px; }
.hp-mk-tools { border-left: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.hp-mk-col-h { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); margin-bottom: 9px; }
.hp-mk-scene { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--radius-sm); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 3px; }
.hp-mk-scene.is-active { background: var(--accent-tint); color: var(--accent-press); font-weight: 600; }
.hp-mk-scene-th { width: 30px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, #e6edf5, #cfd9e6); flex: none; }
.hp-mk-stage--ed { height: 214px; }
.hp-mk-hs { position: absolute; z-index: 2; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(11,110,98,.2); }
.hp-mk-hs--1 { left: 34%; top: 44%; }
.hp-mk-hs--2 { left: 62%; top: 60%; }
.hp-mk-hs--3 { left: 76%; top: 36%; }
.hp-mk-tool { font-size: 0.74rem; color: var(--ink-soft); background: var(--surface-sunken); border: 1px solid var(--line); padding: 7px 10px; border-radius: var(--radius-sm); text-align: center; }
.hp-mk-share { margin-top: auto; font-size: 0.78rem; color: #fff; background: var(--accent); padding: 8px 12px; border-radius: var(--radius-sm); text-align: center; font-weight: 500; }

/* agent dashboard: stats + active tours */
.hp-mk-stats2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.hp-mk-stat2 { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.hp-mk-stat2-n { display: block; font-size: 1.4rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.hp-mk-stat2-l { font-size: 0.72rem; color: var(--ink-soft); }
.hp-mk-tours { display: flex; flex-direction: column; gap: 8px; }
.hp-mk-tour { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 9px 12px; }
.hp-mk-tour-th { width: 38px; height: 28px; border-radius: 5px; background: linear-gradient(180deg, #e6edf5, #cfd9e6); flex: none; }
.hp-mk-tour-n { font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.hp-mk-tour-s { margin-left: auto; font-size: 0.68rem; color: var(--accent); background: var(--accent-tint); padding: 3px 10px; border-radius: var(--radius-pill); }

/* tour viewer: bottom bar with scene thumbs + controls */
.hp-mk-stage--viewer { height: 250px; }
.hp-mk-viewerbar { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px 12px; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.hp-mk-vthumbs { display: inline-flex; gap: 7px; flex-wrap: wrap; }
.hp-mk-vthumb { font-size: 0.72rem; color: var(--ink-soft); background: var(--surface-sunken); padding: 4px 10px; border-radius: var(--radius-sm); }
.hp-mk-vthumb.is-active { color: #fff; background: var(--accent); }
.hp-mk-vicons { margin-left: auto; display: inline-flex; gap: 7px; }
.hp-mk-vicons i { width: 24px; height: 24px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--line); }

/* translation + content-control mock-up (key / source / target / status + workflow) */
.hp-mk-i18n { padding: 14px 16px 16px; }
.hp-mk-i18n-head, .hp-mk-i18n-row { display: grid; grid-template-columns: 1fr 1.1fr 1.5fr 0.9fr; gap: 12px; align-items: center; }
.hp-mk-i18n-head { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); padding: 0 4px 10px; }
.hp-mk-i18n-row { padding: 8px 4px; border-top: 1px solid var(--line); }
.hp-mk-i18n-key { font-family: var(--font-mono); font-size: 0.78rem; color: #2f74ff; }
.hp-mk-i18n-src { font-size: 0.82rem; color: var(--ink-soft); }
.hp-mk-i18n-tgt { font-size: 0.84rem; color: var(--ink); background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 7px 11px; }
.hp-mk-i18n-st { justify-self: start; font-size: 0.7rem; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-pill); }
.hp-mk-i18n-st.is-ok { color: #198754; background: #e4f3ea; }
.hp-mk-i18n-st.is-info { color: var(--accent-press); background: var(--accent-tint); }
.hp-mk-i18n-st.is-warn { color: #b07512; background: #fbf0db; }
.hp-mk-i18n-st.is-muted { color: var(--ink-soft); background: var(--surface-sunken); }
.hp-mk-i18n-flow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hp-mk-i18n-step { font-size: 0.74rem; color: var(--ink-faint); background: var(--surface-sunken); padding: 6px 13px; border-radius: var(--radius-pill); }
.hp-mk-i18n-step.is-done { color: var(--ink-soft); }
.hp-mk-i18n-step.is-on { color: #fff; background: var(--accent); font-weight: 600; }
.hp-mk-i18n-arr { width: 16px; height: 0; border-top: 1.5px solid var(--line-strong); flex: none; }
.hp-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 26px; }
.hp-stat-grid--3 { grid-template-columns: repeat(3, 1fr); margin: 18px 0; }
.hp-stat { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-sunken); }
.hp-stat-num { font-size: 1.5rem; font-weight: 700; color: var(--accent); letter-spacing: var(--tracking-tight); line-height: 1.1; }
.hp-stat-label { font-size: var(--text-xs); line-height: 1.45; color: var(--ink-soft); }
.hp-rev-lead { font-size: 1.05rem; line-height: 1.7; color: var(--ink); margin: 0 0 8px; max-width: 70ch; }
.hp-chart { margin: 22px 0; }
.hp-chart svg { width: 100%; height: auto; display: block; }
.hp-chart-bar { fill: var(--accent); }
.hp-chart-bar-2 { fill: var(--live); }
.hp-chart-val { fill: var(--ink); font-family: var(--font-mono); font-size: 20px; font-weight: 600; }
.hp-chart-glabel { fill: var(--ink-soft); font-family: var(--font-sans); font-size: 17px; }
.hp-chart-legend { fill: var(--ink-soft); font-family: var(--font-sans); font-size: 15px; }
.hp-chart-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.hp-chart figcaption { margin-top: 10px; font-size: var(--text-xs); color: var(--ink-faint); line-height: 1.5; }
.hp-split { display: flex; height: 30px; border-radius: var(--radius-pill); overflow: hidden; margin: 12px 0 8px; gap: 2px; }
.hp-split-seg { display: block; }
.hp-split-seg--field { background: var(--accent); }
.hp-split-seg--platform { background: var(--live); }
.hp-split-seg--founder { background: var(--accent-press); }
.hp-split-w-95 { flex: 95; } .hp-split-w-60 { flex: 60; } .hp-split-w-40 { flex: 40; } .hp-split-w-5 { flex: 5; }
.hp-split-w-49 { flex: 49; } .hp-split-w-26 { flex: 26; } .hp-split-w-25 { flex: 25; }
.hp-split-legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: var(--text-sm); color: var(--ink-soft); }
.hp-split-li { display: inline-flex; align-items: center; gap: 7px; }
.hp-dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.hp-dot--field { background: var(--accent); }
.hp-dot--platform { background: var(--live); }
.hp-dot--founder { background: var(--accent-press); }
.hp-rev-tablewrap { overflow-x: auto; margin: 14px 0; }
.hp-rev-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.hp-rev-table th, .hp-rev-table td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hp-rev-table th:first-child, .hp-rev-table td:first-child { text-align: left; }
.hp-rev-table thead th { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); border-bottom-color: var(--line-strong); }
.hp-rev-table tbody td { color: var(--ink); }
.hp-rev-table tbody td:first-child { color: var(--ink-soft); font-family: var(--font-mono); }
.hp-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.hp-compare-col { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hp-compare-title { font-size: 1.1rem; margin: 0 0 4px; color: var(--ink); }
.hp-compare-tag { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin: 0 0 12px; }
.hp-compare-list { margin: 0; padding-left: 18px; }
.hp-compare-list li { margin: 7px 0; font-size: var(--text-sm); line-height: 1.5; color: var(--ink-soft); }
.hp-rev-callout { margin: 24px 0 0; padding: 20px 22px; border: 1px solid var(--accent); border-left: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--accent-tint); }
.hp-rev-callout-tag { display: block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent-press); margin-bottom: 10px; }
.hp-rev-callout p { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.65; color: var(--ink); }
.hp-rev-callout p:last-child { margin-bottom: 0; }

/* a single-language rich document has no tabs, so its one body must show without a checked radio */
.hp-doc-body--solo { display: block; }

/* ---- vision document components (part divider, region note, principles, cards, flow, layers, checklist) ---- */
.hp-vis-part { display: flex; align-items: baseline; gap: 14px; margin: 40px 0 22px; padding: 16px 0 14px; border-top: 2px solid var(--accent); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hp-vis-part-n { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); background: var(--accent-tint); padding: 4px 11px; border-radius: var(--radius-pill); white-space: nowrap; }
.hp-vis-part-t { font-size: var(--text-xl); font-weight: 600; letter-spacing: var(--tracking-tight); color: var(--ink); }
.hp-vis-note { margin: 18px 0; padding: 14px 18px; background: var(--accent-tint); border: 1px solid var(--accent); border-left-width: 3px; border-radius: var(--radius-md); }
.hp-vis-note-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--accent); margin-bottom: 6px; }
.hp-vis-note p { margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); }
.hp-vis-principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 8px 0 4px; }
.hp-vis-principle { padding: 18px 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.hp-vis-pnum { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; margin-bottom: 10px; }
.hp-vis-ptitle { font-size: var(--text-base); margin: 0 0 6px; color: var(--ink); }
.hp-vis-ptext { font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); margin: 0; }
.hp-vis-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 4px; }
.hp-vis-card { padding: 18px; background: var(--surface-sunken); border-radius: var(--radius-lg); }
.hp-vis-ctitle { font-size: var(--text-base); margin: 0 0 7px; color: var(--ink); }
.hp-vis-ctext { font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); margin: 0; }
/* Restricted / classified section: locked cards, core-team-only feel */
.hp-vis-restricted { margin: 10px 0 6px; }
.hp-vis-reyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 4px 11px 4px 9px; }
.hp-vis-rlock-sm { display: inline-flex; }
.hp-vis-rlock-sm svg { width: 12px; height: 12px; }
.hp-vis-rintro { margin: 14px 0 20px; max-width: 62ch; font-size: var(--text-sm); line-height: 1.6; color: var(--ink-soft); }
.hp-vis-rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 14px; }
.hp-vis-rcard { position: relative; display: flex; flex-direction: column; padding: 20px 20px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; }
.hp-vis-rcard::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 9px); opacity: 0.025; pointer-events: none; }
.hp-vis-rlock { position: absolute; top: 16px; right: 16px; display: inline-flex; color: var(--ink-faint); opacity: 0.7; }
.hp-vis-rlock svg { width: 17px; height: 17px; }
.hp-vis-rtitle { font-size: var(--text-base); margin: 0 38px 8px 0; color: var(--ink); }
.hp-vis-rtext { font-size: var(--text-sm); line-height: 1.55; color: var(--ink-soft); margin: 0 0 14px; }
.hp-vis-rredact { display: block; height: 9px; width: 64%; margin: auto 0 14px; border-radius: 2px; background-image: repeating-linear-gradient(90deg, var(--ink-faint) 0 22px, transparent 22px 30px); opacity: 0.32; }
.hp-vis-rtag { align-self: flex-start; display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 3px 8px; background: var(--surface-sunken); }
/* Locked variants: individual cards/layers turned restricted in place */
.hp-vis-card--locked { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); overflow: hidden; }
.hp-vis-card--locked::before, .hp-vis-layer--locked::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 9px); opacity: 0.025; pointer-events: none; }
.hp-vis-card--locked .hp-vis-ctitle { margin-right: 34px; }
.hp-vis-layer--locked { border-color: var(--line-strong); overflow: hidden; }
.hp-vis-layer--locked .hp-vis-ltitle { margin-right: 30px; }
.hp-vis-layer--locked .hp-vis-rlock { top: 13px; right: 14px; }
.hp-vis-layer--locked .hp-vis-rredact { margin: 11px 0 12px; }
.hp-vis-flow { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.hp-vis-step { position: relative; flex: 1 1 0; min-width: 130px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--ink); }
.hp-vis-step:not(:last-child)::after { content: ""; position: absolute; right: -8px; top: 50%; width: 7px; height: 7px; border-top: 1.5px solid var(--line-strong); border-right: 1.5px solid var(--line-strong); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.hp-vis-flow--loop .hp-vis-step { border-color: var(--accent); }
.hp-vis-layers { list-style: none; counter-reset: vlayer; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hp-vis-layer { counter-increment: vlayer; position: relative; padding: 13px 16px 13px 54px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.hp-vis-layer::before { content: counter(vlayer); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.hp-vis-ltitle { display: block; font-size: var(--text-base); font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.hp-vis-ltext { display: block; font-size: var(--text-sm); line-height: 1.5; color: var(--ink-soft); }
.hp-vis-check { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-vis-checkitem { display: flex; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.hp-vis-cmark { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 4px; background: var(--accent-tint); border: 1.5px solid var(--accent); position: relative; }
.hp-vis-cmark::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); }
.hp-vis-cname { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.hp-vis-cdesc { display: block; font-size: var(--text-sm); line-height: 1.5; color: var(--ink-soft); margin-top: 1px; }

/* ---- vision FAQ accordion (CSS-only, details/summary) ---- */
.hp-vis-faq { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.hp-vis-faq-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.hp-vis-faq-q { cursor: pointer; padding: 14px 46px 14px 18px; font-weight: 600; font-size: 0.95rem; color: var(--ink); list-style: none; position: relative; }
.hp-vis-faq-q::-webkit-details-marker { display: none; }
.hp-vis-faq-q::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; font-weight: 400; line-height: 1; color: var(--accent); transition: transform var(--dur-fast); }
.hp-vis-faq-item[open] .hp-vis-faq-q::after { transform: translateY(-50%) rotate(45deg); }
.hp-vis-faq-item[open] .hp-vis-faq-q { border-bottom: 1px solid var(--line); }
.hp-vis-faq-q:hover { color: var(--accent); }
.hp-vis-faq-a { padding: 13px 18px 15px; }
.hp-vis-faq-a p { margin: 0; font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); }

/* ---- forms ---- */
.hp-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.hp-form label, .hp-form-row label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-form input, .hp-form textarea, .hp-form select, .hp-form-row input, .hp-inline input {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 10px 12px; font-family: var(--font-sans); font-size: var(--text-base);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.hp-form textarea { resize: vertical; line-height: 1.6; }
.hp-form input:focus, .hp-form textarea:focus, .hp-form select:focus, .hp-form-row input:focus, .hp-inline input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint);
}
.hp-form button, .hp-form-row button {
  align-self: flex-start; background: var(--accent); color: var(--on-accent);
  border: none; border-radius: var(--radius-md); padding: 10px 18px;
  font-family: var(--font-sans); font-weight: 600; font-size: var(--text-sm); cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.hp-form button:hover, .hp-form-row button:hover { background: var(--accent-press); }
.hp-form button:active { transform: translateY(1px); }
.hp-btn-ghost { display: inline-block; margin-top: 16px; color: var(--accent); font-size: var(--text-sm); font-weight: 500; }
.hp-btn-ghost:hover { text-decoration: underline; }
.hp-reply { margin-top: 8px; }

/* ---- admin ---- */
.hp-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.hp-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); padding: 20px; }
.hp-panel h2 { font-size: var(--text-base); margin-bottom: 16px; color: var(--ink); }
.hp-panel-note { color: var(--ink-faint); font-size: var(--text-sm); margin: -8px 0 14px; }
.hp-panel.hp-wide { margin-top: 16px; }
.hp-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.hp-table th { text-align: left; font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.hp-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hp-form-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.hp-form-row input { width: auto; flex: 1; }
.hp-inline summary { cursor: pointer; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); }
.hp-chip-form { display: inline; margin: 0; }
.hp-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; padding: 4px 6px 4px 10px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-pill); font-size: var(--text-sm); }
.hp-chip button { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.hp-chip button:hover { color: var(--danger); }
.hp-chip.is-mod { border-color: var(--accent); background: var(--accent-tint); }
.hp-chip-name { font-weight: 500; color: var(--ink); }
.hp-chip-modtag { margin-left: 5px; font-family: var(--font-mono); font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 5px; }
.hp-chip .hp-chip-mod { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 2px 8px; line-height: 1.3; white-space: nowrap; }
.hp-chip .hp-chip-mod:hover { background: var(--accent); color: #fff; }
.hp-chip.is-mod .hp-chip-mod { color: var(--ink-soft); border-color: var(--line-strong); }
.hp-chip.is-mod .hp-chip-mod:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.hp-chip .hp-chip-x { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px 8px; line-height: 1.3; white-space: nowrap; }
.hp-chip .hp-chip-x:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.hp-people-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---- empty / restricted ---- */
.hp-empty { text-align: center; padding: 64px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.hp-empty h2 { color: var(--ink); margin-bottom: 8px; }
.hp-empty p { color: var(--ink-soft); margin: 0 auto; max-width: 46ch; }
.hp-restricted .hp-btn-ghost { margin-top: 18px; }

/* ---- footer ---- */
.hp-foot { text-align: center; padding: 28px; color: var(--ink-faint); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-wide); border-top: 1px solid var(--line); }
.hp-foot span { color: var(--ink-soft); }
.hp-error { background: var(--danger-tint); border: 1px solid #E6B3AD; color: var(--danger); padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--text-sm); }

/* ---- login ---- */
.hp-login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: radial-gradient(720px 420px at 50% -8%, var(--accent-tint), transparent 70%), var(--paper); }
.hp-login { width: 100%; max-width: 380px; text-align: center; }
.hp-login-brand { display: inline-flex; margin-bottom: 18px; font-size: var(--text-2xl); }
.hp-login-brand .logo__mark { filter: drop-shadow(0 4px 14px rgba(11,110,98,0.18)); }
.hp-login-tag { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--ink-faint); margin: 0 0 26px; }
.hp-prompt { color: var(--accent); margin-right: 6px; }
.hp-cursor { display: inline-block; width: 7px; height: 1em; background: var(--accent); margin-left: 4px; vertical-align: -2px; animation: hp-blink 1.1s steps(1) infinite; }
@keyframes hp-blink { 50% { opacity: 0; } }
.hp-login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md); }
.hp-login-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-faint); }
.hp-login-form input { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 11px 12px; font-size: var(--text-base); font-family: var(--font-sans); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.hp-login-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.hp-login-form button { margin-top: 4px; background: var(--accent); color: var(--on-accent); border: none; border-radius: var(--radius-md); padding: 12px; font-weight: 600; font-size: var(--text-sm); cursor: pointer; font-family: var(--font-sans); transition: background var(--dur-fast); }
.hp-login-form button:hover { background: var(--accent-press); }
.hp-login-foot { margin-top: 18px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-faint); letter-spacing: var(--tracking-wide); }
.hp-login-legal { max-width: 380px; margin: 22px auto 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.hp-login-legal p { font-size: 0.6875rem; line-height: 1.6; color: var(--ink-faint); margin: 0 0 9px; }
.hp-legal-head { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--ink-soft); font-size: 0.625rem; margin-bottom: 10px; }
.hp-login-legal strong { color: var(--ink-soft); font-weight: 600; }

/* ---- responsive / motion ---- */
@media (max-width: 640px) {
  .hp-topbar { gap: 7px; padding: 0 12px; }
  .hp-main { padding: 28px 16px 64px; }
  .hp-user-name, .hp-role, .logo__wm { display: none; }
  .hp-nav { gap: 0; margin-left: 0; }
  .hp-nav a { padding: 6px 8px; }
  .hp-topic-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hp-manifesto { padding: 20px 18px; }
  .hp-manifesto-title { font-size: 1.3rem; }
  .hp-manifesto-list li { padding-left: 34px; }
  .hp-ledger-row { flex-direction: column; gap: 3px; }
  .hp-ledger-name { flex-basis: auto; }
  .hp-doc-prose { padding: 18px 16px 22px; }
  .hp-doc-bar { gap: 8px; padding: 10px 14px; }
  .hp-doc-tabs { margin-left: 0; }
  .hp-doc-prose h1 { font-size: 1.4rem; }
  .hp-doc-prose h2 { font-size: 1.1rem; }
  .hp-hero-title { font-size: 1.7rem; }
  .hp-hero-sub { font-size: 0.98rem; }
  .hp-hero-headline { font-size: 1.95rem; max-width: none; }
  .hp-hero-cols { grid-template-columns: 1fr; gap: 16px; }
  .hp-vis-toc-list { column-count: 1; }
  .hp-doc-rich .hp-vis-h2 { font-size: 1.3rem; margin-top: 44px; padding-top: 24px; }
  .hp-vis-steps { grid-auto-flow: row; grid-auto-columns: auto; gap: 20px; }
  .hp-vis-stp { flex-direction: row; align-items: flex-start; text-align: left; gap: 14px; flex-wrap: wrap; }
  .hp-vis-stp:not(:last-child)::after { display: none; }
  .hp-vis-stp-num { width: 38px; height: 38px; font-size: 0.95rem; }
  .hp-vis-stp-ic { margin: 0; align-self: center; }
  .hp-vis-stp-t { width: 100%; margin-top: 4px; }
  .hp-mk-body { flex-direction: column; }
  .hp-mk-side { width: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .hp-mk-nav { flex-direction: row; flex-wrap: wrap; }
  .hp-mk-regions { grid-template-columns: 1fr; }
  .hp-mk-req { flex-wrap: wrap; }
  .hp-mk-req-b { margin-left: 0; }
  .hp-mk-body--ed { grid-template-columns: 1fr; }
  .hp-mk-scenes { border-right: none; border-bottom: 1px solid var(--line); }
  .hp-mk-tools { border-left: none; border-top: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hp-mk-share { margin-top: 0; margin-left: auto; }
  .hp-mk-stats2 { grid-template-columns: 1fr 1fr; }
  .hp-mk-vtile { width: 124px; }
  .hp-mk-i18n-head { display: none; }
  .hp-mk-i18n-row { grid-template-columns: 1fr; gap: 5px; }
  .hp-mk-i18n-st { justify-self: start; }
  .hp-vis-fab span { display: none; }
  .hp-vis-fab { padding: 12px; }
  .hp-stat-grid, .hp-stat-grid--3 { grid-template-columns: 1fr 1fr; }
  .hp-compare { grid-template-columns: 1fr; }
  .hp-vis-flow { flex-direction: column; }
  .hp-vis-step { min-width: 0; }
  .hp-vis-step:not(:last-child)::after { right: 50%; top: auto; bottom: -8px; transform: translateX(50%) rotate(135deg); }
  .hp-chart-val { font-size: 20px; }
  .hp-chart-glabel { font-size: 23px; }
  .hp-chart-legend { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
