/* ---------- Color scheme ---------- */
:root {
  --bg:          #18191b;   /* very dark grey page */
  --surface:     #1f2023;   /* framed content area */
  --paper:       #26282b;   /* the letter */
  --paper-back:  #2d2f33;   /* sheets stacked behind the letter */
  --text:        #e6e7e8;
  --text-muted:  #a3a6aa;
  --accent:      #1a9960;
  --accent-hover:#21b673;
  --border:      #303236;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- Top bar and main navigation ---------- */
/* Logo, then the main links, then Sign in and Get started on the right.
   It stays at the top while scrolling. The markup lives in tools/site/header.html
   and assets/nav.js runs the dropdowns and the phone menu. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.topbar.is-scrolled { border-bottom-color: var(--border); }
[id] { scroll-margin-top: 84px; }   /* in-page links land below the sticky header */

.nav { flex: 1; min-width: 0; }
.nav__list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav__link:hover { background: #222326; }
.nav__link[aria-current] { color: var(--accent-hover); }
.nav__toggle {
  width: 24px;
  height: 34px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.nav__toggle::before {          /* chevron */
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s;
}
.nav__toggle[aria-expanded="true"]::before { transform: translateY(1px) rotate(-135deg); }
.nav__toggle:hover { color: var(--text); }
.nav__toggle:focus-visible,
.nav__link:focus-visible,
.nav-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.nav__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5);
}
.nav__toggle[aria-expanded="true"] + .nav__menu { display: grid; }
@media (min-width: 901px) {
  .nav__item--menu:hover > .nav__menu,
  .nav__item--menu:focus-within > .nav__menu { display: grid; }
  /* The hover background covers the word and its arrow together */
  .nav__item--menu { border-radius: 6px; padding-right: 2px; }
  .nav__item--menu:hover,
  .nav__item--menu:focus-within,
  .nav__item--menu:has(.nav__toggle[aria-expanded="true"]) { background: #222326; }
  .nav__item--menu .nav__link:hover { background: none; }
}
.nav__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.nav__menu a:hover,
.nav__menu a:focus-visible { background: #2f3135; outline: none; }
.nav__menu a[aria-current] { color: var(--accent-hover); }

/* Products: Platform and Hardware side by side, Integrations across the bottom */
.nav__menu--wide { width: 540px; padding: 14px; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.nav__group ul { margin: 0; padding: 0; list-style: none; }
.nav__heading { margin: 2px 0 4px; }
.nav__menu .nav__heading a {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav__menu .nav__heading a:hover { color: var(--text); background: none; }
.nav__menu .nav__heading a::after { content: " →"; letter-spacing: 0; }
.nav__menu .nav__feature {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 12px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  white-space: normal;
}
.nav__feature strong { display: block; font-weight: 600; }
.nav__feature span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.nav__feature[aria-current] strong { color: var(--accent-hover); }
.nav__item--signin { display: none; }

.topbar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.nav-button { display: none; }

.topbar__ghost {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #222326;
}
.topbar__ghost:hover { background: #2a2c2f; }

.logo { display: inline-flex; flex: none; color: var(--text); }
.logo__img { display: block; height: 28px; width: auto; }

/* Phones and small tablets: links fold into a menu under the header */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .topbar__ghost { display: none; }
  .nav-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #222326;
    color: var(--text);
    cursor: pointer;
  }
  .nav-button__bars,
  .nav-button__bars::before,
  .nav-button__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .15s, background .15s;
  }
  .nav-button__bars { position: relative; }
  .nav-button__bars::before,
  .nav-button__bars::after { content: ""; position: absolute; left: 0; }
  .nav-button__bars::before { top: -6px; }
  .nav-button__bars::after { top: 6px; }
  .topbar.is-open .nav-button__bars { background: transparent; }
  .topbar.is-open .nav-button__bars::before { transform: translateY(6px) rotate(45deg); }
  .topbar.is-open .nav-button__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav { display: none; order: 3; flex: 1 0 100%; }
  .topbar.is-open .nav {
    display: block;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    border-top: 1px solid var(--border);
    padding: 6px 0 10px;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { flex-wrap: wrap; }
  .nav__link { flex: 1; font-size: 16px; padding: 12px 4px; }
  .nav__link:hover { background: none; }
  .nav__toggle { width: 44px; height: 44px; margin: 0; }
  .nav__menu {
    position: static;
    flex: 1 0 100%;
    min-width: 0;
    padding: 0 0 8px 12px;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .nav__menu a { font-size: 15px; padding: 9px 12px; }
  .nav__menu--wide { width: auto; grid-template-columns: minmax(0, 1fr); }
  .nav__heading { margin-top: 6px; }
  .nav__menu .nav__feature { margin-top: 6px; padding: 10px 12px; border-top: 0; }
  .nav__item--signin { display: flex; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 4px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 6px;
  transition: background .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn--large { font-size: 18px; padding: 14px 28px; }

/* ---------- Main frame ---------- */
main {
  margin: 0 24px;
  background: var(--surface);
  border-radius: 4px;
  padding-bottom: 72px;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 24px 24px;
  max-width: 900px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.hero__eyebrow {
  display: block;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero__line { display: block; }

/* Big error number on the 404 page */
.hero__code {
  display: block;
  font-size: clamp(72px, 14vw, 128px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__sub {
  font-size: clamp(17px, 2vw, 22px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  text-wrap: balance;
}

/* ---------- The letter ---------- */
.letter {
  padding: 56px 22px 0;
}

.letter__stack {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

/* Two sheets peeking out from behind, slightly rotated */
.letter__stack::before,
.letter__stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper-back);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
.letter__stack::before { transform: rotate(2.2deg) translate(6px, -4px); }
.letter__stack::after  { transform: rotate(-1.4deg) translate(-4px, 2px); background: #2a2c30; }

.letter__page {
  position: relative;
  z-index: 1;
  background: var(--paper);
  padding: 52px 56px;
  font-size: 15px;
  line-height: 1.55;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.05),
    0 3px 28px -16px rgba(0,0,0,.4),
    0 6px 38px -18px rgba(0,0,0,.5),
    0 16px 28px -30px rgba(0,0,0,.6);
}

.letter__page p { margin: 0 0 1.2em; }

.letter__page a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
.letter__page a:hover { color: var(--accent-hover); }

/* ---------- Signature ---------- */
.letter__signature {
  padding-top: 32px;
}

.letter__byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.avatar {
  flex: none;
  object-fit: cover; /* for when the initials become a photo */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.letter__byline dl { margin: 0; }
.letter__byline dt { font-weight: 600; }
.letter__byline dd { margin: 0; color: var(--text-muted); }

/* ---------- Section headings ---------- */
html { scroll-behavior: smooth; }

/* Small, quiet label above the letter */
.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.features h2,
.faq h2,
.cta h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  margin: 0 0 24px;
  text-wrap: balance;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 72px 24px 0;
}
.cta p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Features ---------- */
.features {
  max-width: 960px;
  margin: 0 auto;
  padding: 88px 24px 0;
}
.features__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 20px 22px;
}
.feature h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 680px;
  margin: 0 auto;
  padding: 88px 24px 0;
}
.faq__item {
  border-top: 1px solid var(--border);
  /* side padding gives the highlight room; the negative margin keeps text aligned */
  padding: 20px 16px;
  margin: 0 -16px;
}

/* Brief green highlight when a letter link jumps to a section (assets/highlight.js) */
@keyframes section-highlight {
  0%, 65% {
    box-shadow: inset 0 0 0 999px rgba(26, 153, 96, .14), 0 0 0 2px var(--accent);
  }
  100% {
    box-shadow: inset 0 0 0 999px rgba(26, 153, 96, 0), 0 0 0 2px rgba(26, 153, 96, 0);
  }
}
.is-highlighted { animation: section-highlight 2.8s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .is-highlighted { animation-timing-function: steps(1, end); }
}
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__item h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.faq__item p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* ---------- Inner pages (Get started, Contact, Thanks) ---------- */
.hero--compact { padding-top: 56px; }
.hero--compact h1 { font-size: clamp(28px, 4.5vw, 44px); }
.hero--thanks { padding-bottom: 32px; }
.hero__sub a { color: var(--accent); }
.hero__actions { margin: 28px 0 0; }

.form-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

/* The Tally forms use a dark theme with a transparent background,
   so they sit on the same dark "paper" as the letter. */
.form-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 20px 24px;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
.form-card { position: relative; }
.form-card iframe {
  display: block;
  opacity: 0;               /* hidden until Tally finishes loading (see assets/forms.js) */
  transition: opacity .25s ease;
}
.form-card.is-loaded iframe { opacity: 1; }

/* "Loading…" note shown in the card until the form appears */
.form-card::before {
  content: "Loading form…";
  position: absolute;
  top: 32px;
  left: 24px;
  color: var(--text-muted);
  font-size: 14px;
  transition: opacity .2s ease;
}
.form-card.is-loaded::before { opacity: 0; }
.form-card:has(.form-placeholder)::before { content: none; }

.form-placeholder {
  border: 2px dashed var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 64px 20px;
}

.form-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 16px 0 0;
}

.form-note--small { font-size: 13px; margin-top: 8px; }
.form-note a { color: var(--accent); }

/* ---------- Legal pages (Privacy, Terms) ---------- */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 0;
  font-size: 16px;
  line-height: 1.65;
}
.legal h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 40px 0 12px;
}
.legal h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--accent); }

.contact {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: start;
}
.contact h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
.contact__details {
  font-style: normal;
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 24px;
}
.contact__details p { margin: 0 0 14px; }
.contact__details p:last-child { margin-bottom: 0; }
.contact__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact__aside {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Integrations (hub and partner pages) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.crumbs {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--border); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs + .hero--compact { padding-top: 32px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 3px 10px;
  border-radius: 999px;
  background: #2f3135;
  color: var(--text);
  text-decoration: none;
}
a.tag:hover { background: #393b40; }
.tag span { color: var(--text-muted); font-weight: 400; margin-left: 2px; }
.tag--accent { background: rgba(26, 153, 96, .18); color: #8fdcb8; }

.monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(26, 153, 96, .16);
  box-shadow: inset 0 0 0 1px rgba(26, 153, 96, .35);
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.monogram--large { width: 64px; height: 64px; font-size: 22px; border-radius: 12px; }

/* Partner logos sit on a white tile: most are dark artwork made for light
   backgrounds. The tile size is fixed and the logo scales to fit inside it,
   so wide wordmarks and square icons line up the same way. */
.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  flex: none;
}
.logo-tile img {
  display: block;
  width: 78%;
  object-fit: contain;   /* the logo scales to fit this box, keeping its shape */
}
.logo-tile--small { align-self: stretch; height: 72px; }
.logo-tile--small img { height: 36px; }
.logo-tile--small.logo-tile--compact img { height: 48px; }
.logo-tile--large { width: 100%; height: 112px; }
.logo-tile--large img { height: 56px; }
.logo-tile--large.logo-tile--compact img { height: 76px; }

/* Hub */
.integrations-tools {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.search {
  width: 100%;
  max-width: 420px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
}
.search::placeholder { color: var(--text-muted); }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tags--nav { justify-content: center; }

.partner-group {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 0;
}
.partner-group h2,
.related h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.partner-group > p { margin: 0 0 20px; color: var(--text-muted); font-size: 15px; }

.partner-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.partner-grid > li { display: flex; }
.partner-grid > li[hidden] { display: none; }
.partner-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s;
}
.partner-card:hover { border-color: var(--accent); }
.partner-card__text { display: grid; gap: 4px; justify-items: start; }
.partner-card__name { font-size: 16px; font-weight: 600; margin: 0; }
.partner-card__tagline { font-size: 14px; color: var(--text-muted); }
.partner-card .tag { margin-top: 4px; }

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px 0;
  margin: 0;
}
.cta__lead {
  max-width: 560px;
  margin: 0 auto 24px !important;
  font-size: 16px !important;
}

/* Partner page */
.integration {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.integration__card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 24px;
  display: grid;
  gap: 14px;
  justify-items: start;
}
.integration__card p { margin: 0; }
.integration__name { font-weight: 600; }
.integration__source { font-size: 13px; }
.integration__source a::after { content: " ↗"; }

.integration__body { font-size: 16px; line-height: 1.65; }
.integration__body h2 { font-size: 20px; font-weight: 600; margin: 32px 0 10px; }
.integration__body h2:first-child { margin-top: 0; }
.integration__body p { margin: 0 0 14px; }
.integration__body ul { margin: 0 0 14px; padding-left: 20px; }
.integration__body li { margin-bottom: 6px; }
.integration__body li::marker { color: var(--accent); }
.callout {
  border-left: 3px solid var(--accent);
  background: rgba(26, 153, 96, .08);
  padding: 10px 14px;
  font-size: 15px;
}
.fine-print { font-size: 13px; color: var(--text-muted); margin-top: 28px !important; }

.related {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 24px 0;
}
.related h2 { margin-bottom: 16px; }
.related__all { margin: 16px 0 0; font-size: 14px; }

@media (max-width: 760px) {
  .integration { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* Phones: logo beside the text, so the long list of cards stays compact */
@media (max-width: 600px) {
  .partner-card { flex-direction: row; align-items: center; padding: 12px; }
  .logo-tile--small { align-self: center; width: 104px; height: 64px; }
  .logo-tile--small img { width: 84%; height: 28px; }
  .logo-tile--small.logo-tile--compact img { height: 40px; }
  .logo-tile--large { height: 96px; }
}

/* ---------- Platform and Hardware pages ---------- */
/* These reuse the integration layout (side card + article) and the hub cards. */
.integration__body h3 { font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
.integration__body h3 a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.integration__body h3 a:hover { color: var(--accent-hover); }
.integration__more { font-size: 13px; color: var(--text-muted); }

.glance { margin: 0; display: grid; gap: 10px; width: 100%; }
.glance dt { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.glance dd { margin: 2px 0 0; font-size: 14px; }
.glance__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }

.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.spec-table th,
.spec-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.spec-table tbody th { font-weight: 600; color: var(--text-muted); width: 38%; }
.spec-table thead th { font-weight: 600; border-bottom: 2px solid var(--accent); }
.spec-table--compare tbody th { width: auto; min-width: 120px; }
.spec-table--compare td { min-width: 150px; }

.integration__body ol.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(26, 153, 96, .18); color: #8fdcb8;
  font-size: 13px; font-weight: 800;
}
.integration__body ul.columns { columns: 2 220px; column-gap: 32px; }
.integration__body ul.columns li { break-inside: avoid; }

.partner-card .tags { margin-top: 6px; }
.partner-grid--wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.partner-grid--wide .partner-card__name { font-size: 20px; }
.partner-group .features__grid { margin-top: 16px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .partner-group .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .partner-group .features__grid { grid-template-columns: 1fr; } }
.logo-tile--photo { height: 180px; }
.logo-tile--photo img { height: 150px; width: 88%; }
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.photo-row figure { margin: 0; }
.photo-row figcaption { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.logo-tile--small.logo-tile--device { height: 128px; }
.logo-tile--small.logo-tile--device img { height: 104px; width: 80%; }
.logo-tile--figure { height: 120px; }
.logo-tile--figure img { height: 96px; width: 86%; }

/* Product screenshots: click to open full size */
.shots { margin: 8px 0 22px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.shots--phones { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* rows of 2+ set their own columns inline */
.shot { display: block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .15s; }
.shot:hover { border-color: var(--accent); }
.shot img { display: block; width: 100%; height: auto; }
.shot--phone { border-radius: 14px; }
.shots figcaption { grid-column: 1 / -1; font-size: 13px; color: var(--text-muted); margin-top: -4px; }
.shot { cursor: zoom-in; }

/* Screenshot viewer (assets/lightbox.js) */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--text);
}
.lightbox::backdrop { background: rgba(10, 11, 12, .92); }
.lightbox__figure {
  margin: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 64px 16px 24px;
}
.lightbox__figure img {
  display: block; max-width: min(100%, 1600px); max-height: calc(100% - 48px);
  width: auto; height: auto; object-fit: contain;
  border-radius: 8px; background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lightbox__figure figcaption { max-width: 720px; text-align: center; font-size: 14px; color: var(--text-muted); }
.lightbox__close {
  position: fixed; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--paper); color: var(--text);
  font: inherit; font-size: 28px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__close:hover { border-color: var(--accent); color: #fff; }
.lightbox__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.lightbox-open { overflow: hidden; }

.hub-shot { max-width: 960px; margin: 0 auto; padding: 16px 24px 0; }
.hub-shot .shots { margin: 0; }
.hub-shot figcaption { text-align: center; }

@media (max-width: 600px) {
  .shots[style] { grid-template-columns: minmax(0, 1fr) !important; }   /* stack paired screenshots */
  .shot--phone { width: 100%; max-width: 220px; justify-self: center; }
  .partner-grid--wide { grid-template-columns: 1fr; }
  /* Device cards keep the photo on top on phones (only a handful of them, so length isn't an issue) */
  .partner-card--device { flex-direction: column; align-items: stretch; padding: 14px; gap: 12px; }
  .partner-card--device .logo-tile--device { align-self: stretch; width: auto; height: 160px; }
  .partner-card--device .logo-tile--device img { height: 128px; width: 70%; }
  .spec-table th, .spec-table td { padding: 8px; }
}

/* ---------- About ---------- */
.about { max-width: 960px; margin: 0 auto; padding: 24px 24px 0; }
.about__block { padding-top: 48px; }
.about__block h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.about__block > p { font-size: 17px; color: #c9cbce; max-width: 720px; margin: 0 0 14px; }
.about__grid { margin-top: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.about__founder { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: start; scroll-margin-top: 84px; }
.about__photo { width: 200px; height: 200px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.about__founder .hero__eyebrow { margin-bottom: 6px; }
.about__founder h2 { margin-bottom: 2px; }
.about__role { color: var(--text-muted); margin: 0 0 14px; }
.about__founder p:not(.hero__eyebrow):not(.about__role) { font-size: 16px; color: #c9cbce; }
.about__links { font-size: 15px; }
@media (max-width: 600px) {
  .about__founder { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .about__photo { width: 140px; height: 140px; }
}

/* ---------- Guides (/guides/...) ---------- */
.guide { max-width: 760px; margin: 0 auto; padding: 32px 24px 0; }
.guide__head h1 { font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 14px; }
.guide__head .hero__eyebrow { margin-bottom: 12px; }
.guide__dek { font-size: 19px; color: #c9cbce; margin: 0 0 20px; }
.guide__byline { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--text-muted); }
.guide__byline .avatar { width: 32px; height: 32px; border-radius: 50%; }
.guide__answer {
  margin: 32px 0 0; padding: 22px 24px; background: var(--paper);
  border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.guide__answer > p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
.guide__answer-label { font-size: 12px !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-hover); margin-bottom: 8px !important; }
.guide__answer .lp-checks { font-size: 15px; }
.guide-toc { margin: 28px 0 8px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 8px; }
.guide-toc p { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.guide-toc ol { margin: 0; padding-left: 20px; columns: 2 220px; column-gap: 28px; font-size: 15px; }
.guide-toc li { margin-bottom: 6px; break-inside: avoid; }
.guide-toc a { color: var(--text); text-decoration-color: #3a3d42; text-underline-offset: 3px; }
.guide-toc a:hover { color: var(--accent-hover); }
.guide__body { padding-top: 12px; }
.guide__body h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 44px 0 12px; }
.guide__body ol.steps { margin-top: 10px; }
.guide__body .spec-table a { color: var(--text); }
.guide-figure { margin: 22px 0 8px; }
.guide-figure svg { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); }
.guide-figure text { font-family: Inter, system-ui, sans-serif; }
.guide-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.guide-related { max-width: 760px; margin: 0 auto; padding: 56px 24px 0; }
.guide-related h2 { font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.guide-related .tag { font-size: 14px; padding: 6px 14px; }

/* ---------- Landing page (/landing/...) ---------- */
/* Pared-down header, full-bleed hero with a dash cam clip, alternating feature blocks,
   a quote form and a sticky call-to-action bar on phones. Built by tools/landing/build.py. */
.lp-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: rgba(24, 25, 27, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.lp-top__actions { display: flex; align-items: center; gap: 18px; }
.lp-phone { display: grid; text-align: right; color: var(--text); text-decoration: none; line-height: 1.25; }
.lp-phone strong { font-size: 16px; }
.lp-phone span { font-size: 12px; color: var(--text-muted); }
.lp-phone:hover strong { color: var(--accent-hover); }

.lp-main { max-width: none; padding-bottom: 72px; }
.lp-eyebrow {
  margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-hover);
}
.lp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 24px 0 0; }
.lp-ghost {
  display: inline-block; padding: 13px 22px; border-radius: 6px; border: 1px solid #3a3d42;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; background: rgba(255,255,255,.04);
}
.lp-ghost:hover { border-color: var(--accent); }
.lp-link { color: var(--text-muted); font-size: 14px; }
.lp-link:hover { color: var(--text); }

/* Hero: the semi truck photo behind, darkened toward the text */
.lp-hero { position: relative; overflow: hidden; border-radius: 4px 4px 0 0; }
.lp-hero__bg { position: absolute; inset: 0; }
.lp-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; opacity: .45; }
.lp-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(24,25,27,.97) 0%, rgba(24,25,27,.85) 45%, rgba(24,25,27,.55) 100%),
              linear-gradient(0deg, var(--surface) 0%, rgba(31,32,35,0) 30%);
}
.lp-hero__inner {
  position: relative; max-width: 1160px; margin: 0 auto; padding: 72px 32px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
}
.lp-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 18px; }
.lp-hero__sub { font-size: clamp(17px, 1.6vw, 19px); color: #c9cbce; margin: 0; max-width: 34em; }
.lp-proof { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: #c9cbce; }
.lp-proof li::before, .lp-checks li::before {
  content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px;
  border-radius: 50%; background: rgba(26,153,96,.22)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%238fdcb8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* Images and clips */
.lp-media { margin: 0; }
.lp-media img, .lp-media video, .lp-shot {
  display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0,0,0,.45); background: #111;
}
.lp-media figcaption { margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.lp-media--square { max-width: 440px; justify-self: center; }
.lp-media--tall img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 0; max-height: 560px; }

.lp-intro { max-width: 760px; margin: 0 auto; padding: 72px 24px 8px; text-align: center; }
.lp-intro h2, .lp-feature h2, .lp-form h2 {
  font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 14px;
}
.lp-intro p:last-child { font-size: 18px; color: #c9cbce; margin: 0; }

/* Feature blocks: media and text side by side, alternating */
.lp-feature {
  max-width: 1100px; margin: 0 auto; padding: 72px 32px 0;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center;
}
.lp-feature--flip .lp-media { order: 2; }
.lp-feature__text > p:not(.lp-eyebrow):not(.lp-actions) { font-size: 17px; color: #c9cbce; margin: 0 0 18px; }
.lp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 16px; }
.lp-why .lp-media { max-width: 480px; }
.lp-why__list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; font-size: 16px; color: #c9cbce; }
.lp-why__list strong { color: var(--text); display: block; font-size: 17px; }

.lp-form { max-width: 720px; margin: 0 auto; padding: 88px 24px 0; text-align: center; scroll-margin-top: 80px; }
.lp-form__lead { font-size: 17px; color: #c9cbce; margin: 0 auto 24px; max-width: 34em; }
.lp-form .form-card { text-align: left; }

.lp-sticky { display: none; }

@media (max-width: 900px) {
  .lp-hero__inner, .lp-feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-hero__inner { padding: 48px 20px 40px; }
  .lp-feature { padding: 56px 20px 0; }
  .lp-feature--flip .lp-media { order: 0; }
  .lp-hero__bg::after { background: linear-gradient(180deg, rgba(24,25,27,.8) 0%, rgba(24,25,27,.94) 55%, var(--surface) 100%); }
}
@media (max-width: 600px) {
  .lp-top { padding: 10px 14px; gap: 10px; }
  .lp-top__actions { gap: 10px; }
  .lp-phone span { display: none; }
  .lp-phone strong { font-size: 14px; white-space: nowrap; }
  .lp-top .btn { font-size: 13px; padding: 8px 12px; white-space: nowrap; }
  .lp-top .logo__img { height: 22px; }
  .lp-actions .btn--large, .lp-actions .lp-ghost { flex: 1 1 100%; text-align: center; }
  /* Sticky bar at the bottom of the screen, hidden while the form is showing */
  .lp-sticky {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(24,25,27,.95);
    border-top: 1px solid var(--border); transition: transform .2s;
  }
  .lp-sticky .btn { flex: 1; text-align: center; font-size: 16px; padding: 12px; }
  .lp-sticky .lp-ghost { padding: 11px 18px; font-size: 16px; }
  .lp-sticky.is-hidden { transform: translateY(110%); }
  body.lp { padding-bottom: 70px; }
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 32px 24px;
}
.footer p { margin: 0; }
.footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 12px;
}
.footer__nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.footer__nav a:hover { color: var(--accent-hover); }
.footer__contact {
  font-style: normal;
  margin-bottom: 8px;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .logo__img { height: 22px; }
  .topbar__actions .btn { font-size: 13px; padding: 8px 12px; white-space: nowrap; }
  main { margin: 0 8px; }
  .hero { padding-top: 48px; }
  .letter { padding: 40px 12px 0; }
  .letter__page { padding: 32px 24px; }
  .letter__stack::before { transform: rotate(1.5deg) translate(3px, -3px); }
  .letter__stack::after  { transform: rotate(-1deg) translate(-2px, 2px); }
}
