/* Guía del Participante AFM LATAM: estética Marketing Cloud Next (tokens y porqués en DESIGN.md).
   Orden: fuentes → tokens → layout → hero (único momento con movimiento) → contenido → componentes → responsive. */

/* ===== Fuentes (vendorizadas: anda sin internet y con file://) ===== */
@font-face { font-family: "AvantGarde SF"; src: url("fonts/avantgarde-demi.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Salesforce Sans"; src: url("fonts/salesforcesans-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Salesforce Sans"; src: url("fonts/salesforcesans-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Salesforce Sans"; src: url("fonts/salesforcesans-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

/* ===== Tokens ===== */
:root {
    --noche: #14163A;
    --indigo: #23265E;
    --aurora: #5B3FC4;
    --peri: #8C90E8;
    --peri-95: #EEEFFC;
    --sol: #F39C35;
    --ok: #2E844A;

    --bg: #F6F6FC;
    --surface: #FFFFFF;
    --ink: #1A1C45;
    --muted: #575A82;
    --line: #DCDDF3;
    --accent: var(--aurora);
    --accent-soft: var(--peri-95);
    --sol-ink: #A55300;
    --sol-soft: #FFF4E6;
    --ok-ink: #226B3A;
    --ok-soft: #EAF6EE;
    --shadow: 0 1px 2px rgba(20, 22, 58, .06), 0 8px 24px rgba(20, 22, 58, .07);

    --display: "AvantGarde SF", "Century Gothic", "Futura", sans-serif;
    --body: "Salesforce Sans", -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sidebar-w: 300px;
    --radius: 14px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}
[data-theme="dark"] {
    --bg: #101231;
    --surface: #1B1E4C;
    --ink: #E8E9FB;
    --muted: #A9ACDD;
    --line: #2F3370;
    --accent: #B1B4F2;
    --accent-soft: #23265E;
    --sol-ink: #FFB866;
    --sol-soft: #2A2448;
    --ok-ink: #7FD49A;
    --ok-soft: #173A33;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
    font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sol); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--sol); color: var(--noche); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 12px; }

/* Barra de progreso: fina, arriba de todo, siempre visible */
.topbar { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 200; background: transparent; }
.topbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--peri), var(--sol)); transition: width .5s var(--ease); }

/* ===== Sidebar: la ruta vertical. Siempre noche, en los dos temas ===== */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 100;
    display: flex; flex-direction: column; background: var(--noche); color: #E8E9FB;
    border-right: 1px solid rgba(140, 144, 232, .18); overflow-y: auto;
}
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 26px 22px 18px; }
.sidebar-brand strong { display: block; font: 600 15px/1.2 var(--display); letter-spacing: .01em; }
.sidebar-brand span { font-size: 12.5px; color: var(--sol); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-progress { padding: 0 22px 18px; font-size: 13px; color: #C3C6F5; }
.meter { height: 6px; border-radius: 6px; background: rgba(140, 144, 232, .2); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--peri), var(--sol)); border-radius: 6px; transition: width .5s var(--ease); }

.sidebar-nav { padding: 6px 14px 18px; flex: 1; }
.nav-group { position: relative; padding-bottom: 4px; }
/* La línea de la ruta une los nodos */
.nav-group:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 30px; bottom: -4px; width: 2px; background: rgba(140, 144, 232, .22); }
.nav-group.is-done::before { background: var(--sol); }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; color: #C3C6F5; text-decoration: none; border-radius: 10px; }
.sidebar-nav a:hover { background: rgba(140, 144, 232, .1); color: #fff; }
.nav-section { padding: 7px 8px; font-size: 14px; font-weight: 600; color: #E8E9FB !important; line-height: 1.3; }
.nav-node {
    flex: none; position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--noche); border: 2px solid rgba(140, 144, 232, .45); font: 600 13px/1 var(--display); color: #E8E9FB;
}
.nav-dot { width: 12px; height: 12px; margin: 0 8px; border-width: 2px; }
.nav-group.is-done .nav-node { background: var(--sol); border-color: var(--sol); color: var(--noche); }
.nav-group.is-partial .nav-node { border-color: var(--sol); }
.nav-step { padding: 5px 8px 5px 46px; font-size: 13.5px; position: relative; }
.nav-step b { font-weight: 700; color: var(--peri); margin-right: 8px; }
.nav-step.done { color: #8E91C4; }
.nav-step.done::after { content: "✓"; margin-left: auto; color: var(--sol); font-weight: 700; }
.sidebar-nav a.active { background: rgba(140, 144, 232, .16); color: #fff; }
.sidebar-nav a.active.nav-step::before { content: ""; position: absolute; left: 34px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--sol); }

.my-data { margin: 0 14px 12px; padding: 14px 16px; border-radius: var(--radius); background: rgba(140, 144, 232, .1); border: 1px solid rgba(140, 144, 232, .2); }
.my-data-title { margin: 0 0 8px; font: 600 13px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--sol); }
.my-data dl { margin: 0; display: grid; gap: 8px; }
.my-data div { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: baseline; font-size: 13px; }
.my-data dt { color: #A9ACDD; }
.my-data dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.my-data dd.empty { color: #8E91C4; }
.my-data dd a { color: var(--peri); }
.my-data dd button { margin-left: 6px; }
.theme-toggle { margin: 0 14px 18px; padding: 9px; border-radius: 10px; border: 1px solid rgba(140, 144, 232, .3); background: transparent; color: #C3C6F5; font: 600 13px var(--body); cursor: pointer; }
.theme-toggle:hover { background: rgba(140, 144, 232, .12); color: #fff; }
.mobile-toggle { display: none; }

/* ===== Main ===== */
.main { margin-left: var(--sidebar-w); min-height: 100dvh; }
.content { max-width: 800px; margin: 0 auto; padding: 8px 40px 120px; }

/* ===== Hero: atardecer de Marketing Cloud Next. Único lugar con movimiento ===== */
.hero {
    position: relative; overflow: hidden; isolation: isolate; color: #fff;
    min-height: min(88dvh, 760px); display: flex; flex-direction: column; justify-content: flex-end;
    background: linear-gradient(180deg, #14163A 0%, #262070 38%, #4A31A8 64%, #8A4FB8 80%, #E0845A 100%);
}
.sky { position: absolute; inset: 0; z-index: -2; }
.aurora { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; mix-blend-mode: screen; }
.aurora.a1 { width: 70%; height: 55%; left: -10%; top: 4%; background: radial-gradient(closest-side, #8C90E8, transparent); animation: drift 22s var(--ease) infinite alternate; }
.aurora.a2 { width: 55%; height: 45%; right: -8%; top: 14%; background: radial-gradient(closest-side, #7B4FE0, transparent); animation: drift 28s var(--ease) infinite alternate-reverse; }
.sun { position: absolute; left: 50%; bottom: 4%; width: 90%; height: 46%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(243, 156, 53, .85), rgba(243, 156, 53, 0)); filter: blur(10px); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(8%, 6%, 0) scale(1.12); } }

.ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; z-index: -1; }
.ridge .far { fill: #3A2D8C; opacity: .85; }
.ridge .near { fill: var(--noche); }

.hero-copy { position: relative; padding: 0 56px; max-width: 720px; margin-bottom: auto; margin-top: clamp(64px, 12vh, 120px); }
.eyebrow { margin: 0 0 18px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #C3C6F5; }
.hero h1 { margin: 0; font: 600 clamp(40px, 5.6vw, 76px)/1.02 var(--display); letter-spacing: -.02em; }
.hero h1 span { color: var(--sol); }
.lead { margin: 22px 0 30px; max-width: 560px; font-size: 18.5px; line-height: 1.6; color: #E8E9FB; }
.cta {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
    background: var(--sol); color: var(--noche); font-weight: 700; text-decoration: none;
    box-shadow: 0 8px 30px rgba(243, 156, 53, .35); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cta::after { content: "→"; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(243, 156, 53, .45); }

.hero-astro { position: absolute; right: 5%; top: 9%; width: clamp(200px, 25vw, 340px); filter: drop-shadow(0 24px 40px rgba(10, 8, 40, .5)); animation: float 7s ease-in-out infinite; z-index: -1; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
.spark { position: absolute; z-index: -1; pointer-events: none; }
.spark.s1 { left: 1.5%; top: 64%; width: 50px; transform: rotate(-12deg); }
.spark.s2 { right: 2%; bottom: 40%; width: 34px; transform: rotate(18deg); opacity: .9; }

/* La ruta: 5 paradas sobre el horizonte. Se encienden de naranja al terminar cada ejercicio */
.route { position: relative; list-style: none; display: grid; grid-template-columns: repeat(var(--stops, 5), 1fr); margin: 48px 0 0; padding: 0 40px 34px; }
.route::before { content: ""; position: absolute; left: calc(40px + 10%); right: calc(40px + 10%); top: 17px; height: 2px; background: rgba(195, 198, 245, .35); }
.stop { position: relative; text-align: center; }
.stop a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; padding: 0 6px; }
.stop-dot {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--noche); border: 2px solid #C3C6F5; font: 600 15px/1 var(--display); color: #fff;
    transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.stop-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.stop-time { font-size: 12.5px; color: #A9ACDD; }
.stop.is-optional .stop-dot { border-style: dashed; }
.stop.is-partial .stop-dot { border-color: var(--sol); }
.stop.is-done .stop-dot { background: var(--sol); border-color: var(--sol); color: var(--noche); box-shadow: 0 0 0 6px rgba(243, 156, 53, .2), 0 0 26px rgba(243, 156, 53, .6); }
.stop.is-current .stop-dot { box-shadow: 0 0 0 6px rgba(195, 198, 245, .22); }
.stop a:hover .stop-dot { border-color: var(--sol); }

/* ===== Contenido ===== */
.chapter { padding-top: 64px; }
.chapter + .chapter { border-top: 1px solid var(--line); margin-top: 56px; }
.content h2 { margin: 0 0 18px; font: 600 clamp(26px, 3vw, 34px)/1.18 var(--display); letter-spacing: -.01em; color: var(--ink); }
.content h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 48px 0 14px; font-size: 22px; font-weight: 700; line-height: 1.3; }
.content h2 + h3, .content .agent-chip + h3 { margin-top: 24px; }
.part-tag { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.content p, .content li { max-width: 68ch; }
.content strong { font-weight: 700; }
.content em { color: var(--muted); }
.content code { font: 500 .88em var(--mono); background: var(--accent-soft); color: var(--ink); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* Cabecera de ejercicio: número grande + kicker con el tiempo */
.ex-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 8px; }
.ex-num {
    flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px;
    background: linear-gradient(160deg, #262070, var(--aurora)); color: #fff; font: 600 36px/1 var(--display);
    box-shadow: inset 0 -10px 18px rgba(243, 156, 53, .35);
}
.exercise.is-done .ex-num { background: linear-gradient(160deg, #F7B25E, var(--sol)); color: var(--noche); box-shadow: none; }
.ex-kicker { margin: 4px 0 6px !important; display: flex; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sol-ink); }
.ex-kicker span { color: var(--muted); letter-spacing: .02em; text-transform: none; font-weight: 600; }
.ex-head h2 { margin: 0 !important; }
.opt { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--muted); font: 600 12px/1.2 var(--body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* Pasos numerados: círculos de la ruta */
.content ol { list-style: none; counter-reset: step; padding-left: 0; margin: 14px 0; }
.content ol > li { counter-increment: step; position: relative; padding: 4px 0 10px 46px; }
.content ol > li::before {
    content: counter(step); position: absolute; left: 0; top: 3px; width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 14px/1 var(--body);
}
.content ul { padding-left: 22px; }
.content ul > li { margin: 4px 0; }
.content ul > li::marker { color: var(--peri); }
.content ol ul { margin: 6px 0 2px; }

/* ===== Prompt: forma de la caja de entrada de Agentforce ===== */
.prompt {
    position: relative; margin: 12px 0 18px; padding: 40px 18px 16px; border-radius: var(--radius);
    background: var(--surface); border: 1.5px solid var(--peri); box-shadow: 0 0 0 4px var(--accent-soft);
}
.prompt-label { position: absolute; left: 16px; top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.prompt pre { margin: 0; white-space: pre-wrap; }
.prompt code { background: none !important; padding: 0 !important; font: 400 17px/1.55 var(--body) !important; color: var(--ink) !important; }
.copy-btn {
    position: absolute; right: 10px; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    border: 0; background: var(--aurora); color: #fff; font: 700 13px var(--body); cursor: pointer; transition: background .2s, transform .15s;
}
[data-theme="dark"] .copy-btn { background: #B1B4F2; color: var(--noche); }
.copy-btn:hover { transform: translateY(-1px); }
.copy-btn.copied { background: var(--ok); color: #fff; }

/* El sufijo dentro de prompts y nombres: marcado para que se vea que es tuyo */
.sufijo { background: var(--sol-soft); color: var(--sol-ink); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.sufijo.is-example { border-bottom: 1.5px dashed var(--sol-ink); }

/* ===== Callouts ===== */
.callout { margin: 14px 0 20px; padding: 14px 18px 14px 50px; border-radius: 12px; position: relative; background: var(--accent-soft); font-size: 16px; }
.callout p { margin: 0; }
.callout::before { position: absolute; left: 16px; top: 13px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.callout.tip::before { content: "i"; background: var(--aurora); color: #fff; font-family: var(--display); }
.callout.warning { background: var(--sol-soft); border-left: 4px solid var(--sol); }
.callout.warning::before { content: "!"; background: var(--sol); color: var(--noche); }
.callout.verify { background: var(--ok-soft); }
.callout.verify::before { content: "✓"; background: var(--ok); color: #fff; }
.callout.verify strong:first-child { color: var(--ok-ink); }
/* Lo que sigue a un paso (prompt, callout, campo) se alinea con el texto del paso, no con el número */
.content ol + .prompt, .content ol + .callout, .content ol + details, .content ol + .note-field { margin-left: 46px; }

details.rescue { padding: 0; background: transparent; border: 1px solid var(--line); }
details.rescue summary { list-style: none; cursor: pointer; padding: 12px 18px 12px 50px; font-weight: 700; color: var(--muted); position: relative; }
details.rescue summary::-webkit-details-marker { display: none; }
details.rescue summary::before { content: "?"; position: absolute; left: 16px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink); font-size: 14px; }
details.rescue summary::after { content: "Mostrar"; float: right; font-weight: 600; font-size: 13px; color: var(--accent); }
details.rescue[open] summary::after { content: "Ocultar"; }
details.rescue > p { padding: 0 18px 14px 50px; }
details.rescue::before { display: none; }

/* Agente correcto: chip con el nombre exacto que tiene que decir el panel */
.agent-chip {
    display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 6px; padding: 7px 14px 7px 12px; border-radius: 999px;
    background: var(--noche); color: #E8E9FB; font-size: 14px;
}
.agent-chip svg { color: var(--sol); }
.agent-chip span { color: #A9ACDD; }
.agent-chip strong { color: #fff; }
[data-theme="dark"] .agent-chip { background: #2B2F72; }

/* ===== Imágenes ===== */
.banner { margin: 22px 0 8px; border-radius: 22px; overflow: hidden; aspect-ratio: 21 / 8; background: var(--indigo); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.figura { float: right; width: 240px; margin: 4px 0 16px 28px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.figura img { display: block; width: 100%; }
.screenshot { margin: 18px 0 24px; }
.screenshot img { display: block; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.screenshot figcaption { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.pending-box { padding: 18px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.pending-box code { font-size: 12px; }

.link-block {
    display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 10px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; text-decoration: none;
}
.link-block span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ===== Tablas ===== */
.content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0 24px; font-size: 15.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.content th { text-align: left; padding: 10px 14px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.content td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.content td:first-child { font-weight: 600; white-space: nowrap; }
td.copyable { cursor: pointer; position: relative; padding-right: 38px; transition: background .2s; }
td.copyable:hover { background: var(--accent-soft); }
td.copyable.copied { background: var(--ok-soft); }
.cell-copy-icon { position: absolute; right: 14px; top: 14px; color: var(--accent); }

/* ===== Widgets: sufijo y anotaciones ===== */
.sufijo-builder { margin: 10px 0 8px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--peri); box-shadow: 0 0 0 4px var(--accent-soft); }
.sb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sufijo-builder label, .note-field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.sufijo-builder input, .note-field input {
    width: 100%; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
    font: 400 16px var(--body);
}
.sufijo-builder input:focus, .note-field input:focus { outline: none; border-color: var(--aurora); box-shadow: 0 0 0 4px var(--accent-soft); }
.sb-result { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--sol-soft); }
.sb-result span { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.sb-result strong { font: 600 22px/1 var(--display); color: var(--sol-ink); letter-spacing: .01em; }
.sb-hint { margin: 10px 0 0 !important; font-size: 14px; color: var(--muted); }
.mini-copy { padding: 5px 11px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: var(--accent); font: 700 12px var(--body); cursor: pointer; }
.sb-result .mini-copy { margin-left: auto; color: var(--sol-ink); }
.my-data .mini-copy { color: var(--peri); padding: 2px 8px; font-size: 11px; }
.note-field { margin: 4px 0 16px; max-width: 460px; }
.note-field.saved input { border-color: var(--ok); }

/* ===== Avance ===== */
.track-row { display: flex; gap: 10px; align-items: center; margin: 22px 0 6px; }
.track-btn { padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--aurora); background: transparent; color: var(--accent); font: 700 14.5px var(--body); cursor: pointer; transition: all .2s var(--ease); }
[data-theme="dark"] .track-btn { border-color: var(--accent); }
.track-btn:hover { background: var(--accent-soft); }
.track-done.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.track-hint { font-size: 13px; color: var(--muted); }
.track-help.active { background: var(--sol); border-color: var(--sol); color: var(--noche); }

/* Cierre */
.finale { text-align: left; }
.finale.is-complete h2::after { content: " 🎉"; }

.toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 12px 20px; border-radius: 999px; background: var(--noche); color: #fff; font-weight: 600; font-size: 15px;
    box-shadow: 0 10px 30px rgba(20, 22, 58, .35); transition: all .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
    .hero-astro { width: 200px; right: 3%; top: 6%; opacity: .9; }
    .route { padding: 0 16px 28px; }
    .route::before { left: 10%; right: 10%; }
}
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .sidebar { width: 300px; transform: translateX(-100%); transition: transform .3s var(--ease); }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
    .mobile-toggle {
        display: inline-flex; gap: 8px; position: fixed; right: 14px; bottom: 16px; z-index: 150; padding: 12px 18px; border-radius: 999px;
        border: 0; background: var(--noche); color: #fff; font: 700 14px var(--body); box-shadow: 0 8px 24px rgba(20, 22, 58, .4); cursor: pointer;
    }
    .mobile-toggle b { color: var(--sol); }
    .content { padding: 0 20px 110px; }
    .hero-copy { padding: 0 22px; margin-top: 48px; }
    .hero-astro { width: 130px; top: auto; bottom: 46%; right: 2%; }
    .lead { font-size: 17px; }
    .figura { width: 150px; margin-left: 16px; }
}
@media (max-width: 620px) {
    body { font-size: 16.5px; }
    .route { grid-template-columns: repeat(var(--stops, 5), minmax(0, 1fr)); padding: 0 6px 24px; margin-top: 28px; }
    .stop-name { font-size: 12px; }
    .stop-time { display: none; }
    .stop-dot { width: 30px; height: 30px; font-size: 13px; }
    .route::before { top: 14px; }
    .hero-astro { display: none; }
    .ex-head { gap: 14px; }
    .ex-num { width: 52px; height: 52px; border-radius: 16px; font-size: 26px; }
    .content ol > li { padding-left: 40px; }
    .content ol + .prompt, .content ol + .note-field, .content ol + .callout, .content ol + details { margin-left: 0; }
    .sb-fields { grid-template-columns: 1fr; }
    .banner { aspect-ratio: 16 / 9; }
    .figura { float: none; width: 200px; margin: 0 0 12px; }
    .content td:first-child { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
@media print {
    .sidebar, .mobile-toggle, .topbar, .track-row, .copy-btn, .hero .sky, .hero-astro, .spark, .ridge { display: none !important; }
    .main { margin: 0; }
    .hero { min-height: 0; color: var(--ink); background: none; }
}
