:root {
  color-scheme: dark;
  --void: #07090c;
  --bay: #0c1118;
  --panel: #121821cc;
  --stroke: #2a3544;
  --ice: #e8eef6;
  --mute: #8b9bb0;
  --amber: #f0a202;
  --signal: #3ee0c5;
  --critical: #ff4d4d;
  --warn: #f0a202;
  --ok: #3ee0c5;
  --ease: 200ms ease;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(232, 238, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 238, 246, 0.03) 1px, transparent 1px),
    var(--void);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--ice);
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--ice); }
img, video { max-width: 100%; display: block; }
h1, h2, h3, .wordmark, .splash-mark, .eyebrow {
  font-family: Syne, "Avenir Next", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 0.95; margin: 0 0 0.6rem; }
h2 { margin: 0 0 0.45rem; font-size: 1.35rem; }
p { line-height: 1.5; }
.splash {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--void);
}
.splash-mark {
  margin: 0;
  letter-spacing: 0.28em;
  font-size: 1.4rem;
}
button, .button {
  min-height: 44px;
  border: 1px solid var(--stroke);
  background: rgba(240, 162, 2, 0.12);
  color: var(--ice);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
button:hover, .button:hover { border-color: var(--amber); background: rgba(240, 162, 2, 0.22); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.fat, .kiosk button, .steps button, .keypad button, .segment a, .concerns button { min-height: 56px; }
.primary { background: var(--amber); color: var(--void); border-color: var(--amber); font-weight: 600; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bay); z-index: 9; padding: 8px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(7, 9, 12, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--stroke);
}
.wordmark {
  color: var(--ice);
  text-decoration: none;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  white-space: nowrap;
}
.subline { margin: 0; color: var(--mute); font-size: 0.78rem; letter-spacing: 0.04em; }
.brand { display: grid; }
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.topbar nav a, .top-actions a, .top-actions button, .overflow summary {
  color: var(--ice);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 8px 12px;
}
.topbar nav a[aria-current="page"] { color: var(--amber); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.hamburger { display: none; }
.who { color: var(--mute); font-size: 0.85rem; }
.overflow { position: relative; }
.overflow summary { list-style: none; cursor: pointer; letter-spacing: 0.2em; }
.overflow summary::-webkit-details-marker { display: none; }
.overflow-menu {
  position: absolute;
  right: 0;
  top: 110%;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: rgba(12, 17, 24, 0.96);
  border: 1px solid var(--stroke);
  border-radius: 16px;
}
.tabbar { display: none; }
main { padding: 0 0 72px; }
.flash { margin: 12px 18px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--panel); }
.flash.bad { border-color: var(--critical); }
.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 28px 18px 40px;
  color: var(--mute);
  font-size: 0.86rem;
  max-width: 1180px;
  margin: 0 auto;
}
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media, .hero-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-still { animation: ken 18s ease-in-out infinite alternate; }
@keyframes ken {
  from { transform: scale(1); }
  to { transform: scale(1.06) translate3d(-1.5%, 0, 0); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 12, 0.15), rgba(7, 9, 12, 0.92));
}
.hero-copy { position: relative; padding: 12vh 22px 48px; max-width: 820px; }
.copy-line { font-size: 1.25rem; color: var(--ice); }
.lede { color: var(--mute); font-family: "IBM Plex Mono", ui-monospace, monospace; }
.cta-row, .row-actions, .filters, .plan-row, .admin-links, .segment { display: flex; flex-wrap: wrap; gap: 10px; }
.doors, .split, .cluster, .dvi-grid, .persona-grid, .ad-grid { display: grid; gap: 14px; }
.door {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.door span, .door h2, .door p { position: relative; }
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 12, 0.88));
}
.panel, .job, .row, .line, .persona, .ad, .ad-reserved, .invoice {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(14px);
  transition: border-color var(--ease), transform var(--ease);
}
.section { max-width: 1180px; margin: 0 auto; padding: 28px 18px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 28px 18px; }
.eyebrow { color: var(--amber); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.16em; margin: 0 0 8px; }
.fine { color: var(--mute); font-size: 0.9rem; }
.plate, .plate-read { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0.12em; }
.plate-read {
  font-size: clamp(1.4rem, 6vw, 2.2rem);
  background: #05070a;
  color: var(--amber);
  padding: 14px;
  border-radius: 16px;
  min-height: 64px;
}
label { display: grid; gap: 6px; }
input, textarea, select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(7, 9, 12, 0.65);
  padding: 10px 12px;
}
textarea { min-height: 96px; }
.stack, .queue, .steps, .checks { display: grid; gap: 12px; }
.chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.badge.ACTIVE { color: var(--ok); border-color: rgba(62, 224, 197, 0.45); }
.badge.PAST_DUE { color: var(--critical); border-color: rgba(255, 77, 77, 0.5); }
.live { color: var(--signal); }
.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(62, 224, 197, 0.7);
  animation: pulse 1.6s ease-out infinite;
  display: inline-block;
  margin-right: 6px;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(62, 224, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 224, 197, 0); }
}
.timeline { display: grid; gap: 0; border-left: 1px solid var(--stroke); margin-left: 8px; }
.job { margin: 0 0 12px 16px; position: relative; }
.job::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}
.job.story { border-color: var(--amber); }
.keypad { display: flex; flex-wrap: wrap; gap: 8px; }
.keypad button { width: calc(14.2% - 8px); min-width: 44px; background: #0c1118; }
.segment { display: grid; grid-template-columns: 1fr 1fr; }
.segment a { text-decoration: none; }
.segment a.on, .chip-btn.on, .fat.on, .concerns button.on, .plan-row button.on {
  background: var(--amber);
  color: var(--void);
  border-color: var(--amber);
}
.steps { list-style: none; padding: 0; }
.steps li { border: 1px solid var(--stroke); border-radius: 18px; padding: 8px; background: rgba(12, 17, 24, 0.55); }
.steps li.open { border-color: var(--amber); }
.hard-stop {
  background: rgba(255, 77, 77, 0.12);
  border: 1px solid var(--critical);
  border-radius: 18px;
  padding: 16px;
  font-size: 1.15rem;
}
.persona { display: grid; grid-template-columns: 72px 1fr; gap: 12px; text-align: left; width: 100%; background: var(--panel); color: var(--ice); }
.persona img { width: 72px; height: 72px; object-fit: cover; border-radius: 16px; }
.persona .pin { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--amber); }
.cluster article {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 14px 16px;
}
.cluster article span { display: block; color: var(--mute); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.cluster article strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 2rem;
  font-weight: 500;
}
.spark { width: 100%; height: 48px; }
.spark polyline { fill: none; stroke: var(--amber); stroke-width: 2; }
.dvi { overflow: hidden; padding: 0; }
.dvi img { height: 140px; width: 100%; object-fit: cover; }
.dvi div { padding: 12px; }
.dvi-RED { box-shadow: inset 3px 0 0 var(--critical); }
.dvi-YELLOW { box-shadow: inset 3px 0 0 var(--warn); }
.dvi-GREEN { box-shadow: inset 3px 0 0 var(--ok); }
.device {
  width: min(420px, 100%);
  margin: 18px auto;
  border: 1px solid var(--stroke);
  border-radius: 32px;
  background: #05070a;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.device-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--mute);
}
.device-hero { position: relative; }
.device-hero img { height: 180px; width: 100%; object-fit: cover; }
.device-hero p {
  position: absolute;
  left: 12px;
  bottom: 10px;
  margin: 0;
  font-size: 0.85rem;
}
.device-body { padding: 12px 14px 18px; display: grid; gap: 10px; }
.thread { list-style: none; padding: 0; display: grid; gap: 8px; }
.bubble { max-width: 92%; padding: 10px 12px; border-radius: 16px; background: #161d28; }
.bubble.customer { margin-left: auto; background: rgba(240, 162, 2, 0.16); }
.bubble span { display: block; color: var(--mute); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.perks { display: grid; gap: 10px; margin: 0; }
.perks div {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
}
.perks dt { font-weight: 600; }
.perks dd { margin: 0; color: var(--mute); }
.invoice { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.invoice h1, .invoice h2 { font-family: Syne, sans-serif; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--stroke); vertical-align: top; }
.totals .grand { font-size: 1.15rem; }
.ad-kicker { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.ad-reserved { border-style: dashed; color: var(--mute); }
.gate {
  margin: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.admin-shell { border-top: 1px solid var(--stroke); }
.plain { padding-left: 1.1rem; }
.marks { list-style: none; padding: 0; }
.mark { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.checkline, .checks label, .flag-list label { display: flex; gap: 10px; align-items: center; }
.flag-list, .checks { list-style: none; padding: 0; }
.table-wrap { overflow-x: auto; }
.qr svg { width: min(220px, 70vw); height: auto; background: white; border-radius: 12px; }
.hours { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--mute); }

@media (min-width: 860px) {
  .doors { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr 0.9fr; }
  .cluster { grid-template-columns: repeat(3, 1fr); }
  .dvi-grid { grid-template-columns: 1fr 1fr; }
  .persona-grid { grid-template-columns: 1fr 1fr; }
  .ad-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .hamburger { display: inline-flex; margin-left: auto; }
  .topbar nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    padding: 12px;
    flex-direction: column;
    background: rgba(7, 9, 12, 0.96);
    border: 1px solid var(--stroke);
    border-radius: 18px;
  }
  .topbar nav.open { display: flex; }
  .top-actions .who { display: none; }
  .keypad button { width: calc(25% - 8px); }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    justify-content: space-around;
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(7, 9, 12, 0.92);
    border-top: 1px solid var(--stroke);
    backdrop-filter: blur(16px);
  }
  .tabbar a { color: var(--mute); text-decoration: none; font-size: 0.75rem; min-height: 44px; display: grid; place-items: center; }
  .tabbar a[aria-current="page"] { color: var(--amber); }
}

@media print {
  .topbar, .tabbar, .site-foot, .no-print, .hamburger { display: none !important; }
  body { background: white; color: black; }
  .invoice { border: 0; }
}
