/* HDF site. Brand colors and font from guarapo.dev (checked 2026-11-28). */
:root {
  --navy: #131937;
  --navy-2: #1c2450;
  --green: #56bf7d;
  --green-ink: #1f7a45;
  --lime: #1bee14;
  --coral: #f06e58;
  --blue: #2a5ac5;
  --ink: #191919;
  --muted: #4f566b;
  --line: #d9dce5;
  --tint: #eef7f1;
  --paper: #ffffff;
  --soft: #f6f7fa;
  --on-dark: #e7e9f2;
  --on-dark-muted: #b9bfd6;
  --radius: 6px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Red Hat Display", system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--paper); font-kerning: normal; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--lime); color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.hero-dark :focus-visible, .band-dark :focus-visible, .top :focus-visible { outline-color: var(--lime); }
html { scrollbar-color: var(--navy) var(--soft); }
.num { font-variant-numeric: tabular-nums lining-nums; }

h1, h2, h3 { font-weight: 900; line-height: 1.08; letter-spacing: -0.012em; text-wrap: balance; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-top: 0; }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 60ch; }
.measure { max-width: 62ch; }
.note { font-size: .92rem; color: var(--muted); max-width: 70ch; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 50; background: var(--lime); color: var(--navy); padding: 10px 16px; font-weight: 700; border-radius: var(--radius); }
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 900; letter-spacing: .12em; font-size: 1.05rem; }
.brand-full { font-weight: 500; font-size: .7rem; letter-spacing: .04em; color: var(--on-dark-muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--on-dark); text-decoration: none; font-weight: 500; padding: 10px 12px; border-radius: var(--radius); min-height: 44px; display: inline-flex; align-items: center; transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--lime); border-radius: 0; }
.nav .lang { margin-left: 8px; border: 1px solid rgba(255,255,255,.25); }
.menu-btn { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius); font: 700 .95rem var(--font); padding: 0 16px; min-height: 44px; cursor: pointer; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--radius); border: 2px solid var(--navy); background: var(--navy); color: #fff; font: 700 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(19,25,55,.45); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.band:not(.band-dark) .btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-quiet { background: transparent; color: var(--navy); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.link { color: var(--blue); font-weight: 700; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .3s var(--ease); padding-bottom: 2px; }
.link:hover { background-size: 100% 2px; }
.band-dark .link { color: var(--lime); }

/* Level tags */
.tag { display: inline-block; font: 700 .7rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; margin-right: 10px; vertical-align: 2px; white-space: nowrap; }
.tag-core { background: var(--navy); color: #fff; }
.tag-rule { background: var(--green); color: var(--navy); }
.tag-default { background: #eef0f5; color: var(--muted); border: 1px solid var(--line); }
.tag-practice { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.band-dark .tag-core, .hero-dark .tag-core { background: #fff; color: var(--navy); }

/* Hero */
.hero { padding: clamp(56px, 9vh, 110px) 0; }
.hero-dark { background: var(--navy); color: var(--on-dark); min-height: calc(100svh - 64px); display: flex; align-items: center; }
.hero-dark.hero-short { min-height: auto; }
.hero-dark h1 { color: #fff; }
.hero-dark .lead { color: var(--on-dark-muted); }
.hero-grid > *, .split > *, .tool > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.fact { font-size: .98rem; color: var(--on-dark-muted); }
.fact strong { color: var(--lime); font-weight: 900; font-size: 1.15em; }

/* Hero visual: a live cycle */
.frame { background: #0d1230; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); overflow: hidden; color: var(--on-dark); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.frame-bar p { margin: 0 0 0 10px; font: 500 .85rem var(--mono); color: var(--on-dark-muted); }
.cycle { list-style: none; margin: 0; padding: 18px 20px 6px; display: grid; gap: 8px; }
.cycle li { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius); background: rgba(255,255,255,.03); position: relative; }
.cycle li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); }
.cycle li.done::before { background: var(--green); border-color: var(--green); }
.cycle li.now { background: rgba(27,238,20,.08); outline: 1px solid rgba(27,238,20,.35); }
.cycle li.now::before { border-color: var(--lime); background: var(--lime); animation: pulse 2.8s var(--ease) infinite; }
.cycle b { font-weight: 700; color: #fff; }
.cycle i { font: 500 .8rem var(--mono); font-style: normal; color: var(--on-dark-muted); }
.frame-ledger { padding: 14px 20px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 12px; }
.frame-ledger p { margin: 0 0 8px; font-size: .85rem; color: var(--on-dark-muted); }
.frame-ledger-text { margin-top: 8px !important; }
.frame-rule { padding: 12px 20px 18px; margin: 0; font-size: .9rem; color: var(--on-dark); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(27,238,20,.55); } 70% { box-shadow: 0 0 0 10px rgba(27,238,20,0); } 100% { box-shadow: 0 0 0 0 rgba(27,238,20,0); } }

/* Guide cover visual */
.cover { aspect-ratio: 210 / 297; max-width: 360px; justify-self: center; width: 100%; background: linear-gradient(180deg, #1a2150, var(--navy)); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 14% 10% 10%; display: flex; flex-direction: column; box-shadow: 0 30px 60px -30px rgba(0,0,0,.65); color: #fff; }
.cover-brand { font-weight: 700; letter-spacing: .26em; font-size: .62rem; color: var(--green); }
.cover-title { font-weight: 900; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.05; margin: 18% 0 6px; }
.cover-sub { color: #cfd3e3; }
.cover-bar { width: 32%; height: 6px; background: var(--lime); margin: 10% 0; }
.cover-ed { margin-top: auto; font-weight: 700; }

/* Bands */
.band { padding: clamp(64px, 10vh, 120px) 0; }
.band-tint { background: var(--tint); }
.band-dark { background: var(--navy); color: var(--on-dark); }
.band-dark h2 { color: #fff; }
.band-dark .measure { color: var(--on-dark-muted); }
.band-tool { background: var(--soft); }
.page-head + .band-tool { padding-top: clamp(32px, 5vh, 56px); }
.band-tool .tool { margin-top: 0; }
#ceiling .tool { margin-top: 24px; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.split-wide { grid-template-columns: .8fr 1.2fr; }
.read { max-width: 760px; }
.read h2 { margin-top: 1.6em; }
.read h2:first-child { margin-top: 0; }
.page-head { padding: clamp(48px, 8vh, 96px) 0 clamp(32px, 5vh, 56px); }
.page-head-tall { min-height: 60vh; display: flex; align-items: center; }
.close { text-align: left; }
.close-inner { max-width: 760px; }

/* Flow: five steps */
.flow { list-style: none; counter-reset: step; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 2px solid var(--navy); }
.flow li { counter-increment: step; padding: 22px 20px 0 0; position: relative; color: var(--muted); }
.flow li::before { content: counter(step); position: absolute; top: -13px; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--navy); font: 900 .8rem/24px var(--font); text-align: center; }
.flow strong { display: block; color: var(--navy); font-size: 1.1rem; margin-bottom: 6px; }

/* Rules list */
.rules, .levels, .plain { list-style: none; padding: 0; margin: 0; }
.rules li { padding: 18px 0; border-bottom: 1px solid #cfe5d7; font-size: 1.08rem; }
.rules li:first-child { padding-top: 0; }
.levels li { padding: 10px 0; }
.plain li { padding: 10px 0 10px 22px; position: relative; }
.plain li::before { content: ""; position: absolute; left: 0; top: 20px; width: 10px; height: 2px; background: var(--green-ink); }

/* Downloads */
.dl-list { list-style: none; padding: 0; margin: 32px 0 12px; border-top: 1px solid var(--line); }
.dl-row { display: grid; grid-template-columns: 1.3fr .7fr auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); transition: transform .25s var(--ease); }
.dl-row:hover { transform: translateY(-2px); }
.dl-title { font-weight: 900; font-size: 1.2rem; color: var(--navy); text-decoration: none; }
.dl-title:hover { color: var(--blue); }
.dl-main p { margin: 4px 0 0; color: var(--muted); }
.dl-meta { margin: 0; color: var(--muted); font-size: .92rem; }
.dl-actions { display: flex; gap: 8px; }

/* Score chart */
.scores { margin: 0; }
.scores svg { width: 100%; height: auto; }
.s-label { fill: var(--on-dark-muted); font: 500 13px var(--font); }
.s-bar { fill: rgba(255,255,255,.22); }
.s-ok { fill: var(--green); }
.s-val { fill: #fff; font: 700 14px var(--font); font-variant-numeric: tabular-nums; }
.s-goal { stroke: var(--lime); stroke-width: 2; stroke-dasharray: 4 4; }
.s-goal-label { fill: var(--lime); font: 700 12px var(--font); }

/* Tools: DRIVE and capacity */
.tool { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 24px; }
.tool-result { position: sticky; top: 88px; }
.dim { border: 0; padding: 0; margin: 0 0 28px; }
.dim legend { font-weight: 900; font-size: 1.25rem; color: var(--navy); display: flex; align-items: baseline; gap: 10px; padding: 0; }
.dim-letter { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--navy); color: var(--lime); border-radius: 4px; font-size: 1rem; }
.dim-weight { font-weight: 500; font-size: .95rem; color: var(--muted); }
.dim-hint { color: var(--muted); margin: 6px 0 12px; font-size: .95rem; }
.dim-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lvl { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 96px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .2s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.lvl:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(19,25,55,.4); }
.lvl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lvl-n { font-weight: 900; font-size: 1.15rem; color: var(--navy); }
.lvl-t { font-size: .86rem; line-height: 1.35; color: var(--muted); }
.lvl:has(input:checked) { border: 2px solid var(--navy); background: var(--tint); padding: 11px; }
.lvl:has(input:checked) .lvl-n { color: var(--green-ink); }
.lvl:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

.result { background: var(--navy); color: var(--on-dark); border-radius: 10px; padding: 24px; box-shadow: 0 24px 48px -28px rgba(19,25,55,.7); }
.result-figures { display: flex; gap: 32px; flex-wrap: wrap; }
.result-label { display: block; font-size: .85rem; color: var(--on-dark-muted); }
.result-num { display: block; font-weight: 900; font-size: 2.6rem; line-height: 1.1; color: #fff; }
.result-hp { color: var(--lime); }
.bands { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bands li { text-align: center; padding: 6px 0; border-radius: 3px; background: rgba(255,255,255,.08); font-weight: 700; font-size: .85rem; color: var(--on-dark-muted); }
.bands li.on { background: var(--lime); color: var(--navy); }
.warnings { list-style: none; padding: 0; margin: 18px 0 0; }
.warnings li { padding: 10px 12px; margin-top: 8px; border: 1px solid rgba(240,110,88,.6); border-radius: var(--radius); background: rgba(240,110,88,.1); font-size: .92rem; color: #ffe3dd; }
.error { color: #ffd1c8; font-weight: 700; }
.tool-result .note { margin-top: 14px; }

.band-table, .scale, .cap-table, .versions { border-collapse: collapse; width: 100%; }
.band-table th, .band-table td, .scale td, .versions th, .versions td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.band-table thead th, .versions thead th { background: var(--navy); color: #fff; font-size: .9rem; }
.scale tr.on td { background: var(--tint); font-weight: 700; }
.cap-table th, .cap-table td { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.1); text-align: left; font-weight: 500; }
.cap-table td { text-align: right; color: #fff; }
.cap-table + .result-figures { margin-top: 18px; }

.cap-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cap-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .92rem; color: var(--navy); }
.cap-form input { font: 500 1.05rem var(--font); min-height: 48px; padding: 0 12px; border: 1px solid #b9bfd0; border-radius: var(--radius); background: #fff; color: var(--ink); font-variant-numeric: tabular-nums; }
.cap-form input:focus-visible { border-color: var(--blue); }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--navy); font-weight: 700; text-decoration: none; transition: transform .25s var(--ease), border-color .2s; }
.jump a:hover { transform: translateY(-2px); border-color: var(--navy); }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.checklist li { break-inside: avoid; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-ink); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--green); }
.ready-count { font-weight: 900; font-size: 1.6rem; color: var(--navy); }

/* Simulation */
.sim { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 24px 48px -32px rgba(19,25,55,.45); }
.sim-progress { width: 100%; height: 8px; border: 0; border-radius: 4px; background: var(--soft); overflow: hidden; appearance: none; }
.sim-progress::-webkit-progress-bar { background: #e6e9f0; border-radius: 4px; }
.sim-progress::-webkit-progress-value { background: var(--green); border-radius: 4px; transition: width .4s var(--ease); }
.sim-progress::-moz-progress-bar { background: var(--green); border-radius: 4px; }
.sim-count { margin: 10px 0 18px; color: var(--muted); font-size: .92rem; }
.sim-title { font-size: 1.6rem; }
.sim-facts, .facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 32px; margin: 0 0 16px; }
.sim-facts dt, .facts dt { font-size: .8rem; color: var(--muted); }
.sim-facts dd, .facts dd { margin: 2px 0 0; font-weight: 700; color: var(--navy); }
.sim-body { max-width: 62ch; }
.ledger { margin: 20px 0; }
.ledger-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.hp { display: block; height: 18px; border-radius: 3px; }
.hp-free { background: #dfe3ec; }
.frame .hp-free { background: rgba(255,255,255,.16); }
.hp-reserved { background: var(--green); }
.hp-debited { background: var(--navy); }
.frame .hp-reserved { background: var(--lime); }
.ledger-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0 0; }
.ledger-legend div { display: flex; align-items: center; gap: 8px; }
.ledger-legend dt { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.ledger-legend dt .hp { width: 14px; height: 14px; }
.ledger-legend dd { margin: 0; font-weight: 900; color: var(--navy); }
.sim-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.htmx-request .btn, .btn.htmx-request { opacity: .6; }

/* Terms, steps */
.terms div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.terms dt { font-weight: 900; color: var(--navy); }
.terms dd { margin: 0; color: var(--ink); }
.steps { padding-left: 1.3em; }
.steps li { padding: 6px 0; }
.steps li::marker { color: var(--green-ink); font-weight: 900; }

/* Versions table */
.table-scroll { overflow-x: auto; margin-top: 24px; }
.versions { min-width: 860px; }
.versions th[scope="row"] { font-weight: 900; color: var(--navy); min-width: 300px; }
.versions tr.on th, .versions tr.on td { background: var(--tint); }
.v-note { display: block; font-weight: 400; font-size: .86rem; color: var(--muted); margin-top: 4px; max-width: 46ch; }

/* Long documents */
.doc-head { padding: clamp(40px, 7vh, 80px) 0 24px; border-bottom: 1px solid var(--line); }
.prose { max-width: 820px; padding-top: 40px; padding-bottom: 96px; }
.prose h2 { font-size: 1.8rem; margin-top: 2em; padding-top: .2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { max-width: 72ch; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 1em 0 1.6em; display: block; overflow-x: auto; }
.prose th { background: var(--navy); color: #fff; text-align: left; padding: 8px 10px; }
.prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.prose a { color: var(--blue); }
.prose pre { overflow-x: auto; background: var(--soft); padding: 14px 16px; border-radius: var(--radius); }
.prose pre code { background: none; padding: 0; }
.prose code { font: 500 .9em var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 3px; }

.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 88px; padding-top: 40px; max-height: calc(100vh - 100px); overflow-y: auto; }
.toc-title { font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 8px 0 8px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.35; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--navy); border-left-color: var(--green); }
.doc > * { min-width: 0; }
.doc .prose { padding-left: 0; padding-right: 0; }
@media (max-width: 1024px) { .doc { grid-template-columns: 1fr; gap: 0; } .toc { position: static; max-height: none; padding-top: 24px; } }

/* Footer */
.foot { background: var(--navy); color: var(--on-dark-muted); padding: 40px 0; font-size: .92rem; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot p { margin: 0; }

/* One entrance on load */
.enter { animation: enter .9s var(--ease) both; }
.enter-late { animation-delay: .15s; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

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

/* Tablet */
@media (max-width: 1024px) {
  .hero-grid, .split, .split-wide, .tool { grid-template-columns: 1fr; }
  .tool-result { position: static; }
  .flow { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--navy); }
  .flow li { padding: 0 0 24px 28px; }
  .flow li::before { left: -13px; top: 0; }
  .dl-row { grid-template-columns: 1fr; gap: 10px; }
  .cover { max-width: 280px; }
}

/* Phone */
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { display: none; position: fixed; inset: 64px 0 0 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 24px var(--gutter); gap: 4px; }
  .nav.open { display: flex; }
  .nav a { font-size: 1.2rem; min-height: 52px; }
  .nav .lang { margin: 12px 0 0; justify-content: center; }
  .actions .btn { width: 100%; }
  .dim-levels { grid-template-columns: 1fr; }
  .lvl { min-height: 52px; flex-direction: row; align-items: center; gap: 12px; }
  .cap-form { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  .terms div { grid-template-columns: 1fr; gap: 4px; }
  .sim-facts, .facts { grid-template-columns: 1fr 1fr; }
  .hero-dark { min-height: auto; }
  .dl-actions .btn { flex: 1; }
  /* DRIVE on a phone: keep the result visible while rating, as a bar at the bottom. */
  .tool:has(.drive-form) .tool-result { position: sticky; bottom: 0; top: auto; z-index: 5; margin: 0 calc(-1 * var(--gutter)); }
  .tool:has(.drive-form) .tool-result .result { border-radius: 10px 10px 0 0; padding: 12px var(--gutter); }
  .tool:has(.drive-form) .tool-result .bands, .tool:has(.drive-form) .tool-result > .note { display: none; }
  .tool:has(.drive-form) .result-num { font-size: 1.7rem; }
  .tool:has(.drive-form) .warnings li { padding: 6px 10px; font-size: .85rem; }
}

/* ---------- Course platform ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-weight: 700; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: var(--green-ink); margin: 0 0 12px; }
.eyebrow a { color: inherit; }
.form { display: grid; gap: 8px; max-width: 520px; margin-top: 16px; }
.form label { font-weight: 700; color: var(--navy); }
.form input:not([type=checkbox]):not([type=radio]), .form select, .rate textarea {
  font: 400 1.05rem var(--font); min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
.form input:focus-visible, .form select:focus-visible, .rate textarea:focus-visible { border-color: var(--blue); }
.form-inline { max-width: none; grid-template-columns: 1fr; }
@media (min-width: 760px) { .form-inline { grid-template-columns: auto minmax(220px, 1fr) auto auto auto; align-items: center; } .form-inline .btn { white-space: nowrap; } }
.code-input { font: 500 1.6rem var(--mono) !important; letter-spacing: .3em; max-width: 240px; }
.form-error { color: #9c2b17; background: #fdeeea; border-left: 4px solid var(--coral); padding: 10px 14px; border-radius: var(--radius); }
.form-ok { color: var(--green-ink); background: var(--tint); border-left: 4px solid var(--green); padding: 10px 14px; border-radius: var(--radius); }
.notice { background: var(--soft); border: 1px solid var(--line); padding: 20px; border-radius: var(--radius); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500 !important; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.danger { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.btn-danger { background: #9c2b17; border-color: #9c2b17; }
.btn-link { background: none; border: 0; padding: 8px 4px; min-height: 44px; font: 700 .95rem var(--font); color: var(--blue); text-decoration: underline; cursor: pointer; }
.btn-link.danger { color: #9c2b17; border: 0; margin: 0; padding-top: 8px; }
.row-form { display: flex; gap: 12px; align-items: center; margin: 0; }
.plain-list { padding-left: 1.2em; }
.nav-form { margin: 0; display: inline-flex; }
.nav-form button { background: transparent; border: 0; color: var(--on-dark); font: 500 1rem var(--font); padding: 10px 12px; min-height: 44px; cursor: pointer; border-radius: var(--radius); }
.nav-form button:hover { color: #fff; }

.course-meter { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); }
.course-meter progress { width: 200px; height: 10px; accent-color: var(--green); }
.band-lessons { padding-bottom: clamp(48px, 8vh, 96px); }
.lessons { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.lesson-row { display: flex; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lesson-n { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--soft); color: var(--navy); border: 2px solid var(--line); }
.lesson-row.is-done .lesson-n { background: var(--green); border-color: var(--green); color: var(--navy); }
.lesson-link { font-weight: 700; font-size: 1.15rem; color: var(--navy); text-decoration: none; }
.lesson-link:hover { text-decoration: underline; }
.lesson-meta { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }

.lesson-head { padding: clamp(32px, 5vh, 56px) 0 16px; }
.lesson-player { background: var(--navy); padding: 24px 0; }
.player { margin: 0; color: var(--on-dark); }
.player:fullscreen { background: #000; display: flex; flex-direction: column; justify-content: center; }
.player-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player-frame video { width: 100%; height: 100%; display: block; }
.player video::cue { font-family: var(--font); font-size: 1.1em; background: rgba(19,25,55,.85); }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0 4px; }
.player-bar button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--lime); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.player-bar .pb-full { background: transparent; color: var(--on-dark); border: 1px solid rgba(255,255,255,.3); }
.player-bar svg { width: 20px; height: 20px; fill: currentColor; }
.player .i-pause, .player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: block; }
.pb-time { font: 500 .95rem var(--mono); min-width: 96px; }
.pb-seek { flex: 1 1 200px; accent-color: var(--lime); min-height: 44px; }
.pb-field { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--on-dark-muted); }
.pb-field select { font: 500 .95rem var(--font); min-height: 40px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.3); background: var(--navy-2); color: #fff; padding: 0 8px; }
.player-note { font-size: .92rem; padding-top: 8px; }
.player-note .muted { color: var(--on-dark-muted); }
.player :focus-visible { outline-color: var(--lime); }

.lesson-quiz, .lesson-rate { padding: clamp(32px, 5vh, 56px) 0 0; }
.quiz-q { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 16px; }
.quiz-q legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.quiz-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 6px; min-height: 44px; cursor: pointer; border-radius: var(--radius); }
.quiz-opt:hover { background: var(--soft); }
.quiz-opt input { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--navy); flex: none; }
.quiz-score { font-size: 1.15rem; padding: 14px 18px; border-radius: var(--radius); }
.quiz-score.is-pass { background: var(--tint); border-left: 4px solid var(--green); }
.quiz-score.is-fail { background: #fff6e8; border-left: 4px solid var(--coral); }
.quiz-done { font-weight: 900; color: var(--green-ink); }
.quiz-review { padding-left: 1.2em; }
.quiz-review li { margin-bottom: 16px; }
.quiz-q-text { font-weight: 700; margin: 0; }
.quiz-tag { font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-right: 6px; }
.is-right .quiz-tag { background: var(--tint); color: var(--green-ink); }
.is-wrong .quiz-tag { background: #fdeeea; color: #9c2b17; }
.stars { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px; }
.stars legend { font-weight: 900; font-size: 1.3rem; color: var(--navy); margin-bottom: 8px; width: 100%; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; }
.stars svg { width: 32px; height: 32px; fill: var(--line); transition: fill .15s var(--ease); }
.stars:has(input:checked) label svg { fill: #f2b705; }
.stars input:checked + label ~ label svg { fill: var(--line); }
.stars input:focus-visible + label { outline: 3px solid var(--blue); border-radius: 4px; }
.stars:not(:has(input:checked)) label:hover svg, .stars label:has(~ label:hover) svg { fill: #f2b705; }
.rate label[for=comment] { display: block; font-weight: 700; color: var(--navy); margin: 8px 0 6px; }
.rate textarea { min-height: 96px; resize: vertical; }
.lesson-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 32px; padding-bottom: 64px; }

table.data { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.progress-table td { text-align: center; white-space: nowrap; }
.progress-table .cell-done { color: var(--green-ink); font-weight: 900; background: var(--tint); }
.ratings { list-style: none; padding: 0; }
.ratings li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.ratings p { margin: 0 0 4px; }
.ratings strong { color: #b38600; }
.course-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.course-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.course-card:not(.is-soon):hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(19,25,55,.35); }
.course-card h2 { font-size: 1.5rem; margin: 0; }
.course-card h2 a { color: var(--navy); text-decoration: none; }
.course-card h2 a::after { content: ""; position: absolute; inset: 0; }
.course-card { position: relative; }
.course-card p { margin: 0; color: var(--muted); }
.course-num { font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--green-ink) !important; }
.course-foot { margin-top: auto !important; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-weight: 700; color: var(--navy) !important; font-size: .95rem; }
.course-foot progress { width: 90px; height: 8px; accent-color: var(--green); vertical-align: middle; }
.course-card.is-soon { background: var(--soft); }
.course-card.is-soon h2 { color: var(--muted); }
.soon { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; color: var(--muted); }
.course-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; } .course-switch a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; } .course-switch a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
/* Video.js 10 player */
.hdf-player, .hdf-skin { display: block; width: 100%; }
.hdf-skin { aspect-ratio: 16 / 9; border-radius: 0; background: transparent; --media-border-radius: 0; --media-accent-color: var(--lime); box-shadow: 0 24px 60px -30px rgba(0,0,0,.7); }
.hdf-skin video { width: 100%; height: 100%; }
.player-options { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 14px 0 4px; }
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seg-label { font-size: .9rem; color: var(--on-dark-muted); margin-right: 4px; }
.seg button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--on-dark); font: 500 .95rem var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--navy); font-weight: 700; }
.seg button:hover { border-color: #fff; }
.quiz-locked { border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px 24px; background: var(--soft); }
.quiz-locked p { margin: 0 0 6px; }

/* Header: Guarapo brand, grouped menus, ES/EN switch */
.brand img { display: block; height: 24px; width: auto; }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; color: var(--on-dark); font-weight: 500; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius); }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.nav-group[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-group > summary:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-group > summary.is-current { color: #fff; box-shadow: inset 0 -2px 0 var(--lime); border-radius: 0; }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--navy-2); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 6px; display: flex; flex-direction: column; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); z-index: 50; }
.nav-menu-end { left: auto; right: 0; }
.nav-menu a, .nav-menu .nav-form button { width: 100%; justify-content: flex-start; text-align: left; }
.nav-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--lime); border-radius: 0; }
.nav-menu .nav-form { display: block; border-top: 1px solid rgba(255,255,255,.12); margin-top: 4px; padding-top: 4px; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; font-weight: 700; font-size: .95rem; color: var(--on-dark-muted); }
.lang-switch [aria-current] { color: #fff; padding: 10px 4px; }
.lang-switch a { padding: 10px 4px !important; min-height: 44px; color: var(--on-dark-muted) !important; text-decoration: underline; text-underline-offset: 4px; }
.lang-switch a:hover { color: #fff !important; background: none !important; }
@media (max-width: 760px) {
  .nav-group > summary { font-size: 1.2rem; min-height: 52px; width: 100%; justify-content: space-between; }
  .nav-menu { position: static; background: transparent; border: 0; box-shadow: none; padding: 0 0 6px 16px; }
  .lang-switch { margin: 12px 0 0; font-size: 1.1rem; }
}
