/* ============================================================
   BASSWICK — Design System
   Ink / Paper / Copper. Fraunces + Archivo + IBM Plex Mono.
   Edit the tokens below to retheme the entire site.
   ============================================================ */

:root {
  /* — Color — clean charcoal range, no crushed black, no grain */
  --ink: #12161d;
  --ink-2: #191e27;
  --ink-3: #222834;
  --line-dark: rgba(242, 238, 229, 0.14);
  --paper: #f4f0e6;
  --paper-2: #ebe6d8;
  --line-light: rgba(11, 13, 18, 0.14);
  --accent: #ff5c28;
  /* dark enough for 4.5:1+ as normal text on --paper, --paper-2, and
     the accent-soft attorney-flag tint */
  --accent-deep: #a83a0e;
  --accent-soft: rgba(255, 92, 40, 0.12);
  --text-on-ink: #ede9df;
  --muted-on-ink: rgba(237, 233, 223, 0.62);
  --text-on-paper: #14161c;
  --muted-on-paper: rgba(20, 22, 28, 0.66);

  /* — Type — Newsreader (editorial display) / Schibsted Grotesk (body) */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Schibsted Grotesk", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  /* — Rhythm — */
  --section-pad: clamp(4.5rem, 10vw, 9rem);
  --container: min(1200px, 92vw);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 4px;
}

/* ============ Reset & base ============ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--text-on-ink);
  background: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--ink); }

/* Focus visibility — never remove, only style */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
/* the bright accent lacks 3:1 against paper — use deep accent there */
.band--paper :focus-visible, .band--paper-2 :focus-visible,
.band--paper.band :focus-visible { outline-color: var(--accent-deep); }
/* …but dark surfaces nested inside light bands need the bright ring back */
.band--paper .plan--onetime :focus-visible, .band--paper-2 .plan--onetime :focus-visible,
.band--paper .side-panel--quiet :focus-visible, .band--paper-2 .side-panel--quiet :focus-visible,
.band--paper .vs-col--auto :focus-visible, .band--paper-2 .vs-col--auto :focus-visible,
.band--paper .mock--after :focus-visible { outline-color: var(--accent); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* (grain overlay removed — depth now comes from the charcoal tonal range,
   hairlines, and spacing rather than noise) */

/* ============ Typography ============ */
h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.8rem, 8vw, 6.2rem); }
h2 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1.12; }
h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.01em; }

.display-em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
/* the "ruler": every section header carries a full-width hairline with the
   mono index as its marker — the site's unifying editorial device */
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: currentColor;
  opacity: 0.35;
}
/* small accent-colored labels need the deep accent on light bands (AA);
   selectors carry the extra class to outrank component defaults below */
.band--paper .eyebrow, .band--paper-2 .eyebrow,
.band--paper .card .card-index, .band--paper-2 .card .card-index,
.band--paper .pipe-node .pipe-icon, .band--paper-2 .pipe-node .pipe-icon { color: var(--accent-deep); }

.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  max-width: 42ch;
  color: var(--muted-on-ink);
}
.band--paper .lede, .band--paper-2 .lede { color: var(--muted-on-paper); }

.mono-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted-on-ink);
}
.band--paper .mono-note, .band--paper-2 .mono-note { color: var(--muted-on-paper); }

/* ============ Layout ============ */
.container { width: var(--container); margin-inline: auto; }

.band { padding-block: var(--section-pad); position: relative; }
.band--paper { background: var(--paper); color: var(--text-on-paper); }
.band--paper-2 { background: var(--paper-2); color: var(--text-on-paper); }
.band--ink-2 { background: var(--ink-2); }

.band-rule { border-top: 1px solid var(--line-dark); }
.band--paper.band-rule, .band--paper-2.band-rule { border-top-color: var(--line-light); }

.section-head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 860px) {
  .section-head--split {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
  }
  .section-head--split .lede { justify-self: end; }
}

.grid-2 { display: grid; gap: 2rem; }
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ============ Header / Nav ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(18, 22, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.nav-bar {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-on-ink);
}
.brand svg { width: 30px; height: 30px; flex: none; transition: transform 0.6s var(--ease); }
.brand:hover svg { transform: rotate(90deg); }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted-on-ink);
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0.15rem;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--text-on-ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }

.nav-bar .nav-cta { display: none; }

@media (min-width: 1000px) {
  .nav-links { display: flex; }
  .nav-bar .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* Mobile menu */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  align-items: center;
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-on-ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (min-width: 1000px) { .nav-toggle { display: none; } }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(76px + env(safe-area-inset-top)) 8vw env(safe-area-inset-bottom);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s var(--ease);
}
.mobile-menu ul { list-style: none; display: grid; gap: 0.4rem; }
.mobile-menu nav a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5.5vw, 1.9rem);
  font-weight: 560;
  text-decoration: none;
  padding: 0.45rem 0;
  color: var(--text-on-ink);
  transform: translateY(1.2rem);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.25s;
}
.mobile-menu.is-open a { transform: none; opacity: 1; }
.mobile-menu a:hover, .mobile-menu a[aria-current="page"] { color: var(--accent); }
.mobile-menu li:nth-child(2) a { transition-delay: 0.04s; }
.mobile-menu li:nth-child(3) a { transition-delay: 0.08s; }
.mobile-menu li:nth-child(4) a { transition-delay: 0.12s; }
.mobile-menu li:nth-child(5) a { transition-delay: 0.16s; }
.mobile-menu li:nth-child(6) a { transition-delay: 0.2s; }
.mobile-menu li:nth-child(7) a { transition-delay: 0.24s; }
.mobile-menu .menu-foot {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
}
body.menu-open { overflow: hidden; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.7rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  /* blunt, set-in-metal buttons — deliberately not pills */
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  will-change: transform;
}
/* pressed state reads as physically pushed */
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #1a0c04; }
.btn--primary:hover { background: var(--accent-deep); color: var(--paper); }
.btn--ghost { border-color: rgba(242, 238, 229, 0.42); color: var(--text-on-ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.band--paper .btn--ghost, .band--paper-2 .btn--ghost { border-color: rgba(11, 13, 18, 0.35); color: var(--text-on-paper); }
.band--paper .btn--ghost:hover, .band--paper-2 .btn--ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); }
.btn--primary { box-shadow: 3px 3px 0 rgba(255, 92, 40, 0.25); }
.btn--primary:hover { box-shadow: 1px 1px 0 rgba(255, 92, 40, 0.25); }
.btn--sm { min-height: 44px; padding: 0.5rem 1.3rem; font-size: 0.92rem; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.text-link:hover { border-bottom-color: var(--accent); }
.band--paper .text-link, .band--paper-2 .text-link { color: var(--accent-deep); }

/* ============ Cards ============ */
.card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--ink-2);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.band--paper .card, .band--paper-2 .card {
  background: var(--paper);
  border-color: var(--line-light);
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 92, 40, 0.55); }

/* corner tick */
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.card:hover::before { opacity: 1; }

.card .card-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.1rem;
  display: block;
}
.card h3 { margin-bottom: 0.7rem; }
.card p { color: var(--muted-on-ink); font-size: 0.98rem; }
.band--paper .card p, .band--paper-2 .card p { color: var(--muted-on-paper); }
.card .text-link { margin-top: 1.2rem; }

/* ============ Reveal animations ============
   Progressive enhancement: content is visible by default. The inline
   head snippet adds .js to <html>; only then is content hidden for the
   scroll-reveal effect. No JS (or blocked JS) = fully visible page. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line-dark);
  padding-block: 1.1rem;
  display: flex;
  user-select: none;
}
.band--paper .marquee { border-color: var(--line-light); }
.marquee-track {
  display: flex;
  flex: none;
  gap: 3rem;
  padding-right: 3rem;
  align-items: center;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
}
.marquee-track .dot { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============ Pricing ============ */
.pricing-grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}
@media (min-width: 700px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }

.plan {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.9rem 1.6rem;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  background: var(--paper);
  /* explicit — .plan is a light card and must not inherit light text
     when placed on a dark band (root cause of invisible plan text) */
  color: var(--text-on-paper);
  position: relative;
}
.plan--popular { border: 2px solid var(--accent-deep); box-shadow: 0 18px 40px -22px rgba(216, 67, 20, 0.45); }
.plan-badge {
  position: absolute;
  top: -0.85rem;
  left: 1.4rem;
  background: var(--accent);
  color: #1a0c04;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}
.plan-name { font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.plan-price { font-family: var(--font-display); font-optical-sizing: auto; font-size: 2.5rem; font-weight: 600; line-height: 1; }
.plan-price small { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted-on-paper); font-weight: 400; }
.plan-desc { font-size: 0.94rem; color: var(--muted-on-paper); flex: 1; }
.plan ul { list-style: none; display: grid; gap: 0.55rem; font-size: 0.92rem; }
.plan ul li { display: flex; gap: 0.55rem; align-items: baseline; }
.plan ul li::before { content: "→"; color: var(--accent-deep); font-family: var(--font-mono); flex: none; }
/* ghost buttons inside light plan cards: dark text/border regardless of band */
.plan .btn--ghost,
.band--paper .plan .btn--ghost,
.band--paper-2 .plan .btn--ghost {
  border-color: rgba(11, 13, 18, 0.35);
  color: var(--text-on-paper);
}
.plan .btn--ghost:hover,
.band--paper .plan .btn--ghost:hover,
.band--paper-2 .plan .btn--ghost:hover {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}
.plan--onetime { background: var(--ink); color: var(--text-on-ink); border-color: var(--line-dark); }
.plan--onetime .plan-desc, .plan--onetime .plan-price small { color: var(--muted-on-ink); }
.plan--onetime ul li::before { color: var(--accent); }
/* ghost buttons inside the dark one-time card must stay light, even inside a paper band */
.plan--onetime .btn--ghost,
.band--paper .plan--onetime .btn--ghost,
.band--paper-2 .plan--onetime .btn--ghost {
  border-color: rgba(242, 238, 229, 0.45);
  color: var(--text-on-ink);
}
.plan--onetime .btn--ghost:hover,
.band--paper .plan--onetime .btn--ghost:hover,
.band--paper-2 .plan--onetime .btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============ Ledger — ruled list, used where card boxes would be noise ============ */
.ledger { display: grid; gap: 0 3.5rem; }
@media (min-width: 860px) {
  .ledger--2col { grid-template-columns: 1fr 1fr; }
}
.ledger-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line-dark);
  align-items: baseline;
}
.band--paper .ledger-item, .band--paper-2 .ledger-item { border-top-color: var(--line-light); }
.ledger-item:last-child { border-bottom: 1px solid var(--line-dark); }
.band--paper .ledger-item:last-child, .band--paper-2 .ledger-item:last-child { border-bottom-color: var(--line-light); }
@media (min-width: 860px) {
  /* in two columns, only the final row needs a closing rule */
  .ledger--2col .ledger-item:last-child { border-bottom: 0; }
}
.lg-idx {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  min-width: 2.8ch;
}
.band--paper .lg-idx, .band--paper-2 .lg-idx { color: var(--accent-deep); }
.ledger-item h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.3rem;
}
.ledger-item p { font-size: 0.95rem; color: var(--muted-on-ink); max-width: 54ch; }
.band--paper .ledger-item p, .band--paper-2 .ledger-item p { color: var(--muted-on-paper); }

/* ============ Process rail ============ */
.process-rail { display: grid; gap: 0; counter-reset: step; }
.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line-dark);
  align-items: start;
}
.band--paper .process-step, .band--paper-2 .process-step { border-color: var(--line-light); }
.process-step:last-child { border-bottom: 1px solid var(--line-dark); }
.band--paper .process-step:last-child, .band--paper-2 .process-step:last-child { border-bottom-color: var(--line-light); }
.process-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--accent);
  line-height: 1;
  min-width: 2.2ch;
}
.process-step h3 { margin-bottom: 0.4rem; }
.process-step p { color: var(--muted-on-ink); max-width: 58ch; }
.band--paper .process-step p, .band--paper-2 .process-step p { color: var(--muted-on-paper); }

/* ============ Workflow pipeline (automation demo) ============ */
.pipeline {
  display: grid;
  gap: 0.6rem;
  position: relative;
  padding-left: 1.6rem;
}
.pipeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 2px;
  background: var(--line-dark);
}
.band--paper .pipeline::before { background: var(--line-light); }
.pipe-node {
  position: relative;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: var(--ink-2);
  display: flex;
  gap: 0.9rem;
  align-items: center;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.4s;
}
.band--paper .pipe-node { background: var(--paper); border-color: var(--line-light); }
/* progressive enhancement: dim/offset states only when JS runs the player */
.js .pipe-node { opacity: 0.35; transform: translateX(10px); }
.js .pipe-node.is-active { opacity: 1; transform: none; }
.pipe-node::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 50%;
  width: 12px; height: 12px;
  margin-left: 2px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--ink-3);
  border: 2px solid var(--line-dark);
  transition: background 0.4s, border-color 0.4s;
}
.pipe-node.is-active {
  opacity: 1;
  transform: none;
  border-color: rgba(255, 92, 40, 0.6);
}
.pipe-node.is-active::before { background: var(--accent); border-color: var(--accent); }
.pipe-node .pipe-icon {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.pipe-node strong { display: block; font-size: 0.98rem; }
.pipe-node span.pipe-sub { font-size: 0.84rem; color: var(--muted-on-ink); }
.band--paper .pipe-node span.pipe-sub { color: var(--muted-on-paper); }

/* ============ Before / After slider ============ */
.ba-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  touch-action: pan-y;
}
.ba-layer { width: 100%; }
.ba-top {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--ba, 50%)) 0 0);
}
.ba-top > * { width: 100%; height: 100%; }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--ba, 50%);
  width: 2px;
  background: var(--accent);
  cursor: ew-resize;
}
.ba-handle::after {
  content: "◂ ▸";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: var(--ink);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ba-label {
  position: absolute;
  top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: rgba(11, 13, 18, 0.75);
  color: var(--text-on-ink);
  pointer-events: none;
}
.ba-label--before { left: 0.8rem; }
.ba-label--after { right: 0.8rem; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

/* ============ Device frame ============ */
.device {
  border: 1px solid var(--line-light);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px -30px rgba(11, 13, 18, 0.45);
}
.device-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-light);
}
.device-bar i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-light);
}
.device-bar .device-url {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-on-paper);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  flex: 1;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ Tag / chip ============ */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  color: var(--muted-on-ink);
}
.band--paper .chip, .band--paper-2 .chip { border-color: var(--line-light); color: var(--muted-on-paper); }
.chip--accent { border-color: var(--accent); color: var(--accent); }
.band--paper .chip--accent, .band--paper-2 .chip--accent { border-color: var(--accent-deep); color: var(--accent-deep); }

/* Demo-content disclosure banner */
.demo-note {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.9rem 1.1rem;
  border: 1px dashed rgba(255, 92, 40, 0.5);
  border-radius: 6px;
  color: var(--muted-on-ink);
  background: var(--accent-soft);
}
.band--paper .demo-note, .band--paper-2 .demo-note { color: var(--text-on-paper); }
.demo-note::before { content: "※"; color: var(--accent); flex: none; }

/* ============ Forms ============ */
.form-grid { display: grid; gap: 1.4rem; }
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .field--full { grid-column: 1 / -1; }
}
.field { display: grid; gap: 0.45rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.83rem; color: var(--muted-on-paper); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--text-on-paper);
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px rgba(255, 92, 40, 0.22);
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}
.field-error {
  display: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #9a1f18;
}
.field.has-error .field-error { display: block; }

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: start;
  font-size: 0.92rem;
  line-height: 1.55;
}
.check-row input[type="checkbox"] {
  width: 22px; height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--accent-deep);
}
.check-row a { color: var(--accent-deep); }

fieldset { border: 0; display: grid; gap: 1.4rem; }
fieldset legend {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.4rem;
}
.conditional-block {
  display: none;
  border-left: 3px solid var(--accent);
  padding: 1.4rem;
  background: var(--paper-2);
  border-radius: 0 6px 6px 0;
}
.conditional-block.is-shown { display: grid; gap: 1.4rem; }

.form-status { display: none; padding: 1.1rem 1.3rem; border-radius: 6px; font-weight: 600; }
.form-status.is-shown { display: block; }
.form-status--error { background: #fbe9e7; color: #8c1d13; border: 1px solid #e5b4ae; }
.form-status--success { background: #e8f2e4; color: #1e4620; border: 1px solid #b5d2ad; }

.btn .spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  padding: var(--section-pad) 0 calc(2rem + env(safe-area-inset-bottom));
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-grid h4 { margin-bottom: 1rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.footer-grid ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-grid a { text-decoration: none; color: var(--muted-on-ink); font-size: 0.95rem; transition: color 0.2s; padding: 0.15rem 0; display: inline-block; }
.footer-grid a:hover { color: var(--text-on-ink); }
.footer-tagline { font-family: var(--font-display); font-size: 1.5rem; font-style: italic; margin: 0.8rem 0 1rem; color: var(--text-on-ink); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.8rem;
  align-items: center;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
  color: var(--muted-on-ink);
}
.footer-legal a { color: inherit; text-decoration: none; padding: 0.3rem 0; }
.footer-legal a:hover { color: var(--text-on-ink); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: calc(96px + env(safe-area-inset-top)) 0 clamp(3rem, 8vh, 5.5rem);
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18, 22, 29, 0.92) 0%, rgba(18, 22, 29, 0.25) 45%, rgba(18, 22, 29, 0.5) 100%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-kicker::before { content: ""; width: 2.4rem; height: 1px; background: var(--accent); }
.hero h1 { max-width: 12ch; margin-bottom: 1.6rem; }
.hero .hero-sub { max-width: 52ch; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--muted-on-ink); margin-bottom: 2.2rem; }
.hero-meta {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* hero line reveal */
.line-reveal { display: block; overflow: hidden; }
.line-reveal > span {
  display: block;
  transform: translateY(110%);
  animation: line-up 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes line-up { to { transform: none; } }

/* ============ Listen — one-button read-aloud utility ============
   Sits quietly in the top-right corner of the page header area. */
.listen-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-dark);
  border-radius: 3px;
  color: var(--muted-on-ink);
  background: transparent;
  transition: color 0.2s, border-color 0.2s;
}
.listen-btn:hover { color: var(--accent); border-color: var(--accent); }
.listen-btn svg { flex: none; }
.listen-btn[hidden] { display: none; }
.page-hero .container { position: relative; }
/* on narrow screens the corner collides with heading content — flow it
   quietly after the intro text instead */
@media (max-width: 719px) {
  .listen-btn { position: static; margin-top: 1.3rem; }
}

/* ============ Stats / tally ============ */
.tally-row {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 860px) { .tally-row { grid-template-columns: repeat(4, 1fr); } }
.tally {
  border-top: 2px solid var(--accent);
  padding-top: 1rem;
}
.tally strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.tally span { font-size: 0.9rem; color: var(--muted-on-ink); }
.band--paper .tally span, .band--paper-2 .tally span { color: var(--muted-on-paper); }

/* ============ Compare table ============ */
.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.compare caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-paper);
  padding-bottom: 1rem;
}
table.compare th, table.compare td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
}
table.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
table.compare .yes { color: var(--accent-deep); font-weight: 700; }
table.compare .no { color: var(--muted-on-paper); }

/* ============ Legal pages ============ */
.legal-page { max-width: 76ch; }
.legal-page h2 { font-size: 1.6rem; margin: 2.6rem 0 0.9rem; }
.legal-page h3 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }
.legal-page p, .legal-page li { color: var(--muted-on-paper); }
.legal-page ul, .legal-page ol { padding-left: 1.4rem; display: grid; gap: 0.5rem; margin-block: 0.8rem; }
.attorney-flag {
  border-left: 4px solid var(--accent-deep);
  background: var(--accent-soft);
  padding: 1rem 1.2rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.92rem;
  margin-block: 1.2rem;
  color: var(--text-on-paper);
}
.attorney-flag strong { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 0.3rem; color: var(--accent-deep); }

/* Page hero (interior pages) */
.page-hero {
  padding: calc(120px + env(safe-area-inset-top)) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line-dark);
}
.page-hero h1 { max-width: 16ch; margin-bottom: 1.2rem; }
.page-hero .lede { max-width: 56ch; }

/* ============ Utility ============ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.center { text-align: center; }
.center .lede, .center .eyebrow { margin-inline: auto; }
.center .eyebrow { justify-content: center; }
.center .eyebrow::after { display: none; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .line-reveal > span { transform: none; animation: none; }
  .marquee-track { animation: none; }
  .pipe-node { opacity: 1; transform: none; }
}
