/* =====================================================================
   Workhorse Court Reporting Services — court-transcript proofreading & scoping
   Single stylesheet. Mobile-first. Design tokens from build spec §5.
   Audience: court reporters (B2B). Purple-dominant, teal secondary,
   rose as a sparing CTA/accent.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Self-hosted fonts (no Google Fonts CDN at runtime — see /assets/fonts)
   Both families are variable fonts; we declare a weight range so 400–700
   all resolve from a single file each.
   --------------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------
   2. Design tokens
   --------------------------------------------------------------------- */
:root {
  /* Brand palette (spec §5) */
  --plum: #5c4a8c; /* primary: nav, headings, brand */
  --teal: #2a8c84; /* secondary: links, section accents */
  --rose: #c9568c; /* accent: CTA buttons, highlights — sparing */
  --ink: #2b2a33; /* body text */
  --paper: #fbf9f6; /* page background */
  --surface: #f3efea; /* cards / alt sections */

  /* Derived shades */
  --plum-dark: #463a6e;
  --plum-soft: #ede9f4;
  --teal-dark: #226e68;
  --rose-dark: #ad3f74;
  --ink-soft: #5b5966;
  --line: #e4ded6; /* hairline borders on warm bg */
  --white: #ffffff;

  /* Type */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --maxw: 72rem; /* ~1152px content cap */
  --maxw-prose: 44rem; /* readable measure for body copy */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(43, 42, 51, 0.06),
    0 8px 24px rgba(43, 42, 51, 0.06);
  --shadow-lg: 0 12px 40px rgba(70, 58, 110, 0.16);
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--teal);
}

/* ---------------------------------------------------------------------
   3. Reset / base
   --------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--plum);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
}
h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
}
h3 {
  font-size: clamp(1.2rem, 1.08rem + 0.6vw, 1.4rem);
  color: var(--plum-dark);
}
p {
  text-wrap: pretty;
}
a {
  color: var(--teal-dark);
  text-underline-offset: 0.15em;
  text-decoration-thickness: 0.08em;
}
a:hover {
  color: var(--teal);
}
strong {
  font-weight: 600;
  color: var(--plum-dark);
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   4. Layout helpers
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.section {
  padding-block: var(--space-8);
}
.section--alt {
  background: var(--surface);
}
.section--plum {
  background: var(--plum);
  color: var(--paper);
}
.section--plum h2,
.section--plum h3 {
  color: var(--white);
}
.prose {
  max-width: var(--maxw-prose);
}
.prose p + p {
  margin-top: var(--space-4);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: var(--space-3);
}
.section--plum .eyebrow,
.hero .eyebrow {
  /* Light, muted tone so the eyebrow stays legible AND clearly subordinate
     to the white Fraunces headings on the dark plum gradient. */
  color: #c9c0e4;
}
.lede {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  color: var(--ink-soft);
}
.center {
  text-align: center;
}
.section-head {
  max-width: var(--maxw-prose);
  margin-bottom: var(--space-7);
}
.section-head.center {
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  z-index: 200;
  background: var(--plum);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: var(--space-4);
  color: var(--white);
}

/* ---------------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.06s ease, background-color 0.15s ease,
    border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}
/* Primary = rose CTA (used sparingly) */
.btn--primary {
  background: var(--rose);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(201, 86, 140, 0.32);
}
.btn--primary:hover {
  background: var(--rose-dark);
  color: var(--white);
}
/* Secondary = plum outline */
.btn--secondary {
  background: transparent;
  color: var(--plum);
  border-color: var(--plum);
}
.btn--secondary:hover {
  background: var(--plum);
  color: var(--white);
}
/* On dark backgrounds (solid plum sections AND the plum-gradient hero): the
   default plum-on-plum outline is invisible, so flip to a light treatment —
   white text + visible white border, transparent fill; hover fills white with
   plum text. Scoped to dark contexts only; light-section buttons are unchanged. */
.section--plum .btn--secondary,
.hero .btn--secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}
.section--plum .btn--secondary:hover,
.hero .btn--secondary:hover {
  background: var(--white);
  color: var(--plum);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.btn-row.center {
  justify-content: center;
}

/* ---------------------------------------------------------------------
   6. Header / nav  (shared across every page)
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 246, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--plum);
  text-decoration: none;
  flex: none; /* hold the wordmark's tidy two-line width; don't let flex squeeze it to 3 lines */
}
/* Wordmark: monogram tile + name on two lines. The break is forced after
   "Workhorse" with a <br> in the markup (so the compound "Court Reporting"
   never splits); uniform Fraunces/size/weight/color keeps it reading as ONE
   name. No tagline in the header — that clarifier lives in the hero eyebrow
   and footer. The <a>'s aria-label carries the full accessible name. */
.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--plum);
}
.brand:hover .brand__name {
  color: var(--plum-dark);
}
/* Brand emblem: the W+horse mark sits inline beside the wordmark — no chip.
   Color is set per location via the <img> src: the plum mark on the light
   header, the white mark in the dark footer. */
.brand__logo {
  height: 1.9rem;
  width: auto;
  flex: none;
}
/* Tiny screens (≈320px, e.g. iPhone SE 1): the full 2-line wordmark + 44px
   hamburger already fill the row, so shrink the emblem and tighten its gap so
   the brand bar still fits without horizontal overflow. 360px+ keeps 1.9rem. */
@media (max-width: 359px) {
  .brand {
    gap: var(--space-2);
  }
  .brand__logo {
    height: 1.2rem;
  }
}

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: none; /* don't let the flex row squeeze it below 44px at ~320 */
}
.nav__toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin-inline: auto;
  background: var(--plum);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav[data-open="true"] .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav[data-open="true"] .nav__toggle span:nth-child(2) {
  opacity: 0;
}
.nav[data-open="true"] .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav__menu a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.nav__menu a:hover {
  color: var(--plum);
}
.nav__menu a[aria-current="page"] {
  color: var(--plum);
  font-weight: 600;
}
.nav__cta {
  margin-top: var(--space-2);
  white-space: nowrap; /* keep the CTA pill on one line */
}

/* Disclosure (W3C APG): a <button> toggles a nested <ul> of plain links.
   No menu/menubar/menuitem roles — native list semantics only. */
.nav__sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}
.nav__sub-toggle:hover {
  color: var(--plum);
}
.nav__sub-toggle.is-current {
  color: var(--plum);
  font-weight: 600;
}
.nav__caret {
  flex: none;
  width: 0;
  height: 0;
  border-left: 0.32em solid transparent;
  border-right: 0.32em solid transparent;
  border-top: 0.36em solid currentColor;
  transition: transform 0.2s ease;
}
.nav__sub-toggle[aria-expanded="true"] .nav__caret {
  transform: rotate(180deg);
}
.nav__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__submenu[hidden] {
  display: none;
}
.nav__submenu a[aria-current="page"] {
  color: var(--plum);
  font-weight: 600;
}

/* Collapsed (hamburger) menu — held until the desktop breakpoint.
   940px is the lowest width where brand + 4 items + CTA sit on one row with
   no wrap or clipping (verified by screenshot; 920 clips the CTA). */
@media (max-width: 939px) {
  .brand {
    padding-block: var(--space-1); /* ~44px touch height for the wordmark on phones */
  }
  .nav__menu {
    display: none;
    width: 100%;
    margin-top: var(--space-3);
    padding-bottom: var(--space-4);
    /* Short/landscape viewports: the menu can be taller than the screen, and
       the sticky header can't scroll as a whole — so lower items + the CTA were
       unreachable. Cap the menu to the space below the brand/hamburger bar
       (~68px row + 12px gap = 5rem) and let it scroll internally. Only engages
       when the menu exceeds this height, so tall portrait screens look identical. */
    max-height: calc(100vh - 5rem); /* fallback for browsers without dvh */
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* Lock the page behind the open menu (html.nav-open class toggled in main.js,
     which also preserves/restores scroll position). position:fixed on the body
     is the reliable lock — overflow:hidden alone doesn't hold the page on mobile.
     The menu's own overflow-y still scrolls internally. */
  html.nav-open {
    overflow: hidden;
    overflow-anchor: none; /* don't let scroll anchoring fight the restore on close */
  }
  html.nav-open body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    /* top:0 keeps the sticky header pinned/visible; main.js restores the
       pre-open scroll position on close. */
  }
  .nav[data-open="true"] {
    flex-wrap: wrap;
  }
  .nav[data-open="true"] .nav__menu {
    display: block;
  }
  .nav__menu > li {
    border-top: 1px solid var(--line);
  }
  .nav__menu a,
  .nav__sub-toggle {
    padding: 0.85rem var(--space-2);
    min-height: 2.75rem; /* >=44px tap target */
  }
  .nav__menu > li > a[aria-current="page"],
  .nav__sub-toggle.is-current {
    box-shadow: inset 3px 0 0 var(--rose);
  }
  /* Mobile: submenu is an inline, indented accordion (not a flyout) */
  .nav__submenu {
    padding-left: var(--space-5);
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .nav__submenu li + li {
    border-top: 1px solid var(--line);
  }
  .nav__submenu a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--rose);
  }
  .nav__cta {
    margin-top: var(--space-3);
  }
  .nav__cta .btn {
    width: 100%;
  }
}

/* Desktop: horizontal bar with an absolute flyout submenu */
@media (min-width: 940px) {
  .nav__toggle {
    display: none;
  }
  .nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .nav__menu a,
  .nav__sub-toggle {
    padding: 0.5rem 0.75rem;
    white-space: nowrap; /* keep "Services & Rates" + items on one line each */
  }
  .nav__menu > li > a[aria-current="page"],
  .nav__sub-toggle.is-current {
    box-shadow: inset 0 -3px 0 var(--rose);
  }
  .nav__has-sub {
    position: relative;
  }
  .nav__submenu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 14rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
  }
  .nav__submenu a {
    padding: 0.6rem 0.75rem;
  }
  .nav__submenu a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--rose);
  }
  .nav__cta {
    margin: 0 0 0 var(--space-3);
  }
}

/* ---------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    var(--plum) 0%,
    var(--plum-dark) 55%,
    #3a3160 100%
  );
  color: var(--paper);
}
.hero::after {
  /* subtle teal glow, decorative */
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(
    circle,
    rgba(42, 140, 132, 0.35),
    transparent 60%
  );
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero__inner {
  /* Start comfortably below the sticky nav without a void (was space-9 top). */
  padding-block: var(--space-7) var(--space-8);
  max-width: 52rem;
}
.hero h1 {
  color: var(--white);
}
.hero p {
  margin-top: var(--space-5);
  color: #ece8f5;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.35rem);
  max-width: 40rem;
}
/* compact hero used on interior pages */
.hero--compact .hero__inner {
  padding-block: var(--space-6) var(--space-7);
}

/* ---------------------------------------------------------------------
   8. Cards / grids
   --------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 720px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow);
}
.card h3 {
  margin-bottom: var(--space-2);
}
.card__num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--plum-soft);
  color: var(--plum);
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

/* Trust strip */
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3) var(--space-5);
  text-align: center;
}
.trust__label {
  width: 100%;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.trust__item {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--plum);
  font-size: 1.05rem;
}
.trust__item + .trust__item::before {
  content: "·";
  margin-right: var(--space-5);
  color: var(--teal);
}
@media (max-width: 939px) {
  /* Items stack on phones/tablets — drop the inline "·" so it doesn't read
     as a stray leading bullet at the start of a wrapped line. */
  .trust__item + .trust__item::before {
    display: none;
  }
}

/* ---------------------------------------------------------------------
   9. About layout
   --------------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: 18rem 1fr;
    gap: var(--space-8);
  }
}
.headshot-slot {
  position: sticky;
  top: 6rem;
}
/* The sticky "stay on screen" headshot is desktop-only (two-column layout).
   Below the two-column breakpoint the page is a single column, where sticky
   would pin the image to the viewport and block the content below it — so let
   it scroll normally in flow. Desktop (>=820px) keeps the rule above. */
@media (max-width: 819px) {
  .headshot-slot {
    position: static;
    top: auto;
  }
}
.headshot-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.headshot-frame img {
  width: 100%;
  height: auto;
}
/* placeholder shown until kristen-headshot.jpg is dropped in */
.headshot-placeholder {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-5);
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: repeating-linear-gradient(
    135deg,
    var(--surface),
    var(--surface) 12px,
    #ece6dd 12px,
    #ece6dd 24px
  );
}

/* ---------------------------------------------------------------------
   10. Tables (rates)
   --------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
table.rates {
  width: 100%;
  border-collapse: collapse;
  min-width: 30rem;
}
.rates caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--plum);
  padding: var(--space-4) var(--space-5) var(--space-2);
}
.rates th,
.rates td {
  text-align: left;
  padding: 0.85rem var(--space-5);
  border-bottom: 1px solid var(--line);
}
.rates thead th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface);
}
.rates tbody tr:last-child td {
  border-bottom: none;
}
.rates tbody tr:hover {
  background: var(--plum-soft);
}
.rates .rate {
  font-weight: 600;
  color: var(--teal-dark);
  white-space: nowrap;
}

/* Mobile (≤640px): the fixed min-width 3-column table can't fit a phone, which
   pushed the Rate column off-screen behind horizontal scroll. Stack each row as
   a card so Service + Turnaround + Rate are all visible with no sideways scroll.
   The <thead> is clip-hidden (kept for screen readers, not display:none); the
   data-label attributes in the markup supply each value's field name. The
   desktop table (≥720px, where .grid--2 splits) is left untouched. */
@media (max-width: 640px) {
  .table-wrap {
    overflow-x: visible;
  }
  table.rates {
    min-width: 0;
  }
  .rates thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .rates tbody,
  .rates tr,
  .rates th,
  .rates td {
    display: block;
  }
  .rates tbody tr {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--line);
  }
  .rates tbody tr:last-child {
    border-bottom: none;
  }
  .rates th,
  .rates td {
    padding: 0;
    border-bottom: 0;
  }
  .rates th[scope="row"] {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--plum);
    margin-bottom: var(--space-2);
  }
  .rates td {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: 0.15rem;
  }
  .rates td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--ink-soft);
  }
  .rates td.rate {
    font-size: 1.05rem;
  }
  .rates tbody tr:hover {
    background: none;
  }
}

/* Tablet band (~720–1079px): keep the two rate tables stacked single-column so
   each renders at full width (the real ~480px table fits comfortably) instead
   of being squeezed into ~348px two-up columns where the Rate column scrolled
   off-screen. Scoped to .rates-grid only — the global .grid--2 (used elsewhere)
   is untouched. Two tables return side by side from 1080px (the desktop look,
   where each column is wide enough for the full table). */
@media (min-width: 720px) and (max-width: 1079px) {
  .rates-grid.grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Process list */
.process {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: var(--space-4);
  max-width: var(--maxw-prose);
}
.process li {
  position: relative;
  padding-left: 2.75rem;
  counter-increment: step;
}
.process li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Fine print callout */
.fineprint {
  border-left: 4px solid var(--rose);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-5) var(--space-6);
}
.fineprint h3 {
  margin-bottom: var(--space-3);
}
.fineprint ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: var(--space-3);
}

/* ---------------------------------------------------------------------
   11. Testimonials
   --------------------------------------------------------------------- */
.quote-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.quote-card blockquote {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--plum-dark);
}
.quote-card blockquote::before {
  content: "\201C";
  display: block;
  font-size: 3rem;
  line-height: 0.6;
  color: var(--rose);
  margin-bottom: var(--space-2);
}
.quote-card cite {
  font-style: normal;
  margin-top: auto;
}
.quote-card cite b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.quote-card cite .creds {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.empty-note {
  border: 1px dashed var(--plum);
  border-radius: var(--radius);
  background: var(--plum-soft);
  padding: var(--space-6);
  text-align: center;
  color: var(--plum-dark);
}

/* ---------------------------------------------------------------------
   12. Forms (Contact + future preference sheet)
   --------------------------------------------------------------------- */
.form {
  max-width: 40rem;
}
.form__row {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 560px) {
  .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.field label {
  font-weight: 600;
  color: var(--plum-dark);
}
.field .req {
  color: var(--rose-dark);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d8d1c7;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  border-color: var(--teal);
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}
.checkbox input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: none;
  accent-color: var(--rose);
}
.checkbox label {
  font-weight: 500;
  color: var(--ink);
}
@media (max-width: 939px) {
  /* Phones: make the label a ~44px tap target and center it with the box. */
  .checkbox {
    align-items: center;
  }
  .checkbox input {
    margin-top: 0;
  }
  .checkbox label {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
  }
}
/* Honeypot — visually hidden, available to bots only */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form__aside {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-6);
  border: 1px solid var(--line);
}
.form__aside h3 {
  margin-bottom: var(--space-3);
}
.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.contact-list a {
  font-weight: 600;
  overflow-wrap: anywhere; /* let the long email wrap instead of forcing page width at 320 */
}
@media (min-width: 860px) {
  .contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-8);
    align-items: start;
  }
}

/* TODO placeholder block (calculator + preference sheet stubs) */
.stub {
  border: 2px dashed var(--teal);
  border-radius: var(--radius);
  background: var(--white);
  padding: var(--space-7) var(--space-6);
  text-align: center;
  color: var(--ink-soft);
}
.stub h2 {
  color: var(--teal-dark);
}

/* ---------------------------------------------------------------------
   13. Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--plum-dark);
  color: #ddd6ec;
  padding-block: var(--space-8) var(--space-6);
}
.footer-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}
.site-footer h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7abd6;
  margin-bottom: var(--space-4);
}
.site-footer a {
  color: #ece8f5;
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-head);
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: var(--space-3);
}
.footer-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.site-footer .footer-list a {
  overflow-wrap: anywhere; /* defensive: long email wraps rather than overflowing */
}
@media (max-width: 719px) {
  /* Phones (footer is single-column here): give the link rows a ~44px touch
     target. Scoped below the 3-column breakpoint so desktop footer is unchanged. */
  .site-footer .footer-list a {
    display: inline-block;
    padding-block: 0.65rem;
  }
}
.social {
  display: flex;
  gap: var(--space-3);
}
.social a {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.15s ease;
}
.social a:hover {
  background: var(--rose);
}
.social svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 0.85rem;
  color: #b7abd6;
}

/* ---------------------------------------------------------------------
   14. Utilities / motion
   --------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mt-0 {
  margin-top: 0;
}
.mb-5 {
  margin-bottom: var(--space-5);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------
   15. Pricing calculator (pricing-calculator.html only)
   Reuses the site tokens/components; behavior lives in assets/js/calculator.js.
   Mobile-first; controls stack above the result, side-by-side from 860px.
   --------------------------------------------------------------------- */
.calc {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 860px) {
  .calc {
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-7);
  }
}

/* Control column */
.calc__form {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  min-width: 0;
}
.calc__group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.calc__legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
  margin-bottom: var(--space-4);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--plum);
}
.calc__legend .step {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  border-radius: 50%;
  background: var(--plum-soft);
  color: var(--plum);
  font-size: 0.95rem;
  font-weight: 700;
}

/* 1. Service — segmented control (two big tappable buttons) */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.segmented__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 600;
  color: var(--plum-dark);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, box-shadow 0.15s ease;
}
.segmented__option:hover {
  border-color: var(--plum);
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented__option:has(input:checked) {
  border-color: var(--plum);
  background: var(--plum);
  color: var(--white);
  box-shadow: var(--shadow);
}
.segmented__option:has(input:focus-visible) {
  box-shadow: var(--focus);
}

/* 2. Turnaround — full-width tappable radio rows */
.tier-list {
  display: grid;
  gap: var(--space-3);
}
.tier {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 3.5rem;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.tier:hover {
  border-color: var(--teal);
}
.tier input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tier__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-right: auto;
  min-width: 0;
}
.tier__name {
  font-weight: 600;
  color: var(--plum-dark);
}
.tier__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.tier__rate {
  font-weight: 700;
  color: var(--teal-dark);
  white-space: nowrap;
}
.tier:has(input:checked) {
  border-color: var(--plum);
  background: var(--plum-soft);
  box-shadow: inset 4px 0 0 var(--teal);
}
.tier:has(input:checked) .tier__rate {
  color: var(--plum);
}
.tier:has(input:focus-visible) {
  box-shadow: var(--focus);
}

/* 3. Pages — number inputs with custom steppers */
.calc__fields {
  display: grid;
  gap: var(--space-5);
}
.calc__field label {
  display: block;
  font-weight: 600;
  color: var(--plum-dark);
  margin-bottom: var(--space-2);
}
.calc__field .hint {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.stepper {
  display: flex;
  align-items: stretch;
  max-width: 16rem;
  border: 1px solid #d8d1c7;
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
}
.stepper:focus-within {
  border-color: var(--teal);
}
.stepper button {
  flex: none;
  width: 3rem;
  border: 0;
  background: var(--surface);
  color: var(--plum);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.stepper button:hover {
  background: var(--plum);
  color: var(--white);
}
.stepper input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0;
  border-inline: 1px solid #d8d1c7;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--white);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper input:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Result column */
.calc__result {
  background: var(--plum-soft);
  border: 1px solid #d9d0ec;
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) {
  .calc__result {
    position: sticky;
    top: 6rem;
  }
}
.calc__result-head {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.calc__hint {
  color: var(--ink-soft);
  font-style: italic;
}
.calc__lines {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.calc__line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid #d9d0ec;
  color: var(--ink);
}
.calc__line span:last-child {
  font-weight: 600;
  white-space: nowrap;
}
.calc__line--overage {
  color: var(--rose-dark);
}
.calc__line--overage span:last-child {
  color: var(--rose-dark);
}
.calc__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.calc__total span {
  font-weight: 600;
  color: var(--plum-dark);
}
.calc__total strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 1.4rem + 2vw, 2.4rem);
  color: var(--plum);
  line-height: 1;
}
.calc__note {
  margin-top: var(--space-5);
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.calc__noscript {
  border-left: 4px solid var(--rose);
  background: var(--surface);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------------------------------------------------------------------
   16. Preference sheet (preference-sheet.html only)
   Long (~40 question) static form. Reuses the calculator's .tier rows and
   .segmented control plus the shared .field inputs, so it reads as one
   family. Generous spacing + dividers keep it from feeling like a wall.
   --------------------------------------------------------------------- */
.pref-form {
  max-width: 48rem;
}

/* Each of the 9 groups. Clear air + a divider between them for rhythm. */
.pref-group {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.pref-group + .pref-group {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line);
}
.pref-legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-2);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  color: var(--plum);
}
.pref-legend .step {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  border-radius: 50%;
  background: var(--plum);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
}
.pref-group__intro {
  color: var(--ink-soft);
  margin-bottom: var(--space-6);
  max-width: var(--maxw-prose);
}

/* A single question: heading + its control. */
.pref-q + .pref-q {
  margin-top: var(--space-6);
}
.pref-q__label {
  display: block;
  font-weight: 600;
  color: var(--plum-dark);
  margin-bottom: var(--space-3);
  line-height: 1.45;
}
.pref-q__label .optional {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Yes/No questions reuse .segmented but shouldn't stretch full width. */
.pref-q .segmented {
  max-width: 22rem;
}

/* Tier rows that are pure text options (no rate column) sit comfortably. */
.pref-q .tier__name {
  line-height: 1.4;
}

/* Single text/textarea questions: let .pref-q own the vertical rhythm. */
.pref-q .field {
  margin-bottom: 0;
}

/* Group 1 contact fields: two-up on wider screens, reusing .form__row. */
.pref-contact {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 560px) {
  .pref-contact--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.pref-contact .field {
  margin-bottom: 0;
}

/* Submit area */
.pref-submit {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}
.pref-submit__note {
  background: var(--plum-soft);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  color: var(--plum-dark);
  font-weight: 500;
  margin-bottom: var(--space-5);
}
.pdf-fallback {
  margin-top: var(--space-5);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.pdf-fallback a {
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   17. Trust / credibility content
   - .capability: a "Works in …" strip of chips. Deliberately styled
     differently from the italic-serif .trust references strip so the two,
     when stacked on Home, don't read as redundant bars.
   - .timeline: scannable experience milestones on About.
   --------------------------------------------------------------------- */
.capability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.capability__label {
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.capability__item {
  display: inline-flex;
  align-items: center;
  background: var(--plum-soft);
  color: var(--plum);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
}
.capability__item--accent {
  background: var(--plum);
  color: var(--white);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
  display: grid;
  gap: var(--space-4);
  max-width: var(--maxw-prose);
}
.timeline li {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}
.timeline__year {
  flex: none;
  width: 3.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--plum);
}
.timeline__label {
  color: var(--ink);
}
.timeline__label strong {
  color: var(--plum-dark);
}

/* ---------------------------------------------------------------------
   18. FAQ (faq.html only)
   Native <details>/<summary> accordions — no JS, keyboard-operable,
   answers live in the DOM so they're indexable. Styled to the system.
   --------------------------------------------------------------------- */
.faq {
  max-width: var(--maxw-prose);
  display: grid;
  gap: var(--space-3);
}
.faq + .faq {
  margin-top: var(--space-7);
}
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.faq__item summary {
  list-style: none; /* hide default disclosure triangle */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 3.25rem;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--plum-dark);
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary:hover {
  color: var(--plum);
}
/* +/− indicator that flips when the item is open */
.faq__item summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--teal);
}
.faq__item[open] summary::after {
  content: "\2212"; /* minus sign */
}
.faq__answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--ink);
}
.faq__answer > :first-child {
  margin-top: 0;
}
.faq__answer p + p {
  margin-top: var(--space-3);
}
.faq__answer a {
  font-weight: 600;
}
