/* ==========================================================================
   Football Reach - design system v2 "The Measured Game"
   --------------------------------------------------------------------------
   Editorial sports-journal meets modern athletic brand. The product is honest
   measurement, so the visual language is measurement: ruler ticks, pitch
   line-work, oversized numerals, hairline rules, film grain on dark surfaces.

   Type: Bricolage Grotesque (display) / Instrument Sans (body) /
         Spline Sans Mono (numeric + eyebrows). Loaded from Google Fonts in
         the layouts.

   Every class name is a stable contract with the PHP templates - the v1
   selectors all survive here with new clothes.
   ========================================================================== */

:root {
  /* Palette - emerald dominant, lime as a scalpel. */
  --pitch: #0a7a3f;
  --pitch-dark: #075c30;
  --pitch-deep: #06331d;
  --pitch-ink: #052616;
  --pitch-100: #e9f4ec;
  --pitch-200: #cfe7d8;
  --lime: #a3e635;
  --lime-deep: #4d7c0f;     /* lime for text on light backgrounds */

  --ink: #101609;
  --ink-2: #46503f;
  --ink-3: #7d8674;
  --paper: #f6f7f2;
  --paper-2: #edefe6;
  --surface: #fdfdfb;
  --border: #dfe3d6;
  --border-2: #e9ece1;
  --hairline: rgba(7, 92, 48, 0.16);

  --amber: #b45309;
  --amber-bg: #fbf0dc;
  --red: #b93226;
  --red-bg: #fbe7e4;
  --blue: #1f6feb;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(5, 38, 22, 0.05);
  --shadow: 0 10px 30px -12px rgba(5, 38, 22, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(5, 38, 22, 0.3);

  --wrap: 1140px;
  --wrap-narrow: 780px;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font: 'Instrument Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Reusable textures (CSP-safe data URIs). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  --ticks: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12px);
}

/* -- Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
::selection { background: var(--lime); color: var(--pitch-ink); }
:focus-visible { outline: 2px solid var(--pitch); outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* -- Layout ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--wrap-narrow); }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.stack > * + * { margin-top: 14px; }
@media (max-width: 640px) { .section { padding: 64px 0; } .wrap { padding: 0 20px; } }

/* -- Typography ---------------------------------------------------------------
   Editorial scale: huge tight display, measured body. */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -0.022em; color: var(--ink); text-wrap: balance; }
.display {
  font-size: clamp(2.9rem, 6.4vw, 4.9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.032em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.3rem); font-weight: 800; letter-spacing: -0.028em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.22rem; line-height: 1.25; letter-spacing: -0.012em; }
.lead { font-size: 1.16rem; line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }
.t-body { font-size: 1rem; line-height: 1.68; }

/* Eyebrow: mono kicker with a tick ruler - the measurement motif. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--pitch);
}
.eyebrow::before {
  content: ''; width: 34px; height: 9px; color: var(--pitch);
  background: var(--ticks);
  opacity: 0.85;
}
.center .eyebrow::before, .eyebrow.center::before { display: none; }
.center .eyebrow::after, .eyebrow.center::after {
  content: ''; position: absolute;
}
.section-head { max-width: 660px; margin: 0 auto 48px; }
.section-head h2 { margin-top: 10px; }
.section-head .lead { margin-top: 14px; }
.center.section-head { text-align: center; }

/* -- Brand --------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-img { width: 30px; height: 30px; display: block; flex-shrink: 0; transition: transform 0.5s var(--ease); }
.brand:hover .brand-img { transform: rotate(-8deg) scale(1.05); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.brand-to { color: var(--pitch); }

/* -- Nav ------------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-links { display: flex; align-items: center; gap: 30px; font-weight: 600; font-size: 0.95rem; }
.nav-links a:not(.btn) { position: relative; padding: 4px 0; color: var(--ink-2); transition: color 0.2s var(--ease); }
.nav-links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--pitch); transition: right 0.3s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { right: 0; }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } .nav-inner { height: 64px; } }

/* -- Buttons ---------------------------------------------------------------------
   Squared-off pill: confident, athletic, not bubble-soft. */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em;
  padding: 13px 26px; border-radius: 10px;
  transition: transform 0.15s var(--ease), box-shadow 0.25s var(--ease),
              background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--pitch-dark); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 10px 24px -10px rgba(7, 92, 48, 0.55); }
.btn-primary:hover { background: var(--pitch-ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 14px 30px -10px rgba(7, 92, 48, 0.6); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #232b1c; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--pitch); color: var(--pitch-dark); }
.btn-lg { padding: 17px 32px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }

/* -- Hero -------------------------------------------------------------------------
   Photographic, grained, with a load-in stagger and the score ruler. */
.hero {
  position: relative; color: #eef7f0; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(5, 38, 22, 0.92) 0%, rgba(6, 51, 29, 0.72) 46%, rgba(6, 51, 29, 0.45) 100%),
    url('/assets/img/hero.jpg') center 30% / cover no-repeat,
    linear-gradient(160deg, #0b6b39 0%, var(--pitch-deep) 70%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain);
  opacity: 0.14; mix-blend-mode: overlay;
}
.hero::after {
  /* Halfway-line + centre-circle pitch marking, cropped off the right edge. */
  content: ''; position: absolute; top: 50%; right: -170px; width: 520px; height: 520px;
  transform: translateY(-50%);
  border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 50%;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 108px 0 96px; max-width: 720px; }
.hero .eyebrow { color: var(--lime); }
.hero .eyebrow::before { color: var(--lime); }
.hero h1 { color: #fff; margin-top: 16px; max-width: 15ch; }
.hero .lead { color: #cfe5d6; max-width: 52ch; margin-top: 22px; font-size: 1.2rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-cta .btn-primary { background: var(--lime); color: var(--pitch-ink); box-shadow: 0 14px 34px -12px rgba(163, 230, 53, 0.5); }
.hero-cta .btn-primary:hover { background: #b8f24e; transform: translateY(-2px); }
.hero-cta .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.32); }
.hero-cta .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.7); color: #fff; }
.hero-trust { margin-top: 30px; display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: #a6d3b6; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust span::before { content: ''; width: 6px; height: 6px; background: var(--lime); }

/* The 0-100 ruler: the product in one ornament. */
.hero-ruler {
  margin-top: 44px; max-width: 460px; position: relative;
  height: 34px; color: rgba(255,255,255,0.5);
}
.hero-ruler::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: var(--ticks);
  opacity: 0.65;
}
.hero-ruler::after {
  content: ''; position: absolute; left: 0; top: -3px; width: 3px; height: 18px;
  background: var(--lime);
  animation: ruler-sweep 3.2s var(--ease) 0.9s both;
}
@keyframes ruler-sweep { from { left: 0; } to { left: 72%; } }
.hero-ruler span {
  position: absolute; top: 16px; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em;
}
.hero-ruler span:nth-child(1) { left: 0; transform: none; }
.hero-ruler span:nth-child(2) { left: 25%; }
.hero-ruler span:nth-child(3) { left: 50%; }
.hero-ruler span:nth-child(4) { left: 75%; }
.hero-ruler span:nth-child(5) { left: 100%; transform: translateX(-100%); }

/* Load-in stagger. */
.fx { opacity: 0; transform: translateY(18px); animation: fx-in 0.9s var(--ease) forwards; }
.fx-1 { animation-delay: 0.05s; } .fx-2 { animation-delay: 0.16s; }
.fx-3 { animation-delay: 0.27s; } .fx-4 { animation-delay: 0.38s; }
.fx-5 { animation-delay: 0.5s; }
@keyframes fx-in { to { opacity: 1; transform: none; } }

/* -- Cards ------------------------------------------------------------------------ */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card::before {
  /* Corner-arc pitch marking. */
  content: ''; position: absolute; top: -1px; left: -1px; width: 22px; height: 22px;
  border-right: 1.5px solid var(--hairline);
  border-radius: 0 0 100% 0;
  border-bottom: 1.5px solid var(--hairline);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: var(--pitch-200); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--ink-2); font-size: 0.99rem; }

.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.step-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.step-num {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--pitch-dark); background: var(--pitch-100); border-radius: 10px;
}
.step-head .step-num { margin-bottom: 0; }
.step-icon { color: var(--pitch); opacity: 0.9; }

/* -- Imagery ------------------------------------------------------------------------ */
.page-hero-img {
  width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.img-card {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
@media (max-width: 560px) { .page-hero-img { aspect-ratio: 2 / 1; } }

/* -- Pricing -------------------------------------------------------------------------- */
.price-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; max-width: 840px; margin: 0 auto; align-items: start; }
@media (max-width: 680px) { .price-wrap { grid-template-columns: 1fr; } }
.price-card { padding: 34px 32px; }
.price-card.featured {
  background: linear-gradient(165deg, var(--pitch-deep), var(--pitch-ink));
  border-color: transparent; color: #e9f5ec;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.price-card.featured::before { display: none; }
.price-card.featured::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); opacity: 0.12; mix-blend-mode: overlay;
}
.price-card.featured h3, .price-card.featured .price { color: #fff; }
.price-card.featured .feature-list li { color: #c9e2d1; }
.price-card.featured .feature-list li::before { color: var(--lime); }
.price-card.featured .muted { color: #96bfa4; }
.price-card.featured:hover { transform: translateY(-4px); }
.price-card.featured .btn-primary { background: var(--lime); color: var(--pitch-ink); box-shadow: 0 14px 34px -12px rgba(163, 230, 53, 0.45); }
.price-card.featured .btn-primary:hover { background: #b8f24e; }
.price-badge {
  position: absolute; top: 18px; right: 18px; z-index: 1;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pitch-ink); background: var(--lime); padding: 6px 11px; border-radius: 6px;
}
.price { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 14px 0 6px; }
.price small { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.06em; color: var(--ink-3); }
.price-card.featured .price small { color: #8fbf9f; }
.feature-list { margin-top: 18px; }
.feature-list li { display: flex; gap: 11px; padding: 8px 0; color: var(--ink-2); font-size: 0.97rem; line-height: 1.5; }
.feature-list li::before { content: '→'; color: var(--pitch); font-weight: 700; flex-shrink: 0; }

/* -- Score dial ------------------------------------------------------------------------ */
.dial-wrap { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.dial { position: relative; width: 178px; height: 178px; flex-shrink: 0; }
.dial::before {
  /* Tick ring behind the dial - gauge language. */
  content: ''; position: absolute; inset: -13px; border-radius: 50%;
  background: repeating-conic-gradient(from -90deg, var(--hairline) 0deg 1.2deg, transparent 1.2deg 9deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.dial svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.dial .track { stroke: var(--paper-2); }
.dial .value { stroke: var(--pitch); stroke-linecap: round; transition: stroke-dashoffset 1.4s var(--ease); }
.dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial-score { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.dial-outof { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-3); margin-top: 4px; }

.band-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--pitch-100); color: var(--pitch-dark);
}
.band-elite, .band-strong { background: var(--pitch-dark); color: #d9f99d; }
.band-promising { background: #e5f0d3; color: var(--lime-deep); }
.band-developing { background: var(--amber-bg); color: var(--amber); }
.band-early, .band-foundational { background: var(--paper-2); color: var(--ink-2); }

/* -- Corner bars -------------------------------------------------------------------------- */
.bars { margin-top: 10px; }
.bar-row { margin: 16px 0; }
.bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.bar-label { font-weight: 600; font-size: 0.95rem; }
.bar-val { font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; color: var(--pitch-dark); }
.bar-track {
  height: 8px; border-radius: 999px; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--paper) calc(25% - 1px) 25%),
    var(--paper-2);
}
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--pitch-dark), var(--pitch)); border-radius: 999px; }

/* -- Result -------------------------------------------------------------------------------- */
.result-hero {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px 38px; box-shadow: var(--shadow);
}
.callout {
  background: var(--pitch-100); border: 1px solid var(--pitch-200); border-left: 3px solid var(--pitch);
  border-radius: var(--radius-sm); padding: 17px 20px; color: var(--pitch-ink); font-size: 0.96rem;
}
.callout-amber { background: var(--amber-bg); border-color: #eed9ac; border-left-color: var(--amber); color: #6b4206; }
.disclaimer { font-size: 0.85rem; line-height: 1.6; color: var(--ink-3); border-left: 2px solid var(--border); padding-left: 16px; }

.locked { position: relative; }
.locked-inner { filter: blur(7px) saturate(0.8); opacity: 0.5; pointer-events: none; user-select: none; max-height: 260px; overflow: hidden; }
.lock-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 26px;
  background: linear-gradient(180deg, rgba(246,247,242,0.2), rgba(246,247,242,0.92) 60%);
  border-radius: var(--radius-lg);
}
.lock-badge {
  width: 48px; height: 48px; border-radius: 12px; background: var(--pitch-100);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* -- Unlock (the sell) ------------------------------------------------------------------------ */
.unlock {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--pitch-deep) 0%, var(--pitch-ink) 90%);
  color: #e9f5ec; border-radius: var(--radius-xl); padding: 40px 38px;
  box-shadow: var(--shadow-lg);
}
.unlock::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); opacity: 0.12; mix-blend-mode: overlay;
}
.unlock::after {
  content: ''; position: absolute; top: -140px; right: -140px; width: 380px; height: 380px;
  border: 1.5px solid rgba(163, 230, 53, 0.18); border-radius: 50%; pointer-events: none;
}
.unlock h2 { color: #fff; }
.unlock .price { color: #fff; }
.unlock .price small { color: #8fbf9f; }
.unlock .feature-list li { color: #cbe4d3; }
.unlock .feature-list li::before { color: var(--lime); }
.unlock .btn-primary { background: var(--lime); color: var(--pitch-ink); box-shadow: 0 14px 34px -12px rgba(163, 230, 53, 0.45); }
.unlock .btn-primary:hover { background: #b8f24e; transform: translateY(-2px); }
.unlock-note { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; color: #96bfa4; margin-top: 12px; }
.unlock .eyebrow, .unlock .eyebrow::before { color: var(--lime); }

/* -- Forms --------------------------------------------------------------------------------------- */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 36px 34px; box-shadow: var(--shadow);
}
@media (max-width: 560px) { .form-card { padding: 26px 20px; } }
.fieldset { padding: 26px 0; border-top: 1px solid var(--border-2); }
.fieldset:first-of-type { border-top: 0; padding-top: 4px; }
.fieldset-legend {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--pitch); margin-bottom: 4px;
  display: inline-flex; align-items: center; gap: 10px;
}
.fieldset-legend::after { content: ''; width: 26px; height: 8px; color: var(--pitch); background: var(--ticks); opacity: 0.7; }
.fieldset-sub { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 18px; }
.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.97rem; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: 0.85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

input[type="text"], input[type="email"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; padding: 13px 15px; font-size: 1rem; font-family: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--border); border-radius: 10px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--pitch); background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 122, 63, 0.12);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237d8674' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px;
}
.field.has-error input, .field.has-error select { border-color: var(--red); }
.err { color: var(--red); font-size: 0.85rem; margin-top: 6px; font-weight: 500; }
.form-error {
  background: var(--red-bg); border: 1px solid #f0c5bf; border-left: 3px solid var(--red);
  color: #7c221a; padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500;
}

/* Segmented radio pills. */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills input { position: absolute; opacity: 0; width: 0; height: 0; }
.pills label {
  display: inline-flex; padding: 10px 16px; border-radius: 9px;
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2);
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--border);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.pills label:hover { box-shadow: inset 0 0 0 1.5px var(--pitch-200); color: var(--ink); }
.pills input:checked + label { background: var(--pitch-dark); box-shadow: inset 0 0 0 1.5px var(--pitch-dark); color: #fff; }
.pills input:focus-visible + label { box-shadow: inset 0 0 0 1.5px var(--pitch), 0 0 0 4px rgba(10,122,63,0.15); }

/* Range slider. */
.range-row { display: flex; align-items: center; gap: 18px; }
.range-row input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(11.1% - 1px), var(--paper) calc(11.1% - 1px) 11.1%),
    var(--paper-2);
  border: 0; padding: 0; box-shadow: none;
}
.range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 8px;
  background: var(--pitch-dark); border: 3px solid #fff; box-shadow: var(--shadow); cursor: grab;
}
.range-row input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 7px; background: var(--pitch-dark); border: 3px solid #fff; cursor: grab;
}
.range-val {
  width: 48px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem;
  background: var(--pitch-100); color: var(--pitch-dark); border-radius: 10px;
}

/* -- Plan ----------------------------------------------------------------------------------------- */
.plan-section { padding: 34px 0; border-top: 1px solid var(--border-2); }
.plan-section:first-child { border-top: 0; }
.plan-h { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.plan-h .tag {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--pitch-dark); background: var(--pitch-100); padding: 6px 11px; border-radius: 6px; flex-shrink: 0;
}
.priority {
  position: relative; border-left: 3px solid var(--pitch);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px; margin: 16px 0;
  border-top: 1px solid var(--border-2); border-right: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2);
}
.action-list li { display: flex; gap: 11px; padding: 7px 0; color: var(--ink-2); line-height: 1.55; }
.action-list li::before { content: '→'; color: var(--pitch); font-weight: 700; flex-shrink: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-2); }
.table th {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3);
  border-bottom: 1.5px solid var(--border);
}
.table td:nth-child(2) { font-family: var(--font-mono); font-weight: 600; color: var(--pitch-dark); white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

.timeline { position: relative; margin-left: 8px; }
.timeline-item { position: relative; padding: 0 0 22px 28px; border-left: 1.5px solid var(--border); }
.timeline-item:last-child { border-left-color: transparent; }
.timeline-item::before {
  content: ''; position: absolute; left: -7.5px; top: 4px; width: 14px; height: 14px;
  border-radius: 4px; background: var(--pitch); border: 3px solid var(--paper);
}
.timeline-item .win { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--pitch-dark); }

.week-list li { display: flex; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-2); line-height: 1.55; }
.week-list li:last-child { border-bottom: 0; }
.week-list .day { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; width: 104px; flex-shrink: 0; color: var(--pitch-dark); padding-top: 2px; }
.pre {
  white-space: pre-wrap; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.6;
  background: var(--pitch-ink); color: #cde7d5; padding: 20px 22px; border-radius: var(--radius);
}

/* -- Methodology weights ----------------------------------------------------------------------------- */
.weight-row { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.weight-row .wl { width: 260px; flex-shrink: 0; font-weight: 600; font-size: 0.94rem; }
.weight-bar { flex: 1; height: 18px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.weight-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--pitch-dark), var(--pitch)); border-radius: 6px; }
.weight-pct { width: 48px; text-align: right; font-family: var(--font-mono); font-weight: 600; font-size: 0.88rem; color: var(--pitch-dark); }
@media (max-width: 560px) { .weight-row .wl { width: 128px; font-size: 0.84rem; } }

/* -- Footer -------------------------------------------------------------------------------------------- */
.footer {
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, var(--pitch-deep), var(--pitch-ink));
  color: #bfdcca; padding: 64px 0 32px; margin-top: 96px;
}
.footer::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grain); opacity: 0.1; mix-blend-mode: overlay;
}
.footer::after {
  /* Centre-circle watermark. */
  content: ''; position: absolute; top: -190px; right: 6%; width: 460px; height: 460px;
  border: 1.5px solid rgba(255, 255, 255, 0.07); border-radius: 50%; pointer-events: none;
}
.footer .brand-name { color: #fff; }
.footer .brand-to { color: var(--lime); }
.footer-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 34px; flex-wrap: wrap; }
.footer-brand { max-width: 330px; }
.footer-brand .muted { color: #8db99c; margin-top: 12px; font-size: 0.95rem; }
.footer-links { display: flex; flex-direction: column; gap: 11px; font-weight: 600; font-size: 0.95rem; }
.footer-links a { color: #cbe4d3; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--lime); }
.footer-legal {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-legal .muted { color: #7dab8d; font-size: 0.8rem; max-width: 660px; line-height: 1.6; }

/* -- Prose ---------------------------------------------------------------------------------------------- */
.prose { max-width: var(--wrap-narrow); }
.prose h1 { margin-top: 12px; }
.prose h2 { margin: 42px 0 14px; padding-top: 26px; border-top: 1px solid var(--border-2); }
.prose h3 { margin: 26px 0 8px; }
.prose p { margin-bottom: 15px; color: var(--ink-2); }
.prose .lead { color: var(--ink-2); font-size: 1.14rem; }
.prose ul { margin: 0 0 18px 0; }
.prose ul li { position: relative; padding: 5px 0 5px 24px; color: var(--ink-2); }
.prose ul li::before { content: ''; position: absolute; left: 5px; top: 14px; width: 7px; height: 7px; border-radius: 2px; background: var(--pitch); }
.prose a { color: var(--pitch-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--pitch-200); }
.prose a:hover { text-decoration-color: var(--pitch); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }

/* -- Admin ----------------------------------------------------------------------------------------------- */
.admin-bare { max-width: 430px; margin: 9vh auto; padding: 0 20px; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  width: 236px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--pitch-deep), var(--pitch-ink));
  color: #bfdcca; padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .brand-name { color: #fff; }
.admin-side .brand-to { color: var(--lime); }
.admin-side-label {
  font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.18em; color: #7dab8d; margin: 10px 8px 8px;
}
.admin-nav { display: flex; flex-direction: column; gap: 3px; }
.admin-nav a { padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: 0.93rem; color: #c4dfce; transition: all 0.18s var(--ease); }
.admin-nav a:hover { background: rgba(255,255,255,0.07); color: #fff; }
.admin-nav a.is-active { background: var(--lime); color: var(--pitch-ink); }
.admin-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.admin-side-foot a { color: #8db99c; font-size: 0.88rem; font-weight: 600; }
.admin-side-foot a:hover { color: #fff; }
.admin-main { flex: 1; padding: 34px 38px; max-width: 980px; }
@media (max-width: 720px) {
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side-foot { margin: 0 0 0 auto; flex-direction: row; border: 0; padding: 0; }
  .admin-main { padding: 22px 20px; }
}
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-head h1 { font-size: 1.9rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
@media (max-width: 780px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat .num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.stat .lbl { font-family: var(--font-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); margin-top: 4px; }
.stat .sub { font-size: 0.82rem; color: var(--pitch-dark); font-weight: 600; margin-top: 5px; }

.wz {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  padding: 5px 11px; border-radius: 6px;
}
.wz::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.wz.verified { background: var(--pitch-100); color: var(--pitch-dark); }
.wz.in_progress { background: var(--amber-bg); color: var(--amber); }
.wz.error { background: var(--red-bg); color: var(--red); }
.wz.not_started { background: var(--paper-2); color: var(--ink-3); }

.wz-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: 10px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wz-list a:hover { border-color: var(--pitch-200); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.wz-list .wz-t { font-weight: 700; }
.wz-list .wz-d { font-size: 0.86rem; color: var(--ink-3); }

.copybox { display: flex; gap: 8px; align-items: stretch; margin: 8px 0; }
.copybox code {
  flex: 1; background: var(--pitch-ink); color: #cde7d5; border-radius: 9px; padding: 11px 13px;
  font-family: var(--font-mono); font-size: 0.82rem; white-space: pre-wrap; word-break: break-all;
}
.copy-btn {
  flex-shrink: 0; background: var(--ink); color: #fff; border-radius: 9px; padding: 0 16px;
  font-weight: 600; font-size: 0.85rem; transition: background 0.2s var(--ease);
}
.copy-btn:hover { background: #232b1c; }
.copy-btn.copied { background: var(--pitch); }

.env-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-2); font-size: 0.9rem; }
.env-row:last-child { border-bottom: 0; }
.env-row code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); }
.deep-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.trouble { border-left: 2px solid var(--border); padding: 4px 0 4px 16px; margin: 12px 0; }
.trouble h4 { font-size: 0.96rem; margin-bottom: 3px; }
.trouble p { font-size: 0.88rem; color: var(--ink-2); }
.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; width: 200px; padding: 9px 12px 9px 0; color: var(--ink-3); font-weight: 600; font-size: 0.85rem; vertical-align: top; }
.kv td { padding: 9px 0; border-bottom: 1px solid var(--border-2); }
.kv tr:last-child td { border-bottom: 0; }

/* -- Print (Save the plan as PDF) ---------------------------------------------------------------------------- */
@media print {
  .nav, .footer, .no-print { display: none !important; }
  body { background: #fff; }
  .plan-section { break-inside: avoid; }
  .card, .priority { box-shadow: none; border-color: #ccc; }
}
