/* Copyright (c) 2026 Plexor Labs, Inc. All rights reserved.
 * Proprietary and confidential - see LICENSE at the repository root.
 * SPDX-License-Identifier: LicenseRef-Plexor-Proprietary
 */
/* The Plexor Labs intranet, drawn in the HiveMind site's own design system (hive.plexorlabs.com).
 * The tokens below are copied verbatim from demo/src/styles/tokens.css, without the demo-only gate,
 * app, ridge, sky, sand and art-line roles. The components follow base.css, ui.css, shell.css and
 * presentation.css in the same folder. intranet.test.mjs checks the copy against the source. */

/* ---------------------------------------------------------------- tokens (demo/src/styles/tokens.css) */
:root {
  --brand-ink: #16181D;  --brand-ink-raise: #1E2128;  --brand-ink-deep: #121419;  --brand-line: #2C313B;
  --brand-paper: #F4F5F3; --brand-card: #FFFFFF;  --brand-mist: #8A93A3;  --brand-mist-ink: #5C636E;
  --brand-teal: #0BB8BE; --brand-teal-deep: #057C81;

  --bg: var(--brand-paper); --surface: var(--brand-card); --warm: #ECEEEA; --warm-2: #E4E6E2;
  --text: #14171C; --text-2: #4A515B; --text-3: var(--brand-mist-ink);
  --line: #E4E6E2; --line-2: #D5D8D3;
  --control-edge: #7A8393;
  --accent: var(--brand-teal-deep);
  --accent-hi: var(--brand-teal);
  --accent-tint: rgba(11,184,190,.07); --accent-edge: rgba(11,184,190,.50);
  --primary-bg: var(--brand-ink); --primary-fg: var(--brand-paper); --primary-hover: #2A2D35;
  --ok: #1E7A46; --ok-tint: #E3F5EC; --ok-edge: #BFE3D3;
  --stop: #AD3A2E; --stop-tint: #FBEAE7; --stop-edge: #F0CDC7;
  --honey: #9A6407; --honey-hi: #B17C2C; --honey-tint: #FDF2DF; --honey-edge: #F0DCB6; --honey-deep: #6D4705;
  --scrim: rgba(20,24,29,.28);

  --site-cta-hover: #14C7CD; --site-shadow: 0 24px 48px rgba(0,0,0,.45);

  --veil: rgba(255,255,255,.10);
  --shadow: 0 1px 2px rgba(20,24,29,.04), 0 8px 24px rgba(20,24,29,.06);
  --shadow-tile: 0 1px 2px rgba(20,24,29,.18);

  --space-1: 2px; --space-2: 4px; --space-3: 6px; --space-4: 8px; --space-5: 10px; --space-6: 12px;
  --space-7: 14px; --space-8: 16px; --space-9: 20px; --space-10: 24px; --space-11: 28px;
  --space-12: 32px; --space-13: 40px; --space-14: 48px; --space-15: 56px; --space-16: 64px;
  --r-xs: 6px; --r-md: 10px; --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-pill: 999px;
  --fs-display: 60px; --fs-h1: 36px; --fs-title: 22px; --fs-h2: 20px; --fs-lead: 19px;
  --fs-h3: 18px; --fs-copy: 17px; --fs-body: 16px; --fs-note: 15px; --fs-small: 14px;
  --fs-tiny: 13px; --fs-micro: 12px;
  --tap: 44px; --act: 52px; --mark-h: 52px; --chrome-h: 88px; --gutter: 32px;
  --legal-h: 68px;
  --col-intake: 640px; --col-plan: 760px; --col-wide: 1120px;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (max-width: 1024px) {
  :root { --fs-h1: 34px; --chrome-h: 80px; }
}

@media (max-width: 700px) {
  :root { --fs-display: 40px; --fs-h1: 28px; --fs-lead: 17px; --mark-h: 48px; --chrome-h: 64px; --act: 52px; --gutter: 16px; --legal-h: 108px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--brand-ink); --surface: var(--brand-ink-raise); --warm: #1A1D23; --warm-2: var(--brand-ink-deep);
    --text: var(--brand-paper); --text-2: var(--brand-mist); --text-3: var(--brand-mist);
    --line: var(--brand-line); --line-2: var(--brand-line); --accent: var(--brand-teal); --accent-hi: var(--brand-teal);
    --control-edge: var(--brand-mist);
    --accent-tint: rgba(11,184,190,.10);
    --primary-bg: var(--brand-paper); --primary-fg: var(--brand-ink); --primary-hover: var(--brand-card);
    --ok: #58C08F; --ok-tint: #10291D; --ok-edge: #1C4632; --stop: #E58275; --stop-tint: #331713; --stop-edge: #55241D;
    --honey: #E2AB55; --honey-hi: #E8A33A; --honey-tint: #33270F; --honey-edge: #52401C; --honey-deep: #EEC685;
    --scrim: rgba(6,8,11,.55);
    --veil: rgba(20,24,29,.10);
    --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.24);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--brand-ink); --surface: var(--brand-ink-raise); --warm: #1A1D23; --warm-2: var(--brand-ink-deep);
  --text: var(--brand-paper); --text-2: var(--brand-mist); --text-3: var(--brand-mist);
  --line: var(--brand-line); --line-2: var(--brand-line); --accent: var(--brand-teal); --accent-hi: var(--brand-teal);
  --control-edge: var(--brand-mist);
  --accent-tint: rgba(11,184,190,.10);
  --primary-bg: var(--brand-paper); --primary-fg: var(--brand-ink); --primary-hover: var(--brand-card);
  --ok: #58C08F; --ok-tint: #10291D; --ok-edge: #1C4632; --stop: #E58275; --stop-tint: #331713; --stop-edge: #55241D;
  --honey: #E2AB55; --honey-hi: #E8A33A; --honey-tint: #33270F; --honey-edge: #52401C; --honey-deep: #EEC685;
  --scrim: rgba(6,8,11,.55);
  --veil: rgba(20,24,29,.10);
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.24);
  color-scheme: dark;
}

@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --bg: #F4F5F3; --surface: #FFFFFF; --warm: #ECEEEA; --warm-2: #E4E6E2;
    --text: #14171C; --text-2: #4A515B; --text-3: #5C636E; --line: #E4E6E2; --line-2: #D5D8D3;
    --control-edge: #7A8393;
    --accent: #057C81; --accent-hi: #0BB8BE; --honey-edge: #F0DCB6; --honey-deep: #6D4705;
    color-scheme: light;
  }
}

/* The console's own addition: commands are set in the system's monospace face. */
:root { --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
/* Read by the site's craft probe (e2e/demo/craft-probe.mjs): honey has one home here, the honest note. */
:root { --role-honey: ".hm-honest"; }

/* ---------------------------------------------------------------- base (base.css) */
@font-face {
  font-family: "Montserrat";
  src: url("/static/montserrat-var-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
html, body, button, input, textarea, select { font-family: var(--sans); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
svg { display: block; }
a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
p, li, dd, dt { text-wrap: pretty; }
.hm-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
.hm-skip {
  position: absolute;
  left: var(--gutter);
  top: -64px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--brand-teal);
  color: var(--brand-ink);
  font-weight: 700;
  text-decoration: none;
}
.hm-skip:focus { top: 10px; }

/* ---------------------------------------------------------------- the site header (presentation.css) */
.hm-site {
  --mark-h: 64px;
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: var(--brand-ink);
  border-bottom: 1px solid var(--brand-line);
  color: var(--brand-paper);
}
.hm-site-nav {
  min-height: var(--mark-h);
  max-width: calc(var(--col-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 24px;
}
.hm-site :focus-visible { outline: 3px solid var(--brand-teal); outline-offset: 2px; }
.hm-site-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-width: 0;
  min-height: var(--tap);
  color: var(--brand-paper);
  text-decoration: none;
  border-radius: var(--r-xs);
}
.hm-site-mk {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-ink-raise);
  border: 1px solid var(--brand-line);
}
.hm-site-mk svg { width: 20px; height: 20px; }
.hm-site-wave { stroke: var(--brand-teal); }
.hm-site-dot { fill: var(--brand-teal); }
.hm-site-name { display: inline-flex; align-items: baseline; gap: 6px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.hm-site-co { color: var(--brand-paper); }
.hm-site-sep { color: var(--brand-mist); font-weight: 400; }
.hm-site-prod { color: var(--brand-teal); }

/* Wide: the sections, the person and Sign out stand in the bar, on the right. */
.hm-site-menu { display: flex; align-items: center; gap: 24px; margin-left: auto; min-width: 0; }
.hm-site-links { display: flex; align-items: center; gap: 24px; }
.hm-site-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-mist);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r-xs);
  transition: color .15s;
}
.hm-site-link:hover { color: var(--brand-paper); }
/* The current section is underlined as well as teal, so it never rests on colour alone. */
.hm-site-link[aria-current="page"] { color: var(--brand-teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hm-site-me { display: flex; align-items: center; gap: 12px; padding-left: 24px; border-left: 1px solid var(--brand-line); }
.hm-site-who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px 0 4px;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-pill);
  background: var(--brand-ink-raise);
  color: var(--brand-mist);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.hm-site-avatar {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-teal);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.hm-site-out button {
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--brand-paper);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.hm-site-out button:hover { border-color: var(--brand-mist); background: var(--brand-ink-raise); }

/* The toggle opens without a script: a checkbox the CSP allows, drawn as plexorlabs.com's three bars. */
.hm-site-check { display: none; }
.hm-site-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-md);
  color: var(--brand-mist);
  cursor: pointer;
}
.hm-site-toggle:hover { color: var(--brand-paper); border-color: var(--brand-mist); }
.hm-site-bars { position: relative; width: 20px; height: 14px; }
.hm-site-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.hm-site-bars span:nth-child(1) { top: 0; }
.hm-site-bars span:nth-child(2) { top: 6px; }
.hm-site-bars span:nth-child(3) { top: 12px; }

@media (max-width: 1024px) {
  .hm-site-check {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    clip-path: inset(50%);
  }
  .hm-site-toggle { display: inline-flex; }
  .hm-site-check:checked + .hm-site-toggle { color: var(--brand-paper); border-color: var(--brand-mist); }
  .hm-site-check:focus-visible + .hm-site-toggle { outline: 3px solid var(--brand-teal); outline-offset: 2px; }
  .hm-site-check:checked + .hm-site-toggle .hm-site-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
  .hm-site-check:checked + .hm-site-toggle .hm-site-bars span:nth-child(2) { opacity: 0; }
  .hm-site-check:checked + .hm-site-toggle .hm-site-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
  .hm-site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px max(var(--gutter), env(safe-area-inset-right)) 24px max(var(--gutter), env(safe-area-inset-left));
    background: var(--brand-ink);
    border-bottom: 1px solid var(--brand-line);
    box-shadow: var(--site-shadow);
    max-height: calc(100vh - var(--mark-h) - env(safe-area-inset-top));
    max-height: calc(100dvh - var(--mark-h) - env(safe-area-inset-top));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .hm-site-check:checked ~ .hm-site-menu { display: flex; }
  .hm-site-links { flex-direction: column; align-items: stretch; gap: 0; }
  .hm-site-link {
    display: flex;
    padding: 10px 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-paper);
    border-bottom: 1px solid var(--brand-line);
    border-radius: 0;
  }
  .hm-site-me { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 0 0; border-left: 0; }
  .hm-site-who { align-self: flex-start; }
  .hm-site-out button { width: 100%; min-height: 48px; font-size: 16px; }
}
@media (max-width: 700px) {
  .hm-site { --mark-h: 56px; }
}
@media (max-width: 359px) {
  .hm-site-nav { gap: 12px; }
  .hm-site-name { font-size: 15px; gap: 4px; }
}

/* ---------------------------------------------------------------- frame and page head (shell.css, ui.css) */
.hm-main { flex: 1 0 auto; width: 100%; }
.hm-frame {
  max-width: calc(var(--col-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 64px max(var(--gutter), env(safe-area-inset-left));
}
.hm-head { padding: 48px 0 28px; }
.hm-eyebrow {
  margin: 0 0 10px;
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-h1 {
  font-size: var(--fs-h1);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hm-h1 .hm-chip { position: relative; top: -6px; margin-left: 4px; vertical-align: middle; letter-spacing: .04em; }
.hm-sub { font-size: var(--fs-body); line-height: 1.55; color: var(--text-2); }
.hm-note { font-size: var(--fs-small); line-height: 1.5; color: var(--text-3); }
.hm-meta { font-size: var(--fs-tiny); color: var(--text-3); }
.hm-empty {
  padding: 16px 20px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  font-size: var(--fs-small);
  color: var(--text-3);
}

/* The page's own flow: a section head, then its content, with the site's vertical rhythm. */
.hm-body > * + * { margin-top: 16px; }
.hm-body > h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  font-size: var(--fs-h3);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
.hm-body > h2:first-child { margin-top: 0; }
.hm-body > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hm-body > h2 + * { margin-top: 12px; }
.hm-body > .hm-toolbar + *, .hm-body > nav + * { margin-top: 24px; }
.hm-body h3 { font-size: var(--fs-note); line-height: 1.3; font-weight: 700; letter-spacing: -.005em; }

/* ---------------------------------------------------------------- the signed-out column
   A top-aligned centred column at the head's rhythm, as the site's own centred screens set it
   (Reserve.tsx, Admitted.tsx: .hm-col.hm-col-intake.hm-center). Everything in it is centred. */
.hm-gate { max-width: var(--col-intake); margin: 0 auto; padding-top: 48px; text-align: center; }
.hm-gate .hm-body { margin-top: 12px; }
.hm-gate .hm-body > * + * { margin-top: 16px; }
.hm-gate .hm-after { justify-content: center; margin-top: 28px; }
/* A refusal's facts stay a two-column list, the list itself centred. */
.hm-gate .hm-notice dl { grid-template-columns: max-content max-content; justify-content: center; text-align: left; }
.hm-gate .hm-tile { display: block; width: 48px; height: 48px; padding: 10px; margin: 0 auto 24px; border-radius: var(--r-sm); border: 1px solid var(--brand-line); }

/* The company's tile: paper wave on ink (BrandTile.tsx). */
.hm-tile { flex: none; background: var(--brand-ink); box-shadow: var(--shadow-tile); }
.hm-tile svg { width: 100%; height: 100%; }
.hm-tile-wave { stroke: var(--brand-paper); }
.hm-tile-dot { fill: var(--brand-paper); }

/* ---------------------------------------------------------------- buttons (ui.css) */
.hm-pill, .hm-main button, .hm-status-act a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--act);
  min-width: 168px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--primary-bg);
  color: var(--primary-fg);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.hm-pill:hover, .hm-main button:hover, .hm-status-act a:hover { background: var(--primary-hover); }
.hm-pill:active, .hm-main button:active, .hm-status-act a:active { box-shadow: inset 0 0 0 999px var(--veil); transform: translateY(1px); }
/* Secondary: the site's quiet button. */
.hm-quiet-btn, .hm-main .hm-approve-some button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.hm-quiet-btn:hover, .hm-main .hm-approve-some button:hover { border-color: var(--accent-edge); background: var(--surface); }
.hm-main .hm-approve-some button { min-height: var(--act); padding: 0 20px; }
/* Quiet: the site's tinted pill, for a reveal that changes nothing but what this person sees. */
.hm-main .hm-reveal button {
  min-height: var(--tap);
  min-width: 0;
  padding: 0 20px;
  border: 1px solid var(--accent-edge);
  background: var(--accent-tint);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.hm-main .hm-reveal button:hover { border-color: var(--accent); background: var(--accent-tint); }
/* Destructive: a return sends a seal back, so it reads in the stop tone, word first. */
.hm-main .hm-return button, .hm-main form[action="/batch/return"] button {
  border: 1px solid var(--stop-edge);
  background: var(--surface);
  color: var(--stop);
}
.hm-main .hm-return button { min-width: 0; min-height: var(--act); padding: 0 24px; }
.hm-main .hm-return button:hover, .hm-main form[action="/batch/return"] button:hover { background: var(--stop-tint); border-color: var(--stop); }

/* ---------------------------------------------------------------- chips (ui.css) */
.hm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--accent-tint);
  border: 1px solid var(--accent-edge);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.hm-chip-ok { background: var(--ok-tint); border-color: var(--ok-edge); color: var(--ok); }
.hm-chip-stop { background: var(--stop-tint); border-color: var(--stop-edge); color: var(--stop); }
.hm-chip-live { background: var(--accent-tint); border-color: var(--accent-edge); color: var(--accent); }
.hm-chip-quiet { background: var(--warm); border-color: var(--line-2); color: var(--text-2); }

/* ---------------------------------------------------------------- tabs (ui.css) */
.hm-body nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.hm-body nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.hm-body nav a:hover { color: var(--text); }
.hm-body nav a[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow), inset 0 -3px 0 var(--accent); }
.hm-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ---------------------------------------------------------------- the queue: a row list (build.css .hm-tracks) */
.hm-body > ul {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hm-body > ul:empty { display: none; }
.hm-body > ul > li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 60px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--text-2);
}
.hm-body > ul > li:first-child { border-top: 0; }
.hm-body > ul > li > a:first-child { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.005em; }
.hm-body > ul > li > a:first-child:hover { color: var(--accent); text-decoration: underline; }
/* The whole row is the reference link's target (the site's --tap rule). The row holds no other control. */
.hm-body > ul > li > a:first-child::after { content: ""; position: absolute; inset: 0; }
.hm-row-reason { font-size: var(--fs-small); color: var(--text-2); }
.hm-row-meta { margin-left: auto; font-size: var(--fs-tiny); color: var(--text-3); }
.hm-rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hm-rows > p { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-2); }
.hm-rows > p:first-child { border-top: 0; }
.hm-rows a { font-weight: 700; color: var(--text); text-decoration: none; }
.hm-rows a:hover { color: var(--accent); text-decoration: underline; }
.hm-batch-id { font-size: var(--fs-tiny); color: var(--text-3); }
.hm-body > .hm-batch-id { margin-top: 32px; }

/* ---------------------------------------------------------------- cards (screens.css) */
.hm-card, .hm-body > section, .hm-seal, .hm-ladder, .hm-cli, .hm-approve-some, .hm-status {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 24px;
}
.hm-card, .hm-body > section, .hm-seal { box-shadow: var(--shadow); }
.hm-card > h2, .hm-body > section > h2, .hm-seal > h2 {
  font-size: var(--fs-h3);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}
.hm-card > h2 + *, .hm-body > section > h2 + * { margin-top: 12px; }
.hm-card > * + *, .hm-body > section > * + * { margin-top: 12px; }
.hm-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.hm-status > p:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-small); color: var(--text-2); }
.hm-status-act a { min-width: 0; }

/* ---------------------------------------------------------------- tables (legal.css, in the site's face) */
.scroll { overflow-x: auto; }
.hm-card > .scroll { margin: 16px -24px -20px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
th { background: var(--warm); color: var(--text); font-size: var(--fs-tiny); font-weight: 700; white-space: nowrap; }
td { color: var(--text-2); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
td.hm-empty { padding-top: 16px; padding-bottom: 16px; border: 0; border-radius: 0; }

/* ---------------------------------------------------------------- definition lists */
dl:empty { display: none; }
.hm-card dl:not(.hm-facts), .hm-notice dl { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); }
.hm-card dl:not(.hm-facts) > dt, .hm-card dl:not(.hm-facts) > dd, .hm-notice dl > dt, .hm-notice dl > dd { padding: 10px 0; border-top: 1px solid var(--line); }
.hm-card dl:not(.hm-facts) > dt:first-child, .hm-card dl:not(.hm-facts) > dt:first-child + dd,
.hm-notice dl > dt:first-child, .hm-notice dl > dt:first-child + dd { border-top: 0; }
.hm-card dl:not(.hm-facts) > dt, .hm-notice dl > dt { padding-right: 24px; font-size: var(--fs-small); font-weight: 600; color: var(--text-3); }
.hm-card dl:not(.hm-facts) > dd, .hm-notice dl > dd { color: var(--text); overflow-wrap: anywhere; }
/* Any value in a list may be a 64-character hash (/audit's template hashes): it wraps rather than widening a phone page. */
.hm-main dd { overflow-wrap: anywhere; }
.hm-notice dl > dt, .hm-notice dl > dd { border-color: currentColor; }
dd p + p { margin-top: 4px; }

/* ---------------------------------------------------------------- notices (shell.css, waitlist.css, build.css) */
.hm-notice {
  padding: 14px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--warm);
  color: var(--text-2);
  font-size: var(--fs-note);
}
.hm-notice h2 { font-size: var(--fs-h3); line-height: 1.3; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.hm-notice > * + * { margin-top: 8px; }
.hm-notice.is-stop { background: var(--stop-tint); border-color: var(--stop-edge); color: var(--stop); }
.hm-notice.is-stop h2 { color: var(--stop); }
.hm-notice.is-stop dl > dt, .hm-notice.is-stop dl > dd { color: var(--stop); border-color: var(--stop-edge); }
.hm-notice.is-ok { background: var(--ok-tint); border-color: var(--ok-edge); color: var(--ok); }
.hm-notice.is-ok h2 { color: var(--ok); }
.hm-honest {
  padding: 12px 16px;
  border: 1px solid var(--honey-edge);
  border-radius: var(--r-sm);
  background: var(--honey-tint);
  color: var(--honey-deep);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.45;
}
.hm-honest > * + * { margin-top: 4px; }
.hm-after { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-body > .hm-after { margin-top: 24px; }

/* ---------------------------------------------------------------- forms (ui.css, waitlist.css) */
.hm-main label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.hm-label { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.hm-main input:not([type="hidden"]), .hm-main select, .hm-main textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: var(--act);
  padding: 0 16px;
  border: 1px solid var(--control-edge);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hm-main input::placeholder, .hm-main textarea::placeholder { color: var(--text-3); }
.hm-main input:not([type="hidden"]):hover, .hm-main select:hover, .hm-main textarea:hover { border-color: var(--accent-edge); }
/* The same 3px ring as :focus-visible, at 3:1 or better on both surfaces (WCAG 1.4.11). */
.hm-main input:not([type="hidden"]):focus, .hm-main select:focus, .hm-main textarea:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); box-shadow: none; }
.hm-main textarea { padding: 14px 16px; resize: vertical; min-height: 96px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-main textarea[readonly] { background: var(--warm); font-family: var(--mono); font-size: 14px; }
/* The select's caret is two drawn triangles, as the site's waitlist draws it. */
.hm-main select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.hm-form {
  display: grid;
  gap: 20px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.hm-fields-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hm-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.hm-body > .hm-form-actions { margin-top: 24px; }
.hm-ladder dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hm-ladder dl > div { padding: 12px 16px; background: var(--warm); border-radius: var(--r-sm); }
.hm-ladder dt { font-size: var(--fs-tiny); font-weight: 600; color: var(--text-3); }
.hm-ladder-price { margin-top: 2px; font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.hm-ladder dd:not(.hm-ladder-price) { margin-top: 6px; font-size: var(--fs-tiny); color: var(--text-2); }
.hm-ladder .hm-note { margin-top: 12px; }
.hm-ladder .hm-eyebrow { margin-top: 0; }

/* ---------------------------------------------------------------- batch */
.hm-seal > h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.hm-seal > h2 a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--text); text-decoration: none; }
.hm-seal > h2 a:hover { color: var(--accent); text-decoration: underline; }
.hm-seal > .hm-meta { margin-top: 4px; }
/* The app link's target grows to --tap tall without moving the line it sits on. */
.hm-seal > .hm-meta a { display: inline-block; padding-block: 14px; margin-block: -14px; }
.hm-seal-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hm-seal-offer > * + *, .hm-seal-internal > * + * { margin-top: 8px; }
.hm-seal-offer ul { padding-left: 20px; list-style: disc; color: var(--text-2); }
.hm-seal-internal { padding-left: 24px; border-left: 1px solid var(--line); font-size: var(--fs-small); color: var(--text-2); }
.hm-seal-offer > h3, .hm-seal-internal h3 { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.hm-return { display: flex; align-items: flex-end; gap: 12px; padding-top: 8px; }
.hm-return label { flex: 1; }
.hm-approve-some { display: flex; align-items: flex-end; gap: 12px; }
.hm-approve-some label { flex: 1; }
.hm-body > .hm-approve-some { margin-top: 24px; }
.hm-confirm .hm-form-actions { margin-top: 20px; }
/* A short page (a refusal, a result, a confirmation, the price form) reads in the site's plan column. */
.hm-col-plan { max-width: var(--col-plan); }
.hm-confirm > p { font-size: var(--fs-small); color: var(--text-2); }

/* ---------------------------------------------------------------- her page and E2 (#2060 s05), as the site's plan page draws her lines (waitlist.css) */
.hm-her > * + * { margin-top: 8px; }
.hm-her-title { font-size: var(--fs-h3); line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.hm-her .hm-plan-price { color: var(--text); font-weight: 600; }
.hm-her > .hm-her-head { margin-top: 16px; font-size: var(--fs-note); line-height: 1.3; font-weight: 700; color: var(--text); }
.hm-plan-list { display: grid; gap: 4px; padding-left: 20px; list-style: disc; }
.hm-plan-list li { color: var(--text-2); overflow-wrap: anywhere; }
.hm-her-size { display: inline-block; min-width: 4.5em; font-weight: 600; color: var(--text); }
.hm-plan-note { font-size: var(--fs-small); line-height: 1.5; color: var(--text-3); }
.hm-seal-internal dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; }
.hm-seal-internal dt { font-weight: 600; color: var(--text-3); }
.hm-seal-internal dd { color: var(--text); overflow-wrap: anywhere; }
.hm-e2-body { background: var(--warm); color: var(--text); border-color: var(--line); font-family: var(--sans); font-size: var(--fs-small); }
.hm-e2-facts { display: grid; gap: 4px; padding-left: 20px; list-style: disc; font-size: var(--fs-small); color: var(--text-2); }

/* ---------------------------------------------------------------- commands */
pre {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
  background: var(--brand-ink);
  color: var(--brand-paper);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hm-cli > * + * { margin-top: 12px; }
.hm-cli > p:first-child { font-weight: 700; color: var(--text); }
.hm-cli > p { color: var(--text-2); }

/* ---------------------------------------------------------------- the service panel */
.hm-brief, .hm-estimate { padding-top: 16px; border-top: 1px solid var(--line); }
.hm-brief h4 {
  margin: 20px 0 6px;
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hm-brief h3 + h4 { margin-top: 12px; }
/* A cited passage's number, not a field name: it keeps its letters together. */
.hm-brief h4:has(+ blockquote) { letter-spacing: .04em; }
.hm-brief p { color: var(--text); }
/* The brief and its passages keep a reading measure. The facts and the card stay wide. */
.hm-brief > p, .hm-brief > blockquote { max-width: var(--col-plan); }
.hm-brief p + q, .hm-brief q + q { margin-top: 6px; }
q {
  display: inline-block;
  margin: 6px 6px 0 0;
  padding: 2px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--warm);
  color: var(--text-2);
  font-size: var(--fs-small);
}
blockquote {
  padding: 12px 16px;
  border-left: 3px solid var(--accent-edge);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--warm);
  color: var(--text-2);
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}
/* A marked line is bold and underlined, so it never rests on its tint alone (WCAG 1.4.1). */
mark {
  border-radius: var(--r-xs);
  background: var(--accent-tint);
  box-shadow: 0 0 0 2px var(--accent-tint);
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hm-estimate > * + * { margin-top: 12px; }
.hm-estimate dl:not(.hm-facts) > dd { font-size: var(--fs-small); }
.hm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.hm-facts > div { display: grid; gap: 4px; align-content: start; padding: 12px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.hm-facts dt { font-size: var(--fs-tiny); font-weight: 500; color: var(--text-3); }
.hm-facts dd { font-size: var(--fs-h2); line-height: 1.25; font-weight: 700; letter-spacing: -.015em; color: var(--text); overflow-wrap: anywhere; }
.hm-reveal { padding-top: 16px; border-top: 1px solid var(--line); }
.hm-service > p { color: var(--text-2); }

/* ---------------------------------------------------------------- the legal line (shell.css) */
.hm-legal {
  min-height: var(--legal-h);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-10);
  max-width: calc(var(--col-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-6) max(var(--gutter), env(safe-area-inset-right))
           calc(var(--space-6) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: var(--fs-tiny);
  color: var(--text-3);
}
.hm-legal-who { display: flex; align-items: center; gap: var(--space-10); min-width: 0; flex-wrap: wrap; }
/* 12px, as the site's .hm-lockup gap wins over its .hm-legal-lockup gap. */
.hm-legal-lockup { display: inline-flex; align-items: center; gap: 12px; }
.hm-legal-lockup .hm-tile { width: 24px; height: 24px; padding: var(--space-2); border-radius: var(--r-xs); }
.hm-lockup-co { font-size: var(--fs-tiny); font-weight: 700; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.hm-legal-copy { white-space: nowrap; }
.hm-legal-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--space-2); margin-right: calc(-1 * var(--space-6)); }
.hm-legal-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--space-6);
  border-radius: var(--r-xs);
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hm-legal-links a:hover { color: var(--text); background: var(--warm); }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 860px) {
  .hm-seal-body { grid-template-columns: minmax(0, 1fr); }
  .hm-seal-internal { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 72px; }
  .hm-head { padding: 28px 0 20px; }
  .hm-frame { padding-bottom: 32px; }
  .hm-card, .hm-body > section, .hm-seal, .hm-ladder, .hm-cli, .hm-approve-some, .hm-status { padding: 16px; }
  .hm-card > .scroll { margin: 12px -16px -16px; }
  .hm-form { padding: 20px 16px; border-radius: var(--r); }
  .hm-body > h2 { margin-top: 32px; font-size: 17px; }
  .hm-body nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .hm-body nav a { padding: 0 8px; font-size: 14px; }
  .hm-toolbar > form, .hm-toolbar button { width: 100%; }
  .hm-body > ul > li { padding: 12px 16px; }
  .hm-row-meta { flex-basis: 100%; margin-left: 0; }
  .hm-rows > p { padding: 12px 16px; }
  .hm-fields-row, .hm-ladder dl { grid-template-columns: minmax(0, 1fr); }
  .hm-card dl:not(.hm-facts), .hm-notice dl { grid-template-columns: minmax(0, 1fr); }
  .hm-card dl:not(.hm-facts) > dd, .hm-notice dl > dd { padding-top: 0; border-top: 0; }
  .hm-form-actions button, .hm-status-act, .hm-status-act a { width: 100%; }
  .hm-approve-some, .hm-return { flex-direction: column; align-items: stretch; }
  .hm-main .hm-approve-some button, .hm-main .hm-return button { width: 100%; }
  .hm-gate { padding-top: 28px; }
  .hm-gate .hm-pill { width: 100%; }
  .hm-legal { align-items: flex-start; flex-direction: column; justify-content: center; gap: var(--space-4); }
  .hm-legal-links { margin-left: calc(-1 * var(--space-6)); }
  .hm-legal-lockup { gap: 10px; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
}
/* A phone reads a table as one block per row, each value under its column's name (legal.css). */
@media (max-width: 560px) {
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td, td:first-child, td:last-child { display: flex; justify-content: space-between; gap: 16px; padding: 4px 16px; border: 0; text-align: right; }
  td[data-label]::before {
    content: attr(data-label);
    flex: none;
    font-size: var(--fs-micro);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-3);
    text-align: left;
  }
}
@media print {
  .hm-site, .hm-skip { position: static; }
  .hm-site-menu, .hm-site-toggle, .hm-site-check { display: none; }
}

/* ---------------------------------------------------------------- the pause banner (s06, design-final 4.4)
 * Drawn between the header and main while real approvals and sends are paused. It is a stop, so it takes the
 * stop tokens: honey keeps its one home, the honest note (--role-honey). banner.test.mjs pins its markup. */
.paused {
  width: 100%;
  max-width: calc(var(--col-wide) + 2 * var(--gutter));
  margin: 16px auto 0;
  padding: 12px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left));
  background: var(--stop-tint);
  border: 1px solid var(--stop-edge);
  border-left-width: 4px;
  color: var(--stop);
  font-weight: 500;
}
.paused a { color: inherit; font-weight: 700; text-decoration: underline; }
