/* Locale navigation and notices share tokens with the translated reading pages. */
:root {
  --locale-ink: var(--brand-ink, var(--ink, #0E1827));
  --locale-muted: var(--brand-ink-2, var(--muted, #46586B));
  --locale-bg: var(--brand-ground, var(--canvas, #F2F7FA));
  --locale-surface: var(--brand-surface, var(--panel, #fff));
  --locale-line: var(--brand-line, var(--line, #D2DEE4));
  --locale-control-line: var(--brand-line-strong, var(--line-strong, #6B7F92));
  --locale-accent: var(--brand-primary, var(--teal, #00756D));
  --locale-action: var(--brand-primary, var(--teal, #00756D));
  --locale-on-action: var(--brand-on-primary, var(--action-foreground, #fff));
  --locale-selected: var(--brand-primary-soft, var(--mint, #DCF1EE));
  --locale-focus: var(--brand-tide, var(--focus, #0A6A80));
  --locale-note: #fff8e7;
  --locale-note-line: #d8c69a;
}
html[data-theme="midnight"] {
  --locale-ink: var(--brand-ink, var(--ink, #0E1827));
  --locale-muted: var(--brand-ink-2, var(--muted, #46586B));
  --locale-bg: var(--brand-ground, var(--canvas, #F2F7FA));
  --locale-surface: var(--brand-surface, var(--panel, #fff));
  --locale-line: var(--brand-line, var(--line, #D2DEE4));
  --locale-control-line: var(--brand-line-strong, var(--line-strong, #6B7F92));
  --locale-accent: var(--brand-primary, var(--teal, #00756D));
  --locale-action: var(--brand-primary, var(--teal, #00756D));
  --locale-on-action: var(--brand-on-primary, var(--action-foreground, #fff));
  --locale-selected: var(--brand-primary-soft, var(--mint, #DCF1EE));
  --locale-focus: var(--brand-tide, var(--focus, #0A6A80));
  --locale-note: #342f21;
  --locale-note-line: #897b51;
}
html[lang="es"] {
  color: var(--locale-ink);
  background: var(--locale-bg);
  color-scheme: light;
}
html[lang="es"][data-theme="midnight"] { color-scheme: dark; }
.locale-header, .translation-notice {
  box-sizing: border-box;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  color: var(--locale-ink);
  font: 1rem/1.5 "Be Vietnam Pro", system-ui, sans-serif;
}
.locale-nav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 2px;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  flex: none;
  color: var(--locale-ink);
  font: .875rem/1.5 "Be Vietnam Pro", system-ui, sans-serif;
}
/* Keep language choice within the existing header utilities, not a second bar. */
.locale-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding-block: 10px; }
.locale-brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--locale-ink); font-weight: 800; letter-spacing: -.025em; text-decoration: none; }
.guide-header .guide-wrap { flex-wrap: wrap; gap: 4px 16px; padding-block: 8px; }
.guide-header .guide-brand { margin-right: auto; }
.guide-header .header-cta { max-width: 100%; white-space: normal; }
.topbar > .locale-nav { align-self: flex-end; }
body > .locale-nav { display: flex; }
.site-header nav .locale-nav { color: #d3e8df; }
.site-header nav .locale-nav > span { color: #d3e8df; }
.site-header nav .locale-nav a { font-size: .875rem; }
.locale-nav > span { color: var(--locale-muted); }
.locale-nav a, .translation-notice a, .locale-content a {
  color: var(--locale-accent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.locale-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  text-decoration: none;
}
.locale-nav [aria-current] {
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
.translation-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  margin-block: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: .875rem;
}
.translation-summary { display: contents; }
.translation-label { font-weight: 500; color: var(--locale-muted); }
.translation-correction { display: inline-flex; align-items: center; min-height: 32px; padding-block: 5px; }
.translation-notice p { max-width: 80ch; margin: 8px 0; }
.translation-details { margin: 0; }
.translation-details summary { cursor: pointer; min-height: 32px; padding-block: 5px; color: var(--locale-accent); text-decoration: underline; text-underline-offset: 3px; }
.translation-details[open] { flex-basis: 100%; }
.translation-detail-copy { padding-top: 4px; }
.locale-content {
  width: min(1100px, calc(100% - 32px));
  padding: 32px 0 56px;
  line-height: 1.65;
  color: var(--locale-ink);
  overflow-wrap: anywhere;
}
.locale-content > p, .locale-content section > p { max-width: 76ch; }
.locale-content h1 { max-width: 30ch; margin: 0 0 20px; font-size: clamp(1.9rem, 3.5vw, 2.8rem); line-height: 1.16; letter-spacing: -.035em; }
.locale-content h2 { margin: 30px 0 16px; font-size: clamp(1.45rem, 2.5vw, 1.9rem); line-height: 1.2; letter-spacing: -.025em; }
.locale-content h3 { line-height: 1.35; }
.locale-content section { margin: 36px 0; }
.locale-content section + section { padding-top: 12px; border-top: 1px solid var(--locale-line); }
.locale-content li + li { margin-top: 6px; }
.locale-content .eyebrow { color: var(--locale-accent); }
.locale-content .qa, .locale-content details {
  border: 1px solid var(--locale-line);
  background: var(--locale-surface);
  border-radius: 12px;
  color: var(--locale-ink);
}
.locale-content .qa { padding: clamp(16px, 3vw, 28px); }
.locale-content .qa > :first-child { margin-top: 0; }
.locale-content details { padding: 0 16px; margin: 12px 0; }
.locale-content summary { cursor: pointer; min-height: 48px; padding: 12px 0; font-weight: 650; line-height: 1.5; }
.locale-content details[open] { padding-bottom: 16px; }
.locale-content details[open] > summary { margin-bottom: 12px; border-bottom: 1px solid var(--locale-line); }
.locale-content form { max-width: 720px; }
.locale-content label { display: block; margin-top: 15px; font-weight: 650; }
.locale-content input:not([type=checkbox]), .locale-content select, .locale-content textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--locale-control-line);
  border-radius: 8px;
  font: inherit;
  color: var(--locale-ink);
  background: var(--locale-surface);
}
.locale-content textarea { resize: vertical; }
.locale-content input[type=checkbox] { width: 20px; height: 20px; margin: 2px 10px 0 0; accent-color: var(--locale-accent); flex: none; }
.locale-content .step-check { display: flex; align-items: flex-start; min-height: 44px; padding: 10px 0; }
.locale-content button {
  min-width: 0;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--locale-action);
  border-radius: 9px;
  font: inherit;
  font-weight: 650;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--locale-on-action);
  background: var(--locale-action);
  cursor: pointer;
}
.locale-content button:disabled { cursor: default; opacity: .65; }
/* Disabled selected answers must stay legible after the learner submits. */
.locale-content .study-choices button:disabled { opacity: 1; }
.locale-content form button { margin-top: 18px; }
.locale-content .trap { display: none !important; }
.locale-content .aside-action { display: inline-flex; align-items: center; min-height: 48px; max-width: 100%; white-space: normal; color: var(--locale-on-action); background: var(--locale-action); }
.study-nav, .study-actions, .study-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.study-nav { padding: 12px 0; border-block: 1px solid var(--locale-line); }
.study-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; background: var(--locale-surface); border: 1px solid var(--locale-line); font-weight: 650; }
.appearance-switch button, button.appearance-switch { background: var(--locale-surface); color: var(--locale-ink); border-color: var(--locale-line); }
.appearance-switch button[aria-pressed=true], button.appearance-switch[aria-pressed=true] { background: var(--locale-selected); border-color: var(--locale-accent); }
.study-choices { display: grid; gap: 10px; }
.locale-content .study-choices button { background: var(--locale-surface); color: var(--locale-ink); border-color: var(--locale-control-line); text-align: left; }
.locale-content .study-choices [aria-pressed=true] { background: var(--locale-selected); border-color: var(--locale-accent); box-shadow: inset 0 0 0 2px var(--locale-accent); }
.study-stem { font-size: 1.2rem; font-weight: 600; line-height: 1.5; }
.locale-content #quiz:not(:empty), .locale-content #planResult:not(:empty), .locale-content #skillDraw:not(:empty) { margin-top: 24px; padding: clamp(16px, 3vw, 24px); border: 1px solid var(--locale-line); border-radius: 12px; background: var(--locale-surface); }
.locale-content #quizExplanation:not(:empty) { border-left: 3px solid var(--locale-accent); padding-left: 16px; margin-top: 20px; }
.locale-content #sourceList article + article { margin-top: 28px; }
.locale-content output { font-variant-numeric: tabular-nums; color: var(--locale-ink); }
.locale-content #skillsClock { padding: 6px 12px; font-size: 1.5rem; font-weight: 750; }
.locale-content :focus-visible, .locale-nav a:focus-visible, .translation-notice :focus-visible { outline: 3px solid var(--locale-focus); outline-offset: 4px; }
.locale-content [id] { scroll-margin-top: 20px; }
.locale-content .guide-grid li a { background: var(--locale-surface); color: var(--locale-ink); border-color: var(--locale-line); }
.locale-content .guide-grid span:not(.card-group) { color: var(--locale-muted); }
.locale-content .guide-grid em { color: var(--locale-accent); }
/* Keep illustrated choices distinct from solid action buttons. */
.locale-content .illustrated-choice, .locale-content button.illustrated-choice { padding: 0; background: var(--locale-surface); color: var(--locale-ink); font-weight: 400; border: 1px solid var(--locale-line); border-radius: 14px; }
.locale-content .choice-copy { color: var(--locale-ink); }
.locale-content .choice-copy > strong { color: var(--locale-accent); }
.locale-content .question-prompt-status { color: var(--locale-muted); }
.locale-content button.illustrated-choice[aria-pressed=true] { border-color: var(--locale-accent); box-shadow: 0 0 0 2px var(--locale-accent); }
html[lang="es"] .guide-footer { margin-top: 20px; }
html[lang="es"] .guide-footer a { display: inline-block; padding-block: 8px; }
@media (max-width: 950px) {
  .site-header .header-row { flex-wrap: wrap; gap: 4px 12px; padding-block: 8px; }
  .site-header nav { display: flex; gap: 0; }
  .site-header nav > a { display: none; }
  .site-header .header-cta { max-width: 100%; white-space: normal; }
}
@media (max-width: 600px) {
  .locale-nav { gap: 2px; }
  .locale-nav a { min-width: 0; padding-inline: 4px; }
  .locale-header, .guide-header .guide-wrap { column-gap: 8px; }
  .locale-brand { font-size: 1rem; }
  .guide-header .guide-brand { font-size: 0; order: 1; }
  .guide-header .locale-nav { order: 2; }
  .guide-header .header-cta { order: 3; }
  .translation-notice { column-gap: 10px; }
  .locale-content { padding-top: 24px; }
  .locale-content h1 { font-size: 1.9rem; }
  .locale-content .qa { padding: 16px; }
  .locale-content details { padding-inline: 12px; }
  .study-actions { align-items: stretch; flex-direction: column; }
  .study-actions button { width: 100%; }
  .study-nav { gap: 8px; }
  .study-nav a { padding-inline: 10px; }
  .locale-content .choice-copy { font-size: 1rem; }
}
@media (forced-colors: active) {
  .locale-nav [aria-current], .locale-content .study-choices [aria-pressed=true], .appearance-switch button[aria-pressed=true], button.appearance-switch[aria-pressed=true] { outline: 2px solid CanvasText; outline-offset: -3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
