/* ── Reset & root variables ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --purple-primary:  #221155;
  --purple-deepest:  #150A35;
  --purple-mid:      #6B5BA0;
  --purple-wash:     #EDE9F5;
  --purple-tint:     #F5F2FA;
  --blue-accent:     #4BB1EA;
  --blue-soft-bg:    #F8FBFE;
  --blue-soft-border:#C8E5F7;
  --coral:           #D85A30;
  --coral-soft-bg:   #FAECE7;
  --text-dark:       #1A0F40;
  --text-body:       #4A4060;
  --text-muted:      #6B5BA0;
  --cream:           #FAFAF8;
  --border-faint:    #E5E2DC;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background: #fff;
  font-size: 15px;
  line-height: 1.6;
}

.serif {
  font-family: Georgia, "Source Serif Pro", "Times New Roman", serif;
}

a { text-decoration: none; color: inherit; }

img { display: block; max-width: 100%; height: auto; }

/* ── Ghost SVG ──────────────────────────────────────────────────────────── */
.ghost path { fill: white; stroke: #1A0F40; stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.ghost ellipse { fill: #1A0F40; }

/* ── Sparkles ───────────────────────────────────────────────────────────── */
.sparkle       { fill: #A49DB6; }
.sparkle-blue  { fill: var(--blue-accent); }
.sparkle-on-dark { fill: #fff; opacity: 0.7; }
.sparkle-coral { fill: var(--coral); }

/* ── Shared layout helpers ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.eyebrow--blue  { color: var(--blue-accent); }
.eyebrow--coral { color: var(--coral); }
.eyebrow--muted { color: var(--text-muted); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}
.section-header .see-all {
  font-size: 13px;
  color: var(--purple-primary);
  border-bottom: 0.5px solid var(--purple-primary);
  padding-bottom: 2px;
  white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--blue-accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.btn-primary:hover { background: #3a9fd8; }

.btn-ghost-link {
  display: inline-block;
  color: #fff;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--blue-accent);
}

.btn-pill {
  display: inline-block;
  background: var(--blue-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.btn-pill:hover { background: #3a9fd8; }

/* ── Ticker ─────────────────────────────────────────────────────────────── */
.ticker {
  background: var(--purple-deepest);
  color: #C8C2D9;
  padding: 9px 32px;
  font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.ticker__left { display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; }
.ticker__right { white-space: nowrap; }

/* The month label stays put; only the deal sentences scroll. */
.ticker__label { flex: 0 0 auto; color: #fff; }
.ticker__scroll { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.ticker__scroll-inner { display: inline-block; white-space: nowrap; will-change: transform; }

/* Spotify-style: the text only travels if it doesn't fit. base.html measures it
   and adds .is-scrolling with the two custom properties; a short list that fits
   never moves. Constant speed out, hold, constant speed back, hold. */
.ticker__scroll.is-scrolling .ticker__scroll-inner {
  animation: ticker-scroll var(--ticker-duration, 24s) linear infinite;
}
@keyframes ticker-scroll {
  0%, 8%    { transform: translateX(0); }
  46%, 54%  { transform: translateX(calc(-1 * var(--ticker-distance, 0px))); }
  92%, 100% { transform: translateX(0); }
}

/* No motion: show the whole list by letting it wrap instead of clipping it. */
@media (prefers-reduced-motion: reduce) {
  .ticker__left { flex-wrap: wrap; }
  .ticker__scroll { overflow: visible; }
  .ticker__scroll-inner { white-space: normal; animation: none; }
}

/* ── Web-app back bar ───────────────────────────────────────────────────────
   Only ever painted when base.html's script has proved the page is running as
   an installed app with history behind it (html.is-standalone). In a browser
   tab it is display:none, so it adds nothing to any measured layout. */
.app-back-bar { display: none; }
.is-standalone .app-back-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 0.5px solid var(--border-faint);
  padding: 4px 16px;
  /* Sits under the iOS status bar in standalone mode, which the viewport does
     not account for; env() is 0 everywhere else. */
  padding-top: calc(4px + env(safe-area-inset-top, 0px));
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;                  /* WCAG 2.5.5, same floor as .nav-toggle */
  padding: 0 8px 0 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  color: var(--blue-accent);
  -webkit-tap-highlight-color: transparent;
}
/* Chevron drawn from a rotated border so it needs no asset and inherits the
   button's colour. aria-hidden — the button already reads "Back". */
.app-back__chevron {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.app-back:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

/* ── Nav ────────────────────────────────────────────────────────────────── */
.site-nav {
  background: #fff;
  border-bottom: 0.5px solid var(--border-faint);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand__icon { height: 44px; width: auto; }
.nav-brand__name {
  font-size: 20px;
  font-weight: 500;
  color: var(--purple-primary);
  letter-spacing: 0.2px;
}
.nav-brand__sub {
  font-size: 11px;
  color: var(--blue-accent);
  letter-spacing: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--purple-primary);
}
.nav-links a { white-space: nowrap; }
@media (max-width: 1080px) {
  .nav-brand__sub { display: none; }
  .nav-brand__name { white-space: nowrap; }
  .nav-links { gap: 14px; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
}
.nav-links a:hover { color: var(--blue-accent); }
.nav-links a[aria-current="page"] {
  color: var(--blue-accent);
  border-bottom: 1.5px solid var(--blue-accent);
  padding-bottom: 1px;
}
.nav-cta {
  background: var(--blue-accent);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-cta:hover { background: #3a9fd8 !important; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: var(--purple-primary);
  color: #fff;
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero > .hero__inner,
.hero > .featured-deal,
.hero > .upcoming-books { max-width: 1100px; margin-left: auto; margin-right: auto; padding: 0 32px; }
.hero__inner {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero__sparkle { position: absolute; }

.hero__eyebrow {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(75,177,234,0.18);
  color: var(--blue-accent);
  font-size: 11px;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
  border-radius: 100px;
  border: 0.5px solid rgba(75,177,234,0.3);
}
.hero h1 {
  font-size: 46px;
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
  color: #fff;
}
.hero__body {
  font-size: 15px;
  line-height: 1.65;
  color: #D8D2E8;
  margin: 0 0 26px;
}
.hero__ctas { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero__img { text-align: center; }
.hero__img img { width: 100%; max-width: 380px; margin: 0 auto; }

/* ── Featured deal card ─────────────────────────────────────────────────── */
.featured-deal {
  background: #fff;
  border-radius: 8px;
  padding: 24px 26px;
  margin-top: 36px;
  position: relative;
  z-index: 1;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.featured-deal__cover {
  flex-shrink: 0;
  width: 96px;
  min-height: 132px;
  border-radius: 4px;
  padding: 12px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.featured-deal__cover-label { font-size: 7px; letter-spacing: 1.2px; opacity: 0.8; }
.featured-deal__cover-author { font-size: 8px; letter-spacing: 0.5px; margin-top: 4px; }
.featured-deal__cover-title {
  font-size: 11px;
  line-height: 1.15;
  margin-top: 28px;
}
.featured-deal__cover-pub { font-size: 7px; opacity: 0.7; margin-top: 14px; letter-spacing: 1px; }

.featured-deal__eyebrow {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--coral);
  margin-bottom: 8px;
}
.featured-deal__title {
  font-size: 22px;
  line-height: 1.15;
  color: var(--text-dark);
  margin: 0 0 10px;
}
.featured-deal__desc {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
  margin: 0 0 12px;
}
.featured-deal__badge {
  display: inline-block;
  background: var(--coral-soft-bg);
  color: #993C1D;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 0.5px solid var(--coral);
}

/* ── Upcoming books (hero) ──────────────────────────────────────────────────
   Replaces the featured-deal card in the hero (Phase 6, 2026-07-22): up to
   three books near publication, fed from the dashboard's Website Feed via
   /api/sync/deals. The card language is adapted from .featured-deal above —
   the same white card on the purple hero, same cover/badge weights — extended
   to a fluid 1-3 column grid: one book keeps the old full-width featured-deal
   presence, three sit side by side. minmax(min(100%,250px),1fr) can never
   force sideways bleed, and the 640px override joins the site's existing
   mobile layer so the cards always stack on a phone. */
.upcoming-books {
  display: grid;
  /* Mobile-first single column; explicit counts at >=641px below. auto-fit
     was abandoned here: its empty-track collapse is browser-dependent and
     left a lone card at one-third width in prod (2026-07-23). */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 36px;
  position: relative;
  z-index: 1;
}
@media (min-width: 641px) {
  .upcoming-books--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upcoming-books--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  /* One book = a wide feature card: bigger cover, roomier type, the full
     content column instead of a lonely third of it. */
  .upcoming-books--1 .upcoming-book { padding: 28px 32px; gap: 28px; align-items: center; }
  .upcoming-books--1 .upcoming-book__cover { width: 150px; min-height: 212px; }
  .upcoming-books--1 .upcoming-book__cover--img img { min-height: 212px; }
  .upcoming-books--1 .upcoming-book__title { font-size: 27px; line-height: 1.12; }
  .upcoming-books--1 .upcoming-book__subtitle { font-size: 14px; max-width: 60ch; }
  .upcoming-books--1 .upcoming-book__subtitle {
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.upcoming-book__author { font-size: 14px; margin-top: 6px; }
}
.upcoming-books__header {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.see-all--on-dark {
  color: var(--blue-accent);
  border-bottom-color: var(--blue-accent);
}
.upcoming-books__eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-accent);
}
.upcoming-book {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}
.upcoming-book__cover {
  flex-shrink: 0;
  width: 84px;
  min-height: 118px;
  border-radius: 4px;
  padding: 10px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* A real cover fills the card edge to edge; the gradient stays underneath
   while the image loads. */
.upcoming-book__cover--img { padding: 0; }
.upcoming-book__cover--img img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.upcoming-book__cover-label { font-size: 7px; letter-spacing: 1.2px; opacity: 0.8; }
.upcoming-book__cover-author { font-size: 8px; letter-spacing: 0.5px; margin-top: 4px; }
.upcoming-book__cover-title {
  font-size: 11px;
  line-height: 1.15;
  margin-top: auto;
  padding-top: 12px;
  overflow-wrap: anywhere;
}
.upcoming-book__cover-pub { font-size: 7px; opacity: 0.7; margin-top: 10px; letter-spacing: 1px; }
.upcoming-book__body { min-width: 0; }
.upcoming-book__title {
  font-size: 18px;
  line-height: 1.2;
  color: var(--text-dark);
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.upcoming-book__subtitle {
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}
.upcoming-book__author {
  font-size: 13px;
  color: var(--text-body);
  margin: 0 0 10px;
}
.upcoming-book__badge {
  display: inline-block;
  background: var(--coral-soft-bg);
  color: #993C1D;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  border: 0.5px solid var(--coral);
}
.upcoming-book__link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--blue-accent);
  font-weight: 500;
  border-bottom: 1px solid var(--blue-accent);
  padding-bottom: 2px;
}
.upcoming-book__link:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}
/* The site's mobile tier (see the MOBILE NAVIGATION note below: 640px is the
   one mobile breakpoint this stylesheet uses). One column, full-width cards. */
/* ── Publishers strip ───────────────────────────────────────────────────── */
.publishers {
  background: #fff;
  border-bottom: 0.5px solid var(--border-faint);
  padding: 32px 0;
  text-align: center;
}
.publishers__eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.publishers__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 24px;
}
.publisher-name {
  display: inline-block;
  font-size: 18px;
  color: var(--purple-primary);
  padding: 4px 12px;
  letter-spacing: 0.3px;
}
.publisher-name--bold { font-weight: 700; letter-spacing: 1px; }
.publisher-name--italic { font-style: italic; }
.publishers__more { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* ── Deals grid ─────────────────────────────────────────────────────────── */
.recent-releases {
  background: var(--cream);
  padding: 44px 0;
}
.deals-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.deal-card__cover {
  width: 100%;
  border-radius: 4px;
  padding: 14px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
/* Full-height variant kept for detail pages */
.deal-card__cover--full   { min-height: 240px; }
/* Compact variant for the homepage row */
.deal-card__cover--compact { min-height: 160px; }

.deal-card__cover-tag  { font-size: 9px; letter-spacing: 1.5px; opacity: 0.85; }
.deal-card__cover-name { font-size: 10px; letter-spacing: 0.5px; }
.deal-card__cover-title { font-size: 14px; line-height: 1.2; margin-top: auto; padding-top: 16px; }
.deal-card__cover-pub { font-size: 8px; opacity: 0.7; letter-spacing: 1px; margin-top: 8px; }
.deal-card { cursor: default; }
.deals-grid--page .deal-card { transition: transform 0.15s, box-shadow 0.15s; cursor: default; }
.deals-grid--page .deal-card:hover { transform: translateY(-3px); }
.deals-grid--page .deal-card:hover .deal-card__cover { box-shadow: 0 8px 24px rgba(0,0,0,0.18); }

.deal-card__status { font-size: 10px; letter-spacing: 1px; margin-bottom: 4px; }
.deal-card__status--blue  { color: var(--blue-accent); }
.deal-card__status--muted { color: var(--text-muted); }
.deal-card__author { font-size: 15px; line-height: 1.2; color: var(--text-dark); }

/* ── Our DNA ────────────────────────────────────────────────────────────── */
.our-dna {
  background: var(--purple-wash);
  padding: 54px 32px 60px;
  position: relative;
  overflow: hidden;
}
.our-dna__inner {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}
.our-dna__img { text-align: center; }
.our-dna__img img { width: 100%; max-width: 340px; margin: 0 auto; }
.our-dna h2 {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--text-dark);
}
.our-dna p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0 0 14px;
}
.dna-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dna-pill {
  display: inline-block;
  background: #fff;
  border: 0.5px solid var(--purple-primary);
  color: var(--purple-primary);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
a.dna-pill:hover {
  background: var(--purple-primary);
  color: #fff;
}
.dna-sparkle { position: absolute; }

/* ── Mission band ───────────────────────────────────────────────────────── */
.mission {
  background: var(--purple-primary);
  color: #fff;
  padding: 60px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mission__inner { position: relative; z-index: 1; }
.mission h2 {
  font-size: 32px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 auto 18px;
  max-width: 640px;
  color: #fff;
}
.mission p {
  font-size: 15px;
  line-height: 1.7;
  color: #D8D2E8;
  max-width: 560px;
  margin: 0 auto;
}
.mission__sparkle { position: absolute; }

/* ── Free tools ─────────────────────────────────────────────────────────── */
.free-tools {
  background: #fff;
  padding: 54px 0;
}
.free-tools__intro { margin-bottom: 26px; }
.free-tools__intro h2 {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--text-dark);
}
.free-tools__intro p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tool-card {
  background: var(--blue-soft-bg);
  border: 0.5px solid var(--blue-soft-border);
  border-radius: 8px;
  padding: 22px;
}
.tool-card--dark {
  background: var(--purple-primary);
  border-color: transparent;
  color: #fff;
}
/* .tool-card__number was removed 2026-07-26 alongside the service ordinals —
   nothing in a title or a list carries a hard-coded number any more. */
.tool-card h3 {
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--text-dark);
}
.tool-card--dark h3 { color: #fff; }
.tool-card p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
  margin: 0 0 16px;
}
.tool-card--dark p { color: #D8D2E8; }
.tool-card__link {
  font-size: 13px;
  color: var(--blue-accent);
  font-weight: 500;
  border-bottom: 1px solid var(--blue-accent);
  padding-bottom: 2px;
}

/* ── Services tease (homepage) ──────────────────────────────────────────── */
.services-tease {
  background: var(--cream);
  padding: 44px 0;
}
.services-tease__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}
.services-tease__header h2 {
  font-size: 26px;
  font-weight: 400;
  margin: 0;
  color: var(--text-dark);
}
.services-tease__row {
  display: grid;
  /* Column count comes from the template via --stile-count (an inline
     grid-template-columns used to live here and beat every media query —
     the reason phones showed seven crushed columns, 2026-07-23). */
  grid-template-columns: repeat(var(--stile-count, 7), minmax(0, 1fr));
  gap: 10px;
}

/* Individual service tease tile */
.stile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fff;
  border: 0.5px solid #E0DAEE;
  border-radius: 8px;
  padding: 16px 14px;
  text-decoration: none;
  color: var(--text-dark);
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stile:hover {
  border-color: var(--blue-accent);
  box-shadow: 0 2px 10px rgba(75,177,234,0.12);
}
.stile--featured {
  border: 1.5px solid var(--purple-primary);
}
.stile--featured:hover {
  border-color: var(--purple-primary);
  box-shadow: 0 2px 10px rgba(34,17,85,0.1);
}
.stile__badge {
  position: absolute;
  top: -9px;
  right: 10px;
  background: var(--purple-primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
}
/* .stile__num was removed 2026-07-26: service tiles no longer carry an ordinal.
   The service list is DB-driven and evolves, so a printed "01"/"07" went stale
   (and gapped) every time a service was added or retired. Order is sort_order. */
.stile__name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-dark);
}

/* ── Services detail page grid (kept for /services page) ────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.service-tile {
  background: #fff;
  border: 0.5px solid #E0DAEE;
  border-radius: 8px;
  padding: 16px;
  position: relative;
}
.service-tile--featured { border: 2px solid var(--purple-primary); }
.service-tile__badge {
  position: absolute;
  top: -9px;
  right: 12px;
  background: var(--purple-primary);
  color: #fff;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 100px;
}
.service-tile__eyebrow { font-size: 11px; letter-spacing: 1px; color: var(--blue-accent); margin-bottom: 6px; }
.service-tile h3 { font-size: 14px; font-weight: 500; margin: 0 0 6px; color: var(--text-dark); }
.service-tile p  { font-size: 12px; color: var(--text-body); line-height: 1.55; margin: 0; }

/* ── Team ───────────────────────────────────────────────────────────────── */
.team {
  background: var(--purple-wash);
  padding: 50px 32px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.team-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 12px;
  text-align: center;
  position: relative;
}
.team-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-primary), var(--blue-accent));
  color: #fff;
  margin: 0 auto 12px;
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 80px;
  overflow: hidden;
  position: relative;
}
.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.team-card__avatar--ghost {
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card__avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
}
.team-card__sparkle-badge {
  position: absolute;
  top: -5px;
  right: -2px;
}
.team-card__name { font-size: 14px; font-weight: 500; color: var(--text-dark); }
.team-card__role { font-size: 11px; color: var(--blue-accent); margin-top: 4px; }
.team-card__role--muted { color: var(--text-muted); }
.team-card__memorial {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 7px;
  padding-top: 7px;
  border-top: 0.5px dotted #C8C2D9;
  font-style: italic;
  letter-spacing: 0.5px;
}
.team__tribute {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: #FAF9F6;
  color: var(--text-body);
  border-top: 1px solid var(--border-faint);
  padding: 28px 32px;
  /* Keep the bottom-right corner clear for the feedback bubble
     (app/templates/_feedback.html): it is position:fixed at bottom:20px and is
     44px tall, so without this it sits permanently on top of the last line of
     .footer-contact — the hello@writeitgreat.com link — at the scroll-bottom
     resting position of every page. 20 + 44 + 20 of breathing room. */
  padding-bottom: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand__logo { height: 36px; width: auto; }
.footer-brand__text .footer-brand__name {
  font-size: 14px;
  color: var(--text-dark);
}
.footer-brand__text .footer-brand__tagline {
  font-size: 11px;
  color: var(--purple-mid);
  font-style: italic;
  margin-top: 3px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 12px;
  justify-content: center;
}
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text-dark); }
.footer-contact {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.7;
}

/* ── Stub page ──────────────────────────────────────────────────────────── */
.stub-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 80px 32px;
}
.stub-page h1 { margin: 0 0 16px; font-size: 36px; }
.stub-page p { margin: 0 0 24px; color: var(--text-body); }

/* ── Admin ──────────────────────────────────────────────────────────────── */
.admin-topbar {
  background: var(--purple-deepest);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.admin-topbar a { color: #C8C2D9; }
.admin-topbar a:hover { color: #fff; }
.admin-topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.admin-topbar__brand img { height: 28px; }

.admin-breadcrumb {
  background: var(--purple-tint);
  padding: 10px 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-faint);
}
.admin-breadcrumb a { color: var(--purple-primary); }

.admin-content {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 24px;
}

.admin-flash {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}
.admin-flash--success { background: #e7f7ef; color: #1e6b40; }
.admin-flash--error   { background: #fef2f0; color: #9b2a2a; }
.admin-flash--warning { background: #fff8e7; color: #7a5300; }

.admin-form label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-dark); }
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
}
.admin-form textarea { min-height: 90px; resize: vertical; }
.admin-form .field-hint { font-size: 11px; color: var(--text-muted); margin-top: -10px; margin-bottom: 10px; }
.admin-form .checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.admin-form .checkbox-row input { width: auto; margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--border-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-faint); vertical-align: middle; }
.admin-table .actions { display: flex; gap: 10px; }
.admin-table .actions a,
.admin-table .actions button { font-size: 12px; }
.admin-table img.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }

.admin-avatar-placeholder {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-primary), var(--blue-accent));
  color: #fff; font-family: Georgia, serif; font-size: 18px;
  line-height: 48px; text-align: center;
}
.admin-current-photo { margin-bottom: 10px; }
.admin-current-photo img { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; margin-bottom: 4px; }

.btn-sm {
  display: inline-block; padding: 5px 12px; border-radius: 4px; font-size: 12px;
  font-weight: 500; cursor: pointer; border: none;
}
.btn-sm--primary { background: var(--blue-accent); color: #fff; }
.btn-sm--danger  { background: #fff; color: #9b2a2a; border: 1px solid #e0b0b0; }
.btn-sm--danger:hover { background: #fef2f0; }

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--purple-tint);
}
.admin-login-box {
  background: #fff;
  border: 1px solid var(--border-faint);
  border-radius: 8px;
  padding: 36px 40px;
  width: 360px;
}
.admin-login-box h1 { font-size: 22px; margin: 0 0 4px; }
.admin-login-box .subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

/* ══ Inner page styles ══════════════════════════════════════════════════════ */

/* ── Page hero variants ─────────────────────────────────────────────────── */
.page-hero {
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero--dark    { background: var(--purple-primary); color: #fff; }
.page-hero--wash    { background: var(--purple-wash); }
.page-hero--cream   { background: var(--cream); }
.page-hero--white   { background: #fff; border-bottom: 0.5px solid var(--border-faint); }

.page-hero .eyebrow { margin-bottom: 10px; }
.page-hero h1 {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 16px;
  max-width: 680px;
}
.page-hero--dark h1 { color: #fff; }
.page-hero__sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 580px;
  margin: 0;
}
.page-hero--dark .page-hero__sub { color: #D8D2E8; }

/* ── CTA band ───────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--purple-wash);
  padding: 48px 0;
  border-top: 0.5px solid #D8D2E8;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band__inner h2 {
  font-size: 26px;
  font-weight: 400;
  margin: 0;
  color: var(--text-dark);
}
.cta-band__actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.cta-band__link {
  font-size: 14px;
  color: var(--purple-primary);
  border-bottom: 0.5px solid var(--purple-primary);
  padding-bottom: 2px;
}

/* ── Team page ──────────────────────────────────────────────────────────── */
.team--page { background: var(--purple-wash); padding: 48px 0 56px; }
.team-grid--page {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.team-card--page { padding: 24px 16px; }
.team-card--page .team-card__avatar {
  width: 100px;
  height: 100px;
  font-size: 38px;
  line-height: 100px;
}
.team-card--page .team-card__avatar-wrapper { width: 100px; height: 100px; }
.team-card--page .team-card__name { font-size: 16px; margin-top: 4px; }
.team-card--page .team-card__role { font-size: 12px; margin-top: 6px; }
.team-card__memorial-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin: 12px 0 0;
  text-align: center;
}

/* ── Services page ──────────────────────────────────────────────────────── */
.services-page { background: #fff; padding: 48px 0 56px; }
.services-grid--page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-tile--lg {
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
}
.service-tile--lg p { flex: 1; } /* push CTA to bottom */
.service-tile__title {
  font-size: 20px;
  font-weight: 400;
  margin: 0 0 12px;
  line-height: 1.2;
  color: var(--text-dark);
}
.service-tile--lg p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.65;
  margin: 0 0 18px;
}
.service-tile__cta {
  display: inline-block;
  font-size: 13px;
  color: var(--blue-accent);
  font-weight: 500;
  border-bottom: 1px solid var(--blue-accent);
  padding-bottom: 2px;
  margin-top: auto;
  align-self: flex-start;
}
.service-tile--featured .service-tile__cta { color: var(--purple-primary); border-color: var(--purple-primary); }

/* ── Deals page ─────────────────────────────────────────────────────────── */
.deals-page { background: var(--cream); padding: 48px 0 60px; }
.deals-group { margin-bottom: 44px; }
.deals-group:last-child { margin-bottom: 0; }
.deals-group__heading {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border-faint);
}
.deals-grid--page {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.deal-card__title    { font-size: 12px; color: var(--text-body); margin-top: 4px; line-height: 1.4; }
.deal-card__publisher { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
/* Retailer "Order →" / "Pre-order →" link on a deal card. Text is --text-dark
   (~18:1 on the cream card — the blue/coral accents are too light as TEXT on
   cream to clear WCAG AA); the coral is carried by the underline, a border not
   text, which only needs 3:1 (non-text contrast) and clears it. */
.deal-card__buy {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 1.5px solid var(--coral);
  padding-bottom: 1px;
}
.deal-card__buy:hover { border-bottom-color: var(--text-dark); }
.deal-card__buy:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

/* ── Free tools page ────────────────────────────────────────────────────── */
.free-tools--page { background: #fff; padding: 48px 0 60px; }
.tools-grid--page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card--page { padding: 28px 24px; display: flex; flex-direction: column; }
.tool-card--page .tool-card__list { flex: 1; } /* push button to bottom */
.tool-card--page .btn-primary { margin-top: auto; align-self: flex-start; }
.tool-card--page h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--text-dark);
  line-height: 1.2;
}
.tool-card--dark.tool-card--page h2 { color: #fff; }
.tool-card--page p { font-size: 14px; margin: 0 0 16px; }
.tool-card__list {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.8;
  margin: 0 0 22px;
  padding-left: 18px;
}
.tool-card--dark .tool-card__list { color: #D8D2E8; }
.tool-card__list li::marker { color: var(--blue-accent); }

/* ── Contact page ───────────────────────────────────────────────────────── */
.contact-page { background: #fff; padding: 48px 0 60px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.contact-card {
  background: var(--purple-tint);
  border: 0.5px solid #D8D2E8;
  border-radius: 10px;
  padding: 26px 24px;
  position: relative;
}
.contact-card--cta {
  background: var(--purple-primary);
  border-color: transparent;
  color: #fff;
}
.contact-card--cta .eyebrow--blue { color: var(--blue-accent); }
.contact-card--cta p { color: #D8D2E8; }
.contact-card__email {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: var(--purple-primary);
  margin-bottom: 10px;
  word-break: break-all;
}
.contact-card__note {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}
.contact-card__offices { display: flex; flex-direction: column; gap: 16px; }
.contact-office__city {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.contact-office__detail {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
}
@media (max-width: 767px) {
  /* ---------------------------------------------------------------------
     Collapse the remaining fixed-column grids.

     Every grid above was already handled here; these were not, and they are
     the reason each page scrolled sideways on a phone. A grid item defaults
     to min-width:auto, so `repeat(4, 1fr)` cannot shrink below the intrinsic
     width of its content -- four team cards forced /team to 620px inside a
     320px viewport. minmax(0, 1fr) lets a column shrink below that content,
     which is exactly the fix already used for .deals-grid and .tools-grid.

     The `--page` variants were explicitly excluded from the rules above
     (`:not(.deals-grid--page)`), so the standalone pages kept the desktop
     column count while their homepage teasers were fixed. That is why
     /team, /free-tools, /services and /deals all bled and the home page
     bled less.

     Everything here is inside the mobile query, so desktop cannot change.
     --------------------------------------------------------------------- */
  .our-dna__inner { grid-template-columns: minmax(0, 1fr); }

  .team-grid,
  .team-grid--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .services-grid,
  .services-grid--page,
  .tools-grid,
  .tools-grid--page,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }

  /* Homepage service tiles: two columns read cleanly on a phone; the inline
     seven-across came from a style attribute no media query could beat
     (fixed 2026-07-23 by moving the count into --stile-count). */
  .services-tease__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stile__name { overflow-wrap: anywhere; }

  .deals-grid--page { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Belt and braces: a grid child with a long unbroken string (a book title,
     an email address) can still push its column wider than the track. */
  .team-card,
  .service-tile,
  .tool-card,
  .contact-card,
  .deal-card,
  .stile { min-width: 0; }

  /* The ticker is a nowrap flex row with 32px gutters: at 320px the message and
     the location cannot sit side by side, and .ticker__right refuses to break.
     Let the two halves stack and give back the gutters. */
  .ticker { flex-wrap: wrap; padding: 9px 16px; gap: 2px 12px; }
  .ticker__right { white-space: normal; }

  /* .cta-band__actions is flex-shrink: 0, so its links push straight through the
     right edge instead of wrapping under the heading. */
  .cta-band__inner { gap: 16px; }
  .cta-band__actions { flex-shrink: 1; flex-wrap: wrap; gap: 12px 20px; min-width: 0; }

  /* The services header is a nowrap flex row and, unlike .section-header, its
     .see-all link carries no white-space:nowrap: at 320px space-between
     squeezes "See all services →" to ~72px and it folds onto three lines.
     Caught by the min-column-width check the day it was added (2026-07-27).
     Same fix as the ticker above: let the link wrap under the heading. */
  .services-tease__header { flex-wrap: wrap; gap: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAVIGATION  (added 2026-07-20, branch fix/intake-mobile-ledger)

   Breakpoint choice, stated explicitly because the instruction was "match the
   existing breakpoints, do not invent a scale": main.css contains exactly ONE
   media query, `max-width: 1080px` at line 162. It cannot be reused for the
   toggle, because it is live at 1024px and desktop >=1024px is frozen.
   640px is the mobile tier that ci/responsive/README.md already proposes for
   this stylesheet, and it is what the rest of this PR's grid fixes use, so the
   whole mobile layer shares one number. intake.html's 560/620 are deliberately
   NOT reused - that stylesheet stays uncrossed.

   641-1023px is untouched: it keeps today's signed-off two-row wrap from :162,
   which still satisfies the audit's "no more than two rows" nav check.
   ══════════════════════════════════════════════════════════════════════════ */

/* Desktop: the two new elements do not exist as far as layout is concerned.
   display:none flex children are skipped by flex layout AND by the container's
   `gap`, so .site-nav still lays out brand + .nav-links with one 24px gap. */
.nav-toggle,
.nav-cta--mobile { display: none; }

/* WCAG 2.4.1 - main.css has no skip link today (docs/ACCESSIBILITY.md:92).
   Out of flow until focused, so it cannot move anything. */
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus {
  left: 8px; top: 8px; z-index: 100;
  background: #fff;
  color: var(--purple-primary);
  padding: 10px 16px;
  border: 1px solid var(--blue-accent);
  border-radius: 4px;
  font-size: 14px;
}

/* WCAG 2.4.7 - main.css contains no :focus rule at all. Only painted during
   keyboard focus, and `outline` never reflows anything. */
.skip-link:focus,
.nav-toggle:focus-visible,
.nav-brand:focus-visible,
.nav-links a:focus-visible,
.footer-nav a:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {

  /* The hero headline is three written lines ("Half ghost." etc.); at the
     desktop 46px each wraps again on a phone (seven rendered lines,
     2026-07-23). Scale with the viewport: the longest line, "All on your
     side.", must fit 320px minus the 32px side padding. */
  .hero h1 { font-size: clamp(26px, 9vw, 34px); }

  /* Row 1: brand + hamburger.  Row 2: the CTA.  Row 3: the menu panel.
     `space-between` from :133 is inherited and does the right thing on row 1. */
  .site-nav {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px 16px;      /* was 14px 32px - gives back 32px at 320px */
  }

  /* Shrink the lockup so brand + a 44px toggle fit.
     320 - 32 padding = 288 available; ~169 brand + 12 gap + ~90 toggle = ~271. */
  .nav-brand       { gap: 10px; min-width: 0; }
  .nav-brand__icon { height: 36px; }          /* was 44px */
  .nav-brand__name { font-size: 17px; }       /* was 20px, still nowrap */

  /* ── The toggle ────────────────────────────────────────────────────────── */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;                          /* WCAG 2.5.5 */
    min-width: 44px;
    padding: 0 12px;
    background: #fff;
    border: 0.5px solid var(--border-faint);
    border-radius: 6px;
    color: var(--purple-primary);
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: '';
    position: absolute;
    left: 0;
    transition: transform .18s ease;
  }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after  { top:  6px; }

  /* Driven off aria-expanded, so the icon can never disagree with the ARIA. */
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars          { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before  { transform: translateY(6px)  rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after   { transform: translateY(-6px) rotate(-45deg); }

  /* ── Primary funnel: never inside the hamburger (BRIEF.md:280) ─────────── */
  .nav-cta--mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 100%;                            /* own full-width row */
    width: 100%;
    min-height: 46px;
    padding: 8px 16px;
    font-size: 15px;
    /* blue #4BB1EA, white text and the 100px pill radius all come from .nav-cta */
  }

  /* ── The menu panel ────────────────────────────────────────────────────── */
  .nav-links {
    display: none;                             /* opened by .is-open below */
    flex: 0 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;               /* :165 sets flex-end, which
                                                  becomes VERTICAL once the
                                                  panel is a column */
    gap: 0;
    row-gap: 0;                                /* :165 sets 6px */
    font-size: 16px;
    margin-top: 2px;
    border-top: 0.5px solid var(--border-faint);
  }
  .site-nav.is-open .nav-links { display: flex; }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;                          /* was 22px tall - WCAG 2.5.5 */
    padding: 0 4px;
    border-bottom: 0.5px solid var(--border-faint);
  }
  .nav-links a:last-child { border-bottom: none; }

  /* :168's blue underline reads as a stray divider once stacked - use an
     inset bar instead, which cannot shift layout. */
  .site-nav .nav-links a[aria-current="page"] {
    color: var(--blue-accent);
    border-bottom: 0.5px solid var(--border-faint);
    box-shadow: inset 3px 0 0 var(--blue-accent);
    padding: 0 4px 0 12px;
  }

  /* The pill lives in the bar on mobile - do not render it twice. */
  .nav-links .nav-cta { display: none; }

  /* ── Footer nav ────────────────────────────────────────────────────────── */
  /* NOTE: if the page-shell patch also sets .site-footer / .footer-contact,
     keep only one copy of these four lines. */
  /* padding-bottom keeps clearing the feedback bubble, which drops to a 12px
     inset below 380px (see the @media in _feedback.html): 12 + 44 + 20. */
  .site-footer    { flex-direction: column; text-align: center; gap: 18px; padding-bottom: 76px; }
  .footer-contact { text-align: center; }
  .footer-nav     { justify-content: center; gap: 0 18px; font-size: 14px; }
  .footer-nav a   { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { transition: none; }
}

/* ── Service detail pages (/services/<slug>) ────────────────────────────── */
.page-hero__crumb {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  border-bottom: 0.5px solid transparent;
}
.page-hero__crumb:hover { color: var(--text-dark); border-bottom-color: currentColor; }
.page-hero__crumb:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.service-detail { background: #fff; padding: 48px 0 56px; }
.sdetail { max-width: 680px; }
.sdetail__section { margin-bottom: 36px; }
.sdetail__section:last-child { margin-bottom: 0; }
.sdetail__section h2 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--text-dark);
}
.sdetail__section p { font-size: 15px; line-height: 1.7; color: var(--text-body); margin: 0 0 12px; }
.sdetail__list {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.8;
  margin: 0 0 12px;
  padding-left: 20px;
}
.sdetail__list li { margin-bottom: 4px; }
.sdetail__list li::marker { color: var(--blue-accent); }

/* The CTA band gained an optional body line under the heading. */
.cta-band__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 520px;
  margin: 10px 0 0;
}
.cta-band__note a {
  color: var(--blue-accent);
  border-bottom: 1px solid var(--blue-accent);
  padding-bottom: 1px;
}
.btn-primary:focus-visible,
.cta-band__link:focus-visible,
.cta-band__note a:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

/* ── Service inquiry form (/services/<slug>/inquire) ────────────────────── */
.inquiry { background: #fff; padding: 48px 0 60px; }
.inquiry__card {
  max-width: 640px;
  background: var(--purple-tint);
  border: 0.5px solid #D8D2E8;
  border-radius: 10px;
  padding: 30px 28px;
}
.inquiry__card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-dark);
}
.inquiry__card input[type="email"],
.inquiry__card input[type="text"],
.inquiry__card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #C8C2D9;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
  margin-bottom: 18px;
}
.inquiry__card textarea { min-height: 140px; resize: vertical; }
.inquiry__card input:focus-visible,
.inquiry__card textarea:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 1px;
}

.inquiry__ack {
  background: #fff;
  border: 0.5px solid var(--blue-soft-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 18px;
}
.inquiry__ack b { font-size: 14px; color: var(--text-dark); }
.inquiry__ack p { font-size: 13px; line-height: 1.65; color: var(--text-body); margin: 6px 0 12px; }
.inquiry__ack a,
.inquiry__intake-note a {
  color: var(--blue-accent);
  border-bottom: 1px solid var(--blue-accent);
  padding-bottom: 1px;
}
.inquiry__ack a:focus-visible,
.inquiry__intake-note a:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}
.inquiry__card .ack-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  margin: 0;
}
.ack-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }

.inquiry__intake-note { font-size: 13px; color: var(--text-body); margin: 0 0 16px; }

/* The live region stays rendered while empty (no display:none) — some screen
   reader/browser pairs miss the first announcement when a role="alert" node
   enters the tree and gains content in the same tick. Same reasoning as the
   intake's .ferr. The :empty rule only collapses the spacing. */
.inquiry__error { color: #9b2a2a; font-size: 14px; margin: 0 0 12px; }
.inquiry__error:empty { margin: 0; }
.inquiry__error:focus { outline: none; } /* programmatic focus target */
.inquiry__error a { border-bottom: 1px solid currentColor; }

.inquiry__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-primary[disabled]:hover { background: var(--blue-accent); }
.inquiry__cancel {
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 0.5px solid currentColor;
  padding-bottom: 2px;
}
.inquiry__cancel:hover { color: var(--text-dark); }
.inquiry__cancel:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.inquiry__confirm h2 { font-size: 28px; font-weight: 400; margin: 0 0 10px; color: var(--text-dark); }
.inquiry__confirm h2:focus { outline: none; } /* programmatic focus target, not interactive */
.inquiry__confirm p { font-size: 15px; line-height: 1.7; color: var(--text-body); margin: 0 0 22px; }

/* Honeypot — off-screen for everyone, aria-hidden for readers. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The services listing tiles carry two links now: CTA + Learn more. */
.service-tile__links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: auto;
}
.service-tile__links .service-tile__cta { margin-top: 0; }
.service-tile__more {
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.service-tile__more:hover { color: var(--text-dark); }
.service-tile__cta:focus-visible,
.service-tile__more:focus-visible,
.stile:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .inquiry__card { padding: 22px 18px; }
  .inquiry__actions { gap: 12px 20px; }
}
