/* AprobarYa over the RumoCarta base (base.css, generated by tools/recolor_css.py).
   Brand: navy #14213d for header bands and heroes, orange #e8692d as the one accent (buttons #b8481a),
   green / red only for right and wrong answers. */
:root {
  --apy-orange: #e8692d;
  --apy-orange-btn: #b8481a;   /* white text >= 4.5:1 (WCAG AA) */
  --yellow: #b8481a;           /* Rumo's primary-button colour */
  --apy-orange-soft: #fdeee4;
  --apy-orange-text: #9a3f15;
  --apy-section-gap: 4rem;
  --apy-good: #15803d;
  --apy-bad: #c2410c;
  --apy-card: #ffffff;
  --apy-ink: #0f172a;
}
html[data-theme="dark"], html.dark {
  --apy-orange-soft: #3a2316;
  --apy-orange-text: #f29a63;
  --apy-good: #4ade80;
  --apy-bad: #fb923c;
  --apy-card: #111c33;
  --apy-ink: #e5ecf8;
}
.uk-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 100; padding: .6rem 1rem; color: #fff; background: var(--navy); border-radius: 10px; }
.skip-link:focus { top: .6rem; }

/* ---------- Header ---------- */
.brand img { width: 52px; height: 52px; }
.brand-copy strong { font-size: 1.22rem; }
.brand-copy strong em { color: #64748b; }
.apy-header-cta { min-height: 38px; padding: .45rem .9rem; border-radius: 10px; font-size: .82rem; white-space: nowrap; }
@media (max-width: 1100px) { .apy-header-cta-long { display: none; } }
@media (max-width: 560px) { .apy-header-cta { display: none; } .brand img { width: 44px; height: 44px; } }
html[data-theme="dark"] .brand-copy strong em { color: #8fa3c4; }

/* ---------- Brand name on a Spanish number plate (brand_plate() in functions.php) ---------- */
.apy-plate { --plate-h: 32px; display: inline-flex; align-items: stretch; height: var(--plate-h); overflow: hidden; background: #fff; border: 2px solid #111827; border-radius: 6px; box-shadow: inset 0 0 0 1px #fff, 0 2px 6px rgba(15,23,42,.18); line-height: 1; vertical-align: middle; }
.apy-plate-eu { display: flex; flex-direction: column; align-items: center; justify-content: space-between; width: calc(var(--plate-h) * .5); padding: 2px 0 2px; background: #1f3fa3; }
.apy-plate-eu svg { display: block; width: 92%; height: auto; }
.apy-plate-eu b { color: #fff !important; font: 800 calc(var(--plate-h) * .3)/1 Arial, sans-serif; }
.apy-plate-text { display: flex; align-items: center; padding: 0 .5em 0 .4em; color: #111827 !important; font-family: "DIN Alternate", "DIN Condensed", "Bahnschrift", "Arial Narrow", Arial, sans-serif; font-size: calc(var(--plate-h) * .6); font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.apy-plate-text span { color: var(--apy-orange) !important; }
.apy-plate-text em { color: #475569 !important; font-style: normal; font-size: .78em; font-weight: 700; }
.apy-plate.is-lg { --plate-h: 44px; border-width: 3px; border-radius: 8px; }
.brand-copy strong.apy-brand-plate { display: block; font-size: inherit; letter-spacing: 0; }
.apy-footer-plate { display: inline-block; text-decoration: none; }
.apy-footer-plate .apy-plate { box-shadow: 0 6px 20px rgba(0,0,0,.35); }
@media (max-width: 560px) { .apy-plate { --plate-h: 28px; } .brand-copy small { display: none; } }

/* ---------- Shared ---------- */
.apy-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.1rem 0 0; }
.apy-small-note { margin: 1rem 0 0; color: var(--muted); font-size: .85rem; }
.apy-exam-start .eyebrow, .apy-lesson-kicker, .apy-home-sample .eyebrow, .apy-404 .eyebrow {
  display: inline-block; color: var(--apy-orange-text); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.apy-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
.apy-cover.is-sign { object-fit: contain; padding: 14%; background: #fff; }
.apy-cover.is-empty { background: linear-gradient(135deg, #e4ebf6, var(--apy-orange-soft)); }

.apy-pager { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 2rem 0 0; }
.apy-pager-link { display: grid; gap: .2rem; padding: 1rem 1.15rem; color: var(--apy-ink); background: var(--apy-card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.apy-pager-link small { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.apy-pager-link span { font-weight: 800; }
.apy-pager-link.is-next { text-align: right; }
.apy-pager-link:hover { border-color: var(--apy-orange); box-shadow: 0 8px 24px rgba(20,33,61,.08); }
@media (max-width: 640px) { .apy-pager { grid-template-columns: 1fr; } .apy-pager-link.is-next { text-align: left; } }

.page-faq details { border-top: 1px solid var(--line); padding: .9rem 0; }
.page-faq details:last-child { border-bottom: 1px solid var(--line); }
.page-faq summary { cursor: pointer; font-weight: 800; color: var(--apy-ink); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.page-faq summary::-webkit-details-marker { display: none; }
.page-faq summary::after { content: '+'; color: var(--apy-orange); font-size: 1.3rem; line-height: 1; }
.page-faq details[open] summary::after { content: '–'; }
.page-faq details p { margin: .6rem 0 0; }
.homepage-simple .page-faq { margin-top: 2.5rem; }

/* ---------- Home ---------- */
.home-start-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.apy-resume { padding: .55rem .7rem; background: var(--apy-orange-soft); border-radius: 10px; font-size: .82rem !important; }
.apy-resume a { color: var(--apy-orange-text); font-weight: 800; }
.home-slide .slide-photo { background-color: #24467f; }
.home-section-head p { margin: .4rem 0 0; color: var(--muted); }

.apy-category-image { position: relative; overflow: hidden; background: #e4ebf6; }
.apy-category-image .apy-cover { position: absolute; inset: 0; transition: transform .35s ease; }
.simple-category-card:hover .apy-category-image .apy-cover { transform: scale(1.05); }
.apy-category-image b { z-index: 2; font-size: .72rem !important; }
.apy-progress { display: block; margin-top: .35rem; color: var(--apy-good); font-size: .75rem; font-weight: 800; }

.apy-home-sample { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; margin: 3rem 0 0; padding: 1.6rem; background: linear-gradient(150deg, #14213d, #24467f); border-radius: 18px; }
.apy-home-sample-copy { color: #fff; }
.apy-home-sample-copy h2 { margin: .4rem 0 .6rem; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.03em; color: #fff; }
.apy-home-sample-copy p { color: #c8d6eb; }
.apy-home-sample .eyebrow { color: #f29a63; }
.apy-home-sample-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.apy-home-sample .test-live-status-bar, .apy-home-sample .apy-quiz-result { display: none !important; }
.apy-home-sample .test-question-card { margin: 0; }
@media (max-width: 860px) { .apy-home-sample { grid-template-columns: 1fr; padding: 1.1rem; } }


/* ---------- Category: lesson rows with a thumbnail ---------- */
.lesson-row { grid-template-columns: 54px 112px minmax(0, 1fr) auto; border-left-color: var(--apy-orange) !important; color: var(--apy-ink); }
.apy-row-thumb { display: block; width: 112px; height: 72px; overflow: hidden; border-radius: 10px; background: #e4ebf6; }
.lesson-row .apy-visited { color: var(--apy-good) !important; }
.lesson-row.is-visited .lesson-index { color: #fff; background: var(--apy-good); }
.lesson-action { color: var(--apy-orange-text); font-weight: 850; font-size: .85rem; white-space: nowrap; }
.lesson-action::after { content: ' →'; }
@media (max-width: 760px) {
  .lesson-row { grid-template-columns: 44px minmax(0, 1fr); }
  .apy-row-thumb { display: none; }
}

/* ---------- Lesson ---------- */
.apy-lesson-kicker { margin-top: 1rem; }
.lesson-content-grid > .apy-lesson-side { margin-top: 0; }
.apy-side { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.apy-side .lesson-aside { position: static; }
.apy-side-sticky { position: sticky; top: 90px; display: grid; gap: 1rem; }
.apy-toc ol, .apy-side-list ol, .apy-side-list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .1rem; }
.apy-toc a, .apy-side-list a { display: block; padding: .45rem .6rem; color: inherit; border-radius: 8px; font-size: .88rem; font-weight: 650; text-decoration: none; line-height: 1.35; }
.apy-toc a:hover, .apy-side-list a:hover { background: rgba(20,33,61,.06); }
.apy-toc a.is-active, .apy-toc a[aria-current], .apy-side-list a[aria-current] { color: var(--apy-orange-text); background: var(--apy-orange-soft); font-weight: 850; }
.apy-side-list small { color: var(--muted); font-weight: 600; }
.apy-side-cta { background: linear-gradient(150deg, #14213d, #24467f) !important; color: #fff !important; border: 0 !important; }
.apy-side-cta p { color: #c8d6eb !important; }
.apy-side-cta .button-primary { color: #fff; background: var(--apy-orange-btn); }
.apy-side h3 { margin: 0; font-size: 1rem; }
.apy-practice-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.apy-practice-links .button { width: auto !important; }
.lesson-content h2 { scroll-margin-top: 90px; }
.uk-table-wrap { max-width: 100%; overflow-x: auto; }
.lesson-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .92rem; }
.lesson-content th, .lesson-content td { padding: .55rem .7rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.lesson-content th { background: #f3f6fb; }
html[data-theme="dark"] .lesson-content th { background: #16233f; }
.lesson-content blockquote { margin: 1.2rem 0; padding: .9rem 1.1rem; background: var(--apy-orange-soft); border-left: 4px solid var(--apy-orange); border-radius: 0 12px 12px 0; }
.lesson-content blockquote p { margin: 0; }
@media (max-width: 1000px) {
  .lesson-content-grid { grid-template-columns: 1fr; }
  .apy-side-sticky { position: static; }
  .apy-lesson-side .apy-toc { display: none; }
}

/* Lesson / sign figures */
.apy-figure { margin: 1.4rem 0; }
.apy-figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.apy-figure figcaption { margin-top: .45rem; color: var(--muted); font-size: .82rem; text-align: center; }
.apy-figure.is-sign img { width: auto; max-width: 160px; max-height: 160px; margin: 0 auto; padding: .8rem; }
.apy-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.apy-gallery-grid .apy-figure { margin: 0; }

/* ---------- Quiz ---------- */
.apy-quiz { display: grid; gap: .9rem; }
.apy-quiz .test-live-status-bar { position: sticky; top: .5rem; z-index: 5; }
.live-status-info .is-good { color: var(--apy-good); }
.live-status-info .is-bad { color: var(--apy-bad); }
.apy-timer { font-variant-numeric: tabular-nums; }
.apy-timer.is-low strong { color: var(--apy-bad); }
.apy-q-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.apy-new-badge { display: inline-flex; padding: .2rem .55rem; color: var(--apy-orange-text); background: var(--apy-orange-soft); border-radius: 999px; font-size: .7rem; font-weight: 850; }
.apy-q-figure { margin: .4rem 0 .9rem; display: flex; justify-content: center; }
.apy-q-figure img { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.apy-q-figure.is-sign img { width: auto; max-width: 180px; max-height: 180px; padding: .6rem; }
.test-question-card .answer { cursor: pointer; }
.test-question-card .answer.is-selected { border-color: var(--navy-2); background: #eef2f9; }
.test-question-card .answer.is-selected .answer-letter { color: #fff; background: var(--navy-2); }
html[data-theme="dark"] .test-question-card .answer.is-selected { background: #1a2b4f; }
.test-question-card .answer.is-wrong { color: #9a3412; background: #fff7ed; border-color: #fb923c; }
.test-question-card .answer.is-wrong .answer-letter { color: #fff; background: #ea580c; }
html[data-theme="dark"] .test-question-card .answer.is-wrong { color: #fed7aa; background: #3a1d0b; }
.quiz-feedback { margin-top: .9rem; padding: .9rem 1rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
html[data-theme="dark"] .quiz-feedback { background: #0f1a33; }
.feedback-title { display: block; margin-bottom: .35rem; }
.feedback-title.is-good { color: var(--apy-good); }
.feedback-title.is-bad { color: var(--apy-bad); }
.apy-rationale { margin-top: .7rem; }
.apy-rationale summary { cursor: pointer; color: var(--navy-2); font-size: .88rem; font-weight: 800; }
.apy-rationale ul { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.apy-rationale li { margin: .3rem 0; }
.apy-rationale li.is-right strong { color: var(--apy-good); }
.apy-rationale li.is-wrong strong { color: var(--apy-bad); }
.apy-q-source { margin: .7rem 0 0; font-size: .8rem; color: var(--muted); }
.apy-q-source a { color: var(--navy-2); font-weight: 700; }

/* Exam start, finish and result */
.apy-exam-start, .apy-quiz-result { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.6rem; align-items: center; padding: 1.8rem; background: var(--apy-card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 40px rgba(20,33,61,.08); }
.apy-exam-mascot, .apy-result-mascot { width: 100%; height: auto; filter: drop-shadow(0 12px 20px rgba(20,33,61,.18)); }
.apy-exam-start h2, .apy-quiz-result h2 { margin: .35rem 0 .8rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.03em; }
.apy-exam-start p { color: var(--muted); }
.apy-exam-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.apy-exam-facts li { display: grid; padding: .7rem; text-align: center; background: #f3f6fb; border-radius: 12px; }
html[data-theme="dark"] .apy-exam-facts li { background: #16233f; }
.apy-exam-facts strong { color: var(--navy); font-size: 1.6rem; line-height: 1.1; }
html[data-theme="dark"] .apy-exam-facts strong { color: #fff; }
.apy-exam-facts span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.apy-exam-timing { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0 0 1.1rem; padding: 0; border: 0; }
.apy-exam-timing legend { width: 100%; margin-bottom: .3rem; font-size: .8rem; font-weight: 800; color: var(--muted); }
.apy-exam-timing label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; cursor: pointer; }
.apy-exam-begin { min-width: 220px; }
.apy-quiz-finish { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; background: var(--apy-orange-soft); border-radius: 14px; }
.apy-quiz-finish p { margin: 0; font-weight: 700; }
.apy-quiz-result { scroll-margin-top: 80px; }
.apy-quiz-result.is-pass { border-color: #86efac; }
.apy-quiz-result.is-fail { border-color: #fdba74; }
.apy-result-score { margin: 0 0 .4rem; font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.apy-result-score strong { color: var(--apy-ink); font-size: 2.6rem; letter-spacing: -.04em; }
.apy-result-topics h3 { margin: 1rem 0 .4rem; font-size: 1rem; }
.apy-result-topics ul { margin: 0; padding-left: 1.1rem; }
.apy-result-topics li { margin: .25rem 0; }
.apy-result-topics a { font-weight: 800; color: var(--navy-2); }
.apy-result-topics small { margin-left: .35rem; color: var(--muted); }
.apy-result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.pass-tag.tag-pass { color: #166534; background: #dcfce7; }
.pass-tag.tag-fail { color: #9a3412; background: #ffedd5; }
@media (max-width: 680px) {
  .apy-exam-start, .apy-quiz-result { grid-template-columns: 1fr; padding: 1.2rem; text-align: left; }
  .apy-exam-mascot, .apy-result-mascot { width: 130px; justify-self: center; }
  .apy-exam-begin { width: 100%; }
}

/* Tests index */
.apy-mock-next { padding: .8rem 1rem; background: var(--apy-orange-soft); border-radius: 12px; font-weight: 700; }
.apy-mock-next a { color: var(--apy-orange-text); font-weight: 850; }
.apy-mock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .7rem; margin: 0; padding: 0; list-style: none; }
.apy-mock-tile { position: relative; display: grid; place-items: center; gap: .1rem; min-height: 96px; padding: .8rem .4rem; color: var(--apy-ink); background: var(--apy-card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.apy-mock-tile small { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.apy-mock-tile strong { font-size: 1.8rem; line-height: 1; color: var(--navy); }
html[data-theme="dark"] .apy-mock-tile strong { color: #fff; }
.apy-mock-tile:hover { transform: translateY(-2px); border-color: var(--apy-orange); box-shadow: 0 10px 24px rgba(20,33,61,.1); }
.apy-mock-score { padding: .1rem .45rem; color: #9a3412; background: #ffedd5; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.apy-mock-tile.is-passed { border-color: #86efac; }
.apy-mock-tile.is-passed .apy-mock-score { color: #166534; background: #dcfce7; }
.apy-hero-actions .button-primary, .category-hero-copy .button-primary { box-shadow: 0 10px 24px rgba(207,85,32,.3); }

/* ---------- Signs ---------- */
a.sign-card { color: var(--apy-ink); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
a.sign-card:hover { transform: translateY(-2px); border-color: var(--apy-orange); box-shadow: 0 10px 24px rgba(20,33,61,.1); }
.sign-image img { max-width: 100%; max-height: 140px; width: auto; height: auto; object-fit: contain; }
.sign-copy h3 { font-size: .98rem; }
.sign-detail-link { margin-top: auto; color: var(--apy-orange-text); font-size: .8rem; font-weight: 850; }
.sign-cat-badge { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-filter { color: inherit; text-decoration: none; }
.sidebar-filter.active { color: var(--apy-orange-text); background: var(--apy-orange-soft); }
.apy-sign-section { margin-bottom: 2.2rem; }
.apy-sign-section .content-section-head p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.apy-sign-section h2 a { color: inherit; text-decoration: none; }
.apy-sign-section h2 a:hover { color: var(--apy-orange-text); }
.result-line button.reset-filter-link { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.apy-sign-hero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; align-items: center; margin: 1.2rem 0 2rem; padding: 2rem; background: var(--apy-card); border: 1px solid var(--line); border-radius: 20px; }
.apy-sign-figure { display: grid; place-items: center; margin: 0; padding: 1.4rem; background: linear-gradient(145deg, #f8f9fc, #eef4fb); border-radius: 16px; }
.apy-sign-figure img { width: auto; max-width: 100%; max-height: 220px; height: auto; }
.apy-sign-copy h1 { margin: .6rem 0 .6rem; font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.04em; }
.apy-sign-meaning { font-size: 1.05rem; color: var(--muted); }
.apy-sign-lessons a { color: var(--navy-2); font-weight: 800; }
@media (max-width: 720px) { .apy-sign-hero { grid-template-columns: 1fr; padding: 1.2rem; } .apy-sign-figure img { max-height: 160px; } }

/* ---------- Blog ---------- */
.blog-card { color: inherit; text-decoration: none; }
.blog-card-thumb { background: linear-gradient(135deg, #24467f, #14213d); }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-image { background-color: #24467f; }
.apy-blog-soon { margin-top: 1.5rem; }

/* ---------- 404, about ---------- */
.apy-404 { border-color: var(--line) !important; }
.apy-404 img { width: 180px; height: auto; margin: 0 auto .6rem; display: block; }
.apy-404 h1 { margin: .4rem 0 .6rem; }
.apy-404 .apy-hero-actions { justify-content: center; }
.apy-about { margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.footer-independent { font-size: .78rem; opacity: .8; }
.footer-cookie-link { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; text-decoration: underline; }

/* ==========================================================================
   2026-11-13 review round: home layout, type, contrast, focus, footer, phones
   ========================================================================== */
/* Modern system font stack (no web-font download); Rumo used Trebuchet MS. */
body, button, input, select, textarea { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif; }
h1, h2, h3, .slide-title, .category-hero-copy h1, .lesson-page-title, .blog-single-title { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif; }

/* Visible keyboard focus everywhere (orange ring, also on dark bands) */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--apy-orange); outline-offset: 2px; border-radius: 6px; }

/* Header CTA: one flex item for the words (no double gap) */
.apy-header-cta { gap: .4rem; }

/* Eyebrow pills on light backgrounds: darker text */
.category-hero-modern .eyebrow, .quiz-hero .eyebrow { color: #9a3f15; }

/* Quiz question heading (h2 on test pages, h3 on the home sample) */
.test-question-card .apy-q-stem { margin: .5rem 0 .9rem; color: var(--apy-ink); font-size: clamp(1.05rem, 1.8vw, 1.22rem); line-height: 1.4; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Home ---------- */
.apy-home { padding-top: 1.4rem; }
.apy-home-section { margin-top: var(--apy-section-gap); }
.apy-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .6rem 1.5rem; margin-bottom: 1.2rem; }
.apy-section-head h2 { margin: 0; color: var(--apy-ink); font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -.035em; }
.apy-section-head p { margin: .35rem 0 0; color: var(--muted); font-size: .98rem; }
.apy-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--apy-orange-text); font-weight: 850; text-decoration: none; }
.apy-more:hover { text-decoration: underline; }

.apy-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: 2rem; align-items: center; overflow: hidden; padding: clamp(1.5rem, 4vw, 3rem); color: #fff; background: radial-gradient(120% 140% at 100% 0%, #2a4f8a 0%, #14213d 55%, #0f1a33 100%); border-radius: 22px; box-shadow: 0 24px 60px rgba(20,33,61,.22); }
.apy-hero::after { content: ''; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border: 60px solid rgba(232,105,45,.12); border-radius: 50%; pointer-events: none; }
.apy-hero-copy { position: relative; z-index: 1; }
.apy-hero-kicker { display: inline-block; padding: .35rem .7rem; color: #ffd9c2; background: rgba(232,105,45,.18); border: 1px solid rgba(242,154,99,.35); border-radius: 999px; font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.apy-hero h1 { margin: .9rem 0 .7rem; color: #fff; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -.045em; }
.apy-hero-lead { max-width: 620px; margin: 0; color: #d3dff2; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.55; }
.apy-format { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.apy-format li { display: flex; align-items: baseline; gap: .4rem; padding: .55rem .9rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; }
.apy-format strong { color: #fff; font-size: 1.5rem; line-height: 1; }
.apy-format span { color: #c8d6eb; font-size: .9rem; font-weight: 700; }
.apy-hero-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.apy-hero-buttons .button { min-height: 52px; padding-inline: 1.4rem; font-size: 1.02rem; }
.apy-hero-buttons .button-secondary { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }
.apy-hero-buttons .button-secondary:hover { background: rgba(255,255,255,.16); }
.apy-hero .apy-resume { margin: 1rem 0 0; color: #14213d; }
.apy-trust { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1.3rem 0 0; padding: 0; list-style: none; color: #c8d6eb; font-size: .88rem; font-weight: 700; }
.apy-trust li { display: inline-flex; align-items: center; gap: .35rem; }
.apy-trust svg { color: #4ade80; }
.apy-hero-art { position: relative; z-index: 1; display: grid; place-items: center; }
.apy-hero-art img { width: min(100%, 340px); height: auto; filter: drop-shadow(0 22px 34px rgba(0,0,0,.35)); }

.apy-mock-grid.is-home { grid-template-columns: repeat(6, 1fr); }
.apy-shortcuts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.apy-shortcuts a { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem; color: var(--apy-ink); background: var(--apy-card); border: 1px solid var(--line); border-radius: 999px; font-weight: 800; font-size: .92rem; text-decoration: none; }
.apy-shortcuts a span { color: var(--apy-orange-text); }
.apy-shortcuts a:hover { border-color: var(--apy-orange); }

.apy-home-sample { margin-top: var(--apy-section-gap); }
.apy-home-sample-links { display: none; }
.apy-home-sample:has(.question-answered) .apy-home-sample-links { display: flex; }

/* Category grid: 14 blocks + a CTA card = 5 full rows of 3; bigger, darker text */
.apy-category-grid .simple-category-copy h3 { font-size: 1.08rem; }
.apy-category-grid .simple-category-copy p { font-size: .9rem; color: #475569; }
.apy-category-grid .simple-category-copy > span { font-size: .84rem; color: #334155; font-weight: 750; }
.apy-category-image b { color: #fff !important; background: var(--navy) !important; border-radius: 7px; }
.apy-category-cta { display: flex; color: #fff; background: linear-gradient(150deg, #b8481a, #e8692d) !important; border: 0 !important; }
.apy-category-cta .simple-category-copy { display: grid; align-content: center; gap: .5rem; padding: 1.6rem; }
.apy-category-cta h3, .apy-category-cta p, .apy-category-cta .simple-category-copy > span { color: #fff !important; }
.apy-category-cta .aside-icon { color: #b8481a; background: #fff; }
html[data-theme="dark"] .apy-category-grid .simple-category-copy p, html[data-theme="dark"] .apy-category-grid .simple-category-copy > span { color: #c3cee0; }

.apy-sign-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: .7rem; margin: 0; padding: 0; list-style: none; }
.apy-sign-row a { display: grid; justify-items: center; gap: .45rem; padding: .9rem .5rem; color: var(--apy-ink); background: var(--apy-card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; font-size: .78rem; font-weight: 800; text-align: center; }
.apy-sign-row img { width: auto; height: 64px; object-fit: contain; }
.apy-sign-row a:hover { border-color: var(--apy-orange); }

.apy-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; padding: .4rem 1.5rem; background: var(--apy-card); border: 1px solid var(--line); border-radius: 18px; }
.apy-faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.apy-faq summary { display: flex; justify-content: space-between; gap: 1rem; min-height: 28px; cursor: pointer; list-style: none; color: var(--apy-ink); font-weight: 800; }
.apy-faq summary::-webkit-details-marker { display: none; }
.apy-faq summary::after { content: '+'; color: var(--apy-orange-text); font-size: 1.3rem; line-height: 1; }
.apy-faq details[open] summary::after { content: '–'; }
.apy-faq details p { margin: .6rem 0 0; color: var(--muted); }
.apy-home-about { margin: 2.5rem 0 1rem; padding: 1.4rem 1.6rem; background: #f3f6fb; border-radius: 16px; }
.apy-home-about h2 { margin: 0 0 .4rem; font-size: 1.15rem; }
.apy-home-about p { margin: 0; color: #475569; }
.apy-home-about a { color: var(--navy-2); font-weight: 800; }
html[data-theme="dark"] .apy-home-about { background: #16233f; }
html[data-theme="dark"] .apy-home-about p { color: #c3cee0; }

@media (max-width: 980px) {
  .apy-mock-grid.is-home { grid-template-columns: repeat(4, 1fr); }
  .apy-sign-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  :root { --apy-section-gap: 2.6rem; }
  .apy-home { padding-top: .8rem; }
  .apy-hero { grid-template-columns: 1fr; gap: 0; border-radius: 18px; }
  .apy-hero-art { position: absolute; top: 1rem; right: .6rem; opacity: .9; }
  .apy-hero-art img { width: 92px; }
  .apy-hero-kicker { max-width: calc(100% - 100px); }
  .apy-hero h1 { padding-right: 0; }
  .apy-hero-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .apy-hero-buttons .button { padding-inline: .5rem; font-size: .9rem; white-space: nowrap; }
  .apy-hero-kicker { font-size: .64rem; letter-spacing: .05em; }
  .apy-format li { flex: 1 1 0; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem .3rem; }
  .apy-format span { font-size: .78rem; }
  .apy-mock-grid.is-home { grid-template-columns: repeat(4, 1fr); gap: .5rem; }
  .apy-mock-tile { min-height: 72px; }
  .apy-mock-tile strong { font-size: 1.45rem; }
  /* Syllabus as a compact list: small picture left, title + meta right */
  .apy-category-grid { grid-template-columns: 1fr !important; gap: .55rem; }
  .apy-category-grid .simple-category-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; border-radius: 14px; }
  .apy-category-grid .simple-category-image { height: 100%; min-height: 84px; }
  .apy-category-grid .simple-category-image b { top: .35rem; right: auto; left: .35rem; font-size: .62rem !important; }
  .apy-category-grid .simple-category-copy { padding: .7rem .85rem; }
  .apy-category-grid .simple-category-copy h3 { margin: 0; font-size: 1rem; }
  .apy-category-grid .simple-category-copy p { display: none; }
  .apy-category-grid .simple-category-copy > span { font-size: .82rem; }
  .apy-category-cta { display: block; }
  .apy-category-cta .simple-category-copy { padding: 1.1rem; }
  .apy-category-cta .simple-category-copy p { display: block; }
  .apy-sign-row { grid-template-columns: repeat(4, 1fr); gap: .45rem; }
  .apy-sign-row img { height: 48px; }
  .apy-faq-grid { grid-template-columns: 1fr; padding: .2rem 1rem; }
  .apy-home-sample { padding: 1rem; }
}

/* Phones: sticky "start a test" bar (shown by site.js after the first screen) */
.apy-mobile-cta { display: none; }
@media (max-width: 760px) {
  .apy-mobile-cta { position: fixed; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 60; display: flex; min-height: 52px; box-shadow: 0 12px 30px rgba(20,33,61,.35); transform: translateY(150%); transition: transform .25s ease; }
  .apy-mobile-cta.is-shown { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .apy-mobile-cta { transition: none; } }

/* ---------- Footer: brand navy, readable secondary text ---------- */
.site-footer.site-footer-updated { background: #14213d !important; }
.site-footer-updated .footer-bottom { background: #0f1a33 !important; }
.site-footer-updated p, .site-footer-updated .footer-bottom, .footer-independent, .footer-slogan { color: #b4c0d4 !important; }
.site-footer-updated .footer-column a { color: #e2e8f0; }
.footer-title { margin: 0 0 .35rem; color: #f8fafc !important; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
/* ---------- Blog post: contents, end-of-post CTA, related lessons, filters ---------- */
.apy-post-toc { margin: 0 0 1.6rem; padding: 1rem 1.2rem; background: #f3f6fb; border-left: 4px solid var(--apy-orange); border-radius: 0 12px 12px 0; }
.apy-post-toc-title { margin: 0 0 .4rem; color: var(--apy-ink); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.apy-post-toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.apy-post-toc a { color: var(--navy-2); font-weight: 700; text-decoration: none; }
.apy-post-toc a:hover { text-decoration: underline; }
html[data-theme="dark"] .apy-post-toc { background: #16233f; }
.blog-body-content h2 { scroll-margin-top: 90px; }
.apy-post-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0 0; padding: 1.3rem 1.4rem; color: #fff; background: linear-gradient(150deg, #14213d, #24467f); border-radius: 16px; }
.apy-post-cta strong { font-size: 1.15rem; }
.apy-post-cta p { margin: .3rem 0 0; color: #c8d6eb !important; font-size: .92rem; }
.apy-post-lessons { margin-top: 2rem; }
.apy-post-lessons h2 { margin: 0 0 .9rem; font-size: 1.25rem; }
.apy-post-lessons .lesson-row { grid-template-columns: 44px 96px minmax(0, 1fr); }
.apy-post-lessons .lesson-action { display: none; }
.apy-post-lessons .apy-row-thumb { width: 96px; height: 62px; }
.apy-blog-filters { margin: 0 0 1.1rem; }
.apy-blog-filters .filter-button { cursor: pointer; font: inherit; font-weight: 750; }
.apy-blog-filters .filter-button.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.apy-blog-filters .filter-button.active span { color: #c8d6eb; }
.blog-card[hidden] { display: none !important; }
@media (max-width: 760px) { .apy-post-lessons .lesson-row { grid-template-columns: 44px minmax(0, 1fr); } }
.apy-blog-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.blog-card-thumb { padding: 0 !important; overflow: hidden; aspect-ratio: 16 / 9; height: auto !important; }
.blog-card-thumb img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; border-radius: 0 !important; transition: transform .3s ease; }
.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }
/* Category hero with the block's photo behind a navy gradient */
.category-hero-modern.apy-hero-photo { background-image: linear-gradient(98deg, #0f1a33 0%, rgba(15,26,51,.94) 40%, rgba(15,26,51,.72) 70%, rgba(15,26,51,.45) 100%), var(--apy-hero-photo) !important; background-size: cover !important; background-position: center !important; }
@media (max-width: 760px) { .category-hero-modern.apy-hero-photo { background-image: linear-gradient(180deg, rgba(15,26,51,.78) 0%, #0f1a33 85%), var(--apy-hero-photo) !important; } }
/* ==========================================================================
   Lesson page (review round 2026-11-13): reading width, headings, callouts,
   glossary cards, media tabs, check questions, progress, finished card
   ========================================================================== */
.apy-read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 3px; background: transparent; pointer-events: none; }
.apy-read-progress span { display: block; width: 0; height: 100%; background: var(--apy-orange); transition: width .1s linear; }
.apy-lesson .lesson-meta-line { flex-wrap: wrap; }
.apy-jump-test { color: var(--apy-orange-text) !important; font-weight: 850; }

/* Reading: shorter lines, bigger and darker text */
.apy-lesson .lesson-editorial-card { padding: clamp(1.1rem, 3vw, 2.2rem); }
/* Text uses the full width of its card. */
.apy-lesson .lesson-content p, .apy-lesson .lesson-content li { color: #2a3348; font-size: 1.05rem; line-height: 1.72; }
.apy-lesson .lesson-content li + li { margin-top: .35rem; }
html[data-theme="dark"] .apy-lesson .lesson-content p, html[data-theme="dark"] .apy-lesson .lesson-content li { color: #d6deeb; }

/* Headings: h2 big navy with an orange bar; h3 plain bold (no pill box) */
.apy-lesson .lesson-editorial-card .lesson-content h2 { margin: 2.4rem 0 .9rem; padding: 0 0 0 .8rem; color: var(--navy); background: none; border: 0; border-left: 4px solid var(--apy-orange); border-radius: 0; font-size: clamp(1.35rem, 2.4vw, 1.65rem); letter-spacing: -.02em; }
.apy-lesson .lesson-editorial-card .lesson-content > h2:first-child { margin-top: 0; }
.apy-lesson .lesson-editorial-card .lesson-content h3 { margin: 2rem 0 .6rem; padding: 0; color: var(--navy); background: none; border: 0; border-radius: 0; font-size: 1.18rem; font-weight: 850; }
html[data-theme="dark"] .apy-lesson .lesson-editorial-card .lesson-content h2, html[data-theme="dark"] .apy-lesson .lesson-editorial-card .lesson-content h3 { color: #fff; background: none; }

/* Glossary lists ("**Term**: definition") as cards */
.lesson-content ul.apy-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0 1.4rem; padding: 0; list-style: none; }
.lesson-content ul.apy-terms > li { margin: 0 !important; padding: .85rem 1rem; background: #f8fafc; border: 1px solid var(--line); border-top: 3px solid var(--navy-2); border-radius: 12px; font-size: .97rem !important; line-height: 1.6 !important; }
.lesson-content ul.apy-terms > li::marker { content: ''; }
.lesson-content .apy-term { display: block; margin-bottom: .2rem; color: var(--navy); font-size: 1.04rem; }
html[data-theme="dark"] .lesson-content ul.apy-terms > li { background: #111c33; }
html[data-theme="dark"] .lesson-content .apy-term { color: #fff; }
@media (max-width: 760px) { .lesson-content ul.apy-terms { grid-template-columns: 1fr; } }

/* "En 30 segundos" summary */
.apy-summary { border-left-color: var(--apy-orange) !important; }
.apy-summary ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.apy-summary li { margin: .25rem 0; color: #1e293b; line-height: 1.55; }
html[data-theme="dark"] .apy-summary li { color: #d6deeb; }

/* Key figures box */
.apy-cifras { padding: 1.2rem 1.3rem; background: var(--apy-card); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 16px; }
.apy-cifras h2, .apy-callout h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; margin: 0 0 .8rem; color: var(--navy); font-size: 1.3rem; }
.apy-cifras h2 small, .apy-callout h2 small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.apy-cifras h2 > span { display: inline-grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--navy); border-radius: 8px; font-size: .95rem; }
.apy-cifras table { margin: .4rem 0; }
.apy-cifras td:last-child, .apy-cifras th[scope="row"] + td { font-weight: 800; color: var(--navy); }
.apy-cifras .lesson-content > p { font-size: .95rem; }
html[data-theme="dark"] .apy-cifras h2, html[data-theme="dark"] .apy-callout h2, html[data-theme="dark"] .apy-cifras td:last-child { color: #fff; }

/* Callouts: exam traps (warning cards) and 2026 news */
.apy-callout { padding: 1.2rem 1.3rem; border-radius: 16px; }
.apy-callout-warn { background: #fff7ed; border: 1px solid #fed7aa; }
.apy-callout-warn h2 { color: #9a3412 !important; }
.apy-callout-warn ul { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.apy-callout-warn li { position: relative; padding: .75rem .9rem .75rem 2.6rem; background: #fff; border: 1px solid #fed7aa; border-left: 4px solid var(--apy-orange); border-radius: 10px; line-height: 1.55; }
.apy-callout-warn li::before { content: '!'; position: absolute; left: .8rem; top: .75rem; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; color: #fff; background: var(--apy-orange-btn); border-radius: 50%; font-size: .8rem; font-weight: 900; }
.apy-callout-new { background: #eef2f9; border: 1px solid #d6deec; }
.apy-callout-new ul { margin: 0; padding-left: 1.1rem; }
html[data-theme="dark"] .apy-callout-warn { background: #2a1608; border-color: #7c2d12; }
html[data-theme="dark"] .apy-callout-warn li { background: #1c1209; border-color: #7c2d12; color: #fde7d6; }
html[data-theme="dark"] .apy-callout-new { background: #16233f; border-color: #2a4f8a; }

/* Video / slides tabs */
.apy-media-tabs { overflow: hidden; background: #0f1a33; border-radius: 16px; }
.apy-media-tablist { display: flex; gap: .3rem; padding: .45rem; background: #14213d; }
.apy-media-tablist button { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .4rem 1rem; color: #c8d6eb; background: transparent; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 800; }
.apy-media-tablist button[aria-selected="true"] { color: #fff; background: var(--apy-orange-btn); }
.apy-media-tablist small { opacity: .8; font-weight: 700; }
.apy-media-panel .lesson-video-player { margin: 0; border-radius: 0; }
.apy-media-panel video { display: block; width: 100%; }
.apy-media-panel.lesson-study-slides { padding: .6rem; background: #fff; }

/* Inline pictures between subsections */
.apy-lesson .apy-figure.is-inline { max-width: 560px; margin: 1.4rem auto; }

/* "¿Lo tienes?" check question */
.apy-mini-quiz { margin: 1.8rem 0; padding: 1rem; background: #f3f6fb; border: 1px dashed #b3c8ec; border-radius: 16px; }
.apy-mini-quiz-label { margin: 0 0 .6rem !important; color: var(--navy) !important; font-size: .9rem !important; font-weight: 850; }
.apy-mini-quiz .test-live-status-bar, .apy-mini-quiz .apy-quiz-result, .apy-mini-quiz legend { display: none !important; }
.apy-mini-quiz .test-question-card { margin: 0; box-shadow: none; }
.apy-mini-quiz .apy-q-figure img { max-width: 420px; }
html[data-theme="dark"] .apy-mini-quiz { background: #16233f; border-color: #2a4f8a; }

/* Practice card: best score from this browser */
.apy-test-score { margin-left: .5rem; padding: .05rem .45rem; color: #14213d; background: #fff; border-radius: 999px; font-size: .78rem; font-weight: 850; }
.apy-practice-links a.is-passed .apy-test-score { color: #166534; background: #dcfce7; }

/* Lesson finished card */
.apy-lesson-done { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.1rem; align-items: start; padding: 1.4rem; background: var(--apy-card); border: 1px solid #86efac; border-radius: 18px; }
.apy-lesson-done-icon { display: grid; place-items: center; width: 52px; height: 52px; color: #fff; background: #16a34a; border-radius: 50%; font-size: 1.6rem; font-weight: 900; }
.apy-lesson-done h2 { margin: 0 0 .3rem; font-size: 1.3rem; }
.apy-lesson-done p { margin: 0; color: var(--muted); }
.apy-lesson-done-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.apy-lesson-done-back { margin-top: .9rem !important; font-size: .9rem; }
.apy-lesson-done a:not(.button) { color: var(--navy-2); font-weight: 800; }
@media (max-width: 560px) { .apy-lesson-done { grid-template-columns: 1fr; } .apy-lesson-done-actions .button { width: 100%; } }

/* Contents: nested h3 entries; mobile collapsible list */
.apy-side-title { margin: 0 0 .5rem; font-size: 1rem; font-weight: 850; }
.apy-toc li.is-h3 a, .apy-toc-mobile li.is-h3 a { padding-left: 1.4rem; font-size: .82rem; font-weight: 600; opacity: .9; }
.apy-toc { max-height: calc(100vh - 140px); overflow: auto; }
.apy-toc-mobile { display: none; margin: 1rem 0 0; background: var(--apy-card); border: 1px solid var(--line); border-radius: 14px; }
.apy-toc-mobile summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: .6rem 1rem; cursor: pointer; list-style: none; font-weight: 850; color: var(--apy-ink); }
.apy-toc-mobile summary::-webkit-details-marker { display: none; }
.apy-toc-mobile summary::after { content: '▾'; color: var(--apy-orange-text); }
.apy-toc-mobile[open] summary::after { content: '▴'; }
.apy-toc-mobile ol { margin: 0; padding: 0 .6rem .7rem; list-style: none; }
.apy-toc-mobile a { display: block; padding: .5rem .6rem; color: var(--apy-ink); border-radius: 8px; text-decoration: none; font-weight: 700; }
.apy-toc-mobile a.is-active { color: var(--apy-orange-text); background: var(--apy-orange-soft); }
.apy-side-list a { display: flex; justify-content: space-between; gap: .5rem; }
.apy-side-list .apy-visited { color: #4ade80; font-weight: 900; }
@media (max-width: 1000px) { .apy-toc-mobile { display: block; } }
@media (max-width: 760px) {
  .apy-lesson .lesson-content p, .apy-lesson .lesson-content li { font-size: 1rem; }
  .apy-media-tablist button { flex: 1; justify-content: center; }
}

details.apy-cifras > summary { display: block; cursor: pointer; list-style: none; }
details.apy-cifras > summary::-webkit-details-marker { display: none; }
details.apy-cifras > summary h2 { margin: 0; }
details.apy-cifras > summary h2::after { content: '▾'; margin-left: auto; color: var(--apy-orange-text); font-size: 1rem; }
details.apy-cifras[open] > summary h2::after { content: '▴'; }
details.apy-cifras[open] > summary { margin-bottom: .8rem; }
/* Picture zoom (site.js) */
img.is-zoomable { cursor: zoom-in; transition: filter .15s ease; }
img.is-zoomable:hover { filter: brightness(1.04); }
.apy-lightbox { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 64px 16px 24px; background: rgba(8, 14, 28, .9); cursor: zoom-out; }
.apy-lightbox[hidden] { display: none; }
.apy-lightbox figure { display: grid; justify-items: center; gap: .7rem; max-width: min(1400px, 100%); margin: 0; }
.apy-lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.apy-lightbox figcaption { max-width: 900px; color: #e2e8f0; font-size: .95rem; text-align: center; cursor: default; }
.apy-lightbox-close { position: fixed; top: 14px; right: 16px; display: grid; place-items: center; width: 46px; height: 46px; color: #14213d; background: #fff; border: 0; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
html.apy-lightbox-open { overflow: hidden; }
@keyframes apy-fade { from { opacity: 0; } to { opacity: 1; } }
.apy-lesson .lesson-content p, .apy-lesson .lesson-content li, .apy-lesson .lesson-content ul, .apy-lesson .lesson-content ol { max-width: none !important; }
.apy-lesson .lesson-content { max-width: none !important; }

/* Lesson header: lesson number, reading time, tests and the jump link on one compact line under the video */
.apy-lesson .lesson-video-top { margin-bottom: .7rem; }
.apy-lesson-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: 0 0 1rem !important; padding: 0; font-size: .86rem; }
.apy-lesson-meta > * + *::before { content: ''; }
.apy-lesson-meta .apy-lesson-kicker { margin: 0; padding: .15rem .55rem; color: var(--apy-orange-text); background: var(--apy-orange-soft); border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
/* Contents card starts level with the slide picture */
.apy-lesson .lesson-content-grid { align-items: start; }
.apy-lesson .lesson-content-grid > .apy-lesson-side { margin-top: 0 !important; padding-top: 0 !important; }
.apy-lesson .lesson-main-column > .lesson-study-slides:first-child { margin-top: 0 !important; padding-top: 0 !important; }
/* Home: link to the driving school directory (autoescuelas.aprobarya.com) */
.apy-home-schools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: var(--apy-section-gap); padding: 1.5rem 1.7rem; background: var(--apy-orange-soft); border: 1px solid #fbd7bd; border-radius: 18px; }
.apy-home-schools .eyebrow { color: var(--apy-orange-text); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.apy-home-schools h2 { margin: .3rem 0 .3rem; color: var(--navy); font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.apy-home-schools p { margin: 0; color: #475569; max-width: 640px; }
html[data-theme="dark"] .apy-home-schools { background: #2a1608; border-color: #7c2d12; }
html[data-theme="dark"] .apy-home-schools h2 { color: #fff; }
html[data-theme="dark"] .apy-home-schools p { color: #d6deeb; }
/* Five menu items: below 1180px the header button would sit under the language selector; the menu has Tests DGT. */
@media (min-width: 821px) and (max-width: 1179px) { .apy-header-cta { display: none !important; } }

/* ---------- Footer 2026-11-14: brand + 4 columns, legal links in the bottom bar ---------- */
.site-footer-updated .footer-main { grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)) !important; gap: 2rem !important; }
.site-footer-updated .footer-brand-updated { grid-column: auto; }
.site-footer-updated .footer-independent a { color: #e2e8f0; }
.site-footer-updated .footer-bottom { align-items: center; flex-wrap: wrap; font-size: .75rem; }
.site-footer-updated .footer-legal-links { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; }
.site-footer-updated .footer-legal-links a, .site-footer-updated .footer-cookie-link { color: #b4c0d4; text-decoration: none; }
.site-footer-updated .footer-legal-links a:hover, .site-footer-updated .footer-cookie-link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 1050px) { .site-footer-updated .footer-main { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .site-footer-updated .footer-brand-updated { grid-column: 1 / -1; } }
@media (max-width: 680px) { .site-footer-updated .footer-main { grid-template-columns: 1fr 1fr !important; } .site-footer-updated .footer-bottom { align-items: flex-start; } }

/* ---------- Header app link 2026-11-14: full button ≥1024px, icon 900–1023px, menu item in the phone menu ---------- */
#header1 .main-nav .apy-nav-app { display: none; }
#header1 .apy-nav-app small { font-weight: 600; opacity: .7; }
@media (min-width: 1024px) and (max-width: 1199px) {
  #header1 .play-store-link { width: 154px !important; min-width: 154px; flex-basis: 154px !important; justify-content: flex-start; padding-inline: .72rem !important; }
  #header1 .play-store-copy { display: grid !important; }
  #header1 .play-store-arrow { display: inline !important; }
}
@media (min-width: 900px) and (max-width: 1023px) { #header1 .play-store-link { display: inline-flex !important; } }
@media (max-width: 899px) { #header1 .play-store-link { display: none !important; } #header1 .main-nav .apy-nav-app { display: flex; } }

/* ---------- Topic page: tests of the block 2026-11-14 ---------- */
.apy-block-tests { margin-top: 2.2rem; }
.apy-block-tests-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.apy-block-tests-list a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .85rem 1rem; border: 1px solid #dde4ef; border-radius: 12px; background: #fff; color: #14213d; font-weight: 750; text-decoration: none; }
.apy-block-tests-list a:hover { border-color: #b8481a; }
.apy-block-tests-list small { color: #55627a; font-weight: 600; }
html[data-theme="dark"] .apy-block-tests-list a { background: #111c31; border-color: #263652; color: #e2e8f0; }
html[data-theme="dark"] .apy-block-tests-list small { color: #9fb0c8; }

/* ---------- Review fixes 2026-11-14: contrast (light and dark), hidden viewer buttons ---------- */
.apy-home-sample .eyebrow { color: var(--apy-orange-text); }
.filter-button.active span { color: #55627a; }
.lesson-row-copy p { color: #55627a; }
.reading-time, .lesson-row-meta, .lesson-meta-time { color: #55627a; }
.reset-filter-link { color: #b42318; }
.fsp-viewer-btn[hidden], .slide-inline-action[hidden] { display: none !important; }
html[data-theme="dark"] .apy-mini-quiz-label { color: #e2e8f0 !important; }
html[data-theme="dark"] .apy-hero .apy-resume { color: #f8fafc; }
html[data-theme="dark"] .apy-callout-warn h2 { color: #fdba74 !important; }
html[data-theme="dark"] .breadcrumbs a, html[data-theme="dark"] .uk-breadcrumbs a, html[data-theme="dark"] .text-link,
html[data-theme="dark"] .blog-card-btn, html[data-theme="dark"] .apy-post-toc a { color: #9cc0ff; }
html[data-theme="dark"] .filter-button.active span { color: #cbd5e1; }
html[data-theme="dark"] .lesson-row-copy p { color: #a7b4c8; }
.lesson-meta { color: #55627a; }
html[data-theme="dark"] .lesson-meta { color: #a7b4c8; }

/* ---------- Test page review 2026-11-14: Spanish answer badges as real text, mobile bar, images ---------- */
.answer.is-picked::after, .answer.is-missed::after { content: none !important; display: none !important; }
.answer-badge { margin-left: auto; padding: .15rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.answer-badge.is-bad { color: #991b1b; background: #fee2e2; }
.answer-badge.is-good { color: #166534; background: #dcfce7; }
html[data-theme="dark"] .answer-badge.is-bad { color: #fecaca; background: #4c1d1d; }
html[data-theme="dark"] .answer-badge.is-good { color: #bbf7d0; background: #14432a; }
.quiz-question.needs-answer::after { content: "Elige una respuesta para continuar." !important; }
.apy-rationale-letter { color: #14213d; }
html[data-theme="dark"] .apy-rationale-letter { color: #e2e8f0; }
.apy-result-misses { margin: .6rem 0 0; font-weight: 700; }
.apy-result-misses a { font-weight: 800; }
.is-fail .apy-result-mascot { display: none; }
.apy-q-figure img { max-height: 280px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 480px) {
  .answer { flex-wrap: wrap; }
  .answer-badge { flex-basis: 100%; margin: .2rem 0 0; padding: 0; background: none !important; }
  .live-status-info { flex-wrap: wrap !important; white-space: normal !important; overflow: visible !important; row-gap: .35rem; }
}

/* ---------- Test page technical review 2026-11-14 ---------- */
/* overflow-x:hidden on html/body made body the scroll box, so the quiz bar never stuck. */
html, body { overflow-x: clip !important; }
html { scroll-padding-top: 110px; }
.answer.is-correct .answer-letter { background: #047857 !important; }
html[data-theme="dark"] .answer.is-correct .answer-letter { background: #059669 !important; color: #fff !important; }
.apy-rationale summary { display: block; min-height: 44px; padding: .65rem 0; cursor: pointer; }
.apy-side-list a { min-height: 44px; display: flex; align-items: center; }
html[data-theme="dark"] .apy-side-list { background: #111c31 !important; color: #e2e8f0; border-color: #263652; }
html[data-theme="dark"] .apy-side-list a, html[data-theme="dark"] .apy-side-list h2, html[data-theme="dark"] .apy-side-list h3 { color: #e2e8f0; }
html[data-theme="dark"] .apy-side-list [aria-current] { background: #1c2c4a; color: #fff; }
html[data-theme="dark"] .apy-rationale summary, html[data-theme="dark"] .apy-q-source a { color: #9cc0ff; }
html[data-theme="dark"] .apy-result-score { color: #a7b4c8; }
@media (max-width: 480px) { html { scroll-padding-top: 130px; } }
/* Test page aside titles are h2 (they came after the 25 question h2s as h3). */
.lesson-practice-card h2 { position: relative; z-index: 1; color: #fff; }
.apy-side h2 { margin: 0; font-size: 1rem; line-height: 1.3; }
/* "Por qué cada respuesta": one verdict label per option (the bank's own prefixes are dropped in content.php). */
.apy-rationale-verdict { font-weight: 800; }
.apy-rationale li.is-right .apy-rationale-verdict { color: #047857; }
.apy-rationale li.is-wrong .apy-rationale-verdict { color: #b42318; }
html[data-theme="dark"] .apy-rationale li.is-right .apy-rationale-verdict { color: #6ee7b7; }
html[data-theme="dark"] .apy-rationale li.is-wrong .apy-rationale-verdict { color: #fca5a5; }

/* ---------- Footer bottom bar 2026-11-14: one line on the footer navy (no darker box in the content width), readable note ---------- */
.site-footer-updated .footer-bottom { background: transparent !important; border-top: 1px solid rgba(255,255,255,.12); padding: 1.1rem 0 1.6rem; }
.site-footer-updated .footer-independent { color: #b4c0d4 !important; opacity: 1; }
.site-footer-updated .footer-app-button small { color: #b4c0d4 !important; }
