:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #f6f8fa;
  font-synthesis: none;
  --blue: #1a73e8;
  --blue-dark: #1558b0;
  --border: #dfe3e8;
  --muted: #5f6368;
  --surface: #fff;
  --sidebar: #202124;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: #f6f8fa;
  color: #202124;
  font-size: 0.925rem;
  line-height: 1.5;
}
.user-layout { display: flex; flex-direction: column; }
.user-layout > .user-main { flex: 1 0 auto; }

a { color: var(--blue-dark); }
a:hover { color: var(--blue); }

h1, h2, h3 { color: #202124; line-height: 1.2; }
h1 { margin: 0.15rem 0 0.65rem; font-size: clamp(1.65rem, 2.6vw, 2.25rem); font-weight: 650; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0.5rem 0 1rem; }

button,
.button-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.58rem 0.85rem;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

button:hover, .button-link:hover { background: var(--blue-dark); color: #fff; }
.button--secondary { background: #5f6368; }
.button--link, .nav-button {
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}
.button--link:hover, .nav-button:hover { background: transparent; color: var(--blue); }

.user-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 3.25rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(8px);
}

.user-header__inner {
  position: relative;
  display: grid;
  width: min(88rem, 100%);
  min-height: 3.25rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.header-learning-tools { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 0.7rem; }
.learning-pair { display: inline-flex; max-width: 18rem; overflow: hidden; gap: 0.35rem; border-radius: 999px; padding: 0.3rem 0.65rem; background: #f1f3f4; color: #3c4043; font-size: 0.78rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.learning-pair:hover { background: #e8eaed; color: #202124; }
.learning-pair__icon { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; fill: currentcolor; }

.streak-control { display: inline-flex; flex: 0 0 auto; gap: 0.28rem; border: 1px solid transparent; border-radius: 999px; padding: 0.3rem 0.52rem; background: transparent; color: #5f6368; font-size: 0.8rem; font-weight: 700; }
.streak-control:hover, .streak-control:focus-visible { border-color: #d2e3fc; background: #f1f3f4; color: #174ea6; }
.streak-control--complete { color: #356859; }
.streak-control__icon { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.streak-control__status { fill: transparent; stroke: currentcolor; stroke-width: 1.5; opacity: 0.5; }
.streak-control__wave { stroke: currentcolor; stroke-width: 1.7; }
.streak-control--complete .streak-control__status { fill: currentcolor; opacity: 1; }
.streak-control--complete .streak-control__wave { stroke: #fff; }
.site-brand {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #202124;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand__icon {
  width: 1.55em;
  height: 1.55em;
  flex: 0 0 auto;
  margin-right: -0.06em;
}

.user-nav { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: 0.15rem; }
.user-nav > a,
.nav-dropdown > summary {
  border-radius: 0.25rem;
  padding: 0.45rem 0.65rem;
  color: #3c4043;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.user-nav > a:hover, .nav-dropdown > summary:hover { background: #f1f3f4; color: #202124; }
.user-nav .nav-primary { color: var(--blue-dark); }
.user-nav .nav-help { display: grid; width: 2.15rem; height: 2.15rem; place-items: center; padding: 0.42rem; }
.nav-help svg { width: 1.25rem; height: 1.25rem; }
.nav-toggle, .nav-toggle-label { display: none; }

.nav-dropdown { position: relative; }
.nav-dropdown > summary { display: flex; align-items: center; cursor: pointer; list-style: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { margin-left: 0.4rem; content: "▾"; font-size: 0.7rem; }
.nav-user { display: inline-block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.nav-user__icon { display: none; width: 1.25rem; height: 1.25rem; }
.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 12rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.35rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgb(60 64 67 / 16%);
}
.nav-dropdown__menu a, .nav-dropdown__menu .nav-button {
  display: block;
  width: 100%;
  border-radius: 0.25rem;
  padding: 0.48rem 0.6rem;
  color: #3c4043;
  text-align: left;
  text-decoration: none;
}
.nav-dropdown__menu a:hover, .nav-dropdown__menu .nav-button:hover { background: #f1f3f4; }
.nav-dropdown__menu form { margin: 0; }

.user-main {
  width: min(76rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.6rem 0 3rem;
}
.page--narrow { width: min(31rem, calc(100% - 2.5rem)); }
.page--reader { width: min(64rem, calc(100% - 2.5rem)); }
.page--practice { width: min(58rem, calc(100% - 2.5rem)); }
.page--memberships { width: min(72rem, calc(100% - 2.5rem)); }
.page--legal { width: min(52rem, calc(100% - 2.5rem)); }
.page--home { width: min(78rem, calc(100% - 2.5rem)); padding-top: 0; }
.error-reference { color: var(--muted); }
.error-reference code { color: #3c4043; font-weight: 650; }
.error-details { margin-top: 1.25rem; }
.error-details summary { cursor: pointer; font-weight: 650; }
.error-details textarea { width: 100%; margin-top: 0.65rem; resize: vertical; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.7rem; background: #f8f9fa; color: #3c4043; font: 0.78rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.error-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.landing-hero {
  display: grid;
  min-height: min(38rem, calc(100vh - 3.25rem));
  grid-template-columns: minmax(0, 1.6fr) minmax(14rem, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
  padding: 4rem 0;
}
.landing-hero__copy { max-width: 48rem; }
.landing-hero h1 { max-width: 47rem; font-size: clamp(2.2rem, 5vw, 4.3rem); letter-spacing: -0.04em; }
.landing-hero__lead { max-width: 44rem; color: #4b5156; font-size: clamp(1rem, 1.8vw, 1.2rem); }
.landing-hero__summary { display: grid; gap: 0.55rem; border-left: 2px solid #a8c7fa; padding: 0.4rem 0 0.4rem 1.25rem; }
.landing-hero__summary span { color: #3c4043; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 650; }
.landing-section { border-top: 1px solid var(--border); padding: 3.5rem 0; }
.landing-section__heading { max-width: 42rem; margin-bottom: 1.5rem; }
.landing-section__heading h2, .landing-context h2, .landing-cta h2 { margin: 0.15rem 0 0.65rem; font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -0.025em; }
.learning-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 0.8rem; margin: 0; padding: 0; list-style: none; }
.learning-steps li { border-top: 2px solid var(--border); padding: 1rem 0.25rem 0; }
.learning-steps__number { display: inline-flex; width: 1.65rem; height: 1.65rem; align-items: center; justify-content: center; border-radius: 999px; background: #e8f0fe; color: #174ea6; font-size: 0.78rem; font-weight: 750; }
.learning-steps h3 { margin: 0.7rem 0 0.3rem; }
.learning-steps p { margin: 0; color: var(--muted); }
.landing-context { display: grid; grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 8vw, 7rem); border-top: 1px solid var(--border); padding: 3.5rem 0; }
.landing-context > div:last-child { max-width: 42rem; color: #4b5156; font-size: 1rem; }
.landing-cta { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin: 0 0 1rem; border-radius: 0.65rem; padding: clamp(1.4rem, 4vw, 2.5rem); background: #e8f0fe; }
.landing-cta > div:first-child { max-width: 43rem; }
.landing-cta p:last-child { margin-bottom: 0; color: #4b5156; }
.landing-cta .actions { flex: 0 0 auto; margin-top: 0; }
.legal-document { border: 1px solid var(--border); border-radius: 0.5rem; padding: clamp(1.25rem, 4vw, 2.5rem); background: #fff; }
.legal-document header { margin-bottom: 2rem; }
.legal-document section { margin-top: 2rem; }
.legal-document h2 { margin-bottom: 0.45rem; }
.legal-document li + li { margin-top: 0.45rem; }
.legal-document__updated { color: var(--muted); font-size: 0.84rem; }
.site-footer { width: min(78rem, calc(100% - 2.5rem)); margin: 0 auto; border-top: 1px solid var(--border); padding: 1rem 0 1.5rem; color: var(--muted); font-size: 0.78rem; }
.site-footer p { display: flex; flex-wrap: wrap; gap: 0.25rem 0.45rem; margin: 0; }
.site-footer a { color: inherit; }

.eyebrow {
  margin: 0 0 0.25rem;
  color: #667085;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-heading, .admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 1.4rem; }
.actions form { margin: 0; }
.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.86rem; text-decoration: none; }
.panel {
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 1rem;
  background: var(--surface);
}
.page--help { width: min(66rem, calc(100% - 2.5rem)); }
.help-heading { max-width: 42rem; margin-bottom: 2rem; }
.help-heading > p:last-child { color: var(--muted); font-size: 1rem; }
.help-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.help-options--hub { align-items: stretch; }
.help-option { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.help-option h2 { margin: 0 0 0.35rem; }
.help-option p { margin: 0 0 1rem; color: var(--muted); }
.help-option .button-link, .help-option form { margin-top: auto; }
.help-guide { display: grid; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.help-guide-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; border: 1px solid var(--border); border-radius: 0.55rem; padding: clamp(1rem, 3vw, 1.4rem); background: #fff; }
.help-guide-step__number { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 999px; background: #e8f0fe; color: #174ea6; font-weight: 750; }
.help-guide-step h2 { margin: 0 0 0.4rem; }
.help-guide-step p { margin: 0 0 0.65rem; color: #3c4043; }
.help-guide-step ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.help-guide-step li + li { margin-top: 0.3rem; }
.help-next-step { margin-top: 1rem; border-color: #a8c7fa; background: #f4f8ff; }
.help-next-step h2 { margin-top: 0; }
.help-next-step p { margin-bottom: 0; }
.help-faq { display: grid; gap: 0.55rem; }
.help-faq details { border: 1px solid var(--border); border-radius: 0.45rem; background: #fff; }
.help-faq summary { padding: 0.85rem 1rem; font-weight: 650; cursor: pointer; }
.help-faq details[open] summary { border-bottom: 1px solid var(--border); }
.help-faq p { margin: 0; padding: 0.85rem 1rem 1rem; color: var(--muted); }
.help-contact-note { margin-top: 1.25rem; color: var(--muted); }
.membership-page-heading { max-width: 45rem; margin-bottom: 1.2rem; }
.membership-page-heading > p:last-child { margin-bottom: 0; color: var(--muted); }
.membership-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.membership-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid var(--border); border-radius: 0.5rem; padding: 1rem; background: #fff; }
.membership-card--available { border-color: #a8c7fa; box-shadow: 0 1px 3px rgb(26 115 232 / 10%); }
.membership-card--current { border-color: #34a853; box-shadow: 0 1px 4px rgb(19 115 51 / 16%); }
.membership-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.membership-card__heading h2 { margin: 0; font-size: 1.15rem; }
.membership-card__badge { border-radius: 999px; padding: 0.18rem 0.48rem; background: #e6f4ea; color: #137333; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.membership-card__badge--soon { background: #f1f3f4; color: var(--muted); }
.membership-card__tagline { min-height: 2.7rem; margin-bottom: 0.65rem; font-weight: 650; }
.membership-card__features { margin: 0 0 1rem; padding-left: 1.2rem; color: #3c4043; }
.membership-card__features li + li { margin-top: 0.45rem; }
.membership-card__price { margin: auto 0 0; padding-top: 1rem; color: #202124; font-size: 1.25rem; font-weight: 700; }
.membership-card__price small { color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.membership-card__annual { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.8rem; }
.membership-card__note { margin: 0.65rem 0 0; border-top: 1px solid var(--border); padding-top: 0.55rem; color: var(--muted); font-size: 0.72rem; }
.membership-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 1rem; }
.practice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.practice-page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.practice-page-heading h1 { margin: 0; }
.practice-help-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--blue); }
.practice-help-icon { display: inline-grid; width: 1.25rem; height: 1.25rem; flex: 0 0 auto; place-items: center; border: 1.5px solid currentColor; border-radius: 999px; padding: 0; background: transparent; color: var(--blue); font-family: Georgia, serif; font-size: 0.82rem; font-weight: 700; line-height: 1; }
.practice-help-link:hover .practice-help-icon, .practice-help-link:focus-visible .practice-help-icon { background: #e8f0fe; }
.practice-help-dialog { width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; border: 1px solid var(--border); border-radius: 0.6rem; padding: 1.25rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.practice-help-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.practice-help-dialog form { position: relative; }
.practice-help-dialog h2 { margin: 0.15rem 2rem 1rem 0; }
.practice-help-dialog__close { position: absolute; top: -0.65rem; right: -0.65rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.practice-help-dialog__close:hover { background: #f1f3f4; color: #202124; }
.practice-help-dialog__steps { display: grid; gap: 0.85rem; margin: 0; padding-left: 1.5rem; }
.practice-help-dialog__steps li { padding-left: 0.25rem; }
.practice-help-dialog__steps p { margin: 0.2rem 0 0; color: var(--muted); }
.practice-help-dialog__upcoming { display: grid; gap: 0.15rem; margin-top: 1rem; border-radius: 0.4rem; padding: 0.75rem; background: var(--surface); }
.practice-help-dialog__upcoming p { margin: 0; }
.practice-start-panel { margin-bottom: 0.8rem; }
.practice-options h2 { margin: 0 0 0.35rem; }
.practice-options p { min-height: 2.8rem; }
.practice-coming-soon { margin-top: 1rem; }
.button--danger { background: #c5221f; }
.button--danger:hover { background: #a50e0e; }
.button--compact { padding: 0.34rem 0.55rem; font-size: 0.8rem; }
.leitner-box { display: inline-flex; border-radius: 999px; padding: 0.15rem 0.48rem; background: #e8f0fe; color: #174ea6; font-size: 0.76rem; font-weight: 700; }
.due-now { color: #b06000; }
.word-bank-table__word, .word-bank-table thead th:first-child { width: 6.5rem; max-width: 6.5rem; white-space: normal; }
.word-bank-table__word { vertical-align: top; overflow-wrap: anywhere; }
.word-bank-table__word .table-secondary { text-transform: lowercase; }
.word-bank-table th:last-child, .word-bank-table__action { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -0.4rem 0 0.65rem rgb(60 64 67 / 8%); }
.word-bank-table th:last-child { z-index: 2; background: #f8f9fa; }
.word-bank-table tbody tr:hover .word-bank-table__action { background: #f8fbff; }
.word-bank-table__action { vertical-align: middle; }
.word-bank-table__action form { margin: 0; }
.word-bank-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem; margin: 0 0 1rem; border: 1px solid var(--border); border-radius: 0.45rem; padding: 0.7rem; background: #fff; }
.word-bank-filters label { align-self: center; font-weight: 650; }
.word-bank-filters select { min-width: 9rem; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.45rem 0.55rem; background: #fff; color: inherit; font: inherit; }
.table-sort { display: inline-flex; align-items: center; gap: 0.25rem; color: inherit; text-decoration: none; white-space: nowrap; }
.table-sort:hover { color: var(--blue-dark); text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.practice-card { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 0.6rem; background: #fff; box-shadow: 0 0.3rem 1rem rgb(60 64 67 / 8%); }
.practice-card__progress, .practice-card__retry { position: absolute; z-index: 2; top: 0.65rem; color: var(--muted); font-size: 0.72rem; font-weight: 650; }
.practice-card__progress { display: flex; align-items: center; gap: 0.4rem; left: 0.75rem; }
.practice-card__progress .practice-help-icon { width: 1.2rem; height: 1.2rem; color: var(--muted); font-size: 0.75rem; }
.practice-card__progress .practice-help-icon:hover, .practice-card__progress .practice-help-icon:focus-visible { background: #e8f0fe; color: #174ea6; }
.practice-card__retry { left: 50%; transform: translateX(-50%); white-space: nowrap; }
.practice-card__quit-form { position: absolute; z-index: 3; top: 0.3rem; right: 0.35rem; margin: 0; }
.practice-card .practice-card__quit { width: 2rem; height: 2rem; border-radius: 999px; padding: 0; background: transparent; color: var(--muted); font-size: 1.4rem; font-weight: 400; }
.practice-card .practice-card__quit:hover { background: #f1f3f4; color: #202124; }
.practice-card__side, .practice-card__answer { min-height: 9rem; padding: 2.35rem 1.25rem 1.25rem; }
.practice-card__side { display: grid; align-content: center; text-align: center; }
.practice-card__side h2, .practice-card__answer h2 { margin: 0.15rem 0; font-size: clamp(1.55rem, 4vw, 2.4rem); }
.practice-card__word { display: flex; align-items: center; justify-content: center; gap: 0.55rem; }
.practice-card .practice-card__audio { width: 2rem; height: 2rem; flex: 0 0 auto; border: 1px solid #a8c7fa; border-radius: 999px; padding: 0; background: #e8f0fe; color: #174ea6; font-size: 0.9rem; }
.practice-card .practice-card__audio:hover, .practice-card .practice-card__audio.is-playing { background: #d2e3fc; color: #174ea6; }
.practice-card .practice-card__info { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border: 0; border-radius: 0.35rem; padding: 0.3rem; background: transparent; color: #5f6368; line-height: 1; }
.practice-card .practice-card__info svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.practice-card .practice-card__info:hover, .practice-card .practice-card__info:focus-visible { background: #e8f0fe; color: #174ea6; }
.practice-card .practice-card__audio--standalone { width: 3rem; height: 3rem; margin: 0 auto; font-size: 1.25rem; }
.practice-card__answer { border-top: 1px solid #c6dafc; background: #e8f0fe; }
.practice-card__answer blockquote { margin: 1rem 0 0; border-left: 3px solid #a8c7fa; padding-left: 0.9rem; color: var(--muted); }
.practice-card__reveal { border-top: 1px solid var(--border); }
.practice-card__reveal > summary { display: flex; width: fit-content; margin: 0.7rem auto; border-radius: 0.3rem; padding: 0.48rem 0.75rem; background: var(--blue); color: #fff; font-size: 0.86rem; font-weight: 600; list-style: none; cursor: pointer; }
.practice-card__reveal > summary::-webkit-details-marker { display: none; }
.practice-card__reveal > summary:hover { background: var(--blue-dark); }
.practice-card__reveal[open] > summary { margin-bottom: 0.7rem; background: #5f6368; }
.practice-assessment { border-top: 1px solid var(--border); padding: 0.7rem; }
.practice-assessment fieldset { margin: 0; border: 0; padding: 0; }
.practice-assessment legend { margin-bottom: 0.45rem; font-size: 0.82rem; font-weight: 700; }
.practice-assessment__options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.45rem; }
.practice-assessment__options button { width: 100%; min-height: 2.5rem; padding: 0.45rem 0.35rem; font-size: 0.78rem; }
.practice-assessment__option--too-easy { border: 1px solid #a8c7fa; background: #e8f0fe; color: #174ea6; }
.practice-assessment__option--knew-it { border: 1px solid #a8d5b5; background: #e6f4ea; color: #137333; }
.practice-assessment__option--rang-a-bell { border: 1px solid #f0cf78; background: #fef7e0; color: #795500; }
.practice-assessment__option--hard { border: 1px solid #efb781; background: #fce8d5; color: #9a4600; }
.practice-assessment__option--no-idea { border: 1px solid #e6aaa5; background: #fce8e6; color: #b3261e; }
.practice-assessment__options .practice-assessment__option:hover { filter: brightness(0.96); color: inherit; }
.practice-assessment__options button:disabled, .practice-assessment__options button.is-submitting { opacity: 0.55; cursor: wait; }
.practice-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin: 1.2rem 0; }
.practice-summary-stat { display: grid; gap: 0.15rem; border: 1px solid var(--border); border-radius: 0.4rem; padding: 0.8rem; background: #fff; text-align: center; }
.practice-summary-stat strong { font-size: 1.6rem; }
.practice-summary-stat span { color: var(--muted); font-size: 0.76rem; }

.auth-form { display: grid; gap: 0.55rem; margin: 1.25rem 0; }
.auth-form label, .import-form label, .result-panel label { margin-top: 0.35rem; font-weight: 600; }
.auth-form input,
.auth-form select,
.auth-form textarea,
.import-form textarea,
.result-panel textarea,
.missing-word-export textarea {
  width: 100%;
  border: 1px solid #bdc1c6;
  border-radius: 0.3rem;
  padding: 0.62rem 0.7rem;
  background: #fff;
  color: #202124;
  font: inherit;
}
.auth-form input:focus, textarea:focus { border-color: var(--blue); outline: 2px solid rgb(26 115 232 / 15%); }
.auth-form textarea { resize: vertical; }
.auth-form button { margin-top: 0.5rem; }
.alert { border-left: 0.22rem solid #d93025; padding: 0.65rem 0.8rem; background: #fce8e6; color: #8c1d18; }
.alert--success { border-left-color: #188038; background: #e6f4ea; color: #137333; }
.hint { margin: 0; color: var(--muted); font-size: 0.84rem; }
.account-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.4rem; margin: 1.25rem 0; }
.account-details dt { font-weight: 600; }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.account-profile { margin-top: 1.5rem; }
.account-profile h2 { margin-bottom: 0.3rem; }

.text-list { display: grid; gap: 0.65rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.text-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.text-card__link {
  display: block;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
}
.text-card:hover { border-color: #a8c7fa; box-shadow: 0 1px 3px rgb(60 64 67 / 12%); color: inherit; }
.text-card h2, .empty-state h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.text-card__actions { display: flex; justify-content: flex-end; margin: 0; border-top: 1px solid var(--border); padding: 0.35rem 0.7rem; }
.text-card__actions .button--link { padding: 0.25rem 0.35rem; font-size: 0.8rem; }
.text-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.text-card__statuses { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; }
.library-search { display: grid; gap: 0.4rem; margin: 1.1rem 0; }
.text-credit-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; margin: 0.75rem 0 1rem; border: 1px solid #a8d5b5; border-radius: 0.45rem; padding: 0.65rem 0.8rem; background: #f1f8f3; }
.text-credit-banner strong { color: #137333; }
.text-credit-banner span { color: var(--muted); font-size: 0.82rem; }
.library-search > label { font-weight: 650; }
.library-search > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.library-search input { width: min(32rem, 100%); border: 1px solid #bdc1c6; border-radius: 0.35rem; padding: 0.6rem 0.7rem; font: inherit; }
.catalog-card__body { padding: 0.85rem 1rem; }
.catalog-card__actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; border-top: 1px solid var(--border); padding: 0.55rem 0.7rem; }
.catalog-card__actions form, .story-preview__actions form { margin: 0; }
.library-status { border-radius: 999px; padding: 0.18rem 0.55rem; font-size: 0.75rem; font-weight: 700; }
.library-status--saved { background: #e6f4ea; color: #137333; }
.library-status--history { background: #f1f3f4; color: #5f6368; }
.story-preview { width: min(38rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; border: 1px solid var(--border); border-radius: 0.6rem; padding: 1.2rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.story-preview::backdrop { background: rgb(32 33 36 / 45%); }
.story-preview__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.story-preview__heading h2 { margin: 0; }
.story-preview__heading .eyebrow { margin: 0 0 0.2rem; }
.story-preview__close { padding: 0 0.35rem; font-size: 1.5rem; line-height: 1; }
.story-preview__summary { font-size: 1.02rem; line-height: 1.6; }
.story-preview__details { display: grid; gap: 0.55rem; margin: 1rem 0; }
.story-preview__details div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.7rem; }
.story-preview__details dt { font-weight: 700; }
.story-preview__details dd { margin: 0; }
.story-preview__actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.reading-status { flex: 0 0 auto; border-radius: 999px; padding: 0.18rem 0.55rem; font-size: 0.75rem; font-weight: 700; }
.reading-status--unread { background: #f1f3f4; color: #5f6368; }
.reading-status--reading {
  background: #1a73e8;
  color: #fff;
  box-shadow: 0 0 0 1px #0b57d0;
}
.reading-status--read { background: #fef7e0; color: #795500; }
.exercise-status { width: fit-content; border-radius: 999px; padding: 0.18rem 0.55rem; font-size: 0.75rem; font-weight: 700; }
.exercise-status--pending { background: #f1f3f4; color: #5f6368; }
.exercise-status--completed { background: #e6f4ea; color: #137333; }
.metadata { display: flex; flex-wrap: wrap; gap: 0.35rem; color: var(--muted); font-size: 0.8rem; }
.metadata span { border-radius: 999px; padding: 0.18rem 0.5rem; background: #f1f3f4; }
.empty-state { margin-top: 1.25rem; border: 1px dashed #bdc1c6; border-radius: 0.4rem; padding: 1.35rem; background: #fff; }
.empty-state p { margin-bottom: 0.6rem; }

.dashboard-heading { margin-bottom: 1rem; }
.dashboard-grid { display: grid; grid-template-areas: "your review" "library library" "activity activity"; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dashboard-grid--with-tip { grid-template-areas: "tip tip" "your review" "library library" "activity activity"; }
.dashboard-card { display: flex; min-width: 0; flex-direction: column; gap: 0.85rem; border: 1px solid var(--border); border-radius: 0.65rem; padding: 1.1rem; background: #fff; box-shadow: 0 0.2rem 0.8rem rgb(60 64 67 / 7%); }
.dashboard-card > :first-child, .dashboard-card h2, .dashboard-card p { margin-top: 0; }
.dashboard-card h2 { margin-bottom: 0; font-size: 1.2rem; }
.dashboard-card--onboarding { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-bottom: 1rem; border-color: #a8c7fa; background: linear-gradient(135deg, #f4f8ff, #fff); }
.dashboard-tip { display: flex; grid-area: tip; align-items: baseline; gap: 0.75rem; border: 1px solid #f0cf78; border-radius: 0.55rem; padding: 0.7rem 0.9rem; background: #fefaf0; }
.dashboard-tip strong { flex: 0 0 auto; color: #765600; }
.dashboard-tip p { margin: 0; }
.dashboard-tip form { margin-left: auto; }
.dashboard-tip__hide { padding: 0; white-space: nowrap; }
.dashboard-card--your-turn { grid-area: your; border-color: #a8c7fa; background: #f8fbff; }
.dashboard-card--library { grid-area: library; }
.dashboard-card--review { grid-area: review; }
.dashboard-card--activity { grid-area: activity; }
.dashboard-status { border-radius: 999px; padding: 0.25rem 0.5rem; background: #e8f0fe; color: #174ea6; font-size: 0.75rem; font-weight: 700; }
.dashboard-status--complete { background: #e6f4ea; color: #137333; }
.dashboard-prompt-preview { border-left: 0.2rem solid #a8c7fa; padding-left: 0.7rem; font-weight: 600; }
.dashboard-card__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.dashboard-card__title { display: flex; min-width: 0; align-items: center; gap: 0.4rem; }
.dashboard-info { position: relative; flex: 0 0 auto; }
.dashboard-info > summary { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border: 1.5px solid #7b8794; border-radius: 999px; color: #5f6368; line-height: 1; list-style: none; cursor: pointer; }
.dashboard-info__icon { display: block; width: 0.8rem; height: 0.8rem; }
.dashboard-info > summary::-webkit-details-marker { display: none; }
.dashboard-info > summary:hover, .dashboard-info > summary:focus-visible, .dashboard-info[open] > summary { border-color: var(--blue); background: #e8f0fe; color: #174ea6; }
.dashboard-popover { position: absolute; z-index: 12; top: calc(100% + 0.5rem); left: 0; width: min(19rem, calc(100vw - 2.5rem)); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.8rem; background: #fff; box-shadow: 0 0.65rem 1.8rem rgb(60 64 67 / 18%); color: #3c4043; font-size: 0.84rem; font-weight: 400; }
.dashboard-popover p { margin: 0.35rem 0 0; }
.dashboard-popover a { display: inline-block; margin-top: 0.55rem; font-weight: 650; }
.dashboard-info--credits > summary { width: auto; height: auto; border: 0; }
.dashboard-info--credits .dashboard-popover { right: 0; left: auto; }
.dashboard-credit-count { display: flex !important; align-items: baseline; gap: 0.28rem; border-radius: 999px !important; padding: 0.28rem 0.58rem !important; background: #e8f0fe; color: #174ea6 !important; font-family: inherit !important; }
.dashboard-credit-count strong { font-size: 0.9rem; }
.dashboard-credit-count span { font-size: 0.7rem; font-weight: 650; }
.dashboard-card__count { display: grid; min-width: 2.1rem; min-height: 2.1rem; place-items: center; border-radius: 999px; background: #e8f0fe; color: #174ea6; font-weight: 750; }
.dashboard-card__action { display: flex; justify-content: center; margin: 0.15rem 0; }
.dashboard-reading-list { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.dashboard-reading-list li { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 0.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.7rem; }
.dashboard-reading-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-reading-title { min-width: 0; overflow-wrap: anywhere; color: #3c4043; font-weight: 500; line-height: 1.35; text-decoration: none; }
.dashboard-reading-title:hover, .dashboard-reading-title:focus-visible { color: var(--blue-dark); text-decoration: underline; }
.dashboard-reading-level { flex: 0 0 auto; margin-top: 0.08rem; border-radius: 999px; padding: 0.15rem 0.42rem; background: #f1f3f4; color: var(--muted); font-size: 0.7rem; font-weight: 700; text-decoration: none; }
.dashboard-card__empty { display: grid; align-content: center; justify-items: start; flex: 1; }
.dashboard-card__footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.dashboard-card__footer--end { justify-content: flex-end; }
.dashboard-activity-list { display: grid; margin: 0; padding: 0; list-style: none; }
.dashboard-activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; border-bottom: 1px solid var(--border); padding: 0.7rem 0; }
.dashboard-activity:first-child { padding-top: 0; }
.dashboard-activity:last-child { border-bottom: 0; padding-bottom: 0; }
.dashboard-activity__marker { width: 0.65rem; height: 0.65rem; border-radius: 999px; background: #1a73e8; }
.dashboard-activity--writing .dashboard-activity__marker { background: #9334e6; }
.dashboard-activity--word .dashboard-activity__marker { background: #188038; }
.dashboard-activity__content { display: flex; min-width: 0; flex-direction: column; gap: 0.1rem; }
.dashboard-activity__content a { overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-activity__content span, .dashboard-activity time { color: var(--muted); font-size: 0.8rem; }
.dashboard-activity time { white-space: nowrap; }
.onboarding-card { max-width: 42rem; margin: 2rem auto; border: 1px solid #a8c7fa; border-radius: 0.7rem; padding: clamp(1.2rem, 4vw, 2.5rem); background: #fff; box-shadow: 0 0.4rem 1.5rem rgb(60 64 67 / 10%); }
.onboarding-card h1 { margin-bottom: 0.75rem; }
.onboarding-card > p:not(.eyebrow) { font-size: 1.05rem; line-height: 1.7; }
.onboarding-card form { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.onboarding-progress { width: 100%; height: 0.55rem; margin: 0.8rem 0 1.4rem; accent-color: var(--blue); }

.reader-header { margin-bottom: 1.15rem; }
.reader-word-action-bar { position: sticky; z-index: 14; top: 3.8rem; display: grid; width: fit-content; justify-items: center; margin: 0.7rem auto; border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.5rem; background: rgb(255 255 255 / 96%); box-shadow: 0 0.2rem 0.8rem rgb(32 33 36 / 14%); backdrop-filter: blur(8px); }
.reader-word-action { display: flex; width: fit-content; align-items: center; gap: 0.55rem; margin: 0; border: 0; padding: 0; }
.reader-word-action legend { float: left; color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.reader-word-action__options { display: inline-flex; overflow: hidden; border: 1px solid #a8c7fa; border-radius: 999px; background: #fff; }
.reader-word-action label { position: relative; cursor: pointer; }
.reader-word-action input { position: absolute; opacity: 0; pointer-events: none; }
.reader-word-action span { display: block; padding: 0.3rem 0.65rem; color: #174ea6; font-size: 0.78rem; font-weight: 650; }
.reader-word-action label + label span { border-left: 1px solid #a8c7fa; }
.reader-word-action__locked span { background: #f1f3f4; color: var(--muted); }
.reader-word-action__locked:hover span { background: #e8eaed; color: #3c4043; }
.reader-word-action input:checked + span { background: #d2e3fc; color: #174ea6; }
.reader-word-action input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -2px; }
.reader-word-audio-status { position: absolute; top: calc(100% + 0.2rem); width: max-content; max-width: calc(100vw - 1rem); min-height: 1.2rem; margin: 0; border-radius: 999px; padding: 0.1rem 0.45rem; background: rgb(255 255 255 / 96%); color: var(--muted); font-size: 0.76rem; text-align: center; }
.reader-word-audio-status:empty { display: none; }
.reader-word-audio-status.is-error { color: #b3261e; }
.reading-audio-player {
  position: fixed;
  z-index: 15;
  right: 50%;
  bottom: 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) minmax(6rem, 0.55fr);
  width: min(38rem, calc(100% - 1.5rem));
  align-items: center;
  gap: 0.7rem;
  border: 1px solid #bdc1c6;
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  background: rgb(255 255 255 / 97%);
  box-shadow: 0 0.35rem 1.4rem rgb(32 33 36 / 22%);
  transform: translateX(50%);
  backdrop-filter: blur(8px);
}
.reading-audio-player audio { display: none; }
.reading-audio-player__clearance { height: 3rem; }
.reading-audio-player__controls { display: flex; align-items: center; gap: 0.3rem; }
.reading-audio-player .reading-audio-player__button { width: 2rem; height: 2rem; border: 1px solid var(--border); border-radius: 999px; padding: 0; background: #f1f3f4; color: #3c4043; font-size: 0.72rem; }
.reading-audio-player .reading-audio-player__button:hover { background: #e8eaed; }
.reading-audio-player .reading-audio-player__button--primary { width: 2.25rem; height: 2.25rem; border-color: var(--blue); background: var(--blue); color: #fff; font-size: 0.85rem; }
.reading-audio-player .reading-audio-player__button--primary:hover { background: var(--blue-dark); }
.reading-audio-player__timeline { display: grid; grid-template-columns: minmax(5rem, 1fr) auto; align-items: center; gap: 0.5rem; }
.reading-audio-player__timeline input { width: 100%; accent-color: var(--blue); }
.reading-audio-player__timeline span { min-width: 5rem; color: var(--muted); font-size: 0.7rem; text-align: right; }
.reading-audio-player__volume { display: flex; min-width: 0; align-items: center; gap: 0.35rem; }
.reading-audio-player__volume span { flex: 0 0 auto; font-size: 0.8rem; }
.reading-audio-player__volume input { width: 100%; min-width: 3.5rem; accent-color: var(--blue); }
.reader-pane {
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: clamp(1.25rem, 4vw, 2.3rem);
  background: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.8;
  white-space: pre-wrap;
}
.reader-word { display: inline; margin: 0; border: 0; border-radius: 0.12rem; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; line-height: inherit; text-align: inherit; }
.reader-word:hover, .reader-word:focus-visible { background: #d2e3fc; color: #174ea6; outline: none; }
.reader-word.is-playing { background: #e6f4ea; color: #137333; }
.reading-progress { display: grid; gap: 0.8rem; margin-top: 1.35rem; border: 1px solid var(--border); border-radius: 0.5rem; padding: 1rem; background: #fff; }
.reading-progress h2, .reading-progress p { margin: 0; }
.reading-feedback__choices { min-width: 0; margin: 0; border: 0; padding: 0; }
.reading-feedback__choices legend { margin-bottom: 0.65rem; font-size: 1.1rem; font-weight: 700; }
.reading-feedback__options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.reading-feedback__options button { min-height: 2.75rem; border: 1px solid var(--border); border-radius: 999px; }
.reading-feedback__options button[aria-pressed="true"] { border-color: var(--blue); background: #e8f0fe; color: #174ea6; box-shadow: inset 0 0 0 1px var(--blue); }
.reading-feedback__exercise { display: grid; justify-items: start; gap: 0.65rem; padding: 0.75rem 0; }
.reading-feedback__thumbs legend { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.reading-feedback__thumbs button { min-width: 2.75rem; font-size: 1.2rem; }
.reading-feedback__status { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.65rem; border-top: 1px solid var(--border); padding-top: 0.8rem; font-size: 0.9rem; }
#reading-feedback-message { min-height: 1.5em; }
.reading-progress__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 0.75rem; }
.reading-progress__form > label { display: grid; gap: 0.3rem; font-weight: 600; }
.reading-progress__form > .checkbox-label { display: flex; grid-column: 1 / -1; width: fit-content; }
.reading-progress__form select { width: 100%; border: 1px solid #bdc1c6; border-radius: 0.35rem; padding: 0.5rem; background: #fff; color: inherit; font: inherit; }
.reading-progress__status { display: flex; grid-column: 1 / -1; width: fit-content; gap: 0.75rem; margin: 0; border: 0; padding: 0; }
.reading-progress__status legend { margin-bottom: 0.3rem; font-weight: 600; }
.reading-progress__status label { display: flex; align-items: center; gap: 0.3rem; }
.reading-progress__exercise-status { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.reading-progress__remove { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.reading-progress__exercise { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.reading-progress__exercise p { margin-top: 0.2rem; }
.writing-exercise-card, .writing-feedback { display: grid; gap: 0.9rem; max-width: 52rem; margin: 1rem auto; border: 1px solid var(--border); border-radius: 0.65rem; padding: clamp(1rem, 3vw, 1.5rem); background: #fff; }
.writing-exercise-card h2, .writing-exercise-card p, .writing-feedback h2, .writing-feedback h3, .writing-feedback p { margin: 0; }
.writing-exercise-card form { display: grid; gap: 0.55rem; }
.writing-exercise-card label { font-weight: 700; }
.writing-exercise-card textarea { width: 100%; resize: vertical; border: 1px solid #bdc1c6; border-radius: 0.4rem; padding: 0.75rem; color: inherit; font: inherit; line-height: 1.55; }
.writing-character-guidance { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.35rem 1rem; color: var(--muted); font-size: 0.82rem; }
.writing-character-guidance output { font-variant-numeric: tabular-nums; }
.writing-exercise-card form button { justify-self: start; }
.writing-save-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; color: var(--muted); }
.writing-save-meta small { font-size: 0.82rem; }
#writing-save-status { font-size: 0.82rem; font-weight: 600; }
#writing-save-retry[hidden] { display: none; }
.writing-exercise-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }
.writing-exercise-actions #writing-summary-submit { margin-left: auto; }
.page--your-turn { width: min(62rem, calc(100% - 2.5rem)); }
.your-turn-card, .your-turn-history { display: grid; gap: 1rem; max-width: 52rem; margin: 1rem auto; border: 1px solid var(--border); border-radius: 0.65rem; padding: clamp(1rem, 3vw, 1.5rem); background: #fff; }
.your-turn-comparison { display: grid; gap: 0.8rem; max-width: 52rem; margin: 1rem auto; border: 1px solid #a8c7fa; border-radius: 0.65rem; padding: clamp(1rem, 3vw, 1.5rem); background: #f8fbff; }
.your-turn-comparison h2, .your-turn-comparison h3, .your-turn-comparison p { margin: 0; }
.your-turn-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.your-turn-comparison-grid article { display: grid; align-content: start; gap: 0.55rem; border: 1px solid var(--border); border-radius: 0.45rem; padding: 0.85rem; background: #fff; }
.your-turn-card h2, .your-turn-card h3, .your-turn-card p, .your-turn-history h2 { margin: 0; }
.your-turn-prompt-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.prompt-category { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.prompt-translation { color: var(--muted); }
.prompt-translation summary { width: fit-content; cursor: pointer; color: var(--blue-dark); font-size: 0.85rem; font-weight: 650; }
.prompt-translation p { margin: 0.5rem 0 0; }
.your-turn-card form { display: grid; gap: 0.55rem; }
.your-turn-card textarea { width: 100%; resize: vertical; border: 1px solid #bdc1c6; border-radius: 0.4rem; padding: 0.75rem; color: inherit; font: inherit; line-height: 1.55; }
.your-turn-selection-lookup { justify-self: start; border: 1px solid #a8c7fa; border-radius: 999px; padding: 0.35rem 0.7rem; background: #e8f0fe; color: #174ea6; font-size: 0.82rem; }
.your-turn-selection-lookup:hover { background: #d2e3fc; color: #174ea6; }
.your-turn-selection-lookup[hidden] { display: none; }
.your-turn-card form > button { justify-self: start; }
.your-turn-follow-up { border-left: 0.25rem solid #a8c7fa; padding-left: 0.85rem; }
.your-turn-previous-answer { border-left: 0.25rem solid var(--border); padding-left: 0.85rem; color: var(--muted); }
.preserve-lines { white-space: pre-wrap; }
.your-turn-history-item { border-top: 1px solid var(--border); padding-top: 0.8rem; }
.your-turn-history-item summary { display: grid; gap: 0.2rem; cursor: pointer; font-weight: 650; }
.your-turn-history-item summary small { color: var(--muted); font-weight: 400; }
.your-turn-history-item[open] { display: grid; gap: 0.75rem; }
.admin-prompt-table { white-space: normal; }
.admin-prompt-table__text { min-width: 24rem; max-width: 46rem; }
.admin-prompt-preview { display: block; max-width: 100%; padding: 0; text-align: left; white-space: normal; }
.admin-prompt-table__text small { display: block; margin-top: 0.2rem; color: var(--muted); }
.admin-prompt-form-card { max-width: 48rem; }
.admin-prompt-heading-actions { display: grid; justify-items: end; gap: 0.45rem; }
.admin-prompt-export-status { min-height: 1.25rem; margin: 0; color: #137333; font-size: 0.84rem; text-align: right; }
.admin-prompt-export-status.is-error { color: #b3261e; }
.prompt-import-card { width: 100%; max-width: 72rem; }
.prompt-import-form { display: grid; width: 100%; gap: 0.55rem; }
.prompt-import-form label { font-weight: 650; }
.prompt-import-form textarea { width: 100%; min-height: 22rem; resize: vertical; border: 1px solid #bdc1c6; border-radius: 0.35rem; padding: 0.75rem; color: inherit; font: 0.84rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.prompt-translation-dialog { width: min(38rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--border); border-radius: 0.6rem; padding: 1.25rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.prompt-translation-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.prompt-translation-dialog > div { position: relative; }
.prompt-translation-dialog h2 { margin: 0.15rem 2rem 0.8rem 0; font-size: 1.1rem; }
.prompt-translation-dialog [data-prompt-dialog-translation] { font-size: 1.08rem; line-height: 1.6; }
.prompt-translation-dialog__close { position: absolute; top: -0.65rem; right: -0.65rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.inline-filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 0.55rem; margin-bottom: 1rem; }
.inline-filter-form label { font-weight: 700; }
.inline-filter-form input { min-height: 2.35rem; border: 1px solid var(--border); border-radius: 0.35rem; padding: 0.4rem 0.55rem; }
@media (max-width: 42rem) { .your-turn-comparison-grid { grid-template-columns: 1fr; } }
.writing-word-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.writing-word-list .writing-word-button { display: block; border-radius: 999px; padding: 0.3rem 0.65rem; background: #e8f0fe; color: #174ea6; font-weight: 700; }
.writing-feedback > div { display: grid; gap: 0.35rem; border-left: 0.22rem solid #a8c7fa; padding: 0.8rem 0.9rem; background: #f8fbff; }
.writing-feedback .writing-feedback__original { border-left-color: #5f6368; background: #f8f9fa; }
.writing-feedback .writing-feedback__positive { border-left-color: #34a853; background: #f1f8f3; }
.writing-feedback details { border-top: 1px solid var(--border); padding-top: 0.75rem; }
.unique-words, .missing-word-export { margin-top: 1.35rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.reader-admin-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem 1rem; }
.reader-admin-tools .missing-word-export { flex: 1 1 24rem; }
.reader-admin-tools > form { margin-top: 1.35rem; border-top: 1px solid var(--border); padding-top: 0.65rem; }
.unique-words summary, .missing-word-export summary { width: fit-content; color: var(--blue-dark); font-weight: 600; cursor: pointer; }
.unique-word-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.unique-word-list .reader-word { display: block; border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.55rem; background: #fff; font-family: inherit; font-size: 0.82rem; }
.missing-word-export label { display: block; margin: 1rem 0 0.4rem; font-weight: 600; }
.missing-word-export textarea, .result-panel textarea, .import-form textarea { resize: vertical; font: 0.84rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.missing-word-export__actions, .import-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.55rem; }

.word-dialog { width: min(62.5rem, calc(100% - 3rem)); max-height: calc(100vh - 2rem); overflow-y: auto; border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.4rem; background: #fff; color: #202124; box-shadow: 0 1.25rem 4rem rgb(32 33 36 / 25%); }
.word-dialog::backdrop { background: rgb(32 33 36 / 48%); }
.word-dialog__heading { display: flex; align-items: center; gap: 0.45rem; min-height: 2rem; margin: 0.15rem 2rem 0.8rem 0; }
.word-dialog h2 { margin: 0; font-size: 1.55rem; }
.word-dialog__heading > div { display: flex; align-items: center; }
.word-dialog__close { position: absolute; top: 0.5rem; right: 0.6rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.word-dialog__close:hover { background: #f1f3f4; color: #202124; }
.word-dialog__part-of-speech, .word-variation__metadata li { width: fit-content; border-radius: 999px; padding: 0.18rem 0.5rem; background: #f1f3f4; color: var(--muted); font-size: 0.78rem; }
.word-dialog__part-of-speech { margin: 0 0 0.65rem; }
.word-audio-button { width: 1.75rem; height: 1.75rem; border: 1px solid #a8c7fa; border-radius: 999px; padding: 0; background: #e8f0fe; color: #174ea6; font-size: 0.9rem; line-height: 1; }
.word-audio-button:hover, .word-audio-button.is-playing { background: #d2e3fc; color: #174ea6; }
.word-report-button { width: 1.65rem; height: 1.65rem; border: 1px solid var(--border); border-radius: 999px; padding: 0; background: #fff; color: var(--muted); font-size: 0.85rem; line-height: 1; }
.word-report-button:hover { background: #f1f3f4; color: #3c4043; }
.word-dialog__empty { color: var(--muted); }
.word-bank-action { flex: 0 0 auto; margin: 0; }
.word-bank-icon { width: 1.65rem; height: 1.65rem; border: 1px solid #a8c7fa; border-radius: 999px; padding: 0; background: #e8f0fe; color: #174ea6; font-size: 1.05rem; line-height: 1; }
.word-bank-icon:hover { background: #d2e3fc; color: #174ea6; }
.word-bank-icon:disabled { cursor: wait; opacity: 0.7; }
.word-bank-status { display: inline-flex; width: 1.65rem; height: 1.65rem; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 999px; background: #e6f4ea; color: #137333; font-size: 0.9rem; font-weight: 800; }
.word-bank-feedback { position: sticky; z-index: 2; top: 0; width: fit-content; margin: 0 0 0.55rem auto; border-radius: 0.3rem; padding: 0.35rem 0.6rem; background: #e6f4ea; color: #137333; font-size: 0.8rem; font-weight: 600; box-shadow: 0 1px 4px rgb(60 64 67 / 18%); }
.word-bank-feedback--error { background: #fce8e6; color: #c5221f; }
.word-variation-list { display: grid; gap: 0.85rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.word-variation { border-top: 1px solid var(--border); padding-top: 0.8rem; }
.word-variation:first-child { border-top: 0; padding-top: 0; }
.word-variation__heading { display: flex; align-items: start; justify-content: space-between; gap: 0.65rem; margin-bottom: 0.45rem; }
.word-variation__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 0.35rem; }
.word-variation__translation { margin: 0; font-size: 1.05rem; }
.word-variation__metadata { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 0.55rem; padding: 0; list-style: none; }
.word-variation__example { margin: 0.55rem 0 0; border-left: 0.18rem solid var(--border); padding-left: 0.7rem; color: #3c4043; font-style: italic; }
.dictionary-dialog { width: min(46rem, calc(100% - 3rem)); padding: 1rem 1.15rem; }
.dictionary-dialog > h2 { margin: 0 0 0.7rem; }
.dictionary-dialog .eyebrow { margin-bottom: 0.25rem; }
.dictionary-search { display: grid; gap: 0.8rem; }
.dictionary-direction { display: flex; gap: 0.4rem; margin: 0; border: 0; padding: 0; }
.dictionary-direction legend { margin-bottom: 0.35rem; font-weight: 400; }
.dictionary-direction label { cursor: pointer; }
.dictionary-direction input { position: absolute; opacity: 0; pointer-events: none; }
.dictionary-direction span { display: block; border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.75rem; background: #fff; font-weight: 650; }
.dictionary-direction input:checked + span { border-color: #8ab4f8; background: #e8f0fe; color: #174ea6; }
.dictionary-direction input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.dictionary-search__row { display: flex; gap: 0.5rem; }
.dictionary-search__row input { min-width: 0; flex: 1; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.58rem 0.7rem; color: #202124; font: inherit; }
.dictionary-status { min-height: 0.8rem; margin: 0.35rem 0 0; color: var(--muted); font-size: 0.82rem; }
.dictionary-status.is-error { color: #b3261e; }
.dictionary-source { margin: 0.15rem 0 0.35rem; color: var(--muted); font-size: 0.76rem; font-weight: 400; }
.dictionary-entry { border-top: 1px solid var(--border); padding: 0.55rem 0; }
.dictionary-entry:first-of-type { border-top: 0; padding-top: 0; }
.dictionary-entry .word-dialog__heading { flex-wrap: wrap; min-height: 0; gap: 0.3rem; margin: 0; }
.dictionary-entry .word-dialog__heading h3 { margin: 0 0.15rem 0 0; font-size: 1.08rem; }
.dictionary-entry .word-dialog__part-of-speech { margin: 0; padding: 0.08rem 0.4rem; font-size: 0.7rem; }
.dictionary-entry__lemma { margin-right: auto; color: var(--muted); font-size: 0.76rem; }
.dictionary-entry .word-audio-button { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }
.dictionary-entry .word-variation-list { display: block; margin: 0.25rem 0 0; padding-left: 1.35rem; list-style: decimal; }
.dictionary-entry .word-variation { display: list-item; margin: 0 0 0.28rem; border: 0; padding: 0; }
.dictionary-entry .word-variation:last-child { margin-bottom: 0; }
.dictionary-entry .word-variation__heading { display: flex; min-height: 0; gap: 0.35rem; margin: 0; }
.dictionary-entry .word-variation__translation { margin: 0; font-size: 0.92rem; font-weight: 550; line-height: 1.35; }
.dictionary-entry .word-variation__metadata { gap: 0.2rem; margin: 0.15rem 0; }
.dictionary-entry .word-variation__metadata li { padding: 0.05rem 0.35rem; font-size: 0.68rem; }
.dictionary-entry .word-variation > p { margin: 0.12rem 0; font-size: 0.86rem; }
.dictionary-entry .word-variation__example { margin: 0.2rem 0 0; padding-left: 0.5rem; font-size: 0.84rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.contact-dialog { width: min(32rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--border); border-radius: 0.55rem; padding: 0; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.contact-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.contact-dialog__form { display: grid; gap: 0.55rem; padding: 1rem; }
.contact-dialog__form h2 { margin: 0; }
.contact-dialog__form label { font-weight: 650; }
.contact-dialog__form textarea { width: 100%; resize: vertical; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.55rem; color: #202124; font: inherit; }
.contact-dialog__reference { margin: 0; color: var(--muted); font-size: 0.82rem; }
.contact-dialog__status { min-height: 1.25rem; margin: 0; color: #137333; font-size: 0.82rem; }
.contact-dialog__status.is-error { color: #b3261e; }
.contact-dialog__actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.upgrade-dialog { width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--border); border-radius: 0.65rem; padding: 1.25rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.upgrade-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.upgrade-dialog form { position: relative; }
.upgrade-dialog h2 { margin: 0.15rem 2rem 0.6rem 0; }
.upgrade-dialog p:not(.eyebrow) { color: var(--muted); }
.upgrade-dialog__close { position: absolute; top: -0.65rem; right: -0.65rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.upgrade-dialog__close:hover { background: #f1f3f4; color: #202124; }
.upgrade-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; margin-top: 1.2rem; }
.streak-dialog { width: min(30rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--border); border-radius: 0.65rem; padding: 1.25rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.streak-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.streak-dialog form { position: relative; }
.streak-dialog__heading { display: flex; align-items: center; gap: 0.55rem; margin-right: 2rem; }
.streak-dialog__heading svg { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; color: #356859; }
.streak-dialog h2 { margin: 0; }
.streak-dialog p { color: var(--muted); }
.streak-dialog .streak-dialog__current { margin-bottom: 0.35rem; color: #202124; }
.streak-dialog__close { position: absolute; top: -0.65rem; right: -0.65rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.streak-dialog__close:hover { background: #f1f3f4; color: #202124; }
.streak-dialog__actions { display: flex; justify-content: flex-end; margin-top: 1.2rem; }
.streak-toast { position: fixed; z-index: 60; right: 1rem; bottom: 1rem; max-width: calc(100% - 2rem); border: 1px solid #b7d4c9; border-radius: 0.45rem; padding: 0.65rem 0.85rem; background: #f0f7f4; color: #285447; font-size: 0.86rem; font-weight: 650; box-shadow: 0 0.45rem 1.25rem rgb(32 33 36 / 16%); }
.streak-toast[hidden] { display: none; }

.import-form { display: grid; gap: 0.6rem; margin: 1.25rem 0; }
.import-form textarea { min-height: 18rem; }
.json-sample-dialog { width: min(50rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; border: 1px solid var(--border); border-radius: 0.55rem; padding: 1.2rem; background: #fff; color: #202124; box-shadow: 0 1rem 3rem rgb(32 33 36 / 25%); }
.json-sample-dialog::backdrop { background: rgb(32 33 36 / 45%); }
.json-sample-dialog form { position: relative; }
.json-sample-dialog h2 { margin: 0 2rem 0.5rem 0; }
.json-sample-dialog__close { position: absolute; top: -0.7rem; right: -0.65rem; padding: 0.2rem 0.45rem; background: transparent; color: var(--muted); font-size: 1.3rem; }
.json-sample-dialog__close:hover { background: #f1f3f4; color: #202124; }
.json-sample-dialog pre { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.35rem; padding: 0.8rem; background: #f8f9fa; font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; }
.audio-form { display: grid; gap: 0.6rem; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: 0.4rem; padding: 1rem; background: #fff; }
.audio-form > label { font-weight: 600; }
.audio-form select, .audio-form textarea { width: 100%; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.55rem 0.65rem; background: #fff; color: inherit; font: inherit; }
.audio-form textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.audio-form .audio-form__auto-continue { width: fit-content; font-weight: 500; }
.result-panel--warning { border-left: 0.22rem solid #f9ab00; background: #fef7e0; }
.audio-results { margin-top: 1.25rem; }
.audio-result-list { display: grid; gap: 0.6rem; padding: 0; list-style: none; }
.audio-result { border: 1px solid var(--border); border-left-width: 0.22rem; border-radius: 0.35rem; padding: 0.7rem 0.8rem; background: #fff; }
.audio-result--success { border-left-color: #188038; }
.audio-result--failed { border-left-color: #d93025; }
.audio-result--queued { border-left-color: #f9ab00; }
.audio-result > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.audio-result p { margin: 0.35rem 0; }
.audio-result code { display: block; overflow-wrap: anywhere; color: var(--muted); font-size: 0.75rem; }
.audio-jobs { margin-top: 1.5rem; }
.import-results { margin-top: 1.75rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.result-panel { margin-top: 0.8rem; border-left: 0.22rem solid #5f6368; padding: 0.75rem 0.9rem; background: #fff; }
.result-panel--success { border-left-color: #188038; }
.result-panel--skipped { border-left-color: #f29900; }
.result-panel h3 { margin-top: 0; }
.result-panel label { display: block; margin-top: 1rem; }
.result-panel textarea { margin-top: 0.35rem; }
.result-panel li + li { margin-top: 0.35rem; }

.admin-layout { background: #f7f8fa; }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 14.5rem minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; overflow-y: auto; padding: 1rem 0.75rem; background: var(--sidebar); color: #e8eaed; }
.admin-brand { display: grid; margin: 0 0.45rem 1.15rem; color: #fff; text-decoration: none; }
.admin-brand:hover { color: #fff; }
.admin-brand span { font-size: 1.05rem; font-weight: 700; }
.admin-brand small { color: #9aa0a6; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }
.admin-navigation { display: grid; gap: 0.15rem; }
.admin-navigation > a, .admin-navigation summary, .admin-submenu a { display: block; border-radius: 0.3rem; padding: 0.48rem 0.65rem; color: #e8eaed; text-decoration: none; cursor: pointer; }
.admin-navigation > a:hover, .admin-navigation summary:hover, .admin-submenu a:hover { background: #303134; color: #fff; }
.admin-navigation summary { list-style: none; font-weight: 600; }
.admin-navigation summary::-webkit-details-marker { display: none; }
.admin-navigation summary::after { float: right; content: "+"; color: #9aa0a6; font-weight: 400; }
.admin-navigation details[open] summary::after { content: "−"; }
.admin-submenu { display: grid; margin: 0.1rem 0 0.2rem 0.65rem; border-left: 1px solid #4b4d50; padding-left: 0.3rem; }
.admin-submenu a { padding: 0.38rem 0.55rem; color: #bdc1c6; font-size: 0.84rem; }
.admin-sidebar__footer { display: grid; gap: 0.2rem; margin-top: auto; border-top: 1px solid #3c4043; padding: 0.85rem 0.55rem 0; }
.admin-sidebar__footer > span { overflow: hidden; margin-bottom: 0.3rem; color: #9aa0a6; font-size: 0.76rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-sidebar__footer a, .admin-sidebar__footer .nav-button { color: #bdc1c6; font-size: 0.84rem; text-align: left; text-decoration: none; }
.admin-sidebar__footer a:hover, .admin-sidebar__footer .nav-button:hover { color: #fff; }
.admin-main { min-width: 0; padding: 1.6rem clamp(1.25rem, 3vw, 3rem) 3rem; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-top: 1.25rem; }
.admin-card { display: grid; gap: 0.35rem; min-height: 7rem; align-content: start; border: 1px solid var(--border); border-radius: 0.4rem; padding: 1rem; background: #fff; color: #202124; text-decoration: none; }
.admin-card:hover { border-color: #a8c7fa; color: #202124; box-shadow: 0 1px 3px rgb(60 64 67 / 12%); }
.admin-card strong { font-size: 1rem; }
.admin-card span { color: var(--muted); font-size: 0.84rem; }
.admin-placeholder { max-width: 45rem; margin-top: 1rem; }
.admin-mobile-header { display: none; }

.filter-bar {
  display: flex;
  gap: 0.25rem;
  margin: 1.25rem 0 0.8rem;
  border-bottom: 1px solid var(--border);
}
.filter-bar a {
  border-bottom: 2px solid transparent;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.filter-bar a:hover { color: #202124; }
.filter-bar a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--blue-dark); }
.admin-user-filters { display: grid; grid-template-columns: minmax(15rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto; gap: 0.85rem; align-items: end; margin: 1rem 0; padding: 1rem; }
.admin-user-filter { display: grid; min-width: 0; gap: 0.35rem; }
.admin-user-filter label { margin: 0; color: #3c4043; font-size: 0.78rem; font-weight: 700; line-height: 1.2; }
.admin-user-filter input, .admin-user-filter select { box-sizing: border-box; width: 100%; min-width: 0; height: 2.45rem; margin: 0; border: 1px solid #bdc1c6; border-radius: 0.35rem; padding: 0.48rem 0.6rem; background: #fff; color: #202124; font: inherit; }
.admin-user-filter input:focus, .admin-user-filter select:focus { border-color: var(--blue); outline: 2px solid rgb(26 115 232 / 15%); }
.admin-user-filters__actions { display: flex; gap: 0.45rem; align-items: center; min-height: 2.45rem; }
.admin-user-filters__actions .compact-button { box-sizing: border-box; display: inline-flex; min-height: 2.45rem; align-items: center; justify-content: center; margin: 0; white-space: nowrap; }
.admin-user-tabs { margin: 1.25rem 0 1rem; border-bottom: 1px solid var(--border); }
.admin-user-tabs__list { display: flex; overflow-x: auto; gap: 0.2rem; }
.admin-user-tabs [role="tab"] { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 0.65rem 0.9rem; background: transparent; color: var(--muted); white-space: nowrap; }
.admin-user-tabs [role="tab"]:hover { background: #f8f9fa; color: #202124; }
.admin-user-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue-dark); }
[data-user-tab-panel] { margin-top: 0; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.4rem; background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; white-space: nowrap; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--border); padding: 0.62rem 0.7rem; text-align: left; }
.table-number-input { width: 4.5rem; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.38rem 0.42rem; background: #fff; color: inherit; font: inherit; }
.admin-table th { background: #f8f9fa; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #f8fbff; }
.promotion-admin-heading { margin-bottom: 1rem; }
.promotion-admin-heading h1 { margin-bottom: 0; }
.promotion-table { white-space: normal; }
.promotion-table th + th, .promotion-table td + td { border-left: 1px solid #e4e7eb; }
.promotion-table tbody tr:nth-child(even) { background: #fafbfc; }
.promotion-table tbody tr:hover { background: #eef5ff; }
.promotion-table td { min-width: 7rem; vertical-align: top; line-height: 1.4; }
.promotion-table__primary { min-width: 12rem !important; max-width: 22rem; }
.promotion-table__description { max-width: 28rem; margin-top: 0.3rem; line-height: 1.4; white-space: normal; }
.promotion-table__action { min-width: auto !important; vertical-align: middle !important; text-align: center !important; }
.promotion-table__empty { padding: 1.5rem !important; color: var(--muted); text-align: center !important; }
.promo-code-label { display: inline-block; border-radius: 0.3rem; padding: 0.18rem 0.42rem; background: #e8f0fe; color: #174ea6; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88rem; letter-spacing: 0.03em; }
.promotion-benefits { display: grid; gap: 0.45rem; min-width: 12rem !important; }
.promotion-benefit { display: grid; gap: 0.05rem; border-left: 0.2rem solid #a8c7fa; padding-left: 0.5rem; }
.promotion-benefit small { color: var(--muted); }
.promo-code-table th:nth-child(1) { width: 21%; }
.promo-code-table th:nth-child(2) { width: 18%; }
.promo-code-table th:nth-child(3) { width: 20%; }
.promo-code-table th:nth-child(4) { width: 17%; }
.affiliate-table th:first-child { width: 30%; }
@media (max-width: 52rem) {
  .promotion-admin-heading { align-items: flex-start; }
  .promotion-table-wrap { overflow: visible; border: 0; background: transparent; }
  .promotion-table, .promotion-table tbody { display: grid; gap: 0.8rem; }
  .promotion-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .promotion-table tr { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 0.5rem; background: #fff; box-shadow: 0 1px 2px rgb(60 64 67 / 8%); }
  .promotion-table tbody tr:nth-child(even), .promotion-table tbody tr:hover { background: #fff; }
  .promotion-table td { display: grid; min-width: 0 !important; max-width: none; grid-template-columns: minmax(7.5rem, 34%) 1fr; gap: 0.65rem; border: 0; border-bottom: 1px solid #e4e7eb; padding: 0.7rem 0.8rem; }
  .promotion-table td + td { border-left: 0; }
  .promotion-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
  .promotion-table__primary { display: block !important; border-bottom-color: #d4e2f7 !important; background: #f8fbff; }
  .promotion-table__primary::before { display: block; margin-bottom: 0.35rem; }
  .promotion-table__action { display: flex !important; justify-content: flex-end; border-bottom: 0 !important; background: #f8f9fa; }
  .promotion-table__action::before { display: none; }
  .promotion-table__empty { display: block !important; }
  .promotion-table__empty::before { display: none; }
}
@media (max-width: 34rem) {
  .promotion-admin-heading { align-items: stretch; flex-direction: column; }
  .promotion-admin-heading .button-link { text-align: center; }
  .promotion-table td { grid-template-columns: 1fr; gap: 0.3rem; }
}
.table-actions { display: grid; justify-items: start; gap: 0.35rem; }
.status-badge[data-publication-toggle] { border: 0; cursor: pointer; }
.status-badge[data-publication-toggle]:disabled { opacity: 0.7; cursor: wait; }
.is-publication-updating body::after { position: fixed; z-index: 1000; inset: 0; background: rgb(255 255 255 / 20%); content: ""; cursor: wait; }
.copy-field { display: flex; gap: 0.5rem; align-items: stretch; }
.copy-field input { min-width: 0; flex: 1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.impersonation-link-panel { display: grid; gap: 0.65rem; }
.audit-history-table { white-space: normal; }
.audit-history-table th + th, .audit-history-table td + td { border-left: 1px solid #dfe3e7; }
.audit-history-table tbody tr:nth-child(even) { background: #f7f9fb; }
.audit-history-table tbody tr:hover { background: #eef5ff; }
.audit-history-table td { vertical-align: top; }
.audit-source { display: inline-flex; border-radius: 999px; padding: 0.15rem 0.45rem; background: #f1f3f4; font-size: 0.72rem; font-weight: 700; }
.audit-source--stripe, .audit-source--webhook { background: #f3e8fd; color: #681da8; }
.audit-source--admin { background: #fce8e6; color: #b3261e; }
.audit-source--user { background: #e8f0fe; color: #174ea6; }
.audit-state-grid { display: grid; min-width: 24rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.5rem; }
.audit-state-grid pre { overflow: auto; max-width: 24rem; margin: 0.2rem 0 0; border: 1px solid var(--border); border-radius: 0.3rem; padding: 0.5rem; background: #fff; font-size: 0.72rem; white-space: pre-wrap; }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.15rem 0.48rem; font-size: 0.75rem; font-weight: 700; }
.status-badge--published { background: #e6f4ea !important; color: #137333 !important; }
.status-badge--unpublished { background: #f1f3f4 !important; color: #5f6368 !important; }
.status-badge--pending { background: #fef7e0 !important; color: #8a5a00 !important; }
.status-badge--active { background: #e6f4ea !important; color: #137333 !important; }
.status-badge--disabled { background: #fce8e6 !important; color: #c5221f !important; }
.inline-form { margin: 0; }
.compact-button { padding: 0.35rem 0.55rem; font-size: 0.78rem; }
.table-select { min-width: 6.8rem; border: 1px solid #bdc1c6; border-radius: 0.25rem; padding: 0.32rem 0.4rem; background: #fff; color: #202124; font: inherit; }
.table-date-input { width: 8.8rem; border: 1px solid #bdc1c6; border-radius: 0.25rem; padding: 0.3rem 0.35rem; background: #fff; color: #202124; font: inherit; }
.table-date-input:disabled { background: #f1f3f4; color: var(--muted); opacity: 0.65; }
.role-badge { display: inline-flex; border-radius: 999px; padding: 0.15rem 0.48rem; font-size: 0.75rem; font-weight: 700; }
.role-badge--admin { background: #fce8e6; color: #c5221f; }
.role-badge--user { background: #e8f0fe; color: #1967d2; }
@media (max-width: 62rem) {
  .admin-user-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-user-filter--search { grid-column: 1 / -1; }
  .admin-user-filters__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 36rem) {
  .admin-user-filters { grid-template-columns: 1fr; }
  .admin-user-filter--search, .admin-user-filters__actions { grid-column: auto; }
  .admin-user-filters__actions { justify-content: stretch; }
  .admin-user-filters__actions .compact-button { flex: 1; }
}
.word-search { margin: 0.7rem 0 0.45rem; border: 1px solid var(--border); border-radius: 0.3rem; padding: 0.5rem 0.6rem; background: #fff; }
.word-search > label { display: block; margin-bottom: 0.2rem; font-size: 0.78rem; font-weight: 600; }
.word-search__controls { display: flex; flex-wrap: wrap; align-items: end; gap: 0.35rem 0.5rem; }
.word-search input[type="search"] { width: min(26rem, 100%); border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.55rem 0.65rem; background: #fff; color: #202124; font: inherit; }
.compact-field { display: grid; gap: 0.1rem; color: var(--muted); font-size: 0.72rem; }
.compact-field select { min-width: 6.5rem; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.52rem 0.55rem; background: #fff; color: #202124; font: inherit; }
.checkbox-label { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.word-search .hint { width: 100%; margin-top: 0.5rem; }
.search-result-count { margin: 0.5rem 0; color: var(--muted); }
.alert--warning { border-color: #f9ab00; background: #fef7e0; color: #5f4700; }
.vocabulary-word-link { color: var(--blue-dark); font-family: inherit; font-weight: 600; text-decoration: none; }
.table-secondary { display: block; margin-top: 0.1rem; color: var(--muted); font-size: 0.72rem; }
.table-muted { color: #9aa0a6; }
.audio-indicator { font-size: 0.95rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; margin-top: 0.8rem; }
.pagination a { min-width: 2rem; border: 1px solid var(--border); border-radius: 0.3rem; padding: 0.35rem 0.55rem; background: #fff; color: #3c4043; text-align: center; text-decoration: none; }
.pagination a:hover { border-color: #a8c7fa; color: var(--blue-dark); }
.pagination a[aria-current="page"] { border-color: var(--blue); background: #e8f0fe; color: #174ea6; font-weight: 700; }
.vocabulary-table th, .vocabulary-table td { padding: 0.34rem 0.55rem; line-height: 1.25; }
.vocabulary-table .vocabulary-word-link { line-height: 1.25; }

.reader-page-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.text-editor-form { margin-top: 1rem; border: 1px solid var(--border); border-radius: 0.4rem; padding: 1rem; background: #fff; }
.text-editor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.text-editor-field { display: grid; min-width: 0; align-content: start; gap: 0.22rem; color: #3c4043; font-size: 0.8rem; font-weight: 600; }
.text-editor-field--title { grid-column: span 2; }
.text-editor-field--wide { grid-column: 1 / -1; }
.text-editor-field input, .text-editor-field select, .text-editor-field textarea { width: 100%; border: 1px solid #bdc1c6; border-radius: 0.3rem; padding: 0.5rem 0.6rem; background: #fff; color: #202124; font: inherit; font-weight: 400; }
.text-editor-field input:focus, .text-editor-field select:focus, .text-editor-field textarea:focus { border-color: var(--blue); outline: 2px solid rgb(26 115 232 / 15%); }
.text-editor-field textarea { resize: vertical; line-height: 1.5; }
.text-editor-field #reading-text-content { min-height: 28rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.text-editor-field small { color: var(--muted); font-size: 0.72rem; font-weight: 400; }
.text-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.8rem; }
.text-editor-actions > div { display: flex; align-items: center; gap: 0.8rem; }
.collection-form { display: flex; max-width: 42rem; align-items: end; gap: 0.7rem; margin-bottom: 1rem; }
.collection-form .text-editor-field { flex: 1; }
.collection-form button { flex: 0 0 auto; }
.word-map-warning { display: grid; gap: 0.15rem; margin-top: 0.8rem; border-left: 0.22rem solid #f9ab00; padding: 0.65rem 0.8rem; background: #fef7e0; color: #5f4700; }

@media (max-width: 720px) {
  .user-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.35rem; padding: 0 0.75rem; }
  .site-brand__wordmark { display: none; }
  .site-brand__icon { margin-right: 0; }
  .header-learning-tools { position: static; min-width: 0; gap: 0.45rem; transform: none; }
  .learning-pair { max-width: 7rem; font-size: 0.7rem; }
  .nav-toggle-label { grid-column: 3; display: block; border-radius: 0.25rem; padding: 0.35rem 0.5rem; color: #3c4043; font-weight: 600; cursor: pointer; }
  .user-nav:not(.user-nav--authenticated) { display: none; grid-column: 1 / -1; width: 100%; align-items: stretch; gap: 0.1rem; border-top: 1px solid var(--border); padding: 0.45rem 0 0.65rem; }
  .nav-toggle:checked ~ .user-nav { display: grid; }
  .user-nav--authenticated { display: flex; width: auto; gap: 0; border: 0; padding: 0; }
  .user-nav > a, .nav-dropdown > summary { padding: 0.55rem; }
  .user-nav--authenticated > a, .user-nav--authenticated .nav-dropdown > summary { padding: 0.45rem; }
  .user-nav--authenticated .nav-help { width: 2rem; height: 2rem; }
  .user-nav:not(.user-nav--authenticated) .nav-dropdown__menu { position: static; width: 100%; margin-top: 0.2rem; border: 0; box-shadow: none; background: #f8f9fa; }
  .user-nav--authenticated .nav-user { display: none; }
  .user-nav--authenticated .nav-user__icon { display: block; }
  .user-nav--authenticated .nav-dropdown > summary::after { display: none; }
  .user-main, .page--narrow, .page--reader, .page--legal { width: calc(100% - 1.5rem); padding-top: 1.1rem; }
  .page--practice { width: calc(100% - 1.5rem); padding-top: 1.1rem; }
  .page--help { width: calc(100% - 1.5rem); padding-top: 1.1rem; }
  .page--home { width: calc(100% - 1.5rem); }
  .landing-hero { min-height: 0; grid-template-columns: 1fr; gap: 2rem; padding: 3.25rem 0; }
  .landing-hero__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-steps { grid-template-columns: 1fr 1fr; }
  .landing-context { grid-template-columns: 1fr; gap: 0.7rem; padding: 2.5rem 0; }
  .landing-cta { align-items: flex-start; flex-direction: column; }
  .landing-cta .actions { align-items: flex-start; flex-direction: column; }
  .site-footer { width: calc(100% - 1.5rem); }
  .reader-pane { border-right: 0; border-left: 0; border-radius: 0; padding-right: 0.8rem; padding-left: 0.8rem; }
  .dashboard-grid { grid-template-areas: "your" "library" "review" "activity"; grid-template-columns: 1fr; }
  .dashboard-grid--with-tip { grid-template-areas: "tip" "your" "library" "review" "activity"; }
  .dashboard-activity { grid-template-columns: auto minmax(0, 1fr); }
  .dashboard-activity time { grid-column: 2; }
  .dashboard-card--onboarding { grid-column: auto; }
  .dashboard-card--onboarding { grid-template-columns: 1fr; align-items: start; }
  .dashboard-tip { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .help-options { grid-template-columns: 1fr; }
  .reading-progress__form { grid-template-columns: 1fr; }
  .reading-progress__form button { width: 100%; }
  .reading-audio-player { bottom: 0.4rem; grid-template-columns: auto minmax(6rem, 1fr) minmax(4.5rem, 0.65fr); gap: 0.5rem; width: calc(100% - 0.8rem); padding: 0.45rem 0.55rem; }
  .word-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; padding: 1.1rem; }
  .word-search input[type="search"] { width: 100%; }
  .practice-options { grid-template-columns: 1fr; }
  .membership-grid { grid-template-columns: 1fr; }
  .membership-card__tagline { min-height: 0; }
  .practice-options p { min-height: 0; }
  .practice-assessment__options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
  .practice-assessment__options button:last-child { grid-column: 1 / -1; }
  .practice-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-card__side, .practice-card__answer { min-height: 7rem; padding: 2.15rem 0.8rem 0.85rem; }
}

@media (max-width: 480px) {
  .learning-steps { grid-template-columns: 1fr; }
  .help-guide-step { grid-template-columns: 1fr; }
  .learning-pair span { display: none; }
  .learning-pair { padding-right: 0.5rem; padding-left: 0.5rem; }
}

@media (max-width: 780px) {
  .admin-shell { display: block; min-height: 0; }
  .admin-sidebar { display: none; }
  .admin-mobile-header { position: sticky; z-index: 20; top: 0; display: flex; min-height: 3.25rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); padding: 0 0.9rem; background: #fff; }
  .admin-mobile-menu { position: relative; }
  .admin-mobile-menu > summary { border-radius: 0.25rem; padding: 0.35rem 0.5rem; font-weight: 600; list-style: none; cursor: pointer; }
  .admin-mobile-menu__panel { position: absolute; top: calc(100% + 0.65rem); right: 0; width: min(18rem, calc(100vw - 1.5rem)); border: 1px solid var(--border); border-radius: 0.4rem; padding: 0.5rem; background: #fff; box-shadow: 0 0.5rem 1.5rem rgb(60 64 67 / 16%); }
  .admin-mobile-menu .admin-navigation a, .admin-mobile-menu .admin-navigation summary, .admin-mobile-menu__panel > a { color: #3c4043; }
  .admin-mobile-menu .admin-submenu { border-color: var(--border); }
  .admin-mobile-menu__panel > a, .admin-mobile-menu__panel .nav-button { display: block; width: 100%; padding: 0.48rem 0.65rem; color: #3c4043; text-align: left; text-decoration: none; }
  .admin-mobile-menu__panel form { margin: 0; }
  .admin-main { padding: 1.1rem 0.9rem 2.5rem; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .text-editor-grid { grid-template-columns: 1fr; }
  .text-editor-field--title, .text-editor-field--wide { grid-column: auto; }
  .text-editor-actions { align-items: flex-start; flex-direction: column; }
  .text-editor-actions > div { width: 100%; justify-content: flex-end; }
  .collection-form { align-items: stretch; flex-direction: column; }
}
