/* Match existing action dimensions and theme status fills. */
:root { --previous-year:#7646a3; --previous-year-fill:#eedffa; --previous-year-border:#ab82c8; --previous-year-ink:#59317b; }
html[data-theme="dark"] { --previous-year:#d7b5ef; --previous-year-fill:#e3c9f6; --previous-year-border:#a77bc7; --previous-year-ink:#4e2872; }
.drawer-link.previous-years { color:var(--previous-year); }
.drawer-link.previous-years.active { background:color-mix(in srgb,var(--previous-year) 13%,transparent); }
.reader-card.inline-question-number-enabled .reader-toolbar .marker-row > .previous-year-tool { order:4 !important; }
.reader-card.inline-question-number-enabled .reader-toolbar .previous-year-tool > span { white-space:normal !important; line-height:1.12 !important; font-size:inherit !important; }
html[data-theme] body:has(#app > .app-header) .reader-toolbar .previous-year-tool {
  background:transparent !important; border-color:var(--line) !important; color:var(--text) !important;
}
html[data-theme] body:has(#app > .app-header) .reader-toolbar .previous-year-tool.active,
html[data-theme] body:has(#app > .app-header) .number-chip.previous-year-marked {
  background:var(--previous-year-fill) !important; background-image:none !important;
  border-color:var(--previous-year-border) !important; color:var(--previous-year-ink) !important;
}
html[data-theme] body:has(#app > .app-header) .number-chip.previous-year-marked {
  box-shadow:0 0 0 2px color-mix(in srgb,var(--previous-year-border) 72%,transparent) !important;
}
.previous-years-toolbar { align-items:center; gap:10px; }
.previous-years-source { min-width:0; color:var(--muted); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.previous-years-toolbar .marker-row { flex-shrink:0 !important; }
.previous-years-overview-mark { background:var(--previous-year-fill) !important; border-color:var(--previous-year-border) !important; color:var(--previous-year-ink) !important; }
.practice-banner.previous-years { color:var(--previous-year); background:color-mix(in srgb,var(--previous-year) 13%,transparent); }
.previous-years-practice-topnav { padding-block:9px !important; }
.previous-years-practice-topnav .practice-strip-actions { display:flex; justify-content:flex-start; margin-bottom:7px; }
.previous-years-practice-topnav .practice-shuffle { display:inline-flex; align-items:center; gap:6px; }
.previous-years-practice-topnav .practice-shuffle[aria-pressed="true"] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.previous-years-practice-strip {
  display:block !important; overflow-x:auto !important; overflow-y:hidden !important;
  overscroll-behavior-inline:contain; scrollbar-gutter:stable; -webkit-overflow-scrolling:touch; padding:2px !important;
}
.previous-years-practice-number-page {
  display:grid !important; grid-template-columns:repeat(var(--previous-years-practice-columns),33px) !important;
  grid-template-rows:repeat(var(--previous-years-practice-rows),33px) !important;
  grid-auto-flow:row !important; gap:6px !important; width:max-content !important; min-width:max-content !important;
}
.previous-years-practice-number-page .number-chip { flex:none !important; }
html[data-theme] body:has(#app > .app-header) .previous-years-practice-number-page .number-chip.previous-years-practice-correct {
  background:rgba(8,82,52,.60) !important; border-color:rgba(5,64,40,.94) !important; color:#fff !important;
}
html[data-theme] body:has(#app > .app-header) .previous-years-practice-number-page .number-chip.previous-years-practice-wrong {
  background:rgba(112,22,39,.60) !important; border-color:rgba(88,13,28,.94) !important; color:#fff !important;
}
@media(max-width:760px) {
  .previous-years-toolbar { flex-wrap:wrap; }
  .previous-years-source { flex:1 1 130px; }
}

/* Previous Years is the highest-priority chapter-chip state in every theme and comfort mode. */
html[data-theme][data-reading-comfort] body:has(#app > .app-header) .number-chip.previous-year-marked,
html[data-theme][data-reading-comfort] body:has(#app > .app-header) .number-chip.previous-year-marked:is(.current,.flagged,.comparison,.wrong,.correct,.skipped) {
  background:var(--previous-year-fill) !important;
  background-image:none !important;
  border-color:var(--previous-year-border) !important;
  color:var(--previous-year-ink) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--previous-year-border) 78%,transparent),0 3px 0 color-mix(in srgb,var(--previous-year-border) 34%,transparent) !important;
}
