:root {
  color-scheme: light;
  --ink: #182841;
  --muted: #53647a;
  --blue: #254ca3;
  --canvas: #f7f8f3;
  --line: #dce3e9;
  --mint: #e5f4ee;
  --green: #155d4b;
  --violet: #eeebfb;
  --purple: #59469c;
  font-family: "Noto Sans Arabic", "SF Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.65;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #557bd2; outline-offset: 4px; }
.shell { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }

.site-header { border-bottom: 1px solid #e2e7de; }
.header-inner {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}
.brand-mark, .heading-mark {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: .75rem;
}
.brand-mark { width: 2.45rem; height: 2.45rem; color: white; background: #253f78; }
.brand-name {
  font-family: system-ui, sans-serif;
  font-size: 1.24rem;
  font-weight: 760;
  letter-spacing: -.045em;
}
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.site-nav a, .study-navigation > summary {
  padding: .55rem .7rem;
  border-radius: .55rem;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 750;
  text-decoration: none;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); background: #edf2fc; }
.study-navigation { position: relative; }
.study-navigation > summary { cursor: pointer; list-style: none; white-space: nowrap; }
.study-navigation > summary::-webkit-details-marker { display: none; }
.study-navigation > summary::after { content: "▾"; margin-inline-start: .3rem; }
.study-navigation[open] > summary, .study-navigation:has([aria-current]) > summary { color: var(--blue); background: #edf2fc; }
.study-navigation-links {
  position: absolute;
  z-index: 2;
  inset-block-start: calc(100% + .2rem);
  inset-inline-end: 0;
  width: max-content;
  min-width: 11rem;
  max-width: calc(100vw - 2rem);
  display: grid;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: #fff;
  box-shadow: 0 .35rem 1.5rem #253f7820;
}

.main { padding-block: 2.65rem 3.5rem; }

.intro { max-width: 49rem; margin: 0 auto 1.9rem; }
.intro h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  font-weight: 800;
  line-height: 1.2;
}
.intro .intro-accent { color: var(--green); }
.home-page, .practice-page, .progress-page, .account-page, .subscription-notice, .study-tool-page { max-width: 49rem; margin-inline: auto; }
.profile-picker {
  width: min(49rem, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: .7rem;
  row-gap: .3rem;
  margin: 0 auto .9rem;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 750;
}
.profile-picker select {
  max-width: min(100%, 20rem);
  min-width: 10rem;
  min-height: 2.55rem;
  padding: .35rem .55rem;
  border: 1px solid #d0dae6;
  border-radius: .58rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.subscription-notice h1 { font-size: 1.45rem; }
.subscription-notice p { color: var(--muted); margin: .45rem 0 .8rem; }
.subscription-notice a { text-decoration: none; }
.home-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.home-option { color: var(--ink); text-decoration: none; }
.home-option:hover { border-color: #a3b7df; }
.home-option h2 { font-size: 1.2rem; }
.home-option p { margin-top: .3rem; color: var(--muted); font-size: .94rem; }
.workspace { display: grid; gap: 1.25rem; max-width: 49rem; margin-inline: auto; }
.workspace.has-photo { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.card {
  padding: 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  box-shadow: 0 .3rem 1.5rem rgba(22, 45, 65, .045);
}
.card-heading { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1.15rem; }
.heading-mark { width: 2.65rem; height: 2.65rem; }
.mint { background: var(--mint); color: var(--green); }
.violet { background: var(--violet); color: var(--purple); }
.sparkle { font: 1.35rem/1 system-ui, sans-serif; }
.card-heading h2 { font-size: 1.25rem; line-height: 1.4; font-weight: 800; }
.card-heading p { color: var(--muted); font-size: .94rem; }

#guide-subtitle:empty { display: none; }
.study-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: .7rem;
  margin-bottom: .9rem;
}
.study-settings label { min-width: 0; color: var(--muted); font-size: .88rem; font-weight: 700; }
.select-wrap { display: block; position: relative; margin-top: .28rem; }
.select-wrap::after {
  position: absolute;
  inset-block-start: calc(50% - .3rem);
  inset-inline-end: .85rem;
  width: .44rem;
  height: .44rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
  content: "";
}
.select-wrap select {
  appearance: none;
  width: 100%;
  min-height: 2.85rem;
  padding: .4rem .62rem;
  padding-inline-end: 1.7rem;
  border: 1px solid #d0dae6;
  border-radius: .65rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 15.4rem;
  padding: .65rem;
  border: 1.5px dashed #abc6ba;
  border-radius: .95rem;
  background: #f3f8f4;
  transition: background .15s ease, border-color .15s ease;
}
.drop-zone.dragging { background: #dff2e6; border-color: var(--green); }
.photo-placeholder { text-align: center; padding: .65rem .35rem; }
.viewfinder {
  display: grid;
  place-items: center;
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto .9rem;
  color: var(--green);
}
.viewfinder span { position: absolute; width: .58rem; height: .58rem; border: 1.5px solid #71a694; }
.viewfinder span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: .22rem; }
.viewfinder span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: .22rem; }
.viewfinder span:nth-child(3) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: .22rem; }
.viewfinder span:nth-child(4) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: .22rem; }
.viewfinder .icon { transform: scale(1.4); }
.drop-title { font-size: 1.07rem; font-weight: 800; }
.drop-description { font-size: .9rem; color: var(--muted); }
.preview { display: block; max-width: 100%; max-height: 23rem; border-radius: .45rem; }

.drop-zone.pdf-mode { display: block; min-height: 0; border-style: solid; }
.file-preview { min-width: 0; padding: .32rem; text-align: start; }
.file-name { color: var(--ink); font-size: .93rem; font-weight: 750; overflow-wrap: anywhere; }
.file-preview progress { display: block; width: 100%; height: .55rem; margin-block: .6rem; accent-color: var(--green); }
.file-progress { color: var(--muted); font-size: .89rem; }
.pdf-results { display: grid; gap: 1.25rem; }
.pdf-page-label { margin-bottom: .6rem; color: var(--blue); font-size: .92rem; font-weight: 800; }
.pdf-page-frame {
  display: grid;
  place-items: center;
  padding: .6rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .72rem;
  background: #f3f6f5;
}
.pdf-page-frame:has(img[hidden]) { min-height: 3rem; }
.pdf-page-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, 47rem);
  border-radius: .3rem;
  background: white;
  object-fit: contain;
}
.pdf-explanation { margin-top: .9rem; }
.pdf-page-status { color: var(--muted); font-size: .94rem; }
.pdf-page-status.error { color: #962b27; }
.pdf-lesson-title { margin-bottom: .7rem; font-size: 1.35rem; line-height: 1.35; }
.pdf-retry { margin-top: .55rem; }

.photo-options { display: flex; gap: .6rem; margin-top: .9rem; }
.button {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.95rem;
  padding: .53rem .7rem;
  border: 1px solid transparent;
  border-radius: .69rem;
  font-size: .97rem;
  font-weight: 800;
  cursor: pointer;
}
.button:disabled { cursor: wait; opacity: .65; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:not(:disabled):hover { background: #1e3e88; }
.button-outline { color: var(--ink); background: white; border-color: #d0dae6; }
.button-outline:not(:disabled):hover { background: #f3f6fb; }
.button .sparkle { font-size: 1.1rem; }
.privacy {
  margin-top: .88rem;
  color: var(--muted);
  font-size: .85rem;
}
.privacy .icon { margin-inline: .12rem .27rem; transform: scale(.83); }
.feedback { margin-top: .65rem; color: var(--blue); font-size: .94rem; }
.error { color: #962b27; }

.task + .task { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.task h3 { font-size: .88rem; font-weight: 800; }
.task p { overflow-wrap: anywhere; }
.original-panel, .question-panel { border-radius: .75rem; padding: .75rem .85rem; }
.original-panel { background: #f1f4fa; }
.original-panel h3 { color: #384e78; }
.source-text { font-family: system-ui, sans-serif; line-height: 1.55; font-weight: 650; margin-top: .22rem; }
.explanation { margin-block: .87rem; }
.explanation p { margin-top: .15rem; }
.question-panel { background: #eaf6f0; }
.question-panel h3 { color: var(--green); }
.translation { margin-top: .23rem; color: #375e53; font-size: .93rem; }
.guide-note { margin-bottom: .9rem; padding: .7rem .8rem; border-radius: .65rem; background: #fff5dc; color: #714c0e; }
.guide-note:last-child { margin-bottom: 0; }
.read-directions { margin-bottom: .8rem; }
.listen-button { min-height: 2.75rem; padding-block: .3rem; color: var(--blue); }
.listen-button[data-playing] { border-color: #a3b7df; background: #edf2fc; }
.read-aloud-status { margin-top: .35rem; color: #962b27; font-size: .85rem; }
.read-aloud-status:empty { margin-top: 0; }
.guide-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  margin-bottom: 1.1rem;
  padding: .25rem;
  border-radius: .75rem;
  background: #edf1f7;
}
.view-button {
  min-height: 2.5rem;
  padding: .4rem .55rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .94rem;
  font-weight: 750;
}
.view-button[aria-pressed="true"] {
  border-color: #d9e1ec;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 .1rem .3rem rgba(22, 45, 65, .08);
}
.lesson-overview + .lesson-section, .lesson-point + .lesson-section { margin-top: 1.1rem; }
.lesson-section + .lesson-section { margin-top: 1.35rem; }
.lesson-section h3 { margin-bottom: .45rem; font-size: 1.06rem; color: var(--green); }
.lesson-point {
  margin-top: .75rem;
  padding: .72rem .85rem;
  border: 1px solid #d9e8e0;
  border-radius: .72rem;
  background: #f3f8f5;
}
.lesson-point h3 { margin-bottom: .2rem; font-size: 1rem; }
.vocabulary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.vocabulary-item { padding: .6rem .72rem; border: 1px solid var(--line); border-radius: .65rem; }
.vocabulary-item .translation { margin-top: .12rem; }
.vocabulary-item .read-aloud { margin-top: .45rem; }
.practice-task {
  margin-top: .7rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.practice-choices { display: grid; gap: .4rem; margin-top: .58rem; }
.practice-choice {
  min-height: 2.75rem;
  padding: .45rem .65rem;
  border: 1px solid #cbd7e8;
  border-radius: .55rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}
.practice-choice span { display: block; overflow-wrap: anywhere; }
.practice-choice .translation { margin: 0; font-size: .9rem; }
.practice-choice:not(:disabled):hover { background: #f1f5fe; }
.practice-choice[data-answer="retry"] { border-color: #b47821; background: #fff6df; }
.practice-choice[data-answer="correct"] { border-color: #3d8063; background: #e6f4eb; }
.practice-choice:disabled { cursor: default; }
.practice-feedback {
  margin-top: .6rem;
  padding: .5rem .68rem;
  border-radius: .55rem;
  background: #f3f7f8;
}
.practice-feedback p { margin-top: .15rem; }
details { margin-top: .75rem; border: 1px solid var(--line); border-radius: .68rem; }
summary {
  padding: .56rem .75rem;
  color: var(--blue);
  cursor: pointer;
  font-size: .93rem;
  font-weight: 800;
}
details > ul { margin: 0; padding-block-end: .65rem; padding-inline: 1.9rem .7rem; }
details > ul li + li { margin-top: .55rem; }
.lesson-extra-content { padding: 0 .75rem .75rem; }

.answer-check {
  margin-top: 1rem;
  border-color: #bad8cd;
  background: #f7fbf8;
}
.answer-check > summary { padding: .72rem .85rem; color: var(--green); font-size: 1rem; }
.answer-form { display: grid; gap: .72rem; padding: .12rem .8rem .85rem; }
.answer-field { display: grid; gap: .25rem; min-width: 0; color: var(--muted); font-size: .91rem; font-weight: 700; }
.answer-field .select-wrap { min-width: 0; margin: 0; }
.answer-field input,
.answer-field textarea {
  width: 100%;
  padding: .56rem .68rem;
  border: 1px solid #cad8d2;
  border-radius: .62rem;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}
.answer-field textarea { resize: vertical; min-height: 5.7rem; }
.answer-photo-options { display: flex; gap: .45rem; }
.answer-photo-options .button { min-width: 0; padding-inline: .48rem; font-size: .88rem; }
.answer-preview { display: block; max-width: 100%; max-height: 12rem; border: 1px solid var(--line); border-radius: .5rem; }
.answer-remove-photo {
  justify-self: start;
  padding: .16rem .25rem;
  border: 0;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-size: .88rem;
}
.answer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; }
.answer-actions .button { flex: none; }
.answer-status { flex: 1 0 12rem; color: var(--muted); font-size: .9rem; }
.answer-status.error { color: #962b27; }
.answer-hint { padding: .65rem .78rem; border: 1px solid #c9e2d7; border-radius: .62rem; background: #eaf6ef; }
.answer-hint strong { display: block; margin-bottom: .16rem; color: var(--green); }
.answer-notice { color: var(--muted); font-size: .83rem; }

.practice-link { flex: none; margin-block-start: .85rem; text-decoration: none; }
.practice-sheet-toolbar { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; justify-content: space-between; }
.practice-sheet-toolbar .button { flex: none; }
.practice-print-heading, .practice-print-number, .practice-print-space { display: none; }
.practice-exercise-title { font-size: 1.35rem; line-height: 1.4; }
.practice-instructions { color: var(--muted); font-size: .94rem; }
.practice-instructions.error { color: #962b27; }
.practice-questions { display: grid; gap: .6rem; margin-block: .9rem 1.25rem; }
.practice-question { padding: .7rem .85rem; border: 1px solid var(--line); border-radius: .72rem; background: #f4f6fa; }
.practice-question h3 { color: var(--blue); font-size: .9rem; }
.practice-question p { overflow-wrap: anywhere; }
.practice-material { margin-top: .6rem; padding: .5rem .65rem; border-radius: .48rem; background: #fff; white-space: pre-wrap; }
.practice-form { padding-top: 1rem; border-top: 1px solid var(--line); }
.practice-form h2 { font-size: 1.12rem; }
.practice-grade { padding: .9rem; border: 1px solid #c9e2d7; border-radius: .7rem; background: #eaf6ef; }
.grade-label { font-size: .95rem; color: var(--green); }
.grade-score { width: fit-content; font-size: 2rem; font-weight: 800; line-height: 1.3; color: var(--green); }
.grade-items { display: grid; gap: .6rem; margin-top: .75rem; }
.grade-item { padding: .65rem .75rem; background: #fff; border-radius: .55rem; }
.grade-item-heading { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.grade-item p { margin-top: .22rem; font-size: .94rem; overflow-wrap: anywhere; }
.grade-points { flex: none; color: var(--green); font-weight: 750; }
.grade-question, .grade-correction { margin-top: .55rem; }
.grade-translation { margin-top: .45rem; padding: .48rem .6rem; background: #f1f4fa; border-radius: .4rem; }
.grade-translation strong, .grade-correction strong { display: block; color: #384e78; font-size: .82rem; }
.grade-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: .55rem; }
.grade-comparison-answer { padding: .52rem .58rem; border-radius: .42rem; background: #f6f7fa; }
.grade-comparison-answer strong { display: block; color: #384e78; font-size: .82rem; line-height: 1.45; }
.grade-comparison-answer p { white-space: pre-wrap; }
.grade-reference { background: #ecf6ef; }
.grade-reference strong { color: var(--green); }
.grade-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .6rem; margin-top: .8rem; font-size: .9rem; }
.grade-footer a { font-weight: 750; color: var(--green); }
.grade-topics { margin-top: .5rem; border: 1px solid #cde0d7; border-radius: .62rem; padding: .65rem .7rem; background: #f6fbf8; }
.grade-topics h4 { color: var(--green); font-size: .94rem; }
.grade-topic-list { padding: 0; margin: .2rem 0 0; list-style: none; }
.grade-topic { display: flex; justify-content: space-between; gap: .7rem; align-items: baseline; padding-block: .22rem; }
.grade-topic + .grade-topic { border-top: 1px solid #e1ede7; }
.grade-follow-up { margin-top: .7rem; }
.grade-follow-up .button, .progress-review-action { flex: none; min-height: 2.7rem; }
.grade-follow-up .feedback { margin-top: .35rem; }
.follow-up-status { margin-bottom: .85rem; }
.grade-coach { padding: .48rem .62rem; margin-top: .55rem; border-radius: .45rem; background: #f7f5fc; }
.grade-coach summary { color: var(--purple); font-size: .93rem; font-weight: 750; }
.grade-coach p { padding-inline-start: .3rem; }
.grade-coach strong { color: var(--purple); }

#progress-content { display: grid; gap: .9rem; }
.progress-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.progress-stat { padding: .8rem .85rem; }
.progress-stat dt { color: var(--muted); font-size: .85rem; font-weight: 650; }
.progress-stat dd { margin: .13rem 0 0; font-size: clamp(1.02rem, 4vw, 1.45rem); font-weight: 800; color: var(--green); }
.progress-section h2 { font-size: 1.15rem; margin-bottom: .55rem; }
.progress-focus { background: #f7f5fc; }
.progress-review { border-color: #cde0d7; }
.progress-review-entry { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .45rem .65rem; }
.progress-review-skill { min-width: 0; overflow-wrap: anywhere; }
.progress-list { margin: 0; padding: 0; list-style: none; }
.progress-entry { padding-block: .65rem; border-top: 1px solid var(--line); min-width: 0; }
.progress-entry:last-child { padding-bottom: 0; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; }
.progress-row h3, .progress-row h4 { min-width: 0; overflow-wrap: anywhere; font-size: inherit; }
.progress-row span { flex: none; color: var(--green); font-weight: 750; }
.progress-entry p { font-size: .93rem; overflow-wrap: anywhere; }
.progress-entry .progress-date { color: var(--muted); font-size: .82rem; }
.progress-meter { width: 100%; height: .45rem; display: block; margin-block: .4rem; }
.progress-meter::-webkit-meter-bar { background: #e7efea; border: 0; }
.progress-meter::-webkit-meter-optimum-value { background: #357563; }
.progress-meter::-moz-meter-bar { background: #357563; }
.progress-corrections { margin-top: .5rem; }
.progress-corrections summary { color: var(--blue); font-size: .89rem; }
.progress-correction { padding: .55rem .65rem; margin-top: .4rem; border-radius: .55rem; background: #f4f6fa; }
.progress-model-answer { font-weight: 650; white-space: pre-wrap; }

.account-stack { display: grid; gap: .9rem; }
.account-section h2 { font-size: 1.22rem; margin-bottom: .4rem; }
.account-email { font-weight: 750; overflow-wrap: anywhere; }
.account-meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.account-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem .7rem; }
.account-badge { padding: .2rem .45rem; border-radius: .4rem; background: #eef1f6; color: var(--muted); font-size: .86rem; font-weight: 750; }
.account-badge[data-status="active"] { background: var(--mint); color: var(--green); }
.account-badge[data-status="pending"] { background: #fcf0dc; color: #694815; }
.account-form { display: grid; gap: .6rem; margin-block: .65rem; }
.account-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.account-actions .button, .account-row .button { flex: none; }
.account-packages { border: 0; margin: 0; padding: 0; min-width: 0; }
.account-packages legend { color: var(--muted); font-size: .92rem; font-weight: 700; margin-bottom: .4rem; }
.account-package-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .55rem; }
.account-package {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: .6rem .7rem;
  cursor: pointer;
}
.account-package input { margin: .35rem 0 0; accent-color: var(--blue); }
.account-package:has(input:checked) { border-color: #8ca8cf; background: #f3f7fc; }
.account-package .account-meta { display: block; }
.account-children { display: grid; gap: .5rem; margin-block: .55rem; padding: 0; list-style: none; }
.account-child { border-top: 1px solid var(--line); padding-top: .55rem; }
.account-child h3 { min-width: 0; overflow-wrap: anywhere; font-size: 1rem; }
.account-editor { margin-top: .55rem; border-top: 1px solid var(--line); padding-top: .45rem; }
.account-editor summary { color: var(--blue); font-size: .92rem; }

.guide-actions { margin-bottom: .65rem; }
.library-save {
  border: 1px solid #cde0d7;
  border-radius: .6rem;
  padding: .55rem .68rem;
  background: #f3f8f5;
}
.library-save summary, .library-editor summary, .notebook-meaning summary { color: var(--blue); font-weight: 750; }
.library-save-fields, .notebook-edit-form { display: grid; gap: .5rem; justify-items: start; margin-top: .55rem; }
.library-save-fields label, .notebook-edit-form label { width: 100%; }
.library-toolbar, .library-entry-actions { display: flex; align-items: end; flex-wrap: wrap; gap: .55rem .85rem; margin-bottom: .8rem; }
.library-toolbar > label { min-width: min(13rem, 100%); }
.library-toolbar .button, .library-entry-actions .button, .library-save-fields .button { flex: none; text-decoration: none; }
.library-results, .library-group, .notebook-list { display: grid; gap: .65rem; }
.library-group { margin-bottom: .55rem; }
.library-group h2, .library-detail h2 { font-size: 1.25rem; }
.library-entry h3, .notebook-entry-title h2 { font-size: 1.13rem; overflow-wrap: anywhere; }
.library-meta { margin-block: .3rem .55rem; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.library-editor { margin-top: .6rem; }
.library-empty .library-entry-actions { margin: .65rem 0 0; }
.library-guide { margin-top: .8rem; }
.library-detail h2 { margin-top: .7rem; }
.vocabulary-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .45rem; }
.vocabulary-actions .button { flex: none; font-size: .85rem; min-height: 2.45rem; }
.notebook-list { margin: .7rem 0; padding: 0; list-style: none; }
.notebook-entry-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem .65rem; }
.notebook-entry-title p, .notebook-status { color: var(--muted); font-size: .9rem; }
.notebook-status.error { color: #962b27; }
.notebook-entry .read-aloud { margin-block: .5rem; }
.notebook-meaning { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .48rem; }
.notebook-meaning p { margin-top: .32rem; }
.notebook-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.notebook-controls .button { flex: none; }
.test-prep-form, .test-prep-list { display: grid; gap: .55rem; }
.test-prep-language { max-width: 20rem; }
.test-prep-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.test-prep-fieldset legend { font-weight: 750; }
.test-prep-count, .test-prep-meta { color: var(--muted); font-size: .88rem; }
.test-prep-count { margin: .2rem 0 .48rem; }
.test-prep-choice { display: flex; align-items: start; gap: .5rem; border: 1px solid var(--line); border-radius: .62rem; padding: .6rem .68rem; cursor: pointer; }
.test-prep-choice input { margin: .35rem 0 0; accent-color: var(--blue); }
.test-prep-choice:has(input:checked) { border-color: #8ca8cf; background: #f3f7fc; }
.test-prep-choice.choice-disabled { opacity: .62; }
.test-prep-description { display: grid; min-width: 0; overflow-wrap: anywhere; }

.icon { position: relative; display: inline-block; flex: none; width: 1.15rem; height: 1.15rem; }
.icon::before, .icon::after { content: ""; display: block; position: absolute; }
.icon-camera {
  height: .83rem;
  border: 1.6px solid currentColor;
  border-radius: .2rem;
  margin-top: .13rem;
}
.icon-camera::before { inset: -.29rem 22% auto; height: .24rem; background: currentColor; border-radius: .12rem .12rem 0 0; }
.icon-camera::after { inset: 50% auto auto 50%; width: .42rem; height: .42rem; border: 1.5px solid currentColor; border-radius: 50%; transform: translate(-50%, -50%); }
.icon-book::before, .icon-book::after { inset: .12rem 50% .12rem 0; border: 1.5px solid; border-radius: .15rem .25rem .12rem .1rem; transform: skewY(9deg); }
.icon-book::after { inset: .12rem 0 .12rem 50%; border-radius: .25rem .15rem .1rem .12rem; transform: skewY(-9deg); }
.icon-upload { border: 1.5px solid; border-top: 0; border-radius: 0 0 .18rem .18rem; height: .48rem; margin-top: .45rem; }
.icon-upload::before { left: calc(50% - .75px); width: 1.5px; height: .61rem; top: -.37rem; background: currentColor; }
.icon-upload::after { width: .39rem; height: .39rem; left: 50%; top: -.39rem; border-top: 1.5px solid; border-left: 1.5px solid; transform: translateX(-50%) rotate(45deg); }
.icon-lock { width: .83rem; height: .65rem; border: 1.4px solid currentColor; border-radius: .13rem; }
.icon-lock::before { height: .38rem; width: .48rem; inset: -.46rem auto auto 50%; transform: translateX(-50%); border: 1.4px solid; border-bottom: 0; border-radius: .3rem .3rem 0 0; }

@media (max-width: 48rem) {
  .workspace, .workspace.has-photo { grid-template-columns: 1fr; gap: 1rem; }
  .main { padding-block: 1.6rem 2.2rem; }
  .intro { margin-block-end: 1.25rem; }
  .drop-zone { min-height: 12.5rem; }
}
@media (max-width: 30rem) {
  .shell { width: calc(100% - 1.5rem); }
  .header-inner { min-height: 3.9rem; gap: .35rem; flex-wrap: wrap; padding-block: .3rem; }
  .site-nav { gap: .12rem; }
  .site-nav a, .study-navigation > summary { padding-inline: .4rem; font-size: .84rem; }
  .study-navigation-links { inset-inline-start: 0; inset-inline-end: auto; }
  .home-options { grid-template-columns: 1fr; }
  .progress-stat { padding: .6rem; }
  .card { padding: 1rem; border-radius: 1rem; }
  .card-heading { gap: .65rem; }
  .button { gap: .4rem; padding-inline: .45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  @page practice-sheet { margin: 12mm 14mm; }
  body[data-page="practice"] {
    background: #fff;
    color: #111;
  }
  body[data-page="practice"] .site-header,
  body[data-page="practice"] .profile-picker,
  #practice-page > .intro,
  #practice-page .practice-sheet-toolbar,
  #practice-page .practice-form,
  #practice-page .practice-screen-number { display: none; }
  body[data-page="practice"] .main {
    width: 100%;
    padding: 0;
  }
  #practice-page { page: practice-sheet; font-size: 11pt; line-height: 1.3; }
  #practice-page, #practice-content { max-width: none; }
  #practice-content { border: 0; border-radius: 0; box-shadow: none; padding: 0; }
  #practice-content .practice-questions { display: block; direction: ltr; margin: 6mm 0 0; }
  #practice-content .practice-question {
    break-inside: avoid;
    border: 0;
    background: transparent;
    padding: 0;
    margin-bottom: 5mm;
    display: grid;
    grid-template-columns: 6mm minmax(0, 1fr);
    align-items: start;
  }
  #practice-content .source-text { line-height: inherit; margin-top: 0; }
  #practice-content .practice-material {
    grid-column: 2;
    margin-top: 1mm;
    border: 0;
    border-radius: 0;
    border-inline-start: 1px solid #aaa;
    padding: 0 0 0 2mm;
  }
  .practice-print-heading, .practice-print-number, .practice-print-space { display: block; }
  .practice-print-identification { display: flex; gap: 7mm; margin-top: 3mm; }
  .practice-print-identification > div { display: flex; flex: 1; gap: .5rem; }
  .practice-print-identification .print-line { flex: 1; }
  .practice-print-number { font-weight: 750; }
  .practice-print-space { grid-column: 2; }
  .practice-print-space .print-line { height: 6mm; }
  .print-line { border-bottom: 1px solid #a3a3a3; }
}
