: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(1240px, 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; }
.lede-extra { font-size: 17px; max-width: 40rem; margin: -8px 0 20px; color: var(--muted); }
.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: stretch;
  padding: 28px 0 10px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-visual {
  margin: 0;
  height: 0;
  min-height: 100%;
  display: flex;
  align-items: stretch;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(28, 22, 16, 0.18),
    0 4px 12px rgba(28, 22, 16, 0.10);
}
.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero {
  align-items: stretch;
}
@media (max-width: 860px) {
  .hero-visual {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }
}

.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-intro { margin: 10px 0 0; color: var(--muted); max-width: 42rem; }
.tour-hint { margin: 10px 0 0; color: var(--muted); max-width: 42rem; }
.tour-hint a { font-weight: 600; }

/* Tour intro: use full section width on wide screens */
#walkthrough .section-head {
  max-width: none;
}
#walkthrough .tour-intro,
#walkthrough .tour-hint {
  max-width: min(72rem, 100%);
}
@media (min-width: 900px) {
  #walkthrough .tour-intro,
  #walkthrough .tour-hint {
    max-width: none;
  }
}

.tour-pair {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 28px;
}
.tour-phone,
.device-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.device-wrap { position: static; }
.tour-phone .device-phone,
.device-wrap .device-desk {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.device-phone {
  width: 100%;
  max-width: 320px;
}
.device-phone .device-screen {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  display: block;
  grid-template-columns: none;
}
/* Phone cards: stack so text never crushes the status pill */
.device-phone .card {
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "when title"
    "when pill";
  align-items: start;
  gap: 4px 8px;
}
.device-phone .card > .when { grid-area: when; }
.device-phone .card > span:not(.when):not(.pill) { grid-area: title; min-width: 0; }
.device-phone .card > .pill { grid-area: pill; justify-self: start; }
.device-phone .card.wide {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "side";
}
.device-phone .card.wide > span:first-child { grid-area: title; }
.device-phone .card.wide > .card-side { grid-area: side; }
.device-phone .device-screen h3.screen-title { font-size: 22px; }
.device-phone .tabs button { font-size: 11px; padding: 8px 4px; }

.device-desk {
  width: 100%;
  display: grid;
  grid-template-areas:
    "top"
    "tabs"
    "screen";
  grid-template-rows: auto auto auto;
  min-height: 0;
  height: auto;
}
.device-desk .device-top { grid-area: top; }
.device-desk .tabs { grid-area: tabs; }
.device-desk .device-screen { grid-area: screen; }
.device-desk .sheet, .device-desk .toast { grid-area: screen; }

.tour-pair .device-phone .device-screen {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}
.tour-pair .device-desk .device-screen {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: hidden;
}
.tour-pair .device-caption {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
}
.device-desk .device-screen {
  flex: 1 1 auto;
  /* single column list — matches phone, no crushed 2-col */
  display: flex;
  flex-direction: column;
  gap: 0;
  grid-template-columns: none;
}

.modes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.mode-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(40, 28, 20, 0.08);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.mode-card:hover {
  box-shadow: 0 14px 28px rgba(40, 28, 20, 0.12);
}
.mode-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.mode-card.is-on {
  border: 2px solid var(--red);
  background: var(--red-dim);
  box-shadow: 0 0 0 3px var(--red-dim), 0 12px 28px rgba(194, 15, 30, 0.12);
}
.mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mode-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mode-check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: transparent;
}
.mode-card.is-on .mode-check {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(194, 15, 30, 0.35);
}
.mode-blurb {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.mode-detail { margin-top: 14px; }
.mode-detail p { margin: 0 0 10px; }
.mode-detail-actions a { font-weight: 600; }
.api-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: var(--bg-2);
  font-size: 13px;
  color: var(--muted);
}
.api-banner .pill { flex: 0 0 auto; }
.device-screen { position: relative; }
.fab {
  position: sticky;
  bottom: 10px;
  float: right;
  clear: both;
  width: 48px;
  height: 48px;
  margin: 8px 4px 4px auto;
  border: 0;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.device-wrap { position: sticky; top: 16px; }

.device-desk {
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
}
.device-desk .device-top {
  color: var(--ink);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.device-desk .device-sub { color: var(--muted); }
.device-desk .demo-pill {
  color: var(--red);
  background: var(--red-dim);
}
.device-desk .tabs {
  border-radius: 0;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.device-desk .device-screen {
  border-radius: 0;
  height: auto;
  min-height: 0;
  max-height: none;
}

.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;
}

.offer-story {
  display: grid;
  gap: 18px;
  max-width: 46rem;
}

/* On the phone: art height matches the three story cards */
#integrations .phone-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
  gap: 28px 40px;
  align-items: stretch;
}
#integrations .offer-story {
  max-width: none;
  height: auto;
}
#integrations .phone-visual {
  margin: 0;
  /* Take row height from the text cards — don't inflate the row */
  height: 0;
  min-height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
#integrations .phone-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 16px;
  box-shadow:
    0 18px 40px rgba(28, 22, 16, 0.18),
    0 4px 12px rgba(28, 22, 16, 0.10);
}
@media (max-width: 860px) {
  #integrations .phone-layout {
    grid-template-columns: 1fr;
  }
  #integrations .phone-visual {
    height: auto;
    min-height: 0;
    order: -1;
    max-width: 420px;
    margin-inline: auto;
    aspect-ratio: 3 / 4;
  }
  #integrations .phone-visual img {
    height: 100%;
  }
}
.story-beat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.story-beat h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.story-beat p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.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;
}


/* Desk board: wide screens show an office computer layout, not a phone bezel */
@media (min-width: 980px) {
  .site-header, main, .site-footer {
    width: min(1280px, calc(100% - 48px));
  }
  .site-header {
    padding-top: 28px;
  }
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
    gap: 48px;
    padding-top: 36px;
    align-items: center;
  }
  .lede { font-size: 20px; max-width: 42rem; }
  .section { padding: 64px 0 14px; }
  .section-head { max-width: 46rem; }
  .tour-pair {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 36px;
  }
  .device-desk {
    border-radius: 18px;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-areas:
      "top"
      "tabs"
      "screen";
    grid-template-rows: auto auto auto;
    min-height: 0;
  }
  .device-desk .device-top { grid-area: top; }
  .device-desk .tabs { grid-area: tabs; }
  .device-desk .device-screen { grid-area: screen; }
  .device-desk .sheet, .device-desk .toast { grid-area: screen; }
  .device-desk .device-top {
    color: var(--ink);
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    gap: 10px;
  }
  .device-desk .device-sub { color: var(--muted); font-size: 12px; }
  .device-desk .demo-pill {
    color: var(--red);
    background: var(--red-dim);
  }
  .device-desk .tabs {
    border-radius: 0;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
  }
  .device-desk .tabs button {
    min-height: 44px;
    font-size: 13px;
  }
  .device-desk .device-screen {
    border-radius: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    grid-template-columns: none;
  }
  .device-desk .device-screen > .screen-title { margin-bottom: 4px; }
  .device-desk .sheet {
    left: 16px;
    right: 16px;
    top: 108px;
    bottom: 16px;
    border-radius: 14px;
  }
  .device-desk .sheet-card {
    max-width: 520px;
    margin: 0 auto 12px;
    max-height: 86%;
  }
  .device-desk .toast {
    bottom: 24px;
  }
  .form {
    max-width: none;
    padding: 22px 24px;
  }
  .int-grid { gap: 36px 56px; }
  .device-caption { margin-top: 10px; font-size: 14px; }
}

@media (min-width: 1200px) {
  .tour-pair {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .hero, .int-grid, .form-grid { grid-template-columns: 1fr; }
  .site-nav { margin-left: 0; }
  .tour-pair {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .device-phone { max-width: 360px; margin: 0 auto; }
  .device-wrap { width: 100%; max-width: 520px; }
  .device { max-width: 100%; }
  .span { grid-column: auto; }
}

/* Tour pair: desk sets height; phone clips to the same line */
.tour-pair {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 28px;
}
.tour-pair .device-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Natural height — this column defines the row */
  height: auto;
}
.tour-pair .tour-phone {
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Do not let phone content inflate the row; match desk height */
  height: 0;
  min-height: 100%;
  overflow: hidden;
}
.tour-pair .tour-phone .device-phone {
  flex: 1 1 auto;
  width: 100%;
  max-width: 320px;
  display: grid;
  grid-template-areas:
    "top"
    "screen"
    "tabs";
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.tour-pair .device-phone .device-top { grid-area: top; }
.tour-pair .device-phone .device-screen {
  grid-area: screen;
  display: block !important;
  grid-template-columns: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  scrollbar-width: none;
  position: relative;
}
.tour-pair .device-phone .device-screen::-webkit-scrollbar { display: none; }
.tour-pair .device-phone .tabs { grid-area: tabs; flex-shrink: 0; }
.tour-pair .tour-phone .device-caption {
  flex-shrink: 0;
  margin-top: 10px;
}
.tour-pair .device-wrap .device-desk,
.tour-pair .device-desk {
  flex: 0 0 auto;
  /* Fixed chrome — tab changes must not resize the frame */
  height: 520px !important;
  min-height: 520px !important;
  max-height: 520px !important;
  display: grid;
  grid-template-areas:
    "top"
    "tabs"
    "screen";
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}
.tour-pair .device-desk .device-screen {
  display: flex !important;
  flex-direction: column;
  grid-template-columns: none !important;
  grid-area: screen;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  flex: 1 1 auto !important;
}
.tour-pair .device-phone .card {
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "when title"
    "when pill";
  gap: 4px 8px;
}
.tour-pair .device-phone .card > .when { grid-area: when; }
.tour-pair .device-phone .card > span:not(.when):not(.pill):not(.card-side) { grid-area: title; min-width: 0; }
.tour-pair .device-phone .card > .pill { grid-area: pill; justify-self: start; margin-top: 2px; }
.tour-pair .device-caption { text-align: center; margin-top: 10px; }
/* Trim note under board on phone so more jobs fit */
.tour-pair .device-phone .screen-note { display: none; }

.tour-pair .device-desk .screen-note { display: none; }
.tour-pair .device-desk .fab {
  position: absolute;
  right: 16px;
  bottom: 12px;
  float: none;
  clear: none;
  margin: 0;
}
.tour-pair .device-desk .device-screen {
  position: relative;
  padding-bottom: 56px !important; /* room for FAB only */
}
.tour-pair .device-phone .fab { width: 42px; height: 42px; }
@media (min-width: 980px) {
  .tour-pair {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 36px;
  }
  .tour-pair .device-wrap .device-desk,
  .tour-pair .device-desk {
    height: 560px !important;
    min-height: 560px !important;
    max-height: 560px !important;
  }
}
@media (max-width: 860px) {
  .tour-pair {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .tour-pair .tour-phone {
    height: auto;
    min-height: 0;
    overflow: visible;
    max-width: 360px;
    width: 100%;
  }
  .tour-pair .tour-phone .device-phone {
    height: 480px;
    max-height: 480px;
  }
  .tour-pair .device-phone .device-screen {
    max-height: none !important;
    overflow: hidden !important;
  }
  .tour-pair .device-wrap .device-desk,
  .tour-pair .device-desk {
    width: 100%;
    max-width: 520px;
    height: 480px !important;
    min-height: 480px !important;
    max-height: 480px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
