/* Learning hub: guide pages and the hub index. Built on tokens, components and site.css. */
.learn { background: var(--bg); }
.l-main:focus { outline: none; }

/* ---------- Article hero ---------- */
.l-hero {
  position: relative;
  padding: var(--s-6) 0 var(--s-6);
  background:
    radial-gradient(90% 140% at 100% 0%, color-mix(in oklab, var(--c) 30%, transparent), transparent 60%),
    color-mix(in oklab, var(--c) 12%, var(--bg));
  border-bottom: 3px solid color-mix(in oklab, var(--c) 35%, var(--bg));
}
.l-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.l-crumbs { font-size: var(--step--1); font-weight: 700; color: var(--text-2); }
.l-crumbs a { color: inherit; }
.l-hero__row { display: flex; align-items: center; gap: var(--s-4); }
.l-hero__emoji {
  display: grid; place-items: center; flex: none;
  width: 72px; height: 72px; border-radius: 22px;
  background: var(--surface); font-size: 2.6rem;
  box-shadow: 0 5px 0 color-mix(in oklab, var(--c) 55%, var(--surface));
}
.l-hero h1 { margin: 0; font-size: clamp(2rem, 5.5vw, 3.1rem); line-height: 1.05; }
.l-lede { margin: 0; max-width: 62ch; font-size: var(--step-1); color: var(--text-2); }
.l-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.l-sound-note { flex-basis: 100%; margin: 0; font-size: var(--step--1); color: var(--text-2); }

.l-facts { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .l-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.l-facts li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-content: start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border-light); }
.l-facts li > span:first-child { grid-row: span 2; font-size: 1.5rem; line-height: 1.2; }
.l-facts b { font-family: var(--font-display); font-size: 1.02rem; }
.l-facts li > span:last-child { font-size: .92rem; color: var(--text-2); line-height: 1.35; }

/* ---------- Layout ---------- */
.l-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding-top: var(--s-5); }
@media (min-width: 1000px) { .l-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; } }
.l-body { min-width: 0; }
.l-sec { margin-bottom: var(--s-6); }
.l-sec h2 { font-size: var(--step-3); margin: 0 0 var(--s-3); scroll-margin-top: 80px; }
.l-sec p { line-height: 1.65; max-width: 70ch; }
.l-tips { padding-left: 1.2em; max-width: 70ch; }
.l-tips li { margin-bottom: 8px; line-height: 1.6; }
.l-callout { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: color-mix(in oklab, var(--sunny) 14%, var(--surface)); border: 2px solid color-mix(in oklab, var(--sunny) 45%, transparent); line-height: 1.6; max-width: 70ch; }
.l-body a { color: color-mix(in oklab, var(--lagoon) var(--tint), var(--text)); font-weight: 700; }

/* ---------- Phrase cards ---------- */
.ph-list { list-style: none; margin: var(--s-3) 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 680px) { .ph-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ph { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border-light); }
.ph--dual { grid-template-columns: minmax(0, 1fr); }
.ph__text { display: grid; gap: 2px; min-width: 0; }
.ph__es { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; line-height: 1.25; overflow-wrap: anywhere; }
.ph__en { color: var(--text); font-size: .98rem; }
.ph__pron { color: var(--text-muted); font-size: .92rem; font-style: italic; overflow-wrap: anywhere; }
.ph__note { margin-top: 4px; font-size: .88rem; color: var(--text-2); padding-left: 10px; border-left: 3px solid var(--border); }
.ph__duo { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .95rem; color: var(--text-2); }
.ph__duo b { color: var(--text); margin-right: 4px; }

.say {
  --c: var(--lagoon);
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: color-mix(in oklab, var(--c) 16%, var(--surface));
  color: color-mix(in oklab, var(--c) var(--tint), var(--text));
  cursor: pointer; transition: transform 120ms var(--ease-out), background 150ms;
}
.say svg { width: 22px; height: 22px; }
.say:hover { background: color-mix(in oklab, var(--c) 26%, var(--surface)); }
.say:active { transform: scale(.92); }
.say.is-playing { background: var(--c); color: var(--on-lagoon); animation: say-pulse 1s ease-in-out infinite; }
.say--none { background: var(--surface-2); font-size: 1.1rem; cursor: default; }
@keyframes say-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--c) 25%, transparent); } }

/* ---------- Tables ---------- */
.l-table-wrap { overflow-x: auto; margin: var(--s-3) 0; border-radius: var(--r-md); border: 2px solid var(--border-light); background: var(--surface); }
.l-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.l-table th { text-align: left; padding: 10px 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); background: var(--surface-2); }
.l-table td { padding: 10px 12px; border-top: 1px solid var(--border-light); vertical-align: top; line-height: 1.45; }
.l-table [lang="es"] { font-weight: 700; }
.l-table--numbers td { font-family: var(--font-display); font-size: 1.05rem; }
@media (max-width: 520px) { .l-table { font-size: .9rem; } .l-table td, .l-table th { padding: 8px; } }

/* ---------- Aside ---------- */
.l-aside { display: grid; gap: var(--s-4); }
@media (min-width: 1000px) { .l-aside { position: sticky; top: 84px; } }
.l-toc { display: none; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border-light); }
@media (min-width: 1000px) { .l-toc { display: block; } }
.l-toc h2, .l-practice h2 { font-size: 1.15rem; margin: 0 0 var(--s-2); }
.l-toc ul, .l-practice ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.l-toc a { display: block; padding: 6px 0; color: var(--text-2); text-decoration: none; font-weight: 600; }
.l-toc a:hover { color: var(--text); }
.l-practice { padding: var(--s-5); border-radius: var(--r-lg); background: color-mix(in oklab, var(--cactus) 12%, var(--surface)); border: 2px solid color-mix(in oklab, var(--cactus) 35%, transparent); }
.l-practice p { margin: 0 0 var(--s-3); color: var(--text-2); font-size: .95rem; }
.l-practice a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; border: 2px solid var(--border-light); }
.l-practice a:hover { border-color: var(--cactus); }

/* ---------- Cards (hub + related) ---------- */
.l-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .l-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .l-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.l-cards--sm { margin-bottom: var(--s-5); }
.l-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); align-items: center;
  height: 100%; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 2px solid color-mix(in oklab, var(--c) 35%, var(--border-light));
  box-shadow: 0 5px 0 color-mix(in oklab, var(--c) 45%, var(--surface));
  transition: transform 140ms var(--ease-bounce);
}
.l-card:hover { transform: translateY(-3px); }
.l-card__emoji { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: color-mix(in oklab, var(--c) 18%, var(--surface)); font-size: 1.9rem; }
.l-card__title { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.l-card__desc { font-size: .93rem; color: var(--text-2); line-height: 1.35; }
.l-card--sm { padding: var(--s-3) var(--s-4); }
.l-card--sm .l-card__emoji { grid-row: auto; width: 44px; height: 44px; font-size: 1.5rem; border-radius: 14px; }

/* ---------- Hub ---------- */
.l-hub-hero { position: relative; padding: 0 0 var(--s-7); background: linear-gradient(180deg, color-mix(in oklab, var(--sunny) 22%, var(--bg)), var(--bg)); }
.l-hub-hero__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: center; padding-top: var(--s-6); }
@media (min-width: 900px) { .l-hub-hero__in { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.l-kicker { margin: 0 0 var(--s-2); font-weight: 800; color: var(--coral-ink); text-transform: uppercase; letter-spacing: .06em; font-size: var(--step--1); }
.l-hub-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; margin: 0 0 var(--s-3); }
.l-try { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--border-light); box-shadow: var(--shadow-float); }
.l-try h2 { font-size: 1.2rem; margin: 0 0 var(--s-3); }
.l-try ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.l-try li { display: flex; align-items: center; gap: var(--s-3); }
.l-try li > span { display: grid; }
.l-group { margin-top: var(--s-7); scroll-margin-top: 80px; }
.l-group h2 { font-size: var(--step-3); margin: 0; }
.l-group__desc { margin: 4px 0 var(--s-4); color: var(--text-2); }
.l-dests { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 860px) { .l-dests { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.l-dest {
  display: grid; justify-items: center; text-align: center; gap: 2px; height: 100%;
  padding: var(--s-4) var(--s-3); border-radius: var(--r-lg); text-decoration: none; color: var(--text);
  background: color-mix(in oklab, var(--c) 14%, var(--surface));
  border: 2px dashed color-mix(in oklab, var(--c) 60%, var(--surface));
  transition: transform 140ms var(--ease-bounce);
}
.l-dest:hover { transform: rotate(-1.5deg) translateY(-2px); }
.l-dest__flag { font-size: 2.4rem; line-height: 1.2; }
.l-dest__name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.l-dest__tag { font-size: .88rem; color: var(--text-2); }

/* ---------- Bottom ---------- */
.l-more { margin-top: var(--s-5); }
.l-more h2 { font-size: var(--step-2); margin: 0 0 var(--s-3); }
.l-app { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: color-mix(in oklab, var(--lagoon) 10%, var(--surface)); border: 2px solid color-mix(in oklab, var(--lagoon) 30%, transparent); margin-top: var(--s-6); }
.l-app > img { border-radius: 14px; }
.l-app > div { flex: 1 1 260px; }
.l-app b { font-family: var(--font-display); font-size: 1.25rem; }
.l-app p { margin: 2px 0 0; color: var(--text-2); }

/* ---------- Print (the cheat sheet especially) ---------- */
@media print {
  .site-nav, .site-footer, .no-print, .skip-link, .l-sound-note { display: none !important; }
  .learn, .l-hero { background: #fff !important; }
  .l-hero { padding: 0 0 8px; border: 0; }
  .l-hero__emoji { box-shadow: none; width: 48px; height: 48px; font-size: 1.8rem; }
  .l-hero h1 { font-size: 22pt; }
  .l-lede { font-size: 10.5pt; }
  .l-layout { display: block; padding-top: 8px; }
  .l-sec { margin-bottom: 10px; break-inside: avoid; }
  .l-sec h2 { font-size: 14pt; margin-bottom: 4px; }
  .ph-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; margin: 4px 0; }
  .ph { padding: 4px 6px; border: 1px solid #ddd; break-inside: avoid; grid-template-columns: minmax(0, 1fr); }
  .ph .say { display: none; }
  .ph__es { font-size: 11pt; }
  .ph__en, .ph__pron, .ph__note { font-size: 9pt; }
  .l-callout { font-size: 9.5pt; padding: 6px 10px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
