:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  background: #0b0f19;
  --muted: #a3b2c9;
  --border: #293954;
  --red: #e11d48;
  --blue: #0057b7;
  --yellow: #ffd700;
  --header-height: 6rem;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body { margin: 0; min-width: 280px; line-height: 1.6; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7dd3fc; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 20; top: .75rem; left: 1rem; padding: .5rem 1rem; border-radius: .5rem; background: var(--yellow); color: #0b0f19; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem clamp(1rem, 2.5vw, 2rem); border-bottom: 1px solid var(--border); background: #0b0f19f5; box-shadow: 0 .5rem 2rem #0004; backdrop-filter: blur(16px); }
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #e41e20 0% 34%, var(--blue) 34% 67%, var(--yellow) 67% 100%); }
.home-link { display: flex; flex-shrink: 0; align-items: center; gap: .875rem; color: inherit; text-decoration: none; border-radius: .75rem; }
.home-link img { display: block; width: 4rem; height: 4rem; border-radius: 50%; box-shadow: 0 0 1.25rem #0057b733; }
.brand-name { font-weight: 750; font-size: 1.125rem; letter-spacing: -.03em; }
.brand-ura { color: var(--yellow); }
.brand-shqip { color: var(--blue); }
.brand-name small { display: block; color: var(--muted); font-size: .875rem; font-weight: 450; letter-spacing: .035em; }
.study-nav { display: flex; gap: .75rem; }
.study-link { display: flex; align-items: center; justify-content: center; min-height: 3rem; padding: .625rem 1.25rem; border: 1px solid #3b82d2; border-radius: .875rem; background: var(--blue); color: #f8fafc; box-shadow: inset 0 -3px var(--yellow); font-weight: 700; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.study-link[aria-current="page"] { background: var(--yellow); color: #101827; border-color: var(--yellow); box-shadow: inset 0 -3px #e41e20; }
.study-link:hover { transform: translateY(-2px); box-shadow: inset 0 -3px var(--yellow), 0 5px 22px #0057b74d; }
.study-link[aria-current="page"]:hover { box-shadow: inset 0 -3px #e41e20, 0 5px 22px #ffd70026; }
.study-link:active { transform: translateY(0); }
.site-header a:focus-visible { outline-color: var(--yellow); }
.sheet { max-width: 1100px; margin: auto; padding: calc(var(--header-height) + 3.5rem) 1.5rem 2rem; }
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(2rem, 5vw, 4rem); margin-bottom: 3rem; }
.hero-heading, .hero-controls { min-width: 0; }
.hero-heading .subtitle { margin-bottom: 0; }
.eyebrow { margin: 0 0 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: #fda4af; }
.eyebrow span { margin: 0 .5rem; color: #6c7c97; }
h1 { margin: 0; font-size: clamp(2.8rem, 7vw, 4.5rem); letter-spacing: -.055em; line-height: 1.15; }
.subtitle { margin: .5rem 0 1.25rem; color: #7dd3fc; font-size: 1.25rem; }
.intro { margin: 0; color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.02em; }
.section-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.count { flex-shrink: 0; padding: .4rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .8rem; }
.search-label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .85rem; }
input[type="search"] { width: 100%; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: .8rem; background: #101929; color: #f8fafc; }
input::placeholder { color: #8e9eb7; }
.country-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.country-grid li { min-width: 0; }
.country-pill { width: 100%; height: 100%; min-height: 3.25rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 1.6rem; background: #131c2e; color: #dbeafe; font-weight: 600; overflow-wrap: anywhere; transition: background .15s, border-color .15s, transform .15s; }
.country-pill:hover { border-color: #6194cf; background: #192b46; transform: translateY(-2px); }
.country-pill.is-selected { border-color: #38bdf8; background: #142c43; color: #7dd3fc; }
.no-results { padding: 1.5rem 0; color: var(--muted); }
a { color: #7dd3fc; text-underline-offset: .2em; }
footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
dialog { width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.75rem; border: 1px solid #354b70; border-radius: 1.5rem; background: #111b2c; color: #f8fafc; box-shadow: 0 24px 100px #0009; overflow-y: auto; }
dialog::backdrop { background: #030711bd; backdrop-filter: blur(5px); }
.dialog-heading { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; gap: 1rem; }
.dialog-heading > div { min-width: 0; }
.dialog-heading .title-speak-button { justify-self: center; }
.dialog-heading .eyebrow { margin-bottom: .5rem; }
.dialog-heading h2 { font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.25; overflow-wrap: anywhere; }
.dialog-subtitle { margin: .4rem 0 0; color: var(--muted); }
.close-button { display: grid; place-items: center; justify-self: end; align-self: start; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: #1a2940; color: #f8fafc; font-size: 1.7rem; line-height: 1; }
.close-button:hover { background: #273954; }
.detail-list { margin: 1.5rem 0 0; }
.detail-row { padding: 1rem 0; border-top: 1px solid var(--border); }
dt { margin-bottom: .6rem; color: #d7e1ef; font-size: .8rem; font-weight: 700; }
dt span { margin-left: .5rem; color: var(--muted); font-weight: 400; }
dd { display: flex; align-items: center; gap: .85rem; margin: 0; min-width: 0; color: #7dd3fc; font-size: 1.1rem; font-weight: 600; }
dd > span { min-width: 0; overflow-wrap: anywhere; }
.speak-button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--red); color: white; }
.speak-button svg { width: 22px; height: 22px; fill: currentColor; }
.speak-button:hover { background: #f43f5e; }
.speak-button.is-playing { outline: 3px solid #fda4af; outline-offset: 3px; }
.english-name { color: #e2e8f0; font-size: 1rem; font-weight: 400; }
.dialog-tip { margin: .5rem 0 0; color: var(--muted); font-size: .8rem; }
.audio-status { margin: .65rem 0 0; color: #fda4af; font-size: .85rem; }
.audio-status:empty { display: none; }
body:has(dialog[open]) { overflow: hidden; }
@media (max-width: 850px) { .country-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 650px) { .country-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .brand-name { display: none; } }
@media (max-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
@media (max-width: 600px) {
  :root { --header-height: 8rem; }
  .site-header { gap: .75rem; }
  .home-link img { width: 3.5rem; height: 3.5rem; }
  .study-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; max-width: 24rem; gap: .5rem; }
  .study-link { min-width: 0; padding: .625rem .5rem; font-size: .875rem; }
}
@media (max-width: 480px) {
  .sheet { padding: calc(var(--header-height) + 2rem) 1rem 1.5rem; }
  .hero { margin-bottom: 2rem; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .country-pill { padding: .7rem .8rem; font-size: .9rem; }
  .count { padding: .35rem .5rem; font-size: .75rem; }
  dialog { padding: 1.25rem; border-radius: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .study-link:hover, .study-link:active { transform: none; }
}

.voice-picker { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; gap: .65rem; max-width: 440px; margin: 1.25rem 0 0; }
.voice-label { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .85rem; }
.voice-options { display: inline-flex; justify-self: start; gap: .2rem; max-width: 100%; padding: .25rem; border: 1px solid var(--border); border-radius: 999px; background: #101929; }
.voice-button { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: .5rem .75rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.25; }
.voice-button:hover { background: #192b46; color: #dbeafe; }
.voice-button[aria-pressed="true"] { background: #1d3d5c; color: #a5e3ff; }
dialog .voice-picker { margin-bottom: 1rem; }

.speed-picker { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) 3.2rem auto; align-items: start; gap: .65rem; max-width: 440px; margin: 1rem 0 0; }
.speed-picker label, .speed-value { display: flex; align-items: center; min-height: 44px; margin: 0; }
.speed-picker label { color: var(--muted); font-size: .85rem; }
.speed-track { position: relative; min-width: 0; padding-bottom: 36px; }
.speed-slider { display: block; width: 100%; height: 44px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; appearance: none; -webkit-appearance: none; writing-mode: horizontal-tb; direction: ltr; cursor: pointer; }
.speed-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: #344965; }
.speed-slider::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; border: 2px solid #b5e7fc; border-radius: 50%; background: #38bdf8; appearance: none; -webkit-appearance: none; }
.speed-slider::-moz-range-track { height: 4px; border: 0; border-radius: 999px; background: #344965; }
.speed-slider::-moz-range-thumb { box-sizing: border-box; width: 18px; height: 18px; border: 2px solid #b5e7fc; border-radius: 50%; background: #38bdf8; }
.speed-value { min-width: 0; color: #a5e3ff; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.speed-reset { min-height: 44px; padding: .4rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: #101929; color: #dbeafe; font-size: .8rem; }
.speed-reset:hover { background: #192b46; }
.speed-marker { position: absolute; top: 36px; left: calc(20% + 5.4px); transform: translateX(-50%); min-width: 44px; min-height: 44px; padding: 0 .15rem; border: 0; border-radius: .5rem; background: transparent; color: var(--muted); font-size: .75rem; font-weight: 600; }
.speed-marker::before { position: absolute; top: -19px; left: 50%; width: 2px; height: 10px; background: currentColor; content: ''; pointer-events: auto; }
.speed-marker:hover, .speed-marker[aria-pressed="true"] { color: #a5e3ff; background: #142c43; }
@media (max-width: 360px) {
  .voice-picker { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .35rem; }
  .voice-button { padding: .5rem .4rem; font-size: .75rem; }
  .speed-picker { grid-template-columns: 2.75rem minmax(0, 1fr) 2.9rem auto; gap: .35rem; }
  .speed-reset { padding: .4rem .4rem; font-size: .75rem; }
}

.grammar-lesson { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.grammar-lesson .section-heading { margin-bottom: .5rem; }
.grammar-lesson .eyebrow { margin-bottom: .35rem; }
.lesson-audio-tip { margin: .5rem 0 1rem; color: var(--muted); font-size: .875rem; }
.lesson-section { margin-top: .65rem; border: 1px solid var(--border); border-radius: .875rem; background: #101929; }
.lesson-section > summary { padding: .85rem 1rem; cursor: pointer; color: #dbeafe; }
.lesson-section > summary::marker { color: #7dd3fc; }
.lesson-section > summary:hover { background: #192b46; border-radius: .875rem; }
.lesson-section h3 { display: inline; margin: 0; font-size: 1rem; font-weight: 650; }
.lesson-section[open] > summary { border-bottom: 1px solid var(--border); }
.lesson-content { min-width: 0; padding: 1rem; }
.lesson-content > :first-child { margin-top: 0; }
.lesson-content > :last-child { margin-bottom: 0; }
.lesson-content p { margin: .75rem 0; }
.lesson-content h4 { margin: 1.25rem 0 .4rem; font-size: 1rem; color: #a5e3ff; }
.lesson-objectives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.75rem; padding-left: 1.25rem; margin: 0; }
.lesson-note { padding: .75rem 1rem; border-left: 3px solid #38bdf8; background: #142338; color: #c6d4e6; }
.lesson-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: .6rem; margin: .75rem 0; }
.lesson-table { width: 100%; border-collapse: collapse; text-align: left; }
.lesson-table caption { padding: .6rem .75rem; background: #142338; color: #dbeafe; text-align: left; font-weight: 650; }
.lesson-table th, .lesson-table td { padding: .45rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lesson-table thead { background: #17253b; color: #b9cce4; font-size: .875rem; }
.lesson-table tbody th { font-weight: 500; }
.lesson-table tbody tr:last-child > * { border-bottom: 0; }
.lesson-table tbody tr:nth-child(even) { background: #131f31; }
.sq-phrase { display: inline-flex; align-items: center; gap: .5rem; color: #a5e3ff; }
.lesson-speak { display: inline-grid; width: 36px; height: 36px; }
.lesson-speak svg { width: 19px; height: 19px; }
.construction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.construction-grid > div { display: flex; flex-direction: column; align-items: center; padding: .75rem .4rem; border: 1px solid var(--border); border-radius: .65rem; background: #142338; text-align: center; }
.construction-label { color: var(--muted); font-size: .875rem; }
.construction-grid strong { color: #a5e3ff; font-size: 1.75rem; line-height: 1.5; }
.construction-grid > div > :last-child { font-size: .875rem; }
.quiz-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.quiz-heading p { margin: 0; }
.quiz-reset { flex-shrink: 0; min-height: 44px; padding: .4rem .75rem; border: 1px solid var(--border); border-radius: .5rem; background: #17253b; color: #dbeafe; font-size: .875rem; }
.quiz-reset:hover { background: #243b59; }
.quiz-progress { color: #a5e3ff; font-size: .875rem; }
.quiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.quiz-question { min-width: 0; margin: 0; padding: .75rem; border: 1px solid var(--border); border-radius: .65rem; }
.quiz-question legend { padding: 0 .25rem; font-weight: 600; }
.quiz-option { display: flex; align-items: center; gap: .6rem; min-height: 44px; margin: .25rem 0; padding: .4rem .6rem; border: 1px solid transparent; border-radius: .4rem; cursor: pointer; background: #17253b; }
.quiz-option:hover { border-color: #6194cf; }
.quiz-option input { flex-shrink: 0; width: 1rem; height: 1rem; margin: 0; accent-color: #38bdf8; }
.quiz-option.is-correct { border-color: #4ade80; background: #12362d; }
.quiz-option.is-incorrect { border-color: #fda4af; background: #41202d; }
.quiz-feedback { color: #c6d4e6; font-size: .875rem; }
.quiz-feedback:empty { display: none; }
@media (pointer: coarse) { .lesson-speak { width: 44px; height: 44px; } }
@media (max-width: 650px) {
  .lesson-objectives, .quiz-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-content { padding: .75rem; }
  .lesson-table th, .lesson-table td { padding: .4rem .6rem; }
  .lesson-table .sq-phrase { white-space: nowrap; }
}
@media (max-width: 380px) {
  .construction-grid { gap: .3rem; }
  .construction-label { font-size: .875rem; }
  .quiz-heading { align-items: start; flex-direction: column; gap: .5rem; }
}
