:root,
html[data-theme="light"] {
  --bg: #f6f1ea;
  --bg-2: #fffaf4;
  --card: #ffffff;
  --desk: #e6ddd2;
  --line: rgba(40, 28, 20, 0.14);
  --ink: #1c1612;
  --muted: #5c534c;
  --red: #c20f1e;
  --btn: #c20f1e;
  --red-dim: rgba(194, 15, 30, 0.12);
  --good: #246b32;
  --warn: #8a5208;
  --info: #1d5c78;
  --hold: #5c534c;
  --shadow: 0 18px 40px rgba(40, 28, 20, 0.1);
  --tabbar: #fffdf9;
  --toast-bg: #1c1612;
  --toast-ink: #f6f1ea;
  --sheet-dim: rgba(28, 22, 18, 0.45);
  --bezel: #1c1612;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #161210;
  --bg-2: #1e1914;
  --card: #241e18;
  --desk: #0c0a09;
  --line: rgba(244, 238, 228, 0.14);
  --ink: #f4eee4;
  --muted: #c4b6a6;
  --red: #ff8d97;
  --btn: #e11d2e;
  --red-dim: rgba(225, 29, 46, 0.2);
  --good: #8dcc72;
  --warn: #e0a04a;
  --info: #7eb6d4;
  --hold: #b7aa9c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --tabbar: #100e0c;
  --toast-bg: #fffaf4;
  --toast-ink: #161210;
  --sheet-dim: rgba(0, 0, 0, 0.6);
  --bezel: #090807;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 100% -10%, var(--red-dim), transparent 55%),
    var(--desk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: var(--red-dim); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }

.site-header, main, .site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 22px 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { border-radius: 10px; }
.brand-name { display: block; font-weight: 700; letter-spacing: -0.02em; }
.brand-sub { display: block; color: var(--muted); font-size: 13px; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-left: auto;
}
.site-nav > a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site-nav > a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, .docket-title {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
h1 { font-size: clamp(40px, 6vw, 68px); margin: 0 0 14px; }
h2 { font-size: clamp(32px, 4vw, 46px); margin: 0 0 10px; }
h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lede { font-size: 19px; max-width: 40rem; margin: 0 0 20px; }
.fine { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.fine a { font-weight: 600; }

.btn, .theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost, .theme-btn {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.theme-btn { min-height: 38px; padding: 4px 12px; font-size: 14px; }
.btn:focus-visible, .theme-btn:focus-visible, a:focus-visible, .step-toggle:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 36px;
  align-items: end;
  padding: 28px 0 10px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.docket, .form, .device {
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.docket {
  border-radius: 18px;
  padding: 18px 18px 16px;
}
.docket-title { font-size: 28px; margin: 0 0 12px; }
.docket ol { list-style: none; margin: 0; padding: 0; }
.docket li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.when { color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.docket-job { display: grid; min-width: 0; }
.docket-job span { color: var(--muted); font-size: 14px; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--red-dim);
  color: var(--red);
  white-space: nowrap;
}
.pill.warn { background: rgba(224, 160, 74, 0.2); color: var(--warn); }
.pill.info { background: rgba(110, 168, 201, 0.2); color: var(--info); }
.pill.good { background: rgba(125, 186, 98, 0.2); color: var(--good); }
.pill.hold { background: rgba(141, 127, 114, 0.2); color: var(--hold); }

.section { padding: 54px 0 10px; }
.section-head { max-width: 40rem; margin-bottom: 22px; }
.section-head p:last-child { margin: 0; color: var(--muted); }

.tour {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}
.steps { list-style: none; margin: 0; padding: 0; }
.step-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  padding: 14px 2px;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--red);
}
.step-label { display: grid; }
.step-label em {
  font-style: normal;
  color: var(--muted);
  font-size: 14px;
}
.step-body { display: none; padding: 0 2px 16px 50px; }
.step.is-on .step-body { display: block; }
.step-body p { margin: 0 0 10px; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.step-actions a { font-weight: 600; font-size: 15px; }
.tour-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.device-wrap { position: sticky; top: 16px; }
.device {
  position: relative;
  border-radius: 28px;
  background: var(--bezel);
  color: var(--ink);
  padding: 12px 12px 10px;
  border-color: #000;
}
.device-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f4eee4;
  padding: 2px 6px 10px;
}
.device-top img { border-radius: 7px; }
.device-name { font-weight: 700; font-size: 14px; }
.device-sub { color: #b7aa9a; font-size: 11px; }
.demo-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff8a93;
  background: rgba(225, 29, 46, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
}
.device-screen {
  background:
    radial-gradient(420px 180px at 90% -10%, var(--red-dim), transparent 50%),
    var(--bg);
  color: var(--ink);
  border-radius: 16px 16px 0 0;
  height: min(520px, calc(100dvh - 220px));
  min-height: 380px;
  overflow: auto;
  padding: 14px 12px 16px;
}
.device-caption { color: var(--muted); font-size: 13px; margin: 8px 4px 0; }
.screen-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}
.device-screen h3.screen-title {
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
  font-size: 26px;
  margin: 2px 0 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat, .card, .person, .chase {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat { padding: 10px; }
.stat b { display: block; font-size: clamp(14px, 2.4vw, 18px); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.card, .person, .chase {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 0 0 8px;
  box-shadow: 0 8px 16px rgba(40, 28, 20, 0.05);
}
.card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.card.wide { grid-template-columns: minmax(0, 1fr) auto; }
.card > span { min-width: 0; }
.title { display: block; font-weight: 700; }
.meta { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.card.is-hot, .person.is-hot, .chase.is-hot {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}
.money { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.card-side { display: grid; justify-items: end; gap: 4px; }
.person {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  grid-row: span 2;
}
.person .today { grid-column: 2; color: var(--muted); font-size: 13px; margin-top: -4px; }
.list-head {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.screen-note { color: var(--muted); font-size: 13px; }
.chase .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chase .action, .sheet .action {
  border: 0;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  min-height: 36px;
  padding: 6px 10px;
  flex: 0 0 auto;
}
.ghost {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 0;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--tabbar);
  border-radius: 0 0 16px 16px;
  border-top: 1px solid var(--line);
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 48px;
  font-size: 11px;
  font-weight: 700;
}
.tabs button[aria-pressed="true"] { color: var(--red); }

.sheet[hidden], .toast[hidden] { display: none !important; }
.sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 58px;
  bottom: 10px;
  background: var(--sheet-dim);
  border-radius: 16px;
  display: flex;
  align-items: flex-end;
  z-index: 2;
}
.sheet-card {
  background: var(--bg-2);
  border-radius: 16px;
  padding: 12px;
  width: 100%;
  max-height: 78%;
  overflow: auto;
}
.sheet h3 { text-transform: none; letter-spacing: 0; font-size: 22px; margin: 4px 0; }
.toast {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: var(--toast-ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  z-index: 3;
  width: max-content;
  max-width: calc(100% - 36px);
  text-align: center;
}

.int-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
}
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.sheet-list li:last-child { border-bottom: 1px solid var(--line); }
.sheet-list p { margin: 4px 0 0; color: var(--muted); }
.ask strong::after {
  content: "Not connected";
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
}

.form {
  border-radius: 18px;
  padding: 18px;
  max-width: 820px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.span { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.form-status { margin: 0; min-height: 1.4em; }
.form-status.bad { color: var(--red); }

.site-footer {
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .hero, .tour, .int-grid, .form-grid { grid-template-columns: 1fr; }
  .site-nav { margin-left: 0; }
  .tour { display: flex; flex-direction: column; }
  .device-wrap { order: -1; position: static; }
  .device { max-width: 420px; }
  .step-body { padding-left: 0; }
  .span { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
