:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3fb;
  --text: #13213c;
  --muted: #61708a;
  --line: #d9e2ef;
  --brand: #172554;
  --brand-2: #243d83;
  --accent: #d9e6ff;
  --good: #166534;
  --good-bg: #ecfdf3;
  --bad: #b42318;
  --bad-bg: #fff1f0;
  --partial: #9a6700;
  --partial-bg: #fff8db;
  --shadow: 0 14px 40px rgba(24, 39, 75, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
html.pdf-viewer-open,body.pdf-viewer-open{overflow:hidden}
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(14px, 3vw, 34px);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #1e3a8a);
  box-shadow: 0 6px 20px rgba(13, 26, 68, .18);
}
.brand-wrap { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  font-weight: 800;
  letter-spacing: .03em;
}
.brand { font-weight: 800; font-size: 1.04rem; }
.subbrand { font-size: .8rem; opacity: .76; margin-top: 1px; }
.topbar-right { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.timer-card { padding: 7px 11px; border-radius: 10px; background: rgba(255,255,255,.12); min-width: 116px; text-align: center; }
.timer-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.timer-card strong { display: block; font-variant-numeric: tabular-nums; margin-top: 2px; }

button { border: 0; border-radius: 10px; padding: 11px 15px; transition: transform .08s ease, background .15s ease, opacity .15s ease; }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary { background: var(--brand-2); color: #fff; font-weight: 700; }
.primary:hover:not(:disabled) { background: #1d3575; }
.primary.compact { background: #fff; color: var(--brand); padding: 9px 12px; }
.secondary { background: var(--surface-2); color: var(--text); font-weight: 700; border: 1px solid var(--line); }
.secondary:hover:not(:disabled) { background: #e4ebf5; }
.icon-btn { background: rgba(255,255,255,.10); color: #fff; padding: 9px 11px; border: 1px solid rgba(255,255,255,.15); }
.icon-btn:hover { background: rgba(255,255,255,.17); }
.danger { background: #fff0f0; color: #a61b1b; font-weight: 750; border: 1px solid #f3c6c6; }
.text-btn { background: transparent; color: var(--brand-2); padding: 5px 0; font-weight: 700; }
.close-btn { background: transparent; font-size: 1.8rem; line-height: 1; padding: 2px 6px; color: var(--muted); }

.test-progress { position: sticky; top: 70px; z-index: 15; background: #fff; border-bottom: 1px solid var(--line); padding: 10px clamp(14px, 3vw, 34px) 11px; }
.test-progress-row { display: flex; justify-content: space-between; gap: 16px; font-size: .88rem; color: var(--muted); margin-bottom: 7px; }
.progress-track { height: 8px; border-radius: 999px; overflow: hidden; background: #e7edf6; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #3156b7, #5f7fd0); transition: width .2s ease; }

.main-wrap { width: min(980px, calc(100% - 28px)); margin: 30px auto 50px; }
.question-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(20px, 4vw, 38px); }
.question-topline { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 22px; }
.pill, .status-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: .76rem; font-weight: 750; }
.pill { background: #e7efff; color: #234382; }
.pill.subtle { background: #f0f3f8; color: #56657e; margin-left: 5px; }
.status-chip { background: #f2f4f7; color: #667085; }
.status-chip.correct { color: var(--good); background: var(--good-bg); }
.status-chip.incorrect { color: var(--bad); background: var(--bad-bg); }
.status-chip.partial { color: var(--partial); background: var(--partial-bg); }

h1 { font-size: clamp(1.25rem, 2.3vw, 1.72rem); line-height: 1.38; margin: 0 0 16px; letter-spacing: -.012em; }
.multi-note { color: var(--muted); margin: -3px 0 14px; font-size: .92rem; }
.choices { display: grid; gap: 11px; margin-top: 20px; }
.choice {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.choice:hover { border-color: #b7c6dc; box-shadow: 0 3px 12px rgba(24,39,75,.05); }
.choice.selected { border-color: #6381c4; background: #f3f7ff; }
.choice.locked { cursor: default; }
.choice.correct-choice { border-color: #79b68b; background: var(--good-bg); }
.choice.wrong-choice { border-color: #e59a94; background: var(--bad-bg); }
.choice input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--brand-2); }
.choice-letter { width: 28px; height: 28px; border-radius: 8px; background: #eef2f7; display: grid; place-items: center; font-weight: 800; font-size: .84rem; }
.choice-text { line-height: 1.47; }
.choice-line { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }

.feedback { margin-top: 24px; border-radius: 16px; padding: 16px 18px; border: 1px solid var(--line); }
.feedback.correct { background: var(--good-bg); border-color: #b9dec2; }
.feedback.incorrect { background: var(--bad-bg); border-color: #f0c6c2; }
.feedback.partial { background: var(--partial-bg); border-color: #ead79e; }
.feedback-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.feedback-head strong { font-size: 1.03rem; }
.feedback-head span { color: var(--muted); font-size: .86rem; }
.feedback-category { color: var(--muted); font-size: .84rem; margin-bottom: 8px; }
.feedback p { margin: 7px 0 0; line-height: 1.5; }
.correct-answer { font-weight: 650; }

.nav-row { display: grid; grid-template-columns: 1fr minmax(150px, 1.2fr) 1fr; gap: 10px; margin-top: 28px; }
.save-note { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 13px; }

.modal { width: min(720px, calc(100% - 24px)); border: 0; border-radius: 20px; padding: 0; box-shadow: 0 24px 80px rgba(13,26,68,.25); color: var(--text); }
.modal.wide { width: min(980px, calc(100% - 24px)); }
.modal::backdrop { background: rgba(11, 19, 38, .48); backdrop-filter: blur(2px); }
.modal-inner { padding: 24px; max-height: min(86vh, 900px); overflow: auto; }
.modal-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.modal-head h2 { margin: 0; font-size: 1.35rem; }
.modal-head p { color: var(--muted); margin: 6px 0 0; line-height: 1.4; font-size: .9rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-footer.split { justify-content: space-between; }
.modal-actions-inline { display: flex; gap: 16px; margin: 18px 0 8px; }
.category-options { display: grid; gap: 8px; }
.category-check { display: flex; gap: 10px; align-items: center; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); }
.category-check input { width: 18px; height: 18px; accent-color: var(--brand-2); }
.callout { margin-top: 18px; padding: 16px 17px; border-radius: 14px; background: #f3f7ff; border: 1px solid #d6e3ff; }
.callout p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 20px 0; }
.stat-card { background: #f7f9fc; border: 1px solid var(--line); border-radius: 13px; padding: 13px; }
.stat-card .label { color: var(--muted); font-size: .76rem; }
.stat-card .value { font-size: 1.35rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-section { margin-top: 24px; }
.stat-section h3 { margin: 0 0 10px; font-size: 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f7f9fc; color: #45536b; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
.small-muted { color: var(--muted); font-size: .79rem; }
.result-badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: .72rem; font-weight: 750; background: #f1f3f6; color: #667085; }
.result-badge.correct { background: var(--good-bg); color: var(--good); }
.result-badge.incorrect { background: var(--bad-bg); color: var(--bad); }
.result-badge.partial { background: var(--partial-bg); color: var(--partial); }
details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; margin-top: 9px; }
summary { cursor: pointer; font-weight: 750; }
.details-body { margin-top: 12px; }

.hidden { display: none !important; }

@media (max-width: 780px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-right { width: 100%; justify-content: flex-start; }
  .timer-card { order: -1; }
  .test-progress { top: 126px; }
  .main-wrap { margin-top: 18px; }
  .question-card { border-radius: 16px; }
  .question-topline { align-items: flex-start; flex-direction: column; }
  .nav-row { grid-template-columns: 1fr 1fr; }
  .nav-row .primary { grid-column: 1 / -1; grid-row: 1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-footer.split { flex-direction: column-reverse; }
}

@media (max-width: 480px) {
  .brand-wrap { min-width: 0; }
  .topbar { padding: 11px 12px; }
  .topbar-right { gap: 6px; }
  .icon-btn, .primary.compact { padding: 8px 9px; font-size: .82rem; }
  .timer-card { min-width: 106px; }
  .test-progress { top: 122px; }
  .main-wrap { width: min(100% - 18px, 980px); }
  .question-card { padding: 18px 15px; }
  .choice { grid-template-columns: 1fr; padding: 13px; }
  .choice input { position: absolute; opacity: 0; pointer-events: none; }
  .choice-line { grid-template-columns: 30px 1fr; }
  .modal-inner { padding: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* SCP Study production additions */
.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  object-fit: cover;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}

.resource-list { display: grid; gap: 11px; margin-top: 20px; }
.resource-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.resource-card:hover { border-color: #9eb1cf; box-shadow: 0 7px 20px rgba(24,39,75,.08); }
.resource-card:active { transform: translateY(1px); }
.resource-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef3fb;
  color: var(--brand-2);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .05em;
}
.resource-copy { display: grid; gap: 4px; min-width: 0; }
.resource-copy strong { font-size: .95rem; }
.resource-copy span { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.resource-action { color: var(--brand-2); font-weight: 750; font-size: .84rem; }

.clickable-row { cursor: pointer; transition: background .12s ease; }
.clickable-row:hover, .clickable-row:focus { background: #f3f7ff; outline: none; }
.clickable-row:focus-visible { box-shadow: inset 0 0 0 2px #6b88c8; }

.review-modal { overflow: hidden; max-height: min(92dvh, 980px); }
.review-modal > .modal-inner {
  width: 100%;
  max-height: min(92dvh, 980px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.review-search {
  position: sticky;
  top: -1px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 14px -4px 2px;
  padding: 8px 4px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 72%, rgba(255,255,255,.90));
  backdrop-filter: blur(14px);
}
.review-search-field {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 9px 0 12px;
  border: 1px solid #d7e1ef;
  border-radius: 13px;
  background: #f6f9fd;
  box-shadow: inset 0 1px 2px rgba(18,33,63,.035);
}
.review-search-field:focus-within {
  border-color: #9bb8f4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36,86,211,.09);
}
.review-search-icon { color: #6d7e9a; font-size: 1.05rem; line-height: 1; transform: translateY(-1px); }
.review-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .87rem;
}
.review-search input::placeholder { color: #8794aa; }
.review-search-clear {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e6edf7;
  color: #52637f;
  font-size: 1rem;
  font-weight: 800;
}
.review-search-count { color: var(--muted); font-size: .74rem; font-weight: 750; white-space: nowrap; }
.review-search-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 180px;
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}
.review-search-empty strong { color: var(--text); font-size: 1rem; }
.review-search-empty span { font-size: .84rem; }
.review-topline { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 18px; }
.review-stat-grid { grid-template-columns: repeat(6, 1fr); margin-bottom: 10px; }
.review-stat-grid .stat-card { padding: 11px 12px; }
.review-stat-grid .stat-card .value { font-size: 1.14rem; }
.review-last-answer { color: var(--muted); font-size: .82rem; margin: 0 0 18px; }
.review-question { border-top: 1px solid var(--line); padding-top: 20px; }
.review-question h3 { margin: 0 0 16px; font-size: 1.16rem; line-height: 1.42; }
.review-choices { display: grid; gap: 9px; }
.review-choice {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  line-height: 1.4;
  background: #fff;
}
.review-choice.correct { border-color: #79b68b; background: var(--good-bg); }
.review-choice.correct .choice-letter { background: #d6f1dd; color: var(--good); }
.review-explanation { margin-top: 18px; padding: 15px 16px; border: 1px solid #d6e3ff; border-radius: 14px; background: #f5f8ff; }
.review-explanation-label { color: var(--brand-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.review-explanation p { margin: 7px 0 0; line-height: 1.5; }
.review-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-counter { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; min-width: 58px; text-align: center; }
.review-nav button:last-child { justify-self: stretch; }

@media (max-width: 780px) {
  .review-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .resource-card { grid-template-columns: 48px 1fr; }
  .resource-action { grid-column: 2; }
}

@media (max-width: 480px) {
  .brand-logo { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }
  .review-search { grid-template-columns: 1fr; gap: 5px; }
  .review-search-count { padding-left: 3px; }
  .review-search input { font-size: .82rem; }
  .review-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .review-nav { grid-template-columns: 1fr 1fr; }
  .review-counter { grid-column: 1 / -1; grid-row: 1; }
}

/* App-store polish refresh */
:root {
  --bg: #eef3fb;
  --surface: rgba(255,255,255,.92);
  --surface-2: #eff4fb;
  --line: #dfe7f2;
  --text: #12213f;
  --muted: #66758f;
  --brand: #17337d;
  --brand-2: #2456d3;
  --accent: #e7efff;
  --shadow: 0 24px 70px rgba(18,33,63,.10);
}
html {
  background:
    radial-gradient(circle at top left, rgba(103,146,255,.16), transparent 34%),
    radial-gradient(circle at top right, rgba(255,196,78,.14), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #eef3fb 30%, #eaf0f9 100%);
}
body {
  background: transparent;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.topbar {
  padding: 14px clamp(14px, 3vw, 34px);
  background:
    linear-gradient(135deg, #13347c 0%, #1b4eb8 58%, #2f6fe1 100%);
  box-shadow: 0 14px 40px rgba(18,33,63,.18);
}
.topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,0));
}
.brand-wrap, .topbar-right { position: relative; z-index: 1; }
.brand { font-size: 1.08rem; letter-spacing: -.015em; }
.subbrand { opacity: .84; }
.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  object-fit: contain;
  background: transparent;
  box-shadow: 0 14px 26px rgba(9,22,55,.20);
  border: 1px solid rgba(255,255,255,.28);
}
.timer-card {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 8px 14px;
  min-width: 128px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.timer-card.is-clickable { cursor: pointer; }
.timer-card.is-clickable:hover,
.timer-card.is-clickable:focus-visible {
  background: rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 20px rgba(9,22,55,.12);
  outline: none;
}
.timer-card strong { letter-spacing: .02em; font-size: 1rem; }
.icon-btn,
.primary.compact {
  border-radius: 14px;
  backdrop-filter: blur(10px);
}
.icon-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
}
.icon-btn:hover { background: rgba(255,255,255,.20); }
.primary {
  background: linear-gradient(180deg, #3769e6 0%, #2456d3 100%);
  box-shadow: 0 10px 24px rgba(36,86,211,.22);
}
.primary:hover:not(:disabled) { background: linear-gradient(180deg, #2f62df 0%, #214fbe 100%); }
.primary.compact {
  background: rgba(255,255,255,.96);
  color: #17337d;
  box-shadow: 0 10px 20px rgba(9,22,55,.12);
}
.secondary {
  background: rgba(247,250,255,.95);
  box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.test-progress {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(18,33,63,.06);
}
.progress-track { background: #e5ecfa; }
.progress-fill { background: linear-gradient(90deg, #2b5fd8, #5d86ea); }
.main-wrap { margin-top: 34px; }
.question-card {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(251,253,255,.94));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 30px 60px rgba(18,33,63,.10), 0 10px 24px rgba(18,33,63,.05);
}
.pill { background: #ebf2ff; color: #234ba7; }
.pill.subtle { background: #f5f7fb; color: #5a6880; }
.choice {
  border-color: #e2e9f5;
  box-shadow: 0 1px 2px rgba(15,23,42,.02);
}
.choice:hover { border-color: #bdd0fb; box-shadow: 0 10px 24px rgba(36,86,211,.08); }
.choice.selected {
  border-color: #7da3f8;
  background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);
  box-shadow: 0 12px 24px rgba(36,86,211,.08);
}
.choice-letter {
  background: linear-gradient(180deg, #eff4fb 0%, #e6edf8 100%);
  color: #35518e;
}
.feedback {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.modal {
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 28px 90px rgba(18,33,63,.22);
}
.modal::backdrop {
  background: rgba(11, 19, 38, .38);
  backdrop-filter: blur(10px);
}
.modal-head h2 { letter-spacing: -.02em; }
.close-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #697992;
  display: grid;
  place-items: center;
  padding: 0;
}
.close-btn:hover { background: #eaf0f8; }
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.96));
  box-shadow: 0 10px 28px rgba(18,33,63,.05);
}
.table-wrap, details, .resource-card, .review-explanation, .callout {
  box-shadow: 0 10px 24px rgba(18,33,63,.04);
}
.resource-card,
.review-choice,
.category-check,
.details-body table,
.table-wrap {
  background: rgba(255,255,255,.95);
}
.save-note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 10px 24px rgba(18,33,63,.04);
}
.review-choice.correct { box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
@media (max-width: 480px) {
  .brand-logo { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
  .timer-card { min-width: 116px; }
}

/* Short and Sweet Audio Reviews */
.audio-review-section {
  margin-top: 14px;
  padding-top: 2px;
}

.audio-review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.audio-review-head h3 { margin: 4px 0 6px; font-size: 1.08rem; letter-spacing: -.015em; }
.audio-review-head p { margin: 0; color: var(--muted); line-height: 1.45; font-size: .88rem; max-width: 600px; }
.eyebrow {
  display: inline-block;
  color: var(--brand-2);
  font-size: .7rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.audio-library-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.audio-drive-link { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.audio-player-shell {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #dce6f5;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249,252,255,.98), rgba(240,246,255,.96));
  box-shadow: 0 18px 40px rgba(18,33,63,.06);
}
.audio-now-playing { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.audio-art {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(31,73,165,.18);
}
.audio-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.audio-track-copy { display: grid; gap: 3px; min-width: 0; }
.audio-track-copy strong { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-track-copy > span:last-child { color: var(--muted); font-size: .8rem; }
.audio-kicker { color: var(--brand-2); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.audio-player-shell audio { width: 100%; display: block; margin: 8px 0 12px; }
.audio-control-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; flex-wrap: wrap; }
.audio-skip-controls { display: flex; gap: 9px; flex-wrap: nowrap; align-items: center; }
.audio-icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #d7e1ef;
  background: #f7f9fd;
  color: #17315f;
  box-shadow: 0 2px 6px rgba(31,55,95,.05);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.audio-icon-btn:hover { background: #eef4ff; border-color: #c6d5ee; }
.audio-icon-btn:active { transform: scale(.96); }
.audio-icon-btn:disabled { opacity: .38; cursor: default; transform: none; }
.audio-icon-btn svg {
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.audio-icon-btn:not(.audio-seek-icon) svg path:last-child { fill: currentColor; stroke: currentColor; }
.audio-speed { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.audio-speed > span { color: var(--muted); font-size: .76rem; font-weight: 750; margin-right: 3px; }
.speed-btn {
  min-width: 42px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #eef3fb;
  color: #4e5f7b;
  border: 1px solid #dce5f2;
  font-size: .78rem;
  font-weight: 800;
}
.speed-btn.active {
  background: #2456d3;
  color: #fff;
  border-color: #2456d3;
  box-shadow: 0 6px 14px rgba(36,86,211,.20);
}
.audio-empty {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px dashed #c8d7ee;
  background: rgba(255,255,255,.66);
}
.audio-empty strong { font-size: .86rem; }
.audio-empty p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.audio-empty.audio-error { border-color: #efc6c2; background: #fff6f5; }
.audio-playlist { margin-top: 16px; border-top: 1px solid #dce6f5; padding-top: 14px; }
.audio-playlist-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.audio-playlist-head > span { color: var(--muted); font-size: .78rem; font-weight: 750; }
.audio-playlist-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #d8e2f0;
  border-radius: 11px;
  background: #f7f9fc;
  color: #36538b;
  font-size: .78rem;
  font-weight: 800;
  text-align: left;
}
.audio-playlist-chevron { transition: transform .16s ease; font-size: 1rem; line-height: 1; }
.audio-playlist.mobile-expanded .audio-playlist-chevron { transform: rotate(180deg); }
.audio-playlist-list { display: grid; gap: 6px; max-height: 270px; overflow: auto; padding-right: 2px; }
.audio-playlist-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
  color: var(--text);
  background: transparent;
}
.audio-playlist-item:hover { background: #f4f7fc; }
.audio-playlist-item.active { background: #edf3ff; border-color: #cfddfb; }
.audio-track-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8eef8;
  color: #36538b;
  font-size: .75rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.audio-playlist-item.active .audio-track-number { background: #2456d3; color: #fff; }
.audio-track-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 700; }
.audio-track-play { color: var(--brand-2); font-size: .76rem; font-weight: 800; }

@media (max-width: 700px) {
  .audio-review-head { flex-direction: column; }
  .audio-library-actions { width: 100%; justify-content: flex-start; }
  .audio-library-actions > * { flex: 1 1 160px; }
  .audio-control-row { align-items: center; }
  .audio-skip-controls { width: auto; }
  .audio-icon-btn { width: 46px; height: 46px; flex-basis: 46px; border-radius: 15px; }
  .audio-icon-btn svg { width: 23px; height: 23px; }
}

/* Contextual audio + transcript */
.question-audio {
  margin: 10px 0 20px;
  padding: 12px;
  border: 1px solid #dce6f5;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247,250,255,.96), rgba(241,246,255,.88));
  box-shadow: 0 10px 24px rgba(18,33,63,.045);
}
.question-audio-label {
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.question-audio-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.question-audio-row + .question-audio-row { margin-top: 7px; }
.question-audio-play {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid #dbe5f4;
  background: rgba(255,255,255,.9);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(18,33,63,.035);
}
.question-audio-play:hover { border-color: #b9cdf7; background: #fff; }
.question-audio-playicon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2456d3;
  color: #fff;
  font-size: .69rem;
  padding-left: 2px;
  box-shadow: 0 6px 15px rgba(36,86,211,.20);
}
.question-audio-copy { min-width: 0; display: grid; gap: 2px; }
.question-audio-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .83rem;
}
.question-audio-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: .73rem;
}
.question-audio-time { color: #45608f; font-size: .74rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.question-audio-transcript {
  padding: 8px 11px;
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  color: #335597;
  font-size: .75rem;
  font-weight: 800;
}
.question-audio-transcript:hover { background: #fff; border-color: #b9cdf7; }
.review-audio { margin-top: 14px; margin-bottom: 0; }

.audio-library-grid {
  display: grid;
  grid-template-columns: minmax(250px,.82fr) minmax(0,1.45fr);
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}
.audio-library-grid .audio-playlist { margin-top: 0; border-top: 0; padding-top: 0; }
.audio-playlist-list { max-height: 360px; }
.transcript-panel {
  min-width: 0;
  border: 1px solid #dce6f5;
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.transcript-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid #e2e9f4;
  background: rgba(247,250,255,.94);
}
.transcript-head strong { font-size: .82rem; }
.transcript-head span { color: var(--muted); font-size: .75rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.transcript-scroll {
  max-height: 360px;
  overflow: auto;
  padding: 7px;
  scroll-behavior: smooth;
}
.transcript-segment {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 9px;
  align-items: start;
  padding: 8px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  line-height: 1.43;
}
.transcript-segment:hover { background: #f2f6fc; }
.transcript-segment.active {
  background: #e9f1ff;
  box-shadow: inset 3px 0 0 #2c61dc;
}
.transcript-time {
  padding-top: 1px;
  color: #64748b;
  font-size: .71rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.transcript-text { font-size: .82rem; }
.transcript-segment.active .transcript-time { color: #2456d3; }
.transcript-empty { padding: 18px; color: var(--muted); font-size: .82rem; }

.mini-audio-player {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  background: rgba(12,30,73,.92);
  color: #fff;
  box-shadow: 0 24px 70px rgba(8,21,51,.28);
  backdrop-filter: blur(20px) saturate(135%);
}
.mini-audio-info {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 2px 6px 2px 2px;
  border-radius: 13px;
  background: transparent;
  color: #fff;
  text-align: left;
}
.mini-audio-info:hover { background: rgba(255,255,255,.08); }
.mini-audio-info img { width: 38px; height: 38px; border-radius: 11px; display: block; }
.mini-audio-copy { min-width: 0; display: grid; gap: 1px; }
.mini-audio-copy small { color: rgba(255,255,255,.65); font-size: .66rem; font-weight: 750; letter-spacing: .03em; }
.mini-audio-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.mini-audio-time { color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-audio-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  font-weight: 850;
}
.mini-audio-btn:hover { background: rgba(255,255,255,.22); }
.mini-audio-btn.stop { font-size: .72rem; }
.mini-audio-rewind svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.mini-audio-visible { padding-bottom: 86px; }

@media (max-width: 760px) {
  .audio-library-grid { grid-template-columns: 1fr; }
  .transcript-toggle { display: inline-flex; }
  .transcript-panel.transcript-collapsed .transcript-scroll { display: none; }
  .transcript-panel.transcript-collapsed .transcript-head { border-bottom-color: transparent; }
  /* Keep the active transcript above the optional playlist on phones. */
  .audio-library-grid .transcript-panel { order: -1; }
  .audio-library-grid .audio-playlist {
    border: 1px solid #dce6f5;
    border-radius: 13px;
    padding: 8px;
    background: rgba(255,255,255,.68);
  }
  .audio-playlist-head { margin-bottom: 0; }
  .audio-playlist-head > span { display: none; }
  .audio-playlist-toggle { display: flex; }
  .audio-playlist:not(.mobile-expanded) .audio-playlist-list { display: none; }
  .audio-playlist.mobile-expanded .audio-playlist-list { margin-top: 8px; }
  .audio-playlist-list, .transcript-scroll { max-height: 300px; }
  .mini-audio-player { grid-template-columns: minmax(0,1fr) auto auto auto; }
  .mini-audio-time { display: none; }
}

@media (max-width: 520px) {
  .question-audio { padding: 9px; }
  .question-audio-row { grid-template-columns: minmax(0,1fr) auto; }
  .question-audio-play { grid-template-columns: 30px minmax(0,1fr); padding: 9px; }
  .question-audio-time { display: none; }
  .question-audio-transcript { padding: 7px 8px; font-size: .7rem; }
  .mini-audio-player { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); border-radius: 18px; }
  .mini-audio-info { grid-template-columns: 34px minmax(0,1fr); gap: 8px; }
  .mini-audio-info img { width: 34px; height: 34px; border-radius: 10px; }
  .mini-audio-btn { width: 38px; height: 38px; }
}

/* Mobile header compaction — v8 */
@media (max-width: 780px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 9px;
    padding: 10px 12px 11px;
  }

  .brand-wrap {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 10px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .brand { font-size: 1rem; }
  .subbrand { font-size: .76rem; }

  .timer-card {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    min-width: 112px;
    padding: 6px 10px;
    border-radius: 14px;
    justify-self: end;
  }

  .timer-label { font-size: .61rem; }
  .timer-card strong { font-size: .92rem; margin-top: 1px; }

  .topbar-right {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    justify-content: stretch;
  }

  .topbar-right > button {
    width: 100%;
    min-width: 0;
    padding: 9px 5px;
    border-radius: 12px;
    font-size: .78rem;
    white-space: nowrap;
  }

  .topbar-right > #installBtn:not(.hidden) {
    grid-column: 1 / -1;
  }

  .test-progress { top: 110px; }
  .main-wrap { margin-top: 15px; }
}

@media (max-width: 390px) {
  .topbar {
    column-gap: 8px;
    padding-inline: 9px;
  }

  .brand-wrap { gap: 8px; }
  .brand-logo { width: 39px; height: 39px; flex-basis: 39px; }
  .brand { font-size: .96rem; }
  .subbrand { font-size: .72rem; }

  .timer-card {
    min-width: 105px;
    padding: 6px 8px;
  }

  .topbar-right { gap: 5px; }
  .topbar-right > button { font-size: .73rem; padding-inline: 3px; }
  .test-progress { top: 106px; }
}

.timer-card { position: relative; z-index: 1; }


/* v9 interaction, install, offline audio, and document controls */
.explorer-link {
  cursor: pointer;
  transition: box-shadow .14s ease, transform .08s ease, background .14s ease;
}
.explorer-link:hover { box-shadow: 0 6px 16px rgba(36,86,211,.10); }
.explorer-link:focus-visible { outline: 2px solid #7da3f8; outline-offset: 3px; }
#questionPrompt.explorer-link:hover { color: #214fbe; }

.resource-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.resource-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid #d8e2f0;
  background: #f7f9fc;
  color: #36538b;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 800;
}
.resource-btn:hover { background: #eef3fb; }
.resource-btn.primary-link { background: #2456d3; color: #fff; border-color: #2456d3; }

.review-reveal-row { display: flex; justify-content: flex-start; margin-top: 16px; }
.review-reveal-btn { min-width: 210px; }
.review-shortcuts {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}
.review-shortcuts span { display: inline-flex; align-items: center; gap: 4px; }
.review-shortcuts kbd {
  min-width: 20px;
  padding: 1px 5px;
  border: 1px solid #d5deeb;
  border-radius: 5px;
  background: #f7f9fc;
  color: #53647f;
  font: inherit;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 1px 0 rgba(18,33,63,.06);
}

.audio-review-head { align-items: center; }
.audio-library-actions { display: flex; align-items: center; gap: 9px; }
.audio-download-all { padding: 8px 11px; font-size: .78rem; }
.audio-cache-status { color: var(--muted); font-size: .74rem; font-weight: 750; min-width: 70px; }
.audio-playlist-item {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 6px;
  padding: 4px;
}
.audio-track-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 7px;
  border-radius: 9px;
  background: transparent;
  color: inherit;
}
.audio-track-main:hover { background: rgba(255,255,255,.55); }
.audio-cache-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 10px;
  border: 1px solid #d8e2f0;
  background: #fff;
  color: #3156b7;
  font-size: .9rem;
  font-weight: 900;
}
.audio-cache-btn.cached { color: #166534; background: #edf9f0; border-color: #cbe8d2; }

.install-fab {
  position: fixed;
  z-index: 55;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  color: #fff;
  background: rgba(19,52,124,.94);
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 14px 34px rgba(9,22,55,.22);
  backdrop-filter: blur(16px) saturate(130%);
  font-size: .76rem;
  font-weight: 800;
}
.install-fab img { width: 30px; height: 30px; border-radius: 9px; display: block; }
body.mini-audio-visible .install-fab { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 72px); }
.install-guide-modal { width: min(720px, calc(100% - 20px)); }
.install-guide-inner { padding: 15px; }
.install-guide-image { display: block; width: 100%; height: auto; border-radius: 14px; margin-top: 12px; }

@media (max-width: 780px) {
  .resource-card { grid-template-columns: 44px minmax(0,1fr); gap: 10px; }
  .resource-actions { grid-column: 2; justify-content: flex-start; }
  .resource-btn { flex: 0 0 auto; }
  .audio-review-head { flex-direction: row; align-items: center; }
  .audio-library-actions { width: auto; justify-content: flex-end; }
  .audio-library-actions > * { flex: 0 0 auto; }
}

@media (max-width: 520px) {
  .install-fab { right: 9px; bottom: max(9px, env(safe-area-inset-bottom)); height: 39px; padding-right: 10px; }
  .install-fab img { width: 27px; height: 27px; border-radius: 8px; }
  body.mini-audio-visible .install-fab { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 70px); }
  .audio-review-head { gap: 8px; }
  .audio-download-all { padding: 7px 9px; }
  .audio-cache-status { display: none; }
  .review-reveal-btn { width: 100%; min-width: 0; }
}

/* Glossary — v14 */
.glossary-term {
  display: inline;
  padding: 0;
  border: 0;
  border-bottom: 1.5px dashed #6f86ad;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: help;
  text-decoration: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.glossary-term:hover { border-bottom-color: #264fa8; color: #1c438f; }
.glossary-term:focus-visible {
  outline: 2px solid rgba(36,86,211,.35);
  outline-offset: 2px;
  border-radius: 3px;
}
.choice.locked .glossary-term { cursor: help; }

.glossary-section {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #dce6f5;
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(248,251,255,.98), rgba(244,248,255,.9));
}
.glossary-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.glossary-head h3 { margin: 2px 0 0; font-size: 1.05rem; }
.glossary-head p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.42; }
.glossary-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9f0ff;
  color: #31528e;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.glossary-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 13px;
}
.glossary-search-icon {
  position: absolute;
  left: 12px;
  color: #71829d;
  pointer-events: none;
}
.glossary-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 42px 10px 36px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: .86rem;
}
.glossary-search input:focus { border-color: #8ca9e5; box-shadow: 0 0 0 3px rgba(49,86,183,.09); }
.glossary-search-clear {
  position: absolute;
  right: 7px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
}
.glossary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-top: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}
.glossary-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
}
.glossary-item-top { display: grid; gap: 3px; }
.glossary-item-term {
  justify-self: start;
  padding: 0;
  border: 0;
  border-bottom: 1.5px dashed #6f86ad;
  border-radius: 0;
  background: transparent;
  color: #173d84;
  font-size: .92rem;
  font-weight: 850;
  text-align: left;
}
.glossary-item-term:hover { color: #102e67; border-bottom-color: #173d84; }
.glossary-item-pronunciation { color: #63738d; font-size: .73rem; font-weight: 750; }
.glossary-item p { margin: 7px 0 0; color: #42516a; font-size: .78rem; line-height: 1.43; }
.glossary-empty { margin-top: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: .84rem; }

.glossary-term-modal { width: min(560px, calc(100% - 24px)); }
.glossary-term-inner { overflow: visible; }
.glossary-term-inner .modal-head { align-items: center; }
.glossary-term-inner h2 { margin-top: 3px; font-size: 1.45rem; }
.glossary-term-pronunciation {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 4px 12px;
  align-items: center;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid #dbe5f3;
  border-radius: 13px;
  background: #f5f8fd;
}
.glossary-term-pronunciation > span {
  grid-column: 1;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.glossary-term-pronunciation > strong { grid-column: 1; font-size: .94rem; line-height: 1.35; }
.glossary-term-ipa {
  grid-column: 1;
  color: #74829a;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.35;
}
.glossary-speak-btn { grid-column: 2; grid-row: 1 / span 2; padding: 8px 11px; font-size: .78rem; }
.glossary-term-definition { margin: 15px 1px 2px; line-height: 1.55; color: #33425b; }

@media (max-width: 700px) {
  .glossary-section { padding: 14px; }
  .glossary-head { align-items: center; }
  .glossary-head p { display: none; }
  .glossary-list { grid-template-columns: 1fr; max-height: 360px; }
  .glossary-item { padding: 10px 11px; }
}

@media (max-width: 420px) {
  .glossary-term-pronunciation { grid-template-columns: 1fr; }
  .glossary-speak-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 5px; }
}


/* Materials + glossary refinements — v15 */
.transcript-head-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.transcript-toggle {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #d7e2f1;
  border-radius: 9px;
  background: rgba(255,255,255,.78);
  color: #36538b;
  font-size: .7rem;
  font-weight: 800;
}
.transcript-toggle:hover { background: #fff; border-color: #b9cdf7; }
.transcript-toggle-chevron { transition: transform .16s ease; font-size: .83rem; line-height: 1; }
.transcript-panel.transcript-collapsed .transcript-toggle-chevron { transform: rotate(180deg); }

.downloads-section {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #dce6f5;
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(248,251,255,.98), rgba(244,248,255,.9));
}
.materials-section-head h3 { margin: 2px 0 0; font-size: 1.05rem; }
.materials-section-head p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.42; }
.downloads-section .resource-list { margin-top: 13px; }

.glossary-item-categories {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
}
.glossary-item-categories-label,
.glossary-term-categories > span {
  color: #74829a;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.glossary-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.glossary-category-chip {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #d6e2f4;
  border-radius: 999px;
  background: #f1f6ff;
  color: #315797;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}
.glossary-category-chip:hover { background: #e7f0ff; border-color: #adc3ea; color: #173d84; }
.glossary-category-chip:focus-visible { outline: 2px solid rgba(36,86,211,.28); outline-offset: 2px; }
.glossary-term-categories {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e3e9f2;
}

@media (max-width: 700px) {
  .downloads-section { padding: 14px; }
  .materials-section-head p { display: none; }
  .transcript-toggle-label { display: none; }
  .transcript-toggle { width: 32px; height: 30px; justify-content: center; padding: 0; }
}

/* Question search access + mobile explorer navigation — v16 */
.materials-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.materials-question-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 11px;
  white-space: nowrap;
}

.question-search-fab {
  position: fixed;
  z-index: 54;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 5px 12px 5px 9px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #17337d;
  box-shadow: 0 14px 34px rgba(9,22,55,.16);
  backdrop-filter: blur(16px) saturate(130%);
  font-size: .76rem;
  font-weight: 850;
}
.question-search-fab:hover { background: #fff; }
.question-search-fab-icon { font-size: 1.08rem; line-height: 1; }
body.mini-audio-visible .question-search-fab { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 72px); }

.review-tools-sticky { min-width: 0; }
.review-tools-sticky .review-nav {
  margin-top: 5px;
  padding: 8px 4px 10px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 780px) {
  .review-modal { max-height: calc(100dvh - 16px); }
  .review-modal > .modal-inner { max-height: calc(100dvh - 16px); scrollbar-gutter: auto; }
  .materials-modal-head { align-items: center; }
  .materials-question-search span { display: none; }
  .materials-question-search {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    font-size: 1.05rem;
  }

  .review-tools-sticky {
    position: sticky;
    top: -1px;
    z-index: 4;
    margin: 10px -4px 0;
    padding: 2px 4px 0;
    background: linear-gradient(180deg, rgba(255,255,255,.99) 86%, rgba(255,255,255,.93));
    backdrop-filter: blur(15px) saturate(125%);
    box-shadow: 0 8px 18px rgba(18,33,63,.045);
  }
  .review-tools-sticky .review-search {
    position: static;
    margin: 0;
    padding: 5px 0 4px;
    background: transparent;
    backdrop-filter: none;
  }
  .review-tools-sticky .review-nav {
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 7px;
    margin: 0;
    padding: 5px 0 8px;
    background: transparent;
  }
  .review-tools-sticky .review-nav button {
    min-height: 38px;
    padding: 8px 9px;
    font-size: .79rem;
  }
  .review-tools-sticky .review-counter {
    grid-column: auto;
    grid-row: auto;
    min-width: 48px;
    font-size: .79rem;
  }
  .review-topline { margin-top: 12px; }
}

@media (max-width: 520px) {
  .question-search-fab {
    left: 9px;
    bottom: max(9px, env(safe-area-inset-bottom));
    height: 39px;
    padding: 5px 10px 5px 8px;
  }
  body.mini-audio-visible .question-search-fab { bottom: calc(max(9px, env(safe-area-inset-bottom)) + 70px); }
}

/* v17: transcript collapsing is a phone/tablet-only affordance. */
@media (max-width: 760px) {
  .transcript-toggle { display: inline-flex; }
}


/* v19: transparent, anonymous course analytics preference */
.analytics-preference {
  margin-top: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dce6f5;
  border-radius: 17px;
  background: #f8fbff;
}
.analytics-preference-copy { min-width: 0; }
.analytics-preference h3 { margin: 2px 0 4px; font-size: .98rem; }
.analytics-preference p { max-width: 760px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.anonymous-usage-controls{display:grid;gap:8px;justify-items:start;min-width:0}
.sync-status-row{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;min-width:0}
.sync-status-row .analytics-status{margin-top:6px}
.sync-now-link{padding:0;border:0;border-radius:0;background:transparent;color:#31569a;font:inherit;font-size:.69rem;font-weight:800;text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.sync-now-link:hover:not(:disabled){color:#214fbe}
.sync-now-link:focus-visible{outline:2px solid #7da3f8;outline-offset:3px;border-radius:3px}
.sync-now-link:disabled{opacity:.48;text-decoration:none}
.sync-actions{display:flex;gap:7px;flex-wrap:wrap;min-width:0}
.sync-device-list{display:grid;gap:9px;margin:4px 0 12px}
.sync-device-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid #dce6f5;border-radius:12px;background:#f8fbff;min-width:0}
.sync-device-copy{min-width:0;display:grid;gap:2px}
.sync-device-copy strong{color:#233d6c;font-size:.82rem;overflow-wrap:anywhere}
.sync-device-copy span{color:var(--muted);font-size:.7rem}
.sync-device-row .settings-action-btn{flex:0 0 auto}
.sync-device-unlink-btn{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border-radius:10px;color:#31569a}
.sync-device-unlink-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sync-device-footer{gap:8px;flex-wrap:wrap}
.analytics-status { display: block; margin-top: 6px; color: #5e6d85; font-size: .69rem; font-weight: 700; }
.analytics-switch { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; cursor: pointer; color: #23447d; font-size: .74rem; font-weight: 800; }
.analytics-switch input { position: absolute; opacity: 0; pointer-events: none; }
.analytics-switch-track { position: relative; width: 40px; height: 23px; border-radius: 999px; background: #c9d4e4; transition: background .16s ease; box-shadow: inset 0 0 0 1px rgba(33,64,115,.08); }
.analytics-switch-track span { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(18,42,79,.24); transition: transform .16s ease; }
.analytics-switch input:checked + .analytics-switch-track { background: #2d63db; }
.analytics-switch input:checked + .analytics-switch-track span { transform: translateX(17px); }
.analytics-switch input:focus-visible + .analytics-switch-track { outline: 2px solid rgba(36,86,211,.35); outline-offset: 2px; }
@media (max-width: 700px) {
  .analytics-preference { align-items: flex-start; flex-direction: column; padding: 14px; gap: 10px; }
  .analytics-preference p { font-size: .72rem; }
}

/* Materials dialog scrolling refinement — v20
   Keep the dialog shell fixed and let only the inner content pane scroll.
   This avoids Safari/desktop browsers showing nested scrollbars. */
#materialsDialog {
  overflow: hidden;
  max-height: min(92dvh, 960px);
}
#materialsDialog > .modal-inner {
  width: 100%;
  max-height: min(92dvh, 960px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 780px) {
  #materialsDialog {
    max-height: calc(100dvh - 16px);
  }
  #materialsDialog > .modal-inner {
    max-height: calc(100dvh - 16px);
    scrollbar-gutter: auto;
  }
}


/* Materials tabs — v25 */
.materials-tabs {
  position: sticky;
  top: -1px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 16px -8px 0;
  padding: 7px 8px 9px;
  border-bottom: 1px solid rgba(218,228,241,.9);
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.materials-tab {
  min-width: 0;
  min-height: 39px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #60708a;
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: -.005em;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.materials-tab:hover { background: #f1f5fb; color: #274d96; }
.materials-tab.active {
  border-color: #d2def3;
  background: #eef4ff;
  color: #1748ad;
  box-shadow: 0 4px 12px rgba(33,76,168,.08);
}
.materials-tab:focus-visible { outline: 2px solid rgba(36,86,211,.35); outline-offset: 1px; }
.materials-panel { margin-top: 14px; min-height: 160px; }
.materials-panel[hidden] { display: none !important; }
.materials-panel .audio-review-section,
.materials-panel .glossary-section,
.materials-panel .downloads-section { margin-top: 0; }
.materials-footer { margin-top: 18px; }
#materialsPanelDownloads .analytics-preference { margin-top: 16px; }

@media (max-width: 780px) {
  .materials-tabs {
    margin: 12px -5px 0;
    padding: 6px 5px 8px;
    gap: 4px;
  }
  .materials-tab { min-height: 37px; padding: 7px 6px; font-size: .74rem; border-radius: 10px; }
  .materials-panel { margin-top: 10px; }
  .materials-footer { margin-top: 14px; padding-top: 14px; }
}


/* Materials navigation + Questions/Settings — v27 */
.materials-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.materials-panel .materials-questions-section,
.materials-panel .settings-section {
  margin-top: 0;
}
.materials-questions-section,
.settings-section {
  padding: 16px;
  border: 1px solid #dce6f5;
  border-radius: 17px;
  background: #fff;
}
.materials-question-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2853a5;
  font-size: .69rem;
  font-weight: 850;
  white-space: nowrap;
}
.materials-question-searchbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 8px 7px 11px;
  border: 1px solid #d7e1ef;
  border-radius: 13px;
  background: #f9fbfe;
}
.materials-question-search-icon {
  color: #61718a;
  font-size: 1.05rem;
  line-height: 1;
}
.materials-question-searchbar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .82rem;
}
.materials-question-searchbar input::placeholder { color: #8b97aa; }
.materials-question-searchbar .primary {
  min-height: 34px;
  padding: 7px 12px;
}
.materials-question-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.materials-question-actions button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: .75rem;
}
.materials-question-category-wrap { margin-top: 16px; }
.materials-question-category-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.materials-question-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.materials-question-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e0e7f1;
  border-radius: 11px;
  background: #f8faff;
  color: #243c69;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.materials-question-category:hover { border-color: #c9d7ed; background: #f1f5fd; }
.materials-question-category > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .74rem;
  font-weight: 800;
}
.materials-question-category small {
  flex: 0 0 auto;
  color: #78869a;
  font-size: .62rem;
  font-weight: 700;
}
.settings-section .analytics-preference {
  margin-top: 14px;
}
.font-size-setting {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
  padding:13px 14px;
  border:1px solid #dce6f5;
  border-radius:13px;
  background:#fbfcff;
}
.font-size-setting-copy{min-width:0}
.font-size-setting h3{margin:0;color:#233d6c;font-size:.9rem}
.font-size-setting-field{flex:0 1 170px;min-width:0}
.font-size-setting-field select{width:100%;max-width:100%;min-height:36px;padding:7px 30px 7px 9px;border:1px solid #d7e1ef;border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:.76rem;font-weight:750}
.settings-actions {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}
.settings-action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid #e0e7f1;
  border-radius: 13px;
  background: #fbfcff;
}
.settings-action-card > div { min-width: 0; }
.settings-action-card strong { display: block; color: #233d6c; font-size: .83rem; }
.settings-action-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.settings-action-card.danger-card { background: #fffafb; border-color: #f0dadd; }
.settings-action-btn {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 11px;
  font-size: .73rem;
  white-space: nowrap;
}
.settings-status {
  display: block;
  min-height: 1.1em;
  margin-top: 8px;
  color: #5e6d85;
  font-size: .69rem;
  font-weight: 750;
}

@media (max-width: 780px) {
  .materials-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin: 8px -4px 0;
    padding: 4px 4px 6px;
  }
  .materials-tab {
    min-height: 32px;
    padding: 5px 2px;
    border-radius: 8px;
    font-size: .64rem;
    letter-spacing: -.018em;
  }
  .materials-questions-section,
  .settings-section {
    padding: 12px;
    border-radius: 14px;
  }
  .materials-question-searchbar {
    margin-top: 10px;
    gap: 6px;
    padding: 5px 6px 5px 9px;
  }
  .materials-question-searchbar input { font-size: .76rem; }
  .materials-question-searchbar .primary {
    min-height: 32px;
    padding: 6px 9px;
    font-size: .7rem;
  }
  .materials-question-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 7px;
  }
  .materials-question-actions button {
    min-height: 34px;
    padding: 7px 6px;
    font-size: .69rem;
  }
  .materials-question-category-wrap { margin-top: 12px; }
  .materials-question-categories { grid-template-columns: 1fr; gap: 5px; }
  .materials-question-category { padding: 8px 9px; }
  .settings-action-card {
    align-items: flex-start;
    padding: 11px;
    gap: 10px;
  }
  .settings-action-card p { font-size: .68rem; }
  .settings-action-btn { min-height: 34px; padding: 7px 9px; font-size: .68rem; }
}

@media (max-width: 420px) {
  .materials-tab {
    min-height: 30px;
    font-size: .61rem;
    padding-inline: 1px;
  }
  .materials-modal-head p { display: none; }
  .materials-question-count { display: none; }
  .settings-action-card { flex-direction: column; }
  .settings-action-btn { width: 100%; }
}


/* Essay Practice — v28 */
.essay-practice-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid #cfdcf2;
  border-radius: 15px;
  background: linear-gradient(135deg, #f4f8ff, #fbfdff);
}
.essay-practice-entry-copy { min-width: 0; }
.essay-practice-entry-copy strong {
  display: block;
  margin-top: 2px;
  color: #18376d;
  font-size: .92rem;
}
.essay-practice-entry-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.42;
}
.essay-practice-progress {
  display: block;
  margin-top: 7px;
  color: #44608d;
  font-size: .68rem;
  font-weight: 800;
}
.essay-practice-entry > button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.essay-practice-dialog > .modal-inner {
  max-height: min(92dvh, 940px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.essay-practice-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.essay-practice-topline > div { display: flex; gap: 6px; flex-wrap: wrap; }
.essay-mastery {
  color: #64738a;
  font-size: .68rem;
  font-weight: 800;
  text-align: right;
}
.essay-question-card {
  margin-top: 12px;
  padding: 16px 17px;
  border: 1px solid #d6e1f1;
  border-radius: 16px;
  background: #f8fbff;
}
.essay-question-card h3 {
  margin: 0;
  color: #18396f;
  font-size: 1rem;
}
.essay-question-card p {
  margin: 7px 0 0;
  color: #3f4f67;
  font-size: .83rem;
  line-height: 1.52;
}
.essay-builder-section,
.essay-bank-section {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid #e0e7f1;
  border-radius: 15px;
  background: #fff;
}
.essay-builder-head,
.essay-bank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.essay-builder-head h3 {
  margin: 2px 0 0;
  font-size: .91rem;
}
.essay-builder-help {
  margin: 6px 0 10px;
  color: #748197;
  font-size: .69rem;
  line-height: 1.4;
}
.essay-answer-zone,
.essay-chip-bank {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 7px;
}
.essay-answer-zone {
  min-height: 76px;
  padding: 10px;
  border: 1.5px dashed #cbd7e8;
  border-radius: 12px;
  background: #fbfcff;
}
.essay-answer-placeholder {
  align-self: center;
  width: 100%;
  color: #8b96a7;
  font-size: .73rem;
  text-align: center;
}
.essay-bank-head {
  margin-bottom: 9px;
  color: #738097;
  font-size: .68rem;
  font-weight: 800;
}
.essay-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d4deeb;
  border-radius: 10px;
  background: #fff;
  color: #243a61;
  box-shadow: 0 1px 3px rgba(26,48,86,.05);
  font: inherit;
  font-size: .72rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.essay-chip:hover:not(:disabled) {
  border-color: #b9cae6;
  background: #f5f8fe;
}
.essay-bank-chip.used {
  opacity: .28;
  box-shadow: none;
}
.essay-answer-chip {
  background: #eef4ff;
  border-color: #c9d9f4;
  color: #1e4e9f;
}
.essay-answer-chip.correct {
  border-color: #9ccfb0;
  background: #effaf3;
  color: #176035;
}
.essay-answer-chip.incorrect {
  border-color: #e5a7ad;
  background: #fff1f2;
  color: #9b2633;
}
.essay-feedback {
  margin-top: 13px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid #e5c4c8;
  background: #fff7f8;
}
.essay-feedback.perfect {
  border-color: #b8dec5;
  background: #f3fbf5;
}
.essay-feedback-score {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.essay-feedback-score strong { font-size: .86rem; }
.essay-feedback-score span {
  color: #657289;
  font-size: .69rem;
  text-align: right;
}
.essay-feedback-group {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(112,126,148,.18);
}
.essay-feedback-group > strong {
  color: #6f2832;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.essay-feedback-group ul {
  margin: 5px 0 0;
  padding-left: 18px;
  color: #4f5b70;
  font-size: .72rem;
  line-height: 1.4;
}
.essay-model-answer {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #dce5f1;
  border-radius: 13px;
  background: #fafcff;
}
.essay-model-answer summary {
  color: #28509a;
  font-size: .75rem;
  font-weight: 850;
  cursor: pointer;
}
.essay-model-answer p {
  margin: 8px 0 0;
  color: #4b5b72;
  font-size: .76rem;
  line-height: 1.5;
}
.essay-practice-footer {
  align-items: center;
}
.essay-footer-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 700px) {
  .essay-practice-entry {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
  }
  .essay-practice-entry-copy p { display: none; }
  .essay-practice-entry > button {
    width: 100%;
    min-height: 36px;
  }
  .essay-practice-dialog {
    max-height: calc(100dvh - 12px);
  }
  .essay-practice-dialog > .modal-inner {
    max-height: calc(100dvh - 12px);
  }
  .essay-practice-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .essay-mastery { text-align: left; }
  .essay-question-card {
    margin-top: 9px;
    padding: 12px;
    border-radius: 13px;
  }
  .essay-question-card h3 { font-size: .9rem; }
  .essay-question-card p { font-size: .76rem; line-height: 1.45; }
  .essay-builder-section,
  .essay-bank-section {
    margin-top: 9px;
    padding: 10px;
    border-radius: 12px;
  }
  .essay-builder-help { margin-bottom: 8px; }
  .essay-answer-zone,
  .essay-chip-bank { gap: 6px; }
  .essay-answer-zone { min-height: 66px; padding: 8px; }
  .essay-chip {
    min-height: 31px;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: .68rem;
  }
  .essay-feedback { padding: 11px; }
  .essay-feedback-score {
    flex-direction: column;
    gap: 3px;
  }
  .essay-feedback-score span { text-align: left; }
  .essay-practice-footer {
    gap: 7px;
  }
  .essay-footer-right {
    width: 100%;
  }
  .essay-footer-right button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .essay-practice-dialog .modal-head p { display: none; }
  .essay-chip { font-size: .65rem; }
}


/* Essay mode header + intro — v29 */
.essay-intro-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.essay-intro-stat {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid #dce5f1;
  border-radius: 13px;
  background: #f8fbff;
  text-align: center;
}
.essay-intro-stat strong {
  display: block;
  color: #1d4389;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.essay-intro-stat span {
  display: block;
  margin-top: 3px;
  color: #6c7a90;
  font-size: .66rem;
  font-weight: 760;
  line-height: 1.25;
}

@media (max-width: 780px) {
  .topbar-right {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }
  .topbar-right > button {
    padding: 8px 3px;
    font-size: .7rem;
    letter-spacing: -.012em;
  }
}

@media (max-width: 480px) {
  .topbar-right {
    gap: 4px;
  }
  .topbar-right > button,
  .icon-btn,
  .primary.compact {
    min-height: 34px;
    padding: 7px 2px;
    font-size: .66rem;
    border-radius: 10px;
  }
  .essay-intro-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
  }
  .essay-intro-stat {
    padding: 9px 7px;
  }
}

@media (max-width: 360px) {
  .topbar-right > button,
  .icon-btn,
  .primary.compact {
    font-size: .62rem;
    letter-spacing: -.025em;
  }
}


/* Essay Q&A library + cleaner concept blocks — v30 */
.essay-library-dialog > .modal-inner {
  max-height: min(92dvh, 960px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.essay-library-toolbar {
  position: sticky;
  top: -1px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 8px 0 9px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.essay-library-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #f9fbfe;
  color: var(--muted);
}
.essay-library-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .8rem;
}
.essay-library-search-clear {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: #eaf0f8;
  color: #52627b;
}
.essay-library-summary {
  color: #697890;
  font-size: .69rem;
  font-weight: 800;
  white-space: nowrap;
}
.essay-library-list {
  display: grid;
  gap: 11px;
}
.essay-library-card {
  padding: 15px;
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: #fff;
}
.essay-library-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.essay-library-card h3 {
  margin: 2px 0 0;
  color: #1d3d76;
  font-size: .94rem;
}
.essay-library-progress {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #355b9d;
  font-size: .64rem;
  font-weight: 850;
  white-space: nowrap;
}
.essay-library-prompt {
  margin: 9px 0 0;
  color: #43526a;
  font-size: .78rem;
  line-height: 1.5;
}
.essay-library-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
}
.essay-library-actions > span {
  color: #7b8798;
  font-size: .66rem;
  font-weight: 750;
}
.essay-library-details {
  margin-top: 9px;
  border-radius: 11px;
  padding: 8px 10px;
  background: #fbfcff;
}
.essay-library-details summary {
  color: #31528c;
  font-size: .72rem;
}
.essay-library-points {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.essay-library-point {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 8px;
  align-items: start;
  color: #4d5a70;
  font-size: .72rem;
  line-height: 1.4;
}
.essay-library-point-status {
  min-width: 58px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #eef1f5;
  color: #68758a;
  font-size: .57rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}
.essay-library-point-status.mastered { background: #eaf8ef; color: #27623b; }
.essay-library-point-status.learning { background: #fff6df; color: #8b6500; }
.essay-library-model {
  margin: 8px 0 0;
  color: #4c5b70;
  font-size: .75rem;
  line-height: 1.52;
}
.essay-library-empty {
  padding: 24px 10px;
  color: #7a8799;
  font-size: .78rem;
  text-align: center;
}

.essay-chip-name {
  border-color: #bfcfee;
  background: #edf3ff;
  color: #1d4b99;
  font-weight: 850;
}
.essay-chip-position {
  background: #fff;
  color: #33445f;
}
.essay-answer-connector {
  align-self: center;
  color: #8b99ad;
  font-size: .78rem;
  font-weight: 900;
  user-select: none;
}
.essay-answer-chip.essay-chip-name {
  background: #eaf2ff;
}
.essay-answer-chip.essay-chip-position {
  background: #f7f9fd;
}
.essay-answer-chip.correct {
  border-color: #9ccfb0;
  background: #effaf3;
  color: #176035;
}
.essay-answer-chip.incorrect {
  border-color: #e5a7ad;
  background: #fff1f2;
  color: #9b2633;
}

@media (max-width: 700px) {
  .essay-library-dialog {
    max-height: calc(100dvh - 12px);
  }
  .essay-library-dialog > .modal-inner {
    max-height: calc(100dvh - 12px);
  }
  .essay-library-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 4px;
    padding-top: 5px;
  }
  .essay-library-summary {
    white-space: normal;
  }
  .essay-library-card {
    padding: 11px;
    border-radius: 12px;
  }
  .essay-library-card-head {
    gap: 8px;
  }
  .essay-library-progress {
    padding: 4px 6px;
    font-size: .58rem;
  }
  .essay-library-prompt {
    font-size: .73rem;
    line-height: 1.45;
  }
  .essay-library-actions {
    justify-content: space-between;
    gap: 7px;
  }
  .essay-library-actions button {
    min-height: 33px;
    padding: 7px 9px;
    font-size: .68rem;
  }
  .essay-library-point {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .essay-library-point-status {
    width: max-content;
  }
  .essay-answer-connector {
    font-size: .68rem;
  }
}

.essay-chip-extra {
  background: #fff;
  color: #33445f;
}


/* Essay Practice sequential matcher — v32 */
.essay-build-progress,
.essay-match-count {
  flex: 0 0 auto;
  color: #6d7b91;
  font-size: .68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.essay-built-answer {
  display: grid;
  gap: 8px;
  min-height: 74px;
}

.essay-built-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid #d8e8de;
  border-radius: 11px;
  background: #f5fbf7;
}

.essay-built-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: #dff3e6;
  color: #267044;
  font-size: .72rem;
  font-weight: 900;
}

.essay-built-copy {
  min-width: 0;
}

.essay-built-copy > strong {
  display: block;
  color: #24406e;
  font-size: .76rem;
}

.essay-built-copy > span {
  display: block;
  margin-top: 3px;
  color: #45546a;
  font-size: .73rem;
  line-height: 1.42;
}

.essay-match-section {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid #dbe4f1;
  border-radius: 15px;
  background: #fff;
}

.essay-match-section.complete {
  border-color: #badbc5;
  background: #f7fcf8;
}

.essay-match-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.essay-match-head h3 {
  margin: 2px 0 0;
  color: #263c65;
  font-size: .92rem;
}

.essay-match-target {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 13px;
  background: #eef4ff;
  border: 1px solid #ccdaf2;
}

.essay-match-context {
  display: block;
  color: #637390;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.essay-match-target strong {
  display: block;
  margin-top: 4px;
  color: #1d4a95;
  font-size: .96rem;
  line-height: 1.3;
}

.essay-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.essay-choice {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d7e0ec;
  border-radius: 12px;
  background: #fff;
  color: #33445f;
  box-shadow: 0 1px 3px rgba(26,48,86,.04);
  font: inherit;
  font-size: .75rem;
  font-weight: 720;
  line-height: 1.42;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.essay-choice:hover:not(:disabled) {
  border-color: #afc2e0;
  background: #f7f9fd;
}

.essay-choice:active:not(:disabled) {
  transform: scale(.995);
}

.essay-choice.incorrect {
  border-color: #e2a6ad;
  background: #fff1f2;
  color: #972936;
}

.essay-choice.correct {
  border-color: #94caa8;
  background: #effaf3;
  color: #17613a;
}

.essay-choice:disabled {
  cursor: default;
  opacity: 1;
}

.essay-choice-feedback {
  display: flex;
  gap: 7px;
  align-items: baseline;
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: .7rem;
  line-height: 1.35;
}

.essay-choice-feedback.incorrect {
  background: #fff3f4;
  color: #8f303a;
}

.essay-choice-feedback.correct {
  background: #eff9f2;
  color: #24603a;
}

.essay-choice-feedback strong {
  flex: 0 0 auto;
}

.essay-choice-feedback span {
  color: inherit;
}

@media (max-width: 700px) {
  .essay-builder-section,
  .essay-match-section {
    padding: 10px;
  }

  .essay-built-answer {
    gap: 6px;
    min-height: 62px;
  }

  .essay-built-row {
    gap: 7px;
    padding: 8px 9px;
  }

  .essay-built-check {
    width: 20px;
    height: 20px;
    font-size: .65rem;
  }

  .essay-built-copy > strong,
  .essay-built-copy > span {
    font-size: .69rem;
  }

  .essay-match-target {
    margin-top: 9px;
    padding: 10px 11px;
  }

  .essay-match-target strong {
    font-size: .86rem;
  }

  .essay-choice-list {
    gap: 6px;
    margin-top: 8px;
  }

  .essay-choice {
    min-height: 43px;
    padding: 8px 9px;
    border-radius: 10px;
    font-size: .69rem;
  }

  .essay-choice-feedback {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    font-size: .66rem;
  }
}


/* Content feedback — v33 */
.question-top-actions,
.essay-match-actions,
.essay-question-card-head {
  display:flex;
  align-items:center;
  gap:8px;
}
.essay-question-card-head {
  justify-content:space-between;
}
.essay-question-card-head h3 { margin:0; }

.content-report-btn {
  display:inline-grid;
  place-items:center;
  width:30px;
  height:30px;
  padding:0;
  border:1px solid #d6dfec;
  border-radius:9px;
  background:#f8faff;
  color:#60718b;
  font:inherit;
  font-size:.78rem;
  line-height:1;
  text-align:left;
  cursor:pointer;
}
.content-report-btn:hover:not(:disabled),
.content-report-btn:focus-visible {
  border-color:#b9c9df;
  background:#eef3fb;
  color:#31538e;
  outline:none;
}
.content-report-btn:disabled {
  opacity:.4;
  cursor:default;
}
.content-report-link {
  padding:0;
  border:0;
  background:transparent;
  color:#66768e;
  font:inherit;
  font-size:.67rem;
  font-weight:800;
  cursor:pointer;
}
.content-report-link:hover,
.content-report-link:focus-visible { color:#31538e; outline:none; }

.review-topline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.essay-built-row {
  grid-template-columns:auto minmax(0,1fr) auto;
}
.essay-built-report {
  align-self:start;
  width:27px;
  height:27px;
}
.essay-library-point {
  grid-template-columns:auto minmax(0,1fr) auto;
}
.essay-library-point-report {
  width:26px;
  height:26px;
  align-self:start;
}
.content-feedback-target {
  margin-top:12px;
  padding:12px 13px;
  border:1px solid #dbe4f0;
  border-radius:13px;
  background:#f8fbff;
}
.content-feedback-target strong {
  display:block;
  margin-top:3px;
  color:#24406e;
  font-size:.85rem;
}
.content-feedback-target p {
  margin:5px 0 0;
  color:#526078;
  font-size:.74rem;
  line-height:1.45;
}
.content-feedback-reasons {
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  gap:7px;
  margin:13px 0 0;
  padding:0;
  border:0;
}
.content-feedback-reasons legend {
  flex:1 0 100%;
  width:100%;
  margin-bottom:2px;
  color:#354761;
  font-size:.73rem;
  font-weight:850;
}
.content-feedback-reasons .content-feedback-reason {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  min-height:38px;
  padding:8px 10px;
  border:1px solid #dde5ef;
  border-radius:10px;
  background:#fff;
  color:#44536b;
  font-size:.72rem;
  font-weight:760;
  text-align:left;
  cursor:pointer;
  flex:0 1 auto;
}
.content-feedback-reasons .content-feedback-reason[aria-pressed="true"] {
  border-color:#6f8fc9;
  background:#e8f0ff;
  color:#173f86;
  box-shadow:inset 0 0 0 1px rgba(43,87,169,.12);
}
.content-feedback-reasons .content-feedback-reason[aria-pressed="true"]::after{content:"✓";font-size:.82em;font-weight:900}
.content-feedback-reasons .content-feedback-reason:focus-visible{outline:3px solid rgba(49,86,183,.22);outline-offset:2px}
.content-feedback-details {
  display:block;
  margin-top:13px;
}
.content-feedback-details > span:first-child {
  display:block;
  color:#354761;
  font-size:.73rem;
  font-weight:850;
}
.content-feedback-details small {
  color:var(--muted);
  font-weight:700;
}
.content-feedback-details textarea {
  width:100%;
  box-sizing:border-box;
  margin-top:6px;
  padding:10px 11px;
  border:1px solid #d6dfeb;
  border-radius:11px;
  background:#fff;
  color:var(--text);
  resize:vertical;
  font:inherit;
  font-size:.76rem;
  line-height:1.45;
  min-height:100px;
}
.content-feedback-details textarea:focus {
  outline:2px solid rgba(61,104,181,.18);
  border-color:#aebfdd;
}
.content-feedback-count {
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:.63rem;
  font-weight:760;
  text-align:right;
}
.content-feedback-status {
  min-height:1.25em;
  margin-top:8px;
  color:#52647d;
  font-size:.69rem;
  font-weight:760;
}

@media(max-width:700px){
  .content-report-btn { width:28px;height:28px;border-radius:8px; }
  .content-feedback-reasons { gap:6px; }
  .content-feedback-reasons .content-feedback-reason { min-height:36px;padding:7px 9px; }
  .essay-library-point { grid-template-columns:auto minmax(0,1fr) auto; }
}

/* Essay study aids */
.essay-pairing-audio{margin:10px 0 2px}
.essay-library-point-actions{display:inline-flex;align-items:center;gap:5px;margin-left:auto}
.essay-library-audio{font-size:.72rem}
.resource-actions .resource-btn:disabled{opacity:.58;cursor:wait}
@media(max-width:650px){.essay-library-point{align-items:flex-start}.essay-library-point-actions{flex:0 0 auto}}

/* v35: chabura profile, update/share affordances */
.chabura-setting{
  display:grid;
  gap:12px;
  margin-top:14px;
  padding:14px;
  border:1px solid #dce6f5;
  border-radius:14px;
  background:#f8fbff;
}
.chabura-setting-copy h3{margin:2px 0 0;font-size:.92rem}
.chabura-setting-copy p{margin:5px 0 0;color:var(--muted);font-size:.74rem;line-height:1.45}
.chabura-fields,.chabura-dialog-fields{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr) auto;gap:9px;align-items:end}
.chabura-fields label,.chabura-dialog-fields label{display:grid;gap:5px;min-width:0}
.chabura-fields label>span,.chabura-dialog-fields label>span{color:var(--muted);font-size:.66rem;font-weight:850;letter-spacing:.045em;text-transform:uppercase}
.chabura-fields select,.chabura-dialog-fields select{
  width:100%;min-width:0;min-height:38px;padding:8px 9px;border:1px solid #d7e1ef;border-radius:10px;
  background:#fff;color:var(--text);font:inherit;font-size:.76rem
}
.chabura-dialog{width:min(680px,calc(100% - 22px))}
.chabura-dialog-inner{overflow:visible}
.chabura-dialog-fields{grid-template-columns:1fr;margin-top:12px}
.brand-share-target{transition:opacity .12s ease,transform .08s ease}
@media(max-width:780px){
  .brand-share-target{cursor:pointer;-webkit-tap-highlight-color:transparent}
  .brand-share-target:active{opacity:.72;transform:scale(.98)}
  .chabura-fields{grid-template-columns:1fr}
  .chabura-fields .settings-action-btn{justify-self:start}
}

/* v37: fast mobile taps, quick question jump, update status */
html,body{touch-action:manipulation}
button,a,[role="button"],select,input,label{touch-action:manipulation}
.question-number-jump{appearance:none;border:0;font:inherit;cursor:pointer}
.question-number-jump:focus-visible{outline:3px solid rgba(49,86,183,.28);outline-offset:2px}
.app-version-footer{padding:0 16px calc(18px + env(safe-area-inset-bottom));text-align:center;color:var(--muted);font-size:.72rem;letter-spacing:.02em}
.app-toast{position:fixed;z-index:90;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translate(-50%,12px);max-width:min(90vw,520px);padding:10px 14px;border-radius:999px;background:#172554;color:#fff;box-shadow:0 12px 34px rgba(13,26,68,.28);font-size:.82rem;font-weight:750;text-align:center;opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.app-toast.show{opacity:1;transform:translate(-50%,0)}
.update-pull-indicator{position:fixed;z-index:80;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translate(-50%,-8px);padding:7px 11px;border-radius:999px;background:rgba(19,33,60,.94);color:#fff;box-shadow:0 8px 24px rgba(13,26,68,.2);font-size:.72rem;font-weight:750;pointer-events:none;opacity:0;transition:opacity .12s ease,transform .12s ease}
.update-pull-indicator.visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:780px){.question-number-jump{min-height:30px}.app-version-footer{padding-bottom:calc(84px + env(safe-area-inset-bottom))}}

/* v39: inline glossary terms in essay buildout + native question jump */
.essay-built-copy > span .glossary-term,
.essay-built-copy > strong .glossary-term{
  display:inline;
  margin-top:0;
  font-size:inherit;
  line-height:inherit;
}
.question-number-jump{
  appearance:auto;
  -webkit-appearance:menulist;
  border:0;
  cursor:pointer;
  width:auto;
  max-width:150px;
  padding-right:4px;
  background-color:var(--pill-bg,#eef3fb);
}
.question-number-jump:focus-visible{outline:3px solid rgba(49,86,183,.28);outline-offset:2px}

/* v40: main-window Essay mode + refined quick question navigation */
.essay-practice-main{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:clamp(20px,4vw,38px);
}
.essay-practice-main-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:14px;
  border-bottom:1px solid #e6ebf3;
}
.essay-practice-main-head h1{margin:3px 0 0;font-size:clamp(1.3rem,2.2vw,1.7rem)}
.essay-practice-main-head p{margin:5px 0 0;color:var(--muted);font-size:.84rem;line-height:1.45}
.essay-practice-main .essay-practice-topline{margin-top:16px}
.essay-practice-main .essay-practice-footer{margin-top:18px}

.question-number-jump{
  display:inline-block;
  appearance:none;
  -webkit-appearance:none;
  min-height:30px;
  width:132px;
  max-width:132px;
  padding:5px 31px 5px 12px;
  border:1px solid #c8d7ef;
  border-radius:999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%23234382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px 12px,
    linear-gradient(180deg,#f5f8ff 0%,#e8f0ff 100%);
  color:#234382;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 1px 2px rgba(28,58,112,.08);
  font:inherit;
  font-size:.75rem;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease;
}
.question-number-jump:hover{border-color:#a9bee1;box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 2px 6px rgba(28,58,112,.1)}
.question-number-jump:focus{border-color:#809fd4}
.question-number-jump option{color:#17243c;background:#fff;font-weight:650}
.question-number-picker{position:relative;display:inline-block;vertical-align:middle}
.question-number-trigger,.question-number-menu{display:none}
@media(hover:hover) and (pointer:fine){
  .question-number-picker .question-number-jump{display:none}
  .question-number-trigger{
    display:inline-flex;align-items:center;justify-content:flex-start;min-height:30px;width:132px;padding:5px 31px 5px 12px;
    border:1px solid #c8d7ef;border-radius:999px;background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%23234382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px 12px,
      linear-gradient(180deg,#f5f8ff 0%,#e8f0ff 100%);
    color:#234382;box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 1px 2px rgba(28,58,112,.08);
    font:inherit;font-size:.75rem;font-weight:800;line-height:1;cursor:pointer;text-align:left
  }
  .question-number-trigger:hover{border-color:#a9bee1;box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 2px 6px rgba(28,58,112,.1)}
  .question-number-trigger:focus-visible{outline:3px solid rgba(49,86,183,.28);outline-offset:2px}
  .question-number-menu:not(.hidden){
    position:absolute;z-index:45;top:calc(100% + 7px);left:0;display:grid;grid-template-columns:repeat(6,minmax(34px,1fr));gap:5px;
    width:308px;max-width:min(308px,calc(100vw - 32px));max-height:min(440px,70vh);overflow:auto;scrollbar-gutter:stable;
    padding:9px;border:1px solid #c8d7ef;border-radius:14px;background:#fff;box-shadow:0 16px 40px rgba(20,45,90,.18)
  }
  .question-number-option{min-width:0;min-height:32px;padding:4px;border:1px solid transparent;border-radius:8px;background:#f5f8fc;color:#314764;font:inherit;font-size:.72rem;font-weight:800}
  .question-number-option:hover,.question-number-option:focus-visible{border-color:#b5c9e8;background:#eef4ff;color:#234382;outline:0}
  .question-number-option.selected{border-color:#7597d3;background:#dfeaff;color:#173e88;box-shadow:inset 0 0 0 1px rgba(49,86,183,.08)}
}
@media(max-width:780px){
  .essay-practice-main{border-radius:16px;padding:16px 14px}
  .essay-practice-main-head{padding-bottom:10px}
  .essay-practice-main-head p{display:none}
  .question-number-jump{width:124px;max-width:124px;min-height:31px;padding-left:10px;font-size:.7rem}
}

/* v43: compact Essay-mode navigation */
.essay-mode-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.essay-mode-toolbar-main{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
}
.essay-mode-toolbar-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.essay-quick-nav{
  appearance:none;
  -webkit-appearance:none;
  min-height:34px;
  width:min(330px,52vw);
  max-width:100%;
  padding:6px 34px 6px 12px;
  border:1px solid #c8d7ef;
  border-radius:999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%23234382' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 12px 12px,
    linear-gradient(180deg,#f5f8ff 0%,#e8f0ff 100%);
  color:#234382;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 1px 2px rgba(28,58,112,.08);
  font:inherit;
  font-size:.77rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.essay-quick-nav:focus-visible{outline:3px solid rgba(49,86,183,.22);outline-offset:2px}
.essay-category-tags{display:flex;flex-wrap:wrap;gap:5px}
.essay-category-tag{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  background:#f0f3f8;
  color:#56657e;
  font-size:.7rem;
  font-weight:800;
  white-space:nowrap;
}
.essay-practice-main > .essay-practice-topline{margin-top:0}
@media(max-width:780px){
  .essay-mode-toolbar{align-items:stretch;flex-direction:column}
  .essay-mode-toolbar-main{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
  .essay-quick-nav{width:100%;max-width:none}
  .essay-mode-toolbar-actions{display:grid;grid-template-columns:1fr 1fr}
  .essay-mode-toolbar-actions button{min-height:38px;padding:8px 10px}
  .essay-category-tags{overflow-x:auto;flex-wrap:nowrap;padding-bottom:1px;scrollbar-width:none}
  .essay-category-tags::-webkit-scrollbar{display:none}
}

/* v44: Essay controls, App Info, and compact quick navigation */
.essay-quick-nav{
  width:178px;
  max-width:178px;
}
.essay-mode-toolbar-main{flex:1 1 auto}
.brand-info-target{cursor:pointer;-webkit-tap-highlight-color:transparent}
.brand-info-target:focus-visible{outline:3px solid rgba(255,255,255,.55);outline-offset:3px}
.app-info-dialog{width:min(480px,calc(100% - 24px))}
.app-info-inner{overflow:visible}
.app-info-section{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.app-info-label{display:block;margin-bottom:8px;color:var(--muted);font-size:.7rem;font-weight:850;letter-spacing:.055em;text-transform:uppercase}
.app-info-mode-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.app-info-mode-grid .active-mode{border-color:#7896cb;background:#e7efff;color:#234382;box-shadow:inset 0 0 0 1px rgba(36,61,131,.08)}
.app-info-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
@media(max-width:780px){
  .essay-mode-toolbar{display:block}
  .essay-mode-toolbar-main{display:flex;align-items:center;flex-wrap:wrap}
  .essay-quick-nav{width:154px;max-width:154px;min-height:32px;font-size:.7rem}
  .essay-category-tags{flex:1 1 150px;min-width:0}
}
@media(max-width:430px){
  .app-info-actions{grid-template-columns:1fr}
}

/* v45: About dialog title/version and shared info targets */
.app-info-title-row{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.app-info-title-row h2{margin:0}
.app-info-version{color:var(--muted);font-size:.92rem;font-weight:400;white-space:nowrap}
.brand-info-target{cursor:pointer}
@media(min-width:431px){
  .app-info-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* v47: course-note references and in-app PDF viewer */
.course-note-links{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:12px 0 4px;
}
.course-note-link{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:31px;
  padding:6px 10px;
  border:1px solid #d2deee;
  border-radius:999px;
  background:#f7f9fc;
  color:#31558f;
  font-size:.72rem;
  font-weight:800;
  cursor:pointer;
}
.course-note-link:hover{background:#edf3fc;border-color:#b7cae5}
.course-note-link small{color:var(--muted);font-size:.65rem;font-weight:750}
.essay-library-note-links{margin:9px 0 2px}
.essay-library-note-links .course-note-link{min-height:29px;padding:5px 9px;font-size:.68rem}

.pdf-viewer-dialog{
  width:100vw;
  max-width:none;
  height:100dvh;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  overflow:hidden;
  overscroll-behavior:none;
  background:#e7ecf3;
}
.pdf-viewer-dialog::backdrop{background:rgba(6,14,32,.72)}
.pdf-viewer-shell{display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100dvh;overflow:hidden}
.pdf-viewer-nav{
  position:relative;
  z-index:4;
  display:grid;
  grid-template-columns:auto minmax(120px,auto) minmax(220px,1fr) auto;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:calc(8px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left));
  border-bottom:1px solid #ccd7e6;
  background:#fff;
  box-shadow:0 2px 10px rgba(22,37,68,.08);
}
.pdf-viewer-btn{
  min-width:0;
  min-height:36px;
  padding:7px 11px;
  border:1px solid #d3deed;
  border-radius:10px;
  background:#f7f9fc;
  color:#31558f;
  font:inherit;
  font-size:.74rem;
  font-weight:800;
  white-space:nowrap;
  cursor:pointer;
}
.pdf-viewer-btn.primary{background:#2456d3;border-color:#2456d3;color:#fff}
.pdf-viewer-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#182744;
  font-size:.84rem;
}
.pdf-viewer-jump-picker{position:relative;width:100%;min-width:0}
.pdf-viewer-jump{
  width:100%;
  min-width:0;
  min-height:36px;
  padding:7px 30px 7px 10px;
  border:1px solid #d3deed;
  border-radius:10px;
  background:#fff;
  color:#253a60;
  font:inherit;
  font-size:.72rem;
  font-weight:700;
  text-overflow:ellipsis;
}
.pdf-viewer-jump-trigger,.pdf-viewer-jump-menu{display:none}
@media(hover:hover) and (pointer:fine){
  .pdf-viewer-jump-picker .pdf-viewer-jump{display:none}
  .pdf-viewer-jump-trigger{
    display:flex;align-items:center;width:100%;min-width:0;min-height:36px;padding:7px 32px 7px 10px;
    border:1px solid #d3deed;border-radius:10px;background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5' fill='none' stroke='%2331558f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 12px 12px,
      #fff;color:#253a60;font:inherit;font-size:.72rem;font-weight:700;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  .pdf-viewer-jump-trigger:hover{border-color:#adc1de;background-color:#f8fbff}
  .pdf-viewer-jump-trigger:focus-visible{outline:3px solid rgba(49,86,183,.24);outline-offset:2px}
  .pdf-viewer-jump-menu:not(.hidden){
    position:absolute;z-index:8;top:calc(100% + 7px);left:0;right:auto;display:grid;gap:9px;
    width:100%;min-width:100%;max-width:100%;max-height:min(520px,65vh);overflow:auto;scrollbar-gutter:stable;
    padding:10px;border:1px solid #c8d7ef;border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(20,45,90,.2)
  }
  .pdf-viewer-jump-section{display:grid;gap:4px;min-width:0}
  .pdf-viewer-jump-section-title{position:sticky;top:-10px;z-index:1;margin:-1px -2px 2px;padding:8px 7px 6px;background:#fff;color:#60718a;font-size:.64rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
  .pdf-viewer-jump-option{width:100%;min-width:0;padding:8px 9px;border:1px solid transparent;border-radius:9px;background:#f7f9fc;color:#314764;font:inherit;font-size:.7rem;font-weight:720;line-height:1.35;text-align:left}
  .pdf-viewer-jump-option:hover,.pdf-viewer-jump-option:focus-visible{border-color:#b5c9e8;background:#eef4ff;color:#234382;outline:0}
  .pdf-viewer-jump-option.selected{border-color:#7597d3;background:#dfeaff;color:#173e88;box-shadow:inset 0 0 0 1px rgba(49,86,183,.08)}
}
.pdf-viewer-actions{display:grid;grid-template-columns:repeat(3,minmax(0,auto));gap:6px;min-width:0}
.pdf-viewer-body{
  position:relative;
  min-width:0;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  background:#d9e0e9;
  padding:12px 10px calc(18px + env(safe-area-inset-bottom));
}
.pdf-viewer-status{
  position:sticky;
  top:8px;
  z-index:3;
  width:max-content;
  max-width:calc(100% - 24px);
  margin:0 auto 10px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(23,37,68,.9);
  color:#fff;
  box-shadow:0 8px 22px rgba(20,34,62,.18);
  font-size:.72rem;
  font-weight:750;
  text-align:center;
}
.pdf-viewer-status.hidden{display:none}
.pdf-viewer-pages{display:grid;gap:12px;justify-items:center;width:100%;min-height:100%}
.pdf-viewer-page{
  position:relative;
  width:min(980px,100%);
  max-width:100%;
  overflow:hidden;
  border:1px solid #c6d0de;
  border-radius:3px;
  background:#fff;
  box-shadow:0 4px 16px rgba(20,34,62,.13);
}
.pdf-viewer-page canvas{display:block;max-width:100%;height:auto;margin:0 auto;background:#fff}
.pdf-viewer-page:not(.rendered)::after{
  content:'Loading page…';
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:.7rem;
  font-weight:700;
}
.pdf-page-number{
  position:absolute;
  right:7px;
  bottom:7px;
  z-index:2;
  padding:3px 6px;
  border-radius:999px;
  background:rgba(24,39,68,.72);
  color:#fff;
  font-size:.58rem;
  font-weight:800;
  pointer-events:none;
}
.pdf-target-marker{
  position:absolute;
  z-index:3;
  left:0;
  right:0;
  height:0;
  border-top:3px solid rgba(36,86,211,.82);
  box-shadow:0 0 0 3px rgba(36,86,211,.08);
  pointer-events:none;
  transition:opacity .35s ease;
}
.pdf-target-marker span{
  position:absolute;
  left:8px;
  top:-14px;
  padding:3px 7px;
  border-radius:999px;
  background:#2456d3;
  color:#fff;
  font-size:.6rem;
  font-weight:850;
  box-shadow:0 2px 7px rgba(25,54,116,.25);
}
.pdf-target-marker.settled{opacity:.42}
.resource-btn.view-pdf-btn{background:#eef3fb;color:#294e94;border-color:#cbd9ed}

@media(max-width:780px){
  .pdf-viewer-nav{
    grid-template-columns:auto minmax(0,1fr);
    gap:6px;
    padding-left:max(7px,env(safe-area-inset-left));
    padding-right:max(7px,env(safe-area-inset-right));
  }
  .pdf-viewer-back{grid-column:1}
  .pdf-viewer-title{grid-column:2;font-size:.8rem}
  .pdf-viewer-jump-picker{grid-column:1 / -1;grid-row:2}
  .pdf-viewer-jump{min-height:34px;font-size:.68rem}
  .pdf-viewer-actions{grid-column:1 / -1;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .pdf-viewer-actions .pdf-viewer-btn{width:100%;min-width:0;min-height:34px;padding:6px 5px;font-size:.68rem}
  .pdf-viewer-body{padding:7px 5px calc(12px + env(safe-area-inset-bottom))}
  .pdf-viewer-pages{gap:8px}
  .pdf-viewer-page{width:100%;border-left:0;border-right:0;border-radius:0}
}

/* v48: six-section Materials navigation + Essay Explorer */
.materials-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}
.materials-panel .materials-essays-section{margin-top:0}
.materials-essays-section{
  padding:16px;
  border:1px solid #dce6f5;
  border-radius:17px;
  background:#fff;
}
.materials-essay-list{
  display:grid;
  gap:7px;
  margin-top:14px;
}
.materials-essay-card{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  width:100%;
  padding:11px 12px;
  border:1px solid #e0e7f1;
  border-radius:12px;
  background:#f8faff;
  color:#243c69;
  text-align:left;
  font:inherit;
  cursor:pointer;
}
.materials-essay-card:hover{border-color:#c9d7ed;background:#f1f5fd}
.materials-essay-number{
  padding:4px 7px;
  border-radius:999px;
  background:#eef4ff;
  color:#2853a5;
  font-size:.64rem;
  font-weight:850;
  white-space:nowrap;
}
.materials-essay-copy{min-width:0}
.materials-essay-copy strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.78rem;
}
.materials-essay-copy small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:.65rem;
  line-height:1.3;
}
.materials-essay-chevron{color:#6d7e99;font-size:1.25rem;line-height:1}
@media(max-width:780px){
  .materials-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .materials-tab{min-height:34px;padding:6px 4px;font-size:.69rem}
  .materials-essays-section{padding:12px;border-radius:14px}
  .materials-essay-card{padding:9px 10px;gap:8px}
  .materials-essay-copy strong{font-size:.74rem}
}

/* v50: cohort-aware settings */
.cohort-setting{
  display:grid;
  gap:12px;
  margin-top:14px;
  padding:14px;
  border:1px solid #dce6f5;
  border-radius:14px;
  background:#f8fbff;
}
.cohort-setting-copy h3{margin:2px 0 0;font-size:.92rem}
.cohort-setting-copy p{margin:5px 0 0;color:var(--muted);font-size:.74rem;line-height:1.45}
.cohort-setting-fields{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}
.cohort-setting-fields label{display:grid;gap:5px;min-width:0}
.cohort-setting-fields label>span{color:var(--muted);font-size:.66rem;font-weight:850;letter-spacing:.045em;text-transform:uppercase}
.cohort-setting-fields select{
  width:100%;min-width:0;min-height:38px;padding:8px 9px;border:1px solid #d7e1ef;border-radius:10px;
  background:#fff;color:var(--text);font:inherit;font-size:.76rem
}
@media(max-width:780px){
  .cohort-setting-fields{grid-template-columns:1fr}
  .cohort-setting-fields .settings-action-btn{justify-self:start}
}


/* v53: Zman notifications, reminders, and ordered data settings */
.notification-icon-btn{
  position:relative;display:inline-grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;
  border-radius:10px;background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.18);
}
.notification-icon-btn:hover{background:rgba(255,255,255,.18)}
.notification-icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.notification-alert{
  position:absolute;right:-3px;top:-4px;display:grid;place-items:center;width:16px;height:16px;border-radius:999px;
  background:#d83b4b;color:#fff;border:2px solid #172554;font-size:.62rem;font-weight:950;line-height:1;
}
.notification-inbox-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.notification-inbox-toolbar label{font-size:.72rem;color:var(--muted);font-weight:750}
.notification-inbox-status{min-height:20px;color:var(--muted);font-size:.72rem}
.notification-inbox-list{display:grid;gap:9px}
.notification-item{border:1px solid var(--line);border-radius:13px;background:#fff;padding:12px;display:grid;gap:7px}
.notification-item.unread{border-color:#b8ccef;background:#f8fbff}
.notification-item.archived{opacity:.7}
.notification-item-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.notification-item-head strong{font-size:.84rem;color:#243d6a}
.notification-item-kind{font-size:.62rem;font-weight:900;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.notification-item-body{margin:0;font-size:.75rem;line-height:1.48;color:#3f4f66}
.notification-item-meta{font-size:.62rem;color:var(--muted)}
.notification-item-actions{display:flex;gap:7px;flex-wrap:wrap}
.notification-item-actions button,.notification-item-actions a{display:inline-flex;align-items:center;text-decoration:none;border-radius:8px;padding:6px 8px;font-size:.66rem;font-weight:800}
.notification-item-actions a{background:#eef3fb;color:#31569a;border:1px solid #d7e1ef}
.settings-ordered-section{margin-top:14px}
.settings-feature-card{display:grid;gap:12px;padding:14px;border:1px solid #dce6f5;border-radius:14px;background:#f8fbff}
.settings-feature-copy h3{margin:2px 0 0;font-size:.92rem}
.settings-feature-copy p{margin:5px 0 0;color:var(--muted);font-size:.74rem;line-height:1.45}
.reminder-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:end}
.reminder-controls>label:not(.analytics-switch),.settings-inline-select{display:grid;gap:5px}
.reminder-controls>label>span,.settings-inline-select>span{color:var(--muted);font-size:.66rem;font-weight:850;letter-spacing:.045em;text-transform:uppercase}
.reminder-controls input[type="time"],.reminder-controls select,.settings-inline-select select{
  width:100%;min-height:38px;padding:8px 9px;border:1px solid #d7e1ef;border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:.76rem
}
.reminder-switch{justify-content:flex-start}
.settings-actions-ordered{display:grid;grid-template-columns:1fr;gap:10px;margin-top:14px}
.settings-transfer-card{align-items:flex-start}
.settings-checkbox-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:9px;font-size:.72rem;color:var(--text)}
.settings-checkbox-row label{display:flex;gap:5px;align-items:center}
.settings-transfer-actions{display:flex;gap:7px;flex-wrap:wrap}
.delete-all-card{border-color:#e8c9ce;background:#fff8f9}
@media(max-width:780px){
  .notification-icon-btn{flex:0 0 36px}
  .reminder-controls{grid-template-columns:1fr}
  .settings-transfer-card{flex-direction:column}
  .settings-transfer-actions{width:100%}
}

.reminder-controls,.reminder-controls>*{min-width:0;max-width:100%}
.reminder-controls input[type="time"],.reminder-controls select{
  display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;
}
.settings-feature-card,.cohort-setting,.chabura-setting{min-width:0}
.cohort-setting-fields,.chabura-fields,.cohort-setting-fields>*,
.chabura-fields>*{min-width:0;max-width:100%;box-sizing:border-box}

/* v56: timer + notification cluster and rich inbox bodies */
.timer-actions{
  position:relative;z-index:1;display:flex;align-items:center;justify-content:flex-end;gap:7px;flex:0 0 auto;
}
.timer-actions .timer-card{margin:0}
.notification-rich-body{font-size:.75rem;line-height:1.48;color:#3f4f66;overflow-wrap:anywhere}
.notification-rich-body p{margin:0 0 .55em}
.notification-rich-body p:last-child{margin-bottom:0}
.notification-rich-body ul,.notification-rich-body ol{margin:.35em 0 .55em;padding-left:1.35em}
.notification-rich-body a{color:#31569a;text-decoration:underline;font-weight:750}
@media(max-width:780px){
  .timer-actions{grid-column:2;grid-row:1;justify-self:end}
  .timer-actions .timer-card{min-width:112px}
}
@media(max-width:390px){
  .timer-actions{gap:5px}
  .timer-actions .timer-card{min-width:105px}
  .notification-icon-btn{width:34px;height:34px;flex-basis:34px}
}

/* v57: concise settings, permission nag, and intrinsic-size-safe reminder controls */
.setting-current-value{display:block;margin-top:2px;color:#66758b;font-size:.72rem;font-weight:700;line-height:1.4}
.cohort-setting-fields>select,.chabura-fields>select{width:100%;min-width:0;max-width:100%;min-height:38px;padding:8px 9px;border:1px solid #d7e1ef;border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:.76rem;box-sizing:border-box}
.settings-feature-card{overflow:hidden}
.reminder-controls{width:100%;max-width:100%;min-width:0;overflow:hidden}
.reminder-controls>*{min-width:0;max-width:100%;box-sizing:border-box}
.reminder-field{display:grid!important;grid-template-columns:minmax(0,1fr);gap:5px;width:100%;max-width:100%;min-width:0;overflow:hidden}
#studyReminderTime,#reminderCalendarMode{
  display:block!important;inline-size:100%!important;width:100%!important;min-inline-size:0!important;min-width:0!important;
  max-inline-size:100%!important;max-width:100%!important;box-sizing:border-box!important;
}
#studyReminderTime{-webkit-box-sizing:border-box!important}
.notification-permission-nag{
  width:100%;display:flex;align-items:center;gap:9px;margin:0 0 10px;padding:10px 11px;border:1px solid #d8e3f4;
  border-radius:11px;background:#f6f9ff;color:#355486;text-align:left;font:inherit;font-size:.72rem;font-weight:750;line-height:1.4;
}
.notification-permission-nag:hover{background:#eef4ff}
.notification-permission-icon{flex:0 0 auto;font-size:.9rem}
.reminder-summary{display:block;margin-top:2px;color:#52647d;font-size:.72rem;font-weight:740;line-height:1.4}
@media(max-width:780px){
  .cohort-setting-fields,.chabura-fields,.reminder-controls{width:100%;max-width:100%;min-width:0;overflow:hidden}
  #studyReminderTime,#reminderCalendarMode{font-size:16px!important}
  #studyReminderTime::-webkit-date-and-time-value{min-width:0;width:100%;text-align:center}
}

/* v58: compact reminder controls and stable Essay search FAB */
.reminder-field #studyReminderTime,
.reminder-field #reminderCalendarMode{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  padding:6px 9px!important;
  border-radius:10px!important;
  font-size:.76rem!important;
  line-height:1.2!important;
}
.reminder-field #studyReminderTime{
  appearance:none;
  -webkit-appearance:none;
  text-align:center;
}
.reminder-field #studyReminderTime::-webkit-date-and-time-value{
  min-height:0!important;
  padding:0!important;
  line-height:24px!important;
  text-align:center;
}
body.essay-mode-active .question-search-fab,
body.essay-mode-active.mini-audio-visible .question-search-fab{
  position:fixed!important;
  left:max(12px,env(safe-area-inset-left))!important;
  bottom:max(12px,env(safe-area-inset-bottom))!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;
}
@media(max-width:520px){
  .reminder-field #studyReminderTime,
  .reminder-field #reminderCalendarMode{
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    font-size:.76rem!important;
  }
  body.essay-mode-active .question-search-fab,
  body.essay-mode-active.mini-audio-visible .question-search-fab{
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    left:max(10px,env(safe-area-inset-left))!important;
  }
}


/* v59: compact pairing resources and cross-app link */
.pairing-resource-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin:6px 0 10px;
}
.pairing-resource-actions.hidden{display:none}
.pairing-resource-btn{
  position:relative;
  width:32px;
  height:32px;
  min-width:32px;
  min-height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid #d5deeb;
  border-radius:10px;
  background:#f8faff;
  color:#536b8d;
  cursor:pointer;
}
.pairing-resource-btn:hover{background:#eef4ff;border-color:#bfcde1}
.pairing-play-glyph{font-size:14px;line-height:1;transform:translateX(1px)}
.pairing-book-glyph{position:relative;display:inline-flex;align-items:center;justify-content:center}
.pairing-book-glyph svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pairing-notes-compact .pairing-book-glyph svg{width:16px;height:16px;stroke-width:1.7}
.pairing-notes-full .pairing-book-glyph svg{width:19px;height:19px;stroke-width:2}
.pairing-page-badge{
  position:absolute;
  top:-7px;
  right:-9px;
  min-width:15px;
  height:15px;
  padding:0 3px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d2dbe9;
  border-radius:999px;
  background:#fff;
  color:#385987;
  font-size:8px;
  line-height:1;
  font-weight:800;
  box-shadow:0 1px 2px rgba(23,37,84,.08);
}
.essay-library-point-actions{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:nowrap;
}
.essay-library-point-actions .pairing-resource-btn{
  width:30px;
  height:30px;
  min-width:30px;
  min-height:30px;
  border-radius:9px;
}
.essay-library-point-actions .content-report-btn{
  width:30px;
  height:30px;
  min-width:30px;
  min-height:30px;
}
.settings-link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  box-sizing:border-box;
}
.question-card > .course-note-links + .question-audio,
#reviewNoteLinks + .review-audio{
  margin-top:8px;
}
@media(max-width:560px){
  .pairing-resource-btn{width:30px;height:30px;min-width:30px;min-height:30px}
  .essay-library-point-actions{gap:4px}
}


/* v60: unified contextual study resources */
.study-resource-cluster{
  display:grid;
  gap:6px;
  margin:10px 0 15px;
  min-width:0;
}
.study-resource-cluster .course-note-links,
.study-resource-cluster .question-audio{
  margin:0;
}
.course-note-links{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.course-note-links.hidden,
.question-audio.hidden{display:none!important}
.course-note-link.study-resource-chip{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:6px 10px 6px 8px;
  border:1px solid #d8e2ef;
  border-radius:11px;
  background:#fff;
  color:#355687;
  box-shadow:none;
  font-size:.7rem;
  font-weight:800;
}
.course-note-link.study-resource-chip:hover{
  border-color:#bdcde2;
  background:#f8fbff;
}
.study-resource-book{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:23px;
  height:23px;
  flex:0 0 23px;
}
.study-resource-book svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.course-note-full .study-resource-book svg{width:21px;height:21px;stroke-width:1.95}
.study-resource-page{
  position:absolute;
  top:-5px;
  right:-7px;
  min-width:14px;
  height:14px;
  padding:0 3px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d1dbe8;
  border-radius:999px;
  background:#fff;
  color:#365a91;
  font-size:7.5px;
  line-height:1;
  font-weight:900;
  box-shadow:0 1px 3px rgba(24,42,75,.08);
}
.study-resource-chip-label{white-space:nowrap}

.question-audio{
  display:grid;
  gap:5px;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.question-audio-label{display:none}
.question-audio-row.study-resource-audio-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  gap:5px;
  align-items:stretch;
  margin:0;
}
.question-audio-row.study-resource-audio-row + .question-audio-row.study-resource-audio-row{margin-top:0}
.question-audio-play.study-resource-audio-main{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  gap:8px;
  align-items:center;
  min-width:0;
  min-height:42px;
  padding:6px 9px;
  border:1px solid #d8e2ef;
  border-radius:11px;
  background:#fff;
  color:var(--text);
  box-shadow:none;
}
.question-audio-play.study-resource-audio-main:hover{
  border-color:#bdcde2;
  background:#f8fbff;
}
.study-resource-playicon{
  width:26px;
  height:26px;
  box-shadow:none;
  font-size:.62rem;
}
.study-resource-audio-main .question-audio-copy strong{
  font-size:.75rem;
  font-weight:820;
}
.study-resource-audio-main .question-audio-copy small{
  margin-top:1px;
  font-size:.65rem;
}
.question-audio-transcript.study-resource-transcript{
  width:34px;
  min-width:34px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #d8e2ef;
  border-radius:11px;
  background:#fff;
  color:#526b91;
}
.study-resource-transcript svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.question-audio-transcript.study-resource-transcript:hover{
  border-color:#bdcde2;
  background:#f8fbff;
}
.review-resource-cluster,
.essay-question-resources,
.essay-library-resource-cluster{margin-top:9px}
.essay-library-resource-cluster{margin-bottom:3px}
.essay-library-note-links{margin:0}
.pairing-resource-btn{
  border-color:#d8e2ef;
  background:#fff;
  color:#526b91;
  box-shadow:none;
}
.pairing-resource-btn:hover{border-color:#bdcde2;background:#f8fbff}

.settings-transfer-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px 14px;
}
.settings-transfer-card .settings-transfer-actions{align-self:center}
.settings-card-status{
  grid-column:1/-1;
  display:block;
  min-height:1em;
  margin:0;
  color:#66758b;
  font-size:.7rem;
  font-weight:700;
}

@media(max-width:700px){
  .settings-transfer-card{grid-template-columns:1fr}
  .settings-card-status{grid-column:1}
  .study-resource-cluster{margin:8px 0 13px}
  .course-note-link.study-resource-chip{min-height:36px;padding:5px 9px 5px 7px}
  .question-audio-play.study-resource-audio-main{min-height:40px}
}
@media(max-width:700px){
  .essay-library-point-actions{
    flex-direction:column;
    align-items:center;
    gap:4px;
    margin-left:0;
  }
  .essay-library-point-actions .pairing-resource-btn,
  .essay-library-point-actions .content-report-btn{
    width:29px;
    height:29px;
    min-width:29px;
    min-height:29px;
  }
}

/* Explicit PDF caching and document actions */
#materialsPanelDownloads .materials-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.pdf-library-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
}
.resource-open{
  appearance:none;
  width:100%;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.resource-open:hover strong{color:#214fbe}
.resource-open:focus-visible{outline:2px solid #7da3f8;outline-offset:4px;border-radius:5px}
.resource-actions .pdf-resource-icon-btn{
  flex:0 0 40px;
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  padding:9px;
  border-radius:10px;
}
.pdf-resource-icon-btn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.pdf-viewer-actions{grid-template-columns:repeat(3,40px)}
.pdf-viewer-actions .pdf-resource-icon-btn{
  width:40px;
  height:40px;
  min-width:40px;
  min-height:40px;
  padding:9px;
}
.pdf-download-btn.pdf-cached{
  border-color:#e2e7ee;
  background:#f5f6f8;
  color:var(--muted);
}
.pdf-resource-icon-btn.is-busy{opacity:.55;cursor:wait}
@media(max-width:780px){
  #materialsPanelDownloads .materials-section-head{align-items:flex-start}
  .pdf-library-actions{align-items:flex-end;flex-direction:column;gap:6px}
  .resource-actions{display:flex;width:auto;flex-wrap:nowrap;justify-content:flex-start}
  .resource-actions [data-print-pdf]{display:inline-flex}
  .resource-actions [data-share-pdf],
  .resource-actions [data-save-pdf]{width:40px;min-width:40px;flex:0 0 40px}
  .pdf-viewer-actions{grid-template-columns:repeat(3,40px);width:auto;justify-self:end}
  .pdf-viewer-actions .pdf-resource-icon-btn{width:40px;min-width:40px;min-height:40px;padding:9px}
}
@media(max-width:520px){
  #materialsPanelDownloads .materials-section-head{flex-direction:column}
  .pdf-library-actions{width:100%;align-items:center;justify-content:space-between;flex-direction:row}
}

/* v67: centered desktop session timer and notification placement */
@media (min-width:781px) {
  .timer-actions{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    z-index:2;
  }
  .topbar-right{flex-wrap:nowrap}
}

@media (max-width:780px) {
  .timer-actions{margin-right:51px}
  .topbar-right{position:static}
  .topbar-right > #notificationsBtn{
    position:absolute;
    top:10px;
    right:12px;
    width:36px;
    min-width:36px;
    height:36px;
    min-height:36px;
    padding:0;
  }
}
@media (max-width:390px) {
  .topbar-right > #notificationsBtn{right:9px}
}

@media (pointer:coarse) {
  .sync-device-unlink-btn { width:44px; height:44px; flex-basis:44px; }
  .resource-actions .pdf-resource-icon-btn,
  .pdf-viewer-actions .pdf-resource-icon-btn,
  .notification-icon-btn { width:44px; height:44px; min-width:44px; min-height:44px; }
  .resource-actions .pdf-resource-icon-btn { flex-basis:44px; }
  .pdf-viewer-actions { grid-template-columns:repeat(3,44px); }
  .materials-tab { min-height:44px; }
  .question-audio-row.study-resource-audio-row { grid-template-columns:minmax(0,1fr) 44px; }
  .question-audio-transcript.study-resource-transcript { min-width:44px; min-height:44px; }
}

@media (max-width:780px) and (pointer:coarse) {
  .topbar-right > #notificationsBtn { top:calc(10px + .35rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation:none !important;
    scroll-behavior:auto !important;
    transition:none !important;
  }
}

/* v75: stable mode navigation and compact utility header */
.brand-copy{min-width:0}
.header-utility-btn,
.notification-icon-btn{
  position:relative;display:inline-grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;padding:0;
  border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.12);color:#fff;
}
.header-utility-btn:hover,
.notification-icon-btn:hover{background:rgba(255,255,255,.20)}
.header-utility-btn svg,
.notification-icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.timer-card{padding-right:42px}
.timer-reset-btn{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;
  border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.10);color:#fff;font-weight:850;line-height:1;
}
.timer-reset-btn:hover:not(:disabled){background:rgba(255,255,255,.22)}
.mode-nav{
  display:flex;justify-content:center;gap:6px;padding:8px clamp(14px,3vw,34px);background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);
  box-shadow:0 5px 16px rgba(18,33,63,.045);
}
.mode-nav-btn{
  min-width:118px;padding:8px 16px;border:1px solid transparent;border-radius:10px;background:transparent;color:#52627a;font-size:.84rem;font-weight:800;
}
.mode-nav-btn:hover:not(:disabled){background:#f1f5fb;color:#274478}
.mode-nav-btn.active,
.mode-nav-btn.active:disabled{border-color:#c9d8f2;background:#e9f1ff;color:#214b9a;opacity:1}
.question-filter-btn{
  display:inline-grid;place-items:center;width:30px;height:30px;min-width:30px;min-height:30px;margin-left:4px;padding:0;vertical-align:middle;
  border:1px solid #d6e1f0;border-radius:9px;background:#f5f8fd;color:#426196;
}
.question-filter-btn:hover:not(:disabled){background:#eaf1fc;border-color:#bfd0e9}
.question-filter-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round}
.test-progress-row{align-items:center}
.test-exit-btn{
  margin-left:auto;padding:5px 9px;border:1px solid #efc5c5;border-radius:8px;background:#fff3f3;color:#a61b1b;font-size:.74rem;font-weight:800;
}
.settings-about-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid #dce6f5;border-radius:14px;background:#f8fbff;
}
.settings-about-row>div{display:grid;gap:3px;min-width:0}
.settings-about-row strong{font-size:.84rem}
.settings-about-row span{color:var(--muted);font-size:.7rem;font-weight:700}
.app-info-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:18px}
.app-info-meta{display:grid;gap:4px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f7f9fc}
.app-info-meta span{color:var(--muted);font-size:.66rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.app-info-meta strong{font-size:.84rem;overflow-wrap:anywhere}
.app-info-actions{grid-template-columns:1fr 1fr}

@media (min-width:781px){
  .topbar{min-height:74px}
  .topbar-right{flex-wrap:nowrap}
}

@media (max-width:780px){
  .topbar{
    display:grid;grid-template-columns:auto auto minmax(0,1fr);grid-template-rows:auto;align-items:center;column-gap:6px;row-gap:0;padding:9px;
  }
  .brand-wrap{grid-column:1;grid-row:1;min-width:0;gap:0}
  .brand-copy{display:none}
  .brand-logo{width:38px;height:38px;flex-basis:38px;border-radius:12px}
  .timer-actions{
    grid-column:2;grid-row:1;position:static;transform:none;margin:0!important;justify-self:start;
  }
  .timer-actions .timer-card{min-width:96px;padding:5px 32px 5px 8px;border-radius:12px}
  .timer-label{font-size:.56rem}
  .timer-card strong{font-size:.82rem}
  .timer-reset-btn{right:4px;width:25px;height:25px;min-width:25px;min-height:25px;border-radius:8px}
  .topbar-right{
    grid-column:3;grid-row:1;position:static!important;display:flex;width:auto;min-width:0;justify-content:flex-end;gap:4px;
  }
  .topbar-right>.header-utility-btn,
  .topbar-right>#notificationsBtn{
    position:relative!important;top:auto!important;right:auto!important;flex:0 0 40px;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0;
  }
  .mode-nav{padding:7px 9px}
  .mode-nav-btn{flex:1;min-width:0;min-height:38px;padding:8px 9px}
  .test-progress{top:58px}
  .settings-about-row{align-items:flex-start}
  .app-info-meta-grid{grid-template-columns:1fr}
  .app-info-actions{grid-template-columns:1fr}
}

@media (max-width:350px){
  .topbar{column-gap:4px;padding-inline:7px}
  .brand-logo{width:34px;height:34px;flex-basis:34px}
  .timer-actions .timer-card{min-width:90px}
  .topbar-right>.header-utility-btn,
  .topbar-right>#notificationsBtn{flex-basis:36px;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}
}
