/*
 * Senast uppdaterad: 2026-07-20 20:20
 * ThaiStart layout, course pages, local progress and study tools.
 */

@font-face {
    font-family: "ThaiStart Thai";
    src: url("../fonts/thai-notes-thai.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "ThaiStart IPA";
    src: url("../fonts/thai-notes-ipa.woff2") format("woff2");
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #17342d;
    --ink-soft: #46625b;
    --paper: #f7f1e5;
    --paper-deep: #ebe1cf;
    --white: #fffdf7;
    --green: #1f5d4b;
    --green-dark: #153f35;
    --lime: #d6ec83;
    --coral: #a84230;
    --gold: #d7a932;
    --line: rgba(23, 52, 45, 0.16);
    --shadow: 0 18px 50px rgba(28, 54, 45, 0.12);
    --radius: 22px;
    --radius-small: 10px;
    --radius-medium: 18px;
    --container: 1180px;
    --focus-ring: #ffcf66;
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Trebuchet MS", "Segoe UI", sans-serif;
    --thai: "ThaiStart Thai", Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.6;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.02;
}

h1 {
    font-size: clamp(3rem, 7vw, 6.8rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

h3 {
    line-height: 1.25;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    transform: translateY(-150%);
    padding: 10px 15px;
    background: var(--white);
    border: 2px solid var(--ink);
}

.skip-link:focus {
    transform: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.section-shell {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--green);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 22px;
    color: white;
    background: var(--green);
    border: 2px solid var(--green);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.button:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.button-secondary {
    color: var(--ink);
    background: transparent;
    border-color: var(--ink);
}

.button-secondary:hover {
    color: white;
}

.site-header {
    position: relative;
    z-index: 20;
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    width: min(1240px, calc(100% - 40px));
    margin: auto;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.brand img,
.footer-brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.brand small {
    display: block;
    margin-top: 5px;
    color: var(--ink-soft);
    font-family: var(--thai);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 7px;
}

.main-nav a {
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 0.87rem;
    font-weight: 800;
    text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    background: rgba(31, 93, 75, 0.1);
}

.menu-button {
    display: none;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    content: "";
}

.menu-lines {
    position: relative;
}

.menu-lines::before,
.menu-lines::after {
    position: absolute;
    left: 0;
}

.menu-lines::before {
    top: -6px;
}

.menu-lines::after {
    top: 6px;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
}

.language-flag {
    width: 22px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

.site-main {
    min-height: 55vh;
}

.m40-hero {
    display: grid;
    min-height: 660px;
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 30px;
    padding-block: 78px;
}

.m40-hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-kicker img {
    width: 46px;
    height: 46px;
}

.m40-hero h1 {
    margin-bottom: 28px;
}

.m40-hero h1 em {
    color: var(--green);
    font-style: italic;
    font-weight: 400;
}

.hero-lead {
    max-width: 650px;
    color: var(--ink-soft);
    font-size: 1.2rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 35px 0 50px;
}

.hero-facts {
    display: flex;
    gap: 42px;
    margin: 0;
}

.hero-facts div {
    padding-left: 14px;
    border-left: 2px solid var(--coral);
}

.hero-facts dt {
    font-family: var(--serif);
    font-size: 1.8rem;
    line-height: 1;
}

.hero-facts dd {
    margin: 5px 0 0;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-stage {
    position: relative;
    min-height: 520px;
}

.hero-main-card {
    position: relative;
    display: grid;
    min-height: 500px;
    place-items: center;
    align-content: center;
    gap: 12px;
    overflow: hidden;
    padding: 40px;
    color: var(--paper);
    background: var(--green);
    border-radius: 48% 48% 18px 48%;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-main-card::after {
    position: absolute;
    right: -10%;
    bottom: -20%;
    width: 360px;
    height: 360px;
    background: var(--lime);
    border-radius: 50%;
    content: "";
}

.hero-main-card img {
    position: relative;
    z-index: 1;
    width: min(250px, 60%);
}

.hero-main-card span,
.hero-main-card strong,
.hero-main-card small {
    position: relative;
    z-index: 2;
}

.hero-main-card strong {
    font-family: var(--thai);
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 500;
}

.floating-icon-card {
    position: absolute;
    z-index: 3;
    display: grid;
    width: 120px;
    height: 120px;
    place-items: center;
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.floating-icon-card img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.card-listen {
    top: 65px;
    right: 30px;
    transform: rotate(4deg);
}

.card-understand {
    right: 65px;
    bottom: 70px;
    transform: rotate(-4deg);
}

.course-section,
.tools-section {
    padding-block: 90px 110px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 40px;
}

.section-heading h2 {
    max-width: 700px;
    margin: 0;
}

.section-heading > p {
    max-width: 390px;
    margin: 0;
    color: var(--ink-soft);
}

.course-grid,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.course-card,
.tool-card,
.planned-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.course-card,
.tool-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 26px;
    text-decoration: none;
}

.course-card img {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

.course-card h3,
.tool-card strong {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1.1;
}

.course-card p,
.tool-card p {
    color: var(--ink-soft);
}

.course-progress-mini {
    display: grid;
    gap: 7px;
    margin-top: 4px;
}

.course-progress-mini span {
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

meter {
    width: 100%;
    height: 10px;
}

meter::-webkit-meter-bar {
    background: var(--paper-deep);
    border: 0;
    border-radius: 999px;
}

meter::-webkit-meter-optimum-value {
    background: var(--green);
    border-radius: 999px;
}

meter::-moz-meter-bar {
    background: var(--green);
    border-radius: 999px;
}

.course-card:hover,
.tool-card:hover {
    transform: translateY(-2px);
}

.journey-section {
    padding-block: 90px;
    background: var(--paper-deep);
}

.journey-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 50px;
}

.journey-copy p {
    color: var(--ink-soft);
}

.journey-steps {
    display: grid;
    gap: 16px;
}

.journey-steps article {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-medium);
}

.journey-steps img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.journey-steps span {
    color: var(--coral);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.journey-steps h3 {
    margin-bottom: 4px;
}

.journey-steps p {
    margin: 0;
    color: var(--ink-soft);
}

.tool-card {
    grid-template-columns: 70px 1fr auto;
    align-items: center;
}

.tool-card img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.planned-panel {
    max-width: 800px;
    margin-block: 70px 120px;
    padding: 40px;
}

.progress-banner {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 28px;
    margin-bottom: 100px;
    padding: 30px;
    background: var(--paper-deep);
    border-radius: var(--radius);
}

.progress-banner img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.progress-banner h2 {
    margin-bottom: 8px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.progress-banner p {
    margin: 0;
    color: var(--ink-soft);
}

.page-hero,
.lesson-hero {
    padding-block: 70px 45px;
}

.page-hero h1,
.lesson-hero h1 {
    max-width: 900px;
    margin-bottom: 20px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 800;
}

.breadcrumbs a {
    color: var(--green);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.course-section-tight {
    padding-top: 30px;
}

.course-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.course-card-large {
    min-height: 100%;
}

.course-card h2 {
    margin: 0;
    font-size: 2rem;
}

.course-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px;
    align-items: stretch;
}

.course-stat-panel {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 280px;
    padding: 26px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.course-stat-panel img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.course-stat-panel strong {
    font-family: var(--serif);
    font-size: 4rem;
    line-height: 1;
}

.course-stat-panel span {
    color: var(--green);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.course-stat-panel p {
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.module-list {
    display: grid;
    gap: 28px;
    padding-block: 20px 100px;
}

.module-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.module-heading h2 {
    margin-bottom: 14px;
    font-size: 2.3rem;
}

.module-heading p {
    color: var(--ink-soft);
}

.lesson-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lesson-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    text-decoration: none;
}

.lesson-row:hover {
    background: var(--paper-deep);
}

.lesson-row.is-complete {
    border-color: rgba(31, 93, 75, 0.45);
    background: rgba(214, 236, 131, 0.2);
}

.lesson-number {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--white);
    background: var(--green);
    border-radius: 50%;
    font-weight: 900;
}

.lesson-row small {
    display: block;
    margin-top: 3px;
    color: var(--ink-soft);
}

.lesson-row em {
    color: var(--coral);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
}

.lesson-main article {
    padding-bottom: 90px;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.lesson-meta span {
    padding: 7px 12px;
    background: var(--paper-deep);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.lesson-progress-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 10px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.lesson-progress-panel h2 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.lesson-progress-panel p {
    margin: 0;
    color: var(--ink-soft);
}

.lesson-section {
    padding-block: 42px;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 38px;
    align-items: start;
}

.objective-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.objective-list li {
    display: grid;
    gap: 4px;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
}

.objective-list strong {
    color: var(--green);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lesson-band {
    background: var(--paper-deep);
}

.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.audio-card,
.exercise-card,
.lesson-note {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.audio-card {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.audio-card h3,
.exercise-card h3 {
    margin-bottom: 0;
}

.audio-card audio {
    width: 100%;
}

.thai-line {
    font-family: var(--thai);
    font-size: 1.45rem;
    line-height: 1.7;
}

.transliteration {
    color: var(--coral);
    font-family: var(--thai);
    font-size: 1.05rem;
}

.dialogue-list {
    display: grid;
    gap: 14px;
}

.dialogue-list article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
}

.dialogue-list article > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--white);
    background: var(--coral);
    border-radius: 50%;
    font-weight: 900;
}

.dialogue-list p {
    margin: 0;
}

.pattern-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 34px;
    align-items: center;
}

.pattern-tokens {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pattern-tokens div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 18px;
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    text-align: center;
}

.pattern-tokens span {
    color: var(--green);
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pattern-tokens strong {
    font-family: var(--thai);
    font-size: 2rem;
    font-weight: 500;
}

.pattern-tokens small {
    color: var(--ink-soft);
    font-family: var(--thai);
}

.lesson-note {
    padding: 26px;
}

.lesson-note h2 {
    font-size: 2rem;
}

.lesson-note small {
    color: var(--ink-soft);
}

.study-grid,
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}

.study-card,
.example-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
}

.study-card {
    align-content: center;
    min-height: 150px;
    text-align: center;
}

.study-card.is-accent {
    background: var(--lime);
}

.study-card strong {
    font-family: var(--thai);
    font-size: 2.65rem;
    font-weight: 500;
    line-height: 1.1;
}

.study-card span {
    color: var(--coral);
    font-family: var(--thai);
    font-weight: 800;
}

.study-card small,
.example-card p:last-child {
    color: var(--ink-soft);
}

.example-card p {
    margin: 0;
}

.exercise-list {
    display: grid;
    gap: 18px;
}

.exercise-card {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.exercise-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 22px;
}

.exercise-card details {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.exercise-card summary {
    color: var(--green);
    cursor: pointer;
    font-weight: 900;
}

.lesson-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding-top: 25px;
}

.search-hero {
    padding-bottom: 25px;
}

.search-panel {
    margin-bottom: 34px;
    padding: 28px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin-bottom: 18px;
    font-size: 2rem;
}

.search-form {
    display: grid;
    gap: 10px;
}

.search-form > label {
    color: var(--green);
    font-weight: 900;
}

.search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) auto;
    gap: 12px;
}

.search-controls input,
.search-controls select {
    min-height: 48px;
    min-width: 0;
    padding: 10px 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}

.search-results {
    padding-bottom: 100px;
}

.search-state {
    padding: 24px;
    background: var(--paper-deep);
    border-radius: var(--radius-small);
    color: var(--ink-soft);
}

.search-result-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-result-card {
    display: grid;
    gap: 8px;
    padding: 22px;
    background: var(--white);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.search-result-card:hover {
    transform: translateY(-2px);
}

.search-result-card h3 {
    margin: 0;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
}

.search-result-card p {
    margin: 0;
    color: var(--ink-soft);
}

.search-result-card small {
    color: var(--coral);
    font-weight: 800;
}

.progress-hero {
    padding-bottom: 28px;
}

.progress-overview {
    display: grid;
    gap: 28px;
    padding-bottom: 100px;
}

.progress-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.progress-summary-card,
.progress-course-card,
.progress-actions {
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.progress-summary-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.progress-summary-card strong {
    font-family: var(--serif);
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1;
}

.progress-summary-card p {
    margin: 0;
    color: var(--ink-soft);
}

.progress-course-list {
    display: grid;
    gap: 14px;
}

.progress-course-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
    gap: 22px;
    align-items: center;
}

.progress-course-card h2,
.progress-actions h2 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.progress-course-card p {
    margin: 0;
    color: var(--ink-soft);
}

.progress-actions {
    display: grid;
    gap: 12px;
}

.progress-actions label {
    color: var(--green);
    font-weight: 900;
}

.progress-actions input,
.progress-actions select {
    min-height: 48px;
    min-width: 0;
    padding: 10px 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}

.progress-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.progress-message {
    margin: 0;
    color: var(--ink-soft);
    font-weight: 800;
}

.study-tool,
.favorites-list {
    display: grid;
    gap: 20px;
    padding-bottom: 100px;
}

.study-tool > label {
    color: var(--green);
    font-weight: 900;
}

.study-tool select,
.quiz-card input[type="text"] {
    min-height: 48px;
    padding: 10px 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}

.study-tool-status {
    justify-self: start;
    padding: 10px 16px;
    background: var(--paper-deep);
    border-radius: 999px;
    font-weight: 900;
}

.practice-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.practice-stats div {
    display: grid;
    gap: 4px;
    min-height: 92px;
    padding: 18px;
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}

.practice-stats span {
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 900;
}

.practice-stats strong {
    font-size: 2.1rem;
    line-height: 1;
}

.study-tool-card,
.favorite-card {
    display: grid;
    gap: 16px;
    padding: 26px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.study-tool-card h2,
.favorite-card h2 {
    margin-bottom: 0;
    font-size: 2rem;
}

.study-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.practice-panel[hidden],
.practice-answer[hidden] {
    display: none;
}

.practice-answer {
    display: grid;
    gap: 8px;
    padding: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
}

[aria-pressed="true"] {
    border-color: var(--coral);
    color: var(--coral);
}

.quiz-card fieldset {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: 0;
}

.quiz-card legend {
    margin-bottom: 12px;
    font-family: var(--serif);
    font-size: 1.6rem;
}

.quiz-card label {
    display: block;
    padding: 10px 12px;
    background: var(--paper);
    border-radius: var(--radius-small);
}

.audio-enhancer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.audio-enhancer label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.audio-enhancer select {
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--paper);
}

.audio-enhancer output {
    color: var(--ink-soft);
    font-weight: 900;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: min(1240px, calc(100% - 40px));
    margin: auto;
    padding: 45px 0;
    border-top: 1px solid var(--line);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand strong {
    display: block;
    font-family: var(--serif);
}

.site-footer p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.site-footer small {
    display: block;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.72rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.82rem;
    font-weight: 800;
}

.reveal {
    animation: reveal 0.65s ease-out both;
}

.delay-1 {
    animation-delay: 0.14s;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}
