/* ===========================================
   Topic Cluster Research — Demo Dashboard
   Light theme — navy palette
   =========================================== */

:root {
  /* Navy-based palette */
  --navy:        #061d38;
  --navy-light:  #0e2a4a;
  --navy-medium: #17375c;
  --beige:       #f4f2ef;
  --beige-light: #faf9f7;

  /* Surfaces */
  --bg:          #f4f2ef;           /* body */
  --bg-alt:      #ffffff;           /* alternating sections */
  --surface:     #ffffff;           /* cards */
  --surface-2:   #faf9f7;           /* inside-card panels */
  --border:      #e0dcd4;           /* lines / dividers */
  --border-strong: #c2bdb5;

  /* Type */
  --text:        #061d38;           /* near-black on light */
  --text-muted:  #4a4740;
  --text-dim:    #6e6a63;
  --text-invert: #faf9f7;           /* text on navy */

  /* Brand accent — TecnicaSEO orange */
  --brand:       #FF5F1F;
  --brand-soft:  #FFF4F0;
  --brand-dark:  #d44e10;
  --accent:      #FF5F1F;           /* orange, used on light bg as emphasis */
  --accent-dark: #061d38;           /* full navy, for deep emphasis */
  --good:        #22c55e;
  --warn:        #f59e0b;
  --alert:       #dc2626;

  /* Chart palette (consumed by dashboard.js) */
  --chart-navy:    #061d38;
  --chart-navy-2:  #17375c;
  --chart-navy-3:  #243850;
  --chart-navy-4:  #3b5a7f;
  --chart-alert:   #dc2626;
  --chart-good:    #22c55e;
  --chart-warn:    #f59e0b;

  /* Layout */
  --container: 1240px;
  --gap: 24px;
  --radius: 14px;
  --radius-sm: 8px;

  /* Type */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; overflow-x: clip; }
body { overflow-x: clip; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------------------- */
/* Sticky top nav                              */
/* ------------------------------------------- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(150%) blur(8px);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
/* Reserve space so fixed nav doesn't cover content */
body { padding-top: 96px; }
@media (max-width: 960px) {
  body { padding-top: 76px; }
}
.topnav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.topnav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}
.topnav__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  display: inline-block;
}
.topnav__title { font-size: 14px; }
.topnav__sub   { color: var(--text-dim); font-weight: 500; }

.topnav__links {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0 auto 0 0;
}
.topnav__links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color .15s;
}
.topnav__links a:hover { color: var(--navy); }

.topnav__print {
  background: var(--brand);
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.topnav__print:hover { background: var(--brand-dark); }

/* Active link (scroll-spy) */
.topnav__links a.is-active {
  color: var(--brand);
  font-weight: 700;
  position: relative;
}
.topnav__links a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* Hamburger toggle (visible only on mobile) */
.topnav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  margin-left: auto;
  position: relative;
}
.topnav__toggle-bars,
.topnav__toggle-bars::before,
.topnav__toggle-bars::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform .2s, opacity .2s, top .2s, bottom .2s;
}
.topnav__toggle-bars { top: 50%; transform: translate(-50%, -50%); }
.topnav__toggle-bars::before { top: -6px; }
.topnav__toggle-bars::after  { bottom: -6px; top: auto; }
.topnav__toggle[aria-expanded="true"] .topnav__toggle-bars {
  background: transparent;
}
.topnav__toggle[aria-expanded="true"] .topnav__toggle-bars::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}
.topnav__toggle[aria-expanded="true"] .topnav__toggle-bars::after {
  bottom: auto;
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

/* Section stepper (under the nav) — replaces continuous progress bar */
.topnav__steps {
  display: flex;
  gap: 6px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 8px;
}
.topnav__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 4px;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}
.topnav__step::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background .25s ease, opacity .25s ease;
}
.topnav__step span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s, font-weight .2s;
}
.topnav__step.is-past::before    { background: var(--brand); opacity: 0.45; }
.topnav__step.is-past span       { color: var(--text-muted); }
.topnav__step.is-active::before  { background: var(--brand); opacity: 1; }
.topnav__step.is-active span     { color: var(--brand); font-weight: 800; }
.topnav__step:hover::before      { background: var(--brand); opacity: 0.8; }
.topnav__step:hover span         { color: var(--brand); }

/* ------------------------------------------- */
/* Preview banner (above-the-fold disclaimer)   */
/* ------------------------------------------- */
.preview-banner {
  background: var(--brand-soft);
  border-bottom: 3px solid var(--brand);
  padding: 40px 32px;
}
.preview-banner__inner {
  max-width: 920px;
  margin: 0 auto;
}
.preview-banner__label {
  display: inline-block;
  background: var(--brand);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.preview-banner__title {
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.2;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.preview-banner__title em {
  font-style: normal;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.preview-banner__body {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}
.preview-banner__body strong {
  background: linear-gradient(180deg, transparent 60%, rgba(255,95,31,0.22) 60%);
  font-weight: 700;
  padding: 0 2px;
}
.preview-banner__cta {
  margin-top: 18px;
}
.preview-banner__link {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.preview-banner__link:hover {
  color: var(--brand);
}
.wireframe-banner a {
  color: #78350f;
  text-decoration: underline;
  font-weight: 600;
}
.wireframe-banner a:hover { color: #451a03; }

/* (Lazo "MUESTRA" retirado — el banner superior ya comunica que es una vista previa) */

/* ------------------------------------------- */
/* Hero                                         */
/* ------------------------------------------- */
.hero {
  background: var(--navy);
  color: var(--text-invert);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(244,242,239,0.06), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--beige);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid rgba(244,242,239,0.3);
  border-radius: 100px;
}
.hero__headline {
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 1000px;
  color: #ffffff;
  margin-bottom: 18px;
}
.hero__rec {
  font-size: clamp(16px, 1.4vw, 19px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 860px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero__tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 22px 20px;
  backdrop-filter: blur(6px);
}
.tile__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.tile__value {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.tile__suffix {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin-left: 3px;
}
.tile__footnote {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}
.tile--alert .tile__value { color: #ffb4a8; }
.tile--alert { border-color: rgba(220, 38, 38, 0.4); }
.tile--warn  .tile__value { color: #fbbf24; }
.tile--good  .tile__value { color: #6ee7b7; }

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s;
  cursor: pointer;
}
.btn--primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ============================================ */
/* §1 DELIVERABLES — WHAT'S ALREADY SHIPPED     */
/* ============================================ */

/* Scale bar — 4 big numbers above the cards */
.deliverables-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 8px 0 32px;
  padding: 22px 24px;
  background: var(--navy);
  border-radius: var(--radius);
  color: var(--text-invert);
  box-shadow: 0 6px 24px rgba(6, 29, 56, 0.12);
}
.scale-item { text-align: left; }
.scale-item__value {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--beige);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.scale-item__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 4px;
}
.scale-item__sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* Generic deliverable card */
.deliverable {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 1px 3px rgba(6, 29, 56, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.deliverable__head { margin-bottom: 4px; }
.deliverable__eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.deliverable__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.deliverable__sub {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 4px;
}
.deliverable__sub strong { color: var(--navy); }
.deliverable__hint {
  font-size: 11.5px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: auto;
}
.deliverable__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.deliverable__actions--end { justify-content: flex-end; }

/* Estimator (full-width hero-style card) */
.deliverable--estimator {
  flex-direction: row;
  padding: 0;
  overflow: hidden;
  margin-bottom: var(--gap);
  min-height: 420px;
}
.deliverable__col { flex: 1 1 50%; display: flex; flex-direction: column; }
.deliverable__col--text {
  padding: 32px 36px;
  gap: 14px;
  justify-content: center;
}
.deliverable__col--frame {
  background: var(--beige);
  padding: 22px 22px 14px;
  border-left: 1px solid var(--border);
  gap: 8px;
}
.deliverable--estimator .deliverable__title {
  font-size: 24px;
}
.deliverable--estimator .deliverable__eyebrow {
  color: var(--accent);
}
.deliverable__highlights {
  list-style: none;
  padding: 0;
  margin: 6px 0 10px;
  display: grid;
  gap: 6px;
}
.deliverable__highlights li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.4;
}
.deliverable__highlights li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--good);
  font-weight: 800;
}

.deliverable__why {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: #f6f3ee;
  border-left: 3px solid var(--navy);
  border-radius: 4px;
}
.deliverable__why-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.deliverable__why-body {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.deliverable__why-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.deliverable__why-link:hover { color: var(--navy); }

.deliverable__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.deliverable__stats--three {
  grid-template-columns: repeat(3, 1fr);
  border-top: none;
  padding-top: 6px;
  margin-top: 0;
}
.deliverable__datablock {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.deliverable__data-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.deliverable__how {
  margin-top: 12px;
  padding: 12px 14px;
  background: #eef2f6;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}
.deliverable__how-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.deliverable__how-body {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.deliverable__how-formulas {
  margin-top: 2px;
}
.deliverable__how-formulas-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.deliverable__how-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.deliverable__how-list li {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  font-variant-numeric: tabular-nums;
}
.deliverable__how-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.stat { display: flex; flex-direction: column; }
.stat__val {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__lbl {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Iframe "browser" chrome */
.estimator-frame {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 24px rgba(6, 29, 56, 0.1);
  min-height: 340px;
}
.estimator-frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f4f2ef;
  border-bottom: 1px solid var(--border);
}
.estimator-frame__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}
.estimator-frame__dot:nth-child(1) { background: #ff6159; }
.estimator-frame__dot:nth-child(2) { background: #ffbd2e; }
.estimator-frame__dot:nth-child(3) { background: #27c93f; }
.estimator-frame__url {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  font-family: ui-monospace, Menlo, monospace;
  padding-left: 40px;
}
.estimator-frame__iframe {
  flex: 1;
  width: 100%;
  border: 0;
  min-height: 340px;
  background: #ffffff;
}
.estimator-frame__fallback {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  text-align: center;
}
.estimator-frame__fallback a { color: var(--navy); font-weight: 600; }

/* Three-column grid for briefs · workbook · docs */
.deliverables-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}

/* Briefs */
.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.brief {
  display: block;
  text-align: left;
  width: 100%;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.brief::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.brief--batch-a::before { background: var(--navy); }
.brief:hover {
  background: #ffffff;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 95, 31, 0.18);
}
.brief:hover .brief__lines { background: var(--brand-dark); }
.brief__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.brief__batch {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: var(--navy);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.brief--batch-b .brief__batch { background: var(--accent); }
.brief__lines {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--brand);
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}
.brief__slug {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  font-family: ui-monospace, Menlo, monospace;
  margin-bottom: 2px;
  word-break: break-word;
}
.brief__role {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 4px;
}
.brief__target {
  font-size: 10px;
}
.brief__target code {
  background: transparent;
  color: var(--text-dim);
  padding: 0;
  font-size: 10px;
}

/* Workbook sheets */
.sheet-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sheet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.sheet__tab {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: var(--navy);
  padding: 3px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: center;
  margin-top: 1px;
}
.sheet__body { flex: 1; min-width: 0; }
.sheet__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.sheet__name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.sheet__dim {
  font-size: 10.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.sheet__purpose {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-muted);
}
.sheet__headers {
  display: none;
}

/* Docs */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc {
  display: block;
  text-align: left;
  width: 100%;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.doc:hover {
  background: #ffffff;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(255, 95, 31, 0.18);
}
.doc__group {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 3px;
}
.doc__title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 2px;
}
.doc__sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}
.doc__meta {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--brand);
  border-radius: 100px;
  text-transform: uppercase;
}
.doc:hover .doc__meta { background: var(--brand-dark); }

/* Proof-pack banner */
.proofpack {
  margin-top: var(--gap);
  padding: 22px 28px;
  background: var(--navy);
  color: var(--text-invert);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.proofpack__text strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--beige);
  margin-bottom: 4px;
}
.proofpack__text span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

/* Button variants used in §1 */
.btn--dark {
  background: var(--navy);
  color: var(--text-invert);
  border-color: var(--navy);
}
.btn--dark:hover { background: var(--navy-medium); border-color: var(--navy-medium); }
.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--text-invert); }
.btn--lg { padding: 13px 26px; font-size: 14px; }

/* Phase briefs links inside §5 */
.phase__briefs {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.phase__briefs-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.phase__briefs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.phase-brief {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 11px;
  color: var(--navy);
  cursor: pointer;
  transition: all .15s;
}
.phase-brief:hover { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.phase-brief__batch {
  font-weight: 800;
  font-size: 9.5px;
  background: var(--navy);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
}
.phase-brief:hover .phase-brief__batch { background: #ffffff; color: var(--navy); }
.phase-brief__slug {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 600;
}
.phase-brief__lines {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: var(--brand);
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================ */
/* Markdown drawer                              */
/* ============================================ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.drawer--open {
  pointer-events: auto;
  opacity: 1;
}
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 29, 56, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(880px, 90vw);
  background: #ffffff;
  box-shadow: -18px 0 48px rgba(6, 29, 56, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease-out;
}
.drawer--open .drawer__panel {
  transform: translateX(0);
}
.drawer__head {
  display: flex;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--beige);
  align-items: flex-start;
}
.drawer__titles { flex: 1; min-width: 0; }
.drawer__eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.drawer__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 4px;
  word-break: break-word;
}
.drawer__meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.drawer__meta code {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: var(--navy);
}
.drawer__actions {
  display: flex;
  gap: 6px;
}
.drawer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  font-family: inherit;
}
.drawer__btn:hover { background: var(--navy); color: #ffffff; border-color: var(--navy); }
.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 60px;
}
.drawer__loading,
.drawer__error {
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
.drawer__error { color: var(--alert); }
.drawer__error code {
  background: var(--beige);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

body.drawer-locked { overflow: hidden; }

/* Markdown body inside drawer */
.md { font-size: 14.5px; line-height: 1.65; color: var(--text); max-width: 760px; }
.md h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  line-height: 1.25;
}
.md h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  margin: 32px 0 12px;
  line-height: 1.3;
}
.md h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 10px;
  line-height: 1.35;
}
.md h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin: 18px 0 8px;
}
.md p { margin: 0 0 14px; color: var(--text-muted); }
.md ul, .md ol { margin: 0 0 16px 22px; color: var(--text-muted); }
.md li { margin-bottom: 6px; line-height: 1.55; }
.md strong { color: var(--navy); font-weight: 700; }
.md a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--border-strong); }
.md a:hover { text-decoration-color: var(--navy); }
.md code {
  background: var(--beige);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--navy);
  font-family: ui-monospace, Menlo, monospace;
}
.md pre {
  background: var(--beige);
  padding: 14px 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
  margin: 0 0 16px;
  border: 1px solid var(--border);
}
.md pre code { background: transparent; padding: 0; }
.md blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 16px;
  margin: 0 0 16px;
  background: var(--beige);
  color: var(--text-muted);
  font-style: italic;
}
.md table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 12.5px;
  border: 1px solid var(--border);
}
.md table th,
.md table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
}
.md table th:last-child,
.md table td:last-child { border-right: 0; }
.md table th {
  background: var(--beige);
  font-weight: 700;
  color: var(--navy);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.md hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ------------------------------------------- */
/* Sections                                     */
/* ------------------------------------------- */
.section {
  padding: 64px 0;
}
.section--alt { background: var(--bg-alt); }

.section__head { margin-bottom: 32px; max-width: 900px; }
.section__num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section__lede {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 880px;
}

/* ------------------------------------------- */
/* Grid / cards                                 */
/* ------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(6, 29, 56, 0.04);
}
.card--wide  { margin-bottom: var(--gap); }
.card--chart { display: flex; flex-direction: column; }
.card--gap   { margin-top: var(--gap); }

.card__head { margin-bottom: 16px; }
.card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.card__sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}
.card__insight {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--beige);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.card__insight strong { color: var(--navy); }

.chart {
  width: 100%;
  height: 320px;
}
.chart--tall { height: 440px; }

/* ------------------------------------------- */
/* Gap list (§1)                                */
/* ------------------------------------------- */
.gap-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.gap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.gap-item__market {
  font-weight: 700;
  color: var(--navy);
  min-width: 38px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
}
.gap-item__keyword { color: var(--text); }

/* ------------------------------------------- */
/* §2 Format mockups                            */
/* ------------------------------------------- */
.formats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: var(--gap);
}
.format {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.format__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 6px;
}
.format__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}
.format__score {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  background: var(--beige);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.format__sub {
  padding: 0 22px 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
}
.format__mockup {
  background: var(--beige);
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border);
  flex: 1;
}

/* Mock: price grid */
.mock-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-size: 11px;
}
.mock-grid__cell {
  background: #ffffff;
  padding: 8px 10px;
  color: var(--text);
}
.mock-grid__head {
  background: var(--navy);
  color: var(--text-invert);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.mock-grid__price {
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Mock: card listing */
.mock-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mock-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
}
.mock-card__img {
  background: linear-gradient(135deg, #dcd7cd 0%, #c2bdb5 100%);
  height: 34px;
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.mock-card__img::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 12px;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
}
.mock-card__title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}
.mock-card__price {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 11.5px;
}
.mock-card__meta {
  color: var(--text-dim);
  font-size: 10px;
  margin-top: 2px;
}

/* Mock: calculator */
.mock-calc {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 11px;
}
.mock-calc__field label {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.mock-calc__field .mock-input {
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  height: 22px;
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 11px;
}
.mock-calc__result {
  grid-column: 1 / -1;
  background: var(--navy);
  color: var(--text-invert);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.mock-calc__result-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.6);
}
.mock-calc__result-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--beige);
}

/* Mock: FAQ schema */
.mock-faq {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 0;
}
.mock-faq__item {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.mock-faq__item:last-child { border-bottom: 0; }
.mock-faq__q {
  flex: 1;
  color: var(--navy);
  font-weight: 600;
}
.mock-faq__chev {
  color: var(--text-dim);
  font-size: 10px;
}
.mock-faq__schema {
  padding: 8px 14px;
  background: var(--beige);
  border-top: 1px dashed var(--border-strong);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  color: var(--accent-dark);
}

.format__evidence {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.format__evidence strong { color: var(--navy); }

/* ------------------------------------------- */
/* §3 Strategy gap grid                         */
/* ------------------------------------------- */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}
.strategy-item {
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.strategy-item__icon { font-size: 22px; margin-bottom: 8px; }
.strategy-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.strategy-item__who {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.45;
}
.strategy-item__insight {
  font-size: 12px;
  color: var(--accent-dark);
  font-weight: 600;
  line-height: 1.45;
  padding-top: 8px;
  border-top: 1px solid var(--border-strong);
}

/* ------------------------------------------- */
/* §3 Competitor gap list                       */
/* ------------------------------------------- */
.gap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}
.gap-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.gap-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.gap-table tr:last-child td { border-bottom: 0; }
.gap-table tr:hover td { background: var(--beige-light); }
.gap-table__domain {
  font-weight: 700;
  color: var(--navy);
}
.gap-table__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}
.gap-table__num--alert { color: var(--alert); }
.gap-table__examples {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.gap-table__examples-kw {
  display: inline-block;
  background: var(--beige);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 2px 3px 2px 0;
  font-size: 11px;
}

/* ------------------------------------------- */
/* §4 Phases                                    */
/* ------------------------------------------- */
.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.phase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  border-top: 4px solid var(--navy);
}
.phase--1 { border-top-color: var(--good); }
.phase--2 { border-top-color: var(--accent); }
.phase--3 { border-top-color: var(--navy-medium); }

.phase__head { margin-bottom: 6px; }
.phase__num {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-right: 10px;
}
.phase__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.phase__meta {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.phase__meta strong { color: var(--navy); }
.phase__actions {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.phase__actions li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.45;
}
.phase__actions li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.phase__kpi {
  background: var(--beige);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.phase__kpi strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 2px;
}

/* ------------------------------------------- */
/* §5 KPI targets                               */
/* ------------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: var(--gap);
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.kpi__stage {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.kpi__value {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi__sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.kpi--now  { background: var(--beige); }
.kpi--goal { background: var(--navy); color: var(--text-invert); }
.kpi--goal .kpi__value { color: var(--beige); }
.kpi--goal .kpi__stage,
.kpi--goal .kpi__sub   { color: rgba(255,255,255,0.7); }

/* ------------------------------------------- */
/* §6 Methodology                               */
/* ------------------------------------------- */
.pipeline {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pipeline li { min-width: 0; }
.pipeline li {
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.pipeline__step {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pipeline__input {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  font-weight: 600;
}
.pipeline__output {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.4;
}

.datatable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.datatable th,
.datatable td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.datatable th {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.datatable td strong { color: var(--navy); }

.filelist {
  list-style: none;
  padding: 0;
}
.filelist li {
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px dashed var(--border);
}
.filelist li:last-child { border-bottom: 0; }
.filelist code {
  background: var(--beige);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--navy);
  font-weight: 600;
}

/* ------------------------------------------- */
/* Footer                                       */
/* ------------------------------------------- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 40px 0;
  font-size: 13px;
}
.footer strong { color: var(--beige); }
.footer__cols {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__sub  { color: rgba(255, 255, 255, 0.55); font-size: 12px; margin-top: 4px; }
.footer__meta { text-align: right; font-size: 12px; color: rgba(255, 255, 255, 0.6); }

/* ------------------------------------------- */
/* Responsive                                   */
/* ------------------------------------------- */
@media (max-width: 1100px) {
  .deliverables-grid { grid-template-columns: 1fr 1fr; }
  .deliverable--docs { grid-column: 1 / -1; }
  .deliverable__stats { grid-template-columns: repeat(2, 1fr); }
  .deliverable__stats--three { grid-template-columns: repeat(3, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  /* Mobile nav: hamburger replaces inline links (still position: fixed from base) */
  .topnav__inner {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .topnav__toggle { display: block; }
  .topnav__print { display: none; }
  .topnav__links {
    order: 99;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease-out, padding .2s;
    pointer-events: none;
  }
  .topnav.topnav--open .topnav__links {
    max-height: 80vh;
    pointer-events: auto;
    overflow-y: auto;
  }
  .topnav__links li {
    border-bottom: 1px solid var(--border);
  }
  .topnav__links li:last-child { border-bottom: 0; }
  .topnav__links a {
    display: block;
    padding: 14px 4px;
    font-size: 15px;
    color: var(--text);
  }
  .topnav__links a.is-active::after { display: none; }
  .topnav__links a.is-active {
    color: var(--brand);
    background: var(--brand-soft);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Stepper: hide labels, just keep segment bars */
  .topnav__steps { padding: 0 16px 8px; gap: 4px; }
  .topnav__step span { display: none; }
  .topnav__step { padding-top: 2px; }
  .topnav__step::before { height: 4px; }

  /* Pipeline: 1 column on mobile */
  .pipeline { grid-template-columns: 1fr; }

  /* Banner more compact on mobile but still substantial */
  .preview-banner { padding: 28px 16px 32px; }
  .preview-banner__inner { padding: 0; }
  .preview-banner__title { margin-bottom: 12px; }
  .preview-banner__body { font-size: 15px; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero__tiles  { grid-template-columns: repeat(2, 1fr); }
  .phases       { grid-template-columns: 1fr; }
  .formats      { grid-template-columns: 1fr; }
  .strategy-grid{ grid-template-columns: repeat(2, 1fr); }
  .kpi-row      { grid-template-columns: repeat(2, 1fr); }
  .hero         { padding: 48px 0 40px; }
  .section      { padding: 48px 0; }
  .deliverables-scale { grid-template-columns: repeat(2, 1fr); }
  .deliverable--estimator { flex-direction: column; min-height: 0; }
  .deliverable__col--frame { border-left: 0; border-top: 1px solid var(--border); }
  .deliverables-grid { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: 1fr; }
  .drawer__panel { width: 100vw; }
  .drawer__body { padding: 20px 22px 40px; }
  .proofpack { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ------------------------------------------- */
/* Print / PDF export                           */
/* ------------------------------------------- */
@media print {
  :root {
    --container: 100%;
  }
  html { scroll-padding-top: 0; }
  body {
    font-size: 11pt;
    background: #ffffff;
    color: #000000;
  }
  .topnav,
  .wireframe-banner,
  .hero__cta,
  .btn { display: none !important; }

  .container { padding: 0 16mm; max-width: 100%; }

  .hero {
    padding: 20mm 0 16mm;
    page-break-after: always;
    background: var(--navy) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hero__headline { font-size: 22pt; }
  .hero__rec { font-size: 12pt; }
  .tile { background: rgba(255,255,255,0.08) !important; }
  .tile__value { font-size: 28pt; }

  .section {
    padding: 14mm 0;
    page-break-inside: avoid;
  }
  .section--alt { background: #ffffff !important; }
  .section__title { font-size: 16pt; }

  .card {
    box-shadow: none;
    page-break-inside: avoid;
    background: #ffffff !important;
  }

  .chart { height: 240px; }
  .chart--tall { height: 340px; }

  .grid--2 { grid-template-columns: 1fr 1fr; }
  .phases  { grid-template-columns: 1fr 1fr 1fr; }
  .formats { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: repeat(4, 1fr); }

  .section--page-break { page-break-before: always; }

  #deliverables, #rewards, #competitors, #plan, #impact, #method {
    page-break-before: auto;
  }
  .deliverables-scale { background: var(--navy) !important; color: #fff !important; }
  .deliverable--estimator { flex-direction: column; }
  .deliverable__col--frame { display: none; } /* iframe doesn't print */
  .deliverables-grid { grid-template-columns: 1fr 1fr; }
  .deliverable--docs { grid-column: 1 / -1; }
  .drawer { display: none !important; }
  .phase-brief { border: 1px solid #000 !important; }
  .footer {
    background: #ffffff !important;
    color: #000000;
    border-top: 1px solid #000;
  }
  .footer strong { color: #000; }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ============================================ */
/* AFFORDANCE — clickable briefs / docs / phase  */
/* ============================================ */

.phase-brief { transition: all .15s; cursor: pointer; }
.phase-brief:hover {
  border-color: var(--brand) !important;
  background: #ffffff !important;
  box-shadow: 0 6px 14px rgba(255, 95, 31, 0.14);
  transform: translateY(-1px);
}

/* Continuous gentle pulse on first item of each clickable list */
@keyframes affordance-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 95, 31, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 95, 31, 0.18); }
}
.brief-grid > .brief:first-child,
.doc-list  > .doc:first-child {
  animation: affordance-pulse 2.2s ease-in-out 0.4s infinite;
}
.brief-grid > .brief:first-child:hover,
.doc-list  > .doc:first-child:hover {
  animation-play-state: paused;
}

/* Tooltip on hover (desktop pointer) — no effect on touch */
@media (hover: hover) and (pointer: fine) {
  .brief, .doc, .phase-brief { position: relative; }
  .brief::after, .doc::after, .phase-brief::after {
    content: 'Toca aquí para ver el documento';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--navy);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, transform .15s;
    z-index: 10;
  }
  .brief:hover::after, .doc:hover::after, .phase-brief:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brief-grid > .brief:first-child,
  .doc-list  > .doc:first-child {
    animation: none;
  }
}

/* ============================================ */
/* MOBILE — chart and table overflow fixes      */
/* ============================================ */

/* Tables that may overflow on narrow viewports — wrap them and scroll-x */
#gap-table-wrap,
.datatable-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section__title { font-size: clamp(22px, 5.4vw, 28px); }
  .hero { padding: 36px 0 32px; }
  .hero__headline { font-size: clamp(22px, 6vw, 32px); }
  .hero__tiles { grid-template-columns: 1fr; }

  /* Charts: shorter on mobile, force overflow-hidden so axis labels can't push width */
  .chart { height: 260px; overflow: hidden; }
  .chart--tall { height: 360px; overflow: hidden; }

  /* Card padding tighter */
  .card { padding: 18px; }
  .card__title { font-size: 15px; }

  /* Wide-data tables: wrappers handle the horizontal scroll;
     keep the tables themselves with normal table semantics. */

  /* Strategy and KPI grids collapse to 1 column */
  .strategy-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .deliverables-scale { grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Briefs / docs / sheets — tighter padding */
  .brief, .doc, .sheet { padding: 12px; }

  /* Phase cards */
  .phase { padding: 18px; }

  /* Drawer fills viewport */
  .drawer__panel { width: 100vw; max-width: 100vw; }
  .drawer__body { padding: 18px 18px 36px; }
}

/* ============================================ */
/* DESKTOP: stepper is the nav (hide inline list) */
/* ============================================ */
@media (min-width: 961px) {
  .topnav__links { display: none; }
  .topnav__print { margin-left: auto; }
  .topnav__step span { font-size: 11px; padding: 0 4px; }
  .topnav__step:hover::before { opacity: 1; }
}
