/* dbt-wizard HOL site - shared design system */
/* ============================================
   Brand: Fivetran + dbt Labs + Snowflake co-brand
   - Fivetran navy:    #0E1A40 (primary surface dark)
   - Fivetran indigo:  #6F5BEF (primary accent)
   - dbt orange:       #FF694A (secondary accent)
   - Snowflake blue:   #29B5E8 (tertiary accent / link)
   - Off-white:        #FAFAF7 (light surface)
   - Slate:            #1F2A44 (body text on light)
   - Grey:             #6B7280 (muted)
   ============================================ */

:root {
  --c-navy: #0E1A40;
  --c-navy-deep: #08102A;
  --c-indigo: #6F5BEF;
  --c-orange: #FF694A;
  --c-snow: #29B5E8;
  --c-bg: #FAFAF7;
  --c-card: #FFFFFF;
  --c-slate: #1F2A44;
  --c-muted: #6B7280;
  --c-border: #E5E7EB;
  --c-success: #16A34A;
  --c-code-bg: #0F1530;
  --c-code-text: #E6E8F0;

  --shadow-sm: 0 1px 2px rgba(14, 26, 64, 0.06);
  --shadow-md: 0 6px 24px rgba(14, 26, 64, 0.08);
  --shadow-lg: 0 16px 48px rgba(14, 26, 64, 0.14);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --maxw: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ============================================
   Brand themes - flip primary palette on the fly.
   The :root block above is the default (Fivetran)
   fallback. These overrides drive the live theme.
   ============================================ */
[data-theme="fivetran"] {
  --c-navy:        #0E1A40;
  --c-navy-deep:   #08102A;
  --c-indigo:      #6F5BEF;
  --c-orange:      #FF694A;
  --c-snow:        #29B5E8;
  --c-bg:          #FAFAF7;
  --c-card:        #FFFFFF;
  --c-slate:       #1F2A44;
  --c-muted:       #6B7280;
  --c-border:      #E5E7EB;
  --c-code-bg:     #0F1530;
  --c-code-text:   #E6E8F0;
}

[data-theme="dbt"] {
  --c-navy:        #262A38;
  --c-navy-deep:   #15171F;
  --c-indigo:      #FF694A;
  --c-orange:      #FFAB5A;
  --c-snow:        #29B5E8;
  --c-bg:          #FCFBF9;
  --c-card:        #FFFFFF;
  --c-slate:       #1F2026;
  --c-muted:       #6B7280;
  --c-border:      #ECE7DE;
  --c-code-bg:     #1A1B22;
  --c-code-text:   #FFE3CC;
}

[data-theme="snow"] {
  --c-navy:        #11567F;
  --c-navy-deep:   #0A3A57;
  --c-indigo:      #29B5E8;
  --c-orange:      #FF694A;
  --c-snow:        #00A1D9;
  --c-bg:          #F4FAFD;
  --c-card:        #FFFFFF;
  --c-slate:       #142A3A;
  --c-muted:       #5F7A8A;
  --c-border:      #DCE7EE;
  --c-code-bg:     #0A2839;
  --c-code-text:   #D3F0FF;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--c-slate);
  background: var(--c-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Smooth re-brand on theme flip. */
.topnav,
.card,
.btn,
.hero {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

a { color: var(--c-snow); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { font-weight: 700; color: var(--c-navy); letter-spacing: -0.01em; }
h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 1rem; }
h2 { font-size: 1.9rem; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 0.6rem; }
h4 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; color: var(--c-slate); }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: 0.35rem; }

code, pre { font-family: var(--font-mono); }
code {
  background: rgba(111, 91, 239, 0.08);
  color: var(--c-navy);
  padding: 0.12em 0.45em;
  border-radius: 4px;
  font-size: 0.9em;
}
pre {
  background: var(--c-code-bg);
  color: var(--c-code-text);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
pre code { background: transparent; color: inherit; padding: 0; border-radius: 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Top nav ===== */
.topnav {
  background: var(--c-navy);
  color: #fff;
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.topnav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.topnav-brand:hover { text-decoration: none; }
.topnav-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c-indigo), var(--c-snow));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-mono);
}
.topnav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.topnav-links a {
  color: #C9D1E3;
  font-size: 0.95rem;
  font-weight: 500;
}
.topnav-links a:hover { color: #fff; text-decoration: none; }
.topnav-links a.active { color: #fff; }

/* ===== Theme switcher widget ===== */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}
.theme-switch button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: var(--swatch);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.theme-switch button:hover { transform: scale(1.1); }
.theme-switch button[aria-pressed="true"] {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.theme-switch button.swatch-fivetran { --swatch: #6F5BEF; }
.theme-switch button.swatch-dbt      { --swatch: #FF694A; }
.theme-switch button.swatch-snow     { --swatch: #29B5E8; }
.theme-switch-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-right: 0.2rem;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--c-navy-deep) 0%, var(--c-navy) 55%, #1a2456 100%);
  color: #fff;
  padding: 4.5rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px;
  background: var(--c-indigo);
  top: -120px; right: -80px;
}
.hero::after {
  width: 360px; height: 360px;
  background: var(--c-orange);
  bottom: -120px; left: -60px;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #C9D1E3;
  margin-bottom: 1.5rem;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-orange);
  box-shadow: 0 0 8px var(--c-orange);
}
.hero h1 {
  color: #fff;
  font-size: 3.4rem;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 1.2rem;
}
.hero h1 .accent { color: var(--c-snow); }
.hero-tagline {
  font-size: 1.25rem;
  color: #C9D1E3;
  max-width: 56ch;
  margin: 0 0 2rem;
}
.hero-cobrand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  color: #8B94AD;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-cobrand .brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.9rem;
}
.hero-cobrand .brand-pill .swatch {
  width: 10px; height: 10px; border-radius: 50%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--c-indigo);
  color: #fff;
}
.btn-primary:hover { background: #5946d8; color: #fff; }
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-light {
  background: #fff;
  color: var(--c-navy);
}
.btn-light:hover { background: #f1f1ee; }
.btn-orange {
  background: var(--c-orange);
  color: #fff;
}
.btn-orange:hover { background: #e85a3c; color: #fff; }
.btn-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* ===== Sections ===== */
section { padding: 4rem 0; }
section.section-tight { padding: 3rem 0; }
section.section-dark {
  background: var(--c-navy);
  color: #fff;
}
section.section-dark h1,
section.section-dark h2,
section.section-dark h3,
section.section-dark h4 { color: #fff; }
section.section-dark p { color: #C9D1E3; }
section.section-tint {
  background: linear-gradient(180deg, #FAFAF7 0%, #F0EEFF 100%);
}
.section-eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-indigo);
  margin-bottom: 0.6rem;
}
.section-lead { font-size: 1.15rem; color: var(--c-muted); max-width: 62ch; }
section.section-dark .section-lead { color: #C9D1E3; }
section.section-dark .section-eyebrow { color: var(--c-snow); }

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card .card-meta {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-indigo);
  margin-bottom: 0.5rem;
}
.card .card-meta.dbt { color: var(--c-orange); }
.card .card-meta.snow { color: var(--c-snow); }
.card .card-footer {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.92rem;
}
.card a.card-link {
  color: var(--c-indigo);
  font-weight: 600;
}
.card a.card-link:hover { text-decoration: underline; }

/* Numbered scenario card */
.scenario-card {
  position: relative;
  padding-left: 4.5rem;
}
.scenario-card .scenario-num {
  position: absolute;
  left: 1.2rem;
  top: 1.4rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-indigo), var(--c-snow));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
  font-size: 1.05rem;
}
.scenario-card.onboarding .scenario-num {
  background: linear-gradient(135deg, var(--c-orange), #FFB199);
}

/* ===== Hero video / inline video ===== */
.video-wrap {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 2rem 0;
  border: 1px solid var(--c-border);
}
.video-wrap video {
  display: block;
  width: 100%;
  height: auto;
}
.video-caption {
  font-size: 0.92rem;
  color: var(--c-muted);
  margin-top: 0.6rem;
  text-align: center;
}

/* ===== Pill / chip ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(111, 91, 239, 0.08);
  color: var(--c-indigo);
}
.pill.orange { background: rgba(255, 105, 74, 0.1); color: var(--c-orange); }
.pill.snow   { background: rgba(41, 181, 232, 0.12); color: #1798C9; }
.pill.muted  { background: #EEF0F4; color: var(--c-muted); }

/* ===== Definition list / data list ===== */
.dl-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.55rem 1.2rem;
  margin: 1rem 0;
}
.dl-grid dt {
  font-weight: 700;
  color: var(--c-navy);
  font-size: 0.92rem;
}
.dl-grid dd {
  margin: 0;
  color: var(--c-slate);
  font-size: 0.96rem;
}

/* ===== Before / After table from messaging brief ===== */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.before-after .col {
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.before-after .col.before {
  background: #FFF5F2;
  border: 1px solid #FFD7CD;
}
.before-after .col.after {
  background: #F0EEFF;
  border: 1px solid #D9D3FF;
}
.before-after h4 {
  margin-top: 0;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}
.before-after .col.before h4 { color: #B23814; }
.before-after .col.after h4 { color: var(--c-indigo); }
.before-after ul { padding-left: 1.1rem; }
.before-after li { font-size: 0.95rem; }

/* ===== Steps list (numbered prompt flow) ===== */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}
.steps-list > li {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem 1.3rem 4.5rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.steps-list > li::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--c-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
}
.steps-list { counter-reset: step; }
.steps-list .step-title { font-weight: 700; color: var(--c-navy); margin-bottom: 0.4rem; }
.steps-list .step-prompt {
  background: var(--c-code-bg);
  color: var(--c-code-text);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
.steps-list .step-meta {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: 0.4rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--c-navy-deep);
  color: #8B94AD;
  padding: 2.5rem 0;
  margin-top: 4rem;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.site-footer a { color: #C9D1E3; }

/* ===== Tables ===== */
table.tbl {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--c-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.tbl th, table.tbl td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.95rem;
}
table.tbl th {
  background: #F1EEFF;
  color: var(--c-navy);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.tbl tr:last-child td { border-bottom: none; }

/* ===== Callouts ===== */
.callout {
  border-left: 4px solid var(--c-indigo);
  background: #F4F2FF;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
}
.callout.orange { border-left-color: var(--c-orange); background: #FFF3EF; }
.callout.snow { border-left-color: var(--c-snow); background: #E6F6FD; }
.callout.warn { border-left-color: #D97706; background: #FFFBEB; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero { padding: 3rem 0 3.5rem; }
  .topnav-links { gap: 0.9rem; }
  .topnav-links a { font-size: 0.85rem; }
  .before-after { grid-template-columns: 1fr; }
}

/* ===== Path selector tabs (for choose-your-path scenario videos) ===== */
.path-tabs {
  display: inline-flex;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  gap: 0.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.path-tabs button {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: background 0.18s ease, color 0.18s ease;
}
.path-tabs button:hover {
  color: var(--c-slate);
}
.path-tabs button[aria-pressed="true"] {
  background: var(--c-indigo);
  color: #fff;
}
.path-tabs button .tab-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.1rem;
}
.path-panels { position: relative; }
.path-panels .path-panel { display: none; }
.path-panels .path-panel.is-active { display: block; }

@media (max-width: 640px) {
  .path-tabs { width: 100%; flex-direction: column; align-items: stretch; }
  .path-tabs button { text-align: left; }
}

/* ===== Print rules for the prompt sheet page ===== */
@media print {
  .topnav, .site-footer, .no-print, .theme-switch { display: none !important; }
  .path-tabs { display: none !important; }
  body { background: #fff; }
  section { padding: 0.5rem 0; }
  .steps-list > li { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .hero { padding: 1rem 0; background: #fff; color: #000; }
  .hero h1, .hero p { color: #000; }
}

.hero-merger-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  margin: -0.4rem 0 1.5rem 0;
  padding: 0.45rem 0.85rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
}
.hero-merger-note span {
  color: rgba(255,255,255,0.55);
  border-left: 1px solid rgba(255,255,255,0.18);
  padding-left: 0.6rem;
}
@media (max-width: 540px) {
  .hero-merger-note { display: block; padding: 0.6rem 0.9rem; line-height: 1.45; }
  .hero-merger-note span { display: block; border-left: none; padding-left: 0; margin-top: 0.25rem; }
}

/* ============================================================
   COMPREHENSIVE RESPONSIVE PASS
   Tablet landscape, tablet portrait, large phone, small phone.
   ============================================================ */

/* Tablet landscape and below (<= 1024px) */
@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }
  section { padding: 3rem 0; }
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.65rem; }
  .hero { padding: 3.8rem 0 4.2rem; }
  .hero h1 { font-size: 2.9rem; }
  .hero-tagline { font-size: 1.15rem; }
  .card-grid { gap: 1.2rem; }
}

/* Tablet portrait and large phone (<= 820px) */
@media (max-width: 820px) {
  /* Top nav: compact horizontally, wrap if needed */
  .topnav { padding: 0.7rem 0; }
  .topnav .container { gap: 0.7rem; flex-wrap: wrap; }
  .topnav-brand { font-size: 0.95rem; }
  .topnav-brand-mark { width: 28px; height: 28px; }
  .topnav-links { gap: 0.85rem; flex-wrap: wrap; row-gap: 0.4rem; }
  .topnav-links a { font-size: 0.86rem; }

  /* Hero */
  .hero { padding: 3rem 0 3.5rem; }
  .hero h1 { font-size: 2.3rem; max-width: 100%; }
  .hero-tagline { font-size: 1.05rem; }
  .hero-cobrand { gap: 0.55rem; font-size: 0.75rem; }
  .hero-cobrand .brand-pill { font-size: 0.85rem; padding: 0.32rem 0.7rem; }

  /* Sections */
  section { padding: 2.5rem 0; }
  h2 { font-size: 1.5rem; margin: 2rem 0 0.8rem; }
  .section-lead { font-size: 1.02rem; }

  /* Step list */
  .steps-list > li { padding: 1.1rem 1.2rem 1.1rem 3.5rem; }
  .steps-list > li::before { left: 0.9rem; top: 1.1rem; width: 1.9rem; height: 1.9rem; font-size: 0.9rem; }

  /* Scenario cards */
  .scenario-card { padding-left: 4rem; }
  .scenario-card .scenario-num { left: 1rem; top: 1.2rem; width: 2.2rem; height: 2.2rem; font-size: 0.95rem; }

  /* Tables: horizontal scroll wrapper */
  table.tbl { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; box-shadow: var(--shadow-sm); }
  table.tbl thead, table.tbl tbody { display: table; width: 100%; min-width: 600px; }

  /* Path tabs stack earlier so they look intentional on iPad portrait */
  .path-tabs { display: flex; width: 100%; flex-direction: column; align-items: stretch; }
  .path-tabs button { text-align: left; }
}

/* Large phone and below (<= 640px) */
@media (max-width: 640px) {
  .container { padding: 0 1.1rem; }
  section { padding: 2.2rem 0; }
  h2 { font-size: 1.35rem; }

  /* Footer stacks */
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 0.5rem; text-align: left; }
  .site-footer { padding: 1.8rem 0; }

  /* Theme switch tightens */
  .theme-switch-label { display: none; }
  .theme-switch { padding: 0.2rem 0.35rem; }
  .theme-switch button { width: 20px; height: 20px; }

  /* dl-grid stacks */
  .dl-grid { grid-template-columns: 1fr; gap: 0.25rem 0; }
  .dl-grid dt { margin-top: 0.55rem; }
  .dl-grid dd { padding-left: 0; }

  /* Buttons fill on stacking layouts */
  .btn-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .btn { padding: 0.7rem 1.1rem; font-size: 0.95rem; }
}

/* Small phone (<= 480px) */
@media (max-width: 480px) {
  .container { padding: 0 0.95rem; }
  section { padding: 1.9rem 0; }

  /* Nav: hide brand text label, keep just the W mark + links */
  .topnav-brand span:not(.topnav-brand-mark) { display: none; }
  .topnav-links { gap: 0.6rem; overflow-x: auto; flex-wrap: nowrap; padding: 0.15rem 0 0.25rem; }
  .topnav-links::-webkit-scrollbar { display: none; }
  .topnav-links a { white-space: nowrap; font-size: 0.8rem; }

  /* Hero */
  .hero { padding: 2rem 0 2.4rem; }
  .hero h1 { font-size: 1.85rem; line-height: 1.18; }
  .hero-tagline { font-size: 0.98rem; }
  .hero-eyebrow { font-size: 0.7rem; padding: 0.3rem 0.7rem; }
  .hero-merger-note { font-size: 0.85rem; }
  .hero-cobrand { gap: 0.4rem; }
  .hero-cobrand .brand-pill { font-size: 0.8rem; padding: 0.28rem 0.6rem; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.2rem; }

  /* Cards stack one column */
  .card-grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .card { padding: 1.15rem; }

  /* Steps compact even further */
  .steps-list > li { padding: 0.9rem 1rem 0.9rem 2.9rem; }
  .steps-list > li::before { left: 0.7rem; top: 0.9rem; width: 1.65rem; height: 1.65rem; font-size: 0.8rem; }

  /* Scenario cards compact */
  .scenario-card { padding-left: 3.6rem; }
  .scenario-card .scenario-num { left: 0.8rem; top: 1rem; width: 1.95rem; height: 1.95rem; font-size: 0.88rem; }

  /* Code blocks readable but smaller */
  pre { padding: 0.8rem 0.85rem; font-size: 0.8rem; }
  .steps-list .step-prompt { font-size: 0.8rem; padding: 0.7rem 0.85rem; }

  /* Callouts tighten */
  .callout { padding: 0.85rem 1rem; }

  /* Video margin tightens */
  .video-wrap { margin: 1.4rem 0; border-radius: var(--radius-md); }
}
