/* ==========================================================================
   Culinary Analytics — CFO Services for Independent Restaurants
   Design system — single stylesheet for all pages.
   Sections:
     01 Tokens          09 Cards            17 Reduced motion
     02 Base            10 Services         18 Responsive
     03 Layout          11 About
     04 Header/Nav/Btns 12 Contact
     05 Footer          13 Forms
     06 Hero            14 Diagnostic
     07 Bands           15 Dashboard
     08 Page hero
   ========================================================================== */

/* 01 — Tokens ============================================================= */
:root {
  /* Palette — matched to jerry.culinaryanalytics.com */
  --ink: #182d4c;          /* body text */
  --ink-2: #0c2044;        /* navy — dark surfaces, footer, headlines */
  --paper: #ffffff;        /* page background */
  --paper-2: #f3f7fc;      /* ice — alternate bands */
  --card: #ffffff;
  --line: #e1e9f2;
  --line-dark: #344562;
  --muted: #53637b;
  --muted-dark: #b9c6d8;
  --accent: #0875dc;       /* blue — primary action */
  --accent-2: #065cae;     /* blue — hover/pressed */
  --accent-soft: #eaf3ff;  /* soft blue — chips, marks */
  --ok: #2f7d4f;
  --ok-soft: #e3f0e8;
  --err: #b3362a;
  --err-soft: #f9e6e3;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;

  /* Metrics */
  --wrap-max: 1360px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(12, 32, 68, 0.06);
  --shadow-md: 0 3px 20px rgba(21, 52, 80, 0.06);
  --ring: 0 0 0 3px rgba(8, 117, 220, 0.25);
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;

  /* New */
  --navy: #0c2044;
  --serif: Georgia, "Times New Roman", serif;
  --headline-weight: 800;
}

/* 02 — Base ============================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main { display: block; min-height: 50vh; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-weight: var(--headline-weight);
  color: var(--navy);
  line-height: 1.1;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--navy);
}

.hl { color: var(--accent); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

ul { margin: 0; padding: 0; }
li { margin: 0; }

img, svg { max-width: 100%; height: auto; }

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

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 4px;
}

/* 03 — Layout =========================================================== */
.wrap {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

/* 04 — Header / nav / buttons ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 72px;
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text { line-height: 1.2; }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* 05 — Footer =========================================================== */
.site-footer {
  margin-top: var(--space-6);
  background: var(--ink);
  color: var(--muted-dark);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-4);
}

.footer-inner strong { color: #fff; }

.footer-meta a {
  color: var(--muted-dark);
  text-decoration: none;
}

.footer-meta a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* 06 — Hero ============================================================== */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--accent-soft) 0%, transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}

.hero .wrap { padding-block: clamp(64px, 9vw, 112px); }

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.hero .lede { max-width: 56ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero-proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.hero-proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.hero-proof li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* 07 — Bands ============================================================== */
.band {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.band .wrap { padding-block: var(--space-5); }

.band h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  max-width: 26ch;
}

.band p {
  max-width: 62ch;
  color: var(--muted);
}

.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-block: var(--space-5);
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 0.3em;
}

.cta-band p {
  color: var(--muted-dark);
  max-width: 52ch;
  margin: 0;
}

.cta-band .btn-primary { white-space: nowrap; }

/* 08 — Page hero =========================================================== */
.page-hero {
  background:
    radial-gradient(900px 320px at 90% -20%, var(--accent-soft) 0%, transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero .wrap { padding-block: clamp(48px, 7vw, 80px); }

.page-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  max-width: 24ch;
}

.page-hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-2);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

/* 09 — Cards (index) ======================================================= */
.cards .wrap { padding-block: var(--space-5); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-1);
}

.card h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 12px;
  border-radius: 2px;
  background: var(--accent);
}

.card p { color: var(--muted); font-size: 0.95rem; }

/* 10 — Services ============================================================ */
.services-list .wrap {
  padding-block: var(--space-5) var(--space-6);
}

.service-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
}

.service-item:first-child {
  border-top: 2px solid var(--ink);
}

.service-item:last-child {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  padding-top: 4px;
}

.service-body h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin-bottom: var(--space-1);
}

.service-body p {
  color: var(--muted);
  max-width: 62ch;
}

/* 11 — About =============================================================== */
.about .wrap { padding-block: var(--space-6); }

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.about-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-bottom: var(--space-3);
}

.about-body p {
  color: var(--muted);
  max-width: 62ch;
}

.about-body p:first-of-type {
  color: var(--ink);
  font-size: 1.05rem;
}

.about-card {
  position: sticky;
  top: 96px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.about-card h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.about-role {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}

.about-list {
  list-style: none;
  margin-bottom: var(--space-3);
}

.about-list li {
  position: relative;
  padding: 7px 0 7px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}

.about-list li:last-child { border-bottom: none; }

.about-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 2px;
  background: var(--accent);
}

/* 12 — Contact ============================================================== */
.contact .wrap { padding-block: var(--space-6); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.contact-form-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.contact-side {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.contact-side h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}

.contact-list {
  list-style: none;
  margin-bottom: var(--space-3);
}

.contact-list li { padding: 4px 0; }

.contact-list a {
  text-decoration: none;
  font-weight: 500;
  word-break: break-word;
}

.contact-list a:hover { text-decoration: underline; }

.contact-note {
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}

.contact-note p {
  font-size: 0.92rem;
  color: var(--muted);
}

/* 13 — Forms ================================================================ */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-2);
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .muted {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa1ac;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: #c9c2b4;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235c6470' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.field-row .field { margin-bottom: var(--space-2); }

.muted { color: var(--muted); }

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.form-status {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--err); }

/* 14 — Diagnostic ========================================================= */
.diagnostic .wrap { padding-block: var(--space-5); }

.diag-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}

.diag-form-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.diag-result-wrap {
  position: sticky;
  top: 96px;
}

.diag-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.diag-score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--line);
}

.diag-output {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.diag-output p { margin-bottom: 1em; }

.diag-empty {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.diag-empty p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 48ch;
}

/* 15 — Dashboard =========================================================== */
.dash .wrap { padding-block: var(--space-5); }

.dash-status {
  margin-bottom: var(--space-2);
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  margin-top: 4px;
}

.stat-dot.up {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.dash-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.dash-panel:first-child {
  grid-column: 1 / -1;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line);
}

.gen-result-wrap { margin-top: var(--space-2); }

.gen-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 48px;
  max-height: 380px;
  overflow-y: auto;
  color: var(--ink);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.table tbody tr:last-child td { border-bottom: none; }

.table-empty {
  text-align: center;
  color: var(--muted);
  padding: var(--space-4) 16px !important;
  font-style: italic;
}

/* 16 — About page (extra helpers) ========================================= */
/* (covered in section 11) */

/* 17 — Reduced motion ====================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover { transform: none; }
  .btn:active { transform: none; }
}

/* 18 — Responsive ========================================================== */
@media (max-width: 1024px) {
  .diag-grid {
    grid-template-columns: 1fr;
  }

  .diag-result-wrap {
    position: static;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-panel:first-child {
    grid-column: auto;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-card {
    position: static;
  }
}

@media (max-width: 720px) {
  :root {
    font-size: 15px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .nav {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding-block: 12px;
  }

  .nav-links {
    gap: var(--space-2);
    font-size: 0.88rem;
  }

  .nav-cta {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .stat-num {
    font-size: 1.4rem;
  }

  .footer-inner {
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding-inline: 16px;
  }

  .hero .wrap {
    padding-block: 48px 40px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* 19 — Brand layout ===== */
/* Sticky translucent white header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

/* Two-line wordmark */
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-sub {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

/* Two-column hero */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: var(--space-4);
}

.hero-photo {
  background: var(--paper-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

/* Proof row — small icon + label items */
.proof-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.proof-row .proof-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink);
}

.proof-row .proof-item .proof-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

/* Stats band */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.stat-big {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.stat-cap {
  color: var(--muted);
  font-size: 0.9rem;
}

.stats-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Process steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

/* FAQ accordions */
.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: var(--space-2);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
}

.faq details[open] summary::after { content: "−"; }

.faq .faq-a {
  padding-top: var(--space-2);
  color: var(--muted);
  max-width: 70ch;
}

/* About photo */
.about-photo {
  border-radius: var(--radius-lg);
  max-width: 260px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Closing CTA band */
.cta-band {
  background: var(--navy);
  color: #fff;
}

.cta-band h2 { color: #fff; }

.cta-band p { color: var(--muted-dark); }

/* Stack the brand layout pieces on narrow screens */
@media (max-width: 860px) {
  .hero-split {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .hero-photo {
    order: -1;
    max-height: 420px;
  }

  .proof-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   End of stylesheet
   ========================================================================== */

/* 20 — Services: pain → solution ======================================== */
.service-pain {
  font-family: var(--serif);
  color: var(--navy);
  margin-bottom: 6px;
}
.service-fix {
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
}
.service-fix::before { content: "→ "; }

/* 21 — Wider layout: use more of the screen =============================== */
.wrap { padding-inline: clamp(20px, 3vw, 48px); }
.hero h1 { max-width: 22ch; }
.hero .lede { max-width: 68ch; }
.band h2 { max-width: 40ch; }
.band p,
.service-body p,
.about-body p { max-width: 80ch; }
.cta-band p { max-width: 70ch; }
.page-hero h1 { max-width: 32ch; }
.page-hero .lede { max-width: 76ch; }
.services-list .service-item { max-width: none; }

@media (max-width: 480px) {
  .wrap { padding-inline: 16px; }
}

/* 22 — Social Planner ===================================================== */
.social-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-3);
}

.social-tabs .tab-btn {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.social-tabs .tab-btn:hover { color: var(--ink); }

.social-tabs .tab-btn[aria-selected="true"],
.social-tabs .tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.social-panel { padding-top: var(--space-2); }

.social-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.social-card textarea {
  min-height: 140px;
  width: 100%;
  resize: vertical;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--paper);
}

.char-count {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.char-count.over { color: var(--err); font-weight: 600; }

.status-chip {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--paper-2);
  color: var(--muted);
}

.badge-required {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--err-soft);
  color: var(--err);
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cal-day {
  min-height: 110px;
  padding: 6px;
  background: var(--paper);
}

.cal-day.muted { background: var(--paper-2); }

.cal-day.today { outline: 2px solid var(--accent); outline-offset: -2px; }

.cal-day.drag-over { background: var(--accent-soft); }

.cal-chip {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 3px 6px;
  margin-bottom: 4px;
  background: var(--paper);
  border-left: 3px solid var(--muted);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
}

.post-modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 32, 68, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  z-index: 100;
}

.post-modal .modal-body {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: auto;
}

.mock-note {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .cal-day { min-height: 70px; }
  .cal-chip .chip-text { display: none; }
}

/* 23 — Launch polish: mobile menu, hero order, footer ===================== */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.nav-toggle { display: none; }

/* No white strip between a closing navy band and the footer */
main:has(> .cta-band:last-child) + .site-footer { margin-top: 0; }

.footer-area { color: var(--muted-dark); }
.footer-meta a { white-space: nowrap; }
.about-area { color: var(--muted); font-size: 0.92rem; margin: 4px 0 12px; }

@media (max-width: 860px) {
  /* Headline first, photo second on phones and tablets */
  .hero-photo { order: 2; max-height: 340px; }
}

@media (max-width: 720px) {
  /* One compact header row with a menu button */
  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-block: 10px;
  }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 38px; padding: 8px 10px;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; cursor: pointer;
  }
  .nav-toggle-bar { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 4px; border-top: 1px solid var(--line); }
  .nav-links .nav-cta { margin-top: 8px; text-align: center; border-top: 0; padding: 12px 14px; }
  .hero-actions .btn { white-space: normal; }
}

/* 24 — Platform page ======================================================= */
.platform-figure .wrap { padding-block: var(--space-5) var(--space-4); }
.platform-figure img { display: block; width: 100%; max-width: 1200px; height: auto; margin-inline: auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { font-size: 0.92rem; margin: 0; }

.cost-section .wrap { padding-block: var(--space-6); }
.cost-section h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cost-intro { max-width: 62ch; margin-bottom: var(--space-3); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cost-table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.cost-table th, .cost-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cost-table thead th {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink-2);
}
.cost-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-table tbody td:nth-child(2) { color: var(--muted); }
.cost-table .subtotal th, .cost-table .subtotal td { font-weight: 700; background: var(--paper-2); }
.cost-table .ours th, .cost-table .ours td { font-weight: 800; color: var(--accent-2); background: var(--accent-soft); }
.cost-table .divider td { border: 0; padding: 8px; }

.savings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  max-width: 900px;
  margin-top: var(--space-4);
}
.saving {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: var(--card);
}
.saving-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.saving-label { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.cost-notes { max-width: 900px; margin-top: var(--space-3); font-size: 0.82rem; color: var(--muted); }

.cta-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-on-dark:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

.teaser-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.teaser-inner > div { flex: 1 1 520px; }
.teaser-inner h2 { max-width: 44ch; }

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .feature-grid, .savings-row { grid-template-columns: 1fr; }
  .cost-table { font-size: 0.9rem; }
  .cost-table th, .cost-table td { padding: 10px 8px; }
}

/* 25 — Loop to the product site ============================================ */
.diag-next { margin-top: var(--space-3); padding: var(--space-2) var(--space-3); border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 6px; }
.diag-next p { margin: 0 0 6px; }
.diag-next a { font-weight: 600; }

.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field-check input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.footer-more { margin-top: 6px; font-size: 0.9rem; }
