:root {
  color-scheme: light;
  font-family: "Aptos", "Helvetica Neue", Arial, sans-serif;
  color: #182c25;
  background: #f4f6f1;
  line-height: 1.55;
  --bg: #f4f6f1;
  --panel: #fff;
  --ink: #182c25;
  --muted: #51665b;
  --line: #dce4db;
  --strong-line: #bbcbbf;
  --green: #1b503d;
  --deep: #173b31;
  --soft: #eaf2e7;
  --lime: #dbf3bd;
  --red: #943b34;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.16; text-wrap: balance; overflow-wrap: anywhere; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: #0b3224; }
button, select, input { font: inherit; color: inherit; }
button, a, input, select, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid #2b7755; outline-offset: 3px; }
button:not(:disabled), summary { cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--green); }
input[type=checkbox] { width: 17px; height: 17px; flex: 0 0 17px; margin: 0; }
label:has(input[type=checkbox]) { cursor: pointer; }
img { max-width: 100%; display: block; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 10; background: white; padding: 10px; }
.skip-link:focus { top: 12px; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-inner {
  max-width: 1160px;
  min-height: 74px;
  margin: auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.03rem; white-space: nowrap; }
.brand b { font-weight: 800; }
.top nav { align-self: stretch; display: flex; gap: 27px; align-items: stretch; }
.top nav a { display: flex; align-items: center; border-bottom: 3px solid transparent; padding: 3px 2px 0; text-decoration: none; font-size: .91rem; color: var(--muted); font-weight: 650; }
.top nav a:hover, .top nav a[aria-current] { color: var(--green); }
.top nav a[aria-current] { border-bottom-color: var(--green); }
main { width: min(100%, 1160px); padding: 55px 32px 68px; margin: auto; min-height: calc(100dvh - 74px); }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 500; letter-spacing: -.055em; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 38px; }
.page-heading p { color: var(--muted); margin-top: 12px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 720;
  text-decoration: none;
  font-size: .93rem;
  line-height: 1.2;
  text-align: center;
}
.primary { background: var(--deep); color: white; }
.primary:not(:disabled):hover { background: #225642; color: white; }
.secondary { background: var(--panel); border-color: var(--strong-line); color: var(--green); }
.secondary:not(:disabled):hover { background: var(--soft); }
.resume { padding: 23px 27px; margin: 0 0 36px; border-radius: var(--radius); color: white; background: var(--deep); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.resume-caption { font-size: .83rem; font-weight: 720; color: var(--lime); }
.resume strong { display: block; margin: 1px 0 2px; font-size: 1.6rem; }
.resume strong span { font-size: 1rem; font-weight: 500; color: #d7e4d8; }
.resume p:not(.resume-caption) { font-size: .9rem; color: #dfebe0; }
.resume .primary { background: var(--lime); color: var(--deep); flex: 0 0 auto; }
.resume .primary:hover { background: white; color: var(--deep); }
.semester + .semester { margin-top: 31px; }
.semester > header { margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
.semester > header::after { content: ""; flex: 1; border-bottom: 1px solid var(--strong-line); }
.semester h2 { white-space: nowrap; font-size: 1.23rem; font-weight: 780; }
.exam-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.exam-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,120px) minmax(0,135px) auto; align-items: center; gap: 20px; padding: 22px 24px; }
.exam-row + .exam-row { border-top: 1px solid var(--line); }
.exam-name h3 { font-size: 1.45rem; font-weight: 820; letter-spacing: -.035em; }
.exam-name p { margin-top: 5px; color: var(--muted); font-size: .84rem; }
.exam-count { display: grid; font-variant-numeric: tabular-nums; }
.exam-count span { color: var(--muted); font-size: .82rem; }
.exam-count strong { font-size: 1.13rem; }
.empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--strong-line); border-radius: var(--radius); background: #fcfdfb; }
.empty h2 { font-size: 1.32rem; }
.empty p { margin: 8px 0 0; color: var(--muted); }
.empty .button { margin-top: 16px; }
.notice { margin: 14px 0; padding: 10px 14px; border: 1px solid #e4c5b8; border-radius: 8px; color: #762d2a; background: #fff5ef; }
.floating-status { position: fixed; inset: auto 20px 20px auto; z-index: 10; background: #302520; color: white; max-width: min(400px, calc(100% - 40px)); padding: 12px 16px; border-radius: 9px; }
dialog {
  width: min(690px, calc(100vw - 34px));
  max-height: min(795px, calc(100dvh - 40px));
  border: 1px solid var(--line);
  margin: auto;
  border-radius: 17px;
  padding: 0;
  color: var(--ink);
  background: white;
  overflow: hidden;
  box-shadow: 0 19px 75px #122e2940;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #18322982; }
.dialog-header, .dialog-footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 24px; }
.dialog-header { border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.48rem; }
.dialog-footer { border-top: 1px solid var(--line); }
.dialog-footer strong, .dialog-footer small { display: block; }
.dialog-footer small { color: var(--muted); }
.dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px 24px; }
.eyebrow { color: var(--green); font-weight: 750; font-size: .81rem; margin-bottom: 4px; }
.icon-button { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; font-size: 1.5rem; width: 39px; height: 39px; flex: 0 0 39px; line-height: 1; }
.icon-button:hover { background: var(--soft); }
.order-options { display: grid; gap: 9px; }
.order-card { display: flex; text-align: left; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; }
.order-card:hover { background: var(--soft); border-color: var(--strong-line); }
.order-card > span { border-radius: 8px; background: var(--soft); color: var(--green); width: 38px; text-align: center; line-height: 38px; font-size: 1.45rem; }
.order-card small { display: block; color: var(--muted); }
.setup-order, .setup-section { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setup-order { padding: 9px 12px; border-radius: 8px; background: var(--soft); margin-bottom: 17px; font-size: .88rem; }
.link-button { border: 0; padding: 4px 3px; background: transparent; color: var(--green); font-weight: 730; text-decoration: underline; text-underline-offset: .16em; min-height: 35px; }
.edition-field { border: 0; margin: 0 0 15px; padding: 0; }
.edition-field legend { padding: 0; font-weight: 740; font-size: .92rem; margin-bottom: 6px; }
.edition-list { display: flex; gap: 7px; flex-wrap: wrap; }
.edition-list label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: .87rem; }
.setup-section { margin: 7px 0; }
.setup-section h3 { font-size: 1.04rem; }
.choose-table { border: 1px solid var(--line); border-radius: 10px; overflow: clip; }
.choose-table table { border-collapse: collapse; width: 100%; }
.choose-table th, .choose-table td { text-align: left; padding: 8px 13px; line-height: 1.35; overflow-wrap: anywhere; }
.choose-table th { background: var(--bg); font-weight: 700; font-size: .79rem; color: var(--muted); }
.choose-table th:last-child, .choose-table td:not([colspan]):last-child { text-align: right; width: 90px; font-variant-numeric: tabular-nums; }
.choose-table tr + tr td { border-top: 1px solid var(--line); }
.choose-table td label { min-height: 29px; display: flex; align-items: center; gap: 9px; }
.switch-label { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 680; margin-top: 16px; min-height: 38px; }
.switch-label input[type=checkbox] { appearance: none; width: 35px; height: 21px; flex-basis: 35px; border-radius: 30px; border: 1px solid #8fa798; background: #e2eae3; display: grid; align-items: center; padding: 2px; cursor: pointer; }
.switch-label input[type=checkbox]::after { content: ""; border-radius: 50%; width: 15px; height: 15px; background: #678172; }
.switch-label input[type=checkbox]:checked { background: var(--green); border-color: var(--green); justify-items: end; }
.switch-label input[type=checkbox]:checked::after { background: white; }
.switch-label input:disabled + span { color: var(--muted); }
.quantity-row td { background: var(--bg); }
.quantity-control { display: grid; align-items: center; grid-template-columns: auto 64px minmax(50px, 1fr); gap: 12px; font-size: .88rem; padding-inline-start: 24px; }
.quantity-control input[type=number] { min-height: 35px; width: 100%; padding: 3px 5px; border: 1px solid var(--strong-line); border-radius: 6px; }
.quantity-control input[type=range] { width: 100%; }
.confirm-footer { justify-content: flex-end; }
.quiz-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 19px; font-size: .94rem; }
.quiz-heading a { font-weight: 700; text-decoration: none; }
.quiz-heading div span { margin-inline: 5px; color: var(--muted); }
.quiz-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 260px); gap: 23px; align-items: start; }
.question-card { grid-column: 1; grid-row: 1; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
.quiz-nav { grid-column: 2; grid-row: 1; position: sticky; top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 16px; min-width: 0; }
.quiz-nav h2 { font-size: 1.06rem; }
.quiz-nav p { color: var(--muted); font-size: .81rem; margin: 5px 0; }
progress { appearance: none; width: 100%; height: 6px; color: var(--green); background: var(--soft); border: 0; border-radius: 40px; display: block; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
.number-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(36px,1fr)); gap: 6px; padding: 3px; margin: 13px -3px 0; max-height: 260px; overflow: auto; position: relative; }
.number-button { border: 1px solid var(--line); background: var(--bg); border-radius: 7px; padding: 0; min-height: 36px; min-width: 34px; font-variant-numeric: tabular-nums; font-size: .89rem; }
.number-button:hover { border-color: var(--green); }
.number-button.answered { color: var(--deep); background: #dcefd6; border-color: #a5c4a5; font-weight: 750; }
.number-button[aria-current] { color: white; background: var(--deep); border-color: var(--deep); font-weight: 750; }
.number-button.wrong:not([aria-current]) { color: #82332f; background: #f6e7e2; border-color: #e0b6aa; }
.quiz-switch { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .84rem; }
.question-header, .question-content, .question-footer { padding: 20px 28px; }
.question-header { padding-bottom: 12px; }
.question-header h1 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); margin-top: 10px; scroll-margin-top: 14px; }
.question-content { padding-top: 4px; }
.question-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; font-size: .8rem; color: var(--muted); font-weight: 660; }
.source { overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; border-radius: 5px; background: var(--soft); color: var(--green); padding: 3px 7px; font-size: .76rem; font-weight: 730; }
.ai-tag { color: #3a581f; background: #e8f2db; }
.prompt-text, .statements, .command, .rationale p, .rationale dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-text:empty { display: none; }
.statements { list-style: upper-roman; padding-inline-start: 2rem; }
.statements li + li { margin-top: 5px; }
.command { font-weight: 750; margin-top: 10px; }
figure { margin: 12px 0; }
figure img { height: auto; max-height: 520px; object-fit: contain; object-position: left; border-radius: 5px; }
.alternatives { display: grid; gap: 7px; margin-top: 16px; }
.alternative { position: relative; display: flex; align-items: center; gap: 11px; background: #fcfdfa; border: 1px solid var(--line); padding: 8px 10px; border-radius: 9px; min-height: 46px; }
label.alternative { cursor: pointer; }
label.alternative:hover { border-color: var(--strong-line); background: var(--bg); }
.alternative input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.alternative:has(input:focus-visible) { outline: 2px solid #2b7755; outline-offset: 2px; }
.alternative.selected, .alternative.correct { border-color: #8eb59a; background: #e9f5e8; }
.alternative.incorrect { border-color: #d6a89e; background: #fcf0ea; }
.letter { display: grid; place-items: center; font-weight: 770; height: 27px; width: 27px; flex: 0 0 27px; color: var(--green); background: #ebf1e7; border-radius: 6px; font-size: .85rem; }
.alternative.selected .letter, .alternative.correct .letter { background: var(--deep); color: white; }
.alternative.incorrect .letter { background: #873b32; color: white; }
.option-body { min-width: 0; flex: 1; overflow-wrap: anywhere; white-space: pre-wrap; }
.answer-indicator { font-size: .77rem; font-weight: 720; }
.rationale { margin: 17px 0 0; border-radius: 10px; border: 1px solid #c7dac6; padding: 15px; background: #f0f7ed; }
.rationale h3 { color: var(--green); font-size: 1.04rem; margin-bottom: 7px; }
.rationale dl { margin: 9px 0 0; }
.rationale dl:empty { display: none; }
.rationale dl > div { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 4px; padding: 5px 0; }
.rationale dt { font-weight: 750; }
.rationale dd { margin: 0; }
.question-footer { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 14px; }
.finish { margin-left: auto; }
.filter, .import-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; border: 1px solid var(--line); background: white; border-radius: var(--radius); padding: 15px; }
.filter label, .import-form label { flex: 1 1 125px; min-width: 0; color: var(--muted); font-size: .84rem; font-weight: 680; }
.filter .search-field { flex: 1 1 100%; }
.filter input, .filter select, .import-form input { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--strong-line); border-radius: 7px; padding: 7px 9px; min-height: 42px; line-height: 1.2; color: var(--ink); background: white; font-size: .96rem; font-weight: 500; }
.import-form label { flex: 1 1 235px; }
.clear-link { align-self: center; margin-top: 21px; font-size: .84rem; }
.results-count { margin: 20px 0 9px; color: var(--muted); font-size: .87rem; }
.bank-card, .preview { padding: 20px 25px; border-radius: var(--radius); border: 1px solid var(--line); background: white; }
.bank-card + .bank-card { margin-top: 12px; }
.bank-card h2 { margin: 8px 0 9px; font-size: 1.27rem; }
.bank-card details { margin-top: 13px; }
.bank-card summary { color: var(--green); font-weight: 720; min-height: 40px; padding: 8px 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: .87rem; }
.preview, #import-preview .empty { margin-top: 16px; }
.preview h3 { font-size: 1.08rem; margin-top: 16px; margin-bottom: 6px; }
.preview h2 + p { margin-top: 7px; }
.preview-item { border-bottom: 1px solid var(--line); padding: 8px 4px; }
.preview-item .tag { margin-right: 5px; }
.preview-item + .button { margin-top: 17px; }
.preview-content { padding: 10px 0; }
.preview-content .change { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); margin-bottom: 7px; }
.change h4 { grid-column: 1/-1; }
.change div { min-width: 0; font-size: .83rem; }
.change pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--muted); }
@media (max-width: 750px) {
  .top-inner, main { padding-inline: 19px; }
  main { padding-top: 33px; }
  .page-heading { margin-bottom: 23px; align-items: start; flex-direction: column; gap: 1px; }
  .exam-row { grid-template-columns: 1fr 1fr; gap: 7px 15px; padding: 16px; }
  .exam-name { grid-column: 1; }
  .exam-row .button { grid-column: 2; grid-row: 1; justify-self: end; }
  .exam-count { padding-top: 4px; }
  .quiz-layout { display: flex; flex-direction: column; gap: 11px; }
  .quiz-nav, .question-card { width: 100%; }
  .quiz-nav { position: static; }
  .number-grid { max-height: 115px; }
  .question-header, .question-content, .question-footer { padding-inline: 17px; }
}
@media (max-width: 425px) {
  .top-inner { padding: 8px 14px 0; display: block; min-height: 0; }
  .brand { min-height: 41px; }
  .brand img { width: 29px; height: 29px; }
  .top nav a { min-height: 41px; }
  main { padding-inline: 13px; }
  .resume { padding: 15px; flex-wrap: wrap; }
  .dialog-header, .dialog-footer, .dialog-body { padding-inline: 13px; }
  .dialog-body { padding-block: 14px; }
  .quantity-control { padding-inline-start: 0; gap: 7px; }
  .setup-order { align-items: start; }
  .finish { margin: 3px 0 0; width: 100%; }
  .bank-card, .preview { padding-inline: 14px; }
}

.admin-login { max-width: 500px; }
.field-note, .form-hint { color: var(--muted); font-size: .84rem; font-weight: 500; }
.field-note { margin-inline-start: .35rem; }
.form-hint { margin-top: 8px; }
.report-history > summary, .report-preview > summary { font-weight: 720; color: var(--green); }
.report-preview { margin: 14px 0; padding: 10px 0; border-block: 1px solid var(--line); }
.history-content { margin-top: 10px; }
.history-content summary span { display: block; margin-inline-start: 16px; color: var(--muted); font-size: .85rem; }
.history-report { margin-top: 8px; }
.history-report .button { margin-block: 8px 4px; }
.report-body { overflow-x: auto; overflow-wrap: anywhere; padding: 8px 2px; }
.report-body h1 { line-height: 1.25; font-family: inherit; font-size: 1.22rem; font-weight: 750; letter-spacing: normal; margin: 8px 0; }
.report-body h2, .report-body h3 { font-size: 1rem; margin: 16px 0 6px; }
.report-body p, .report-body ul, .report-body ol { margin-block: 6px; }
.report-body table { border-collapse: collapse; width: 100%; min-width: 505px; font-size: .85rem; margin-block: 8px; }
.report-body th, .report-body td { text-align: left; vertical-align: top; padding: 7px; border-bottom: 1px solid var(--line); }
.report-body th { background: var(--bg); }

