:root {
  --ink: #082938;
  --muted: #607078;
  --paper: #f5f2ea;
  --surface: #fffefa;
  --line: #d9ddd7;
  --green: #176b5b;
  --green-dark: #0d5145;
  --coral: #f0624d;
  --success: #e4f3eb;
  --error: #fff0ec;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(20px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, .96);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--green); color: white; font: 700 19px Georgia, serif; }
.brand strong { font: 600 19px Georgia, serif; }
.brand-logo { display:none; }
.brand-with-logo .brand-logo { display:block; width:154px; height:106px; object-fit:contain; }
.brand-with-logo > span,.brand-with-logo > strong { display:none; }
@media(max-width:480px) { .brand-with-logo .brand-logo { width:134px; height:96px; } .site-header { gap:12px; } }
.environment-badge { padding: 7px 10px; border-radius: 999px; background: #e8efeb; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.sequence-toolbar { margin:0 0 20px; min-width:0; }
.sequence-toolbar label { display:grid; gap:8px; font-weight:600; }
.sequence-toolbar select { width:100%; min-width:0; max-width:100%; padding:12px; border:1px solid var(--line); border-radius:9px; background:white; color:var(--ink); font:inherit; }
.sequence-footer { margin-top:20px; gap:12px; }

main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.access-shell { max-width: 650px; margin: clamp(54px, 9vw, 110px) auto; text-align: center; }
.eyebrow { color: var(--coral); font-size: 11px; font-weight: 850; letter-spacing: 1.4px; text-transform: uppercase; }
h1 { margin: 10px 0 12px; font: 500 clamp(36px, 6vw, 58px)/1.08 Georgia, "Times New Roman", serif; }
.access-shell > p, .unit-header p { color: var(--muted); line-height: 1.65; }
.access-card { display: grid; gap: 9px; margin-top: 34px; padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 22px 60px rgba(30, 48, 43, .08); text-align: left; }
label { margin-top: 7px; font-size: 12px; font-weight: 800; }
label span { color: var(--muted); font-weight: 500; }
input, select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cbd3cd; border-radius: 9px; background: white; color: var(--ink); }
input:focus, select:focus, button:focus-visible { outline: 3px solid rgba(23, 107, 91, .2); outline-offset: 2px; }
.access-card > button, .primary-button { min-height: 49px; margin-top: 15px; padding: 12px 18px; border: 0; border-radius: 9px; background: var(--green); color: white; font-weight: 850; }
.access-card > button { display: flex; justify-content: space-between; align-items: center; }
button:disabled { cursor: not-allowed; opacity: .55; }
.form-message { min-height: 20px; margin: 3px 0 0; color: #9a3f31; font-size: 12px; line-height: 1.5; }
.catalog-entry-button { margin-top: 18px; padding: 11px 16px; border: 1px solid var(--green); border-radius: 9px; background: transparent; color: var(--green-dark); font-size: 12px; font-weight: 850; }

.catalog-shell { padding: 46px 0 80px; }
.catalog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.catalog-header h1 { font-size: clamp(32px, 5vw, 48px); }
.catalog-header p { max-width: 760px; color: var(--muted); line-height: 1.65; }
.catalog-layout { display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(320px, .9fr); gap: 20px; align-items: start; }
.catalog-tree, .catalog-results { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 16px 45px rgba(30, 48, 43, .06); }
.catalog-tree { display: grid; gap: 7px; max-height: 690px; overflow: auto; }
.catalog-node { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-left: calc(var(--catalog-depth) * 18px); padding: 9px 10px; border: 1px solid var(--line); border-left: 5px solid #176e60; border-radius: 9px; background: #fbfcf9; }
.catalog-node-program_area { border-left-color: #248a76; }
.catalog-node-discipline { border-left-color: #367cad; }
.catalog-node-matter { border-left-color: #b87924; }
.catalog-node-topic { border-left-color: #cb5848; }
.catalog-node-main { min-width: 0; padding: 2px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.catalog-node-main small, .catalog-node-main strong { display: block; }
.catalog-node-main small { margin-bottom: 2px; color: var(--muted); font-size: 9px; letter-spacing: .45px; text-transform: uppercase; }
.catalog-node-main strong { line-height: 1.35; }
.catalog-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.catalog-count { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 999px; background: #e6f0ec; color: var(--green-dark); font-size: 10px; font-weight: 850; white-space: nowrap; }
.catalog-count-direct { background: #fff0d7; color: #79571d; }
.catalog-results { position: sticky; top: 20px; min-height: 300px; }
.catalog-results h2 { margin: 7px 0 10px; font: 500 30px Georgia, serif; }
.catalog-result-summary { color: var(--muted); line-height: 1.55; }
.catalog-result-note { margin-top: 20px; padding: 14px 16px; border-left: 3px solid var(--green); background: #edf5f1; color: var(--green-dark); font-size: 12px; line-height: 1.55; }

.study-shell { padding: 46px 0 80px; }
.exam-shell { padding: 38px 0 80px; }
.unit-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.exam-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.exam-header h1 { max-width: 760px; font-size: clamp(32px, 5vw, 48px); }
.exam-header p { margin: 0; color: var(--muted); }
.exam-session-tools { min-width: 150px; display: grid; justify-items: end; gap: 5px; }
.exam-timer { min-width: 138px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 850; letter-spacing: 1px; text-align: center; }
.unit-header h1 { max-width: 760px; font-size: clamp(32px, 5vw, 48px); }
.unit-header p { max-width: 760px; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 800; }
.study-navigation { display: flex; gap: 8px; margin: 30px 0 12px; padding-bottom: 12px; overflow-x: auto; }
.study-navigation button { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 800; }
.study-navigation button.active { border-color: var(--green); background: var(--green); color: white; }
.study-navigation button:disabled { opacity: .42; }
.study-progress { min-height: 28px; padding: 7px 2px; color: var(--muted); font-size: 11px; }
.exam-progress { min-height: 30px; margin-top: 24px; padding: 8px 2px; color: var(--muted); font-size: 11px; }
.exam-navigation { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 16px; }
.exam-navigation button { width: 39px; height: 39px; display: grid; place-items: center; padding: 0; border: 1px solid #cbd3cd; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 800; }
.exam-navigation button.answered { border-color: var(--green); background: #e5f1ec; color: var(--green-dark); }
.exam-navigation button.flagged { box-shadow: inset 0 -4px 0 #dcaa42; }
.exam-navigation button.attempted { box-shadow: inset 0 -4px 0 var(--coral); }
.exam-navigation button.current { outline: 3px solid rgba(23, 107, 91, .22); border-color: var(--green); }
.exam-navigation button.overview { width: auto; padding: 0 13px; }
.study-content { min-height: 420px; padding: clamp(20px, 4vw, 42px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 16px 45px rgba(30, 48, 43, .06); }
.exam-content { min-height: 430px; padding: clamp(22px, 4vw, 44px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 16px 45px rgba(30, 48, 43, .06); }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin: 6px 0; font: 500 clamp(25px, 4vw, 36px) Georgia, serif; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.empty-state { padding: 55px 20px; color: var(--muted); text-align: center; }

.source-list, .board-list { display: grid; gap: 22px; }
.source-card { padding: clamp(20px, 4vw, 34px); border: 1px solid #d7d4c9; background: #fffef9; }
.source-card header { padding-bottom: 16px; border-bottom: 2px solid #293b3a; }
.source-card h3 { margin: 5px 0; font: 600 21px Georgia, serif; }
.source-card small, .source-card cite { color: var(--muted); font-size: 11px; font-style: normal; }
.source-card blockquote { margin: 24px 0 15px; white-space: pre-line; font: 400 17px/1.72 Georgia, serif; }
.source-card .explanation { padding: 15px 17px; border-left: 3px solid var(--green); background: #f0f6f3; line-height: 1.6; }

.board-card { overflow-x: auto; padding: clamp(20px, 4vw, 34px); border: 1px solid #dce2dd; border-radius: 12px; background: #f4f7f4; }
.board-card > h3 { margin: 0 0 6px; font: 600 24px Georgia, serif; text-align: center; }
.board-card > p { color: var(--muted); text-align: center; }
.board-stage { width: fit-content; margin: 9px auto 0; padding: 6px 10px; border-radius: 999px; background: #e4f0eb; color: var(--green-dark); font-size: 10px; font-weight: 850; letter-spacing: .35px; }
.board-tree { min-width:380px; width:max-content; margin:auto; text-align:center; }.tree-root { width:250px; min-height:50px; display:grid; place-items:center; margin:auto; padding:12px 20px; border-radius:999px; color:white; font:500 16px Georgia,serif; overflow-wrap:anywhere; box-shadow:0 8px 20px rgba(36,66,65,.14); }.board-tree ul { position:relative; display:flex; justify-content:center; margin:0; padding:30px 0 0; list-style:none; }.board-tree ul::before { content:""; position:absolute; top:0; left:50%; height:30px; border-left:1px solid #98a6a1; }.board-tree li { position:relative; min-width:92px; padding:27px 5px 0; list-style:none; }.board-tree li::before,.board-tree li::after { content:""; position:absolute; top:0; width:50%; height:27px; border-top:1px solid #98a6a1; }.board-tree li::before { right:50%; }.board-tree li::after { left:50%; border-left:1px solid #98a6a1; }.board-tree li:only-child::before,.board-tree li:only-child::after { display:none; }.board-tree li:only-child { padding-top:0; }.board-tree li:first-child::before,.board-tree li:last-child::after { border-top:0; }.board-tree li:last-child::before { border-right:1px solid #98a6a1; border-radius:0 5px 0 0; }.board-tree li:first-child::after { border-radius:5px 0 0 0; }.tree-arrow { position:absolute; left:50%; z-index:2; display:block; pointer-events:none; }.tree-arrow-root { top:15px; width:9px; height:9px; border-right:1.5px solid #75827e; border-bottom:1.5px solid #75827e; background:#f7faf8; transform:translateX(-50%) rotate(45deg); }.tree-arrow-secondary { top:19px; width:0; height:0; border-right:5px solid transparent; border-left:5px solid transparent; border-top:8px solid #35413e; transform:translateX(-50%); }.tree-arrow-deep { top:21px; width:0; height:0; border-right:4px solid transparent; border-left:4px solid transparent; border-top:6px solid #485552; transform:translateX(-50%); }.board-tree li:only-child > .tree-arrow-root { top:-12px; }.board-tree li:only-child > .tree-arrow-secondary { top:-8px; }.board-tree li:only-child > .tree-arrow-deep { top:-6px; }.tree-node { width:170px; min-height:48px; display:grid; place-items:center; margin-inline:auto; padding:8px 9px; border:1px solid var(--node-color); background:color-mix(in srgb,var(--node-color) 16%,white); color:color-mix(in srgb,var(--node-color) 82%,black); font-size:8px; line-height:1.35; text-align:center; white-space:normal; overflow-wrap:anywhere; hyphens:auto; }.tree-node.shape-capsule { border-radius:999px; }.tree-node.shape-hexagon { border:0; clip-path:polygon(9% 0,91% 0,100% 50%,91% 100%,9% 100%,0 50%); }.tree-node.shape-rounded { border-radius:5px 18px 5px 18px; }.tree-node.shape-rectangle { border-radius:3px; }
/* Keep the hosted outline choices while using the original localhost tree layout. */
.tree-node { position:relative; isolation:isolate; border-width:var(--node-border,1px); background:#fff; color:var(--ink); font-size:12px; }
.tree-node small { display:block; font-size:10px; margin-top:4px; }
.tree-node.shape-hexagon { background:var(--node-color); }
.tree-node.shape-hexagon::before { content:""; position:absolute; inset:var(--node-border,1px); background:#fff; clip-path:inherit; z-index:-1; }
.tree-node.tree-node-lacuna { background:repeating-linear-gradient(135deg,#fff 0,#fff 6px,#eef3ef 6px,#eef3ef 12px); }
.tree-node.tree-node-lacuna.shape-hexagon::before { background:repeating-linear-gradient(135deg,#fff 0,#fff 6px,#eef3ef 6px,#eef3ef 12px); }
.board-note { margin-top: 26px; padding: 18px 20px; border-left: 4px solid #b99a50; border-radius: 10px; background: #faf5e8; font-size: 16px; line-height: 1.7; text-align: left; overflow-wrap: anywhere; }
.board-note > .board-note-title { display: block; margin-bottom: 8px; color: #745b1f; font-size: 16px; }
.board-note-body { white-space: pre-wrap; }

.associated-board { margin: 0 0 25px; overflow: hidden; border: 1px solid #cfdad4; border-radius: 12px; background: #f7faf8; }
.associated-board > summary { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; color: var(--green-dark); cursor: pointer; list-style: none; }
.associated-board > summary::-webkit-details-marker { display: none; }
.associated-board > summary i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: var(--green); color: white; font-style: normal; }
.associated-board > summary span { display: grid; gap: 2px; }
.associated-board > summary b { font-size: 12px; }
.associated-board > summary small { color: var(--muted); font-size: 10px; }
.associated-board > summary em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 800; }
.associated-board > .board-card { margin: 0 14px 14px; }

.question-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.question-meta span { padding: 6px 9px; border-radius: 999px; background: #edf1ee; color: #52635d; font-size: 10px; font-weight: 800; }
.question-card h2 { margin: 0 0 24px; font: 500 clamp(23px, 4vw, 33px)/1.35 Georgia, serif; }
.exam-question-card h2 { max-width: 900px; margin: 10px 0 28px; white-space: pre-line; font: 500 clamp(22px, 3.5vw, 31px)/1.4 Georgia, serif; }
.exam-instructions { margin-bottom: 24px; padding: 15px 17px; border-left: 3px solid var(--green); background: #f0f6f3; color: #435951; font-size: 12px; line-height: 1.6; }
.exam-instructions strong { display: block; margin-bottom: 4px; color: var(--green-dark); }
.exam-alternatives { max-width: 900px; }
.alternatives { display: grid; gap: 10px; }
.alternative { width: 100%; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 13px; border: 1px solid #d4d9d4; border-radius: 10px; background: white; color: var(--ink); text-align: left; }
.alternative > b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: #eff0eb; }
.alternative.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(23, 107, 91, .12); }
.alternative.correct { border-color: #5c9d83; background: var(--success); }
.alternative.wrong { border-color: #d77d6c; background: var(--error); }
.answer-area { display: grid; gap: 14px; margin-top: 22px; }
.answer-area .primary-button { justify-self: end; min-width: 170px; }
.typing-input { font-size: 16px; }
.typing-fields { display: grid; gap: 12px; }
.typing-field { display: grid; gap: 6px; margin: 0; }
.typing-field > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.typing-input.correct { border-color: #5c9d83; background: var(--success); }
.typing-input.wrong { border-color: #d77d6c; background: var(--error); }
.feedback { margin-top: 25px; padding: 18px 20px; border-left: 4px solid var(--green); background: var(--success); line-height: 1.6; }
.feedback.error { border-color: var(--coral); background: var(--error); }
.feedback h3 { margin: 0 0 7px; font: 600 19px Georgia, serif; }
.feedback p { margin: 6px 0; }
.question-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.question-footer button { padding: 10px 13px; border: 1px solid #bccbc5; border-radius: 8px; background: white; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.exam-question-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.exam-question-actions button:last-child { justify-self: end; }
.secondary-button, .review-button { min-height: 43px; padding: 10px 14px; border: 1px solid #b9c9c2; border-radius: 8px; background: white; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.review-button { border-color: #d6bd80; color: #72561d; }
.review-button.active { background: #fff4d7; box-shadow: inset 0 -3px 0 #dcaa42; }
.exam-review-card h2, .exam-result-summary h2 { margin: 7px 0 23px; font: 500 clamp(28px, 4vw, 39px) Georgia, serif; }
.exam-review-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 25px 0; }
.exam-review-summary > div { display: grid; gap: 3px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.exam-review-summary strong { font: 500 30px Georgia, serif; }
.exam-review-summary span { color: var(--muted); font-size: 11px; }
.exam-warning { padding: 14px 16px; border-left: 3px solid #dcaa42; background: #fff8e8; color: #69552a; font-size: 12px; line-height: 1.55; }
.exam-delivery-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.exam-delivery-actions .primary-button, .exam-result > .primary-button { margin-top: 0; }
.exam-result-summary { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.exam-result-summary p { margin: 0; color: var(--muted); }
.exam-result-list { display: grid; gap: 15px; margin-bottom: 25px; }
.exam-result-item { padding: 20px; border: 1px solid var(--line); border-left: 5px solid var(--green); border-radius: 10px; background: #fbfcf9; }
.exam-result-item.wrong { border-left-color: var(--coral); background: #fffaf8; }
.exam-result-item h3 { margin: 8px 0 15px; white-space: pre-line; font: 600 19px/1.45 Georgia, serif; }
.exam-result-item p { margin: 7px 0; line-height: 1.55; }
.result-comment { margin-top: 14px; padding: 14px 16px; border-left: 3px solid var(--green); background: #edf5f1; line-height: 1.6; }
.zero-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.zero-target-card { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcf9; color: var(--ink); text-align: left; }
.zero-target-card:hover { border-color: var(--green); transform: translateY(-1px); }
.zero-target-card small { color: var(--coral); font-size: 10px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
.zero-target-card strong { max-height: 4.5em; overflow: hidden; font: 600 16px/1.5 Georgia, serif; }
.zero-target-card span { color: var(--muted); font-size: 10px; }
.zero-original-question { margin-bottom: 32px; padding: clamp(20px, 4vw, 32px); border: 1px solid #cfd8d2; border-radius: 12px; background: #fffefb; }
.zero-original-question h3 { margin: 9px 0 22px; white-space: pre-line; font: 500 clamp(20px, 3vw, 27px)/1.45 Georgia, serif; }
.zero-original-question > .primary-button { margin-top: 18px; }
.zero-section-title { margin: 28px 0 14px; font: 600 23px Georgia, serif; }
.zero-group { margin-bottom: 15px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fbfcf9; }
.zero-group > header { display: flex; justify-content: space-between; gap: 15px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #eef4f0; font-size: 12px; font-weight: 800; }
.zero-group > header span { color: var(--muted); font-size: 10px; }
.zero-step-list { display: grid; }
.zero-step { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 15px; border: 0; border-bottom: 1px solid #e2e5df; background: transparent; color: var(--ink); text-align: left; }
.zero-step:last-child { border-bottom: 0; }
.zero-step:hover { background: white; }
.zero-step.completed { background: #f2f8f5; }
.zero-step.optional { border-left: 3px solid #dcaa42; }
.zero-step-order { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e6ece8; color: var(--green-dark); font-size: 10px; font-weight: 850; }
.zero-step.completed .zero-step-order { background: var(--green); color: white; }
.zero-step strong { font-size: 12px; }
.zero-step small { color: var(--muted); font-size: 9px; }
.zero-resource-view { display: grid; gap: 18px; }
.zero-resource-view > .secondary-button { justify-self: start; }
.zero-resource-view > .primary-button { justify-self: end; min-width: 210px; }
.zero-resource-card { margin-top: 2px; }
.zero-resource-card > h2, .zero-unit-card h2 { margin: 8px 0 18px; font: 500 clamp(25px, 4vw, 36px) Georgia, serif; }
.zero-unit-card { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: 11px; background: #fbfcf9; }
.zero-unit-card > p { color: var(--muted); line-height: 1.65; }
.zero-unit-sequence { display: grid; gap: 8px; margin-top: 20px; padding-left: 25px; }
.zero-unit-sequence li { padding: 9px 11px; background: white; line-height: 1.5; }
.zero-attempt-history { display: grid; gap: 6px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.zero-attempt-history strong { font-size: 11px; }
.zero-attempt-history span { padding: 7px 9px; border-radius: 7px; background: #f0f2ef; color: var(--muted); font-size: 10px; }
.zero-attempt-history span.correct { background: var(--success); color: var(--green-dark); }
.zero-attempt-history span.wrong { background: var(--error); color: #8d4033; }
.correlation-categories { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.correlation-categories li { display: grid; grid-template-columns: 31px 1fr; gap: 10px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.correlation-categories b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 6px; background: var(--green); color: white; }
.correlation-items { display: grid; gap: 10px; }
.correlation-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.correlation-row.correct { background: var(--success); }
.correlation-row.wrong { background: var(--error); }
.correlation-row small { display: block; margin-top: 4px; color: var(--muted); }
.assertions { display: grid; gap: 13px; margin: 0 0 20px; padding: 20px; border-left: 3px solid var(--green); background: #f6f7f3; list-style: none; }
.assertions li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font: 16px/1.5 Georgia, serif; }

footer { padding: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }
@media (max-width: 620px) {
  .site-header { align-items: flex-start; }
  .environment-badge { font-size: 9px; }
  .unit-header { flex-direction: column; gap: 8px; }
  .exam-header { flex-direction: column; gap: 12px; }
  .exam-session-tools { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .study-content { padding: 20px 15px; }
  .exam-content { padding: 22px 15px; }
  .exam-question-actions { grid-template-columns: 1fr 1fr; }
  .exam-question-actions .review-button { grid-column: 1 / -1; grid-row: 1; }
  .exam-question-actions button:last-child { justify-self: stretch; }
  .exam-question-actions button:first-child { justify-self: stretch; }
  .exam-review-summary { grid-template-columns: 1fr; }
  .zero-target-grid { grid-template-columns: 1fr; }
  .zero-group > header { flex-direction: column; gap: 4px; }
  .zero-step { grid-template-columns: 31px 1fr; }
  .zero-step small { grid-column: 2; }
  .exam-delivery-actions { align-items: stretch; flex-direction: column; }
  .question-footer { align-items: stretch; flex-direction: column; }
  .correlation-row { grid-template-columns: 58px 1fr; }
  .catalog-header { flex-direction: column; gap: 8px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-tree { padding: 13px; }
  .catalog-node { grid-template-columns: 1fr; margin-left: min(calc(var(--catalog-depth) * 7px), 28px); }
  .catalog-counts { justify-content: flex-start; }
  .catalog-results { position: static; }
}

/* Study navigation is primary; reporting remains a separate supporting action. */
.study-step-navigation button { min-height: 44px; padding: 12px 20px; font-size: 14px; border-color: var(--green-dark); }
.study-step-navigation button:last-child { background: var(--green-dark); color: white; }
.study-step-navigation button:disabled { opacity: .45; }
.question-report-section { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.question-report-section > p { margin: 0 0 12px; font-size: 13px; color: #526d72; }
.question-report-section > .question-footer { justify-content: flex-start; flex-wrap: wrap; margin-top: 0; padding-top: 0; border-top: 0; }
.question-report-section > .question-footer button { font-weight: 600; background: transparent; }

.destination-question-marker { margin-bottom: 20px; padding: 14px 16px; border-left: 4px solid var(--green-dark); border-radius: 8px; background: #edf5f2; }
.destination-question-marker strong { color: var(--green-dark); font-size: 12px; letter-spacing: .6px; }
.destination-question-marker p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }

.student-library { margin: 28px 0; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; margin: 20px 0; }
.library-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: white; overflow-wrap: anywhere; }
.library-card h3 { margin-top: 0; }
.library-card p { font-size: 14px; line-height: 1.5; }
.library-filters { display: flex; flex-wrap: wrap; gap: 16px; }
.library-filters label { flex: 1 1 220px; display: grid; gap: 6px; }
.library-filters input, .library-filters select { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.library-legacy { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }

.public-header-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-left:auto; }
.public-header-actions button { min-height:42px; padding:10px 14px; font-size:13px; font-weight:700; border:1px solid var(--green-dark); border-radius:9px; color:var(--green-dark); background:white; cursor:pointer; }
.public-header-actions .primary-button { background:var(--green-dark); color:white; }
body:has(#public-screen:not(.hidden)) #public-home { display:none; }
.public-shell { width:min(1120px,calc(100% - 48px)); margin:48px auto 72px; }
.public-intro { max-width:820px; margin-bottom:32px; }
.public-intro h1 { margin:12px 0 18px; font:500 clamp(32px,4.5vw,54px)/1.16 Georgia,serif; overflow-wrap:anywhere; }
.public-intro p { font-size:17px; line-height:1.65; color:var(--muted); }
.public-intro > button { margin-bottom:24px; }
.public-course-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:22px; }
.public-course-card { display:flex; flex-direction:column; align-items:flex-start; padding:28px; background:white; border:1px solid var(--line); border-radius:18px; box-shadow:0 8px 24px rgba(23,53,51,.05); cursor:pointer; }
.public-free-badge { display:inline-block; font-size:12px; font-weight:700; color:var(--green-dark); background:#e7f1ed; padding:7px 10px; border-radius:20px; }
.public-course-card h2 { margin:22px 0 10px; }
.public-course-card h2 button { min-height:0; padding:0; border:0; background:none; text-align:left; color:var(--ink); font:500 28px/1.3 Georgia,serif; overflow-wrap:anywhere; }
.public-course-card p { color:var(--muted); font-size:15px; line-height:1.6; margin:0 0 24px; }
.public-course-card > button { margin-top:auto; }
.public-course-details { display:grid; gap:24px; }
.public-area { padding:26px; background:white; border:1px solid var(--line); border-radius:16px; }
.public-area h2 { margin:0 0 20px; font:500 27px Georgia,serif; overflow-wrap:anywhere; }
.public-unit { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:20px 0; border-top:1px solid var(--line); }
.public-unit h3 { margin:0; font-size:17px; line-height:1.5; overflow-wrap:anywhere; }
.public-unit p { color:var(--muted); font-size:14px; }
.public-unit button { flex-shrink:0; }
.account-selected-study { border-left:4px solid var(--green-dark); background:#edf5f2; padding:14px 18px; border-radius:8px; font-size:15px; overflow-wrap:anywhere; }
.public-empty { padding:30px; background:white; border:1px solid var(--line); border-radius:16px; line-height:1.6; }
@media(max-width:650px) {
  .site-header:has(.public-header-actions:not(.hidden)) { flex-wrap:wrap; }
  .public-header-actions { width:100%; justify-content:flex-start; margin-left:0; }
  .public-shell { width:calc(100% - 32px); margin-top:32px; }
  .public-course-card,.public-area { padding:22px; }
  .public-unit { align-items:stretch; flex-direction:column; gap:14px; }
  .public-unit button { align-self:flex-start; }
}
