/* Step 0 (/antes-de-empezar), its second-tab page and /hola. Extends public-learn.css (header, footer, theme). */
:root { --ok: #a6e58a; --ok-bg: #1d3424; --warn: #f5b27e; --warn-bg: #36281d; --hint: #9fd3ff; --hint-bg: #1b2c38; }
html[data-theme=light] { --ok: #2c6a1c; --ok-bg: #e3f2da; --warn: #964212; --warn-bg: #fbe9dc; --hint: #1d5a85; --hint-bg: #e2eff8; }
[hidden] { display: none !important; }
html[data-input=touch] .for-mouse, html[data-input=mouse] .for-touch { display: none; }
.bs { max-width: 860px; }
.bs-hero { margin: 0 0 22px; }
.bs-hero h1 { margin: 12px 0 14px; font-size: clamp(2.1rem, 6vw, 3.6rem); overflow-wrap: anywhere; }
.bs-hero p { margin: 0; font-size: 1.15rem; color: var(--muted); }
.bs-noscript { padding: 16px; border: 2px solid var(--warn); border-radius: 14px; }

/* One action per screen: large type and very large buttons. */
.bs-practice { position: relative; padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: 22px; background: var(--panel); font-size: 1.2rem; line-height: 1.55; scroll-margin-top: 12px; }
.bs-practice h2 { margin: 6px 0 14px; font-size: clamp(1.75rem, 5vw, 2.5rem); overflow-wrap: anywhere; }
.bs-practice h2:focus { outline: none; }
.bs-practice h2:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.bs-practice p { max-width: 62ch; }
.bs-read ol, .bs-read ul { margin: 0 0 18px; padding-inline-start: 1.4em; }
.bs-read li { margin: 0 0 10px; padding-inline-start: .2em; }
.bs-read li::marker { color: var(--accent); font-weight: 800; }
.bs-count { margin: 0; color: var(--accent); font: 800 .9rem 'DM Sans', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.bs-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.bs-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bs-dots li { width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 50%; }
.bs-dots li[data-status=current] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.bs-dots li[data-status=done] { border-color: var(--accent); background: var(--accent); }
.bs-dots li[data-status=skipped] { border-style: dashed; }
.bs-practice button, .bs-big { font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.bs-listen { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font-weight: 700; }
.bs-listen svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bs-listen .bs-listen-icon { display: inline-flex; }
.bs-listen.is-speaking { border-color: var(--accent); color: var(--accent); }
.bs-big, .bs-practice .bs-big { display: inline-flex; align-items: center; justify-content: center; gap: .4em; width: min(100%, 26rem); min-height: 88px; margin: 6px 0 14px; padding: 16px 28px; border: 0; border-radius: 20px; background: var(--accent); color: var(--bg); font-weight: 800; font-size: clamp(1.45rem, 5vw, 1.8rem); line-height: 1.2; text-align: center; text-decoration: none; box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 45%, #000); }
.bs-big:active { transform: translateY(3px); box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 45%, #000); }
.bs-big:focus-visible, .bs-practice button:focus-visible, .bs-input:focus-visible, .bs-section a:focus-visible, .bs-more a:focus-visible { outline: 4px solid var(--text); outline-offset: 4px; }
.bs-label { display: block; margin: 8px 0 6px; font-weight: 800; }
.bs-input { display: block; width: min(100%, 26rem); min-height: 60px; padding: 10px 16px; border: 3px solid var(--muted); border-radius: 14px; background: #fff; color: #111; font: 700 1.5rem 'DM Sans', system-ui, sans-serif; }
.bs-input:focus { border-color: var(--accent); }
.bs-note { color: var(--muted); font-size: 1rem; }
.bs-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 6px 0 12px; }
.bs-box { min-width: 0; padding: 14px; border: 2px dashed var(--line); border-radius: 16px; }
.bs-code { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--bg); font: 800 clamp(2.2rem, 9vw, 3rem)/1.2 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .18em; -webkit-user-select: all; user-select: all; cursor: text; }
.bs-code::selection { background: var(--hint); color: var(--bg); }
.bs-paste { width: 100%; letter-spacing: .12em; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.bs-address { margin: 0 0 8px; }
.bs-address code, .bs-arrival code, .bs-read code { padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 700 1em ui-monospace, 'Cascadia Mono', Consolas, monospace; overflow-wrap: anywhere; }
.bs-address code { display: inline-block; padding: 10px 16px; font-size: clamp(1.3rem, 5.5vw, 1.9rem); }

/* Step 2: a tall track that only ends after real scrolling. */
.bs-track { display: flex; flex-direction: column; justify-content: space-between; min-height: max(220vh, 1500px); margin: 10px 0 18px; padding: 10px 0 10px 18px; border-inline-start: 5px dashed var(--line); }
.bs-sign { margin: 0; color: var(--muted); font-size: 1.4rem; font-weight: 700; }
.bs-sign span { color: var(--accent); font-size: 2rem; }
.bs-end { margin: 0; padding: 18px; border: 3px solid var(--accent); border-radius: 16px; font-size: 1.5rem; font-weight: 800; text-align: center; }

/* Results never rely on color alone: icon, word and text. */
.bs-result { display: flex; align-items: flex-start; gap: 14px; margin: 6px 0 16px; padding: 14px 18px; border: 3px solid var(--line); border-radius: 16px; font-size: 1.2rem; }
.bs-result:empty { display: none; }
.bs-result p { margin: 0; }
.bs-result-icon { display: inline-grid; flex: none; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-weight: 900; font-size: 1.3rem; }
.bs-result[data-state=ok] { border-color: var(--ok); background: var(--ok-bg); }
.bs-result[data-state=ok] .bs-result-icon { background: var(--ok); color: var(--ok-bg); }
.bs-result[data-state=ok] strong { color: var(--ok); }
.bs-result[data-state=retry] { border-color: var(--warn); background: var(--warn-bg); }
.bs-result[data-state=retry] .bs-result-icon { background: var(--warn); color: var(--warn-bg); }
.bs-result[data-state=retry] strong { color: var(--warn); }
.bs-result[data-state=progress] { border-color: var(--hint); background: var(--hint-bg); }
.bs-result[data-state=progress] .bs-result-icon { background: var(--hint); color: var(--hint-bg); }
.bs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 8px; }
.bs-practice .bs-next { min-height: 72px; padding: 12px 30px; border: 0; border-radius: 18px; background: var(--accent); color: var(--bg); font-weight: 800; font-size: 1.45rem; }
.bs-skip, .bs-previous, .bs-print, .bs-input-choice button { min-height: 48px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font-weight: 700; }
.bs-previous { border-color: transparent; text-decoration: underline; text-underline-offset: .2em; }
.bs-skip:hover, .bs-previous:hover, .bs-listen:hover, .bs-input-choice button:hover { border-color: var(--accent); }
.bs-input-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 1rem; color: var(--muted); }
.bs-input-choice button { font-size: 1rem; }
.bs-input-choice button[aria-pressed=true] { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.bs-input-choice button[aria-pressed=true]::before { content: '✓ '; color: var(--accent); }
.bs-saved { margin: 10px 0 0; color: var(--muted); font-size: .95rem; }

/* Step 6: the practice page looks like a different page. */
.bs-backpage { margin: -6px; padding: 26px 20px; border: 4px solid var(--hint); border-radius: 18px; background: var(--hint-bg); }
.bs-backpage .bs-count { color: var(--hint); }
.bs-resume, .bs-final { padding: 4px 0; }
.bs-summary { margin: 0 0 20px; padding: 0; list-style: none; }
.bs-summary li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bs-status { display: inline-block; min-width: 7.5rem; padding: 2px 10px; border: 2px solid var(--line); border-radius: 999px; font-size: .95rem; font-weight: 800; text-align: center; }
.bs-status[data-status=done] { border-color: var(--ok); color: var(--ok); }
.bs-status[data-status=done]::before { content: '✓ '; }
.bs-status[data-status=skipped] { border-style: dashed; color: var(--muted); }
.bs-next-course { margin: 8px 0 18px; padding: 18px; border: 2px solid var(--accent); border-radius: 18px; }
.bs-next-course p { margin: 0 0 6px; }
.bs-final a:not(.bs-big) { color: var(--accent); display: inline-flex; align-items: center; min-height: 44px; }

/* Second tab and /hola. */
.bs-landing .bs { max-width: 760px; }
.bs-arrival h1 { margin: 8px 0 10px; font-size: clamp(2.2rem, 8vw, 3.6rem); }
.bs-arrival .bs-lead { font-size: 1.5rem; font-weight: 800; }

.bs-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 28px 0; color: var(--muted); }
.bs-more a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; text-underline-offset: .2em; }
.bs-section { margin: 0 0 32px; padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); scroll-margin-top: 16px; }
.bs-section h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2rem); }
.bs-section h3 { margin: 22px 0 6px; font-size: 1.2rem; }
.bs-section p, .bs-section li { color: var(--muted); }
.bs-section strong, .bs-section code { color: var(--text); }
.bs-section ul { margin: 0; padding-inline-start: 1.25em; }
.bs-section li { margin: 0 0 8px; }
.bs-section a { color: var(--accent); text-underline-offset: .18em; }
.bs-external { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.bs-external a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 14px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; text-decoration: none; }
.bs-external a::after { content: ' ↗'; }
.bs-print { margin: 4px 0 6px; }
.bs-page > footer { flex-wrap: wrap; align-items: center; }
.bs-footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.bs-footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 650px) {
  main.bs { padding-top: 18px; }
  .bs-hero { margin-bottom: 14px; }
  .bs-hero .eyebrow { display: none; }
  .bs-hero h1 { font-size: 1.8rem; margin: 0 0 8px; }
  .bs-hero p { font-size: 1rem; }
  .bs-dots { gap: 6px; }
  .bs-dots li { width: 13px; height: 13px; }
  .bs-listen { min-height: 46px; padding: 6px 14px; }
  .bs-practice { padding: 16px; border-radius: 16px; font-size: 1.12rem; }
  .bs-practice h2 { font-size: 1.6rem; margin: 2px 0 8px; }
  .bs-toolbar { margin-bottom: 10px; }
  .bs-boxes { grid-template-columns: minmax(0, 1fr); }
  .bs-practice .bs-big, .bs-big { width: 100%; min-height: 80px; margin-bottom: 10px; }
  .bs-practice .bs-next { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .bs-big:active { transform: none; } }

/* The guide for helpers prints alone, in black on white. */
@media print {
  .skip, .top, .bs-hero, .bs-practice, .bs-more, #correo, .bs-page > footer, .bs-print, noscript { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  main { max-width: none; padding: 0; }
  .bs-section { border: 0; padding: 0; background: #fff; }
  .bs-section h2, .bs-section h3, .bs-section p, .bs-section li, .bs-section strong { color: #000 !important; }
  .bs-section h3 { break-after: avoid; }
  .bs-section li { break-inside: avoid; }
}
