/* Vibe Coding CEDIA 2026 — elevated 2026 visual system.
   Drop-in for css/style.css. Tokens and selectors match the audited wizard + hub.
   JS contracts: #reg-form #form-host #success-overlay .overlay .box .ov-close #ref-id
   .hero .facts .lang [data-lang] [data-es]/[data-en] body[data-page] .card .btn .fstep .q */
:root {
  --berry: #6D2E46;
  --plum: #7E3E56;
  --dusk: #A26769;
  --cream: #ECE2D0;
  --tint: #F6F0F2;
  --ink: #2B2B2B;
  --muted: #77646B;
  --gold: #FFC629;
  --linec: #E3D5DB;
  --white: #fff;
  --dusk-text: #8E5058;
  --field-border: #BA9AA9;
  --berry-deep: #140910;
  --font-display: "Fraunces", Cambria, Georgia, serif;
  --font: "Inter", system-ui, sans-serif;
  --shadow-1: 0 1px 2px rgba(45, 20, 32, .06), 0 8px 24px rgba(45, 20, 32, .06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--tint);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--berry); }
::selection { background: var(--gold); color: var(--berry); }
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 80;
  background: var(--gold); color: var(--berry);
  padding: .55rem .9rem; font-weight: 700; text-decoration: none;
}
.skip:focus { top: .7rem; }

/* ---- language ---- */
.lang {
  position: fixed; top: 1rem; right: 1rem; z-index: 80;
  pointer-events: auto;
  display: flex; border: 1px solid rgba(255, 198, 41, .55);
  background: rgba(20, 9, 16, .55);
  backdrop-filter: blur(8px);
}
.lang button {
  background: transparent; color: var(--cream); border: 0;
  padding: .38rem .7rem; cursor: pointer;
  font: 700 .72rem/1 var(--font); letter-spacing: .14em;
}
.lang button.on {
  background: var(--gold); color: var(--berry); border-color: var(--gold);
}

/* ---- hero ---- */
.hero {
  background:
    radial-gradient(ellipse 80% 55% at 92% -10%, rgba(255, 198, 41, .2), transparent 58%),
    radial-gradient(ellipse 50% 45% at 0% 110%, rgba(162, 103, 105, .4), transparent 55%),
    var(--berry);
  color: #fff;
  padding: 2.2rem 1.2rem 2.6rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
  position: relative; z-index: 1;
}
.hero-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.hero-brand img, .mono-a { height: 52px; width: 52px; }
.mono-a {
  display: grid; place-items: center;
  background: var(--gold); color: var(--berry);
  font-family: var(--font-display); font-weight: 600; font-size: 1.7rem;
}
.hero-brand .wm { font-size: 1.35rem; font-family: var(--font-display); font-optical-sizing: auto; }
.wm b { font-weight: 700; }
.wm .yr {
  display: block; font-size: .62rem; letter-spacing: .35em;
  color: var(--gold); font-weight: 700; font-family: var(--font);
}
.hero h1 {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.12;
  letter-spacing: -.02em;
}
.hero h1 .g { color: var(--gold); }
.hero .sub { font-style: italic; color: #EAD9E1; margin: .5rem 0 1rem; max-width: 38rem; }
.hero .facts { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }
.fact {
  background: none; border: 0; border-radius: 0;
  border-left: 2px solid rgba(255, 198, 41, .5);
  padding: .12rem .7rem .12rem .55rem;
  font-size: .82rem; letter-spacing: .02em;
  color: var(--cream); cursor: default; pointer-events: none;
}
.fact b { color: var(--gold); font-weight: 600; }
.gold-rule { width: 4.5rem; height: 1px; background: var(--gold); border: 0; margin: .95rem 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.2rem; }
.btn-hero {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--berry); text-decoration: none;
  font: 700 .92rem/1 var(--font); letter-spacing: .04em;
  padding: .9rem 1.25rem; border: 1px solid var(--gold);
}
.btn-hero:hover { filter: brightness(1.06); color: var(--berry); }
body[data-page="landing"] a.btn-hero:not(.ghost) { color: #140910; background: var(--gold); }
body[data-page="landing"] a.btn-hero.ghost { color: var(--gold); background: transparent; }
.btn-hero.ghost { background: transparent; color: var(--gold); }
.btn-hero.ghost:hover { background: rgba(255, 198, 41, .12); color: var(--cream); filter: none; }
#countdown-chip { background: none; color: var(--cream); border-color: var(--gold); }
#countdown-chip b { color: var(--gold); }

/* landing: cinematic atelier */
body[data-page="landing"] { background: var(--berry-deep); color: var(--cream); }
body[data-page="landing"] .hero {
  min-height: 0;
  display: block;
  padding: 4.8rem 1.2rem 2.4rem;
}
@media (min-height: 860px) {
  body[data-page="landing"] .hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
  }
}
body[data-page="landing"] .hero h1 {
  font-size: clamp(2.05rem, 5.4vw, 3.75rem);
  max-width: 16ch; font-weight: 500;
}

body[data-page="landing"] a { color: var(--gold); }
body[data-page="landing"] .btn-hero:not(.ghost) { color: #140910; }
body[data-page="landing"] .btn-hero.ghost { color: var(--gold); }
body[data-page="landing"] .btn-hero.ghost:hover { color: var(--cream); }
body[data-page="landing"] .wa-fab { color: var(--berry); }
body[data-page="landing"] .abtn { color: var(--berry); }
body[data-page="landing"] .abtn.primary { color: #fff; }
body[data-page="landing"] .card a:not(.abtn) { color: var(--berry); }
body[data-page="landing"] .wrap { color: var(--cream); }

.kicker {
  color: var(--gold); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 700; margin: 0 0 1.1rem;
}

/* ---- layout ---- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.6rem 1.2rem; }
.card {
  background: #fff; border: 1px solid var(--linec);
  border-radius: 1rem; padding: 1.6rem; margin-bottom: 1.4rem;
  box-shadow: var(--shadow-1);
}
h2.sec, .fstep-title, .overlay .box h3, .next-steps h2, .story h2 {
  font-family: var(--font-display); font-optical-sizing: auto; font-weight: 600;
}
h2.sec { color: var(--berry); font-size: 1.45rem; margin-bottom: .2rem; }
.sec-es, .q .es, .tile .es, .fstep-desc { color: var(--dusk-text); font-style: italic; }
.sec-es { margin-bottom: 1rem; }

body[data-page="landing"] .atelier {
  display: grid; gap: 2.4rem; padding-bottom: 5rem;
}
body[data-page="landing"] .card {
  background: var(--cream); border: 1px solid rgba(255, 198, 41, .45);
  border-radius: 1.1rem; color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
  position: relative;
}
body[data-page="landing"] .card::before {
  content: ""; position: absolute; left: 0; top: 1.3rem; bottom: 1.3rem;
  width: 2px; background: var(--gold);
}
.stamp {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dusk); font-weight: 700; margin: 0 0 .85rem;
}
.story section { margin: 0 0 2.2rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 198, 41, .28); }
.story h2 { color: var(--gold); font-size: clamp(1.45rem, 3vw, 2rem); margin: 0 0 .7rem; }
.story p, .story li { color: #EAD9E1; }
.who, .cal { list-style: none; }
.who li { margin: 0 0 .7rem; padding: 0 0 .7rem; border-bottom: 1px solid rgba(255, 198, 41, .16); }
.who strong { display: block; color: var(--cream); font-weight: 600; font-size: .92rem; }
.cal li { display: grid; grid-template-columns: 7rem 1fr; gap: .8rem; margin: 0 0 .8rem; }
.cal time { color: var(--gold); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; padding-top: .15rem; }

/* ---- form / wizard (selectors owned by app.js) ---- */
.q { border-top: 1px solid var(--linec); padding: 1.05rem 0; }
.q:first-of-type { border-top: 0; }
.q label.main { font-weight: 600; display: block; }
.q .es { font-size: .9rem; display: block; margin-top: .1rem; }
.q .purpose { font-size: .8rem; color: var(--muted); font-style: italic; margin-top: .4rem; }
.q input[type=text], .q input[type=email], .q textarea, .q select {
  width: 100%; margin-top: .55rem; padding: .6rem .7rem;
  border: 1.5px solid var(--field-border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; background: var(--tint); color: var(--ink);
}
.q textarea { min-height: 5.2rem; }
.q input:focus, .q textarea:focus, .q select:focus { outline: 2px solid var(--dusk); background: #fff; }
.q input::placeholder, .q textarea::placeholder { color: #B7A8AE; opacity: 1; font-style: italic; }
.opt {
  display: flex; gap: .55rem; align-items: center; cursor: pointer;
  border: 1.5px solid var(--linec); border-radius: 12px;
  padding: .55rem .7rem; margin: .35rem 0; min-height: 44px;
  transition: background .15s, border-color .15s;
}
.opt:hover { background: var(--tint); }
.opt:has(input:checked) { border-color: var(--berry); background: #fff; }
.opt input {
  margin-top: 0; accent-color: var(--berry);
  width: 1.05rem; height: 1.05rem; flex: none;
}
.opt input:disabled + span { opacity: .4; }
.grp {
  margin: .7rem 0 .15rem; font-weight: 700; color: var(--berry); font-size: .85rem;
  letter-spacing: .02em; border-left: 4px solid var(--gold); padding-left: .55rem;
}
.err { color: #B3261E; font-size: .85rem; margin-top: .35rem; display: none; }
.q.bad .err { display: block; }
.q.bad { background: #FDF3F2; padding-left: .7rem; padding-right: .7rem; }
.q.bad input, .q.bad textarea { border: 2px solid #B3261E; background: #fff; }
.q .q-err::before { content: "\26A0  "; }
fieldset.opts { border: 0; padding: 0; margin: 0; }
fieldset.opts legend { font-weight: 600; padding: 0; }

.btn {
  background: var(--berry); color: #fff; border: 0;
  padding: .9rem 2.2rem; font-size: 1.05rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--plum); }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--berry); border: 2px solid var(--berry); }
.btn.ghost:hover { background: var(--tint); }
.note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }

.steps { margin-bottom: 1.2rem; position: sticky; top: 0; z-index: 4; background: var(--cream); padding: .45rem 0 .7rem; }
body[data-page="hub"] .steps, .card:not(#registro) .steps { background: #fff; }
.steps-label { font-weight: 700; color: var(--berry); margin-bottom: .4rem; font-size: .95rem; }
.steps-bar { height: 3px; background: var(--linec); overflow: hidden; }
.steps-fill { height: 100%; background: var(--gold); width: 25%; transition: width .3s; }
.fstep { display: none; }
.fstep.on { display: block; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fstep-title { color: var(--berry); font-size: 1.25rem; }
.fstep-desc { font-size: .9rem; margin-bottom: .6rem; }
.nav-row { display: flex; gap: .8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.hint {
  font-size: .85rem; color: #5B4A52; background: #fff;
  padding: .35rem .6rem; margin-top: .45rem; display: inline-block;
  border-left: 2px solid var(--gold);
}
.limit-note {
  display: block; font-size: .85rem; font-weight: 600; color: var(--berry);
  background: #fff; border-left: 4px solid var(--gold);
  padding: .4rem .6rem; margin-top: .4rem;
}
.limit-note.at-limit {
  background: #FDF3F2;
  border-left-color: #B3261E;
}
.sec-err { display: none; font-weight: 600; background: #FDF3F2; padding: .5rem .7rem; margin-top: .8rem; }
.hp { display: none; }

.dry-banner {
  background: #FFF3CD; border: 1.5px solid #E0A800; color: #6B5200;
  font-weight: 700; padding: .7rem 1rem; margin-bottom: 1rem;
}
.reg-banner {
  display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff; border: 1.5px solid var(--dusk);
  padding: .7rem 1rem; margin-bottom: 1.1rem; font-weight: 700; color: var(--berry);
}
.draft-chip {
  background: #fff; border-left: 4px solid var(--gold);
  padding: .5rem .8rem; margin-bottom: .9rem; font-weight: 600; color: var(--berry);
}
.cert-preview {
  display: none;
  background: #fff; border: 1.5px dashed var(--dusk);
  padding: .55rem .8rem; margin-top: .6rem; color: var(--berry);
}
.soft-warn {
  background: #FFF8E6; border-left: 4px solid var(--gold);
  padding: .45rem .7rem; margin-top: .45rem; font-size: .85rem; color: #6B5200;
}
.sel-counter {
  position: sticky; top: 3.2rem; z-index: 3; display: inline-block;
  background: var(--berry); color: #fff; font-weight: 700; font-size: .85rem;
  border-radius: 99px; padding: .3rem .9rem; margin: .5rem 0;
}
.cat-group { border: 1.5px solid var(--linec); margin: .5rem 0; background: #fff; }
.cat-group summary {
  cursor: pointer; padding: .65rem .8rem; font-weight: 700; color: var(--berry);
  border-left: 4px solid var(--gold); list-style-position: inside;
}
.cat-group[open] summary { border-bottom: 1px solid var(--linec); }
.cat-group .cat-opts { padding: .4rem .8rem .6rem; }
.cat-group .cat-n { color: var(--dusk); }

/* ---- hub tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.1rem; }
.tile {
  background: #fff; border: 1px solid var(--linec); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-1);
  transition: transform .18s, box-shadow .18s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(45, 20, 32, .08), 0 14px 34px rgba(45, 20, 32, .1); }
.tile .head {
  background: var(--berry); color: #fff; padding: .8rem 1rem; font-weight: 700;
  display: flex; gap: .6rem; align-items: center;
}
.tile .head .n {
  background: var(--gold); color: var(--berry); border-radius: 50%;
  width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center;
  justify-content: center; font-size: .9rem; flex: none;
}
.tile .body { padding: 1rem; flex: 1; }
.tile .actions { padding: 0 1rem 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.abtn {
  display: inline-block; background: var(--tint); border: 1.5px solid var(--berry);
  color: var(--berry); padding: .45rem .9rem; font-weight: 600;
  text-decoration: none; font-size: .9rem;
}
.abtn.primary { background: var(--berry); color: #fff; }
.abtn:hover { background: var(--cream); color: var(--berry); }
.abtn.primary:hover { background: var(--plum); color: #fff; }
video, audio { width: 100%; border-radius: .2rem; margin-top: .6rem; }
.soon {
  background: var(--cream); border: 1.5px dashed var(--dusk);
  padding: 1.1rem; text-align: center; color: var(--berry); font-weight: 600; margin-top: .6rem;
}
.sched { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .85rem; }
.sched th { background: var(--berry); color: #fff; padding: .4rem .5rem; text-align: left; }
.sched td { border: 1px solid var(--linec); padding: .4rem .5rem; }
.sched tr:nth-child(even) td { background: var(--tint); }
.nudge {
  display: none; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--cream); border: 1.5px solid var(--dusk);
  padding: .8rem 1.1rem; margin-bottom: 1.1rem; font-weight: 700; color: var(--berry);
}
.next-steps { background: var(--berry); color: #fff; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.next-steps h2 { color: var(--gold); font-size: 1.25rem; margin-bottom: .5rem; }
.next-steps ol { margin-left: 1.2rem; display: grid; gap: .35rem; }
.next-steps b { color: var(--gold); }
.tile.required { border: 2px solid var(--gold); }
.badge {
  margin-left: auto; background: var(--gold); color: var(--berry); font-size: .7rem;
  font-weight: 800; padding: .15rem .5rem; letter-spacing: .05em;
}

/* ---- overlay ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 9, 16, .82);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 1rem;
}
.overlay.on { display: flex; }
.overlay .box {
  background: var(--cream); color: var(--ink); max-width: 34rem;
  padding: 2rem 1.6rem 1.6rem; text-align: left; position: relative;
  border: 1px solid var(--gold);
}
.overlay .box h3 { color: var(--berry); margin-bottom: .6rem; font-size: 1.7rem; }
.overlay .box > img { height: 48px; margin-bottom: .8rem; }
.ov-close {
  position: absolute; top: .6rem; right: .7rem; background: none; border: 0;
  font-size: 1.3rem; color: var(--muted); cursor: pointer; padding: .3rem .5rem;
}
.ov-close:hover { color: var(--berry); }
.ref-id {
  background: #fff; padding: .5rem .8rem; margin-top: .8rem;
  color: var(--berry); font-size: 1.05rem; font-family: var(--font-display); letter-spacing: .04em;
}
.ref-id > span, .ref-id > small { display: block; }
.ref-id .recovery-line { margin-top: .35rem; }
.ref-id small { margin-top: .45rem; color: var(--muted); font: 600 .78rem/1.4 var(--font); letter-spacing: 0; }
.recovery-panel {
  flex: 1 0 100%; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) auto;
  gap: .65rem; align-items: end; padding-top: .8rem; border-top: 1px solid rgba(109,46,70,.2);
}
.recovery-panel[hidden] { display: none; }
.recovery-panel > strong, .recovery-status { grid-column: 1 / -1; }
.recovery-panel label { display: grid; gap: .25rem; font-size: .78rem; }
.recovery-panel input {
  width: 100%; min-height: 42px; border: 1.5px solid var(--field-border); border-radius: 8px;
  padding: .55rem .65rem; background: #fff; color: var(--ink); font: 600 .9rem var(--font);
}
.recovery-status { margin: 0; min-height: 1.2em; color: var(--berry); font-size: .8rem; }
.ok-path { list-style: none; margin: 1rem 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.ok-path li { display: grid; grid-template-columns: .55rem 1fr; gap: .7rem; align-items: start; color: var(--ink); }
.ok-path i { width: .55rem; height: .55rem; background: var(--gold); border-radius: 50%; margin-top: .4rem; display: block; }
.ok-actions { margin-top: 1rem; display: flex; gap: .6rem; justify-content: flex-start; flex-wrap: wrap; }

/* ---- chrome extras ---- */
.wa-fab {
  position: fixed; z-index: 28; right: 1rem; bottom: 1rem; left: auto;
  display: flex; align-items: center; gap: .45rem;
  background: var(--cream); color: var(--berry); text-decoration: none;
  border: 1px solid var(--berry); padding: .55rem .75rem;
  font-size: .78rem; font-weight: 700;
}
.wa-fab svg { width: 1.05rem; height: 1.05rem; }
.criteria-link { display: inline-flex; margin-top: .4rem; font-weight: 600; }

/* ---- footer ---- */
footer {
  background: var(--berry); color: #EAD9E1;
  padding: 1.6rem 1.2rem 5.2rem; margin-top: 2rem; font-size: .85rem;
  position: relative; z-index: 3;
}
footer .inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
footer a { color: var(--gold); }

@media (min-width: 960px) {
  .wrap { padding-inline: 2rem; }
  body[data-page="landing"] .atelier {
    grid-template-columns: minmax(0,1fr) minmax(32rem, 38rem); gap: 3.2rem; align-items: start;
  }
  body[data-page="landing"] .card#registro { position: sticky; top: 1.1rem; }
  body[data-page="landing"] .hero { padding-inline: 2rem; }
  .hero-inner { width: min(1120px, 100%); }
}
@media (max-width: 640px) {
  .hero-inner { gap: 1rem; }
  .card { padding: 1.1rem; }
  .lang { top: .6rem; right: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .lang, .skip, .hero, .story, .wa-fab, .ov-close, footer, .nav-row, .grain { display: none !important; }
  body, body[data-page="landing"] { background: #fff; color: #000; }
  .card, .overlay .box { box-shadow: none; background: #fff; color: #000; position: static; }
  .overlay { position: static; display: block; background: #fff; }
  .atelier { display: block; }
}

.reg-banner-actions { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }
#rb-reset, #draft-reset { cursor:pointer; font: inherit; }
.draft-chip { display:flex; gap:.6rem; align-items:center; justify-content:space-between; flex-wrap:wrap; }


/* ---- modern tabs / chips (round the sharp rectangles) ---- */
:root { --r: 12px; --r-pill: 999px; }
.lang { border-radius: var(--r-pill); overflow: hidden; }
.lang button { border-radius: var(--r-pill); }
.btn-hero, .btn, .abtn, .wa-fab, .skip, .sel-counter, .badge {
  border-radius: var(--r-pill);
}
.btn-hero {
  box-shadow: 0 8px 22px rgba(20, 9, 16, .35);
  min-height: 2.7rem;
}
.dry-banner, .reg-banner, .draft-chip, .hint, .soft-warn, .cert-preview, .nudge {
  border-radius: var(--r);
}
.btn, .abtn, .btn-hero { padding-inline: 1.15rem; }
.opt {
  border-radius: var(--r);
  box-shadow: 0 1px 0 rgba(45,20,32,.04);
}
.opt:has(input:checked) {
  box-shadow: 0 0 0 1px var(--berry);
}
.q input[type=text], .q input[type=email], .q textarea, .q select {
  border-radius: 10px;
}
.card, body[data-page="landing"] .card { border-radius: 1.1rem; }
.overlay .box { border-radius: 1.15rem; overflow: hidden; }
.cat-group, .cat-group summary { border-radius: var(--r); }
.tile { border-radius: 1rem; }
.mono-a { border-radius: 12px; }
.ok-actions .abtn { border-radius: var(--r-pill); }

/* ---- hub atelier (match landing) ---- */
body[data-page="hub"] { background: var(--berry-deep); color: var(--cream); }
body[data-page="hub"] .hero {
  min-height: 0;
  padding: 4.4rem 1.2rem 1.9rem;
}
body[data-page="hub"] .hero h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  max-width: 18ch;
  font-weight: 500;
}
body[data-page="hub"] a { color: var(--gold); }
body[data-page="hub"] .wrap { color: var(--cream); }
body[data-page="hub"] .tile { color: var(--ink); }
body[data-page="hub"] .tile .head { color: #fff; }
body[data-page="hub"] .tile .body,
body[data-page="hub"] .tile .body p,
body[data-page="hub"] .sched td { color: var(--ink); }
body[data-page="hub"] .nudge {
  background: var(--cream); color: var(--berry); border-radius: 1.1rem;
  border: 1px solid rgba(255,198,41,.45);
}
body[data-page="hub"] .nudge .abtn.primary { color: #fff; }
.tile {
  border-radius: 1.1rem;
  border: 1px solid rgba(255,198,41,.22);
}
.tile .head { letter-spacing: .01em; }
.soon { border-radius: 12px; }
.next-steps {
  border-radius: 1.1rem;
  border: 1px solid rgba(255,198,41,.35);
}
.sched { border-collapse: separate; border-spacing: 0; overflow: hidden; }
.sched th:first-child { border-radius: 10px 0 0 0; }
.sched th:last-child { border-radius: 0 10px 0 0; }
video, audio { border-radius: 12px; }
body[data-page="hub"] footer { background: transparent; border-top: 1px solid rgba(255,198,41,.2); }
.who-label {
  font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dusk-text); margin: 0 0 .15rem;
}

/* certificate call-to-action at the end of the hub */
.cert-cta {
  display: flex; gap: 1.1rem; align-items: flex-start;
  max-width: 720px; margin: 2rem auto 0;
  background: linear-gradient(135deg, #23121b, var(--berry-deep));
  border: 1px solid rgba(255, 198, 41, .5); border-radius: 1.1rem;
  padding: 1.4rem 1.5rem; box-shadow: 0 14px 34px rgba(45, 20, 32, .18);
}
.cert-cta-ic { width: 2.6rem; height: 2.6rem; flex: none; color: var(--gold); }
.cert-cta-body h3 { font-family: var(--font-display); font-weight: 500; color: var(--cream); font-size: 1.4rem; margin-bottom: .35rem; }
.cert-cta-body p { color: #D9C6CE; font-size: .9rem; line-height: 1.55; margin: 0 0 .9rem; }
.cert-cta-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.cert-lock-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  color: rgba(246, 237, 217, .6); font-size: .76rem;
  border: 1px solid rgba(255, 198, 41, .3); border-radius: 999px; padding: .25rem .7rem;
}
@media (max-width: 560px) { .cert-cta { flex-direction: column; gap: .7rem; } }
.who-mini { list-style: none; margin-top: .55rem; }
.who-mini li { margin: 0 0 .45rem; padding: 0 0 .45rem; border-bottom: 1px solid var(--linec); }
.who-mini strong { display:block; color: var(--berry); font-size: .9rem; }
.who-mini span { color: var(--muted); font-size: .82rem; }

/* ---- pre-module / goal / locked modules (Grok-handoff continuation) ---- */
.hub-sec {
  font-family: var(--font-display); font-weight: 500; color: var(--gold);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 1.9rem 0 .9rem;
}
.hub-sec small {
  display: block; font-family: var(--font); font-weight: 400;
  font-size: .85rem; color: #EAD9E1; margin-top: .25rem; letter-spacing: 0;
}
.goal-banner {
  display: none; gap: .8rem; align-items: center; flex-wrap: wrap;
  background: var(--gold); color: var(--berry);
  border-radius: 1.1rem; padding: .85rem 1.15rem; margin-bottom: 1.1rem;
  font-weight: 600;
}
.goal-banner .goal-k {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 800; background: var(--berry); color: var(--gold);
  border-radius: var(--r-pill); padding: .3rem .7rem;
}
.goal-banner .abtn { margin-left: auto; }
.tile.goal { outline: 2.5px solid var(--gold); outline-offset: 3px; position: relative; }
.tile.goal .head::after {
  content: "SU PRÓXIMA META";
  margin-left: auto; background: var(--gold); color: var(--berry);
  font-size: .62rem; font-weight: 800; letter-spacing: .08em;
  border-radius: var(--r-pill); padding: .18rem .55rem;
}
.tile.goal.required .badge { display: none; }

/* guest state: everything is decision material and fully watchable/readable.
   Only the actually-gated links (agreement .docx + mailto, flagged by app.js
   with aria-disabled) are visually dimmed — videos/audio/PDFs stay clear. */
#pre-tiles a[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.nudge.pulse { box-shadow: 0 0 0 4px rgba(255, 198, 41, .55); transition: box-shadow .3s; }

/* locked syllabus modules */
/* ---- next-steps as the single goal tracker (replaces .goal-banner) ---- */
.goal-banner { display: none !important; }
.next-steps ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.next-steps li {
  display: grid; grid-template-columns: 1.65rem 1fr auto; gap: .75rem;
  align-items: center; padding: .55rem .7rem; border-radius: 12px;
  color: #EAD9E1;
}
.next-steps .ns-n {
  display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
  border-radius: 50%; border: 1px solid rgba(255, 198, 41, .45);
  font-size: .78rem; font-weight: 700; color: var(--gold);
}
.next-steps .ns-go { display: none; }
.next-steps li.current {
  background: var(--gold); color: var(--berry); font-weight: 700;
}
.next-steps li.current .ns-n { background: var(--berry); color: var(--gold); border-color: var(--berry); }
.next-steps li.current .ns-t::after {
  content: " · SU PRÓXIMA META";
  font-size: .62rem; font-weight: 800; letter-spacing: .1em; opacity: .75;
}
html[lang="en"] .next-steps li.current .ns-t::after { content: " · YOUR NEXT GOAL"; }
.next-steps li.current .ns-go {
  display: inline-block; background: var(--berry); color: var(--gold);
  border-radius: var(--r-pill); padding: .35rem .85rem;
  font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.next-steps li.current .ns-go:hover { background: var(--plum); color: var(--gold); }
.next-steps li.done-or-later { opacity: .58; }
@media (max-width: 560px) {
  .next-steps li { grid-template-columns: 1.65rem 1fr; }
  .next-steps li.current .ns-go { grid-column: 2; justify-self: start; margin-top: .35rem; }
}

/* ---- progressive pre-module checklist ---- */
.pre-prog { display: none; margin: 0 0 1.1rem; }
.pp-bar { height: 3px; background: rgba(255, 198, 41, .22); overflow: hidden; }
.pp-fill { height: 100%; width: 0; background: var(--gold); transition: width .35s ease; }
.pp-meta {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-top: .5rem; font-size: .82rem; color: #EAD9E1;
}
.pp-count { font-weight: 700; color: var(--gold); }
.sync-state { margin-left: auto; font-weight: 700; }
.sync-state[data-state="saved"] { color: #BFE8C7; }
.sync-state[data-state="saving"] { color: var(--gold); }
.sync-state[data-state="offline"], .sync-state[data-state="error"] { color: #FFD7A8; }
.pp-reset {
  display: none; background: none; border: 1px solid rgba(255, 198, 41, .4);
  color: #EAD9E1; border-radius: var(--r-pill); padding: .2rem .7rem;
  font: 600 .74rem var(--font); cursor: pointer;
}
.pp-reset:hover { border-color: var(--gold); color: var(--gold); }
.pp-done {
  display: none; margin-top: .7rem; background: var(--gold); color: var(--berry);
  border-radius: 12px; padding: .6rem .9rem; font-weight: 700; font-size: .9rem;
}

/* per-tile check control in the head */
.tile .head .chk {
  margin-left: auto; flex: none; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5);
  background: transparent; color: transparent; cursor: pointer;
  display: grid; place-items: center; padding: 0; transition: all .16s;
}
.tile .head .chk svg { width: .9rem; height: .9rem; }
.tile .head .chk:hover { border-color: var(--gold); }
.tile .head .chk.on { background: var(--gold); border-color: var(--gold); color: var(--berry); }
.tile.required .head .chk { order: 3; }
.tile .head .badge + .chk { margin-left: .5rem; }

.step-foot { padding-top: .7rem; }
.mark {
  background: none; border: 1px solid var(--linec); color: var(--muted);
  border-radius: var(--r-pill); padding: .3rem .8rem;
  font: 600 .78rem var(--font); cursor: pointer;
}
.mark:hover { border-color: var(--berry); color: var(--berry); }
.tile.step-done .mark { border-color: var(--berry); color: var(--berry); background: var(--cream); }

/* state: completed / next */
.tile.step-done { opacity: .82; }
.tile.step-done .head { background: linear-gradient(90deg, var(--plum), var(--berry)); }
.tile.step-next { outline: 2px solid var(--gold); outline-offset: 3px; }
.tile.step-next .head::before {
  content: "SIGUIENTE"; order: 2; margin-left: auto;
  background: var(--gold); color: var(--berry);
  font-size: .6rem; font-weight: 800; letter-spacing: .09em;
  border-radius: var(--r-pill); padding: .16rem .5rem;
}
html[lang="en"] .tile.step-next .head::before { content: "NEXT"; }
.tile.step-next.goal .head::after { display: none; }

.advice {
  margin-top: .8rem; background: #FFF8E6; border-left: 4px solid var(--gold);
  border-radius: 10px; padding: .5rem .7rem; font-size: .82rem; color: #6B5200;
}

/* ---- sequential locking: frozen future steps ---- */
.tile.step-locked { opacity: .55; filter: saturate(.55); border-style: dashed; }
.tile.step-locked .head { background: #4A2233; }
.tile.step-locked .head .n { background: rgba(255, 198, 41, .35); color: var(--berry); }
.tile.step-locked .body, .tile.step-locked .actions { pointer-events: none; user-select: none; }
.tile.step-locked .abtn, .tile.step-locked .mark { opacity: .45; }
.tile.step-locked video, .tile.step-locked audio { opacity: .45; }
.tile.step-locked .chk { border-color: rgba(255,255,255,.28); cursor: not-allowed; }
.tile.step-locked .head::before { display: none; }

.lock-hint {
  display: none; align-items: center; gap: .45rem; margin-top: .7rem;
  background: var(--tint); border: 1px dashed var(--dusk); border-radius: var(--r-pill);
  padding: .3rem .75rem; font-size: .78rem; font-weight: 600; color: var(--berry);
}
.lock-hint svg { width: .9rem; height: .9rem; flex: none; }

/* active + completed emphasis */
.tile.step-next { opacity: 1; filter: none; }
.tile.step-done .head .chk.on { box-shadow: 0 0 0 2px rgba(255,198,41,.35); }
.tile.step-done .head::after {
  content: "COMPLETADO"; order: 4; margin-left: .4rem;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: .58rem; font-weight: 800; letter-spacing: .09em;
  border-radius: var(--r-pill); padding: .16rem .5rem;
}
html[lang="en"] .tile.step-done .head::after { content: "COMPLETED"; }
.tile.step-done.goal .head::after { content: "COMPLETADO"; }
.tile.flash { animation: flashRing .9s ease; }
@keyframes flashRing {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 6px rgba(255, 198, 41, .55); }
}

/* toast */
.vc-toast {
  position: fixed; left: 50%; bottom: 5.2rem; transform: translate(-50%, 1rem);
  background: var(--gold); color: var(--berry); font-weight: 700; font-size: .88rem;
  border-radius: var(--r-pill); padding: .65rem 1.15rem; z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 12px 30px rgba(0,0,0,.35); max-width: min(92vw, 30rem); text-align: center;
}
.vc-toast.on { opacity: 1; transform: translate(-50%, 0); }

.tile.step-locked { cursor: pointer; }
.tile.step-locked .head { cursor: pointer; }

/* ---- week-by-week course structure ---- */
.week-head {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  margin: 1.9rem 0 .85rem; padding-bottom: .55rem;
  border-bottom: 1px solid rgba(255, 198, 41, .28);
}
.week-head .wk {
  background: var(--gold); color: var(--berry); font-weight: 800;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  border-radius: var(--r-pill); padding: .25rem .8rem; flex: none;
}
.week-head .wk-t {
  font-family: var(--font-display); font-weight: 500; color: var(--cream);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
}
.week-head small { width: 100%; color: #C9AFBB; font-size: .8rem; }
.week-tiles { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: .85rem; }
.week-tiles .tile { border-radius: 14px; }
.week-tiles .tile .head { padding: .6rem .75rem; font-size: .88rem; gap: .5rem; }
.week-tiles .tile .head .n {
  background: rgba(255, 198, 41, .9); color: var(--berry); border-radius: 7px;
  width: auto; min-width: 2.6rem; padding: 0 .4rem; font-size: .7rem; font-weight: 800;
}
.week-tiles .tile .body { padding: .75rem; font-size: .85rem; }
.week-tiles .dur {
  margin-left: auto; flex: none; background: rgba(255,255,255,.16); color: #fff;
  border-radius: var(--r-pill); padding: .1rem .5rem; font-size: .68rem; font-weight: 700;
}
.tile.live .head { background: linear-gradient(90deg, #8E2F4A, var(--plum)); }
.tile.live .head .n { background: #fff; color: #8E2F4A; letter-spacing: .06em; }
.tile.deliv { border: 1.5px solid var(--gold); }
.tile.deliv .head { background: var(--gold); color: var(--berry); }
.tile.deliv .head .n { background: var(--berry); color: var(--gold); }
.week-tiles .tile.locked { opacity: .72; filter: none; border-style: solid; }
.week-tiles .tile.locked .head { background: #4A2233; }
.tile.live.locked .head { background: #5A2438; }
.tile.deliv.locked .head { background: #7A5A12; color: var(--cream); }
.tile.deliv.locked .head .n { background: rgba(255,198,41,.35); color: var(--berry); }

/* ---- phase tags: say why a tile behaves as it does ---- */
.phase-tag {
  display: none; margin-left: auto; flex: none;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border-radius: var(--r-pill); padding: .16rem .55rem;
}
.tile.required .phase-tag { background: var(--berry); color: var(--gold); }
.tile .head .chk { margin-left: .45rem; }

/* ---- phase bands: the prerequisite structure made visible ---- */
.band {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  margin: .9rem 0 .1rem; padding: .55rem .9rem; border-radius: 12px;
  background: rgba(255, 198, 41, .07); border-left: 3px solid var(--gold);
}
.band:first-child { margin-top: 0; }
.band-t {
  font-family: var(--font-display); font-weight: 600; color: var(--gold); font-size: 1.02rem;
}
.band-s { color: #C9AFBB; font-size: .82rem; }
.band-state {
  margin-left: auto; font-size: .6rem; font-weight: 800; letter-spacing: .1em;
  border-radius: var(--r-pill); padding: .18rem .6rem;
}
.band-state.is-open { background: var(--gold); color: var(--berry); }
.band-state.is-done { background: rgba(120, 220, 150, .22); color: #CFF3DC; }
.band-state.is-wait { background: rgba(255, 255, 255, .12); color: #C9AFBB; }
.band.is-wait { opacity: .72; border-left-color: rgba(255, 198, 41, .3); }
.band.is-done { border-left-color: rgba(120, 220, 150, .5); }

/* help desk: outside the numbered path, always open */
.help-zone { margin-top: 1.1rem; }
.tile.help-card { border: 1.5px solid rgba(120, 220, 150, .45); }
.tile.help-card .head { background: linear-gradient(90deg, #1F5B3A, #2C7A4F); }
.tile.help-card .head::after {
  content: "SIEMPRE DISPONIBLE"; margin-left: auto;
  background: rgba(255,255,255,.2); color: #fff;
  font-size: .58rem; font-weight: 800; letter-spacing: .08em;
  border-radius: var(--r-pill); padding: .16rem .55rem;
}
html[lang="en"] .tile.help-card .head::after { content: "ALWAYS AVAILABLE"; }
.tile.help-card .step-foot, .tile.help-card .chk, .tile.help-card .lock-hint { display: none !important; }
.next-steps li.is-past .ns-n { background: rgba(120,220,150,.25); color: #CFF3DC; border-color: transparent; }
.next-steps li.is-past .ns-t { text-decoration: line-through; opacity: .75; }


/* ---- audit wave: state + a11y additions ---- */
/* focus ring must survive on cream cards (gold-on-cream fails contrast) */
.card :focus-visible, .tile :focus-visible, .week-head :focus-visible {
  outline-color: var(--berry);
}

/* armed destructive buttons: second tap confirms */
button.armed, .abtn.armed {
  background: #7a1f2b; color: #fff; border-color: #7a1f2b;
}

/* dry-run notice after a test submit */
.dry-banner {
  background: rgba(255, 198, 41, 0.14); border: 1px solid rgba(255, 198, 41, 0.55);
  color: var(--cream, #f6edd9); border-radius: 12px;
  padding: 0.65rem 0.9rem; margin-bottom: 0.9rem; font-size: 0.92rem;
}
.card .dry-banner { color: #4a1420; }

/* week-head unlock chip + started state (real selectors — replaces dead .tile.module) */
.week-head .wh-lock {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(246, 237, 217, 0.55);
  border: 1px solid rgba(255, 198, 41, 0.3); border-radius: 999px;
  padding: 0.15rem 0.6rem; margin-left: 0.5rem; vertical-align: middle;
}
.week-head .wh-lock svg { width: 12px; height: 12px; }
.week-head.started .wh-lock { display: none; }
.week-tiles .tile.locked { opacity: 0.55; }
.week-tiles .tile.locked.started { opacity: 1; filter: none; }
.week-head h3.wk-t { display: inline; font-size: inherit; font-weight: inherit; margin: 0; }

/* course video inside pre-tile 1 */
#pre-tiles .tile video {
  width: 100%; border-radius: 12px; margin-top: 0.6rem;
  background: #000; aspect-ratio: 16 / 9;
}

/* ---- custom caption overlay (renders over file:// where <track> is blocked) ---- */
.vwrap { position: relative; display: block; margin-top: 0.6rem; }
.vwrap video { margin-top: 0; }
.vcap {
  position: absolute; left: 50%; bottom: 3.1rem; transform: translateX(-50%);
  max-width: 94%; width: max-content; z-index: 4; pointer-events: none;
  background: rgba(0, 0, 0, 0.8); color: #fff;
  font: 500 clamp(0.82rem, 2.3vw, 1.05rem) / 1.35 var(--font, system-ui, sans-serif);
  padding: 0.2rem 0.55rem; border-radius: 5px; text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); white-space: normal; display: none;
}
.vcap.on { display: block; }
.vfs {
  position: absolute; top: 0.55rem; right: 0.55rem; z-index: 5;
  width: 2.1rem; height: 2.1rem; padding: 0.4rem; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 7px;
  display: grid; place-items: center; opacity: 0; transition: opacity 0.18s;
}
.vfs svg { width: 100%; height: 100%; }
.vwrap:hover .vfs, .vfs:focus-visible { opacity: 1; }
.vwrap:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; }
.vwrap:fullscreen video { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; object-fit: contain; }
.vwrap:fullscreen .vcap { bottom: 7%; font-size: clamp(1rem, 3vw, 1.9rem); max-width: 88%; }
.vwrap:fullscreen .vfs { opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .vfs { transition: none; } }

/* EN twin for the goal ribbon */
html[lang="en"] .tile.goal .head::after { content: "YOUR NEXT GOAL"; }

/* language-aware media notes */
.media-note {
  font-size: 0.82rem; opacity: 0.75; margin-top: 0.35rem; line-height: 1.4;
}
#pre-tiles .tile audio { width: 100%; margin-top: 0.4rem; }

/* ============================================================
   REDESIGN — Pre-módulo as a centered vertical journey.
   JS contract preserved: #pre-tiles > .tile[.head > .n, .body, .actions]
   + .band[data-band]; media stays inside .body so play-to-mark still fires.
   ============================================================ */
.pre-head, #pre-prog, .help-zone, .keep-note { max-width: 720px; margin-left: auto; margin-right: auto; }

/* keep-your-progress notice — local-first with authenticated online backup */
.keep-note {
  display: flex; gap: .75rem; align-items: flex-start;
  background: rgba(255, 198, 41, .1); border: 1px solid rgba(255, 198, 41, .5);
  border-radius: 14px; padding: .85rem 1rem; margin: 0 auto 1.2rem;
}
.keep-note svg { width: 1.35rem; height: 1.35rem; flex: none; color: var(--gold); margin-top: .1rem; }
.keep-note strong { display: block; color: var(--cream); font-size: .95rem; margin-bottom: .2rem; }
.keep-note p { color: #D9C6CE; font-size: .84rem; line-height: 1.5; margin: 0; }

@media (max-width: 680px) {
  .recovery-panel { grid-template-columns: 1fr; }
  .recovery-panel > strong, .recovery-status { grid-column: 1; }
  .sync-state { width: 100%; margin-left: 0; }
}
.is-guest .keep-note { display: none; }

#pre-tiles {
  display: block;
  max-width: 720px;
  margin: 0 auto 1.4rem;
  position: relative;
  padding-left: 58px;
}
/* the rail */
#pre-tiles::before {
  content: "";
  position: absolute;
  left: 19px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, rgba(255, 198, 41, .9) 0%, rgba(255, 198, 41, .3) 100%);
  border-radius: 2px;
}
/* each step: a card on the rail (override base overflow so the node can ride outside) */
#pre-tiles > .tile {
  overflow: visible;
  margin: 0 0 .9rem;
  border-radius: 14px;
}
#pre-tiles > .tile > .head { border-radius: 14px 14px 0 0; position: relative; overflow: visible; }
#pre-tiles > .tile > :last-child { border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; }
/* the number badge becomes the rail node */
#pre-tiles > .tile > .head > .n {
  position: absolute; left: -58px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1rem; font-weight: 800;
  box-shadow: 0 0 0 5px var(--tint);
  z-index: 2;
}
#pre-tiles > .tile.step-done > .head > .n { background: #2C7A4F; color: #fff; }
#pre-tiles > .tile.step-next > .head > .n {
  box-shadow: 0 0 0 5px var(--tint), 0 0 0 8px rgba(255, 198, 41, .5);
}
#pre-tiles > .tile.step-locked > .head > .n { background: rgba(255, 198, 41, .38); color: var(--berry); }
#pre-tiles > .tile.required > .head > .n { box-shadow: 0 0 0 5px var(--tint), 0 0 0 8px rgba(255, 198, 41, .35); }

/* phase bands become rail section markers */
#pre-tiles > .band {
  position: relative;
  margin: 1.6rem 0 .9rem;
  border-left: none; background: none; padding: 0; align-items: center;
}
#pre-tiles > .band:first-child { margin-top: 0; }
#pre-tiles > .band::before {
  content: "";
  position: absolute; left: -45px; top: 50%;
  width: 14px; height: 14px;
  background: var(--berry-deep); border: 2.5px solid var(--gold);
  box-shadow: 0 0 0 5px var(--tint);
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
}
#pre-tiles > .band.is-done::before { border-color: #2C7A4F; }
#pre-tiles > .band.is-wait::before { border-color: rgba(255, 198, 41, .4); opacity: .6; }

/* on-demand content reveal — no more eager grey players */
.reveal { margin-top: .75rem; border-top: 1px solid var(--linec); }
.reveal > .rv-btn {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem .1rem .2rem; font: 600 .9rem var(--font); color: var(--berry);
  user-select: none;
}
.reveal > .rv-btn::-webkit-details-marker { display: none; }
.rv-btn .rv-ic {
  width: 1.4rem; height: 1.4rem; flex: none; padding: .28rem;
  background: var(--berry); color: #fff; border-radius: 50%;
}
.rv-btn .rv-chev { width: 1rem; height: 1rem; margin-left: auto; color: var(--muted); transition: transform .2s; }
.reveal[open] > .rv-btn .rv-chev { transform: rotate(180deg); }
.reveal[open] > .rv-btn, .rv-btn:hover { color: var(--plum); }
.rv-btn:hover .rv-ic { background: var(--plum); }
.rv-body { padding-top: .3rem; animation: revealIn .24s ease; }
.rv-transcript {
  display: inline-block; margin-top: .35rem; font-size: .82rem; font-weight: 600;
  color: var(--berry); text-decoration: none; border-bottom: 1px solid rgba(109,46,70,.35);
}
.rv-transcript::before { content: "\2637\00a0"; opacity: .6; }
.rv-transcript:hover { color: var(--plum); border-bottom-color: var(--plum); }

/* ============================================================
   MOTION & DEPTH LAYER — premium micro-motion.
   All gated behind no-preference; motion.js only adds .reveal-up when it runs,
   so no-JS / reduced-motion always shows fully-visible, static content.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* hero aurora — a slow-drifting colour mesh behind the content */
  .hero::before {
    content: ""; position: absolute; inset: -25%; z-index: 0; pointer-events: none;
    background:
      radial-gradient(32% 40% at 22% 28%, rgba(255, 198, 41, .20), transparent 60%),
      radial-gradient(30% 34% at 82% 18%, rgba(162, 103, 105, .34), transparent 62%),
      radial-gradient(42% 46% at 62% 92%, rgba(126, 62, 86, .50), transparent 60%);
    filter: blur(10px);
    animation: auroraDrift 28s ease-in-out infinite alternate;
  }
  @keyframes auroraDrift {
    0%   { transform: translate3d(-4%, -2%, 0) scale(1.05) rotate(0deg); }
    50%  { transform: translate3d(3%, 3%, 0)  scale(1.14) rotate(3deg); }
    100% { transform: translate3d(-2%, 4%, 0) scale(1.06) rotate(-2deg); }
  }

  /* hero content rises in on load, staggered */
  .hero-inner > div > * { animation: riseIn .7s cubic-bezier(.2, .7, .2, 1) backwards; }
  .hero-brand { animation-delay: .05s; }
  .hero .kicker { animation-delay: .12s; }
  .hero h1 { animation-delay: .18s; }
  .hero .sub { animation-delay: .26s; }
  .hero .facts, .hero-actions { animation-delay: .34s; }
  @keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

  /* scroll reveal — rise + a touch of 3-D as elements enter the viewport */
  .reveal-up {
    opacity: 0; transform: perspective(1000px) translateY(26px) rotateX(7deg);
    transform-origin: center top;
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
  }
  .reveal-up.in { opacity: 1; transform: none; }

  /* 3-D cursor tilt (motion.js sets --rx / --ry) */
  .tilt {
    transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .week-tiles .tile.tilt:hover { box-shadow: 0 18px 40px rgba(45, 20, 32, .22); }

  /* timeline rail draws itself in; the active node breathes */
  #pre-tiles::before { transform-origin: top; animation: railDraw 1s ease .15s backwards; }
  @keyframes railDraw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  #pre-tiles > .tile.step-next > .head > .n { animation: nodeGlow 2.4s ease-in-out infinite; }
  @keyframes nodeGlow {
    0%, 100% { box-shadow: 0 0 0 5px var(--tint), 0 0 0 8px rgba(255, 198, 41, .5); }
    50%      { box-shadow: 0 0 0 5px var(--tint), 0 0 0 12px rgba(255, 198, 41, .12); }
  }
}
@keyframes revealIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv-body { animation: none; } }

/* tighter rail on phones */
@media (max-width: 560px) {
  .pre-head, #pre-prog, .help-zone { max-width: none; }
  #pre-tiles { max-width: none; padding-left: 42px; }
  #pre-tiles::before { left: 15px; }
  #pre-tiles > .tile > .head > .n { left: -42px; width: 34px; height: 34px; box-shadow: 0 0 0 4px var(--tint); }
  #pre-tiles > .tile.step-next > .head > .n { box-shadow: 0 0 0 4px var(--tint), 0 0 0 7px rgba(255,198,41,.5); }
  #pre-tiles > .band::before { left: -34px; width: 12px; height: 12px; }
}
