:root {
  --ink: #172523;
  --muted: #647270;
  --line: #d9e3df;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --soft: #edf5f1;
  --teal: #087f72;
  --teal-dark: #056258;
  --mint: #b8e2d8;
  --coral: #d75f3c;
  --yellow: #f5d975;
  --blue: #2e72a3;
  --danger: #b84242;
  --shadow: 0 14px 36px rgba(20, 45, 41, 0.08);
}

/* Immersive practice surface: chrome is moved into a compact menu so the
   paper and answer panes keep the available viewport on every device. */
.practice-shell {
  display: block;
  min-height: 100dvh;
}

.practice-shell .main-area {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #eef3f0;
}

.practice-focus-page {
  position: relative;
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #eef3f0;
}

.practice-focus-topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  pointer-events: none;
}

.practice-focus-topbar > * {
  pointer-events: auto;
}

.practice-focus-title {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(46vw, 520px);
  overflow: hidden;
  color: #52635e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.practice-focus-timer .study-timer-button {
  min-width: 94px;
  min-height: 38px;
  border: 1px solid #c9dcd6;
  border-radius: 20px;
  padding: 6px 11px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(30, 61, 54, 0.08);
}

.practice-focus-timer .study-timer-button span {
  font-size: 10px;
}

.practice-focus-timer .study-timer-button strong {
  font-size: 15px;
}

.practice-focus-controls-wrap {
  position: relative;
  z-index: 35;
}

.practice-focus-menu-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #c9dcd6;
  border-radius: 50%;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(30, 61, 54, 0.08);
  font-size: 20px;
  line-height: 1;
}

.practice-focus-menu-button:hover {
  border-color: var(--teal);
  background: #f2faf7;
}

.practice-focus-controls-backdrop {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(22, 42, 38, 0.16);
}

.practice-focus-controls {
  position: absolute;
  top: 48px;
  left: 0;
  display: grid;
  width: min(330px, calc(100vw - 24px));
  max-height: calc(100dvh - 72px);
  gap: 12px;
  overflow: auto;
  border: 1px solid #c9dcd6;
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(26, 56, 50, 0.18);
}

.practice-focus-controls > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.practice-focus-controls > header .icon-button {
  width: 30px;
  height: 30px;
}

.practice-focus-select {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.practice-focus-select select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 9px;
  color: var(--ink);
  background: #ffffff;
}

.practice-focus-module-list {
  display: grid;
  gap: 6px;
}

.practice-focus-module {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.practice-focus-module span {
  color: var(--muted);
  font-size: 11px;
}

.practice-focus-module.active,
.practice-focus-module:hover {
  border-color: #8bbdb1;
  color: var(--teal-dark);
  background: var(--soft);
}

.practice-focus-actions {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.authorized-practice-workspace {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.authorized-practice-dual-pane {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.authorized-practice-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

.authorized-answer-pane {
  border-left: 1px solid var(--line);
}

@media (max-width: 900px) {
  .practice-focus-topbar {
    min-height: 52px;
    padding: 7px 10px;
  }

  .practice-focus-title {
    font-size: 11px;
  }

  .authorized-practice-dual-pane {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    min-height: 0;
  }

  .authorized-practice-pane {
    display: block !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    height: 50% !important;
    flex: 0 0 50%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .authorized-answer-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}


* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Times New Roman", Times, "Noto Sans SC", "Microsoft YaHei", serif;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.3);
  outline-offset: 2px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  background: var(--paper);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 42px clamp(36px, 7vw, 120px);
  overflow: hidden;
  color: #f7fffd;
  background: #123d39;
}

.auth-aside::after {
  position: absolute;
  right: -96px;
  bottom: -150px;
  width: min(54vw, 620px);
  height: min(54vw, 620px);
  border: 1px solid rgba(184, 226, 216, 0.22);
  border-radius: 50%;
  content: "";
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 17px;
  font-weight: 760;
  line-height: 1;
}

.brand-mark {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
}

.brand-logo {
  display: block;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border: 1px solid rgba(84, 96, 104, 0.22);
  border-radius: 9px;
  background: #e7eaec;
  object-fit: cover;
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 42px 0 66px;
}

.auth-copy h1 {
  max-width: 560px;
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.16;
  font-weight: 790;
}

.auth-copy p {
  max-width: 440px;
  margin: 0;
  color: #c5e4dc;
  font-size: 16px;
}

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

.auth-point {
  border-top: 1px solid rgba(211, 244, 236, 0.4);
  padding-top: 12px;
  color: #d8f3ed;
  font-size: 13px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #ffffff;
}

.auth-card {
  width: min(100%, 390px);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 760;
}

.auth-card h2 {
  margin: 0 0 9px;
  font-size: 29px;
  line-height: 1.25;
}

.auth-card > p:not(.eyebrow) {
  margin: 0 0 28px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.field input,
.field select,
.field textarea,
.search-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input::placeholder,
.search-input::placeholder {
  color: #94a29f;
}

.form-note {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.form-switch {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  border: 0;
  padding: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 700;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 15px;
  color: #ffffff;
  background: var(--teal);
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:hover {
  background: var(--teal-dark);
}

.button:active {
  transform: translateY(1px);
}

.button.full {
  width: 100%;
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
}

.button.secondary:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--soft);
}

.button.danger {
  background: var(--danger);
}

.button.small {
  min-height: 33px;
  padding: 7px 10px;
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
  border-right: 1px solid #d7e1dd;
  padding: 22px 14px 16px;
  background: #ffffff;
}

.sidebar .brand {
  padding: 4px 10px 24px;
  color: var(--ink);
}

.sidebar .brand-mark {
  color: var(--teal);
}

.nav-list {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.nav-item {
  display: flex;
  min-height: 42px;
  align-items: center;
  border: 0;
  border-radius: 5px;
  padding: 9px 10px;
  color: #4d5c59;
  background: transparent;
  font-weight: 680;
  text-align: left;
}

.nav-item::before {
  display: inline-grid;
  width: 21px;
  place-items: center;
  margin-right: 9px;
  color: currentColor;
  content: attr(data-icon);
  font-family: "Times New Roman", Times, serif;
  font-weight: 700;
}

.nav-item:hover {
  color: var(--teal-dark);
  background: var(--soft);
}

.nav-item.active {
  color: var(--teal-dark);
  background: #dff2ec;
}

.sidebar-bottom {
  margin-top: auto;
}

.entitlement-note {
  margin: 12px 4px 0;
  border-top: 1px solid var(--line);
  padding: 13px 6px 4px;
  color: var(--muted);
  font-size: 12px;
}

.entitlement-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
}

.main-area {
  min-width: 0;
  background: var(--paper);
}

.topbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e9e5;
  padding: 0 clamp(18px, 4vw, 46px);
  background: rgba(247, 248, 245, 0.94);
}

.global-search-wrap {
  position: relative;
  z-index: 8;
  width: min(100%, 640px);
  flex: 1 1 400px;
  margin: 0 auto;
}

.global-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cbd8d3;
  border-radius: 6px;
  background: #ffffff;
}

.global-search:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.1);
}

.global-search-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 0;
  padding: 8px 11px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.global-search-input:focus {
  outline: 0;
}

.global-search-input::placeholder {
  color: #94a29f;
}

.global-search-submit {
  min-width: 52px;
  border: 0;
  border-left: 1px solid #d7e1dd;
  padding: 0 11px;
  color: var(--teal-dark);
  background: #f6fbf9;
  font-size: 12px;
  font-weight: 760;
}

.global-search-submit:hover {
  color: #ffffff;
  background: var(--teal);
}

.global-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(620px, calc(100vh - 110px));
  overflow: auto;
  border: 1px solid #c7d9d3;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(17, 40, 35, 0.18);
}

.global-search-popover > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
  background: #fbfcfa;
}

.global-search-popover > header strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-popover > header > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.global-search-popover .icon-button {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.global-search-results {
  display: grid;
}

.global-search-result {
  border-bottom: 1px solid #e8eeeb;
  padding: 13px 14px 14px;
}

.global-search-result:last-child {
  border-bottom: 0;
}

.global-search-result h3 {
  margin: 0;
  color: #27332f;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  font-weight: 700;
}

.global-search-result > p {
  margin: 6px 0 7px;
  color: #52605c;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  line-height: 1.58;
}

.global-search-empty {
  margin: 0;
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.access-notice {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #cae2da;
  padding: 8px clamp(18px, 4vw, 46px);
  color: #1d5b52;
  background: #e8f4f0;
  font-size: 12px;
}

.access-notice .button {
  flex: 0 0 auto;
}

.crumb {
  color: var(--muted);
  font-size: 13px;
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--coral);
  font-weight: 760;
}

.account-text {
  display: grid;
  line-height: 1.2;
}

.account-text strong {
  font-size: 13px;
}

.account-text span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 46px) 48px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.23;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.stat {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.1;
}

.stat strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  margin-top: 20px;
}

.home-page {
  padding-bottom: 34px;
}

.home-heading {
  align-items: flex-end;
}

.home-heading h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.home-heading .eyebrow {
  margin-bottom: 6px;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.home-action {
  display: grid;
  min-height: 106px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(17, 40, 35, 0.01);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.home-action:hover {
  border-color: #9ac5b9;
  background: #f8fcfa;
  transform: translateY(-1px);
}

.home-action.primary {
  border-color: #88b9ac;
  background: #edf7f3;
}

.home-action.admin {
  border-color: #bdd3e1;
  background: #f2f8fb;
}

.home-action.analytics {
  border-color: #c9d5eb;
  background: #f5f8ff;
}

.home-action-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #badbd2;
  border-radius: 5px;
  color: var(--teal-dark);
  background: #ffffff;
  font-weight: 800;
}

.home-action.admin .home-action-mark {
  border-color: #c5dbe8;
  color: var(--blue);
}

.home-action.analytics .home-action-mark {
  border-color: #cfd9ef;
  color: #46628c;
}

.home-action strong,
.home-action small {
  display: block;
}

.home-action strong {
  font-size: 15px;
  line-height: 1.35;
}

.home-action small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 2px 0 rgba(17, 40, 35, 0.01);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 18px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.task-list {
  display: grid;
}

.task-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf1ee;
  padding: 16px 18px;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-time {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 760;
}

.task-copy strong,
.task-copy span {
  display: block;
}

.task-copy strong {
  font-size: 14px;
}

.task-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.progress-ring {
  display: grid;
  width: 134px;
  height: 134px;
  place-items: center;
  margin: 27px auto 17px;
  border: 12px solid var(--mint);
  border-right-color: var(--teal);
  border-bottom-color: var(--teal);
  border-radius: 50%;
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 780;
}

.progress-copy {
  margin: 0 22px 23px;
  color: var(--muted);
  text-align: center;
}

.tag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 2px 8px;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag.coral {
  color: #9d3d23;
  background: #f9e6de;
}

.tag.yellow {
  color: #765a00;
  background: #fff5c9;
}

.tag.gray {
  color: #55615e;
  background: #eef1ef;
}

.content-word {
  display: inline;
  border: 0;
  border-bottom: 1px dotted #8aa9a1;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

.content-word:hover,
.content-word:focus-visible {
  border-bottom-color: var(--teal);
  color: var(--teal-dark);
  background: #e6f4ef;
  outline: 0;
}

.word-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}

.word-stage {
  overflow: hidden;
}

.word-masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 25px 27px 20px;
}

.word-title {
  min-width: 0;
}

.word-title h2 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.98;
}

.phonetic {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
}

.word-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.word-study-meta span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid #c8ded7;
  border-radius: 4px;
  padding: 2px 7px;
  color: #286258;
  background: #f3faf7;
  font-size: 11px;
  font-weight: 720;
}

.word-study-meta .word-priority-tag {
  border-color: #ebd6aa;
  color: #725810;
  background: #fff9e8;
}

.word-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.word-body {
  padding: 23px 27px 28px;
}

.meaning-block {
  margin-bottom: 24px;
}

.meaning-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

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

.definition-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.pos {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 760;
}

.definition-main {
  font-size: 15px;
}

.definition-exam-sense-text {
  color: #8a3928;
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.definition-exam-sense-label {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border: 1px solid #efb6a7;
  border-radius: 3px;
  padding: 1px 5px;
  color: #91412e;
  background: #fff3ed;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: 1px;
}

.definition-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.dictionary-definition-details {
  margin: 2px 0 0;
  border-left: 2px solid #c7d9d3;
  padding: 8px 0 8px 12px;
  color: #586562;
}

.dictionary-definition-details summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 760;
}

.dictionary-definition-details ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 19px;
}

.dictionary-definition-details li {
  color: #52605d;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  line-height: 1.55;
}

.rare-sense {
  border-left: 3px solid var(--coral);
  padding: 11px 14px;
  color: #6a3326;
  background: #fff0ea;
}

.rare-sense strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.root-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #44514f;
}

.root-piece {
  border: 1px solid #c7d9d3;
  border-radius: 4px;
  padding: 3px 7px;
  color: var(--teal-dark);
  background: var(--soft);
  font-family: "Times New Roman", Times, serif;
}

.example-list {
  display: grid;
  gap: 11px;
}

.example {
  border-left: 2px solid var(--mint);
  padding-left: 12px;
}

.example p {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.55;
}

.example span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.word-side {
  overflow: hidden;
}

.word-filter {
  padding: 12px;
}

.word-list {
  max-height: calc(100vh - 238px);
  overflow: auto;
}

.word-list-item {
  display: flex;
  width: 100%;
  min-height: 47px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid #edf1ef;
  padding: 9px 15px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.word-list-item:hover,
.word-list-item.active {
  background: var(--soft);
}

.word-list-item strong {
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.word-list-item span {
  color: var(--muted);
  font-size: 11px;
}

.reading-tag {
  color: #65428c;
  background: #f0e8fa;
}

.reading-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
}

.reading-controls {
  position: sticky;
  top: 18px;
  align-self: start;
  overflow: hidden;
}

.reading-controls-head {
  align-items: center;
}

.reading-controls-head > div {
  min-width: 0;
}

.reading-controls-toggle {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 11px;
}

.reading-controls-body {
  display: block;
}

.reading-controls.is-collapsed .reading-controls-body {
  display: none;
}

.reading-source-meta {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 14px 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.reading-source-meta span:first-child {
  color: var(--ink);
  font-weight: 680;
}

.reading-review-note {
  color: #8a5a12 !important;
  font-weight: 760;
}

.reading-outline {
  border-top: 1px solid var(--line);
  padding: 15px 13px 13px;
}

.reading-outline > strong {
  display: block;
  margin: 0 5px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.reading-outline ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: reading-paragraph;
}

.reading-outline li {
  counter-increment: reading-paragraph;
}

.reading-outline-button {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  border: 0;
  border-radius: 4px;
  padding: 6px 8px;
  color: #40504d;
  background: transparent;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  text-align: left;
}

.reading-outline-button::before {
  width: 18px;
  color: #8666a8;
  content: counter(reading-paragraph);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}

.reading-outline-button:hover {
  color: #59367b;
  background: #f4effa;
}

.reading-workspace {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.reading-paper {
  overflow: hidden;
}

.reading-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  border-bottom: 1px solid #ded1ec;
  padding: 24px 27px 20px;
  background: #faf7fd;
}

.reading-masthead .eyebrow {
  margin-bottom: 7px;
  color: #7652a0;
}

.reading-masthead h2 {
  margin: 0;
  color: #2b2232;
  font-size: 24px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.reading-masthead p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.reading-masthead-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.reading-masthead-actions > * {
  flex: 0 0 auto;
}

.reading-column-head {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
  border-bottom: 1px solid #ded1ec;
  color: #4d3c61;
  background: #eee4f7;
  font-size: 13px;
  font-weight: 760;
}

.reading-column-head > span {
  min-width: 0;
  padding: 11px 18px;
}

.reading-column-head > span + span {
  border-left: 1px solid #ded1ec;
}

.reading-column-head small {
  display: block;
  margin-top: 2px;
  color: #786887;
  font-size: 11px;
  font-weight: 600;
}

.reading-paragraph-list {
  display: grid;
}

.reading-paragraph {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
  scroll-margin-top: 18px;
  border-bottom: 1px solid #e5e8e6;
}

.reading-paragraph:last-child {
  border-bottom: 0;
}

.reading-source,
.reading-translation {
  min-width: 0;
  padding: 22px 20px 25px;
}

.reading-source {
  background: #ffffff;
}

.reading-translation {
  border-left: 1px solid #e4d9ed;
  background: #fcfaff;
}

.reading-paragraph-number {
  display: block;
  margin-bottom: 11px;
  color: #77569c;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.reading-source p,
.reading-translation p {
  margin: 0;
}

.reading-source p {
  --reading-text-leading: 2.05;
  color: #263431;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: var(--reading-text-leading);
}

.reading-translation p {
  color: #48514f;
  font-size: 14px;
  line-height: 1.85;
}

.reading-translation-hidden {
  color: #8a928f !important;
  font-style: italic;
}

.reading-preview-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  border-bottom: 1px solid #dfe5e8;
  padding: 11px clamp(20px, 3vw, 34px);
  color: #5f6e77;
  background: #f3f6f7;
  font-size: 12px;
  line-height: 1.55;
}

.reading-preview-notice > span,
.reading-preview-tag {
  color: #536f80;
  background: #e4edf1;
}

.reading-preview-notice p {
  min-width: 0;
  flex: 1 1 340px;
  margin: 0;
}

.reading-preview-notice .text-button {
  min-height: 30px;
  flex: 0 0 auto;
  color: #3f6378;
  font-weight: 700;
}

.reading-preview-lock .reading-note-empty {
  display: grid;
  gap: 8px;
}

.reading-preview-lock .reading-note-empty p {
  max-width: 33ch;
}

.reading-preview-lock .button {
  justify-self: start;
  margin-top: 6px;
}

.reading-annotation-group {
  display: inline ruby;
  ruby-position: under;
  vertical-align: baseline;
  margin: 0;
  color: #7e332e;
  line-height: inherit;
}

.reading-annotation-base {
  white-space: nowrap;
}

.reading-annotation-group .content-word {
  display: inline;
  border-bottom: 0;
  color: inherit;
  vertical-align: baseline;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: #cb6556;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.reading-annotation-group .content-word:hover,
.reading-annotation-group .content-word:focus-visible {
  color: #5a347a;
  background: #f3eafa;
}

.reading-token-gloss {
  display: ruby-text;
  max-width: 12ch;
  overflow: hidden;
  margin: 0;
  color: #9c552d;
  font-family: "Times New Roman", Times, "Microsoft YaHei", serif;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

.reading-annotation-group.gloss-hidden .reading-token-gloss {
  display: none;
}

.reading-annotation-group.gloss-hidden {
  color: inherit;
}

.reading-annotation-group.gloss-hidden .content-word {
  text-decoration: none;
  color: inherit;
}

.reading-annotation-group.active {
  color: #5a347a;
  background: #f3eafa;
}

.reading-annotation-group.active .content-word {
  text-decoration-color: #6c3d94;
}

.reading-annotation-group.active .reading-token-gloss {
  color: #68428d;
}

.reading-note {
  overflow: hidden;
}

.reading-note-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #ded1ec;
  padding: 19px 21px 16px;
  background: #faf7fd;
}

.reading-note-kicker {
  display: block;
  margin-bottom: 5px;
  color: #7652a0;
  font-size: 11px;
  font-weight: 760;
}

.reading-note-head h2,
.reading-note-empty h2 {
  margin: 0;
  color: #2b2232;
  font-family: "Times New Roman", Times, serif;
  font-size: 25px;
  line-height: 1.1;
}

.reading-note-head .phonetic {
  margin-top: 7px;
  font-size: 14px;
}

.reading-note-body {
  padding: 18px 21px 20px;
}

.reading-note-meaning {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
}

.reading-note-meaning span {
  color: #7652a0;
  font-size: 12px;
  font-weight: 760;
}

.reading-note-meaning strong {
  color: #292f2d;
  font-size: 17px;
}

.reading-note-candidates,
.reading-note-dictionary {
  margin-top: 15px;
  border-top: 1px solid #e4d9ed;
  padding-top: 12px;
}

.reading-note-candidates > span,
.reading-note-dictionary > span {
  display: block;
  margin-bottom: 7px;
  color: #7652a0;
  font-size: 12px;
  font-weight: 760;
}

.reading-note-candidates ul {
  margin: 0;
  padding-left: 18px;
  color: #4c5753;
  font-size: 13px;
  line-height: 1.65;
}

.reading-note-dictionary .definition-list {
  margin-top: 0;
}

.reading-note-body > p {
  max-width: 900px;
  margin: 11px 0 0;
  color: #52605c;
  font-size: 14px;
  line-height: 1.65;
}

.reading-note-disclaimer {
  border-left: 3px solid #d6b46c;
  padding-left: 10px;
  color: #725d37 !important;
  font-size: 12px !important;
}

.reading-note-context,
.reading-note-provenance,
.word-lookup-context,
.word-lookup-provenance {
  margin-top: 15px;
  border: 1px solid #dfe8e4;
  border-radius: 5px;
  padding: 11px 12px;
  background: #fbfdfc;
}

.annotation-context-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.annotation-context-head span {
  color: #3e756d;
  font-size: 12px;
  font-weight: 760;
}

.annotation-context-head small {
  color: #8b6d39;
  font-size: 10px;
  text-align: right;
}

.annotation-context-english,
.annotation-context-translation,
.annotation-context-missing,
.reading-note-provenance p,
.word-lookup-provenance p {
  margin: 0;
  color: #3f504b;
  font-size: 13px;
  line-height: 1.58;
}

.annotation-context-english {
  font-family: "Times New Roman", Times, serif;
  color: #263a35;
}

.annotation-context-translation {
  margin-top: 6px;
  border-top: 1px dashed #dfe8e4;
  padding-top: 6px;
  color: #67736f;
}

.annotation-context-missing {
  color: #8b6d39;
  font-size: 12px;
}

.reading-note-provenance,
.word-lookup-provenance {
  border-color: #e7dfcf;
  background: #fffdf8;
}

.reading-note-provenance .annotation-context-head span,
.word-lookup-provenance .annotation-context-head span {
  color: #8b6d39;
}

.annotation-provenance-tags,
.annotation-provenance-refs,
.annotation-provenance-revision {
  margin-top: 4px !important;
  color: #7a7467 !important;
  font-size: 11px !important;
  overflow-wrap: anywhere;
}

.reading-root {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  border-left: 2px solid #b7dccf;
  padding-left: 10px;
}

.reading-root span {
  color: var(--muted);
  font-size: 12px;
}

.reading-root strong {
  color: #38675e;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.reading-note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.reading-note-empty {
  padding: 25px 22px;
}

.reading-note-empty p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.practice-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 20px;
}

.practice-workspace {
  display: grid;
  min-width: 0;
  gap: 20px;
}

.practice-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.practice-module-card {
  display: grid;
  min-width: 0;
  min-height: 90px;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.practice-module-card:hover,
.practice-module-card.active {
  border-color: #7db7aa;
  background: var(--soft);
}

.practice-module-card.unavailable {
  border-color: #e7c5ba;
  color: #72564d;
  background: #fffaf8;
}

.practice-module-card-top {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
}

.practice-module-card-top strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.practice-module-card .tag {
  flex: 0 0 auto;
}

.practice-module-count {
  color: var(--muted);
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.practice-filter-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.filter-panel {
  align-self: start;
}

.filter-stack {
  display: grid;
  gap: 16px;
  padding: 17px;
}

.filter-stack .field {
  margin: 0;
}

.reading-filter-stack {
  gap: 10px;
}

.reading-filter-stack .reading-lesson-field {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.section-list {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.section-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.section-button:hover,
.section-button.active {
  border-color: #b9ddd3;
  background: var(--soft);
}

.section-button strong,
.section-button span {
  display: block;
}

.section-button strong {
  font-size: 13px;
}

.section-button span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.practice-panel {
  overflow: hidden;
}

.practice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.passage {
  max-width: 880px;
  padding: 26px clamp(19px, 4vw, 45px);
}

.passage h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.passage .directions {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.passage-text {
  white-space: pre-wrap;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.76;
}

.practice-module-content {
  display: grid;
}

.practice-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.practice-content-head > div {
  min-width: 0;
}

.practice-content-head .tag {
  flex: 0 0 auto;
}

.practice-passage {
  max-width: none;
  border-bottom: 1px solid var(--line);
}

.practice-source-text,
.practice-question-raw,
.practice-choice-text,
.practice-response-prompt {
  color: #283532;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.78;
  white-space: pre-wrap;
}

.practice-question-stack,
.practice-response-stack {
  display: grid;
}

.practice-question-card,
.practice-response-card {
  border-top: 1px solid var(--line);
  padding: 21px clamp(19px, 4vw, 45px) 25px;
}

.practice-passage + .practice-question-stack .practice-question-card:first-child,
.practice-passage + .practice-response-stack .practice-response-card:first-child {
  border-top: 0;
}

.practice-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.practice-item-head strong {
  font-size: 15px;
}

.practice-item-head > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.practice-question-prompt {
  margin: 0 0 15px;
  color: #283532;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.7;
}

.practice-readonly {
  border-left: 3px solid #d6a543;
  padding: 11px 14px;
  color: #66522f;
  background: #fffaf0;
}

.practice-readonly p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
}

.practice-readonly .practice-question-raw {
  color: #3c403d;
  font-size: 14px;
}

.practice-response-card {
  background: #fcfdfc;
}

.practice-response-prompt {
  margin: 0;
  padding-bottom: 17px;
}

.practice-response-field {
  display: grid;
  gap: 7px;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.practice-response-field textarea {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  resize: vertical;
}

.practice-state-notice {
  padding: 29px clamp(20px, 4vw, 45px) 34px;
}

.practice-state-notice > h2 {
  margin: 12px 0 7px;
  font-size: 20px;
}

.practice-state-notice > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.practice-state-notice.requires-ocr {
  background: #fffaf8;
}

.practice-raw-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.practice-raw-details summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 760;
}

.practice-raw-details .practice-source-text {
  margin-top: 15px;
}

.practice-choice-pool {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.practice-choice-pool article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
}

.practice-choice-pool article > strong {
  color: var(--teal-dark);
  font-family: "Times New Roman", Times, serif;
}

.practice-choice-text {
  font-size: 14px;
}

.practice-passage-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 12px clamp(19px, 4vw, 45px);
  background: #fbfcfa;
}

.practice-passage-tab {
  display: grid;
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 49px;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 7px 10px;
  color: #495653;
  background: transparent;
  text-align: left;
}

.practice-passage-tab strong {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.practice-passage-tab span {
  color: var(--muted);
  font-size: 11px;
}

.practice-passage-tab:hover,
.practice-passage-tab.active {
  border-color: #a9d1c6;
  color: var(--teal-dark);
  background: var(--soft);
}

.question-box {
  border-top: 1px solid var(--line);
  padding: 22px clamp(19px, 4vw, 45px) 30px;
  background: #fbfcfa;
}

.question-box h3 {
  margin: 0 0 16px;
  font-size: 16px;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.option:hover,
.option.selected {
  border-color: var(--teal);
  background: var(--soft);
}

.option-copy {
  min-width: 0;
  line-height: 1.52;
}

.option-select {
  display: inline-grid;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
}

.option-select:focus-visible {
  outline: 0;
}

.option-select:focus-visible .option-key {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.14);
}

.option-key {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #b6c7c2;
  border-radius: 50%;
  color: var(--teal-dark);
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 125px auto;
  gap: 9px;
  margin-bottom: 17px;
}

.search-result-list {
  display: grid;
}

.result-row {
  border-bottom: 1px solid var(--line);
  padding: 17px 19px;
}

.result-row:last-child {
  border-bottom: 0;
}

.result-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.result-title {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 19px;
}

.result-snippet {
  margin: 0;
  color: #40504d;
  line-height: 1.67;
}

mark {
  border-radius: 2px;
  padding: 0 2px;
  background: #fff0ae;
}

.search-guide {
  align-self: start;
  padding: 18px;
}

.search-guide h3 {
  margin: 0 0 9px;
  font-size: 14px;
}

.search-guide p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.suggestion-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.suggestion {
  border: 1px solid #cbe0d9;
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: var(--soft);
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 15px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

td strong,
td span {
  display: block;
}

td span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.admin-action {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 13px;
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.admin-tab:hover,
.admin-tab.active {
  color: var(--teal-dark);
}

.admin-tab.active {
  border-bottom-color: var(--teal);
}

.admin-tab span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  padding: 0 4px;
  color: #ffffff;
  background: var(--teal);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.contextual-gloss-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: 24px;
}

.contextual-gloss-intro h2 {
  margin: 7px 0 6px;
  font-size: 21px;
}

.contextual-gloss-intro p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.contextual-gloss-source {
  display: grid;
  min-width: 150px;
  gap: 4px;
  border-left: 2px solid var(--teal);
  padding: 4px 0 4px 12px;
}

.contextual-gloss-source strong {
  color: var(--teal-dark);
  font-size: 13px;
}

.contextual-gloss-source span {
  color: var(--muted);
  font-size: 11px;
}

.contextual-gloss-filter {
  margin-bottom: 18px;
  padding: 14px 16px;
}

.contextual-gloss-filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.contextual-gloss-filter-form label {
  display: grid;
  min-width: 104px;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.contextual-gloss-filter-form select,
.contextual-gloss-filter-form input {
  min-height: 37px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.contextual-gloss-filter-form .contextual-gloss-search {
  flex: 1 1 220px;
}

.contextual-gloss-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.contextual-gloss-summary strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.contextual-gloss-state {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 20px;
}

.contextual-gloss-state span {
  color: var(--muted);
  font-size: 13px;
}

.contextual-gloss-state code {
  font-size: 12px;
}

.contextual-gloss-state.error {
  border-color: #efc2ba;
}

.contextual-gloss-workspace {
  display: grid;
  grid-template-columns: minmax(245px, 0.72fr) minmax(0, 1.48fr);
  align-items: start;
  gap: 18px;
}

.contextual-gloss-list {
  overflow: hidden;
}

.contextual-gloss-list .panel-head,
.contextual-gloss-detail-head {
  padding: 16px 18px;
}

.contextual-gloss-list-items {
  max-height: min(64vh, 700px);
  overflow-y: auto;
}

.contextual-gloss-list-item {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
  padding: 13px 15px 13px 12px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.contextual-gloss-list-item:hover {
  background: var(--soft);
}

.contextual-gloss-list-item.active {
  border-left-color: var(--teal);
  background: #edf7f3;
}

.contextual-gloss-list-item .tag {
  width: fit-content;
  margin: 0 0 2px;
}

.contextual-gloss-list-item strong {
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
}

.contextual-gloss-list-item small,
.contextual-gloss-list-item em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contextual-gloss-list-item em {
  color: var(--teal-dark);
}

.contextual-gloss-detail {
  min-width: 0;
}

.contextual-gloss-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.contextual-gloss-detail-head h2 {
  margin: 5px 0 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 25px;
}

.contextual-gloss-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.contextual-gloss-context {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.contextual-gloss-context section {
  padding: 15px 18px;
}

.contextual-gloss-context section + section {
  border-top: 1px dashed var(--line);
}

.contextual-gloss-context span,
.contextual-gloss-candidates > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.contextual-gloss-context p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.contextual-gloss-context p[lang="en"] {
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.6;
}

.contextual-gloss-candidates {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.contextual-gloss-candidates > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.contextual-gloss-candidate-chip {
  border: 1px solid #bddbd1;
  border-radius: 4px;
  padding: 5px 8px;
  color: var(--teal-dark);
  background: #f4faf7;
  font: inherit;
  font-size: 12px;
}

.contextual-gloss-candidate-chip:hover {
  border-color: var(--teal);
  background: #e7f5ef;
}

.contextual-gloss-candidates em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.contextual-gloss-review-form {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.contextual-gloss-review-form textarea {
  min-height: 54px;
  resize: vertical;
  font: inherit;
  line-height: 1.55;
}

.contextual-gloss-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contextual-gloss-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding: 11px 18px 13px;
  color: var(--muted);
  font-size: 10px;
}

.contextual-gloss-empty-detail {
  display: grid;
  min-height: 360px;
  place-content: center;
  gap: 7px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.contextual-gloss-empty-detail strong {
  color: var(--ink);
}

.empty {
  padding: 44px 22px;
  color: var(--muted);
  text-align: center;
}

.activation-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--paper);
}

.activation-card {
  width: min(100%, 480px);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.activation-card h1 {
  margin: 18px 0 8px;
  font-size: 28px;
}

.activation-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.activation-card .brand {
  color: var(--ink);
}

.activation-card .brand-mark {
  color: var(--teal);
}

.word-lookup-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 35, 32, 0.38);
}

.word-lookup-dialog {
  width: min(100%, 510px);
  max-height: min(700px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid #c5d8d2;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(8, 33, 29, 0.25);
}

.word-lookup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 21px 22px 17px;
  background: #fbfcfa;
}

.word-lookup-head .eyebrow {
  margin-bottom: 6px;
}

.word-lookup-head h2 {
  margin: 0;
  color: #263431;
  font-family: "Times New Roman", Times, serif;
  font-size: 32px;
  line-height: 1;
}

.word-lookup-head .phonetic {
  margin-top: 7px;
  font-size: 14px;
}

.word-lookup-body {
  padding: 18px 22px 22px;
}

.word-lookup-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
}

.word-lookup-source span:first-child {
  color: var(--teal-dark);
  font-weight: 760;
}

.word-lookup-context,
.word-lookup-provenance {
  margin-top: 0;
  margin-bottom: 15px;
}

.word-lookup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 19px;
}

.access-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 35, 32, 0.55);
}

.access-dialog {
  width: min(100%, 440px);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid #c5d8d2;
  border-radius: 7px;
  padding: 24px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(8, 33, 29, 0.28);
}

.access-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.access-dialog-head .brand {
  color: var(--ink);
}

.access-dialog-head .brand-mark {
  color: var(--teal);
}

.access-dialog h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
}

.access-dialog > p:not(.eyebrow):not(.form-switch) {
  margin: 0 0 22px;
  color: var(--muted);
}

.icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0;
  color: #4d5c59;
  background: #ffffff;
  font-size: 21px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--teal-dark);
  background: var(--soft);
}

.toast {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid #bde0d4;
  border-radius: 5px;
  padding: 11px 13px;
  color: #134d45;
  background: #e4f4ee;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.error {
  border-color: #ebc0b5;
  color: #86321e;
  background: #fff0ea;
}

.study-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  margin-top: 20px;
}

.study-session {
  min-height: 580px;
  overflow: hidden;
}

.study-session-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 15px 20px;
}

.study-session-head > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.study-kicker {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid #c5ddd5;
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 11px;
  font-weight: 760;
}

.study-random-note,
.study-position {
  color: var(--muted);
  font-size: 12px;
}

.study-position {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.study-word-stage {
  min-height: 425px;
  padding: 38px clamp(24px, 5vw, 58px) 30px;
}

.study-word-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.study-word-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.study-word-title h2 {
  overflow-wrap: anywhere;
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 50px;
  font-weight: 700;
  line-height: 1.02;
}

.study-speak {
  flex: 0 0 auto;
  border-color: var(--line);
  color: var(--teal-dark);
  background: var(--surface);
}

.study-too-easy {
  min-height: 34px;
  border-color: #d7c5a4;
  color: #6f542e;
  background: #fdf9ed;
}

.study-word-stage > .phonetic {
  margin-top: 9px;
}

.study-hidden-answer {
  display: grid;
  min-height: 205px;
  align-content: center;
  gap: 8px;
  margin-top: 29px;
  border: 1px dashed #b9ccc6;
  border-radius: 5px;
  padding: 28px;
  color: var(--muted);
  background: #fbfcfa;
}

.study-hidden-answer span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
}

.study-hidden-answer p {
  max-width: 440px;
  margin: 0;
}

.study-answer {
  display: grid;
  gap: 21px;
  margin-top: 27px;
}

.study-round-summary {
  display: grid;
  gap: 20px;
  padding: clamp(26px, 5vh, 54px) clamp(20px, 6vw, 68px) 34px;
}

.study-round-summary-intro h2 {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: 29px;
}

.study-round-summary-intro p {
  margin: 8px 0 0;
  color: var(--muted);
}

.study-round-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.study-round-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 15px;
  background: #ffffff;
}

.study-round-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.study-round-card > header > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.study-round-card strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  line-height: 1.1;
}

.study-round-card .phonetic {
  font-size: 12px;
}

.study-round-result {
  flex: 0 0 auto;
  border: 1px solid #b9d8ce;
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 11px;
  font-weight: 720;
}

.study-round-result.unknown {
  border-color: #e5b8a8;
  color: #914029;
  background: #fff5f0;
}

.study-round-definitions {
  margin-top: 13px;
}

.study-round-definitions .definition-list {
  margin: 0;
}

.study-answer-block h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.study-answer-block.rare-sense {
  margin: 0;
}

.study-decision {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 18px 20px;
}

.study-decision p {
  margin: 0;
  color: var(--muted);
}

.study-decision > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.button.study-choice {
  min-width: 116px;
  min-height: 46px;
  font-size: 15px;
}

.button.study-choice.unknown {
  border-color: #e5b8a8;
  color: #914029;
  background: #fff5f0;
}

.button.study-choice.unknown:hover {
  border-color: #d79580;
  color: #7c311d;
  background: #ffe9df;
}

.study-decision-complete {
  background: #fbfcfa;
}

.study-result {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 720;
}

.study-result.unknown {
  color: #8c422d;
}

.study-sync-error {
  margin: 0 20px 15px;
  color: var(--danger);
  font-size: 13px;
}

.study-settings-panel {
  align-self: start;
  overflow: hidden;
}

.study-settings-form {
  padding: 19px 18px;
}

.study-settings-form .field {
  margin-bottom: 10px;
}

.study-settings-form > p:not(.form-note) {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.study-side-note {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 17px 18px 19px;
  color: var(--muted);
  font-size: 12px;
}

.study-side-note strong {
  color: var(--ink);
  font-size: 13px;
}

.study-loading,
.study-empty {
  display: grid;
  min-height: 578px;
  place-content: center;
  gap: 9px;
  padding: 42px;
  text-align: center;
}

.study-loading strong,
.study-empty h2 {
  margin: 0;
  font-size: 19px;
}

.study-loading span,
.study-empty p {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
}

.study-empty .button {
  justify-self: center;
  margin-top: 10px;
}

.study-complete-mark {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  justify-self: center;
  border: 1px solid #a9d5c8;
  border-radius: 50%;
  color: var(--teal-dark);
  background: var(--soft);
  font-size: 12px;
  font-weight: 760;
}

.study-error {
  color: var(--danger);
}

.study-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 34px;
}

.study-preview h2 {
  max-width: 610px;
  margin: 9px 0 8px;
  font-size: 24px;
}

.study-preview p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .word-layout,
  .reading-layout,
  .search-layout,
  .admin-layout,
  .contextual-gloss-workspace {
    grid-template-columns: 1fr;
  }

  .reading-controls {
    position: static;
  }

  .reading-outline ol {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .reading-outline-button {
    justify-content: center;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 0;
  }

  .reading-outline-button::before {
    width: auto;
    font-size: 12px;
  }

  .word-list {
    max-height: 260px;
  }

  .search-guide {
    display: none;
  }

  .practice-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 300px;
    padding: 27px 28px;
  }

  .auth-copy {
    padding: 35px 0 10px;
  }

  .auth-copy h1 {
    max-width: 480px;
  }

  .auth-points {
    display: none;
  }

  .auth-panel {
    padding: 35px 24px 46px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    z-index: 4;
    min-height: auto;
    min-width: 0;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 12px 0;
  }

  .sidebar .brand {
    padding: 2px 7px 13px;
  }

  .nav-list {
    display: flex;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 9px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .nav-item::before {
    width: auto;
    margin-right: 5px;
  }

  .sidebar-bottom {
    display: none;
  }

  .topbar {
    min-height: 61px;
    min-width: 0;
    flex-wrap: wrap;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .crumb {
    flex: 1 1 auto;
  }

  .global-search-wrap {
    order: 3;
    min-width: 0;
    width: 100%;
    flex-basis: 100%;
    margin: 0;
  }

  .global-search-popover {
    max-height: min(560px, calc(100vh - 156px));
  }

  .access-notice {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .dashboard-grid,
  .study-dashboard-grid,
  .practice-layout {
    grid-template-columns: 1fr;
  }

  .home-heading h1 {
    font-size: 26px;
  }

  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .home-action {
    min-height: 88px;
  }

  .reading-masthead {
    align-items: stretch;
    flex-direction: column;
  }

  .reading-masthead-actions {
    justify-content: flex-start;
  }

  .reading-column-head {
    display: none;
  }

  .reading-paragraph {
    grid-template-columns: 1fr;
  }

  .reading-translation {
    border-top: 1px solid #e4d9ed;
    border-left: 0;
  }

  .filter-panel {
    display: none;
  }

  .practice-bank-layout .filter-panel {
    display: block;
  }

  .practice-bank-layout .section-list {
    display: flex;
    overflow-x: auto;
    gap: 7px;
  }

  .practice-bank-layout .section-button {
    flex: 0 0 155px;
  }

  .practice-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .practice-module-card {
    min-height: 82px;
  }

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .account-text {
    display: none;
  }
}

@media (max-width: 560px) {
  .crumb {
    display: none;
  }

  .topbar {
    justify-content: flex-end;
  }

  .global-search-popover > header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .global-search-popover > header > span {
    display: none;
  }

  .page {
    padding-top: 22px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .stat {
    padding: 15px;
  }

  .task-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .task-row .button {
    grid-column: 2;
    justify-self: start;
    margin-top: 3px;
  }

  .word-masthead {
    align-items: stretch;
    flex-direction: column;
    padding: 21px 20px 17px;
  }

  .word-actions {
    justify-content: flex-start;
  }

  .word-body {
    padding: 20px;
  }

  .definition-list li {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .search-bar {
    grid-template-columns: 1fr 104px;
  }

  .search-bar .button {
    grid-column: 1 / -1;
  }

  .passage,
  .question-box {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .practice-module-card {
    min-height: 78px;
    padding: 11px;
  }

  .practice-question-card,
  .practice-response-card,
  .practice-state-notice {
    padding-right: 20px;
    padding-left: 20px;
  }

  .practice-content-head,
  .practice-item-head,
  .question-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .practice-item-head > div {
    justify-content: flex-start;
  }

  .practice-source-text,
  .practice-question-raw,
  .practice-choice-text,
  .practice-response-prompt {
    font-size: 15px;
  }

  .reading-masthead {
    padding: 20px;
  }

  .reading-source,
  .reading-translation {
    padding: 19px 17px 21px;
  }

  .reading-source p {
    --reading-text-leading: 2.15;
    font-size: 16px;
    line-height: var(--reading-text-leading);
  }

  .reading-token-gloss {
    font-size: 9px;
  }

  .reading-note-head,
  .reading-note-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .word-lookup-head,
  .word-lookup-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .word-lookup-head h2 {
    font-size: 28px;
  }

  .passage-text {
    font-size: 16px;
  }

  .access-dialog {
    padding: 20px;
  }

  .study-session {
    min-height: 0;
  }

  .study-word-stage {
    min-height: 390px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .study-word-title h2 {
    font-size: 40px;
  }

  .study-decision,
  .study-preview {
    align-items: stretch;
    flex-direction: column;
  }

  .study-decision > div {
    justify-content: stretch;
  }

  .button.study-choice {
    flex: 1 1 120px;
  }

  .study-preview {
    padding: 24px;
  }

  .study-loading,
  .study-empty {
    min-height: 420px;
    padding: 28px;
  }
}

/* Full-screen study flow keeps the decision row in a stable thumb position. */
.exam-countdown {
  display: inline-grid;
  flex: 0 0 auto;
  gap: 1px;
  min-height: 38px;
  border: 1px solid #cbded7;
  border-radius: 5px;
  padding: 5px 9px;
  color: var(--teal-dark);
  background: #f5fbf8;
  text-align: left;
}

.exam-countdown span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.1;
}

.exam-countdown strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.exam-countdown-compact {
  display: none;
}

.study-app-shell {
  display: grid;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background: #eff4f1;
}

.study-app-header {
  display: grid;
  min-height: 66px;
  grid-template-columns: minmax(150px, 1fr) auto minmax(300px, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #d4e0db;
  padding: 10px clamp(16px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.96);
}

.study-app-brand .brand {
  color: var(--ink);
}

.study-app-brand .brand-mark {
  color: var(--teal);
}

.study-app-progress {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.study-app-progress strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.study-app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.study-timer-button,
.study-more-button,
.study-back-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 9px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.study-timer-button strong {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}

.timer-switch-wrap {
  display: inline-flex;
  align-items: center;
}

.timer-switch {
  display: inline-flex;
  width: 28px;
  height: 16px;
  align-items: center;
  border: 1px solid #a7b1b8;
  border-radius: 999px;
  padding: 2px;
  background: #e6e9eb;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.timer-switch > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6c757d;
  transition: transform 160ms ease, background-color 160ms ease;
}

.timer-switch.is-on {
  border-color: #4c8f7c;
  background: #dcefe8;
}

.timer-switch.is-on > span {
  background: #28745f;
  transform: translateX(12px);
}

.study-timer-label {
  white-space: nowrap;
}

.study-timer-button.running {
  border-color: #8dbeb1;
  background: var(--soft);
}

.study-timer-button:hover,
.study-more-button:hover,
.study-back-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--soft);
}

.study-fullscreen {
  display: flex;
  min-height: 0;
  justify-content: center;
  padding: clamp(12px, 2.6vw, 28px) clamp(12px, 4vw, 46px) calc(clamp(12px, 2.6vw, 28px) + env(safe-area-inset-bottom));
}

.study-fullscreen > .study-session {
  display: grid;
  width: min(100%, 920px);
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cddbd6;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.study-fullscreen .study-session-head {
  min-height: 59px;
  padding: 13px clamp(16px, 3vw, 25px);
}

.study-word-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.study-app-shell button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.study-fullscreen .study-word-stage {
  min-height: 100%;
  padding: clamp(28px, 6vh, 68px) clamp(20px, 7vw, 78px) 34px;
}

.study-fullscreen .study-word-title h2 {
  font-size: clamp(42px, 6vw, 64px);
}

.study-fullscreen .study-hidden-answer {
  min-height: 260px;
}

.study-fullscreen .study-answer {
  padding-bottom: 18px;
}

.study-fullscreen .study-sync-error {
  margin: 18px 0 0;
}

.study-fullscreen .study-decision {
  min-height: 86px;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 15px clamp(16px, 3vw, 25px) calc(15px + env(safe-area-inset-bottom));
  background: #fbfcfa;
}

.study-fullscreen .study-decision > div {
  flex-wrap: nowrap;
}

.study-fullscreen .button.study-choice,
.study-fullscreen .study-decision-complete .button {
  min-width: 142px;
  min-height: 54px;
}

.study-fullscreen .study-decision-complete .button {
  min-width: 180px;
}

.study-fullscreen .study-loading,
.study-fullscreen .study-empty {
  min-height: 0;
  height: 100%;
}

.study-menu-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  align-items: start;
  justify-items: end;
  padding: 78px clamp(12px, 4vw, 42px) 12px;
  background: rgba(18, 43, 37, 0.16);
}

.study-menu {
  width: min(100%, 264px);
  overflow: hidden;
  border: 1px solid #c6d9d2;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 40, 35, 0.2);
}

.study-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
}

.study-menu-actions {
  display: grid;
  padding: 6px;
}

.study-menu-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-weight: 680;
}

.study-menu-actions button:hover {
  color: var(--teal-dark);
  background: var(--soft);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 20px;
}

.admin-site-settings {
  margin-bottom: 20px;
}

.settings-plan-panel {
  grid-row: span 2;
}

.settings-form {
  padding: 22px;
}

.settings-form > p:not(.form-note) {
  margin: -6px 0 19px;
  color: var(--muted);
  font-size: 12px;
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 2px 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--ink);
  background: var(--soft);
  cursor: pointer;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #0078d4;
}

.settings-toggle span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.settings-toggle strong {
  font-size: 14px;
}

.settings-toggle small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.settings-vocabulary-library-panel {
  grid-column: 1 / -1;
  overflow: hidden;
}

.vocabulary-library-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px 0;
}

.vocabulary-library-filter {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: border-color 150ms ease-out, background 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}

.vocabulary-library-filter strong {
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-variant-numeric: tabular-nums;
}

.vocabulary-library-filter:hover,
.vocabulary-library-filter.active {
  border-color: #8eb5d6;
  color: #005a9e;
  background: #edf6fc;
}

.vocabulary-library-filter:active {
  transform: scale(0.98);
}

.vocabulary-library-search {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 16px 18px;
}

.vocabulary-library-search .field {
  flex: 1 1 220px;
  margin: 0;
}

.vocabulary-library-state {
  margin: 0;
  padding: 20px 18px;
  color: var(--muted);
}

.vocabulary-library-state.error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--danger);
}

.vocabulary-library-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 0;
  list-style: none;
}

.vocabulary-library-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 49px;
  border-bottom: 1px solid var(--line);
  padding: 9px 18px;
}

.vocabulary-library-row strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
}

.vocabulary-library-row small {
  color: var(--muted);
  font-size: 12px;
}

.vocabulary-library-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.vocabulary-library-status.status-learned {
  border-color: #b9d8ce;
  color: var(--teal-dark);
  background: #eff8f4;
}

.vocabulary-library-status.status-easy {
  border-color: #d7c5a4;
  color: #6f542e;
  background: #fdf9ed;
}

.vocabulary-library-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 12px;
}

.vocabulary-library-pagination > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-timer-body,
.settings-note-body {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.focus-timer-body > strong {
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(38px, 5vw, 58px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

.focus-timer-body p,
.settings-note-body p {
  margin: 0;
  color: var(--muted);
}

.focus-timer-actions {
  display: flex;
  gap: 9px;
}

.settings-note-body strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .study-app-shell {
    height: 100svh;
    height: 100dvh;
  }

  .study-app-header {
    min-height: 58px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .study-app-brand .brand > span:last-child,
  .study-app-progress > span,
  .study-app-actions .exam-countdown > span,
  .study-app-actions .exam-countdown-full,
  .study-timer-button > .study-timer-label {
    display: none;
  }

  .study-app-actions .exam-countdown-compact {
    display: block;
  }

  .study-app-brand .brand {
    gap: 0;
  }

  .study-app-progress {
    justify-content: flex-start;
  }

  .study-app-actions {
    gap: 5px;
  }

  .exam-countdown,
  .study-timer-button,
  .study-more-button,
  .study-back-button {
    min-height: 36px;
    padding: 5px 7px;
  }

  .study-fullscreen {
    padding: 0;
  }

  .study-fullscreen > .study-session {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .study-fullscreen .study-session-head {
    min-height: 54px;
    padding: 11px 16px;
  }

  .study-fullscreen .study-word-stage {
    min-height: 100%;
    padding: clamp(24px, 6vh, 50px) 20px 26px;
  }

  .study-word-title {
    flex-wrap: wrap;
  }

  .study-word-actions {
    margin-top: 0;
  }

  .study-round-summary {
    padding: 24px 16px 26px;
  }

  .study-round-card-list {
    grid-template-columns: 1fr;
  }

  .study-fullscreen .study-decision {
    min-height: 82px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .study-fullscreen .study-decision p,
  .study-fullscreen .study-result {
    display: none;
  }

  .study-fullscreen .study-decision > div {
    width: 100%;
    justify-content: stretch;
  }

  .study-fullscreen .button.study-choice,
  .study-fullscreen .study-decision-complete .button {
    width: 100%;
    min-width: 0;
    flex: 1 1 0;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-plan-panel {
    grid-row: auto;
  }

  .vocabulary-library-row {
    grid-template-columns: minmax(100px, 1fr) auto;
    gap: 8px 12px;
  }

  .vocabulary-library-row small {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .study-app-header {
    gap: 5px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .study-app-progress strong {
    font-size: 12px;
  }

  .exam-countdown strong,
  .study-timer-button strong,
  .study-more-button,
  .study-back-button {
    font-size: 11px;
  }

  .study-fullscreen .study-session-head > div {
    gap: 5px;
  }

  .study-random-note {
    display: none;
  }
}

.practice-timer-bar {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #b9d9d0;
  border-radius: 6px;
  padding: 16px 18px;
  color: #174f47;
  background: #f4fbf8;
}

.practice-timer-bar h2 {
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.18;
}

.practice-timer-bar p {
  max-width: 640px;
  margin: 0;
  color: #526b65;
  font-size: 12px;
}

.practice-timer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.practice-duration-field {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.practice-duration-field input {
  width: 54px;
  min-height: 28px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0 0 0 6px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.practice-timer-bar.is-running {
  border-color: #80b9aa;
  background: #eaf7f2;
}

.practice-timer-bar.is-running h2 {
  color: var(--teal-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 31px;
  font-variant-numeric: tabular-nums;
}

.practice-timer-bar.is-finished,
.practice-timer-bar.is-locked {
  border-color: #e4c6ba;
  background: #fffaf7;
}

.practice-timer-bar.is-finished h2,
.practice-timer-bar.is-locked h2 {
  color: #754334;
}

@media (max-width: 560px) {
  .practice-timer-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 15px 16px;
  }

  .practice-timer-bar .button {
    width: 100%;
  }

  .practice-timer-actions {
    width: 100%;
    align-items: stretch;
  }

  .practice-timer-actions .study-timer-button,
  .practice-duration-field {
    flex: 1 1 0;
  }
}

.analytics-page {
  padding-bottom: 58px;
}

.analytics-heading {
  margin-bottom: 16px;
}

.analytics-filter-panel {
  display: grid;
  grid-template-columns: minmax(128px, auto) minmax(0, 1fr) minmax(318px, auto);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.analytics-filter-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.analytics-filter-copy strong {
  font-size: 14px;
}

.analytics-filter-copy span,
.analytics-stat-note {
  color: var(--muted);
  font-size: 11px;
}

.analytics-range-tabs {
  display: flex;
  gap: 5px;
  min-width: 0;
}

.analytics-range-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 10px;
  color: #53625f;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-range-button:hover {
  border-color: #9fc6ba;
  color: var(--teal-dark);
  background: #f5fbf8;
}

.analytics-range-button.active {
  border-color: #94c4b8;
  color: var(--teal-dark);
  background: #e6f4ee;
}

.analytics-date-form {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(112px, 1fr) auto;
  align-items: end;
  gap: 7px;
}

.analytics-date-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.analytics-date-form input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
}

.analytics-date-form .button {
  min-height: 34px;
  padding-right: 11px;
  padding-left: 11px;
}

.analytics-date-form .form-note {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.analytics-summary-grid {
  margin-top: 16px;
}

.stat .analytics-stat-note {
  display: block;
  margin-top: 7px;
  line-height: 1.35;
}

.analytics-state {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding: 24px;
  text-align: center;
}

.analytics-state strong {
  font-size: 16px;
}

.analytics-state span {
  max-width: 560px;
  color: var(--muted);
}

.analytics-state .button {
  margin-top: 8px;
}

.analytics-error {
  border-color: #e4c2b7;
  background: #fffaf8;
}

.analytics-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.analytics-panel {
  overflow: hidden;
}

.analytics-panel > .panel-head {
  min-height: 57px;
  padding: 15px 18px;
}

.analytics-panel > .panel-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.analytics-panel > .panel-head > div > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.analytics-breakdown-list,
.analytics-date-list,
.analytics-content-list,
.analytics-recent-list {
  display: grid;
}

.analytics-breakdown-row {
  display: grid;
  gap: 7px;
  border-top: 1px solid #edf1ee;
  padding: 15px 18px;
}

.analytics-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.analytics-row-top strong {
  min-width: 0;
  font-size: 14px;
}

.analytics-row-top span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.analytics-breakdown-row small {
  color: var(--muted);
  font-size: 11px;
}

.analytics-bar,
.analytics-mini-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6eeeb;
}

.analytics-bar i,
.analytics-mini-bar i {
  display: block;
  min-width: 3px;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.analytics-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.8fr);
  align-items: center;
  gap: 14px;
  border-top: 1px solid #edf1ee;
  padding: 12px 18px;
}

.analytics-date-row > div:first-child,
.analytics-date-value {
  display: grid;
  gap: 3px;
}

.analytics-date-row strong {
  font-size: 13px;
}

.analytics-date-row span {
  color: var(--muted);
  font-size: 11px;
}

.analytics-date-value {
  justify-items: end;
}

.analytics-date-value > span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.analytics-date-value .analytics-mini-bar {
  width: 100%;
}

.analytics-content-panel,
.analytics-recent-panel {
  margin-top: 16px;
}

.analytics-content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #edf1ee;
  padding: 14px 18px;
}

.analytics-content-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 9px;
  min-width: 0;
}

.analytics-content-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-content-main > span:last-child {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-content-time {
  display: grid;
  justify-items: end;
  gap: 3px;
  white-space: nowrap;
}

.analytics-content-time strong,
.analytics-recent-duration {
  color: var(--teal-dark);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.analytics-content-time span {
  color: var(--muted);
  font-size: 11px;
}

.analytics-recent-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.72fr) minmax(0, 1.45fr) auto;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #edf1ee;
  padding: 13px 18px;
}

.analytics-recent-time,
.analytics-recent-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.analytics-recent-time strong,
.analytics-recent-content strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-recent-time span,
.analytics-recent-content span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-empty {
  margin: 0;
  padding: 25px 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .analytics-filter-panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .analytics-date-form {
    grid-column: 1 / -1;
    grid-template-columns: minmax(128px, 180px) minmax(128px, 180px) auto;
    justify-content: end;
  }
}

@media (max-width: 860px) {
  .analytics-overview-grid {
    grid-template-columns: 1fr;
  }

  .analytics-filter-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analytics-date-form {
    grid-column: auto;
    justify-content: stretch;
  }
}

@media (max-width: 560px) {
  .analytics-filter-panel {
    gap: 12px;
    padding: 14px;
  }

  .analytics-range-tabs {
    overflow-x: auto;
    margin-right: -14px;
    padding-right: 14px;
  }

  .analytics-range-button {
    flex: 0 0 auto;
  }

  .analytics-date-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .analytics-date-form .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .analytics-panel > .panel-head {
    align-items: flex-start;
    padding: 14px 15px;
  }

  .analytics-breakdown-row,
  .analytics-date-row,
  .analytics-content-row,
  .analytics-recent-row {
    padding-right: 15px;
    padding-left: 15px;
  }

  .analytics-date-row {
    grid-template-columns: minmax(0, 1fr) minmax(94px, 0.75fr);
    gap: 10px;
  }

  .analytics-content-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .analytics-content-main {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .analytics-content-main .tag {
    justify-self: start;
  }

  .analytics-content-main > span:last-child {
    grid-column: auto;
  }

  .analytics-content-main strong,
  .analytics-content-main > span:last-child,
  .analytics-recent-time strong,
  .analytics-recent-time span,
  .analytics-recent-content strong,
  .analytics-recent-content span {
    white-space: normal;
  }

  .analytics-recent-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
  }

  .analytics-recent-time {
    grid-column: 1 / -1;
  }

  .analytics-recent-content {
    align-self: start;
  }
}

/* Verified practice library: a spacious split paper surface on desktop and
   stacked, independently scrollable paper/answer panes on small screens. */
.practice-app-page {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 74px);
  gap: 12px;
  margin: 0;
  padding: 18px clamp(18px, 3vw, 34px) 22px;
}

.practice-app-heading {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.practice-app-heading .eyebrow {
  margin-bottom: 4px;
}

.practice-app-heading h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
}

.practice-app-heading p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.practice-app-exam-select {
  display: grid;
  min-width: 180px;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.practice-app-exam-select select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 9px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
}

.practice-app-modules {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.practice-app-module {
  display: grid;
  min-width: 118px;
  min-height: 52px;
  flex: 0 0 auto;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 11px;
  color: #485653;
  background: #ffffff;
  text-align: left;
}

.practice-app-module:hover,
.practice-app-module.active {
  border-color: #7cb5a8;
  color: var(--teal-dark);
  background: var(--soft);
}

.practice-app-module strong {
  font-size: 13px;
}

.practice-app-module span {
  color: var(--muted);
  font-size: 11px;
}

.practice-app-page > .practice-timer-bar {
  min-height: 66px;
  padding: 11px 15px;
}

.practice-app-page > .practice-timer-bar h2 {
  font-size: 18px;
}

.practice-app-page > .practice-timer-bar.is-running h2 {
  font-size: 25px;
}

.authorized-practice-workspace {
  display: grid;
  height: clamp(620px, calc(100vh - 205px), 900px);
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #c9dcd6;
  border-radius: 6px;
  background: #ffffff;
}

.authorized-practice-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: #fbfcfa;
}

.authorized-practice-tools > div:first-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.authorized-practice-tools .study-kicker {
  font-size: 10px;
}

.authorized-practice-tools strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.authorized-practice-tool-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.authorized-practice-mobile-tabs {
  display: none;
}

.authorized-practice-dual-pane {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.authorized-practice-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.authorized-paper-pane {
  background: #ffffff;
}

.authorized-answer-pane {
  border-left: 1px solid var(--line);
  background: #f8faf8;
}

.authorized-paper-body,
.authorized-answer-body {
  min-height: 100%;
}

.authorized-pane-heading {
  border-bottom: 1px solid #e3ebe7;
  padding: 17px clamp(16px, 2.2vw, 28px) 14px;
  background: #fcfdfb;
}

.authorized-pane-heading .study-kicker {
  font-size: 10px;
}

.authorized-pane-heading h2 {
  margin: 3px 0 4px;
  font-size: 18px;
  line-height: 1.3;
}

.authorized-pane-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.authorized-pane-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.authorized-pane-title-copy {
  min-width: 0;
  flex: 1 1 180px;
}

.authorized-pane-title-copy h2 {
  overflow-wrap: anywhere;
}

.authorized-paper-controls {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 1px;
}

.authorized-paper-controls .button {
  min-height: 30px;
  padding: 6px 9px;
  white-space: nowrap;
}

.authorized-passage-content {
  padding: 8px clamp(16px, 2.3vw, 30px) 28px;
}

.authorized-passage-block {
  padding: 15px 0 17px;
  border-bottom: 1px solid #e7eeea;
}

.authorized-passage-block:last-child {
  border-bottom: 0;
}

.authorized-passage-block > header {
  margin-bottom: 7px;
}

.authorized-passage-block > header span {
  display: inline-grid;
  min-width: 24px;
  min-height: 20px;
  place-items: center;
  border: 1px solid #b9d8cf;
  border-radius: 4px;
  color: var(--teal-dark);
  background: #f0faf6;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.authorized-sentence + .authorized-sentence {
  margin-top: 8px;
}

.authorized-passage-english {
  --practice-text-leading: 2.05;
  margin: 0;
  color: #25332f;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: var(--practice-text-leading);
}

.authorized-passage-translation {
  margin: 5px 0 0;
  color: #6d567c;
  font-size: 13px;
  line-height: 1.62;
}

.authorized-translation-underline {
  text-decoration: underline;
  text-decoration-color: #8c6aa1;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.practice-inline-annotation {
  display: inline ruby;
  ruby-position: under;
  margin: 0;
  line-height: inherit;
  vertical-align: baseline;
}

.practice-annotation-base {
  white-space: nowrap;
}

.practice-annotation-token {
  display: inline;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-decoration-color: #5e9fbd;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  vertical-align: baseline;
}

.practice-annotation-token:hover {
  text-decoration-color: #196891;
  color: #196891;
}

.practice-inline-annotation.is-hidden .practice-annotation-token {
  text-decoration: none;
}

.practice-annotation-gloss {
  display: ruby-text;
  max-width: 12ch;
  overflow: hidden;
  margin: 0;
  color: #31789d;
  font-family: "Times New Roman", Times, "Microsoft YaHei", serif;
  font-size: 10px;
  line-height: 1.18;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

.practice-inline-annotation.is-hidden .practice-annotation-gloss {
  display: none;
}

.practice-inline-blank {
  display: inline-block;
  min-width: 38px;
  max-width: min(210px, 54vw);
  overflow: hidden;
  border: 0;
  border-bottom: 2px solid #5d9890;
  padding: 0 4px 1px;
  color: #1a5e55;
  background: #edf7f3;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-overflow: ellipsis;
  vertical-align: baseline;
  white-space: nowrap;
}

.practice-inline-blank:not(.is-filled) {
  color: #66746f;
  background: transparent;
}

.practice-inline-blank:hover {
  border-bottom-color: var(--teal-dark);
  color: var(--teal-dark);
}

.practice-inline-blank.is-correct {
  border-bottom-color: #4f9a72;
  color: #237249;
  background: #edf8ef;
}

.practice-inline-blank.is-incorrect {
  border-bottom-color: #c46b56;
  color: #9b4333;
  background: #fff1ed;
}

.authorized-answer-list {
  display: grid;
}

.authorized-answer-card {
  border-bottom: 1px solid #dfe9e4;
  padding: 15px clamp(15px, 2vw, 23px) 18px;
  background: #ffffff;
}

.authorized-answer-card > header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  margin-bottom: 12px;
}

.authorized-slot-number {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #b8cec6;
  border-radius: 50%;
  color: var(--teal-dark);
  background: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.authorized-answer-card > header > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.authorized-answer-card > header strong {
  color: #263530;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.authorized-answer-card > header small {
  color: #766184;
  font-size: 12px;
  line-height: 1.45;
}

.authorized-choice-list {
  display: grid;
  gap: 7px;
}

.authorized-choice {
  display: grid;
  width: 100%;
  min-height: 45px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #d2dfda;
  border-radius: 5px;
  padding: 8px 10px;
  color: #283530;
  background: #ffffff;
  text-align: left;
}

.authorized-choice:hover:not(:disabled),
.authorized-choice.selected {
  border-color: #5fa798;
  background: #edf8f4;
}

.authorized-choice:disabled {
  cursor: default;
}

.authorized-choice-key {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #abc6bc;
  border-radius: 50%;
  color: var(--teal-dark);
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.authorized-choice-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.authorized-choice-copy strong {
  overflow-wrap: anywhere;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.42;
}

.authorized-choice-copy small {
  color: #71607e;
  font-size: 11px;
  line-height: 1.35;
}

.authorized-answer-translation {
  color: #71607e;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.authorized-choice.is-correct-answer {
  border-color: #69aa7c;
  background: #edf8ef;
}

.authorized-choice.is-incorrect-answer {
  border-color: #d98570;
  background: #fff3ef;
}

.authorized-choice-result {
  color: #2f7b4f;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.authorized-correct-answer {
  margin: 10px 0 0;
  color: #2e7650;
  font-family: "Times New Roman", Times, "Microsoft YaHei", serif;
  font-size: 12px;
  line-height: 1.5;
}

.authorized-result-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  border-bottom: 1px solid #b9d9cb;
  padding: 10px clamp(15px, 2vw, 23px);
  color: #276c4c;
  background: #edf8ef;
}

.authorized-result-summary strong {
  font-size: 15px;
}

.authorized-result-summary span {
  font-size: 12px;
}

.authorized-mapping-answer,
.authorized-order-answer {
  display: grid;
  gap: 0;
}

.authorized-mapping-answer > section:first-child,
.authorized-order-answer > section:first-child {
  border-bottom: 1px solid #dfe9e4;
  padding: 14px clamp(15px, 2vw, 23px) 16px;
  background: #ffffff;
}

.authorized-answer-hint {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.authorized-option-pool {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.authorized-pool-option {
  display: grid;
  min-width: 0;
  min-height: 54px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 2px 7px;
  border: 1px solid #ceddd7;
  border-radius: 5px;
  padding: 7px 8px;
  color: #273530;
  background: #ffffff;
  text-align: left;
}

.authorized-pool-option:hover:not(:disabled),
.authorized-pool-option.active {
  border-color: #4d9b8d;
  background: #eaf7f2;
}

.authorized-pool-option.is-used:not(.active) {
  color: #6a7874;
  background: #f4f7f5;
}

.authorized-pool-option.is-dragging {
  opacity: 0.48;
}

.authorized-pool-option > span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  grid-row: 1 / span 3;
  place-items: center;
  border: 1px solid #adc9bf;
  border-radius: 4px;
  color: var(--teal-dark);
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

.authorized-pool-option strong {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.32;
  text-overflow: clip;
  white-space: normal;
}

.authorized-pool-option small,
.authorized-pool-option em {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  color: #715f7e;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

.authorized-pool-option em {
  color: #66746f;
}

.authorized-mapping-slots,
.authorized-order-slots {
  display: grid;
  gap: 8px;
  padding: 14px clamp(15px, 2vw, 23px) 22px;
}

.authorized-mapping-slot,
.authorized-order-slot,
.authorized-order-fixed {
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 8px;
  border: 1px solid #d4e1dc;
  border-radius: 5px;
  padding: 8px 9px;
  background: #ffffff;
}

.authorized-mapping-slot > div,
.authorized-order-slot > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.authorized-mapping-slot strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  line-height: 1.35;
}

.authorized-mapping-target {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.authorized-mapping-target small {
  color: #715f7e;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.authorized-slot-drop {
  min-width: 0;
  min-height: 34px;
  overflow: visible;
  border: 1px dashed #97b8ad;
  border-radius: 4px;
  padding: 6px 8px;
  color: #60716c;
  background: #fbfdfc;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.authorized-slot-drop:hover:not(:disabled),
.authorized-slot-drop.is-filled {
  border-style: solid;
  border-color: #62a695;
  color: #1d6459;
  background: #edf8f4;
}

.authorized-mapping-slot > .authorized-correct-answer,
.authorized-order-slot > .authorized-correct-answer {
  grid-column: 1 / -1;
  margin: -1px 0 0;
}

.authorized-order-slots {
  gap: 7px;
}

.authorized-order-slot {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.authorized-order-slot.is-drag-over {
  border-color: #2b8d7b;
  background: #e4f5ef;
}

.authorized-order-move {
  display: flex;
  gap: 3px;
}

.authorized-order-move button {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #b8cdc5;
  border-radius: 4px;
  padding: 0;
  color: var(--teal-dark);
  background: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.authorized-order-move button:hover:not(:disabled) {
  border-color: #5fa697;
  background: #ecf8f4;
}

.authorized-order-move button:disabled {
  cursor: default;
  opacity: 0.38;
}

.authorized-order-fixed {
  grid-template-columns: auto minmax(0, 1fr);
  border-color: #c7d8d2;
  color: #3e6259;
  background: #f0f7f4;
}

.authorized-order-fixed span {
  color: var(--muted);
  font-size: 10px;
}

.authorized-order-fixed strong {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
}

.authorized-order-source {
  display: grid;
  gap: 0;
  padding: 0 clamp(16px, 2.3vw, 30px) 24px;
}

.authorized-order-source article {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 9px;
  border-bottom: 1px solid #e4ece8;
  padding: 16px 0;
}

.authorized-order-source article:last-child {
  border-bottom: 0;
}

.authorized-order-source article p {
  margin: 0;
  color: #263530;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.76;
}

.authorized-order-label {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #a9c9bf;
  border-radius: 4px;
  color: var(--teal-dark);
  background: #eff8f4;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .practice-app-page {
    min-height: auto;
  }

  .authorized-practice-workspace {
    height: auto;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .authorized-practice-mobile-tabs {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: #ffffff;
  }

  .authorized-practice-mobile-tabs button {
    min-height: 42px;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 8px;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
  }

  .authorized-practice-mobile-tabs button.active {
    border-bottom-color: var(--teal);
    color: var(--teal-dark);
    background: #f3faf7;
  }

  .authorized-practice-dual-pane {
    display: grid;
    grid-template-rows: minmax(460px, 58vh) minmax(460px, 58vh);
    min-height: 0;
  }

  .authorized-practice-pane {
    display: block;
    height: auto;
    min-height: 0;
  }

  .authorized-answer-pane {
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .practice-app-page {
    gap: 9px;
    padding: 12px 10px 14px;
  }

  .practice-app-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 0 4px;
  }

  .practice-app-heading h1 {
    font-size: 21px;
  }

  .practice-app-heading p:not(.eyebrow) {
    font-size: 12px;
  }

  .practice-app-exam-select {
    width: 100%;
  }

  .practice-app-modules {
    margin: 0 -1px;
  }

  .practice-app-module {
    min-width: 102px;
    min-height: 48px;
  }

  .practice-app-page > .practice-timer-bar {
    min-height: 0;
  }

  .practice-app-page > .practice-timer-bar h2 {
    font-size: 16px;
  }

  .authorized-practice-workspace {
    min-height: 0;
    border-radius: 5px;
  }

  .authorized-practice-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 11px;
  }

  .authorized-practice-tool-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .authorized-practice-tool-actions .button {
    flex: 1 1 0;
  }

  .authorized-practice-pane {
    height: auto;
    min-height: 0;
  }

  .authorized-pane-heading {
    padding: 13px 15px 11px;
  }

  .authorized-pane-heading h2 {
    font-size: 17px;
  }

  .authorized-passage-content {
    padding: 5px 15px 20px;
  }

  .authorized-passage-block {
    padding: 12px 0 14px;
  }

  .authorized-passage-english {
    --practice-text-leading: 2.15;
    font-size: 16px;
    line-height: var(--practice-text-leading);
  }

  .authorized-order-source article p {
    font-size: 16px;
    line-height: 1.82;
  }

  .authorized-passage-translation {
    font-size: 12px;
  }

  .practice-inline-blank {
    max-width: 152px;
  }

  .authorized-answer-card {
    padding: 13px 13px 15px;
  }

  .authorized-option-pool {
    grid-template-columns: 1fr;
  }

  .authorized-mapping-answer > section:first-child,
  .authorized-order-answer > section:first-child,
  .authorized-mapping-slots,
  .authorized-order-slots {
    padding-right: 13px;
    padding-left: 13px;
  }

  .authorized-mapping-slot {
    grid-template-columns: 1fr;
  }

  .authorized-mapping-slot .authorized-slot-drop {
    width: 100%;
  }

  .authorized-order-slot {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 6px;
  }

.authorized-order-source {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (max-width: 720px) {
  .admin-tabs {
    overflow-x: auto;
  }

  .admin-tab {
    flex: 0 0 auto;
    padding-right: 10px;
    padding-left: 10px;
  }

  .contextual-gloss-intro {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .contextual-gloss-intro h2 {
    font-size: 19px;
  }

  .contextual-gloss-source {
    min-width: 0;
  }

  .contextual-gloss-filter {
    padding: 13px;
  }

  .contextual-gloss-filter-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contextual-gloss-filter-form .contextual-gloss-search,
  .contextual-gloss-filter-form button {
    grid-column: span 2;
  }

  .contextual-gloss-list-items {
    max-height: 300px;
  }

  .contextual-gloss-detail-head {
    padding: 15px;
  }

  .contextual-gloss-detail-head h2 {
    font-size: 22px;
  }

  .contextual-gloss-context section,
  .contextual-gloss-candidates,
  .contextual-gloss-review-form {
    padding-right: 15px;
    padding-left: 15px;
  }

  .contextual-gloss-review-actions .button {
    flex: 1 1 0;
  }
}

/* Keep the practice overrides last so legacy bank styles cannot reintroduce
   the desktop grid or the page chrome. */
.practice-shell {
  display: block !important;
  min-height: 100dvh;
}

.practice-shell .main-area {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.practice-focus-page {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.authorized-practice-workspace {
  display: block !important;
  width: 100%;
  height: 100% !important;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.authorized-practice-workspace .authorized-practice-dual-pane {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.authorized-practice-workspace .authorized-practice-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding-top: 52px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Keep the paper title and its two display switches together while only the
   source text moves underneath them. The 52px offset leaves room for the
   floating practice controls and stopwatch above the panes. */
.authorized-practice-workspace .authorized-paper-pane {
  scroll-padding-top: 52px;
}

.authorized-practice-workspace .authorized-paper-pane .authorized-pane-heading {
  position: sticky;
  top: 52px;
  z-index: 16;
  background: #fcfdfb;
  box-shadow: 0 5px 10px rgba(36, 68, 61, 0.07);
}

@media (max-width: 900px) {
  .authorized-practice-workspace .authorized-practice-dual-pane {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    min-height: 0;
  }

  .authorized-practice-workspace .authorized-practice-pane {
    display: block !important;
    width: 100% !important;
    height: 50% !important;
    padding-top: 52px;
    min-width: 0;
    min-height: 0;
    flex: 0 0 50%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .authorized-practice-workspace .authorized-answer-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* The paper pane has its own fixed heading and a separate scrolling source
   body. This keeps the title and display switches visible without overlaying
   the floating practice controls. */
.authorized-practice-workspace .authorized-paper-pane {
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  scroll-padding-top: 0;
}

.authorized-practice-workspace .authorized-paper-pane > .authorized-paper-body {
  display: flex;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  flex-direction: column;
}

.authorized-practice-workspace .authorized-paper-pane .authorized-pane-heading {
  position: relative;
  top: auto;
  z-index: 1;
  flex: 0 0 auto;
}

.authorized-practice-workspace .authorized-paper-pane .authorized-passage-content,
.authorized-practice-workspace .authorized-paper-pane .authorized-order-source {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.authorized-practice-workspace .authorized-practice-dual-pane {
  position: relative;
  grid-template-columns: minmax(0, var(--practice-first-size, 50%)) minmax(0, 1fr);
}

.authorized-practice-splitter {
  position: absolute;
  z-index: 24;
  top: 0;
  bottom: 0;
  left: calc(var(--practice-first-size, 50%) - 9px);
  display: grid;
  width: 18px;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(139, 189, 177, 0.58);
  border-left: 1px solid rgba(139, 189, 177, 0.58);
  padding: 0;
  color: var(--teal-dark);
  background: rgba(239, 248, 244, 0.88);
  cursor: col-resize;
  touch-action: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.authorized-practice-splitter span {
  display: block;
  width: 4px;
  height: 54px;
  border-radius: 3px;
  background: #86b9ad;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.authorized-practice-splitter:hover,
.authorized-practice-splitter:focus-visible,
.authorized-practice-splitter.is-dragging {
  border-color: var(--teal);
  background: rgba(213, 239, 231, 0.96);
}

body.is-practice-splitting {
  user-select: none;
  cursor: col-resize;
}

@media (max-width: 900px) {
  .authorized-practice-workspace .authorized-practice-dual-pane {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, var(--practice-first-size, 50%)) minmax(0, 1fr);
    flex-direction: initial;
  }

  .authorized-practice-workspace .authorized-practice-pane {
    grid-column: 1;
    height: auto !important;
    flex: none;
  }

  .authorized-practice-workspace .authorized-answer-pane {
    height: auto !important;
    flex-basis: auto;
    padding-top: 0;
  }

  .authorized-practice-workspace .authorized-answer-pane .authorized-pane-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
  }

  .authorized-practice-workspace .authorized-answer-pane .authorized-pane-heading h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
  }

  .authorized-practice-workspace .authorized-answer-pane .authorized-pane-heading p {
    min-width: 0;
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
  }

  .authorized-practice-splitter {
    top: calc(var(--practice-first-size, 50%) - 9px);
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 18px;
    border-top: 1px solid rgba(139, 189, 177, 0.58);
    border-right: 0;
    border-bottom: 1px solid rgba(139, 189, 177, 0.58);
    border-left: 0;
    cursor: row-resize;
  }

  .authorized-practice-splitter span {
    width: 54px;
    height: 4px;
  }

  body.is-practice-splitting {
    cursor: row-resize;
  }
}

/* Fluent Design visual system ------------------------------------------------
   This layer intentionally changes presentation only. Exam passages, word
   spellings and phonetics keep their existing Times New Roman declarations. */
:root {
  --ink: #323130;
  --muted: #605e5c;
  --line: #e1e1e1;
  --paper: #f3f2f1;
  --surface: #ffffff;
  --soft: #deecf9;
  --teal: #0078d4;
  --teal-dark: #106ebe;
  --mint: #c7e0f4;
  --coral: #e81123;
  --yellow: #ffb900;
  --blue: #0078d4;
  --danger: #e81123;
  --fluent-blue-active: #005a9e;
  --fluent-shadow-small: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.1);
  --fluent-shadow-medium: 0 3.2px 7.2px rgba(0, 0, 0, 0.13), 0 0.6px 1.8px rgba(0, 0, 0, 0.1);
  --fluent-shadow-large: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.1);
  --shadow: var(--fluent-shadow-medium);
}

html,
body,
.main-area {
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

::selection {
  color: #ffffff;
  background: #0078d4;
}

button,
a.button,
.home-action,
.nav-item,
.practice-module-card,
.practice-app-module,
.icon-button,
.global-search-submit,
.analytics-range-button,
.admin-tab,
.practice-focus-menu-button,
.practice-focus-module {
  transition: transform 150ms ease-out, background 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, color 150ms ease-out;
}

button:not(.content-word):not(.practice-annotation-token):not(.authorized-practice-splitter):not(.practice-inline-blank):not(:disabled):active,
a.button:active {
  transform: translateY(0) scale(0.97);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0078d4;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0078d4;
}

.field input,
.field select,
.field textarea,
.search-input,
.global-search,
.practice-focus-select select,
.practice-app-exam-select select,
.analytics-date-form input,
.practice-duration-field input {
  border-color: #8a8886;
  border-radius: 4px;
  background: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus,
.practice-focus-select select:focus,
.practice-app-exam-select select:focus,
.analytics-date-form input:focus,
.practice-duration-field input:focus {
  border-color: #0078d4;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.24);
}

.global-search:focus-within {
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.24);
}

.button {
  border-color: #0078d4;
  border-radius: 4px;
  color: #ffffff;
  background: #0078d4;
  box-shadow: var(--fluent-shadow-small);
  font-weight: 700;
  transition: transform 150ms ease-out, background 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, color 150ms ease-out;
}

.button:hover {
  border-color: #106ebe;
  background: #106ebe;
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-0.5px);
}

.button:active {
  border-color: #005a9e;
  background: #005a9e;
  box-shadow: none;
}

.button.secondary {
  border-color: #8a8886;
  color: #323130;
  background: #ffffff;
}

.button.secondary:hover {
  border-color: #0078d4;
  color: #005a9e;
  background: #f3f9fd;
}

.button.danger {
  border-color: #e81123;
  background: #e81123;
}

.button.danger:hover {
  border-color: #c50f1f;
  background: #c50f1f;
}

.text-button,
.task-time,
.pos,
.eyebrow {
  color: #0078d4;
}

.app-shell {
  background: var(--paper);
}

.sidebar {
  border-right-color: #e1e1e1;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(18px);
}

.sidebar .brand,
.brand {
  color: #323130;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-weight: 700;
}

.sidebar .brand-mark,
.brand-mark {
  border-width: 1px;
  border-color: #0078d4;
  color: #0078d4;
  background: #ffffff;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 4px;
  color: #605e5c;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-weight: 600;
}

.nav-item:hover {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #f3f9fd;
}

.nav-item.active {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
}

.entitlement-note {
  border-top-color: #e1e1e1;
}

.topbar {
  border-bottom-color: #e1e1e1;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.global-search {
  border-color: #8a8886;
  background: rgba(255, 255, 255, 0.9);
}

.global-search-submit {
  border-left-color: #e1e1e1;
  border-radius: 0;
  color: #005a9e;
  background: #f3f9fd;
  font-weight: 700;
}

.global-search-submit:hover {
  color: #ffffff;
  background: #0078d4;
}

.global-search-popover,
.word-lookup-dialog,
.study-menu,
.practice-focus-controls {
  border-color: #e1e1e1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--fluent-shadow-large);
  backdrop-filter: blur(18px);
}

.avatar {
  background: #0078d4;
}

.access-notice {
  border-bottom-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
}

.page-heading h1,
.home-heading h1,
.auth-card h2 {
  color: #323130;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-weight: 700;
}

.panel,
.stat-grid,
.home-action,
.practice-module-card,
.practice-app-module,
.study-round-card,
.word-lookup-context,
.word-lookup-provenance,
.reading-note-context,
.reading-note-provenance {
  border-color: #e1e1e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--fluent-shadow-small);
}

.panel-head,
.stat-grid .stat,
.authorized-pane-heading {
  border-color: #e1e1e1;
}

.panel-head {
  background: rgba(255, 255, 255, 0.72);
}

.home-action {
  border-color: #e1e1e1;
  box-shadow: var(--fluent-shadow-small);
}

.home-action.primary,
.home-action.admin,
.home-action.analytics {
  border-color: #c7e0f4;
  background: #f7fbff;
}

.home-action-mark {
  border-color: #c7e0f4;
  border-radius: 4px;
  color: #0078d4;
  background: #deecf9;
  transition: transform 200ms ease-out, background 150ms ease-out, color 150ms ease-out;
}

.home-action.admin .home-action-mark,
.home-action.analytics .home-action-mark {
  border-color: #c7e0f4;
  color: #0078d4;
}

.tag,
.study-kicker,
.word-study-meta span,
.study-round-result {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
}

.tag.coral,
.study-round-result.unknown {
  border-color: #f4c7cc;
  color: #a4262c;
  background: #fde7e9;
}

.tag.yellow,
.word-study-meta .word-priority-tag {
  border-color: #fce100;
  color: #835d00;
  background: #fff4ce;
}

.dictionary-definition-details,
.rare-sense,
.example,
.reading-root,
.reading-note-disclaimer {
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fafafa;
}

.dictionary-definition-details,
.rare-sense,
.example,
.reading-root {
  color: #605e5c;
}

.dictionary-definition-details summary,
.reading-root strong {
  color: #005a9e;
}

.example {
  padding-left: 12px;
}

.reading-tag {
  color: #005a9e;
  background: #deecf9;
}

.reading-masthead,
.reading-note-head {
  border-bottom-color: #c7e0f4;
  background: #f7fbff;
}

.reading-masthead .eyebrow,
.reading-note-kicker,
.reading-note-meaning span,
.reading-note-candidates > span,
.reading-note-dictionary > span,
.reading-paragraph-number {
  color: #0078d4;
}

.reading-masthead h2,
.reading-note-head h2,
.reading-note-empty h2 {
  color: #323130;
}

.reading-column-head {
  border-bottom-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
}

.reading-column-head > span + span,
.reading-translation {
  border-left-color: #c7e0f4;
}

.reading-translation {
  background: #f8fbff;
}

.reading-outline-button:hover,
.reading-annotation-group.active,
.reading-annotation-group .content-word:hover,
.reading-annotation-group .content-word:focus-visible {
  color: #005a9e;
  background: #deecf9;
}

.reading-annotation-group .content-word {
  text-decoration-color: #0078d4;
}

.reading-token-gloss,
.reading-annotation-group.active .reading-token-gloss {
  color: #005a9e;
}

/* Deep-reading layers ------------------------------------------------------
   Structural chunks live on the source sentence itself. The small note under
   it is only a reminder of the skeleton, not a duplicate card of the text. */
.reading-source-copy {
  display: grid;
  gap: 15px;
}

.reading-sentence,
.authorized-sentence {
  min-width: 0;
}

.reading-sentence > p,
.authorized-sentence > .authorized-passage-english {
  margin: 0;
}

.sentence-decomposition-span {
  --structure-fill: #c7e0f4;
  --structure-ink: #005a9e;
  position: relative;
  display: inline;
  border-radius: 0.2em 0.52em 0.24em 0.46em;
  box-decoration-break: clone;
  color: inherit;
  box-shadow: inset 0 -0.48em 0 var(--structure-fill);
  text-decoration: underline;
  text-decoration-color: var(--structure-ink);
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.sentence-decomposition-span::before {
  position: absolute;
  top: -0.78em;
  left: 0.14em;
  z-index: 1;
  border-radius: 0.45em 0.65em 0.42em 0.55em;
  padding: 0.04em 0.3em;
  color: var(--structure-ink);
  background: #ffffff;
  content: attr(data-sentence-role-label);
  font-family: "Segoe Print", "Bradley Hand", "Microsoft YaHei", cursive;
  font-size: 0.54em;
  font-weight: 700;
  line-height: 1.1;
  pointer-events: none;
  transform: rotate(-2deg);
}

.sentence-decomposition-span:hover,
.sentence-decomposition-span:focus-within {
  box-shadow: inset 0 -0.62em 0 var(--structure-fill), 0 1px 0 rgba(0, 90, 158, 0.28);
}

.sentence-decomposition-span.sentence-decomposition-subordinate_clause,
.sentence-decomposition-span.sentence-decomposition-relative_clause {
  --structure-fill: #bfe5d0;
  --structure-ink: #107c41;
}

.sentence-decomposition-span.sentence-decomposition-prepositional_phrase,
.sentence-decomposition-span.sentence-decomposition-parenthetical {
  --structure-fill: #ffd8a8;
  --structure-ink: #a54b00;
}

.sentence-decomposition-span.sentence-decomposition-nonfinite,
.sentence-decomposition-span.sentence-decomposition-modifier,
.sentence-decomposition-span.sentence-decomposition-apposition {
  --structure-fill: #dac7ee;
  --structure-ink: #6b3f91;
}

.sentence-doodle-note {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
  max-width: 100%;
  margin-top: 8px;
  border-top: 1px dashed #b7d8ed;
  padding: 6px 0 0;
  color: #334a5d;
}

.sentence-doodle-note::after {
  display: none;
}

.sentence-doodle-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  color: #005a9e;
  font-family: "Segoe Print", "Bradley Hand", "Microsoft YaHei", cursive;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.sentence-doodle-headline {
  color: #465f74;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.sentence-doodle-skeleton {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 6px;
  min-width: 0;
}

.sentence-doodle-skeleton > span,
.sentence-doodle-chunk > b {
  color: #005a9e;
  font-family: "Segoe Print", "Bradley Hand", "Microsoft YaHei", cursive;
  font-size: 11px;
  font-weight: 700;
}

.sentence-doodle-skeleton > strong,
.sentence-doodle-chunk > strong {
  min-width: 0;
  color: #323130;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sentence-doodle-skeleton > em {
  color: #4f6474;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.sentence-doodle-chunks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sentence-doodle-chunk {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 6px;
  min-width: min(100%, 180px);
  max-width: 100%;
  border-radius: 5px;
  padding: 5px 7px;
  background: #eaf5fc;
}

.sentence-doodle-chunk > i,
.sentence-doodle-chunk > em {
  grid-column: 2;
  color: #527080;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.sentence-doodle-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sentence-doodle-extra > span {
  border-radius: 999px;
  padding: 3px 7px;
  color: #5b6070;
  background: #eef2f5;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.35;
}

.sentence-coreference-token {
  --coreference-fill: #c7e0f4;
  --coreference-ink: #005a9e;
  position: relative;
  display: inline;
  border: 0;
  border-radius: 3px;
  padding: 0 0.08em;
  color: var(--coreference-ink);
  background: transparent;
  font-family: "Times New Roman", Times, serif;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
  box-shadow: inset 0 -0.42em 0 var(--coreference-fill);
  cursor: pointer;
}

.sentence-coreference-token:hover,
.sentence-coreference-token:focus-visible,
.sentence-coreference-token.is-active {
  box-shadow: inset 0 -0.72em 0 var(--coreference-fill), 0 0 0 1px currentColor;
}

.sentence-coreference-token.is-trigger::after {
  display: inline-block;
  margin-left: 0.18em;
  color: currentColor;
  content: "↗";
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 0.68em;
  vertical-align: 0.22em;
}

.sentence-coreference-token[data-coreference-color="green"] {
  --coreference-fill: #a7e0c1;
  --coreference-ink: #107c41;
}

.sentence-coreference-token[data-coreference-color="orange"] {
  --coreference-fill: #ffd6a1;
  --coreference-ink: #a54b00;
}

.sentence-coreference-token[data-coreference-color="purple"] {
  --coreference-fill: #d9c4ef;
  --coreference-ink: #6b3f91;
}

.sentence-coreference-token[data-coreference-color="rose"] {
  --coreference-fill: #f2c1cf;
  --coreference-ink: #a4264c;
}

.sentence-coreference-token[data-coreference-color="teal"] {
  --coreference-fill: #a8ded8;
  --coreference-ink: #007c73;
}

.authorized-passage-english .sentence-coreference-token {
  color: var(--coreference-ink);
}

@media (max-width: 620px) {
  .reading-source-copy {
    gap: 13px;
  }

  .sentence-doodle-note {
    margin-top: 7px;
    padding-top: 5px;
  }

  .sentence-doodle-chunks {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sentence-doodle-chunk {
    min-width: 0;
  }
}

.practice-module-card,
.practice-app-module {
  border-color: #e1e1e1;
  box-shadow: var(--fluent-shadow-small);
}

.practice-module-card.active,
.practice-app-module.active {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #f7fbff;
  box-shadow: var(--fluent-shadow-medium);
}

.practice-focus-page,
.practice-shell .main-area {
  background: #f3f2f1;
}

.practice-focus-menu-button,
.practice-focus-timer .study-timer-button {
  border-color: #e1e1e1;
  border-radius: 12px;
  color: #005a9e;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--fluent-shadow-small);
  backdrop-filter: blur(18px);
}

.practice-focus-menu-button:hover,
.practice-focus-timer .study-timer-button:hover {
  border-color: #c7e0f4;
  color: #005a9e;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-0.5px);
}

.practice-focus-controls {
  border-color: #e1e1e1;
}

.practice-focus-module {
  border-color: #e1e1e1;
  border-radius: 4px;
}

.practice-focus-module.active,
.practice-focus-module:hover {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
}

.authorized-paper-pane {
  background: #ffffff;
}

.authorized-answer-pane {
  border-color: #c7e0f4;
  background: #f8fbff;
}

.authorized-pane-heading,
.authorized-paper-pane .authorized-pane-heading {
  border-color: #e1e1e1;
  background: rgba(255, 255, 255, 0.88);
}

.authorized-practice-splitter {
  border-color: #c7e0f4;
  color: #0078d4;
  background: rgba(255, 255, 255, 0.88);
}

.authorized-practice-splitter span {
  background: #0078d4;
}

.authorized-practice-splitter:hover,
.authorized-practice-splitter:focus-visible,
.authorized-practice-splitter.is-dragging {
  border-color: #0078d4;
  background: #deecf9;
}

.toast {
  border-color: #c7e0f4;
  border-radius: 6px;
  color: #005a9e;
  background: rgba(222, 236, 249, 0.94);
  box-shadow: var(--fluent-shadow-medium);
  backdrop-filter: blur(14px);
}

.toast.error {
  border-color: #f4c7cc;
  color: #a4262c;
  background: #fde7e9;
}

.auth-page {
  background: #f3f2f1;
}

.auth-aside {
  color: #ffffff;
  background: #005a9e;
}

.auth-aside::after {
  display: none;
}

.auth-copy p,
.auth-point {
  color: #deecf9;
}

.auth-panel {
  background: #f3f2f1;
}

.auth-card {
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--fluent-shadow-medium);
}

@media (max-width: 860px) {
  .sidebar,
  .topbar {
    backdrop-filter: blur(14px);
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 10px 10px 0;
  }

  .sidebar .brand {
    padding: 2px 6px 10px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
    padding-bottom: 8px;
  }

  .nav-item {
    min-width: 0;
    justify-content: center;
    padding: 7px 4px;
    font-size: 11px;
    white-space: nowrap;
  }

  .nav-item::before {
    margin-right: 3px;
  }

  .auth-card {
    padding: 22px 18px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover {
    border-color: #c7e0f4;
    background: #ffffff;
    box-shadow: var(--fluent-shadow-medium);
    transform: translateY(-4px);
  }

  .home-action:hover .home-action-mark {
    color: #ffffff;
    background: #0078d4;
    transform: scale(1.05);
  }

  .practice-module-card:hover,
  .practice-app-module:hover {
    border-color: #c7e0f4;
    color: #005a9e;
    background: #f7fbff;
    box-shadow: var(--fluent-shadow-medium);
    transform: translateY(-4px);
  }
}

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

@media (max-width: 480px) {
  .practice-focus-title {
    max-width: 42vw;
  }

  .practice-focus-timer .study-timer-button {
    min-width: 82px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .practice-focus-controls {
    width: min(310px, calc(100vw - 20px));
  }
}

/* Fluent states for answer controls and data surfaces. Keep semantic green
   and red feedback, while the neutral interaction chrome uses Fluent blue. */
.icon-button,
.study-more-button,
.study-back-button,
.study-timer-button,
.analytics-range-button,
.admin-tab,
.section-button,
.practice-passage-tab {
  border-color: #8a8886;
  border-radius: 4px;
  color: #323130;
  background: #ffffff;
  box-shadow: var(--fluent-shadow-small);
}

.icon-button:hover,
.study-more-button:hover,
.study-back-button:hover,
.study-timer-button:hover,
.analytics-range-button:hover,
.admin-tab:hover,
.section-button:hover,
.practice-passage-tab:hover {
  border-color: #0078d4;
  color: #005a9e;
  background: #f3f9fd;
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-0.5px);
}

.analytics-range-button.active,
.admin-tab.active,
.section-button.active,
.practice-passage-tab.active {
  border-color: #0078d4;
  color: #005a9e;
  background: #deecf9;
}

.authorized-answer-card,
.authorized-result-summary,
.authorized-option-pool,
.authorized-mapping-answer,
.authorized-order-answer {
  border-color: #e1e1e1;
  background: #ffffff;
}

.authorized-answer-card {
  border-bottom-color: #e1e1e1;
}

.authorized-slot-number {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #f7fbff;
}

.authorized-choice,
.authorized-pool-option,
.authorized-slot-drop,
.authorized-order-fixed {
  border-color: #d1d1d1;
  border-radius: 4px;
  color: #323130;
  background: #ffffff;
  box-shadow: var(--fluent-shadow-small);
}

.authorized-choice:hover:not(:disabled),
.authorized-choice.selected,
.authorized-pool-option:hover:not(:disabled),
.authorized-pool-option.active,
.authorized-slot-drop:hover:not(:disabled),
.authorized-slot-drop.is-filled {
  border-color: #0078d4;
  color: #005a9e;
  background: #deecf9;
  box-shadow: var(--fluent-shadow-medium);
}

.authorized-choice.is-correct-answer,
.authorized-choice.is-correct-answer:hover,
.authorized-slot-drop.is-correct,
.authorized-order-slot.is-correct {
  border-color: #107c10;
  color: #107c10;
  background: #dff6dd;
}

.authorized-choice.is-incorrect-answer,
.authorized-choice.is-incorrect-answer:hover,
.authorized-slot-drop.is-incorrect,
.authorized-order-slot.is-incorrect {
  border-color: #e81123;
  color: #a4262c;
  background: #fde7e9;
}

.authorized-correct-answer {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #f3f9fd;
}

.practice-state-notice,
.practice-timer-bar,
.analytics-filter-panel,
.analytics-panel,
.settings-plan-panel,
.admin-action,
.contextual-gloss-filter,
.contextual-gloss-detail,
.activation-card,
.access-dialog {
  border-color: #e1e1e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--fluent-shadow-small);
}

.practice-timer-bar.is-running,
.practice-timer-bar.is-finished,
.practice-timer-bar.is-locked {
  border-color: #c7e0f4;
  background: #f7fbff;
}

.study-session-head,
.study-decision {
  border-color: #e1e1e1;
  background: rgba(255, 255, 255, 0.72);
}

.study-hidden-answer {
  border-color: #c7e0f4;
  background: #f7fbff;
}

.button.study-choice.unknown {
  border-color: #f4c7cc;
  color: #a4262c;
  background: #fde7e9;
}

.button.study-choice.unknown:hover {
  border-color: #e81123;
  color: #a4262c;
  background: #fbd7da;
}

.button.study-choice.known {
  border-color: #0078d4;
  background: #0078d4;
}

.button.study-choice.known:hover {
  border-color: #106ebe;
  background: #106ebe;
}

/* Activation code administration ----------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.activation-code-workspace {
  display: grid;
  grid-template-columns: minmax(272px, 0.76fr) minmax(0, 1.44fr);
  align-items: start;
  gap: 18px;
}

.activation-code-create,
.activation-code-list-panel {
  min-width: 0;
  overflow: hidden;
}

.activation-code-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 18px;
}

.activation-code-form .field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.activation-code-form .field > span {
  color: #605e5c;
  font-size: 12px;
  font-weight: 700;
}

.activation-code-form .field em {
  margin-left: 4px;
  color: #a19f9d;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.activation-code-form .field small {
  color: #605e5c;
  font-size: 11px;
  line-height: 1.5;
}

.activation-code-field-wide {
  grid-column: 1 / -1;
}

.activation-code-form .button {
  width: fit-content;
  min-height: 38px;
}

.activation-code-form .form-note {
  grid-column: 1 / -1;
  min-height: 0;
  margin: -3px 0 0;
}

.activation-code-reveal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #c7e0f4;
  padding: 15px 18px;
  background: #f3f9fd;
}

.activation-code-reveal > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.activation-code-reveal span,
.activation-code-reveal small {
  color: #605e5c;
  font-size: 11px;
}

.activation-code-reveal code,
.activation-code-primary code {
  overflow-wrap: anywhere;
  color: #005a9e;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.activation-code-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.activation-code-list-head > div {
  min-width: 0;
}

.activation-code-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.activation-code-filter select {
  min-height: 32px;
  border: 1px solid #8a8886;
  border-radius: 4px;
  padding: 5px 7px;
  color: #323130;
  background: #ffffff;
  font: inherit;
  font-size: 12px;
}

.activation-code-filter select:focus {
  border-color: #0078d4;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.24);
}

.activation-code-rows {
  display: grid;
}

.activation-code-row {
  display: grid;
  grid-template-columns: minmax(155px, 1.4fr) minmax(82px, 0.62fr) minmax(100px, 0.72fr) minmax(112px, 0.74fr) minmax(114px, 0.8fr);
  align-items: center;
  gap: 13px;
  border-top: 1px solid #e1e1e1;
  padding: 15px 18px;
  background: #ffffff;
}

.activation-code-row:hover {
  background: #f8fbfd;
}

.activation-code-primary,
.activation-code-meta,
.activation-code-status {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.activation-code-primary > span,
.activation-code-meta > span,
.activation-code-meta small,
.activation-code-mask-note {
  overflow: hidden;
  color: #605e5c;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-code-primary code:not(.is-revealed) {
  color: #323130;
}

.activation-code-meta strong {
  display: grid;
  gap: 2px;
  color: #323130;
  font-size: 13px;
  font-weight: 700;
}

.activation-code-meta strong small {
  font-weight: 500;
}

.activation-code-status {
  justify-items: start;
}

.activation-code-status .tag {
  width: fit-content;
  margin: 0;
}

.activation-code-copy {
  width: fit-content;
  padding: 0;
  color: #0078d4;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.activation-code-copy:hover {
  color: #005a9e;
  text-decoration: underline;
}

.activation-code-status .button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.activation-code-state {
  display: grid;
  gap: 5px;
  min-height: 180px;
  place-content: center;
  padding: 22px;
  color: #605e5c;
  text-align: center;
}

.activation-code-state strong {
  color: #323130;
}

.activation-code-state span {
  font-size: 13px;
}

.activation-code-state.error {
  color: #a4262c;
}

.activation-code-state.error strong {
  color: #a4262c;
}

@media (max-width: 1050px) {
  .activation-code-workspace {
    grid-template-columns: 1fr;
  }

  .activation-code-create {
    max-width: none;
  }
}

@media (max-width: 800px) {
  .activation-code-row {
    grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(106px, 0.65fr));
  }

  .activation-code-status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
  }
}

@media (max-width: 620px) {
  .activation-code-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .activation-code-filter {
    justify-content: flex-start;
    width: 100%;
  }

  .activation-code-form {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .activation-code-field-wide,
  .activation-code-form .form-note {
    grid-column: auto;
  }

  .activation-code-form .button {
    width: 100%;
  }

  .activation-code-reveal {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 15px;
  }

  .activation-code-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    padding: 14px 15px;
  }

  .activation-code-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .authorized-choice,
  .authorized-pool-option,
  .authorized-slot-drop,
  .section-button,
  .practice-passage-tab {
    box-shadow: none;
  }
}

/* Compact app navigation ----------------------------------------------------
   The menu deliberately replaces the previous persistent sidebar. It leaves
   the learning surface wide on desktop and keeps the phone header to one row. */
.app-shell:not(.practice-shell) {
  display: block;
  min-height: 100vh;
}

.app-shell:not(.practice-shell) .main-area {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: 52px;
  padding: 0 clamp(14px, 3vw, 34px);
  border-bottom: 1px solid #d2d0ce;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(18px);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.topbar-leading {
  flex: 0 1 auto;
}

.topbar-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.topbar .brand {
  flex: 0 0 auto;
  gap: 8px;
  font-size: 15px;
}

.topbar .brand-mark {
  width: 27px;
  height: 27px;
}

.topbar .brand-logo {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  border-radius: 8px;
}

.app-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.app-menu-button,
.account-avatar-button {
  display: inline-grid;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid #d2d0ce;
  border-radius: 4px;
  padding: 0;
  color: #323130;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--fluent-shadow-small);
  transition: transform 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.app-menu-button:hover,
.account-avatar-button:hover {
  border-color: #0078d4;
  color: #005a9e;
  background: #f3f9fd;
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-0.5px);
}

.app-menu-button > span {
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.account-avatar-button {
  overflow: hidden;
  border-radius: 50%;
}

.account-avatar-button .avatar {
  width: 32px;
  height: 32px;
  border: 0;
  transition: transform 150ms ease-out, background 150ms ease-out;
}

.account-avatar-button:hover .avatar {
  background: #106ebe;
  transform: scale(1.05);
}

.app-menu-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(50, 49, 48, 0.18);
}

.app-menu-panel {
  position: fixed;
  z-index: 61;
  top: 8px;
  left: 8px;
  width: min(304px, calc(100vw - 16px));
  overflow: hidden;
  border: 1px solid rgba(210, 208, 206, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--fluent-shadow-large);
  backdrop-filter: blur(22px);
}

.app-menu-panel > header {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1e1e1;
  padding: 0 10px 0 15px;
  color: #323130;
}

.app-menu-panel > header strong {
  font-size: 14px;
  font-weight: 650;
}

.app-menu-panel > header .icon-button {
  width: 30px;
  height: 30px;
}

.app-menu-list {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.app-menu-list .nav-item {
  min-height: 42px;
  justify-content: flex-start;
  border-color: transparent;
  padding: 9px 10px;
  font-size: 14px;
}

.app-menu-list .nav-item::before {
  width: 23px;
  margin-right: 10px;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.app-menu-list .nav-item.active {
  border-color: #c7e0f4;
}

@media (max-width: 860px) {
  .topbar {
    gap: 10px;
  }

  .topbar .global-search-wrap {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    margin: 0;
  }

  .topbar:has(.global-search-wrap) {
    flex-wrap: wrap;
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topbar:has(.global-search-wrap) .global-search-wrap {
    margin-top: -1px;
  }

  .topbar:has(.global-search-wrap) .global-search {
    min-height: 34px;
  }

  .topbar:has(.global-search-wrap) .global-search-input {
    min-height: 34px;
  }

  .crumb {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 50px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .topbar-leading,
  .topbar-actions {
    gap: 7px;
  }

  .topbar .brand > span:last-child,
  .crumb,
  .account-text,
  .account-menu > .button.secondary.small {
    display: none;
  }

  .topbar .brand-mark {
    width: 26px;
    height: 26px;
  }

  .topbar .brand-logo {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 8px;
  }

  .app-menu-button,
  .account-avatar-button {
    min-width: 32px;
    min-height: 32px;
  }

  .account-avatar-button .avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .topbar .exam-countdown {
    display: none;
  }

  .access-notice {
    min-height: 42px;
    gap: 9px;
    padding: 7px 12px;
    font-size: 11px;
  }

  .access-notice .button {
    min-height: 29px;
    padding: 5px 8px;
    font-size: 11px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover,
  .practice-module-card:hover,
  .practice-app-module:hover {
    transform: translateY(-0.5px);
  }
}

.speech-settings-panel {
  grid-column: 1 / -1;
}

.speech-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 15px 18px;
}

.speech-settings-form .field {
  min-width: 0;
}

.speech-rate-field {
  grid-column: 1 / -1;
}

.speech-rate-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
}

.speech-rate-control input[type="range"] {
  width: 100%;
  accent-color: #0078d4;
}

.speech-rate-control output {
  color: #005a9e;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.settings-form-note {
  grid-column: 1 / -1;
  margin: -3px 0 0;
  color: #605e5c;
  font-size: 12px;
  line-height: 1.55;
}

.speech-settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  grid-column: 1 / -1;
  gap: 9px;
}

.speech-settings-actions .button {
  min-width: 126px;
}

@media (max-width: 620px) {
  .speech-settings-form {
    grid-template-columns: 1fr;
  }

  .speech-rate-field,
  .settings-form-note,
  .speech-settings-actions {
    grid-column: auto;
  }

  .speech-settings-actions {
    justify-content: stretch;
  }

  .speech-settings-actions .button {
    flex: 1 1 0;
    min-width: 0;
  }

  .vocabulary-library-search {
    align-items: stretch;
    flex-direction: column;
  }

  .vocabulary-library-search .button {
    width: 100%;
  }

  .vocabulary-library-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .vocabulary-library-pagination > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocabulary-library-pagination .button {
    width: 100%;
  }
}

/* Contextual glosses use a small lower-half marker stroke. It sits behind the
   letters without adding height to the ruby annotation or changing wrapping. */
.app-shell[data-annotation-highlight="yellow"] {
  --annotation-highlight-fill: #f4d96f;
  --annotation-highlight-fill-active: #e9c84c;
}

.app-shell[data-annotation-highlight="mint"] {
  --annotation-highlight-fill: #abdcb9;
  --annotation-highlight-fill-active: #8fcfa3;
}

.app-shell[data-annotation-highlight="blue"] {
  --annotation-highlight-fill: #abd8ef;
  --annotation-highlight-fill-active: #87c4e4;
}

.app-shell[data-annotation-highlight="rose"] {
  --annotation-highlight-fill: #f1bbc7;
  --annotation-highlight-fill-active: #e69baa;
}

.app-shell[data-annotation-highlight="lavender"] {
  --annotation-highlight-fill: #cfbeea;
  --annotation-highlight-fill-active: #b49eda;
}

.reading-annotation-group,
.practice-inline-annotation {
  --contextual-note-fill: var(--annotation-highlight-fill, #f4d96f);
  --contextual-note-fill-active: var(--annotation-highlight-fill-active, #e9c84c);
  --contextual-note-ink: #323130;
}

.reading-annotation-group:not(.gloss-hidden) .content-word,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token {
  position: relative;
  z-index: 0;
  isolation: isolate;
  border: 0;
  padding: 0 0.06em;
  color: var(--contextual-note-ink);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.reading-annotation-group:not(.gloss-hidden) .content-word::before,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token::before {
  position: absolute;
  z-index: -1;
  right: -0.1em;
  bottom: 0.62em;
  left: -0.1em;
  height: 0.52em;
  border-radius: 0.48em 0.66em 0.5em 0.62em;
  background: var(--contextual-note-fill);
  content: "";
  pointer-events: none;
  transform: rotate(-0.35deg);
  transition: background 150ms ease-out, transform 150ms ease-out;
}

.reading-annotation-group.active,
.reading-annotation-group.active .content-word,
.reading-annotation-group:not(.gloss-hidden) .content-word:hover,
.reading-annotation-group:not(.gloss-hidden) .content-word:focus-visible,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token:hover,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token:focus-visible {
  color: #005a9e;
  background: transparent;
}

.reading-annotation-group.active .content-word::before,
.reading-annotation-group:not(.gloss-hidden) .content-word:hover::before,
.reading-annotation-group:not(.gloss-hidden) .content-word:focus-visible::before,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token:hover::before,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token:focus-visible::before {
  background: var(--contextual-note-fill-active);
  transform: rotate(-0.35deg) scaleY(1.06);
}

.reading-annotation-group:not(.gloss-hidden) .content-word:focus-visible,
.practice-inline-annotation:not(.is-hidden) .practice-annotation-token:focus-visible {
  outline: 2px solid #0078d4;
  outline-offset: 2px;
}

.reading-annotation-group.gloss-hidden .content-word,
.practice-inline-annotation.is-hidden .practice-annotation-token {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}

.annotation-highlight-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.annotation-highlight-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.annotation-highlight-trigger-swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 1px solid rgba(50, 49, 48, 0.16);
  border-radius: 50%;
  background: var(--annotation-swatch);
  box-shadow: inset 0 -2px 0 rgba(50, 49, 48, 0.08);
}

.annotation-highlight-palette {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 24px);
  gap: 5px;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--fluent-shadow-medium);
  backdrop-filter: blur(14px);
}

.annotation-highlight-swatch {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  padding: 3px;
  background: transparent;
}

.annotation-highlight-swatch > span {
  display: block;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(50, 49, 48, 0.16);
  border-radius: 50%;
  background: var(--annotation-swatch);
  box-shadow: inset 0 -2px 0 rgba(50, 49, 48, 0.08);
}

.annotation-highlight-swatch:hover,
.annotation-highlight-swatch:focus-visible,
.annotation-highlight-swatch.selected {
  border-color: #0078d4;
  background: #deecf9;
}

@media (max-width: 620px) {
  .annotation-highlight-palette {
    right: auto;
    left: 0;
  }
}

/* Feedback -----------------------------------------------------------------
   The entry stays beside the account controls so it is always reachable
   without competing with the home-page learning actions. */
.feedback-trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #8a8886;
  border-radius: 4px;
  padding: 6px 10px;
  color: #323130;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--fluent-shadow-small);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: transform 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.feedback-trigger:hover {
  border-color: #0078d4;
  color: #005a9e;
  background: #f3f9fd;
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-0.5px);
}

.feedback-trigger:active {
  transform: translateY(0) scale(0.97);
}

.feedback-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(50, 49, 48, 0.28);
}

.feedback-dialog {
  width: min(100%, 560px);
  max-height: min(720px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid rgba(225, 225, 225, 0.96);
  border-radius: 8px;
  padding: 22px;
  color: #323130;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--fluent-shadow-large);
  backdrop-filter: blur(18px);
}

.feedback-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
}

.feedback-dialog-head .study-kicker {
  display: inline-block;
  margin-bottom: 5px;
}

.feedback-dialog-head h2 {
  margin: 0;
  color: #323130;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 21px;
  line-height: 1.32;
}

.feedback-dialog > p {
  margin: 0 0 19px;
  color: #605e5c;
  font-size: 13px;
  line-height: 1.6;
}

.feedback-form {
  display: grid;
  gap: 0;
}

.feedback-form .field {
  margin-bottom: 14px;
}

.feedback-form textarea {
  min-height: 144px;
}

.feedback-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 2px;
}

.feedback-dialog-actions .button {
  min-width: 92px;
}

.feedback-admin-filter-panel {
  margin-bottom: 15px;
}

.feedback-admin-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: 14px 18px 16px;
}

.feedback-admin-filter label {
  display: grid;
  min-width: 144px;
  gap: 5px;
  color: #605e5c;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 650;
}

.feedback-admin-filter select,
.admin-feedback-update-form select {
  min-height: 36px;
  border: 1px solid #8a8886;
  border-radius: 4px;
  padding: 7px 9px;
  color: #323130;
  background: #ffffff;
}

.feedback-admin-list {
  display: grid;
  gap: 12px;
}

.feedback-admin-state {
  display: grid;
  gap: 4px;
  padding: 22px;
  color: #605e5c;
}

.feedback-admin-state strong {
  color: #323130;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
}

.feedback-admin-state.error {
  border-color: #f4c7cc;
  color: #a4262c;
  background: #fff7f8;
}

.feedback-admin-state.error strong {
  color: #a4262c;
}

.admin-feedback-card {
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  color: #323130;
  background: #ffffff;
  box-shadow: var(--fluent-shadow-small);
  transition: transform 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.admin-feedback-card:hover {
  border-color: #c7e0f4;
  box-shadow: var(--fluent-shadow-medium);
  transform: translateY(-1px);
}

.admin-feedback-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e1e1e1;
  padding: 17px 18px 14px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-feedback-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-feedback-card-head h2 {
  margin: 0;
  color: #323130;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.42;
}

.admin-feedback-card-head p,
.admin-feedback-updated {
  margin: 5px 0 0;
  color: #605e5c;
  font-size: 12px;
  line-height: 1.5;
}

.admin-feedback-updated {
  flex: 0 0 auto;
  margin-top: 2px;
  text-align: right;
}

.admin-feedback-content {
  min-height: 64px;
  padding: 16px 18px;
  color: #323130;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-feedback-update-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px 16px;
  border-top: 1px solid #e1e1e1;
  padding: 15px 18px 17px;
  background: #fafafa;
}

.admin-feedback-update-form .field {
  min-width: 0;
  margin: 0;
}

.admin-feedback-update-form .field textarea {
  min-height: 76px;
}

.admin-feedback-update-actions {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-feedback-update-actions > span {
  min-width: 0;
  overflow: hidden;
  color: #605e5c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .feedback-trigger {
    min-width: 32px;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .feedback-backdrop {
    align-items: end;
    padding: 10px;
  }

  .feedback-dialog {
    max-height: calc(100dvh - 20px);
    border-radius: 6px;
    padding: 18px 15px;
  }

  .feedback-dialog-head h2 {
    font-size: 19px;
  }

  .feedback-dialog-actions .button {
    flex: 1 1 0;
  }

  .feedback-admin-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 13px;
  }

  .feedback-admin-filter label {
    min-width: 0;
  }

  .feedback-admin-filter .button {
    width: 100%;
  }

  .admin-feedback-card-head {
    display: grid;
    gap: 7px;
    padding: 15px 14px 12px;
  }

  .admin-feedback-updated {
    margin: 0;
    text-align: left;
  }

  .admin-feedback-content {
    padding: 14px;
  }

  .admin-feedback-update-form {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .admin-feedback-update-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-feedback-update-actions > span {
    white-space: normal;
  }

  .admin-feedback-update-actions .button {
    width: 100%;
  }
}

/* Submitted reading analyses stay visually attached to their question without
   turning the answer pane into a stack of nested cards. */
.authorized-answer-card > header > .authorized-result-tags {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.practice-question-type,
.practice-analysis-type {
  border-color: #c7e0f4;
  color: #005a9e;
  background: #deecf9;
  white-space: nowrap;
}

.authorized-question-analysis {
  display: grid;
  gap: 11px;
  margin-top: 14px;
  border-top: 1px solid #c7e0f4;
  padding: 13px 2px 1px;
}

.authorized-question-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #005a9e;
  font-size: 12px;
  font-weight: 700;
}

.practice-analysis-type {
  border: 1px solid #c7e0f4;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 650;
}

.authorized-analysis-correct,
.authorized-analysis-distractors {
  display: grid;
  gap: 5px;
}

.authorized-analysis-correct > strong,
.authorized-analysis-distractors > strong {
  color: #323130;
  font-size: 13px;
  font-weight: 700;
}

.authorized-analysis-correct > p,
.authorized-analysis-distractors p {
  margin: 0;
  color: #605e5c;
  font-size: 13px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.authorized-analysis-distractors ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.authorized-analysis-distractors li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.authorized-analysis-distractors li > span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #d1d1d1;
  border-radius: 50%;
  color: #605e5c;
  background: #ffffff;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  font-weight: 700;
}

/* On a phone the paper controls need their own row.  Keeping them beside the
   title makes the fixed-width buttons win the flex calculation and can shrink
   the title column to zero, which in turn turns the paper heading vertical. */
@media (max-width: 900px) {
  .authorized-practice-workspace .authorized-paper-pane .authorized-pane-title-row {
    display: block;
    min-width: 0;
  }

  .authorized-practice-workspace .authorized-paper-pane .authorized-pane-title-copy {
    width: 100%;
    min-width: 0;
  }

  .authorized-practice-workspace .authorized-paper-pane .authorized-paper-controls {
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    justify-content: flex-start;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .authorized-practice-workspace .authorized-paper-pane .authorized-pane-title-row {
    display: block;
  }

  .authorized-practice-workspace .authorized-paper-pane .authorized-paper-controls {
    justify-content: flex-start;
    margin-top: 10px;
  }
}

@media (max-width: 620px) {
  .authorized-practice-workspace .authorized-paper-pane .authorized-paper-controls {
    gap: 5px;
  }

  .authorized-practice-workspace .authorized-paper-pane .authorized-paper-controls .button {
    min-height: 29px;
    padding: 5px 7px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .authorized-answer-card > header > .authorized-result-tags {
    justify-content: flex-start;
  }

  .authorized-question-analysis {
    margin-top: 12px;
    padding-top: 12px;
  }

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

/* Home study desk ----------------------------------------------------------
   The home page is deliberately quieter than a marketing landing page: one
   clear starting action, generous whitespace, and a restrained blue-grey
   palette keep attention on returning to study. */
.home-page {
  max-width: 1180px;
  padding-top: 46px;
  padding-bottom: 54px;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 28px;
  border-bottom: 1px solid #ccd7dd;
  padding: 10px 0 42px;
}

.home-intro-copy {
  max-width: 650px;
}

.home-kicker {
  margin: 0 0 14px;
  color: #54717f;
  font-size: 12px;
  font-weight: 700;
}

.home-intro h1 {
  margin: 0;
  color: #17313f;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 38px;
  font-weight: 650;
  line-height: 1.22;
}

.home-intro-copy > p:last-child {
  max-width: 520px;
  margin: 14px 0 0;
  color: #617781;
  font-size: 15px;
  line-height: 1.75;
}

.home-access-button {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: -8px;
}

.home-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr) minmax(220px, 0.85fr);
  grid-template-areas:
    "study reading practice"
    "study analytics analytics";
  gap: 14px;
  margin-top: 28px;
}

.home-action {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 174px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  overflow: hidden;
  border: 1px solid #cbd7dd;
  border-radius: 6px;
  padding: 22px 23px;
  color: #17313f;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  text-align: left;
  backdrop-filter: blur(14px);
}

.home-action-study {
  grid-area: study;
  min-height: 362px;
  border-color: #91afbd;
  background: #edf4f6;
}

.home-action-reading {
  grid-area: reading;
}

.home-action-practice {
  grid-area: practice;
}

.home-action-analytics {
  grid-area: analytics;
  min-height: 174px;
  background: #f6f9fa;
}

.home-action-index {
  color: #72909c;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1;
}

.home-action-study .home-action-index {
  color: #25596d;
}

.home-action-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.home-action-copy small {
  color: #667f8b;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 11px;
  font-weight: 650;
}

.home-action-copy strong {
  color: #17313f;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.2;
}

.home-action-study .home-action-copy strong {
  font-size: 31px;
}

.home-action-copy em {
  max-width: 34ch;
  color: #667983;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 13px;
  font-style: normal;
  line-height: 1.65;
}

.home-action-arrow {
  position: absolute;
  right: 22px;
  bottom: 19px;
  color: #73909b;
  font-family: "Times New Roman", Times, serif;
  font-size: 23px;
  line-height: 1;
  transition: transform 150ms ease-out, color 150ms ease-out;
}

.home-admin-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  border-top: 1px solid #ccd7dd;
  padding-top: 18px;
}

.home-admin-strip > span {
  color: #6d8791;
  font-size: 11px;
  font-weight: 700;
}

.home-admin-strip > p {
  flex: 1;
  margin: 0;
  color: #667983;
  font-size: 13px;
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover {
    border-color: #86a8b7;
    color: #17313f;
    background: #ffffff;
    box-shadow: 0 9px 20px rgba(34, 67, 82, 0.1);
    transform: translateY(-1px);
  }

  .home-action:hover .home-action-arrow {
    color: #1f617b;
    transform: translateX(4px);
  }
}

@media (max-width: 960px) {
  .home-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "study study"
      "reading practice"
      "analytics analytics";
  }

  .home-action-study {
    min-height: 258px;
  }
}

@media (max-width: 620px) {
  .home-page {
    padding-top: 24px;
    padding-bottom: 34px;
  }

  .home-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-bottom: 28px;
  }

  .home-intro h1 {
    font-size: 30px;
  }

  .home-workbench {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "study"
      "reading"
      "practice"
      "analytics";
    gap: 10px;
    margin-top: 20px;
  }

  .home-action,
  .home-action-study,
  .home-action-analytics {
    min-height: 164px;
    padding: 18px;
  }

  .home-action-study .home-action-copy strong {
    font-size: 27px;
  }

  .home-admin-strip {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 9px 12px;
    margin-top: 20px;
  }

  .home-admin-strip > p {
    flex-basis: calc(100% - 110px);
  }
}

/* Graphite study desk ------------------------------------------------------
   Neutral graphite carries the interface; cool silver and muted champagne
   remain reserved for navigation and emphasis. */
:root {
  --ink: #242b31;
  --muted: #626d76;
  --line: #d2d8dd;
  --paper: #edf0f2;
  --surface: #fbfcfc;
  --soft: #e4e8eb;
  --teal: #3c454d;
  --teal-dark: #252c32;
  --mint: #d0d7dc;
  --blue: #627886;
  --yellow: #a78861;
  --coral: #a74747;
  --danger: #a74747;
  --earth: #8e7961;
  --rain: #70808a;
  --moss: #3c454d;
  --marble: #fbfcfc;
  --fluent-blue-active: #252c32;
  --fluent-shadow-small: 0 2px 5px rgba(31, 40, 47, 0.07), 0 1px 1px rgba(31, 40, 47, 0.04);
  --fluent-shadow-medium: 0 7px 16px rgba(31, 40, 47, 0.1), 0 2px 4px rgba(31, 40, 47, 0.05);
  --fluent-shadow-large: 0 14px 30px rgba(31, 40, 47, 0.13), 0 4px 8px rgba(31, 40, 47, 0.06);
}

html,
body,
.main-area,
.app-shell {
  color: var(--ink);
  background: var(--paper);
}

::selection {
  color: #ffffff;
  background: var(--moss);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline-color: var(--moss);
  box-shadow: 0 0 0 2px #fafaf6, 0 0 0 4px var(--moss);
}

.field input,
.field select,
.field textarea,
.search-input,
.global-search,
.practice-focus-select select,
.practice-app-exam-select select,
.analytics-date-form input,
.practice-duration-field input {
  border-color: #aebbae;
  background: #fcfcf8;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus,
.practice-focus-select select:focus,
.practice-app-exam-select select:focus,
.analytics-date-form input:focus,
.practice-duration-field input:focus,
.global-search:focus-within {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(49, 91, 70, 0.18);
}

.button {
  border-color: var(--moss);
  color: #ffffff;
  background: var(--moss);
  box-shadow: var(--fluent-shadow-small);
}

.button:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  box-shadow: var(--fluent-shadow-medium);
}

.button:active {
  border-color: #183326;
  background: #183326;
}

.button.secondary {
  border-color: #aebbae;
  color: #365448;
  background: #fafaf6;
}

.button.secondary:hover {
  border-color: #779586;
  color: #234735;
  background: #edf2ea;
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

.button.danger:hover {
  border-color: #8e332c;
  background: #8e332c;
}

.text-button,
.task-time,
.pos,
.eyebrow {
  color: var(--moss);
}

.sidebar {
  border-right-color: #cbd3c8;
  background: rgba(247, 248, 242, 0.88);
  box-shadow: 1px 0 0 rgba(39, 55, 44, 0.03);
}

.topbar {
  border-bottom-color: #cbd3c8;
  background: rgba(249, 250, 245, 0.9);
}

.sidebar .brand,
.brand {
  color: var(--ink);
}

.sidebar .brand-mark,
.brand-mark {
  border-color: var(--moss);
  color: var(--moss);
  background: #fafaf6;
}

.avatar {
  background: var(--moss);
}

.nav-item {
  color: #55685b;
}

.nav-item:hover,
.nav-item.active {
  border-color: #b8cbb9;
  color: var(--teal-dark);
  background: #e4ebe1;
}

.global-search {
  background: rgba(252, 252, 248, 0.94);
}

.global-search-submit {
  border-left-color: #cbd3c8;
  color: #365448;
  background: #edf2ea;
}

.global-search-submit:hover {
  color: #ffffff;
  background: var(--moss);
}

.global-search-popover,
.word-lookup-dialog,
.study-menu,
.practice-focus-controls {
  border-color: #cbd3c8;
  background: rgba(250, 250, 246, 0.96);
  box-shadow: var(--fluent-shadow-large);
}

.access-notice {
  border-bottom-color: #b8cbb9;
  color: #365448;
  background: #e4ebe1;
}

.page-heading h1,
.home-heading h1,
.auth-card h2,
.reading-masthead h2,
.reading-note-head h2,
.reading-note-empty h2 {
  color: var(--ink);
}

.panel,
.stat-grid,
.practice-module-card,
.practice-app-module,
.study-round-card,
.word-lookup-context,
.word-lookup-provenance,
.reading-note-context,
.reading-note-provenance {
  border-color: #cbd3c8;
  background: var(--marble);
  box-shadow: var(--fluent-shadow-small);
}

.panel-head,
.stat-grid .stat,
.authorized-pane-heading {
  border-color: #cbd3c8;
}

.panel-head {
  background: #f4f5ef;
}

.tag,
.study-kicker,
.word-study-meta span,
.study-round-result {
  border-color: #b8cbb9;
  color: #365448;
  background: #e4ebe1;
}

.tag.yellow,
.word-study-meta .word-priority-tag {
  border-color: #d7c5a4;
  color: #6f542e;
  background: #f3ecdd;
}

.dictionary-definition-details,
.rare-sense,
.example,
.reading-root,
.reading-note-disclaimer {
  border-color: #d4dad1;
  background: #f4f5ef;
}

.dictionary-definition-details summary,
.reading-root strong {
  color: #365448;
}

.reading-tag {
  color: #365448;
  background: #e4ebe1;
}

.reading-masthead,
.reading-note-head {
  border-bottom-color: #bfd0c1;
  background: #f2f5ef;
}

.reading-masthead .eyebrow,
.reading-note-kicker,
.reading-note-meaning span,
.reading-note-candidates > span,
.reading-note-dictionary > span,
.reading-paragraph-number {
  color: var(--moss);
}

.reading-column-head {
  border-bottom-color: #bfd0c1;
  color: #365448;
  background: #e2eae1;
}

.reading-column-head > span + span,
.reading-translation {
  border-left-color: #bfd0c1;
}

.reading-translation {
  background: #f6f7f2;
}

.reading-outline-button:hover,
.reading-annotation-group.active,
.reading-annotation-group .content-word:hover,
.reading-annotation-group .content-word:focus-visible {
  color: #234735;
  background: #e4ebe1;
}

.reading-annotation-group .content-word {
  text-decoration-color: var(--moss);
}

.reading-token-gloss,
.reading-annotation-group.active .reading-token-gloss {
  color: #365448;
}

.home-page {
  max-width: 1180px;
}

.home-intro {
  border-bottom-color: #bfc8bd;
}

.home-kicker {
  color: var(--rain);
}

.home-intro h1 {
  color: var(--ink);
}

.home-intro-copy > p:last-child {
  color: #617166;
}

.home-action {
  border-color: #c4cec3;
  color: var(--ink);
  background: #f8f8f4;
  box-shadow: 0 1px 2px rgba(39, 55, 44, 0.04);
  backdrop-filter: none;
}

.home-action-study {
  border-color: #9baf9a;
  background: #e5ece2;
}

.home-action-reading {
  background: #f7f7f2;
}

.home-action-practice {
  background: #f6f4ef;
}

.home-action-analytics {
  background: #edf1ed;
}

.home-action-index {
  color: var(--earth);
}

.home-action-study .home-action-index {
  color: var(--moss);
}

.home-action-copy small {
  color: var(--rain);
}

.home-action-copy strong {
  color: var(--ink);
}

.home-action-copy em,
.home-admin-strip > p {
  color: #607065;
}

.home-action-arrow {
  color: var(--rain);
}

.home-admin-strip {
  border-top-color: #bfc8bd;
}

.home-admin-strip > span {
  color: var(--earth);
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover {
    border-color: #819b83;
    color: var(--ink);
    background: #fcfcf8;
    box-shadow: 0 10px 24px rgba(39, 55, 44, 0.1);
    transform: translateY(-1px);
  }

  .home-action:hover .home-action-arrow {
    color: var(--moss);
  }
}

/* Home workspace: one real starting point, then three quieter destinations. */
.home-page {
  max-width: 1220px;
  padding-top: clamp(32px, 5vw, 68px);
  padding-bottom: clamp(38px, 6vw, 76px);
}

.site-announcement {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 clamp(24px, 3vw, 34px);
  border: 1px solid #c4cec3;
  border-radius: 8px;
  padding: 14px 15px 14px 17px;
  color: #294135;
  background: rgba(247, 248, 244, 0.84);
  box-shadow: 0 5px 16px rgba(40, 55, 45, 0.055);
}

.site-announcement-copy {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.site-announcement-copy > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #f7faf6;
  background: #456c55;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.site-announcement-copy > p {
  margin: 0;
  color: #44584b;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.site-announcement-close {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  margin: -3px -3px -3px 0;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #5d7162;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

.site-announcement-close:hover {
  border-color: #b9c7b9;
  color: #284936;
  background: #edf2ea;
  transform: scale(1.01);
}

.site-announcement-close:active {
  transform: scale(0.97);
}

.site-announcement-close:focus-visible {
  outline: 2px solid #315b46;
  outline-offset: 2px;
}

.home-intro {
  gap: 22px;
  border-bottom: 0;
  padding: 0;
}

.home-intro-copy {
  max-width: 690px;
}

.home-kicker {
  margin-bottom: 17px;
  font-size: 11px;
  letter-spacing: 0;
}

.home-intro h1 {
  max-width: 12ch;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 650;
  line-height: 1.16;
  text-wrap: balance;
}

.home-intro-copy > p:last-child {
  max-width: 42ch;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.8;
}

.home-access-button {
  margin-top: 2px;
}

.admin-announcement-field {
  margin-top: 22px;
}

.admin-announcement-field textarea {
  min-height: 102px;
  resize: vertical;
}

.home-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "study"
    "reading"
    "practice"
    "analytics";
  gap: 12px;
  margin-top: clamp(34px, 5vw, 54px);
}

.home-action {
  min-height: 190px;
  gap: 20px;
  border: 1px solid #c4cec3;
  border-radius: 8px;
  padding: 22px;
  color: var(--ink);
  background: #f8f8f4;
  box-shadow: none;
  text-align: left;
  touch-action: manipulation;
}

.home-action-top {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.home-action-index {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--earth);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
}

.home-action-index b {
  color: currentColor;
  font-family: "Times New Roman", Times, serif;
  font-size: 17px;
  font-weight: 400;
}

.home-action-index i {
  font-style: normal;
  font-weight: 700;
}

.home-action-copy {
  gap: 9px;
}

.home-action-copy small,
.home-action-study-body > small {
  color: var(--rain);
  font-size: 11px;
  font-weight: 700;
}

.home-action-copy strong {
  font-size: clamp(24px, 2.5vw, 29px);
  font-weight: 650;
  line-height: 1.16;
}

.home-action-copy em {
  max-width: 30ch;
  color: #5d6c61;
  font-size: 14px;
  line-height: 1.65;
}

.home-action-arrow {
  position: static;
  flex: 0 0 auto;
  color: var(--rain);
  font-size: 24px;
}

.home-action-route {
  display: block;
  width: 100%;
  padding-top: 13px;
  border-top: 1px solid rgba(86, 111, 94, 0.2);
  color: #617166;
  font-size: 12px;
  line-height: 1.3;
}

.home-action-study {
  min-height: 304px;
  justify-content: space-between;
  border-color: #315b46;
  color: #f8f8f2;
  background: #315b46;
}

.home-action-study .home-action-index,
.home-action-study .home-action-index b,
.home-action-study .home-action-study-body > small,
.home-action-study .home-action-study-footer {
  color: #d9e5d9;
}

.home-action-direction {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f5f7f0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}

.home-action-direction > span {
  font-family: "Times New Roman", Times, serif;
  font-size: 20px;
}

.home-action-study-body {
  display: grid;
  gap: 11px;
  align-self: flex-start;
  max-width: 650px;
}

.home-action-study-body > strong {
  color: #fcfcf7;
  font-size: clamp(35px, 5.1vw, 56px);
  font-weight: 650;
  line-height: 1.06;
}

.home-action-study-body > strong em {
  color: #c9d9c8;
  font-style: normal;
}

.home-action-study-body > span {
  max-width: 32ch;
  color: #dbe5d8;
  font-size: 14px;
  line-height: 1.7;
}

.home-action-study-footer {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
}

.home-action-study-footer > i {
  display: block;
  width: clamp(70px, 16vw, 164px);
  height: 1px;
  background: rgba(231, 240, 229, 0.5);
}

.home-action-reading {
  grid-area: reading;
  background: #f6f7f2;
}

.home-action-practice {
  grid-area: practice;
  background: #f4f1ec;
}

.home-action-analytics {
  grid-area: analytics;
  min-height: 190px;
  background: #eaf0e9;
}

.home-admin-strip {
  margin-top: 34px;
  padding-top: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover {
    border-color: #78927c;
    color: var(--ink);
    background: #fcfcf8;
    box-shadow: 0 12px 27px rgba(39, 55, 44, 0.09);
    transform: translateY(-2px);
  }

  .home-action-study:hover {
    border-color: #234735;
    color: #f8f8f2;
    background: #234735;
    box-shadow: 0 15px 30px rgba(30, 54, 40, 0.17);
  }

  .home-action:hover .home-action-arrow {
    color: var(--moss);
    transform: translateX(4px);
  }

  .home-action-study:hover .home-action-direction > span {
    transform: translateX(4px);
  }
}

@media (min-width: 720px) {
  .home-workbench {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "study study"
      "reading practice"
      "analytics analytics";
    gap: 14px;
  }

  .home-action-study {
    min-height: 330px;
    padding: clamp(28px, 4vw, 44px);
  }

  .home-action:not(.home-action-study) {
    min-height: 236px;
    padding: 24px;
  }
}

@media (max-width: 620px) {
  .site-announcement {
    gap: 10px;
    padding: 13px 10px 13px 14px;
  }

  .site-announcement-copy {
    gap: 9px;
  }

  .site-announcement-copy > p {
    font-size: 13px;
  }
}

@media (min-width: 1080px) {
  .home-workbench {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "study study study"
      "reading practice analytics";
  }

  .home-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }

  .home-access-button {
    flex: 0 0 auto;
    margin-bottom: 3px;
  }

  .home-action-study {
    min-height: 356px;
  }

  .home-action:not(.home-action-study) {
    min-height: 252px;
  }
}

@media (max-width: 619px) {
  .home-page {
    padding-top: 30px;
    padding-bottom: 38px;
  }

  .home-intro h1 {
    max-width: 10ch;
  }

  .home-action-study {
    min-height: 288px;
  }

  .home-action-study-body > strong {
    font-size: 37px;
  }
}

/* Compact premium home ----------------------------------------------------
   The dashboard is a single, complete set of destinations rather than a
   hero followed by oversized cards. */
.main-area {
  background: linear-gradient(142deg, #f7f8f9 0%, #e6e9ec 48%, #f2f4f5 100%);
}

.home-page {
  display: grid;
  min-height: calc(100dvh - 74px);
  grid-template-rows: auto auto;
  align-content: start;
  gap: clamp(18px, 3vw, 32px);
  max-width: 1180px;
  padding-top: clamp(22px, 4vw, 48px);
  padding-bottom: 24px;
}

.home-intro {
  display: flex;
  min-height: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
}

.home-intro-copy {
  min-width: 0;
  max-width: none;
}

.home-kicker {
  display: none;
}

.home-intro h1 {
  max-width: none;
  margin: 0;
  color: #242b31;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: 0;
  text-wrap: initial;
  white-space: nowrap;
}

.home-intro-copy > p:last-child {
  max-width: 48ch;
  margin: 8px 0 0;
  color: #66717a;
  font-size: 14px;
  line-height: 1.55;
}

.home-access-button {
  flex: 0 0 auto;
  min-height: 42px;
  margin: 0 0 1px;
  border-radius: 14px;
}

.home-workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: none;
  gap: 10px;
  margin: 0;
}

.home-action,
.home-action-study,
.home-action-reading,
.home-action-practice,
.home-action-analytics {
  grid-area: auto;
  min-height: 144px;
}

.home-action {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(190, 198, 204, 0.9);
  border-radius: 18px;
  padding: clamp(16px, 3vw, 24px);
  color: #283038;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 239, 241, 0.88));
  box-shadow: 0 8px 20px rgba(38, 46, 53, 0.07);
  text-align: left;
  touch-action: manipulation;
}

.home-action-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.home-action-copy small {
  color: #70808b;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.home-action-copy strong {
  color: #283038;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: clamp(21px, 2.8vw, 27px);
  font-weight: 650;
  line-height: 1.18;
}

.home-action-copy em {
  max-width: 18ch;
  color: #64707a;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.home-action-arrow {
  position: static;
  align-self: flex-end;
  margin-top: auto;
  color: #647987;
  font-family: "Times New Roman", Times, serif;
  font-size: 24px;
  line-height: 1;
}

.home-action-study {
  border-color: #3a434a;
  color: #ffffff;
  background: linear-gradient(145deg, #4b555d 0%, #293139 100%);
  box-shadow: 0 12px 26px rgba(33, 40, 46, 0.18);
}

.home-action-study .home-action-copy small {
  color: #d1dbe1;
}

.home-action-study .home-action-copy strong {
  color: #ffffff;
}

.home-action-study .home-action-copy em {
  color: #e1e8ec;
}

.home-action-study .home-action-arrow {
  color: #d2b17b;
}

.home-action-reading {
  background: linear-gradient(145deg, #ffffff 0%, #e8edf0 100%);
}

.home-action-practice {
  background: linear-gradient(145deg, #f8f8f8 0%, #ebe8e5 100%);
}

.home-action-practice .home-action-arrow {
  color: #927b61;
}

.home-action-analytics {
  background: linear-gradient(145deg, #f7f9fa 0%, #e2e8eb 100%);
}

.home-action-analytics .home-action-arrow {
  color: #788995;
}

.home-admin-strip {
  grid-column: 1 / -1;
  margin-top: 4px;
  border-top-color: #ccd3d8;
  padding-top: 16px;
}

.home-admin-strip > span {
  color: #8e7961;
}

.home-admin-strip > p {
  color: #65707a;
}

@media (hover: hover) and (pointer: fine) {
  .home-action:hover {
    border-color: #aeb8bf;
    color: #283038;
    background: linear-gradient(145deg, #ffffff, #eef1f3);
    box-shadow: 0 13px 26px rgba(38, 46, 53, 0.12);
    transform: translateY(-2px);
  }

  .home-action-study:hover {
    border-color: #252c32;
    color: #ffffff;
    background: linear-gradient(145deg, #525d66 0%, #252c32 100%);
    box-shadow: 0 15px 30px rgba(33, 40, 46, 0.22);
  }

  .home-action:hover .home-action-arrow {
    transform: translateX(4px);
  }
}

@media (min-width: 720px) {
  .home-workbench {
    gap: 14px;
  }

  .home-action,
  .home-action-study,
  .home-action-reading,
  .home-action-practice,
  .home-action-analytics {
    min-height: 176px;
  }
}

@media (min-width: 1080px) {
  .home-page {
    min-height: calc(100dvh - 74px);
  }

  .home-workbench {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-action,
  .home-action-study,
  .home-action-reading,
  .home-action-practice,
  .home-action-analytics {
    min-height: 212px;
  }
}

@media (max-width: 619px) {
  .home-page {
    gap: 18px;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .home-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .home-intro h1 {
    font-size: clamp(27px, 7vw, 33px);
  }

  .home-intro-copy > p:last-child {
    max-width: 32ch;
    margin-top: 6px;
    font-size: 13px;
  }

  .home-access-button {
    min-height: 40px;
  }

  .home-action {
    min-height: 140px;
    border-radius: 16px;
    padding: 16px;
  }

  .home-action-copy strong {
    font-size: 21px;
  }

  .home-action-copy em {
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .home-workbench {
    gap: 8px;
  }

  .home-action {
    min-height: 134px;
    padding: 14px;
    border-radius: 14px;
  }

  .home-action-copy small {
    font-size: 12px;
  }

  .home-action-copy strong {
    font-size: 20px;
  }
}

/* Home-page legal notice ---------------------------------------------------
   Keep the entry quiet on the home screen, while giving the full notice a
   readable, keyboard-dismissible surface on every viewport. */
.home-legal-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(190, 198, 204, 0.82);
  padding-top: 16px;
  color: #6c7881;
  font-size: 12px;
  line-height: 1.5;
}

.home-legal-trigger {
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 12px;
  color: #46545e;
  background: transparent;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, transform 150ms ease-out;
}

.home-legal-trigger:hover {
  border-color: #b8c2c9;
  color: #202a31;
  background: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.home-legal-trigger:active {
  transform: translateY(0) scale(0.97);
}

.home-legal-trigger:focus-visible,
.site-notice-dialog .icon-button:focus-visible {
  outline: 2px solid #3c667b;
  outline-offset: 2px;
}

.site-notice-backdrop {
  position: fixed;
  z-index: 92;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 42, 49, 0.42);
}

.site-notice-dialog {
  width: min(100%, 720px);
  max-height: min(760px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid rgba(196, 204, 210, 0.95);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 30px);
  color: #2b343b;
  background: rgba(250, 251, 252, 0.97);
  box-shadow: 0 24px 58px rgba(26, 34, 40, 0.24);
  backdrop-filter: blur(16px);
}

.site-notice-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.site-notice-kicker {
  display: block;
  margin-bottom: 5px;
  color: #6f808b;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.site-notice-dialog h2 {
  margin: 0;
  color: #202a31;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 650;
  line-height: 1.25;
}

.site-notice-summary {
  max-width: 58ch;
  margin: 13px 0 20px;
  color: #66747d;
  font-size: 14px;
  line-height: 1.7;
}

.site-notice-content {
  display: grid;
  gap: 18px;
}

.site-notice-content section {
  border-top: 1px solid #dce2e5;
  padding-top: 16px;
}

.site-notice-content h3 {
  margin: 0 0 7px;
  color: #33414a;
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.site-notice-content p {
  max-width: 66ch;
  margin: 0;
  color: #55636c;
  font-size: 14px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.site-notice-content p + p {
  margin-top: 9px;
}

.site-notice-dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

@media (max-width: 619px) {
  .home-legal-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
  }

  .home-legal-trigger {
    min-height: 44px;
    padding: 10px 12px;
  }

  .site-notice-backdrop {
    align-items: end;
    padding: 10px;
  }

  .site-notice-dialog {
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
    padding: 20px 16px;
  }

  .site-notice-summary,
  .site-notice-content p {
    font-size: 13px;
  }
}

/* Consolidated learning analytics ---------------------------------------- */
.analytics-filter-panel {
  display: block;
  overflow: hidden;
  border-color: #c9d1d7;
  border-radius: 16px;
  padding: 0;
  background: rgba(252, 253, 254, 0.92);
  box-shadow: 0 8px 20px rgba(38, 46, 53, 0.06);
}

.analytics-filter-panel > summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.analytics-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.analytics-filter-panel > summary:focus-visible {
  outline: 2px solid #5e7a90;
  outline-offset: -4px;
}

.analytics-filter-panel[open] > summary {
  border-bottom: 1px solid #dce2e6;
  background: #f8fafb;
}

.analytics-filter-copy {
  gap: 3px;
}

.analytics-filter-copy strong {
  color: #263038;
  font-size: 14px;
}

.analytics-filter-copy span {
  color: #71808a;
  font-size: 12px;
}

.analytics-filter-disclosure {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #65737d;
  font-size: 12px;
  font-weight: 700;
}

.analytics-filter-disclosure svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  transition: transform 160ms ease;
}

.analytics-filter-panel[open] .analytics-filter-disclosure svg {
  transform: rotate(180deg);
}

.analytics-filter-body {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  align-items: end;
  gap: 14px 18px;
  padding: 16px 18px 18px;
}

.analytics-filter-body .analytics-range-tabs {
  align-self: end;
}

.analytics-filter-body .analytics-date-form {
  grid-column: auto;
}

.analytics-chart-panel {
  overflow: hidden;
  margin-top: 16px;
  border-color: #c7d0d6;
  border-radius: 18px;
  background: rgba(252, 253, 254, 0.94);
  box-shadow: 0 12px 26px rgba(38, 46, 53, 0.07);
}

.analytics-chart-panel > .panel-head {
  min-height: 68px;
  border-bottom: 1px solid #dfe5e9;
  padding: 16px clamp(18px, 3vw, 28px);
}

.analytics-chart-panel > .panel-head h2 {
  color: #263038;
}

.analytics-chart-panel > .panel-head span {
  color: #71808a;
}

.analytics-chart-total {
  flex: 0 0 auto;
  color: #3e5364;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.analytics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-bottom: 1px solid #e4e9ec;
  padding: 12px clamp(18px, 3vw, 28px);
  color: #596872;
  font-size: 12px;
}

.analytics-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.analytics-chart-legend i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.tone-vocab { background: #607d9c; }
.tone-reading { background: #688b80; }
.tone-reading-vocab { background: #b68159; }
.tone-practice { background: #83708f; }
.tone-other { background: #8b949b; }

.analytics-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.analytics-chart-scroll:focus-visible {
  outline: 2px solid #5e7a90;
  outline-offset: -3px;
}

.analytics-chart-canvas {
  position: relative;
  min-width: max(100%, calc(var(--analytics-chart-days) * 58px));
  padding: 20px clamp(18px, 3vw, 28px) 16px;
}

.analytics-chart-guides {
  position: absolute;
  z-index: 0;
  top: 20px;
  right: clamp(18px, 3vw, 28px);
  left: clamp(18px, 3vw, 28px);
  display: flex;
  height: 232px;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.analytics-chart-guides i {
  display: block;
  border-top: 1px solid rgba(162, 177, 188, 0.38);
}

.analytics-chart-columns {
  position: relative;
  z-index: 1;
  display: grid;
  height: 276px;
  grid-template-columns: repeat(var(--analytics-chart-days), minmax(42px, 1fr));
  align-items: stretch;
}

.analytics-chart-day {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 5px;
  padding: 0 8px;
  color: #61707a;
  outline: 0;
  text-align: center;
}

.analytics-chart-day:focus-visible .analytics-chart-stack {
  box-shadow: 0 0 0 2px rgba(94, 122, 144, 0.55);
}

.analytics-chart-stack {
  display: flex;
  min-height: 0;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
  border-radius: 7px 7px 3px 3px;
  padding-top: 1px;
}

.analytics-chart-segment {
  display: block;
  width: 100%;
  min-height: 2px;
  flex: 0 0 auto;
  border-radius: 5px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
}

.analytics-chart-day > span {
  overflow: hidden;
  color: #56646e;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-chart-day > small {
  overflow: hidden;
  color: #8a969e;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-chart-caption {
  margin: 0;
  border-top: 1px solid #e4e9ec;
  padding: 12px clamp(18px, 3vw, 28px) 14px;
  color: #71808a;
  font-size: 12px;
  line-height: 1.5;
}

/* Practice panes --------------------------------------------------------- */
.authorized-practice-workspace .authorized-practice-dual-pane {
  gap: clamp(10px, 1.5vw, 16px);
  box-sizing: border-box;
  padding: clamp(10px, 1.5vw, 16px);
  background: linear-gradient(145deg, #e8ecef, #f3f5f6);
}

.authorized-practice-workspace .authorized-practice-pane {
  box-sizing: border-box;
  border: 1px solid #c7d0d6;
  border-radius: 18px;
  background: #fbfcfc;
  box-shadow: 0 10px 24px rgba(38, 46, 53, 0.08);
}

.authorized-practice-workspace .authorized-answer-pane {
  border: 1px solid #c7d0d6;
  background: #f7f9fa;
}

.authorized-practice-workspace .authorized-pane-heading {
  border-bottom-color: #d9e0e4;
  border-radius: 17px 17px 0 0;
  padding: 20px clamp(20px, 3vw, 34px) 17px;
  background: rgba(252, 253, 254, 0.96);
}

.authorized-practice-workspace .authorized-passage-content,
.authorized-practice-workspace .authorized-order-source {
  padding: 20px clamp(22px, 3vw, 38px) 36px;
}

.authorized-practice-workspace .authorized-answer-card {
  padding: 20px clamp(20px, 3vw, 30px) 22px;
  background: transparent;
}

.authorized-practice-workspace .authorized-choice,
.authorized-practice-workspace .option {
  border-color: #cbd4da;
  border-radius: 14px;
}

.authorized-practice-workspace .authorized-choice-key,
.authorized-practice-workspace .option-key {
  border-color: #aebec8;
}

@media (max-width: 860px) {
  .analytics-filter-body {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analytics-filter-body .analytics-date-form {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .analytics-filter-panel > summary {
    min-height: 58px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .analytics-filter-disclosure {
    gap: 5px;
    font-size: 11px;
  }

  .analytics-filter-body {
    gap: 14px;
    padding: 14px;
  }

  .analytics-chart-panel {
    border-radius: 16px;
  }

  .analytics-chart-panel > .panel-head {
    align-items: flex-start;
    gap: 6px 12px;
    padding: 15px;
  }

  .analytics-chart-total {
    font-size: 13px;
  }

  .analytics-chart-legend {
    gap: 7px 12px;
    padding: 11px 15px;
    font-size: 11px;
  }

  .analytics-chart-canvas {
    min-width: max(100%, calc(var(--analytics-chart-days) * 54px));
    padding: 18px 15px 14px;
  }

  .analytics-chart-guides {
    top: 18px;
    right: 15px;
    left: 15px;
    height: 214px;
  }

  .analytics-chart-columns {
    height: 254px;
    grid-template-columns: repeat(var(--analytics-chart-days), minmax(40px, 1fr));
  }

  .analytics-chart-day {
    padding: 0 7px;
  }

  .analytics-chart-caption {
    padding: 11px 15px 13px;
  }

  .authorized-practice-workspace .authorized-practice-dual-pane {
    gap: 10px;
    padding: 10px;
  }

  .authorized-practice-workspace .authorized-practice-pane {
    border-radius: 16px;
  }

  .authorized-practice-workspace .authorized-pane-heading {
    border-radius: 15px 15px 0 0;
    padding: 16px 18px 14px;
  }

  .authorized-practice-workspace .authorized-answer-pane .authorized-pane-heading {
    padding: 12px 16px;
  }

  .authorized-practice-workspace .authorized-passage-content,
  .authorized-practice-workspace .authorized-order-source {
    padding: 16px 18px 26px;
  }

  .authorized-practice-workspace .authorized-answer-card {
    padding: 16px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-filter-disclosure svg {
    transition: none;
  }
}

/* On a phone the splitter sits between stacked panes. Reserve its full hit
   area in the grid gap so it never covers the bottom line of either pane. */
@media (max-width: 900px) {
  .authorized-practice-workspace .authorized-practice-dual-pane {
    row-gap: 20px;
  }

  .authorized-practice-splitter {
    top: calc(var(--practice-first-size, 50%) + 1px);
  }
}

@media (min-width: 901px) {
  .authorized-practice-workspace .authorized-practice-dual-pane {
    column-gap: 22px;
  }

  .authorized-practice-splitter {
    left: calc(var(--practice-first-size, 50%) + 2px);
  }
}

/* Reading selection and panels ------------------------------------------ */
.reading-layout {
  gap: clamp(12px, 1.5vw, 18px);
}

.reading-controls,
.reading-paper,
.reading-note {
  border: 1px solid #c7d0d6;
  border-radius: 18px;
  background: #fbfcfc;
  box-shadow: 0 10px 24px rgba(38, 46, 53, 0.07);
}

.reading-controls > .panel-head,
.reading-masthead,
.reading-note-head {
  border-bottom-color: #d9e0e4;
  background: rgba(252, 253, 254, 0.96);
}

.reading-controls > .panel-head,
.reading-masthead {
  border-radius: 17px 17px 0 0;
}

.reading-note-head {
  border-radius: 17px 17px 0 0;
}

.reading-filter-stack {
  gap: 16px;
  padding: 18px;
}

.reading-page .field select {
  border-color: #c4cdd3;
  border-radius: 12px;
  background: #ffffff;
}

.reading-selection-group {
  display: grid;
  gap: 8px;
}

.reading-selection-label {
  color: #61707a;
  font-size: 12px;
  font-weight: 750;
}

.reading-selection-buttons {
  display: grid;
  gap: 8px;
}

.reading-source-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reading-track-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reading-text-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reading-external-year-buttons {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

.reading-selection-button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #c9d2d8;
  border-radius: 12px;
  padding: 7px 5px;
  color: #42505a;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(38, 46, 53, 0.04);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.external-reading-list {
  display: grid;
  gap: 8px;
}

.external-reading-list-entry {
  min-width: 0;
}

.external-reading-item {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  border: 1px solid #c9d2d8;
  border-radius: 12px;
  padding: 9px 10px;
  color: #35434d;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(38, 46, 53, 0.04);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.external-reading-item-number {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #516774;
  background: #edf2f4;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
}

.external-reading-item-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.external-reading-item-copy strong,
.external-reading-item-copy small {
  overflow-wrap: anywhere;
}

.external-reading-item-copy strong {
  color: inherit;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.external-reading-item-copy small {
  color: #77858d;
  font-size: 11px;
  line-height: 1.25;
}

.external-reading-item:hover,
.external-reading-item.active {
  border-color: #718896;
  color: #2e4656;
  background: #edf2f4;
  box-shadow: 0 5px 12px rgba(38, 46, 53, 0.09);
  transform: translateY(-1px);
}

.external-reading-item.active .external-reading-item-number {
  color: #ffffff;
  background: #5e7a90;
}

.external-reading-item:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.external-reading-item:focus-visible {
  outline: 2px solid #5e7a90;
  outline-offset: 2px;
}

.reading-selection-button:hover:not(:disabled),
.reading-selection-button.active {
  border-color: #718896;
  color: #2e4656;
  background: #edf2f4;
  box-shadow: 0 5px 12px rgba(38, 46, 53, 0.09);
  transform: translateY(-1px);
}

.reading-selection-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.reading-selection-button:focus-visible {
  outline: 2px solid #5e7a90;
  outline-offset: 2px;
}

.reading-selection-button:disabled {
  border-color: #e0e5e8;
  color: #a2adb4;
  background: #f5f7f8;
  box-shadow: none;
}

.reading-selection-hint {
  margin: -3px 0 0;
  color: #7c8991;
  font-size: 12px;
  line-height: 1.5;
}

.reading-source-meta {
  border-top-color: #dfe5e8;
  padding: 14px 18px;
}

.reading-outline {
  border-top-color: #dfe5e8;
  padding: 15px 18px 18px;
}

.reading-outline-button,
.reading-page .button {
  border-radius: 12px;
}

.reading-masthead {
  padding: 24px clamp(20px, 3vw, 34px) 20px;
}

.reading-column-head {
  border-bottom-color: #dfe5e8;
  color: #4b5b65;
  background: #eef3f5;
}

.reading-column-head > span + span,
.reading-translation {
  border-left-color: #dbe2e6;
}

.reading-paragraph {
  border-bottom-color: #e0e6e9;
}

.reading-source,
.reading-translation {
  padding: 24px clamp(20px, 2.5vw, 34px) 27px;
}

.reading-source {
  background: #ffffff;
}

.reading-translation {
  background: #f8fafb;
}

.reading-note-head {
  padding: 20px clamp(20px, 2.5vw, 30px) 17px;
}

.reading-note-body,
.reading-note-empty {
  padding-right: clamp(20px, 2.5vw, 30px);
  padding-left: clamp(20px, 2.5vw, 30px);
}

.practice-focus-controls-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-focus-restart-button {
  min-height: 40px;
  border: 1px solid #c7d0d6;
  border-radius: 20px;
  padding: 7px 12px;
  color: #44535d;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(30, 47, 58, 0.08);
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out, box-shadow 150ms ease-out;
}

.practice-focus-restart-button:hover {
  border-color: #9c7f67;
  color: #705642;
  background: #f8f3ef;
  box-shadow: 0 8px 17px rgba(67, 53, 43, 0.12);
  transform: translateY(-1px);
}

.practice-focus-restart-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.practice-focus-restart-button:focus-visible {
  outline: 2px solid #5e7a90;
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .reading-track-buttons {
    max-width: 250px;
  }

  .reading-text-buttons {
    max-width: 440px;
  }
}

@media (max-width: 560px) {
  .reading-controls,
  .reading-paper,
  .reading-note {
    border-radius: 16px;
  }

  .reading-controls > .panel-head,
  .reading-masthead,
  .reading-note-head {
    border-radius: 15px 15px 0 0;
  }

  .reading-filter-stack {
    gap: 14px;
    padding: 16px;
  }

  .reading-selection-button {
    min-height: 44px;
  }

  .reading-track-buttons,
  .reading-text-buttons {
    max-width: none;
  }

  .reading-masthead {
    padding: 20px 18px 17px;
  }

  .reading-source,
  .reading-translation {
    padding: 20px 18px 23px;
  }

  .reading-translation {
    border-top-color: #dbe2e6;
  }

  .reading-note-head,
  .reading-note-body,
  .reading-note-empty {
    padding-right: 18px;
    padding-left: 18px;
  }

  .practice-focus-restart-button {
    min-height: 38px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reading-selection-button,
  .external-reading-item,
  .practice-focus-restart-button {
    transition: none;
  }
}
