@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --paper-deep: #efeee6;
  --surface: #fffefa;
  --ink: #182c29;
  --ink-soft: #40534e;
  --muted: #7b8881;
  --line: #e5e5dc;
  --line-dark: #d5d8ce;
  --forest: #17453f;
  --forest-light: #245d53;
  --sage: #b9d4a0;
  --sage-pale: #e8f0dd;
  --amber: #c18545;
  --amber-pale: #f5ead9;
  --blue: #6286a0;
  --lavender: #9886b2;
  --red: #b46d5b;
  --radius: 14px;
  --shadow: 0 14px 42px rgba(24, 44, 41, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(113, 154, 90, .38); outline-offset: 2px; }
.app-frame { min-height: 100vh; }

/* Fixed editorial navigation */
.sidebar {
  position: fixed; z-index: 8; inset: 0 auto 0 0; width: 244px;
  display: flex; flex-direction: column; padding: 24px 17px 15px;
  background: #fdfcf8; border-right: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 10px; padding: 0 8px 23px; font-size: 24px; font-weight: 700; letter-spacing: -1.6px; }
.wordmark-symbol { width: 25px; height: 25px; display: inline-flex; align-items: flex-end; gap: 3px; padding: 5px 6px; border-radius: 8px 8px 8px 2px; background: var(--forest); transform: rotate(-6deg); }
.wordmark-symbol i { width: 3px; border-radius: 2px; background: #d3e6a5; }
.wordmark-symbol i:nth-child(1) { height: 6px; }
.wordmark-symbol i:nth-child(2) { height: 10px; }
.wordmark-symbol i:nth-child(3) { height: 14px; }
.wordmark-period, .ink-period { color: #8bab62; }
.sidebar-edital { margin: 0 2px 28px; padding: 14px 12px 13px; border: 1px solid #e7e9df; border-radius: 10px; background: #f5f6ef; }
.side-label, .eyebrow, .section-kicker, .feature-kicker, .panel-overline, .fact-label, .topics-label { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.sidebar-edital .side-label { display: block; margin-bottom: 5px; color: #85918a; }
.sidebar-edital strong { display: block; font: 600 24px/1 'Fraunces', serif; letter-spacing: -.4px; }
.sidebar-edital strong span { color: #9eaa9d; font: 500 15px 'DM Sans', sans-serif; }
.sidebar-edital small { display: block; margin-top: 5px; color: #728079; font-size: 10px; }
.nav-label { padding: 0 10px 9px; color: #98a19a; }
.main-nav { display: grid; gap: 3px; }
.nav-link { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: #6f7d75; text-align: left; font-size: 11px; transition: background .18s, color .18s; }
.nav-link:hover { background: #f2f3ec; color: var(--ink); }
.nav-link.active { background: #e9eee4; color: #24463d; font-weight: 700; }
.nav-glyph { width: 18px; color: #87978e; font-size: 16px; text-align: center; }
.nav-link.active .nav-glyph { color: var(--forest); }
.nav-badge { margin-left: auto; padding: 2px 7px; border-radius: 12px; background: #f0e5d4; color: #926a3d; font-size: 9px; }
.sidebar-bottom { margin-top: auto; }
.privacy-card { display: flex; gap: 9px; align-items: flex-start; margin: 0 1px 12px; padding: 11px 10px; border-radius: 9px; background: #eff2e9; }
.privacy-mark { color: #67835b; font-size: 14px; }
.privacy-card strong { display: block; font-size: 10px; }
.privacy-card p { margin: 3px 0 0; color: #78847c; font-size: 9px; }
.candidate-link { width: 100%; display: flex; align-items: center; gap: 9px; padding: 13px 3px 1px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.candidate-avatar, .top-avatar { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #d9dfce; border-radius: 50%; background: #e9ecdf; color: #496044; font-weight: 700; font-size: 11px; }
.candidate-link>span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.candidate-link strong { overflow: hidden; color: #33453e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-link small { color: #8c9790; font-size: 9px; }
.candidate-more { margin-left: auto; color: #909c94; letter-spacing: 2px; }

.main-content { min-height: 100vh; margin-left: 244px; }
.topbar { height: 57px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 4.1vw, 58px); border-bottom: 1px solid #e9e8e0; background: rgba(253, 252, 248, .86); }
.top-crumb { display: flex; align-items: center; gap: 10px; color: #919b94; font-size: 8px; font-weight: 700; letter-spacing: 1.3px; }
.top-crumb strong { color: #51615a; }
.crumb-line { width: 23px; height: 1px; background: #d9ddd4; }
.topbar-right { display: flex; align-items: center; gap: 13px; }
.sync-state { display: flex; align-items: center; gap: 6px; color: #8b968f; font-size: 9px; }
.sync-state i { width: 6px; height: 6px; border-radius: 50%; background: #94b478; }
.top-avatar { width: 27px; height: 27px; border: 0; }
.mobile-brand { display: none; }
.page-wrap { width: min(1180px, 100%); margin: 0 auto; padding: 34px clamp(22px, 4.1vw, 58px) 43px; }
.view { display: none; animation: appear .22s ease-out; }
.view.active { display: block; }
@keyframes appear { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.eyebrow-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { color: #839087; }
.source-stamp { padding: 6px 8px; border: 1px solid #dce2d6; color: #718071; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 10px 0 23px; }
h1, h2, h3, p { margin-top: 0; }
.intro-row h1, .page-heading h1 { margin: 0; font: 600 clamp(34px, 4vw, 46px)/1.07 'Fraunces', Georgia, serif; letter-spacing: -1.4px; }
.intro-copy, .page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.button { min-height: 37px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 14px; border: 1px solid transparent; border-radius: 7px; font-size: 10px; font-weight: 700; transition: background .16s, color .16s, transform .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button-outline { border-color: #d8ddd3; background: #fbfbf7; color: #465a50; }
.button-outline:hover { background: #f0f2e9; }
.button-dark { background: var(--forest); color: #fff; }
.button-dark:hover { background: var(--forest-light); }
.button-lime { background: #dbe9b3; color: #253c34; }
.button-lime:hover { background: #e5f0c9; }
.button-quiet { background: transparent; color: #68776e; }
.button-quiet:hover { background: #f0f1eb; }
.button-compact { min-height: 32px; padding: 0 11px; font-size: 9px; }

/* Exam feature: editorial cover and date stamp */
.exam-feature { position: relative; min-height: 246px; overflow: hidden; display: grid; grid-template-columns: 1.45fr .8fr; border-radius: 12px; background: var(--forest); color: #f9faf2; box-shadow: 0 12px 25px rgba(23, 69, 63, .08); }
.exam-feature::before { content: ''; position: absolute; width: 410px; height: 410px; right: 16%; top: -248px; border: 1px solid rgba(240, 245, 225, .12); border-radius: 50%; box-shadow: 0 0 0 32px rgba(240,245,225,.025), 0 0 0 75px rgba(240,245,225,.022); }
.feature-main { position: relative; z-index: 1; padding: 26px 30px 23px; }
.feature-kicker { display: flex; align-items: center; gap: 8px; color: #c8d5c9; font-size: 8px; letter-spacing: .95px; }
.feature-kicker i { width: 6px; height: 6px; border-radius: 50%; background: #d6e6ac; }
.feature-divider { color: #82978a; }
.feature-main h2 { margin: 16px 0 8px; font: 500 clamp(27px, 3vw, 35px)/1.06 'Fraunces', Georgia, serif; letter-spacing: -.5px; }
.feature-main p { max-width: 375px; margin-bottom: 16px; color: #c5d3c9; font-size: 10px; line-height: 1.65; }
.feature-side { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; align-content: center; align-items: center; gap: 15px; padding: 24px 25px 26px 15px; }
.date-seal { width: 76px; height: 76px; display: grid; place-content: center; justify-items: center; border: 1px solid rgba(229, 238, 219, .36); border-radius: 50%; color: #e8eedb; transform: rotate(-5deg); }
.date-seal span { font-size: 6px; font-weight: 700; letter-spacing: .65px; }
.date-seal strong { margin: 0; font: 600 31px/.98 'Fraunces', serif; }
.countdown-box { display: grid; gap: 0; }
.countdown-box>span { color: #bdd0c2; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.countdown-box strong { font: 600 37px/.95 'Fraunces', serif; letter-spacing: -1px; }
.countdown-box small { color: #bbcbbf; font-size: 8px; }
.feature-rule { grid-column: 1 / -1; height: 1px; margin: 1px 0 0; background: rgba(240, 245, 225, .2); }
.feature-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #bfcec4; font-size: 7px; }
.feature-foot span:last-child { white-space: nowrap; color: #e1e8d5; font-weight: 700; letter-spacing: .5px; }
.feature-index { position: absolute; right: 14px; bottom: 9px; color: #89a095; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.feature-index span { color: #e0e9d6; }
.exam-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 13px 0 28px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf7; }
.fact { min-width: 0; padding: 13px 15px 12px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact-label { display: block; margin-bottom: 7px; color: #8b958e; font-size: 7px; letter-spacing: .9px; }
.fact>strong { display: block; color: #253c35; font: 600 clamp(20px, 2.2vw, 25px)/1 'Fraunces', serif; letter-spacing: -.4px; white-space: nowrap; }
.fact>strong small { font: 500 10px 'DM Sans', sans-serif; letter-spacing: 0; }
.fact-note { display: block; overflow: hidden; margin-top: 5px; color: #87928b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

/* Dashboard columns and visual hierarchy */
.content-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .75fr); gap: 25px; }
.primary-column, .right-column { min-width: 0; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 11px; }
.section-kicker { color: #89948c; font-size: 8px; letter-spacing: 1.05px; }
.section-title-row h2, .panel-header h2 { margin: 4px 0 0; font: 600 23px/1.1 'Fraunces', Georgia, serif; letter-spacing: -.3px; }
.tiny-dot { display: inline-block; width: 4px; height: 4px; margin: 0 4px 1px; border-radius: 50%; background: #93a67e; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #4a6d58; font-size: 9px; font-weight: 700; white-space: nowrap; }
.text-button:hover { color: #193e35; }
.today-board { padding: 13px 14px 0; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf7; }
.today-board-head { display: flex; justify-content: space-between; gap: 12px; padding: 0 1px 11px; border-bottom: 1px solid #eeeee6; color: #738078; font-size: 9px; }
.today-board-head span:first-child { color: #44574d; font-weight: 700; text-transform: capitalize; }
.today-board-head span:last-child { color: #8a958e; }
.task-list { display: grid; }
.study-task { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 1px; border-bottom: 1px solid #eeeee7; }
.study-task:last-child { border-bottom: 0; }
.task-index { color: #9aa59d; font: 500 13px 'Fraunces', serif; }
.task-body { min-width: 0; }
.task-meta { display: flex; align-items: center; gap: 6px; overflow: hidden; color: #79867e; font-size: 9px; white-space: nowrap; }
.task-meta strong { color: #31473e; font-size: 9px; }
.task-meta>span:last-child { overflow: hidden; text-overflow: ellipsis; }
.subject-marker { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 2px; background: #7b9e78; }
.marker-raciocinio { background: #a28bb9; }
.marker-administrativo { background: #c58c58; }
.marker-constitucional { background: #7290ab; }
.marker-sus { background: #4f9382; }
.marker-adm-publica { background: #70946d; }
.marker-financas { background: #c07b64; }
.marker-politicas { background: #7185aa; }
.task-dot { color: #b3bbb3; }
.task-progress-line { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.task-progress-line>div { width: 73px; height: 3px; overflow: hidden; border-radius: 4px; background: #e7e9df; }
.task-progress-line i { display: block; height: 100%; border-radius: inherit; background: #87a66e; transition: width .25s; }
.task-progress-line small { color: #9aa39c; font-size: 8px; }
.task-controls { display: flex; align-items: center; gap: 8px; }
.task-points { color: #929b94; font-size: 7px; white-space: nowrap; }
.task-action { min-height: 27px; padding: 0 8px; border: 1px solid #d9e2d2; border-radius: 5px; background: #eef3e9; color: #446548; font-size: 8px; font-weight: 700; white-space: nowrap; }
.task-action:hover { background: #e4eddc; }
.task-remove, .delete-error { width: 22px; height: 22px; border: 0; background: transparent; color: #a1aaa2; font-size: 16px; }
.task-complete .task-index { color: #71946c; }
.day-empty { min-height: 118px; display: flex; align-items: center; gap: 10px; padding: 16px 2px; }
.empty-mark { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #edf2e6; color: #6c8a5a; font-size: 15px; }
.day-empty>div { flex: 1; }
.day-empty strong { display: block; color: #3c5047; font-size: 10px; }
.day-empty p { margin: 4px 0 0; color: #869188; font-size: 9px; line-height: 1.5; }
.day-empty .button { flex: 0 0 auto; }
.today-board-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 1px; border-top: 1px solid #eeeee6; color: #8c9790; font-size: 8px; }
.today-board-foot>span { display: flex; align-items: center; gap: 6px; }
.today-board-foot i { width: 5px; height: 5px; border-radius: 50%; background: #94ab7f; }
.small-action { padding: 3px 0; border: 0; background: transparent; color: #507254; font-size: 8px; font-weight: 700; white-space: nowrap; }
.weights-title { margin-top: 25px; }
.weight-list { overflow: hidden; border-top: 1px solid var(--line-dark); }
.weight-row { width: 100%; display: grid; grid-template-columns: minmax(135px, 1.1fr) minmax(55px, 1fr) 40px 46px; align-items: center; gap: 9px; padding: 9px 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background .15s; }
.weight-row:hover { background: rgba(255,255,255,.55); }
.weight-name { min-width: 0; display: flex; align-items: center; gap: 7px; }
.weight-name strong { overflow: hidden; color: #485a51; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.weight-bar { height: 4px; overflow: hidden; border-radius: 5px; background: #e7e9e1; }
.weight-bar i { display: block; height: 100%; border-radius: inherit; background: #88a275; }
.weight-questions, .weight-points { color: #51635a; font-size: 10px; font-weight: 700; text-align: right; }
.weight-questions small, .weight-points small { color: #929c94; font-size: 7px; font-weight: 500; }
.right-column { display: grid; align-content: start; gap: 10px; }
.side-panel { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf7; }
.panel-overline { display: flex; align-items: center; justify-content: space-between; color: #8b958d; font-size: 7px; }
.panel-number { color: #96a18e; font: 500 13px 'Fraunces', serif; }
.side-panel h3 { margin: 10px 0 6px; font: 600 18px/1.15 'Fraunces', serif; letter-spacing: -.2px; }
.side-panel p { margin: 0 0 12px; color: #7c8981; font-size: 9px; line-height: 1.6; }
.focus-panel { background: #edf1e7; border-color: #e0e7d7; }
.specific-ratio { display: flex; align-items: center; gap: 11px; margin: 13px 0 12px; }
.specific-ratio>div:first-child { display: grid; gap: 1px; }
.specific-ratio strong { font: 600 26px/1 'Fraunces', serif; }
.specific-ratio small { color: #879287; font-size: 7px; }
.ratio-track { height: 6px; flex: 1; overflow: hidden; border-radius: 5px; background: #dfe6d8; }
.ratio-track i { display: block; width: 60%; height: 100%; border-radius: inherit; background: #79946e; }
.title-icon { color: #ac986d; font-size: 12px; }
.title-rule { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 0 8px; border-top: 1px solid #e9e8df; color: #78867d; font-size: 7px; }
.title-rule b { color: #31463c; font: 600 16px 'Fraunces', serif; }
.fine-print { display: block; color: #9aa39c; font-size: 7px; }
.materials-teaser { background: #f8f1e7; border-color: #eee2d1; }
.materials-teaser .panel-overline { color: #9a805f; }
.acervo-dot { width: 6px; height: 6px; border-radius: 50%; background: #bd9a66; }
.source-footer { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); color: #87928a; font-size: 8px; }
.source-footer span { display: block; margin-top: 3px; color: #a0a9a1; }

/* Secondary page scaffolding */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 0 24px; }
.page-heading h1 { margin-top: 6px; }
.syllabus-total { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-left: 1px solid var(--line-dark); }
.syllabus-total strong { font: 600 32px/.9 'Fraunces', serif; }
.syllabus-total span { color: #78857d; font-size: 8px; line-height: 1.35; }
.plan-toolbar { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fcfbf7; }
.plan-date-control { display: grid; gap: 3px; }
.plan-date-control label { color: #8d9890; font-size: 7px; font-weight: 700; letter-spacing: .8px; }
.plan-date-control input { border: 0; background: transparent; color: #45584e; font-size: 10px; }
.routine-summary { margin-left: auto; color: #7b887f; font-size: 9px; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 22px; margin-top: 20px; }
.plan-main { min-width: 0; }
.plan-day-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.plan-day-heading h2 { margin: 4px 0 0; font: 600 23px 'Fraunces', serif; text-transform: capitalize; }
.plan-task-list { border: 1px solid var(--line); border-radius: 10px; background: #fcfbf7; padding: 0 13px; }
.plan-empty { border: 1px dashed #d8ddd2; border-radius: 10px; background: rgba(255,255,255,.35); padding: 14px; }
.plan-aside .side-panel { position: sticky; top: 20px; }
.plan-aside h3 { margin-top: 8px; }
.revision-track { display: flex; align-items: center; margin: 18px 0 15px; }
.revision-track>div { display: grid; justify-items: center; gap: 2px; }
.revision-track>div i { width: 8px; height: 8px; margin-bottom: 2px; border-radius: 50%; background: #a9c38d; }
.revision-track>div .rev-seven { background: #9b8db6; }
.revision-track>div .rev-thirty { background: #c49062; }
.revision-track>div b { font-size: 9px; }
.revision-track>div small { color: #9aa39b; font-size: 7px; }
.revision-track>span { height: 1px; flex: 1; margin: 0 5px; background: #e0e3da; }
.score-warning { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 11px 13px; border: 1px solid #eddcc3; border-radius: 8px; background: #f8f0e4; }
.warning-mark { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #ebd6b7; color: #886b42; font-size: 11px; font-weight: 700; }
.score-warning p { flex: 1; margin: 0; color: #796a52; font-size: 9px; }
.score-warning strong { color: #5f4f39; }
.warning-source { color: #a18c6b; font-size: 7px; font-weight: 700; white-space: nowrap; }
.syllabus-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin-bottom: 21px; }
.filter-wrap { min-width: 200px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fcfbf7; color: #9aa49d; }
.filter-wrap>span { font-size: 16px; }
.filter-wrap input { width: 100%; height: 34px; border: 0; outline: 0; background: transparent; color: #40534a; font-size: 9px; }
.toggle-group { display: flex; gap: 4px; }
.filter-chip { padding: 7px 9px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #859188; font-size: 8px; }
.filter-chip:hover { background: #eeefe8; }
.filter-chip.active { border-color: #dce2d5; background: #edf1e8; color: #49624b; font-weight: 700; }
.syllabus-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.group-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.group-heading>span { color: #89a07f; font: 500 20px 'Fraunces', serif; }
.group-heading h2 { margin: 0; font: 600 20px 'Fraunces', serif; }
.group-heading p { margin: 2px 0 0; color: #8d9890; font-size: 8px; }
.group-heading p i { padding: 0 4px; color: #b2b8af; font-style: normal; }
.group-specific>span { color: #c08a59; }
.subject-stack { display: grid; align-content: start; gap: 7px; }
.syllabus-card { border: 1px solid var(--line); border-radius: 8px; background: #fcfbf7; }
.syllabus-card[open] { border-color: #d3dbcd; box-shadow: 0 4px 12px rgba(24,44,41,.035); }
.syllabus-card summary { min-height: 53px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; list-style: none; cursor: pointer; }
.syllabus-card summary::-webkit-details-marker { display: none; }
.syllabus-name { min-width: 0; flex: 1; display: grid; gap: 3px; }
.syllabus-name strong { color: #3a4f45; font-size: 9px; }
.syllabus-name small { color: #8d9890; font-size: 7px; }
.syllabus-total { color: #3e6149; font: 600 16px 'Fraunces', serif; white-space: nowrap; }
.syllabus-total small { color: #839086; font: 500 7px 'DM Sans', sans-serif; }
.details-chevron { color: #96a197; font-size: 14px; transition: transform .16s; }
.syllabus-card[open] .details-chevron { transform: rotate(180deg); }
.syllabus-details { padding: 0 11px 11px 26px; }
.topics-label { color: #99a39b; font-size: 7px; }
.syllabus-details ol { display: grid; gap: 0; margin: 7px 0 0; padding-left: 17px; }
.syllabus-details li { padding: 6px 0 6px 2px; border-top: 1px solid #eeeee7; color: #68766e; font-size: 8px; line-height: 1.45; }
.syllabus-details li::marker { color: #9aab8d; font-size: 8px; }
.syllabus-details li { display: list-item; }
.add-topic { float: right; margin-left: 8px; padding: 3px 5px; border: 0; border-radius: 4px; background: #eef2e8; color: #5b7956; font-size: 10px; }
.add-topic small { font-size: 6px; font-weight: 700; letter-spacing: .4px; }
.add-topic:hover { background: #e2ebd8; }
.no-results { padding: 16px; color: #909b93; font-size: 9px; }
.syllabus-heading { margin-bottom: 18px; }
.syllabus-heading .syllabus-total { margin-bottom: 2px; }

/* Errors and review queues */
.error-summary { display: flex; gap: 16px; padding-left: 15px; border-left: 1px solid var(--line-dark); }
.error-summary>div { display: grid; gap: 0; }
.error-summary strong { font: 600 22px 'Fraunces', serif; }
.error-summary span { color: #89948c; font-size: 7px; }
.error-toolbar { display: flex; gap: 9px; margin-bottom: 14px; }
.error-toolbar .filter-wrap { flex: 1; }
.error-toolbar select { min-width: 140px; border: 1px solid var(--line); border-radius: 7px; background: #fcfbf7; color: #65736a; font-size: 9px; padding: 0 9px; }
.review-banner { margin-bottom: 13px; padding: 13px; border: 1px solid #e0e7d8; border-radius: 9px; background: #eff3e9; }
.review-banner>div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.review-banner>div:first-child strong { color: #48604a; font: 600 15px 'Fraunces', serif; }
.review-due-list { display: grid; gap: 5px; }
.review-row { display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid #e0e7dc; border-radius: 6px; background: rgba(255,255,255,.56); }
.review-date-chip { padding: 4px 6px; border-radius: 4px; background: #e4ebdc; color: #5d7953; font-size: 7px; font-weight: 700; }
.review-row>div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.review-row strong { overflow: hidden; color: #44594a; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.review-row small { color: #8a968d; font-size: 7px; }
.review-finish { padding: 6px 8px; border: 0; border-radius: 5px; background: var(--forest); color: white; font-size: 7px; font-weight: 700; white-space: nowrap; }
.error-list { display: grid; gap: 7px; }
.error-card { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf7; }
.error-card.error-reviewed { opacity: .68; }
.error-mark { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; background: #f4eae0; color: #a57750; font-size: 12px; }
.error-reviewed .error-mark { background: #e8efe3; color: #66845d; }
.error-content { min-width: 0; flex: 1; }
.error-subject { overflow: hidden; color: #45584f; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.error-subject span { padding: 0 3px; color: #9da69e; }
.error-content p { margin: 4px 0 6px; color: #808c84; font-size: 8px; }
.error-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reason-tag { padding: 3px 5px; border-radius: 4px; background: #f4eee4; color: #967c59; font-size: 7px; }
.error-date { color: #9ca59e; font-size: 7px; }
.error-reviews { display: flex; gap: 3px; }
.error-review-chip { padding: 2px 4px; border-radius: 3px; background: #eef0e9; color: #879188; font-size: 6px; }
.error-review-chip.review-now { background: #e7eedf; color: #58734f; font-weight: 700; }
.error-review-chip.review-done { color: #728b67; }
.error-actions { display: flex; align-items: center; gap: 5px; }
.error-actions .text-button { font-size: 8px; }
.empty-message { padding: 28px 15px; border: 1px dashed #d8ddd3; border-radius: 8px; color: #839087; font-size: 9px; text-align: center; }

/* Analytics */
.progress-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 13px; }
.progress-overview article { min-width: 0; display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf7; }
.progress-overview article span { color: #89948d; font-size: 7px; font-weight: 700; letter-spacing: .8px; }
.progress-overview article strong { font: 600 27px/.95 'Fraunces', serif; }
.progress-overview article small { color: #8d9890; font-size: 7px; }
.progress-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 11px; }
.data-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fcfbf7; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.panel-header h2 { font-size: 20px; }
.panel-suffix { color: #9aa39c; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
.performance-bars { display: grid; gap: 11px; margin-top: 18px; }
.performance-row { display: grid; grid-template-columns: minmax(100px, 1.1fr) 1fr 33px; align-items: center; gap: 9px; }
.performance-row>span { overflow: hidden; color: #627168; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.performance-track { height: 5px; overflow: hidden; border-radius: 4px; background: #e9ebe3; }
.performance-track i { display: block; height: 100%; border-radius: inherit; background: #91aa7d; }
.performance-row b { color: #4b5d52; font-size: 8px; text-align: right; }
.performance-row b small { color: #9aa39c; font-size: 6px; font-weight: 500; }
.hit-panel { display: flex; flex-direction: column; align-items: center; }
.hit-panel .panel-header { width: 100%; }
.accuracy-ring { position: relative; width: 122px; height: 122px; display: grid; place-items: center; margin: 15px auto 7px; border-radius: 50%; background: conic-gradient(#7d9b6e var(--accuracy), #e8eae2 0); }
.accuracy-ring::before { content: ''; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: #fcfbf7; }
.accuracy-ring>div { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1px; }
.accuracy-ring strong { font: 600 25px 'Fraunces', serif; }
.accuracy-ring span { color: #8c978f; font-size: 7px; }
.hit-panel>p { margin: 1px 0 0; color: #87928b; font-size: 8px; text-align: center; }
.score-note { display: flex; gap: 9px; margin-top: 11px; padding: 10px 12px; border: 1px solid #e9e1d4; border-radius: 7px; background: #f6f0e7; }
.score-note>span { color: #a07a4c; font-weight: 700; }
.score-note strong { color: #71634e; font-size: 8px; }
.score-note p { margin: 2px 0 0; color: #96886f; font-size: 7px; }

/* Materials hand-off */
.material-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #eadfcf; border-radius: 20px; color: #9a805e; font-size: 7px; font-weight: 700; letter-spacing: .55px; white-space: nowrap; }
.material-status i { width: 5px; height: 5px; border-radius: 50%; background: #c39b66; }
.material-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 15px; }
.material-main { position: relative; overflow: hidden; min-height: 390px; padding: 30px; border: 1px solid #e6e4d9; border-radius: 10px; background: #fcfbf7; }
.material-main h2 { margin: 8px 0 9px; font: 600 30px/1.1 'Fraunces', serif; letter-spacing: -.3px; }
.material-main>p { max-width: 490px; margin-bottom: 18px; color: #78857d; font-size: 10px; line-height: 1.7; }
.material-illustration { position: absolute; top: 23px; right: 30px; width: 86px; height: 87px; opacity: .86; }
.paper-stack { position: absolute; inset: 7px 11px 9px 7px; }
.paper-stack i { position: absolute; inset: 0; border: 1px solid #d8ddcf; border-radius: 3px; background: #f7f6ed; transform: rotate(-9deg); }
.paper-stack i:nth-child(2) { transform: rotate(3deg); background: #eef1e7; }
.paper-stack i:nth-child(3) { transform: rotate(10deg); background: #e8eedf; }
.paper-stack span { position: absolute; top: 28px; left: 21px; color: #638063; font: 600 24px 'Fraunces', serif; transform: rotate(7deg); }
.material-spark { position: absolute; right: 4px; top: -2px; color: #a9b57f; font-size: 20px; }
.material-steps { display: flex; align-items: center; gap: 8px; margin: 24px 0 22px; }
.material-steps>div { display: grid; gap: 2px; }
.material-steps>div span { color: #a1b28b; font: 500 18px 'Fraunces', serif; }
.material-steps strong { font-size: 9px; }
.material-steps small { color: #929d94; font-size: 7px; }
.material-steps>i { width: 28px; height: 1px; margin: 0 3px; background: #dfe3d9; }
.material-aside { display: grid; align-content: start; gap: 10px; }
.material-count { display: flex; align-items: center; gap: 9px; margin: 14px 0 10px; }
.material-count strong { font: 600 38px/.9 'Fraunces', serif; }
.material-count span { color: #8b968e; font-size: 8px; line-height: 1.35; }
.material-list { display: grid; gap: 8px; margin: 11px 0 0; padding: 0; list-style: none; }
.material-list li { display: flex; align-items: center; gap: 7px; color: #728077; font-size: 8px; }
.material-list li::before { content: '✓'; color: #819c71; font-size: 9px; }

/* Dialogs and local feedback */
.modal { width: min(500px, calc(100% - 28px)); max-height: min(90vh, 700px); overflow: auto; padding: 22px; border: 1px solid #e1e5db; border-radius: 12px; background: #fdfcf8; color: var(--ink); box-shadow: 0 28px 90px rgba(20, 41, 36, .24); }
.modal::backdrop { background: rgba(18, 37, 32, .48); backdrop-filter: blur(2px); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.modal-heading h2 { margin: 4px 0 0; font: 600 24px 'Fraunces', serif; }
.modal-close { width: 28px; height: 28px; border: 1px solid #e2e6dd; border-radius: 50%; background: #f5f5ef; color: #78867c; font-size: 17px; }
.modal-copy { margin: 0 0 15px; color: #7c8981; font-size: 9px; line-height: 1.6; }
.modal label { display: grid; gap: 5px; margin-bottom: 11px; color: #56665c; font-size: 9px; font-weight: 700; }
.modal input, .modal select, .modal textarea { width: 100%; min-height: 35px; padding: 8px 9px; border: 1px solid #dfe4d9; border-radius: 6px; background: #fffefa; color: #394d43; font-size: 10px; outline: 0; }
.modal textarea { resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: #91ab7a; box-shadow: 0 0 0 3px rgba(145, 171, 122, .13); }
.modal input::placeholder, .modal textarea::placeholder { color: #a5aea6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.day-picker { margin: 0 0 14px; padding: 0; border: 0; }
.day-picker legend { margin-bottom: 7px; color: #56665c; font-size: 9px; font-weight: 700; }
.week-options { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.week-options label { margin: 0; cursor: pointer; }
.week-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.week-options span { min-height: 34px; display: grid; place-items: center; border: 1px solid #e1e5dc; border-radius: 5px; color: #87928b; font-size: 7px; }
.week-options input:checked + span { border-color: #b7c9a5; background: #edf2e6; color: #496648; font-weight: 700; }
.week-options input:focus-visible + span { outline: 3px solid rgba(113,154,90,.38); outline-offset: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 5px; }
.profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 15px 0; }
.profile-facts span { display: grid; gap: 3px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: #8b968e; font-size: 7px; font-weight: 700; letter-spacing: .6px; }
.profile-facts strong { color: #45584e; font-size: 9px; letter-spacing: 0; }
.toast { position: fixed; z-index: 30; right: 20px; bottom: 20px; max-width: calc(100% - 40px); padding: 11px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: #244b42; color: white; font-size: 9px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }
.mobile-nav { display: none; }

@media (min-width: 1500px) {
  .page-wrap { padding-top: 42px; }
  .exam-feature { min-height: 264px; }
}
@media (max-width: 1100px) {
  .sidebar { width: 215px; }
  .main-content { margin-left: 215px; }
  .page-wrap { padding-right: 27px; padding-left: 27px; }
  .topbar { padding-right: 27px; padding-left: 27px; }
  .content-columns { grid-template-columns: minmax(0, 1.3fr) minmax(205px, .8fr); gap: 16px; }
  .feature-side { padding-right: 18px; }
  .task-points { display: none; }
}
@media (max-width: 820px) {
  .sidebar { width: 190px; padding-right: 12px; padding-left: 12px; }
  .main-content { margin-left: 190px; }
  .page-wrap { padding: 27px 20px 35px; }
  .topbar { padding: 0 20px; }
  .content-columns { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .side-panel { padding: 12px; }
  .side-panel h3 { font-size: 16px; }
  .exam-feature { grid-template-columns: 1.15fr .85fr; }
  .feature-main { padding-left: 22px; }
  .feature-side { grid-template-columns: 66px 1fr; gap: 10px; padding-left: 8px; }
  .date-seal { width: 65px; height: 65px; }
  .date-seal strong { font-size: 26px; }
  .syllabus-groups { gap: 12px; }
  .material-layout { grid-template-columns: minmax(0,1fr) 215px; }
}
@media (max-width: 650px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .topbar { height: 52px; padding: 0 15px; }
  .top-crumb { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; font-size: 19px; font-weight: 700; letter-spacing: -1.2px; }
  .mobile-brand .wordmark-symbol { width: 22px; height: 22px; }
  .mobile-brand .wordmark-symbol i:nth-child(1) { height: 5px; }
  .mobile-brand .wordmark-symbol i:nth-child(2) { height: 8px; }
  .mobile-brand .wordmark-symbol i:nth-child(3) { height: 12px; }
  .sync-state { font-size: 8px; }
  .topbar-right { gap: 9px; }
  .page-wrap { padding: 23px 15px 28px; }
  .eyebrow-row { align-items: flex-start; }
  .eyebrow { font-size: 7px; line-height: 1.5; }
  .source-stamp { padding: 4px 5px; font-size: 6px; white-space: nowrap; }
  .intro-row { align-items: center; margin: 12px 0 16px; }
  .intro-row h1, .page-heading h1 { font-size: 34px; }
  .intro-copy, .page-heading p { max-width: 310px; font-size: 10px; line-height: 1.5; }
  .intro-row>.button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; overflow: hidden; gap: 20px; padding: 0; font-size: 0; }
  .intro-row>.button span { font-size: 14px; }
  .exam-feature { min-height: 212px; grid-template-columns: 1.05fr .8fr; }
  .feature-main { padding: 19px 15px 20px; }
  .feature-kicker { max-width: 230px; flex-wrap: wrap; gap: 5px; font-size: 6px; line-height: 1.5; }
  .feature-main h2 { margin: 14px 0 7px; font-size: 28px; }
  .feature-main p { max-width: 215px; margin-bottom: 13px; font-size: 8px; }
  .feature-main .button { min-height: 32px; padding: 0 10px; font-size: 8px; }
  .feature-side { grid-template-columns: 52px 1fr; gap: 7px; padding: 15px 8px 22px 1px; }
  .date-seal { width: 51px; height: 51px; }
  .date-seal strong { font-size: 21px; }
  .date-seal span { font-size: 5px; }
  .countdown-box strong { font-size: 31px; }
  .countdown-box small { font-size: 7px; }
  .feature-foot { align-items: flex-start; flex-direction: column; gap: 4px; font-size: 6px; }
  .feature-foot span:last-child { font-size: 6px; }
  .feature-index { right: 8px; bottom: 7px; }
  .exam-facts { grid-template-columns: 1fr 1fr; margin: 9px 0 22px; }
  .fact { padding: 10px; border-bottom: 1px solid var(--line); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(3), .fact:nth-child(4) { border-bottom: 0; }
  .fact-label { font-size: 6px; }
  .fact>strong { font-size: 21px; }
  .fact-note { font-size: 7px; }
  .section-title-row h2, .panel-header h2 { font-size: 21px; }
  .section-kicker { font-size: 7px; }
  .today-board { padding: 10px 10px 0; }
  .today-board-head { font-size: 8px; }
  .study-task { grid-template-columns: 20px minmax(0,1fr); gap: 7px; padding: 10px 0; }
  .task-controls { grid-column: 2; justify-content: flex-end; margin-top: -1px; }
  .task-meta { font-size: 8px; }
  .task-meta strong { font-size: 8px; }
  .task-progress-line>div { width: 58px; }
  .task-action { min-height: 25px; font-size: 7px; }
  .task-remove { width: 18px; }
  .day-empty { align-items: flex-start; flex-wrap: wrap; padding: 12px 1px; }
  .day-empty>div { flex: 1; }
  .day-empty .button { margin-left: 39px; }
  .today-board-foot { font-size: 7px; }
  .weight-row { grid-template-columns: minmax(120px,1.4fr) minmax(35px,.8fr) 30px 39px; gap: 6px; padding: 8px 1px; }
  .weight-name strong { font-size: 8px; }
  .weight-questions, .weight-points { font-size: 9px; }
  .content-columns { gap: 18px; }
  .right-column { grid-template-columns: 1fr; gap: 8px; }
  .side-panel { padding: 13px; }
  .side-panel h3 { font-size: 17px; }
  .side-panel p { font-size: 8px; }
  .source-footer { font-size: 7px; line-height: 1.5; }
  .page-heading { align-items: flex-start; margin: 2px 0 18px; }
  .page-heading>.button { min-height: 32px; padding: 0 9px; font-size: 8px; white-space: nowrap; }
  .plan-toolbar { flex-wrap: wrap; gap: 9px; padding: 9px; }
  .plan-date-control { min-width: 115px; }
  .routine-summary { margin-left: auto; font-size: 7px; }
  .plan-toolbar>.button { width: 100%; }
  .plan-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .plan-day-heading h2 { font-size: 20px; }
  .plan-aside .side-panel { position: static; }
  .score-warning { align-items: flex-start; padding: 9px; }
  .score-warning p { font-size: 8px; line-height: 1.5; }
  .warning-source { font-size: 6px; }
  .syllabus-toolbar { align-items: stretch; flex-direction: column; gap: 7px; margin-bottom: 17px; }
  .filter-wrap { min-width: 0; }
  .toggle-group { overflow-x: auto; }
  .filter-chip { flex: 0 0 auto; padding: 6px 8px; font-size: 7px; }
  .syllabus-groups { grid-template-columns: 1fr; gap: 19px; }
  .group-heading h2 { font-size: 19px; }
  .syllabus-card summary { min-height: 50px; }
  .syllabus-name strong { font-size: 9px; }
  .syllabus-details li { font-size: 8px; }
  .error-summary { gap: 10px; padding-left: 8px; }
  .error-summary strong { font-size: 18px; }
  .error-summary span { font-size: 6px; }
  .error-toolbar select { min-width: 112px; font-size: 8px; }
  .error-card { align-items: flex-start; gap: 7px; padding: 9px; }
  .error-mark { width: 22px; height: 22px; }
  .error-actions { flex-direction: column; align-items: flex-end; }
  .error-actions .text-button { font-size: 7px; }
  .error-subject { font-size: 8px; }
  .error-content p { line-height: 1.45; }
  .review-row { align-items: flex-start; gap: 6px; padding: 7px; }
  .review-row small { line-height: 1.35; }
  .review-finish { padding: 6px; font-size: 6px; }
  .progress-overview { grid-template-columns: 1fr 1fr; gap: 6px; }
  .progress-overview article { padding: 10px; }
  .progress-overview article span { font-size: 6px; }
  .progress-overview article strong { font-size: 24px; }
  .progress-grid { grid-template-columns: 1fr; }
  .data-panel { padding: 13px; }
  .performance-row { grid-template-columns: minmax(110px,1fr) 1.1fr 30px; }
  .material-status { font-size: 6px; }
  .material-layout { grid-template-columns: 1fr; }
  .material-main { min-height: 0; padding: 23px 17px; }
  .material-main h2 { font-size: 27px; }
  .material-main>p { max-width: 330px; font-size: 9px; }
  .material-illustration { top: 18px; right: 14px; transform: scale(.78); transform-origin: top right; }
  .material-steps { gap: 5px; }
  .material-steps>i { width: 13px; margin: 0; }
  .material-steps strong { font-size: 8px; }
  .material-steps small { font-size: 6px; }
  .material-aside { grid-template-columns: 1fr 1fr; }
  .material-aside .side-panel { min-width: 0; }
  .material-list li { font-size: 7px; }
  .mobile-nav { position: fixed; z-index: 9; inset: auto 0 0; height: calc(57px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(6, 1fr); padding: 4px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(253,252,248,.97); backdrop-filter: blur(8px); }
  .mobile-nav button { display: grid; align-content: center; justify-items: center; gap: 2px; border: 0; border-radius: 6px; background: transparent; color: #8c9790; font-size: 7px; }
  .mobile-nav button span { font-size: 15px; }
  .mobile-nav button.active { color: #3e674c; font-weight: 700; }
  .mobile-nav button.active span { transform: translateY(-1px); }
  .modal { padding: 18px; }
  .week-options { gap: 3px; }
  .week-options span { font-size: 6px; }
  .form-row { gap: 7px; }
  .profile-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 370px) {
  .intro-row h1, .page-heading h1 { font-size: 30px; }
  .exam-feature { grid-template-columns: 1fr .68fr; }
  .feature-kicker { max-width: 180px; }
  .feature-main h2 { font-size: 25px; }
  .feature-side { grid-template-columns: 1fr; justify-items: start; gap: 6px; }
  .date-seal { display: none; }
  .feature-rule { margin-top: 3px; }
  .weight-row { grid-template-columns: minmax(105px,1.4fr) minmax(28px,.7fr) 26px 34px; gap: 4px; }
  .material-aside { grid-template-columns: 1fr; }
  .modal-actions .button { padding: 0 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Biblioteca privada, ingestão e treino com fontes */
.materials-heading { align-items: center; }
.materials-heading h1 { font-size: clamp(32px, 3.8vw, 42px); }
.material-explainer, .provider-notice, .generated-notice { display: flex; gap: 10px; align-items: flex-start; margin: -9px 0 15px; padding: 11px 13px; border: 1px solid #e4e8dc; border-radius: 8px; background: #f0f3ea; color: #647368; font-size: 9px; line-height: 1.55; }
.material-explainer strong { color: #3f5846; white-space: nowrap; }
.provider-notice { display: block; margin: 0 0 14px; border-color: #eadfcf; background: #f8f1e7; color: #796d59; }
.upload-panel, .catalog-panel, .generation-panel, .search-panel, .generated-panel { padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fcfbf7; }
.upload-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px 18px; margin-bottom: 14px; background: #f1f3e9; border-color: #e1e7d8; }
.upload-panel h2, .catalog-heading h2 { margin: 3px 0 0; font: 600 22px/1.1 'Fraunces', Georgia, serif; }
.upload-panel p { max-width: 570px; margin: 5px 0 0; color: #78857b; font-size: 9px; line-height: 1.55; }
.upload-actions { display: grid; justify-items: end; gap: 5px; }
.upload-actions input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.upload-actions input:focus-visible + label { outline: 3px solid rgba(113,154,90,.38); outline-offset: 3px; }
.upload-actions label { cursor: pointer; }
.upload-actions label span { font-size: 15px; }
.upload-actions .is-busy { opacity: .6; pointer-events: none; }
.upload-hint, .generation-footnote { color: #929c92; font-size: 7px; }
.upload-feedback { grid-column: 1/-1; min-height: 0; color: #5c7b59; font-size: 8px; }
.upload-feedback:empty { display: none; }
.upload-feedback.is-error, .is-error { color: #a65e4f; }
.upload-feedback.is-success { color: #5c7b59; }
.material-system-layout { grid-template-columns: minmax(0,1.35fr) minmax(290px,.85fr); align-items: start; margin-bottom: 14px; }
.catalog-panel, .generation-panel { min-width: 0; }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.catalog-heading h2 { font-size: 21px; }
.catalog-count, .panel-number { color: #929c92; font-size: 8px; }
.catalog-note { margin: -2px 0 10px; color: #879188; font-size: 8px; line-height: 1.5; }
.material-catalog { display: grid; gap: 7px; }
.material-record { min-width: 0; padding: 10px; border: 1px solid #e8e9e1; border-radius: 7px; background: #fffefa; }
.material-record-active { border-color: #d6e0cf; background: #f9fbf5; }
.material-record-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.material-file-icon { width: 28px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #e6ddd0; border-radius: 4px; background: #f8f0e5; color: #a3764c; font-size: 7px; font-weight: 700; }
.material-record-info { min-width: 0; flex: 1; display: grid; gap: 3px; }
.material-record-info strong { overflow: hidden; color: #415348; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.material-record-info>span, .material-warning { color: #8a958c; font-size: 7px; }
.material-warning { color: #a1784d; }
.delete-material { width: 23px; height: 23px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: #a1aaa2; font-size: 16px; }
.delete-material:hover { background: #f4e9e2; color: #a35e4c; }
.material-record-controls { display: grid; grid-template-columns: 1fr 1.15fr auto; align-items: end; gap: 7px; margin-top: 9px; }
.material-record-controls label, .generation-form>label, .generation-controls label { min-width: 0; display: grid; gap: 4px; color: #879189; font-size: 7px; font-weight: 700; }
.material-record-controls select, .generation-form select, .generation-form input, .material-search-row input, .material-search-row select, .mistake-form select { width: 100%; min-width: 0; height: 31px; padding: 0 7px; border: 1px solid #e1e5dc; border-radius: 5px; background: #fffefa; color: #506156; font-size: 8px; }
.material-record-controls .material-active-toggle { display: flex; align-items: center; gap: 5px; min-height: 31px; padding: 0 4px; color: #5e755a; white-space: nowrap; }
.material-active-toggle input { accent-color: #64845c; }
.generation-form { display: grid; gap: 10px; }
.generation-form input { padding: 0 9px; }
.generation-form input::placeholder, .material-search-row input::placeholder { color: #a3aca4; }
.generation-controls { display: grid; grid-template-columns: 1fr 86px; gap: 8px; }
.generation-form>.button { width: 100%; min-height: 38px; }
.generation-form>.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.generation-footnote { line-height: 1.45; }
.search-panel, .generated-panel { margin-top: 14px; }
.material-search-row { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 8px; }
.material-search-row input, .material-search-row select { height: 36px; padding: 0 10px; font-size: 9px; }
.search-results { display: grid; gap: 7px; margin-top: 10px; }
.search-hit { padding: 10px 11px; border: 1px solid #e8e9e1; border-radius: 7px; background: #fffefa; }
.search-hit>div { display: flex; justify-content: space-between; gap: 8px; }
.search-hit strong { overflow: hidden; color: #46594e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.search-hit span { flex: 0 0 auto; color: #8c988f; font-size: 7px; }
.search-hit p { margin: 6px 0 0; color: #6d7b72; font-size: 8px; line-height: 1.6; white-space: pre-wrap; }
.generated-panel { padding-bottom: 18px; }
.generated-notice { margin: 0 0 12px; display: block; }
.generated-question, .guide-section { margin-top: 9px; padding: 13px; border: 1px solid #e7e9e0; border-radius: 8px; background: #fffefa; }
.question-number { color: #859782; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.question-stem { margin: 7px 0 10px; color: #394c42; font-size: 10px; font-weight: 600; line-height: 1.6; white-space: pre-wrap; }
.question-options { display: grid; gap: 5px; margin-bottom: 10px; }
.question-options label { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border: 1px solid #eceee7; border-radius: 5px; color: #68766d; font-size: 8px; line-height: 1.5; cursor: pointer; }
.question-options label:has(input:checked) { border-color: #bcccae; background: #f2f5ed; }
.question-options input { margin: 2px 0 0; accent-color: #597b55; }
.question-options b { display: inline-block; min-width: 19px; color: #445d48; }
.question-feedback { margin: 9px 0; padding: 10px; border-radius: 6px; background: #f2f4ed; color: #637367; font-size: 8px; line-height: 1.55; }
.question-feedback p { margin: 5px 0; }
.answer-correct { color: #4f774f; }
.answer-incorrect { color: #a46051; }
.practice-saved { color: #5d7a56; font-size: 7px; font-weight: 700; }
.mistake-form { display: flex; align-items: end; gap: 8px; margin-top: 8px; }
.mistake-form label { min-width: 0; flex: 1; display: grid; gap: 4px; color: #7d897e; font-size: 7px; }
.mistake-form .button { flex: 0 0 auto; }
.citation-list { display: grid; gap: 4px; margin-top: 8px; }
.citation { border-left: 2px solid #b6c69f; padding: 4px 7px; background: #f7f8f2; }
.citation summary { color: #758675; font-size: 7px; cursor: pointer; }
.citation blockquote { margin: 6px 0 3px; color: #849087; font-size: 7px; line-height: 1.5; }
.question-citations { margin-top: 7px; }
.guide-section h3 { margin: 0 0 5px; color: #455a4a; font: 600 16px 'Fraunces', Georgia, serif; }
.guide-section>p { margin: 0; color: #69776e; font-size: 9px; line-height: 1.7; white-space: pre-wrap; }
.button-outline:disabled, .button-dark:disabled { opacity: .55; cursor: not-allowed; }

/* Single-user sign-in for self-hosted production */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 12% 15%, #eef2e5 0, transparent 30%), var(--paper); }
.login-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf7; box-shadow: var(--shadow); }
.login-card .wordmark { padding: 0 0 27px; }
.login-card h1 { margin: 7px 0; font: 600 32px/1.1 'Fraunces', Georgia, serif; }
.login-card>p { margin: 0 0 20px; color: #7f8b83; font-size: 10px; line-height: 1.6; }
.login-card form { display: grid; gap: 8px; }
.login-card form label { color: #58695e; font-size: 9px; font-weight: 700; }
.login-card input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #dfe4d9; border-radius: 6px; background: #fffefa; }
.login-card form .button { width: 100%; margin-top: 5px; }
.login-message { min-height: 15px; margin: 2px 0 0; color: #a45f50; font-size: 8px; }
.logout-button { padding: 5px 8px; border: 1px solid #e1e6dc; border-radius: 5px; background: #fafbf6; color: #66756a; font-size: 8px; }
.logout-button:hover { background: #eef2e8; color: #405844; }

@media (max-width: 820px) {
  .material-system-layout { grid-template-columns: 1fr; }
  .upload-panel { grid-template-columns: minmax(0,1fr) auto; }
}
@media (max-width: 650px) {
  .materials-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 17px; }
  .materials-heading h1 { font-size: 32px; }
  .material-explainer { display: block; }
  .material-explainer strong { display: block; margin-bottom: 3px; }
  .upload-panel { grid-template-columns: 1fr; padding: 13px; }
  .upload-actions { justify-items: start; }
  .material-record-controls { grid-template-columns: 1fr 1fr; }
  .material-record-controls .material-active-toggle { grid-column: 1/-1; }
  .material-search-row { grid-template-columns: 1fr; }
  .search-panel, .catalog-panel, .generation-panel, .generated-panel { padding: 13px; }
  .mistake-form { align-items: stretch; flex-direction: column; }
  .mistake-form .button { width: 100%; }
  .login-card { padding: 23px; }
}
