/* ============================================================
   Vizible Proposal Builder — design system
   Brand palette, type, and logos per the Vizible brand sheet.
   ============================================================ */
:root {
  /* brand */
  --navy:       #0C2443;   /* primary */
  --navy-dk:    #081a31;
  --blue:       #58A9C7;   /* mid */
  --blue-dk:    #356991;   /* mid-dark — accessible accent on white */
  --sky:        #94CDDF;   /* light */
  --sky-lt:     #E8F4F9;
  /* Not part of the four-colour brand palette — used ONLY for the plan name
     plates, to match vizibleagency.com/pricing. Nothing else should use it. */
  --gold:       #FFD866;

  /* neutrals — body grey matches the live site */
  --ink:        var(--navy);
  --ink-soft:   #334155;
  --ink-mute:   #94a5b5;
  --paper:      #ffffff;
  --mist:       #f4f8fb;
  --line:       #dde8ef;
  --line-soft:  #eaf1f6;

  --shadow:     0 18px 48px -24px rgba(12,36,67,.3);
  --radius:     14px;
  --side:       298px;
  --gutter:     clamp(24px, 4.5vw, 72px);
  --maxw:       1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Nunito Sans headings / Figtree body, letter-spacing normal and weights 700/600
   — matching the computed type on vizibleagency.com. */
h1, h2, h3 { font-family: "Nunito Sans", "Figtree", sans-serif; line-height: 1.18; letter-spacing: normal; margin: 0; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.85rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 1.7vw, 1.32rem); font-weight: 600; }
p  { margin: 0 0 1rem; max-width: 64ch; }
a  { color: var(--blue-dk); text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ============================================================
   SHELL — fixed sidebar + scrolling document
   ============================================================ */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.main  { min-width: 0; }

/* read progress, pinned to the top of the document pane */
.progress {
  position: fixed; top: 0; left: var(--side); right: 0; height: 2px; z-index: 60;
  background: var(--blue); transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- sidebar ---------- */
.side {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  height: 100dvh;            /* dvh so mobile browser chrome doesn't clip it */
  overflow-y: auto;          /* a long index scrolls the panel, not the page */
  display: flex; flex-direction: column;
  padding: 30px 22px 24px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  z-index: 80;
}
.side__brand { display: block; }
.side__brand img { width: 186px; height: auto; display: block; }

.side__doc { margin-top: 24px; }
.side__doc b { display: block; font-size: .86rem; font-weight: 700; }
.side__doc span { display: block; font-size: .8rem; color: var(--ink-mute); margin-top: 2px; }

.side__label {
  margin: 26px 0 8px; font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute);
}

.side__nav { display: flex; flex-direction: column; gap: 1px; margin: 0 -8px; padding: 0 8px 8px; }
.side__nav a {
  position: relative; display: grid; grid-template-columns: 26px 1fr; align-items: center;
  gap: 8px; padding: 9px 12px; border-radius: 9px;
  font-size: .9rem; color: var(--ink); font-weight: 500;
  transition: background .16s ease, color .16s ease;
}
.side__nav a i {
  font-style: normal; font-size: .74rem; font-weight: 600; color: var(--ink-mute);
  font-variant-numeric: tabular-nums; transition: color .16s ease;
}
.side__nav a:hover { background: var(--line-soft); }
.side__nav a.is-active { background: var(--sky-lt); font-weight: 600; }
.side__nav a.is-active i { color: var(--blue-dk); }
.side__nav a.is-active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: var(--blue);
}

.side__foot { margin-top: auto; padding-top: 22px; }
.side__cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .86rem; font-weight: 600; color: var(--ink);
  transition: border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.side__cta:hover { border-color: var(--blue); color: var(--blue-dk); box-shadow: var(--shadow); }
.side__print {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 10px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  transition: color .18s ease, border-color .18s ease;
}
.side__print:hover { color: var(--blue-dk); border-color: var(--line); }
.side__status {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: .78rem; color: var(--ink-soft);
}
.side__status em { font-style: normal; font-weight: 600; color: var(--ink); }
.side__status .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 4px rgba(88,169,199,.22);
}

/* ---------- mobile top bar + drawer ---------- */
.topbar { display: none; }
.scrim { display: none; }

@media (max-width: 1040px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .progress { left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 14px;
    position: sticky; top: 0; z-index: 70; height: 60px;
    padding: 0 clamp(16px, 5vw, 28px);
    background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .topbar__burger {
    display: grid; place-items: center; gap: 4px; width: 38px; height: 38px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  }
  .topbar__burger span { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--ink); }
  .topbar__logo { height: 24px; width: auto; display: block; }
  .topbar__title {
    min-width: 0; font-size: .86rem; font-weight: 600; color: var(--ink-soft);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .topbar__cta {
    margin-left: auto; background: var(--navy); color: #fff; padding: 8px 15px;
    border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
  }
  html { scroll-padding-top: 76px; }
  /* On narrow phones the client name only crowds the bar, so it goes. That leaves
     the wordmark stranded against the burger with a dead gap mid-bar. An auto margin
     on each side of it splits the slack evenly, so it sits centred between the burger
     and the CTA however wide those two happen to be — geometric centring would push
     it against the CTA, which is the wider of the two.
     The bar-wide 24px above is deliberate: the wordmark carries a "MARKETING AGENCY"
     line that turns to mush much below it. */
  @media (max-width: 560px) {
    .topbar__title { display: none; }
    /* Scales with the screen: the binding constraint is the CTA, which is 144px
       wide on the overview ("Book a strategy call") against 92px on a client
       proposal. Fixed at the larger size the logo would collide on a 320px phone,
       so it grows with the viewport and stops at 34px. */
    .topbar__logo { height: clamp(26px, 8.2vw, 34px); margin-left: auto; }
    .topbar { padding: 0 15px; gap: 10px; }
    .topbar__cta { padding: 8px 13px; font-size: .78rem; }
  }

  .side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw);
    height: 100dvh;   /* full-height drawer — not content height */
    transform: translateX(-101%); transition: transform .26s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 0 60px -18px rgba(12,36,67,.45);
  }
  .side.is-open { transform: none; }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 75;
    background: rgba(12,36,67,.45); opacity: 0; pointer-events: none; transition: opacity .26s ease;
  }
  .scrim.is-open { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* ============================================================
   Shared pieces
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: 0 12px 26px -12px rgba(12,36,67,.6); }
.btn--primary:hover { background: var(--blue-dk); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-dk); }
.btn--accent { background: var(--sky); color: var(--navy); }
.btn--accent:hover { background: #b4dcea; }

/* eyebrow: 04 / INVESTMENT */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow i { font-style: normal; color: var(--blue-dk); font-variant-numeric: tabular-nums; }
.eyebrow em { font-style: normal; color: var(--ink-mute); font-weight: 500; }
.eyebrow b { color: var(--ink-soft); font-weight: 700; }
.eyebrow u { text-decoration: none; color: var(--ink-mute); }

/* ---------- section scaffold ---------- */
.section { padding: clamp(56px, 7vw, 100px) 0; border-top: 1px solid var(--line); }
.section--mist { background: var(--mist); }
.section__lead { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--ink-soft); max-width: 62ch; margin-top: 16px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(130% 90% at 12% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(130% 90% at 12% 0%, #000 0%, transparent 72%);
}
/* block-only padding — the horizontal gutter comes from .wrap */
.hero__inner { position: relative; padding-top: clamp(44px, 6vw, 84px); padding-bottom: clamp(48px, 6vw, 76px); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); font-weight: 700; margin: 0; max-width: 16ch; }
.hero h1 span { display: block; color: var(--blue-dk); }
.hero__rule { width: 78px; height: 3px; border-radius: 3px; background: var(--navy); margin: 34px 0 30px; }
.hero__sub { font-size: clamp(1.05rem, 1.7vw, 1.24rem); color: var(--ink-soft); margin: 0 0 34px; max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__meta {
  display: grid; grid-template-columns: repeat(var(--cells, 4), 1fr); margin: clamp(44px, 6vw, 72px) 0 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden;
}
.hero__meta > div { padding: 20px 24px; border-left: 1px solid var(--line); }
.hero__meta > div:first-child { border-left: none; }
.hero__meta dt {
  font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute);
}
.hero__meta dd { margin: 8px 0 0; font-family: "Nunito Sans", sans-serif; font-weight: 700; font-size: 1.04rem; }
@media (max-width: 900px) {
  .hero__meta { grid-template-columns: repeat(2, 1fr); }
  .hero__meta > div:nth-child(odd) { border-left: none; }
  .hero__meta > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .hero__meta { grid-template-columns: 1fr; }
  .hero__meta > div { border-left: none; }
  .hero__meta > div + div { border-top: 1px solid var(--line); }
}

/* ============================================================
   Custom blocks — prose, definition list, table, callout
   ============================================================ */
.prose { margin-top: 34px; max-width: 74ch; }
.prose p { font-size: 1rem; color: var(--ink-soft); margin: 0 0 1.05rem; max-width: none; }
.prose p:last-child { margin-bottom: 0; }

.subhead { margin: 44px 0 0; font-size: 1.15rem; }

.deflist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 36px; }
.deflist > div { padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.deflist b { display: block; font-family: "Nunito Sans", sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.deflist p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
@media (max-width: 860px) { .deflist { grid-template-columns: 1fr; } }

/* wide tables scroll inside their own container, never the page */
.dtable-wrap { margin-top: 36px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.dtable { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .93rem; }
.dtable th {
  text-align: left; padding: 14px 20px; background: var(--mist);
  font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-mute); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.dtable td { padding: 16px 20px; border-top: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
.dtable tbody tr:first-child td { border-top: none; }
.dtable__key { font-weight: 600; color: var(--ink); white-space: nowrap; }

.callout {
  margin-top: 30px; padding: 24px 28px;
  background: var(--navy); color: #fff; border-radius: var(--radius);
}
.callout b {
  display: block; font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin-bottom: 10px;
}
.callout p {
  margin: 0; font-family: "Nunito Sans", sans-serif; font-weight: 600;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: #fff; max-width: 56ch;
}
.section--mist .prose p, .section--mist .deflist p { color: var(--ink-soft); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { padding: 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: "Nunito Sans", sans-serif; font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 700; color: var(--navy); line-height: 1; }
.stat .lbl { display: block; font-weight: 600; margin: 8px 0 6px; }
.stat .note { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.stat:nth-child(3) b { color: var(--blue-dk); }
@media (max-width: 1240px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .stats { grid-template-columns: 1fr; } }

/* ---------- thesis quote ---------- */
.thesis { margin-top: 44px; padding: 30px 34px; border-left: 4px solid var(--blue); background: var(--sky-lt); border-radius: 0 var(--radius) var(--radius) 0; }
.thesis p { font-family: "Nunito Sans", sans-serif; font-size: clamp(1.2rem, 2.2vw, 1.65rem); font-weight: 600; color: var(--navy); margin: 0; max-width: 50ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { font-size: .82rem; font-weight: 500; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; }

/* ---------- services grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.card { padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__group { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-dk); margin-bottom: 12px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .94rem; color: var(--ink-soft); }
.card ul { list-style: none; padding: 0; margin: auto 0 0; }
.card li { font-size: .9rem; padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--line); }
.card li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
@media (max-width: 1240px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .cards { grid-template-columns: 1fr; } }

/* ---------- implementation (numbered phases) ---------- */
.phases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 44px; }
.phase { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.phase__n { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.phase__n span { font-family: "Nunito Sans", sans-serif; font-size: 2rem; font-weight: 700; color: var(--sky-lt); -webkit-text-stroke: 1.5px var(--blue); }
.phase__n em { font-style: normal; font-weight: 700; color: var(--blue-dk); font-size: .9rem; }
.phase p { font-size: .94rem; color: var(--ink-soft); }
.phase__items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.phase__items span { font-size: .8rem; background: var(--mist); border: 1px solid var(--line); padding: 5px 11px; border-radius: 8px; }
@media (max-width: 900px) { .phases { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */
.timeline { margin-top: 44px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.tl-row { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 22px 24px; border-top: 1px solid var(--line); }
.tl-row:first-child { border-top: none; }
.tl-row__win { font-family: "Nunito Sans", sans-serif; font-weight: 700; color: var(--blue-dk); }
.tl-row__ms b { display: block; margin-bottom: 4px; }
.tl-row__ms p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.gate { margin-top: 22px; display: flex; gap: 14px; padding: 18px 22px; background: var(--sky-lt); border: 1px solid var(--sky); border-radius: var(--radius); }
.gate i { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--blue-dk); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; }
.gate p { margin: 0; font-size: .92rem; }
@media (max-width: 560px) { .tl-row { grid-template-columns: 1fr; gap: 6px; } }

/* ============================================================
   PRICING — Vizible plan columns (Vantage / Visionary / Velocity / Viral)
   ============================================================ */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; align-items: start; }
.plan { display: flex; flex-direction: column; gap: 14px; }

.plan__head {
  border-radius: var(--radius); padding: 22px 20px 20px; text-align: center; color: #fff;
  background: var(--tone, var(--blue));
}
.plan--sky   { --tone: var(--sky);     }
.plan--blue  { --tone: var(--blue);    }
.plan--deep  { --tone: var(--blue-dk); }
.plan--navy  { --tone: var(--navy);    }
/* the light tint needs dark text to stay readable */
.plan--sky .plan__head { color: var(--navy); }

.plan__cat { font-size: .88rem; font-weight: 600; opacity: .95; }
.plan__price {
  font-family: "Nunito Sans", sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 2.1vw, 1.9rem); line-height: 1.15; margin-top: 8px;
}
.plan__name {
  margin-top: 16px; background: var(--gold); color: var(--navy);
  font-family: "Nunito Sans", sans-serif; font-weight: 700; font-size: 1.25rem;
  padding: 10px 12px; border-radius: 6px;
}
.plan--hl { position: relative; }
.plan--hl .plan__head { box-shadow: 0 0 0 3px var(--navy); }
.plan--hl::after {
  content: "Recommended"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
}

.plan__rows { display: flex; flex-direction: column; gap: 10px; }
.plan__row {
  display: grid; grid-template-columns: 34px 16px 1fr; align-items: center; gap: 10px;
  min-height: 54px; padding: 10px 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: .88rem; font-weight: 500;
}
.plan__row img { width: 30px; height: 30px; object-fit: contain; }
.plan__row i { font-style: normal; font-weight: 700; color: var(--ink-mute); text-align: center; }
/* the "<previous> Plan +" inheritance row */
.plan__row--base { background: var(--sky-lt); border-color: var(--sky); font-weight: 600; grid-template-columns: 34px 1fr; }
.plan__row--base i { display: none; }

.plans__note { margin: 26px 0 0; font-size: .88rem; color: var(--ink-soft); }

.billed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.billed div { padding: 18px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.billed b { display: block; margin-bottom: 4px; font-size: .95rem; }
.billed p { margin: 0; font-size: .86rem; color: var(--ink-soft); }

@media (max-width: 1180px) { .plans { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 1100px) { .billed { grid-template-columns: 1fr; } }
@media (max-width: 620px)  { .plans { grid-template-columns: 1fr; } }

/* ---------- two-column include/exclude ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.panel h3 { margin-bottom: 16px; }
.panel ul { list-style: none; padding: 0; margin: 0; }
.panel li { font-size: .93rem; padding: 9px 0 9px 26px; position: relative; border-top: 1px solid var(--line); color: var(--ink-soft); }
.panel li:first-child { border-top: none; }
.panel--yes li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 11px; height: 6px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.panel--no li::before { content: "×"; position: absolute; left: 4px; top: 8px; color: #c05353; font-weight: 700; }
.assume { margin-top: 22px; }
.assume ol { margin: 16px 0 0; padding-left: 0; list-style: none; counter-reset: a; }
.assume li { counter-increment: a; position: relative; padding: 12px 0 12px 44px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--ink-soft); }
.assume li::before { content: counter(a, decimal-leading-zero); position: absolute; left: 0; top: 12px; font-family: "Nunito Sans", sans-serif; font-weight: 700; color: var(--blue-dk); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- why vizible ---------- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.why div { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.why b { display: block; font-family: "Nunito Sans", sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.why p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 1240px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .why { grid-template-columns: 1fr; } }

/* ---------- next steps CTA ---------- */
.next { background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dk) 100%); color: #fff; }
.next h2, .next h3 { color: #fff; }
.next .eyebrow i { color: var(--sky); }
.next .eyebrow b { color: var(--sky); }
.next .eyebrow em { color: rgba(255,255,255,.4); }
.next__lead { color: var(--sky); max-width: 54ch; margin: 16px 0 34px; font-size: 1.1rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
.step { padding: 26px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.step em { font-family: "Nunito Sans", sans-serif; font-style: normal; font-weight: 700; font-size: 1.6rem; color: var(--sky); }
.step b { display: block; margin: 10px 0 6px; }
.step p { margin: 0; font-size: .92rem; color: var(--sky); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { padding: 40px 0; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-soft); }
.foot__inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot a { font-weight: 600; }

/* ---------- loading / error ---------- */
.state { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px; }
.state h2 { margin-bottom: 12px; }
.state p { color: var(--ink-soft); margin-inline: auto; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero h1, .hero__rule, .hero__sub, .hero__actions, .hero__meta {
    opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards;
  }
  .hero h1        { animation-delay: .06s; }
  .hero__rule     { animation-delay: .14s; }
  .hero__sub      { animation-delay: .2s; }
  .hero__actions  { animation-delay: .26s; }
  .hero__meta     { animation-delay: .34s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- print / "Download PDF" ---------- */
/* window.print() is the PDF generator, so these rules ARE the PDF. The screen
   design fights paper: it is built from tinted panels, coloured plan columns and
   icon rows, and every one of those is a box the paginator must keep whole. So
   print re-renders the same markup as a plain document — one column, headings,
   paragraphs, lists — which reads better on A4 and hands the paginator small
   blocks it can actually place.

   Two things follow from that, and both fix real faults:

   - Nothing depends on a background printing. Chrome's "Background graphics"
     box is OFF by default, and the closing section is white type on navy — left
     off, that page came out blank. Every dark panel is now dark-on-white.
   - The plan-row icons are dropped, not shrunk. They repeat the label beside
     them, and an image is monolithic: it cannot fragment, so one sitting near a
     page edge shunted its whole row across the break.

   Units are pt here on purpose. rem/vw/clamp are sized for a viewport; on a
   sheet of paper they drift with whatever the browser decides the page box is. */
@media print {
  html {
    -webkit-print-color-adjust: exact;   /* Safari */
    print-color-adjust: exact;           /* everyone else */
  }
  @page { margin: 16mm 15mm; }

  body { font-size: 10.5pt; line-height: 1.5; color: var(--navy); }
  h1 { font-size: 24pt; }
  h2 { font-size: 15pt; }
  h3 { font-size: 11pt; }
  p  { max-width: none; }

  /* Screen furniture. The hero's grid overlay goes too — it is a masked
     gradient, which prints as a grey smear or not at all. */
  .side, .topbar, .progress, .scrim, .hero::before { display: none !important; }
  .shell { display: block; }
  .wrap { max-width: none; padding: 0; }

  /* An in-page jump is a dead link on paper; real destinations stay live. */
  .btn[href^="#"] { display: none !important; }

  /* The hero fades in on load. If the sheet is captured before that settles the
     page prints empty, so pin the finished state. */
  .hero .eyebrow, .hero h1, .hero__rule, .hero__sub, .hero__actions, .hero__meta {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }

  /* ---- one column, everywhere -------------------------------------------
     Grid items fragment badly across a page break in every engine, so no grid
     is allowed to span one. Anything multi-column becomes a stack; the two that
     stay (the hero meta strip, the stat row) are short enough to keep whole. */
  .cards, .phases, .plans, .split, .why, .steps, .deflist, .billed { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10pt 20pt; break-inside: avoid; }

  /* ---- flatten the panels ------------------------------------------------
     On screen every block is a bordered, tinted, rounded card. On paper that is
     a dozen boxes a page and a lot of ink carrying no meaning. Structure comes
     back as whitespace and hairline rules. */
  .card, .phase, .stat, .panel, .why div, .deflist > div, .billed div, .step,
  .plan__row, .timeline, .dtable-wrap, .chip, .phase__items span,
  .callout, .thesis, .gate, .plan__head, .plan__name, .assume {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .section--mist, .next { background: none !important; }

  /* Sections deliberately do NOT force a page break. Measured on the School of
     PE proposal — 14 sections — forcing one costs five extra sheets and leaves
     four pages between 32% and 48% full, because half the sections are shorter
     than a page. 16 sheets against 11 for the same words. The eyebrow marks the
     boundary well enough, and the break-after rules below stop a heading being
     stranded at the foot of a page, which was the actual problem. */
  .section { border-top: 0; padding: 8mm 0; }
  .hero { padding: 0; }
  .hero__inner { padding: 0 0 6mm; }
  .hero h1 { max-width: none; }
  .hero__rule { margin: 5mm 0 4mm; }
  .hero__sub { font-size: 12pt; margin-bottom: 6mm; }
  .hero__meta { margin-top: 6mm; border-color: var(--line); }
  .hero__meta > div { padding: 7pt 10pt; }
  .hero__meta dd { font-size: 10.5pt; }
  .section__lead { font-size: 11pt; margin-top: 3mm; }
  .subhead { margin-top: 8mm; }
  .prose { margin-top: 5mm; }

  /* break-after only applies to block-level boxes, and .eyebrow is inline-flex
     on screen — so the rule below was being dropped and section numbers kept
     stranding at the foot of a page. Block-level flex keeps the row layout. */
  .eyebrow { display: flex; margin-bottom: 3mm; font-size: 8pt; }

  /* ---- services ---- */
  .cards { margin-top: 6mm; }
  .card { padding: 0; border: 0; }
  .card + .card { margin-top: 7mm; padding-top: 5mm; border-top: 1px solid var(--line); }
  .card__group { margin-bottom: 4pt; }
  /* The row rules inside a list are noise once the card border is gone. The
     padding stays put: the tick is absolutely positioned against it. */
  .card li, .panel li, .assume li, .tl-row, .dtable tbody tr:first-child td {
    border-top: 0 !important;
  }
  .card ul { margin-top: 4pt; }

  /* ---- implementation ---- */
  .phases { margin-top: 6mm; }
  .phase { padding: 0; border: 0; }
  .phase + .phase { margin-top: 7mm; }
  /* Outlined numerals: a near-white fill with a thin stroke, which prints as
     nothing much. Solid ink instead. */
  .phase__n span { -webkit-text-stroke: 0; color: var(--blue-dk); font-size: 14pt; }

  /* ---- timeline ---- */
  .timeline { margin-top: 6mm; border: 0; overflow: visible; }
  .tl-row { padding: 5pt 0; }
  .tl-row + .tl-row { border-top: 1px solid var(--line) !important; }
  .gate { display: block; border: 0; border-left: 2pt solid var(--blue-dk); padding: 0 0 0 10pt; margin-top: 5mm; }
  .gate i { display: none; }

  /* ---- plans ------------------------------------------------------------
     A plan column becomes a titled block: name, price, category, then its
     features as a plain list. Reordering needs a flex container — the head is a
     plain stack of divs on screen. */
  .plans { margin-top: 6mm; }
  .plan { gap: 0; }
  .plan + .plan { margin-top: 8mm; }
  .plan__head {
    display: flex; flex-direction: column; align-items: flex-start;
    text-align: left; color: var(--navy) !important;
    padding: 0 0 3pt; border-bottom: 1pt solid var(--navy);
  }
  .plan__name  { order: -2; margin: 0; padding: 0; color: var(--navy) !important; font-size: 14pt; }
  .plan__price { order: -1; margin: 2pt 0 0; font-size: 11.5pt; }
  .plan__cat   { font-size: 9pt; font-weight: 500; color: var(--ink-soft); }
  /* The screen badge is absolutely positioned, so in normal flow it would land
     after the feature list. Say it in the title instead. */
  .plan--hl::after { display: none; }
  .plan--hl .plan__head { box-shadow: none !important; }
  .plan--hl .plan__name::after {
    content: " — Recommended"; font-size: 8.5pt; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dk);
  }
  .plan__rows { gap: 0; margin-top: 3pt; }
  .plan__row {
    display: block; position: relative; min-height: 0;
    padding: 2.5pt 0 2.5pt 12pt; border: 0; font-size: 10pt;
  }
  .plan__row::before { content: "•"; position: absolute; left: 1pt; color: var(--blue-dk); }
  .plan__row img, .plan__row i { display: none !important; }
  .plan__row--base { font-weight: 700; padding-left: 0; }
  .plan__row--base::before { content: none; }
  .plans__note { font-size: 9.5pt; margin-top: 5mm; }
  .billed div { padding: 0; border: 0; }
  .billed div + div { margin-top: 4mm; }

  /* ---- tables ----
     An overflow container is monolithic when the page fragments: Chrome will not
     paginate inside it, so rows tore mid-cell. Nothing scrolls on paper. */
  .dtable-wrap { border: 0; overflow: visible; margin-top: 6mm; }
  .dtable { min-width: 0; font-size: 9.5pt; }
  .dtable th { background: none !important; color: var(--navy); border-bottom: 1pt solid var(--navy); padding: 6pt 10pt 6pt 0; }
  .dtable td { padding: 5pt 10pt 5pt 0; }
  /* A table crossing a page repeats its header instead of leaving bare cells. */
  thead { display: table-header-group; }

  /* ---- scope ---- */
  .split { margin-top: 6mm; }
  .panel { padding: 0; border: 0; }
  .panel + .panel, .assume { margin-top: 7mm; }
  .panel h3 { margin-bottom: 3mm; }

  /* ---- why / overview blocks ---- */
  .why, .deflist { margin-top: 6mm; }
  .why div, .deflist > div { padding: 0; border: 0; }
  .why div + div, .deflist > div + div { margin-top: 5mm; }
  .stat { padding: 0; border: 0; }
  .stat b { font-size: 20pt; }
  .thesis { padding: 0 0 0 10pt; border-left: 2pt solid var(--blue); margin-top: 6mm; }
  .thesis p { font-size: 13pt; }
  .callout { padding: 0 0 0 10pt; border-left: 2pt solid var(--blue); margin-top: 5mm; }
  .callout b { color: var(--blue-dk) !important; }
  .callout p, .callout { color: var(--navy) !important; font-size: 12pt; }

  /* Chip rows read as a run of text rather than a row of outlined pills. */
  .chips, .phase__items { display: block; margin-top: 4mm; font-size: 9.5pt; color: var(--ink-soft); }
  .chip, .phase__items span { display: inline; border: 0 !important; padding: 0; }
  .chip:not(:last-child)::after, .phase__items span:not(:last-child)::after { content: " · "; }

  /* ---- closing section ----
     White type on a navy gradient on screen. Everything here is forced dark:
     .btn--ghost carries an inline style="color:#fff", which only !important
     beats, and a missed one prints as white-on-white — invisible, not obviously
     broken. */
  .next, .next h2, .next h3, .next p, .next b, .next em, .next i,
  .next .eyebrow i, .next .eyebrow b, .next a, .next .btn,
  .step, .step b, .step p { color: var(--navy) !important; }
  .next__lead, .next .eyebrow em, .step p { color: var(--ink-soft) !important; }
  .next__lead { font-size: 11pt; margin: 3mm 0 6mm; }
  .steps { margin: 6mm 0; }
  .step { padding: 0; border: 0 !important; }
  .step + .step { margin-top: 5mm; }
  .step em { color: var(--blue-dk) !important; font-size: 12pt; }

  /* CTAs stay live in the PDF and are worth keeping — as text, not as pills. */
  .btn {
    padding: 0; border: 0 !important; background: none !important;
    font-size: 10.5pt; font-weight: 600; text-decoration: underline;
    color: var(--blue-dk) !important;
  }
  .hero__actions { gap: 16pt; }

  .foot { padding: 6mm 0 0; font-size: 9pt; }

  /* ---- pagination -------------------------------------------------------
     Blocks now measure well under half a page each, so keeping them whole is
     cheap. Cards are the exception the renderer already flags: one taller than
     a page cannot be honoured, and forcing it only shunts it to a fresh sheet
     to be split there anyway, stranding a near-empty page behind it. */
  .plan, .stat, .step, .phase, .thesis, .callout, .gate, .tl-row, .card,
  .why div, .deflist > div, .billed div, .hero__meta, .foot, tr, li, h1, h2, h3 {
    break-inside: avoid;
  }
  .card--long { break-inside: auto; }
  /* Site-wide guard: an image cannot fragment, so one straddling a break is
     pushed whole to the next page rather than clipped by it. */
  img, svg, figure { break-inside: avoid; max-width: 100%; height: auto; }

  /* A heading at the foot of a page is worth nothing, and neither is one stray
     line of a paragraph. The eyebrow counts as part of the heading: it carries
     the section number. The lead paragraph is left out on purpose — chaining it
     too drags the first content block up as well, buying a stranded heading
     back as a half-empty page. */
  h1, h2, h3, .eyebrow, .card__group, .plan__head, .phase__n { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
}
