/* iLanguages — a calm, accessible home for everyday language learning. */
:root {
  color-scheme: light;
  --paper: #f7f7f0;
  --surface: #ffffff;
  --ink: #202d29;
  --muted: #626d66;
  --green: #255443;
  --green-dark: #193e30;
  --green-soft: #e6eee5;
  --line: #dfe3d8;
  --warm: #ece7d9;
  --gold: #d6ad5e;
  --red: #963d36;
  --radius: 16px;
  --shadow: 0 12px 38px rgb(30 54 40 / 5%);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 105px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { color: inherit; }
button { touch-action: manipulation; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-dark); }
img, svg { max-width: 100%; height: auto; }
img { vertical-align: middle; }
audio { max-width: 100%; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #9b6d24; outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 16px; z-index: 100; background: var(--ink); color: white; padding: 10px 18px; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); color: white; }
.container { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgb(247 247 240 / 96%); position: relative; z-index: 10; }
.header-inner { width: min(1280px, calc(100% - 64px)); margin-inline: auto; min-height: 86px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 24px; letter-spacing: -1px; line-height: 1.15; }
.brand:hover { color: var(--green); }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50% 50% 50% 9px; background: var(--green); color: white; font-family: var(--serif); font-size: 25px; font-style: italic; letter-spacing: -2px; padding-inline-end: 2px; }
.primary-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 27px; margin-inline-start: auto; font-size: 14px; }
.primary-nav a { color: var(--muted); text-decoration: none; padding-block: 8px; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--ink); }
.primary-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 9px; }
.locale-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.locale-switch a { color: var(--ink); text-decoration: none; }
.locale-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 36px; padding: 4px 6px; border-radius: 6px; }
.locale-switch a:hover { background: var(--green-soft); }
.locale-switch a[aria-current="true"] { background: var(--green); color: white; }
.brand-dot { color: var(--green); }
.locale-switch select { border: 1px solid var(--line); border-radius: 7px; background: transparent; padding: 7px 9px; max-width: 150px; font-size: 13px; }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 8px; background: transparent; min-height: 44px; padding: 6px 12px; font-size: 14px; }
.hero { padding-block: 82px 60px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.9fr; align-items: center; gap: 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--green); margin: 0 0 20px; text-transform: uppercase; letter-spacing: 2.1px; font-size: 11px; line-height: 1.5; font-weight: 750; }
.eyebrow::before { content: ""; height: 7px; width: 7px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -1.3px; line-height: 1.13; }
h1 { font-size: clamp(38px, 4.5vw, 64px); margin-bottom: 24px; }
.hero h1 { max-width: 700px; }
h1 em, .hero h1 span { color: var(--green); }
h2 { font-size: clamp(29px, 3vw, 39px); margin-bottom: 20px; }
h3 { font-size: 19px; letter-spacing: -.3px; line-height: 1.35; }
h4 { font-size: 16px; }
.hero-copy > p:not(.eyebrow) { max-width: 540px; color: var(--muted); font-size: 17px; line-height: 1.85; margin-bottom: 27px; }
.hero-actions, .button-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button, button[data-audio], button[data-complete], button[data-print] { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: white; text-decoration: none; font-size: 14px; line-height: 1.4; font-weight: 650; padding: 13px 21px; min-height: 46px; transition: background .16s, border-color .16s, transform .16s; }
.button:hover, button[data-audio]:hover, button[data-complete]:hover, button[data-print]:hover { background: var(--green-dark); border-color: var(--green-dark); color: white; }
.button-secondary, .button.button-secondary, button[data-print] { color: var(--green); background: transparent; border-color: #cbd4c6; }
.button-secondary:hover, .button.button-secondary:hover, button[data-print]:hover { background: var(--green-soft); border-color: #b6c6b1; color: var(--green-dark); }
button:disabled, .button[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
button[data-audio] { font-size: 13px; min-height: 40px; padding: 9px 13px; background: transparent; color: var(--green); border-color: #cbd4c6; white-space: nowrap; }
button[data-audio][aria-pressed="true"] { background: var(--green); color: white; }
button[data-complete][aria-pressed="true"] { background: var(--green-soft); color: var(--green); border-color: #b6c6b1; }
.hero-art { position: relative; min-height: 325px; border: 1px solid #dae2d1; border-radius: 48% 48% 35% 35%; background: radial-gradient(ellipse at 50% 55%, #d7e1c9 0, #e8eddb 52%, transparent 72%); isolation: isolate; }
.hero-art::before, .hero-art::after { position: absolute; display: grid; align-content: center; width: 67%; height: 126px; border: 1px solid rgb(96 117 79 / 15%); border-radius: 12px; background: #fffdf6; box-shadow: 0 15px 35px rgb(62 71 39 / 7%); padding-inline: 24px; color: var(--green); font-family: var(--serif); font-size: 40px; line-height: 1.35; }
.hero-art::before { content: "Hello."; white-space: pre; font-size: 48px; inset-block-start: 36px; inset-inline-start: 3%; transform: rotate(-7deg); }
.hero-art::after { content: "Hola.  مرحباً\A Bonjour.  你好"; white-space: pre; font-size: 28px; inset-block-start: 166px; inset-inline-end: -2%; transform: rotate(7deg); background: #e9eedf; }
.stats { display: flex; flex-wrap: wrap; gap: 34px; padding-top: 34px; margin-top: 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.stats > * { margin: 0; }
.stats strong { color: var(--ink); font-size: 23px; font-weight: 600; display: block; line-height: 1.3; letter-spacing: -.6px; }
main > section, .section { padding-block: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 10px; }
.section-heading p { color: var(--muted); margin-bottom: 0; max-width: 650px; }
.section-heading > a { white-space: nowrap; font-size: 14px; }
.language-search { margin-block: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.language-search label { font-weight: 650; font-size: 14px; }
.language-search input, #language-search { background: var(--surface); border: 1px solid #cdd5c8; border-radius: 9px; padding: 14px 18px; width: min(100%, 430px); min-height: 50px; appearance: none; font-size: 15px; }
.language-search input::placeholder, #language-search::placeholder { color: #737c74; }
.language-count, #language-count { font-size: 13px; color: var(--muted); margin-inline-start: auto; }
.language-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.language-card { border: 1px solid var(--line); background: var(--surface); padding: 21px 22px; border-radius: 11px; color: var(--ink); text-decoration: none; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 12px; transition: border-color .16s, box-shadow .16s, transform .16s; min-width: 0; }
.language-card:hover { border-color: #aebfa6; box-shadow: var(--shadow); transform: translateY(-2px); color: var(--green); }
.language-card h3, .language-card strong { font-size: 16px; margin: 0; font-weight: 650; }
.language-card p, .language-card small, .language-card span { font-size: 13px; color: var(--muted); margin: 0; }
.language-card .language-native, .language-card .native { font-size: 15px; }
.language-card > a { text-decoration: none; font-weight: 650; }
.language-card .language-initial { display: grid; place-items: center; width: 34px; height: 34px; background: #edf1e7; border-radius: 8px; color: #4a6740; font-size: 10px; font-weight: 650; letter-spacing: .4px; }
.language-card > span:nth-child(2) { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.language-card .card-arrow { color: #71876b; font-size: 17px; }
.empty-state { background: var(--surface); border: 1px dashed #cbd4c6; border-radius: var(--radius); text-align: center; padding: 35px 24px; color: var(--muted); grid-column: 1 / -1; }
.breadcrumbs { font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); margin-block: 26px 28px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: var(--green); }
.page-heading { margin-block: 32px; max-width: 890px; }
.page-heading h1 { font-size: clamp(36px, 4vw, 53px); margin-bottom: 18px; }
.page-heading > p:not(.eyebrow) { color: var(--muted); font-size: 17px; max-width: 750px; }
.page-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 56px; }
.page-layout.without-sidebar { display: block; width: min(100%, 880px); margin-inline: auto; }
.lesson-sidebar { position: sticky; top: 24px; border: 1px solid var(--line); background: #f0f2e8; padding: 23px 17px; border-radius: 12px; }
.lesson-sidebar > h2, .lesson-sidebar > h3 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 1.3px; margin-bottom: 17px; padding-inline: 10px; font-weight: 750; color: var(--muted); }
.lesson-nav { display: grid; gap: 3px; }
.lesson-nav a { text-decoration: none; color: #525e55; font-size: 14px; padding: 9px 11px; border-radius: 7px; }
.lesson-nav a:hover { background: #e5eadd; color: var(--green); }
.lesson-nav a[aria-current="page"] { background: var(--surface); color: var(--green-dark); font-weight: 650; box-shadow: 0 2px 6px rgb(40 60 30 / 3%); }
.lesson-sidebar [data-progress] { margin: 20px 10px 0; font-size: 12px; line-height: 1.6; color: var(--muted); padding-top: 16px; border-top: 1px solid #d9dfd0; }
.lesson-content { min-width: 0; }
.lesson-content > :first-child { margin-top: 0; }
.lesson-content > h2 { margin-top: 36px; }
.lesson-content > p, .prose > p { color: #4d5a51; }
.prose { max-width: 780px; overflow-wrap: anywhere; }
.prose p { margin-bottom: 20px; }
.prose h2 { margin-top: 38px; font-size: 30px; }
.prose h3 { margin-top: 27px; }
.prose ul, .prose ol { padding-inline-start: 24px; margin-block: 0 24px; }
.prose li { margin-bottom: 9px; }
.prose blockquote { border-inline-start: 3px solid var(--gold); background: #eeeee3; margin: 28px 0; padding: 19px 24px; border-radius: 0 8px 8px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 32px; }
.prose code { background: #edf0e7; padding: 2px 5px; border-radius: 4px; }
.prose a { overflow-wrap: anywhere; }
.lesson-grid, .article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lesson-content .lesson-grid, .lesson-content .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lesson-card, .article-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 27px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.lesson-card h3, .article-card h3 { margin-block: 0 12px; font-size: 20px; }
.lesson-card h3 a, .article-card h3 a { text-decoration: none; color: var(--ink); }
.lesson-card p, .article-card p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.lesson-card > a:last-child, .article-card > a:last-child { margin-top: auto; font-size: 13px; font-weight: 650; }
a.lesson-card:hover, a.article-card:hover { border-color: #adbea4; color: var(--green); box-shadow: var(--shadow); }
.card-icon, .lesson-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 20px; margin-bottom: 22px; }
.lesson-card > span:last-child:not(.eyebrow) { margin-top: auto; padding-top: 8px; color: var(--green); }
.guide-section, .related-lessons { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line); }
.related-lessons > h2 { font-size: 30px; }
.text-link { text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.study-list { margin-block: 24px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 10px; background: #f1f3e9; }
.study-list > summary { cursor: pointer; color: var(--green); font-size: 14px; font-weight: 650; }
.study-list[open] > summary { margin-bottom: 16px; }
.study-list .table-wrap { margin-bottom: 0; }
.contact-form { display: grid; gap: 8px; max-width: 660px; margin-block: 28px; }
.contact-form > label { font-size: 14px; font-weight: 650; margin-top: 13px; }
.contact-form > input, .contact-form > textarea { display: block; width: 100%; border: 1px solid #c6d1bd; border-radius: 8px; padding: 12px 14px; min-height: 48px; background: var(--surface); }
.contact-form > textarea { resize: vertical; min-height: 180px; }
.contact-form > .button { justify-self: start; }
.contact-form .form-note { color: var(--muted); font-size: 13px; margin-block: 12px; }
.form-honeypot { position: fixed !important; top: 0 !important; left: -10000px !important; right: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%); white-space: nowrap; }
.form-errors { border-color: #dcc0b7; background: #f8ede7; color: #853f32; }
.form-errors ul { margin-bottom: 0; }
#clear-progress-status { margin-block: 14px; color: var(--muted); font-size: 14px; }
.card-number, .article-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--green); margin-bottom: 15px; }
.notice { border: 1px solid #d8dfcd; background: #edf1e4; color: #45533e; border-radius: 10px; padding: 17px 21px; margin-block: 24px; font-size: 14px; }
.notice p:last-child { margin-bottom: 0; }
.notice.warning { border-color: #dfd1ad; background: #f4eedb; color: #6e5428; }
.ad-slot { margin: 30px auto; width: 100%; max-width: 100%; text-align: center; overflow: hidden; color: #747a70; font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; }
.ad-slot:empty { display: none; }
.ad-slot ins { display: block; max-width: 100%; }
.table-wrap { overflow-x: auto; width: 100%; border: 1px solid var(--line); border-radius: 12px; margin-block: 25px; background: var(--surface); overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; font-size: 15px; text-align: start; }
th, td { padding: 15px 18px; border-bottom: 1px solid #e8ebe2; text-align: start; vertical-align: middle; }
th { background: #edf1e6; color: #43563e; font-size: 12px; font-weight: 700; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fbfcf7; }
td .transliteration, td small { display: block; color: var(--muted); font-size: 12px; }
td[lang] { font-size: 17px; }
.table-wrap table caption { padding: 13px 18px; font-weight: 650; text-align: start; }
.entry-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; margin-block: 22px 34px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; gap: 16px; align-items: center; padding: 17px 21px; border-bottom: 1px solid #e8ebe2; }
.entry:last-child { border-bottom: 0; }
.entry:nth-child(even) { background: #fbfcf7; }
.entry-source { color: #53604f; font-size: 14px; overflow-wrap: anywhere; }
.entry-target { color: var(--ink); font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.entry .audio-button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; border-radius: 50%; padding: 8px; font-size: 12px; }
.entry:not(:has(.audio-button)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
#audio-status { margin-block: 12px; font-size: 13px; color: var(--muted); }
#audio-status:empty { display: none; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 26px; margin-top: 32px; border-top: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); margin-top: 42px; padding-block: 39px 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px 48px; align-items: start; flex-wrap: wrap; }
.site-footer .brand { font-size: 21px; }
.site-footer h2 { font-size: 29px; margin-block: 20px 0; max-width: 430px; }
.site-footer p { color: var(--muted); font-size: 12px; max-width: 350px; margin-block: 13px 0; }
.site-footer nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 25px; max-width: 420px; align-items: start; }
.site-footer a:not(.brand) { color: var(--muted); font-size: 12px; text-decoration: none; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 17px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; }
/* Lightweight practice: the content remains in ordinary accessible controls. */
.practice-panel { padding: 30px; border: 1px solid #d6dfcc; border-radius: var(--radius); background: var(--surface); margin-block: 24px; }
.practice-panel h2 { font-size: 30px; margin-bottom: 10px; }
.practice-intro { color: var(--muted); font-size: 14px; margin-bottom: 23px; }
.practice-settings { display: flex; flex-wrap: wrap; gap: 18px; margin-block: 22px; }
.practice-field { display: flex; flex-direction: column; flex: 1 1 180px; gap: 6px; }
.practice-field label { color: #53624b; font-size: 12px; font-weight: 650; }
.practice-field select { width: 100%; border: 1px solid #cad5c2; border-radius: 7px; background: white; padding: 10px 12px; min-height: 44px; font-size: 14px; }
.practice-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.practice-toolbar button { border: 0; background: transparent; padding: 8px 0; min-height: 40px; color: var(--green); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.practice-progress { display: block; width: 100%; height: 5px; border: none; border-radius: 5px; margin-block: 14px 23px; appearance: none; background: #e9ede2; }
.practice-progress::-webkit-progress-bar { background: #e9ede2; border-radius: 5px; }
.practice-progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
.practice-progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }
.practice-card { min-height: 215px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 29px 20px; border-radius: 12px; background: #f2f5ea; border: 1px solid #e1e8d7; margin-block: 20px; overflow-wrap: anywhere; }
.practice-prompt { font-size: clamp(24px, 3vw, 38px); line-height: 1.5; margin: 0; color: var(--ink); font-weight: 500; }
.practice-prompt:focus { outline-offset: 8px; border-radius: 2px; }
.practice-answer { color: var(--green); font-size: clamp(20px, 2.5vw, 28px); line-height: 1.5; margin-block: 18px 0; padding-top: 17px; border-top: 1px solid #d5dec8; width: 100%; }
.practice-hint { color: var(--muted); font-size: 12px; margin-block: 18px 0; }
.practice-category { color: var(--green); font-size: 10px; letter-spacing: 1.1px; text-transform: uppercase; margin-block: 0 15px; }
.practice-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 11px; margin-top: 21px; }
.practice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 20px; }
.practice-option { background: white; border: 1px solid #cdd7c4; border-radius: 9px; min-height: 58px; padding: 13px 16px; color: var(--ink); overflow-wrap: anywhere; line-height: 1.5; }
.practice-option:hover:not(:disabled) { background: #eff4e6; border-color: #9fb38e; }
.practice-option.is-correct { background: #e2efdd; border-color: #698854; color: #28471e; opacity: 1; }
.practice-option.is-incorrect { background: #f7e8e3; border-color: #bd8375; color: #843e2d; opacity: 1; }
.practice-feedback { min-height: 30px; font-size: 15px; text-align: center; margin-block: 12px; }
.practice-feedback.is-correct { color: #355926; }
.practice-feedback.is-incorrect { color: var(--red); }
.practice-result { text-align: center; padding-block: 20px; }
.practice-result h2 { font-size: 35px; }
.practice-score { font-size: 56px; color: var(--green); font-family: var(--serif); line-height: 1.2; margin-block: 18px; }
.practice-results-note { color: var(--muted); font-size: 14px; }
.practice-empty { color: var(--muted); font-size: 14px; }
body[dir="rtl"], html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: 0; font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-weight: 600; line-height: 1.4; }
[dir="rtl"] .eyebrow, [dir="rtl"] .lesson-sidebar > h2, [dir="rtl"] .lesson-sidebar > h3 { letter-spacing: 0; }
[dir="rtl"] .hero-art { direction: ltr; }
[dir="rtl"] .brand { letter-spacing: -.4px; }
[dir="rtl"] .card-arrow { transform: scaleX(-1); }
[dir="rtl"] .prose blockquote { border-radius: 8px 0 0 8px; }
@media (min-width: 1400px) { .hero { padding-block: 96px 68px; } }
@media (max-width: 1000px) {
  .header-inner { gap: 23px; }
  .primary-nav { gap: 18px; }
  .hero-grid { gap: 40px; grid-template-columns: 1.2fr .85fr; }
  .hero-art { min-height: 285px; }
  .hero-art::before, .hero-art::after { width: 79%; padding-inline: 17px; }
  .hero-art::before { font-size: 28px; }
  .hero-art::after { font-size: 25px; inset-block-start: 146px; }
  .language-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
  .lesson-card, .article-card { padding: 23px; }
}
@media (max-width: 760px) {
  .container, .header-inner { width: calc(100% - 36px); }
  .header-inner { min-height: 74px; flex-wrap: wrap; gap: 10px 16px; padding-block: 13px; }
  .brand { font-size: 22px; }
  .brand-mark { width: 31px; height: 31px; }
  .locale-switch { margin-inline-start: 0; flex-basis: 100%; gap: 7px; }
  .locale-switch a { min-height: 32px; padding-block: 2px; }
  .js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto; }
  .primary-nav { order: 5; width: 100%; margin: 0; padding-block: 8px 4px; gap: 5px 22px; }
  .js .primary-nav:not(.is-open) { display: none; }
  .primary-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .hero { padding-block: 44px 34px; }
  .hero-grid { gap: 38px; grid-template-columns: 1fr; }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .hero h1 { max-width: 590px; }
  .hero-art { display: none; }
  .eyebrow { margin-bottom: 15px; font-size: 10px; }
  .stats { padding-top: 25px; margin-top: 28px; gap: 25px; font-size: 12px; }
  .stats strong { font-size: 20px; }
  main > section, .section { padding-block: 33px; }
  .section-heading { align-items: start; gap: 12px; flex-direction: column; margin-bottom: 22px; }
  .section-heading p { font-size: 14px; }
  .language-grid { gap: 11px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .language-card { padding: 18px 16px; grid-template-columns: 28px minmax(0, 1fr) 12px; gap: 8px; }
  .language-card .language-initial { width: 28px; height: 28px; font-size: 9px; }
  .language-card .card-arrow { font-size: 15px; }
  .language-search { gap: 12px; }
  .language-search input, #language-search { width: 100%; }
  .language-count, #language-count { margin-inline-start: 0; }
  .page-layout { display: block; }
  .lesson-sidebar { position: static; padding: 14px; margin-bottom: 28px; }
  .lesson-sidebar > h2, .lesson-sidebar > h3 { padding-inline: 6px; margin-bottom: 8px; }
  .lesson-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .lesson-nav a { padding: 8px 10px; font-size: 13px; min-height: 40px; }
  .lesson-sidebar [data-progress] { margin: 10px 6px 0; padding-top: 10px; }
  .page-heading { margin-block: 23px 28px; }
  .page-heading > p:not(.eyebrow) { font-size: 16px; }
  .breadcrumbs { margin-block: 21px; }
  .lesson-grid, .article-grid { grid-template-columns: 1fr; }
  .lesson-content .lesson-grid, .lesson-content .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-card, .article-card { padding: 23px 20px; }
  .lesson-card h3, .article-card h3 { font-size: 18px; }
  .practice-panel { padding: 22px 18px; }
  th, td { padding: 13px 12px; }
  .entry { gap: 13px; padding: 15px 16px; }
  .site-footer { padding-top: 28px; }
  .footer-inner { gap: 25px; }
}
@media (max-width: 420px) {
  .container, .header-inner { width: calc(100% - 28px); }
  .header-inner { gap: 10px; }
  .locale-switch { font-size: 12px; }
  .locale-switch select { max-width: 92px; padding-inline: 4px; }
  .menu-toggle { padding-inline: 9px; font-size: 12px; }
  .brand { font-size: 20px; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; font-size: 22px; }
  .hero h1 { font-size: 38px; }
  .hero-actions .button { padding-inline: 16px; }
  .stats { gap: 18px; }
  .stats strong { font-size: 19px; }
  .language-card { padding: 16px 13px; }
  .language-card > span:nth-child(2) { font-size: 13px; }
  .language-card h3, .language-card strong { font-size: 15px; }
  .lesson-content .lesson-grid, .lesson-content .article-grid { grid-template-columns: 1fr; }
  .practice-settings { gap: 13px; }
  .practice-options { grid-template-columns: 1fr; }
  .practice-actions .button { padding-inline: 15px; }
  .practice-card { padding-inline: 14px; min-height: 180px; }
  .practice-panel { padding-inline: 15px; }
  .practice-toolbar { align-items: start; }
  .page-heading h1 { font-size: 34px; }
  .prose h2 { font-size: 27px; }
  .study-list { padding: 15px 12px; }
  .site-footer nav { gap: 12px 20px; }
  .entry { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 36px; gap: 10px; padding: 14px 12px; }
  .entry-source { font-size: 13px; }
  .entry-target { font-size: 16px; }
  .entry .audio-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  :root { --paper: white; --ink: black; --muted: #444; --line: #ccc; }
  body { background: white; color: black; font-size: 11pt; line-height: 1.5; }
  .site-header, .site-footer, .lesson-sidebar, .ad-slot, .skip-link, .hero-art, .language-search, .lesson-actions, .practice-panel, button, audio, #audio-status { display: none !important; }
  .container { width: 100%; max-width: none; }
  .page-layout, .hero-grid { display: block; }
  .page-heading { margin-block: 0 22px; }
  h1, .page-heading h1 { font-size: 29pt; }
  h2, .prose h2 { font-size: 21pt; }
  h3 { font-size: 15pt; }
  h1, h2, h3, h4 { break-after: avoid; }
  .prose { max-width: none; }
  .table-wrap { overflow: visible; border-radius: 0; }
  table { font-size: 10pt; }
  tr { break-inside: avoid; }
  th, td { padding: 8px 10px; }
  a { color: black; text-decoration: underline; }
  .language-card, .lesson-card, .article-card { box-shadow: none; break-inside: avoid; }
  .hero, main > section, .section { padding-block: 15px; }
  .notice { background: white; }
  .entry { break-inside: avoid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px 12px; }
  .entry-source, .entry-target { font-size: 11pt; }
}

.brand { direction: ltr; }
.transliteration { display: block; font-size: .85em; color: var(--muted); margin-block-start: 4px; }
