/* =========================================================
   MSA Stories — design tokens
   Grounded in the course's own imagery: a garden, a tree that
   grows across the stories, warm family scenes. Not a generic
   language-app palette.
   ========================================================= */

@font-face {
  font-family: 'UthmanicHafs';
  src: url('../fonts/UthmanicHafs1.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color */
  --paper:       #F3ECDA;
  --paper-deep:  #ECE2C9;
  --ink:         #2B2318;
  --ink-soft:    #5B5140;
  --palm:        #1F6B57;
  --palm-deep:   #143F35;
  --palm-pale:   #DCEAE4;
  --gold:        #B8862E;
  --gold-pale:   #F0E1BC;
  --clay:        #A8492F;
  --clay-pale:   #F1DDD5;
  --line:        #DDCFA6;
  --white:       #FFFDF6;

  /* tier accents */
  --tier-beginner: #4C8C6E;
  --tier-advanced: #1F6B57;
  --tier-pro:      #143F35;

  /* type */
  --font-ar: 'UthmanicHafs', 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 2.75rem);
  --step-4: clamp(2.6rem, 2rem + 3vw, 3.8rem);

  --radius: 6px;
  --radius-lg: 14px;
  --shadow-soft: 0 1px 2px rgba(43, 35, 24, 0.06), 0 4px 16px rgba(43, 35, 24, 0.07);
  --max-w: 46rem;
}

@media (prefers-color-scheme: dark) {
  /* Intentionally not switching to a dark theme automatically —
     an aged-paper palette is part of the design, and flipping it
     to a near-black surface would fight the brief. */
}

* , *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top left, rgba(184, 134, 46, 0.06), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(31, 107, 87, 0.06), transparent 55%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; color: var(--ink); }
p { margin: 0 0 1em; }
a { color: inherit; }

[lang="ar"], .ar {
  font-family: var(--font-ar);
  direction: rtl;
  unicode-bidi: isolate;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75em 1.25em;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* =========================================================
   Header / footer
   ========================================================= */

.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--paper), rgba(243, 236, 218, 0.85));
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
}

.site-header__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.9em 1.25em;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink);
}
.brand__en {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--palm-deep);
}

.site-nav {
  display: flex;
  gap: 1.5em;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.2em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.is-active {
  color: var(--palm-deep);
  border-bottom-color: var(--gold);
}

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25em 4em;
  min-height: 60vh;
}

.site-footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 2em 1em 3em;
}

/* =========================================================
   Geometric motif — a restrained 8-point star line pattern,
   used only at tier transitions, never as background decoration.
   ========================================================= */

.tier-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.75em 0;
}

/* =========================================================
   Dashboard
   ========================================================= */

.hero {
  padding: 2.5em 0 1em;
  text-align: center;
}
.motif-mark {
  color: var(--gold);
  margin-bottom: 0.6em;
  display: flex;
  justify-content: center;
}
.hero__title {
  font-size: var(--step-4);
  font-weight: 700;
  color: var(--palm-deep);
  margin-bottom: 0.35em;
  line-height: 1.15;
}
.hero__blurb {
  max-width: 34rem;
  margin: 0 auto 1.5em;
  color: var(--ink-soft);
}

.progress-summary {
  display: inline-flex;
  gap: 2em;
  padding: 1em 1.75em;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 1em;
  flex-wrap: wrap;
  justify-content: center;
}
.progress-summary__item {
  text-align: center;
}
.progress-summary__num {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--palm);
}
.progress-summary__label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.review-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin: 0.5em 0 0;
  padding: 0.7em 1.4em;
  border-radius: 999px;
  background: var(--palm-deep);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.review-cta:hover { background: var(--palm); transform: translateY(-1px); }

.tier {
  margin: 1.5em 0;
  padding: 1.75em 1.75em 2em;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.tier::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--tier-color, var(--palm));
}
.tier--beginner { --tier-color: var(--tier-beginner); background: linear-gradient(180deg, #F5F0DF, var(--paper)); }
.tier--advanced { --tier-color: var(--tier-advanced); background: linear-gradient(180deg, #F1EAD3, var(--paper)); }
.tier--pro      { --tier-color: var(--tier-pro);      background: linear-gradient(180deg, #EDE4CA, var(--paper)); }

.tier__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 1.4em;
}
.tier__name {
  font-size: var(--step-2);
  color: var(--tier-color, var(--palm-deep));
  margin: 0;
}
.tier__meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: end;
}
.tier__desc {
  color: var(--ink-soft);
  max-width: 40rem;
  margin-bottom: 1.4em;
  font-size: 0.95rem;
}

/* Stepping-stone path: the progress metaphor. Ten stones per
   tier, laid out as a wrapping row rather than a progress bar
   or card grid. */
.path {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9em 0.7em;
}

.stone {
  --size: 3.1rem;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  border: 2px solid var(--tier-color, var(--palm));
  background: var(--white);
  color: var(--tier-color, var(--palm-deep));
  text-decoration: none;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}
.stone:hover:not(.stone--locked) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.stone--current {
  box-shadow: 0 0 0 4px var(--palm-pale);
}

.stone--complete {
  background: var(--tier-color, var(--palm));
  color: var(--white);
}
.stone--complete::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.9;
}

.stone--locked {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
  cursor: default;
  opacity: 0.65;
}
.stone--locked svg { width: 1.1em; height: 1.1em; }

.path-connector {
  display: none;
}

/* =========================================================
   Story reading view
   ========================================================= */

.story-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5em 0 0.5em;
  font-size: 0.9rem;
}
.story-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}
.story-nav a:hover { color: var(--palm-deep); }
.story-tier-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  background: var(--tier-color, var(--palm));
  padding: 0.25em 0.7em;
  border-radius: 999px;
  font-weight: 700;
}

.story-header {
  margin: 0.8em 0 1.6em;
  padding-bottom: 1.2em;
  border-bottom: 1px solid var(--line);
}
.story-header__titles {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  flex-wrap: wrap;
  margin: 0.4em 0 0.3em;
}
.story-header__ar {
  font-size: var(--step-3);
  color: var(--palm-deep);
  font-weight: 700;
}
.story-header__en {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: var(--step-1);
}
.story-header__note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 42rem;
}
.story-header__meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.5em;
}

.story-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5em, 4vw, 2.75em);
  box-shadow: var(--shadow-soft);
  margin-bottom: 2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { border-color: var(--palm); color: var(--palm-deep); }
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--palm-deep);
  border-color: var(--palm-deep);
  color: var(--white);
}
.btn--primary:hover { background: var(--palm); color: var(--white); }
.btn--ghost {
  background: transparent;
}
.btn--wide { width: 100%; justify-content: center; padding: 0.8em 1.4em; font-size: 1rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.story-body-ar {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
  line-height: 2.05;
  color: var(--ink);
  padding: 0.2em 0;
}

.translation {
  margin-top: 1.6em;
  padding-top: 1.4em;
  border-top: 1px dashed var(--line);
  font-family: var(--font-serif);
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.translation[hidden] { display: none; }

.vocab-section h3, .review-section h3 { font-size: var(--step-1); color: var(--palm-deep); }

.vocab-list {
  list-style: none;
  margin: 0 0 2em;
  padding: 0;
  display: grid;
  gap: 0.6em;
}
.vocab-item {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.85em 1.1em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.vocab-item__ar {
  font-family: var(--font-ar);
  font-size: 1.5rem;
  direction: rtl;
  color: var(--palm-deep);
  flex-shrink: 0;
  min-width: 3.2em;
}
.vocab-item__mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.vocab-item__translit {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
}
.vocab-item__en {
  font-weight: 600;
}
.vocab-item__pos {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  flex-shrink: 0;
}

.story-actions {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  margin-top: 2em;
}

/* =========================================================
   Quiz view
   ========================================================= */

.quiz-progress {
  display: flex;
  gap: 0.4em;
  margin-bottom: 1.6em;
}
.quiz-progress__dot {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
}
.quiz-progress__dot.is-done { background: var(--palm); }
.quiz-progress__dot.is-current { background: var(--gold); }

.quiz-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5em, 5vw, 3em);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.quiz-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.6em;
}

.quiz-card__word {
  font-family: var(--font-ar);
  direction: rtl;
  font-size: clamp(2.4rem, 2rem + 3vw, 3.6rem);
  color: var(--palm-deep);
  margin-bottom: 0.9em;
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  gap: 0.75em;
  max-width: 30rem;
  margin: 0 auto;
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.9em 1.2em;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.quiz-option:hover:not([disabled]) { border-color: var(--palm); }
.quiz-option.is-correct { border-color: var(--palm); background: var(--palm-pale); font-weight: 700; }
.quiz-option.is-wrong { border-color: var(--clay); background: var(--clay-pale); }
.quiz-option[disabled] { cursor: default; }

.quiz-feedback {
  margin-top: 1.3em;
  min-height: 1.6em;
  font-weight: 600;
}
.quiz-feedback.is-correct { color: var(--palm-deep); }
.quiz-feedback.is-wrong { color: var(--clay); }

.quiz-result {
  text-align: center;
  padding: 2em 1em;
}
.quiz-result__score {
  font-family: var(--font-serif);
  font-size: var(--step-4);
  color: var(--palm-deep);
  font-weight: 700;
}
.quiz-result__msg {
  max-width: 30rem;
  margin: 0.5em auto 1.6em;
  color: var(--ink-soft);
}
.quiz-result__actions {
  display: flex;
  gap: 1em;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   Review / word bank
   ========================================================= */

.review-controls {
  display: flex;
  gap: 1em;
  margin: 1.2em 0 1.8em;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.search-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.7em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.95rem;
  font-family: var(--font-sans);
}

.review-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
table.review-table {
  width: 100%;
  border-collapse: collapse;
}
.review-table th, .review-table td {
  padding: 0.8em 1em;
  text-align: start;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.review-table th {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: var(--paper);
}
.review-table td.ar-cell {
  font-family: var(--font-ar);
  direction: rtl;
  font-size: 1.3rem;
  color: var(--palm-deep);
}
.review-table tr:last-child td { border-bottom: none; }
.review-table__tier {
  font-size: 0.72rem;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  color: var(--white);
  background: var(--palm);
  white-space: nowrap;
}

.flashcard-wrap {
  text-align: center;
  padding: 2em 0;
}
.flashcard {
  max-width: 26rem;
  margin: 0 auto 1.5em;
  min-height: 14rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2em;
  cursor: pointer;
}
.flashcard__ar {
  font-family: var(--font-ar);
  direction: rtl;
  font-size: 3rem;
  color: var(--palm-deep);
}
.flashcard__hint {
  margin-top: 0.8em;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.flashcard__back {
  display: grid;
  gap: 0.3em;
}
.flashcard__en { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; }
.flashcard__translit { font-style: italic; color: var(--ink-soft); }

.empty-state {
  text-align: center;
  padding: 3em 1em;
  color: var(--ink-soft);
}
.empty-state h3 { color: var(--ink); }

/* =========================================================
   Guided reading — sentence-by-sentence gloss slides
   ========================================================= */

/* 15 distinct hues, all dark enough to read on parchment.
   A sentence never needs more than this: the longest in the
   course (Story 10, sentence 1) uses exactly 15. Colours are
   assigned per sentence in order of first appearance, so short
   sentences only ever use the first few. */
:root {
  --gloss-0:  #1F6B57; /* palm green   */
  --gloss-1:  #2E6E8E; /* steel blue   */
  --gloss-2:  #B8862E; /* gold         */
  --gloss-3:  #A8492F; /* clay         */
  --gloss-4:  #7A5A9E; /* plum         */
  --gloss-5:  #5C7A2E; /* olive        */
  --gloss-6:  #9C4368; /* berry        */
  --gloss-7:  #2F7F73; /* teal         */
  --gloss-8:  #8A5A2B; /* brown        */
  --gloss-9:  #4A5FA8; /* indigo       */
  --gloss-10: #B0563F; /* rust         */
  --gloss-11: #566B8C; /* slate        */
  --gloss-12: #3E7A4A; /* forest       */
  --gloss-13: #93407F; /* magenta      */
  --gloss-14: #6B6320; /* dark amber   */
  --gloss-x:  #9A9282; /* no counterpart in the other language */
}

.slide-wrap {
  max-width: 40rem;
  margin: 0 auto;
}

.slide-progress {
  display: flex;
  gap: 0.35em;
  margin: 1.2em 0 1.6em;
}
.slide-progress__dot {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: var(--line);
}
.slide-progress__dot.is-done { background: var(--tier-color, var(--palm)); }
.slide-progress__dot.is-current { background: var(--gold); }

.slide-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5em, 5vw, 3em);
  box-shadow: var(--shadow-soft);
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-card__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  margin-bottom: 1em;
}

.slide-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-align: center;
}


.slide-ar {
  font-family: var(--font-ar);
  direction: rtl;
  text-align: center;
  font-size: clamp(1.9rem, 1.4rem + 2.5vw, 2.8rem);
  line-height: 2.1;
  margin-bottom: 1em;
}

.slide-en {
  direction: ltr;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.9;
  color: var(--ink-soft);
}

.gtok {
  font-weight: 600;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.12s ease;
}
.gtok.is-linked {
  background: rgba(184, 134, 46, 0.22);
  box-shadow: 0 0 0 2px rgba(184, 134, 46, 0.22);
}
.gtok-x {
  color: var(--gloss-x);
  font-weight: 400;
  cursor: default;
}
.gtok-m0  { color: var(--gloss-0);  }
.gtok-m1  { color: var(--gloss-1);  }
.gtok-m2  { color: var(--gloss-2);  }
.gtok-m3  { color: var(--gloss-3);  }
.gtok-m4  { color: var(--gloss-4);  }
.gtok-m5  { color: var(--gloss-5);  }
.gtok-m6  { color: var(--gloss-6);  }
.gtok-m7  { color: var(--gloss-7);  }
.gtok-m8  { color: var(--gloss-8);  }
.gtok-m9  { color: var(--gloss-9);  }
.gtok-m10 { color: var(--gloss-10); }
.gtok-m11 { color: var(--gloss-11); }
.gtok-m12 { color: var(--gloss-12); }
.gtok-m13 { color: var(--gloss-13); }
.gtok-m14 { color: var(--gloss-14); }

.slide-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  margin-top: 1.8em;
}
.slide-nav__spacer { flex: 1; }

.gloss-key {
  text-align: center;
  margin-top: 1.6em;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.gloss-key .gtok-x { font-weight: 400; }

.mode-toggle {
  text-align: center;
  margin: 0.5em 0 1.2em;
}
.mode-toggle button {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: underline;
  padding: 0.3em;
}
.mode-toggle button:hover { color: var(--palm-deep); }

/* =========================================================
   Misc
   ========================================================= */

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

.link-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0.3em;
}
.link-btn:hover { color: var(--clay); }

@media (max-width: 640px) {
  .site-header__inner { padding: 0.75em 1em; }
  .stone { --size: 2.7rem; font-size: 0.95rem; }
  .story-panel { padding: 1.25em; }
  .quiz-options { max-width: 100%; }
  .vocab-item { flex-wrap: wrap; }
  .vocab-item__pos { margin-inline-start: auto; }
}
