/* HOIV design tokens. Brand orange is #FF8A00 — the fleet unified on it in Phase 0 of the
   harmonization audit; #f59e0b and #d97706 are retired, don't reintroduce them.

   Dark-first: the house is a workshop, and most people open this on a phone in a corridor.
   Vanilla CSS, no framework — the fleet convention for the bot dashboards. */

:root {
  --orange: #ff8a00;
  --orange-dim: #cc6e00;
  --orange-glow: rgba(255, 138, 0, 0.15);

  --bg: #0d0d0f;
  --bg-raised: #16161a;
  --bg-input: #1e1e24;
  --border: #2a2a32;
  --border-bright: #3a3a45;

  --text: #f2f2f4;
  --text-muted: #a0a0ab;
  --text-faint: #6b6b78;

  --red: #e74c3c;
  --amber: #f0a020;
  --green: #2ecc71;
  --blue: #3b9ae1;

  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 860px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfc;
    --bg-raised: #ffffff;
    --bg-input: #f2f2f5;
    --border: #e2e2e8;
    --border-bright: #cfcfd8;
    --text: #16161a;
    --text-muted: #5a5a66;
    --text-faint: #8a8a96;
  }
}

* {
  box-sizing: border-box;
}

/* Any class that sets `display` silently beats the browser's default [hidden] {display:none},
   so an element with the hidden attribute stays on screen. This bit us with the TEST MODE badge
   rendering on the live public page. Make hidden mean hidden, once, for everything. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--orange);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ── header ─────────────────────────────────────────────────────────────── */
header.top {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
/* The real logo. Two files, because the wordmark is black in one and near-white in the other —
   the orange H mark is identical in both. We swap by colour scheme rather than tinting with a
   filter, so the brand asset is always rendered exactly as supplied.
   logo.png            → black wordmark, for LIGHT backgrounds
   logo-alternative.png → light wordmark, for DARK backgrounds */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 26px;
  width: auto;
  display: block;
}
.logo .logo-dark {
  display: block;
}
.logo .logo-light {
  display: none;
}
@media (prefers-color-scheme: light) {
  .logo .logo-dark {
    display: none;
  }
  .logo .logo-light {
    display: block;
  }
}
.spacer {
  flex: 1;
}
.navlink {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.navlink:hover {
  color: var(--text);
  text-decoration: none;
}

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--orange-glow), transparent 70%);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  margin: 0 0 14px;
  font-weight: 800;
}
.hero p.sub {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-muted);
  margin: 0;
  max-width: 640px;
}

/* ── sections ───────────────────────────────────────────────────────────── */
section.block {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
section.block:last-of-type {
  border-bottom: 0;
}
.prose h2 {
  font-size: 26px;
  margin: 0 0 14px;
}
.prose p {
  margin: 0 0 14px;
  color: var(--text-muted);
}
.prose strong {
  color: var(--text);
  font-weight: 600;
}
.prose ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text-muted);
}
.prose li {
  margin-bottom: 7px;
}
.prose li::marker {
  color: var(--orange);
}

/* ── cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* Emergency numbers. Red on purpose: this is the one thing on the page that must be findable
   in a hurry, and brand colour would bury it in the rest of the orange. */
.emergency {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(231, 76, 60, 0.08), transparent);
}
.emergency .num {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.03em;
}
.emergency .lbl {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.person .name {
  font-weight: 650;
  margin-bottom: 2px;
}
.person .role {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.person a.tel {
  font-family: var(--mono);
  font-size: 15px;
}

/* ── forms ──────────────────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
}
.hint {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 5px 0 0;
  line-height: 1.5;
}
input[type='text'],
input[type='email'],
input[type='datetime-local'],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: transparent;
}
.field {
  margin-bottom: 18px;
}
.row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
  }
}

/* The honeypot. Must be invisible to humans but not display:none — some bots skip hidden
   fields, and the ones that don't are exactly the ones we want to catch. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 14px;
  cursor: pointer;
}
.check input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--orange);
  flex-shrink: 0;
}
.check span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

button,
.btn {
  background: var(--orange);
  color: #14140f;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  padding: 12px 22px;
  cursor: pointer;
  transition: filter 0.12s;
}
button:hover:not(:disabled),
.btn:hover {
  filter: brightness(1.1);
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}
button.ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-faint);
}

/* ── feedback ───────────────────────────────────────────────────────────── */
.notice {
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14.5px;
  margin-bottom: 18px;
}
.notice.ok {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.35);
}
.notice.err {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.35);
}
.notice.warn {
  background: rgba(240, 160, 32, 0.1);
  border: 1px solid rgba(240, 160, 32, 0.35);
}

.ref {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}
.badge.test {
  background: var(--amber);
  color: #14140f;
  border-color: transparent;
}

footer.bot {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
