:root {
  --bg: #f1f1ee;
  --surface: #e6e5e0;
  --text: #181816;
  --muted: #6f6c65;
  --line: #cbc9c2;
  --accent: #d9472f;
  --code: #1b1a18;
  --max: 1180px;
  --reading: 760px;
  --sans: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 50;
  width: 0;
  height: 2px;
  background: var(--accent);
}

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

.wordmark {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.wordmark span,
.index-intro h1 span,
.section-masthead h1 span {
  color: var(--accent);
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--text);
}

.index-page main {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.index-intro {
  display: grid;
  min-height: 530px;
  padding: 92px 0 78px;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto 1fr;
  column-gap: 64px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.kicker,
.note-meta {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.index-intro .kicker {
  grid-column: 1 / -1;
  align-self: start;
}

.index-intro h1 {
  margin: 0;
  font-size: 92px;
  font-weight: 700;
  line-height: 0.95;
}

.intro-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.writing-index,
.activity-strip {
  padding: 96px 0 112px;
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-label h2,
.section-label span,
.section-label a {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.note-list {
  border-bottom: 1px solid var(--line);
}

.note-row {
  display: grid;
  min-height: 190px;
  padding: 30px 0;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  gap: 22px;
  align-items: center;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.module-row {
  min-height: 220px;
}

.note-number {
  align-self: start;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.note-copy {
  display: grid;
  max-width: 860px;
  gap: 10px;
}

.note-copy strong {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.18;
}

.note-description {
  max-width: 690px;
  color: var(--muted);
  font-size: 15px;
}

.note-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.note-row:hover .note-copy strong,
.note-row:focus-visible .note-copy strong {
  color: var(--accent);
}

.note-row:hover .note-arrow,
.note-row:focus-visible .note-arrow {
  transform: translate(2px, -2px);
  border-color: var(--accent);
  color: var(--accent);
}

.activity-strip {
  border-top: 1px solid var(--line);
}

.activity-strip img {
  display: block;
  width: 100%;
  height: auto;
  padding-top: 24px;
  opacity: 0.74;
  filter: grayscale(1);
}

.site-footer {
  display: flex;
  width: min(calc(100% - 48px), var(--max));
  min-height: 110px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.article-layout {
  width: min(calc(100% - 48px), var(--max));
  min-width: 0;
  margin: 0 auto;
}

.section-layout {
  width: min(calc(100% - 48px), var(--max));
  min-width: 0;
  margin: 0 auto;
}

.section-masthead {
  min-height: 470px;
  padding: 82px 0 76px;
  border-bottom: 1px solid var(--line);
}

.section-masthead h1 {
  max-width: 940px;
  margin: 68px 0 24px;
  font-size: 76px;
  font-weight: 650;
  line-height: 1;
}

.section-masthead > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
}

.section-group {
  padding: 88px 0 36px;
}

.section-group + .section-group {
  padding-top: 64px;
}

.section-group:last-child {
  padding-bottom: 112px;
}

.empty-state {
  min-height: 360px;
  padding: 96px 0 120px;
}

.empty-state h2 {
  margin: 18px 0 16px;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.2;
}

.empty-state p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.article-masthead {
  max-width: 980px;
  padding: 82px 0 76px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  margin-bottom: 70px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.breadcrumbs {
  display: flex;
  min-height: 18px;
  margin-bottom: 70px;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--accent);
}

.article-masthead h1 {
  max-width: 960px;
  margin: 22px 0 28px;
  font-size: 68px;
  font-weight: 650;
  line-height: 1.04;
}

.article-deck {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

.prose {
  width: min(100%, var(--reading));
  min-width: 0;
  margin: 0 auto;
  padding: 84px 0 130px;
  font-size: 17px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 28px;
  color: var(--text);
  font-weight: 650;
  line-height: 1.25;
}

.prose h1 {
  margin: 0 0 36px;
  font-size: 44px;
}

.prose h2 {
  margin: 76px 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 32px;
}

.prose h3 {
  margin: 48px 0 18px;
  font-size: 23px;
}

.prose h4 {
  margin: 36px 0 14px;
  font-size: 18px;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table,
.prose pre {
  margin-top: 0;
  margin-bottom: 24px;
}

.prose p,
.prose li {
  color: #484641;
}

.prose li + li {
  margin-top: 8px;
}

.prose input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0 9px 0 -22px;
  accent-color: var(--accent);
}

.prose .task-list-item {
  list-style: none;
}

.prose a {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.prose strong {
  color: var(--text);
  font-weight: 650;
}

.prose blockquote {
  margin-left: 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--accent);
}

.prose blockquote p {
  color: var(--text);
  font-size: 20px;
}

.prose code {
  padding: 2px 5px;
  background: #deddd7;
  color: #9c2f20;
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose pre {
  width: 100%;
  max-width: 100%;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--code);
  line-height: 1.6;
}

.prose pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  background: transparent;
  color: #eeece6;
  font-size: 13px;
  overflow-wrap: normal;
  word-break: normal;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  margin-bottom: 24px;
  overflow-x: auto;
}

.prose table {
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--surface);
  color: var(--text);
}

.prose td {
  color: #484641;
}

.prose hr {
  margin: 64px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-footer a {
  text-decoration: none;
}

.article-footer a:hover,
.article-footer a:focus-visible {
  color: var(--text);
}

.arabic-practice-band {
  padding: 88px 0 36px;
  border-bottom: 1px solid var(--line);
}

.arabic-practice-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.practice-stat {
  display: grid;
  min-width: 0;
  min-height: 106px;
  padding: 20px 22px;
  align-content: center;
  gap: 7px;
}

.practice-stat + .practice-stat {
  border-left: 1px solid var(--line);
}

.practice-stat span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.practice-stat strong {
  font-size: 22px;
  font-weight: 650;
  line-height: 1.2;
}

.practice-daily-track {
  width: 100%;
  height: 3px;
  background: var(--surface);
}

.practice-daily-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 240ms ease;
}

.practice-mode-switch {
  display: flex;
  margin-top: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.practice-mode-switch::-webkit-scrollbar {
  display: none;
}

.practice-mode-switch button {
  min-width: 0;
  min-height: 44px;
  padding: 0 18px;
  flex: 1 0 auto;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 600 12px var(--sans);
  white-space: nowrap;
}

.practice-mode-switch button:first-child {
  border-left: 1px solid var(--line);
}

.practice-mode-switch button:hover,
.practice-mode-switch button:focus-visible {
  color: var(--accent);
}

.practice-mode-switch button[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
}

.practice-mode-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.practice-mode-switch button span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font: 700 9px var(--mono);
}

.arabic-practice-tool {
  border-bottom: 1px solid var(--line);
}

.practice-question-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.practice-question-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.practice-question-head > div > span:last-child {
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}

.practice-reset {
  padding: 8px 0 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 10px var(--mono);
}

.practice-reset:hover,
.practice-reset:focus-visible {
  color: var(--accent);
}

.practice-reset:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.practice-question {
  display: grid;
  min-height: 490px;
  padding: 46px 0 54px;
  justify-items: center;
  align-content: start;
  grid-template-rows: auto minmax(112px, auto) auto auto auto auto;
}

.practice-prompt {
  min-height: 30px;
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}

.practice-stimulus {
  display: grid;
  min-width: 180px;
  min-height: 112px;
  margin: 10px 0 4px;
  place-items: center;
  color: var(--text);
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Noto Sans Arabic",
    "Arabic Typesetting", var(--sans);
  font-size: 76px;
  font-weight: 500;
  line-height: 1;
}

.practice-stimulus[lang="en"] {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 650;
}

.practice-audio-button {
  min-width: 132px;
  margin: 24px 0 4px;
}

.practice-audio-button[hidden],
.practice-stimulus[hidden],
.practice-primary[hidden] {
  display: none !important;
}

.practice-audio-status {
  min-height: 18px;
  margin: 7px 0 14px;
  color: var(--muted);
  font: 10px/1.5 var(--mono);
  text-align: center;
}

.practice-audio-status[data-state="error"] {
  color: var(--accent);
}

.practice-options {
  display: grid;
  width: min(100%, 780px);
  min-height: 120px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.practice-option {
  display: grid;
  min-width: 0;
  min-height: 116px;
  padding: 12px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.practice-option:hover,
.practice-option:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.practice-option:disabled {
  cursor: default;
}

.practice-option span {
  width: 100%;
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Noto Sans Arabic",
    "Arabic Typesetting", serif;
  font-size: 52px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.practice-option.is-correct {
  border-color: #2b6b4f;
  color: #2b6b4f;
  box-shadow: inset 0 -3px #2b6b4f;
}

.practice-option.is-wrong {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}

.practice-actions {
  display: flex;
  min-height: 42px;
  margin-top: 24px;
  align-items: center;
  justify-content: center;
}

.practice-primary {
  min-width: 150px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--text);
  border-radius: 3px;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  font: 650 12px var(--sans);
}

.practice-primary:hover,
.practice-primary:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
}

.practice-feedback {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.practice-feedback[data-state="success"] {
  color: #2b6b4f;
}

.practice-feedback[data-state="error"] {
  color: var(--accent);
}

.arabic-audio-reference {
  margin-top: 34px;
  border-bottom: 1px solid var(--line);
}

.arabic-audio-reference > summary {
  min-height: 54px;
  padding: 16px 0;
  color: var(--muted);
  cursor: pointer;
  font: 600 11px var(--mono);
  list-style-position: inside;
  text-transform: uppercase;
}

.arabic-audio-reference > summary:hover,
.arabic-audio-reference > summary:focus-visible {
  color: var(--accent);
}

.arabic-audio-reference .speech-panel {
  margin-top: 0;
}

.arabic-practice-band + .section-group {
  padding-top: 88px;
}

.arabic-stage {
  display: grid;
  min-height: 250px;
  margin: 0 0 42px;
  padding: 30px 0;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.arabic-stage-glyph {
  display: grid;
  min-width: 0;
  justify-items: center;
  border-right: 1px solid var(--line);
}

.arabic-glyph,
.arabic-name,
.arabic-inline,
.arabic-comparison,
.speech-button-glyph,
.arabic-form-cell b {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Noto Sans Arabic",
    "Arabic Typesetting", serif;
}

.arabic-glyph {
  display: block;
  min-width: 180px;
  color: var(--text);
  font-size: 132px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.arabic-glyph-wide {
  font-size: 86px;
}

.arabic-name {
  color: var(--accent);
  font-size: 24px;
  line-height: 1.6;
}

.arabic-stage-copy {
  min-width: 0;
}

.arabic-stage-copy strong {
  display: block;
  margin: 12px 0 14px;
  font-size: 34px;
  font-weight: 650;
  line-height: 1.2;
}

.arabic-stage-copy p {
  margin: 0;
  color: var(--muted);
}

.arabic-inline {
  display: inline-block;
  min-width: 1.1em;
  color: var(--text);
  font-size: 1.25em;
  line-height: 1;
  text-align: center;
}

.arabic-inline-large {
  font-size: 2em;
}

.arabic-comparison {
  width: 100%;
  margin: 28px 0;
  padding: 24px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 54px;
  line-height: 1.8;
  text-align: center;
  white-space: nowrap;
}

.arabic-form-grid {
  display: grid;
  width: 100%;
  margin: 0 0 30px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.arabic-form-cell {
  display: grid;
  min-width: 0;
  min-height: 188px;
  padding: 18px 12px;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.arabic-form-cell + .arabic-form-cell {
  border-left: 1px solid var(--line);
}

.arabic-form-cell > span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.arabic-form-cell b {
  display: block;
  width: 100%;
  color: var(--text);
  font-size: 62px;
  font-weight: 500;
  line-height: 1.35;
}

.arabic-form-cell small {
  max-width: 130px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.speech-panel {
  display: grid;
  width: 100%;
  margin: 34px 0 42px;
  padding: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 22px 28px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.speech-panel-copy {
  min-width: 0;
}

.speech-panel-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.speech-panel-copy strong {
  display: block;
  color: var(--text);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
}

.speech-panel-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.speech-settings label {
  display: grid;
  gap: 7px;
}

.speech-settings label > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.speech-settings select {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  font: 12px var(--sans);
}

.speech-actions {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
}

.speech-button {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: 600 12px var(--sans);
  line-height: 1.2;
}

.speech-button:hover,
.speech-button:focus-visible,
.speech-button.is-speaking {
  border-color: var(--accent);
  color: var(--accent);
}

.speech-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.speech-button-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: currentColor;
  font-size: 11px;
}

.speech-button-compact {
  width: 82px;
  min-height: 76px;
  padding: 8px 5px;
  flex-direction: column;
  gap: 3px;
}

.speech-button-glyph {
  min-height: 36px;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.2;
}

.speech-button-compact > span:last-child {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speech-feedback {
  min-height: 18px;
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
}

.speech-feedback[data-state="error"] {
  color: var(--accent);
}

.arabic-quick-phonetics {
  display: grid;
  margin-top: 28px;
  gap: 14px;
}

.lesson-navigation {
  display: grid;
  width: min(100%, var(--reading));
  min-height: 150px;
  margin: -58px auto 110px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.lesson-navigation-link {
  display: grid;
  min-width: 0;
  padding: 24px 0;
  align-content: center;
  gap: 8px;
  text-decoration: none;
}

.lesson-navigation-next {
  padding-left: 28px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.lesson-navigation-previous {
  padding-right: 28px;
}

.lesson-navigation-link span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-navigation-link strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.lesson-navigation-link:hover strong,
.lesson-navigation-link:focus-visible strong {
  color: var(--accent);
}

@media (max-width: 860px) {
  .index-intro {
    min-height: auto;
    padding: 72px 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 42px;
  }

  .index-intro .kicker {
    grid-column: 1;
  }

  .index-intro h1 {
    font-size: 72px;
  }

  .intro-copy {
    max-width: 560px;
  }

  .note-copy strong {
    font-size: 28px;
  }

  .article-masthead h1 {
    font-size: 54px;
  }

  .section-masthead h1 {
    font-size: 62px;
  }

  .arabic-practice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-stat:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .practice-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .arabic-stage {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .arabic-glyph {
    min-width: 150px;
    font-size: 112px;
  }

  .arabic-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arabic-form-cell:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .arabic-form-cell:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .site-header,
  .index-page main,
  .section-layout,
  .article-layout,
  .site-footer {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-header {
    height: 64px;
  }

  .site-header nav {
    gap: 18px;
  }

  .index-intro {
    padding: 54px 0 58px;
    row-gap: 32px;
  }

  .index-intro h1 {
    font-size: 50px;
  }

  .intro-copy {
    font-size: 16px;
  }

  .writing-index,
  .activity-strip {
    padding: 68px 0 76px;
  }

  .note-row {
    min-height: 0;
    padding: 26px 0 30px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
  }

  .module-row {
    min-height: 0;
  }

  .note-copy strong {
    font-size: 23px;
  }

  .note-description {
    font-size: 14px;
  }

  .note-arrow {
    display: none;
  }

  .activity-strip .section-label {
    align-items: flex-start;
    gap: 16px;
  }

  .article-masthead {
    padding: 50px 0 54px;
  }

  .section-masthead {
    min-height: 390px;
    padding: 50px 0 54px;
  }

  .section-masthead h1 {
    margin-top: 52px;
    font-size: 48px;
  }

  .section-masthead > p:last-child {
    font-size: 16px;
  }

  .section-group {
    padding: 64px 0 24px;
  }

  .section-group + .section-group {
    padding-top: 48px;
  }

  .section-group:last-child {
    padding-bottom: 80px;
  }

  .empty-state {
    min-height: 300px;
    padding: 72px 0 88px;
  }

  .empty-state h2 {
    font-size: 30px;
  }

  .back-link {
    margin-bottom: 48px;
  }

  .breadcrumbs {
    margin-bottom: 48px;
  }

  .article-masthead h1 {
    margin-top: 18px;
    font-size: 40px;
  }

  .article-deck {
    font-size: 17px;
  }

  .prose {
    padding: 58px 0 90px;
    font-size: 16px;
  }

  .prose h1 {
    font-size: 34px;
  }

  .prose h2 {
    margin-top: 58px;
    font-size: 27px;
  }

  .prose h3 {
    margin-top: 40px;
    font-size: 21px;
  }

  .prose blockquote {
    padding-left: 18px;
  }

  .prose blockquote p {
    font-size: 18px;
  }

  .site-footer {
    min-height: 96px;
    gap: 20px;
  }

  .arabic-practice-band {
    padding: 64px 0 30px;
  }

  .practice-stat {
    min-height: 88px;
    padding: 16px 14px;
  }

  .practice-stat strong {
    font-size: 18px;
  }

  .practice-mode-switch {
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px;
  }

  .practice-mode-switch button {
    min-width: 108px;
    padding: 0 14px;
  }

  .practice-question-head {
    align-items: flex-start;
  }

  .practice-question-head > div {
    padding: 15px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .practice-reset {
    padding-top: 17px;
  }

  .practice-question {
    min-height: 510px;
    padding: 38px 0 44px;
  }

  .practice-prompt {
    max-width: 300px;
    font-size: 17px;
  }

  .practice-stimulus {
    min-height: 100px;
    font-size: 64px;
  }

  .practice-stimulus[lang="en"] {
    font-size: 40px;
  }

  .practice-options {
    min-height: 226px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .practice-option {
    min-height: 108px;
  }

  .practice-option span {
    font-size: 46px;
  }

  .arabic-stage {
    min-height: 0;
    padding: 24px 0 28px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .arabic-stage-glyph {
    padding-bottom: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .arabic-glyph {
    min-width: 0;
    font-size: 96px;
  }

  .arabic-glyph-wide {
    font-size: 66px;
  }

  .arabic-stage-copy strong {
    font-size: 27px;
  }

  .arabic-comparison {
    padding: 18px 12px;
    font-size: 42px;
  }

  .arabic-form-cell {
    min-height: 154px;
  }

  .arabic-form-cell b {
    font-size: 50px;
  }

  .speech-panel {
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .speech-settings,
  .speech-actions,
  .speech-feedback {
    grid-column: 1;
  }

  .speech-button {
    min-height: 44px;
  }

  .speech-button-compact {
    width: calc(25% - 8px);
    min-width: 64px;
    min-height: 72px;
  }

  .lesson-navigation {
    min-height: 0;
    margin-top: -36px;
    margin-bottom: 84px;
    grid-template-columns: 1fr;
  }

  .lesson-navigation-placeholder {
    display: none;
  }

  .lesson-navigation-link {
    min-height: 106px;
  }

  .lesson-navigation-next {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .note-arrow {
    transition: none;
  }
}
