/* Shared semantic palette. Keep the approved homepage and answer-page geometry. */
:root {
  --brand: #22c55e;
  --brand-hover: #4ade80;
  --brand-ink: #173524;
  --green: #178342;
  --green-hover: #146534;
  --green-tint: #ecfdf3;
  --lime: #d9f99d;
  --yellow: #ffd166;
  --ink: #173524;
  --muted: #66766b;
  --line: #eaf1eb;
  --surface: #f7fbf7;
  --answer-action: #58d36c;
  --answer-action-hover: #72df80;
  --answer-action-border: #42bb59;
  --answer-action-ink: #133b20;
  --answer-correct-surface: #edf9ee;
  --answer-correct-border: #56bd75;
  --answer-wrong-surface: #fff4f0;
  --answer-wrong-border: #d79285;
}

.sidebar { background-color: #fcfefb; }
.brand, .subject-header h1 { color: var(--brand-ink); }
.brand img { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
.nav-item { color: #566b5d; }
.nav-item:hover { background-color: #f0fae9; color: #245837; }
.nav-item.active { background-color: #e0f8cc; color: #24552e; }
.nav-item.active:hover { background-color: var(--lime); color: #24552e; }
.nav-item.active svg { color: #23793b; }
.nav-item small { background-color: #fff0c4; color: #775300; }
.icon-button:hover { background-color: #eaf9df; color: #245837; }
.global-search, .dialog-search { background-color: #f3faf2; }
.global-search:focus-within { border-color: var(--green); }
.global-search > svg, .dialog-search svg { color: #44865a; }
.profile-button { background-color: var(--lime); color: #486413; }
.profile-button:hover { background-color: #c6ee7d; }
.subject-dot { background-color: var(--brand); }
.switch-subject { border-color: #d5e8d8; color: #357348; }
.switch-subject:hover { background-color: #effbe8; border-color: #a6dca5; }
.resume-icon { background-color: #e2f9cf; color: #347139; }
.text-link, .back-button { color: #287940; }
.text-link:hover, .back-button:hover { color: #175f2a; }

.mode-button { background-color: #f7fbf7; }
.mode-button:hover { background-color: #f0faea; border-color: #c8eab8; }
.mode-copy strong { color: #294132; }
.mode-copy small { color: #68796d; }
.mode-icon { box-shadow: none; }
.mode-button[data-mode="chapters"] .mode-icon { background-color: #ddf9e5; color: #1a753d; }
.mode-button[data-mode="exams"] .mode-icon { background-color: #e0f6f5; color: #267681; }
.mode-button[data-mode="must100"] .mode-icon { background-color: #fff0bc; color: #926500; }
.mode-button[data-mode="required"] .mode-icon { background-color: #e8f8bb; color: #5a741b; }
.mode-button[data-mode="simulation"] .mode-icon { background-color: #eaf0fc; color: #536d9c; }
.mode-button[data-mode="cases"] .mode-icon { background-color: #e5f8de; color: #46783d; }
.mode-button[data-mode="calculations"] .mode-icon { background-color: #def5ed; color: #227b60; }
.mode-button[data-mode="random"] .mode-icon { background-color: #fff1cb; color: #976a13; }
.mode-button.active { background-color: #e7fbe8; border-color: #74d58d; }
.mode-button.active:hover { background-color: #dcf9df; border-color: #52c776; }
.mode-button.active .mode-icon { background-color: var(--brand); color: var(--brand-ink); }
.mode-button.active .mode-copy strong { color: #1e6130; }
.mode-button.active .mode-copy small { color: #487653; }
.mode-button.active::after { background-color: var(--green); }

.edition-tag { background-color: #eef9d6; color: #58702a; }
.filter-button.active { background-color: #e2f8cd; color: #3b632d; }
.filter-button.active small { color: #527944; }
.filter-button:hover { background-color: #eff9e9; }
.chapter-row:hover, .question-link:hover, .exam-row:hover { background-color: #f4fcf1; }
.chapter-row[aria-expanded="true"] { background-color: #effbea; }
.chapter-number { background-color: #f0f8ed; color: #5b795d; }
.chapter-row[aria-expanded="true"] .chapter-number { background-color: var(--lime); color: #46652b; }
.tiny-track { background-color: #e7f2e3; }
.tiny-track i { background-color: var(--brand); }
.row-chevron { color: #7d9b85; }
.load-more { border-color: #dcebdd; color: #477950; }
.load-more:hover { background-color: #effbe9; color: #286737; border-color: #b6dfad; }
.week-day i { background-color: #f3faee; border-color: #dcebd5; }
.week-day.today i { border-color: #59932f; background-color: #effbdc; }
.week-day.done i { background-color: var(--brand); border-color: #179f45; color: var(--brand-ink); }
.week-heading > svg { color: #6b8d30; }

.primary-button, .skip-link { background-color: var(--brand); color: var(--brand-ink); }
.primary-button:hover { background-color: var(--brand-hover); color: var(--brand-ink); }
.empty-icon { background-color: #e7f9d4; color: #518032; }
.exam-icon { background-color: #e5f7ef; color: #308357; }
.tool-link { background-color: #f3fbef; }
.tool-link:hover { background-color: #eaf8dc; }
.tool-link > svg { color: #467d3e; }
.subject-option:hover { background-color: #f2fbea; }
.subject-option.selected { background-color: #e6f9d5; color: #2d6635; }
.subject-option.selected small { color: #58784f; }

button:focus-visible, a:focus-visible, input:focus-visible { outline-color: var(--green); }
