@font-face {
  font-family: "Cairo";
  src: url("/fonts/Cairo.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --navy: #17365d;
  --blue: #245b8f;
  --blue-light: #eaf2f8;
  --ink: #172635;
  --muted: #526477;
  --line: #cad5df;
  --paper: #fff;
  --canvas: #f2f5f8;
  --focus: #a54f00;
  --success: #23613d;
  font-family: "Cairo", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: "Cairo", Arial, sans-serif; font-size: 1rem; line-height: 1.8; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: absolute; top: -5rem; right: 1rem; z-index: 100; padding: .6rem 1rem; background: #fff; color: #111; border-radius: .4rem; }
.skip-link:focus { top: 1rem; }
.site-header { background: var(--navy); color: #fff; padding: 1rem clamp(1rem,4vw,3.5rem); }
.header-inner { width: min(100%, 1120px); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-mark { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid #ffffff80; border-radius: .8rem; font-weight: 800; font-size: 1.1rem; }
.brand-title { margin: 0; font-size: 1rem; line-height: 1.4; font-weight: 800; }
.brand-subtitle { margin: .15rem 0 0; color: #dbe8f4; font-size: .83rem; }
.header-chip { padding: .35rem .7rem; border: 1px solid #ffffff70; border-radius: 99px; white-space: nowrap; font-size: .85rem; }
main { width: min(100% - 1.2rem, 1040px); margin: 1.5rem auto 4rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 10px 28px #183b5c0a; }
.welcome { padding: clamp(1.1rem,4vw,2.5rem); border-top: 5px solid var(--blue); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { color: var(--navy); font-size: clamp(1.35rem,3vw,2rem); line-height: 1.5; margin: 0 0 .35rem; font-weight: 800; }
.lead { margin: 0; color: var(--muted); max-width: 70ch; }
.notice { margin: 1.2rem 0; padding: .85rem 1rem; border-right: 4px solid #ad7a21; background: #fff8e9; border-radius: .45rem; color: #4d3a18; }
.model-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.4rem; }
.model-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: .85rem; background: #fff; display: flex; flex-direction: column; gap: .55rem; }
.model-card h2 { margin: 0; color: var(--navy); font-size: 1.35rem; }
.model-card p { margin: 0; color: var(--muted); }
.button { min-height: 48px; border: 0; border-radius: .65rem; padding: .65rem 1rem; font-weight: 800; line-height: 1.5; transition: background-color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover { background: #244d79; }
.button-secondary { background: var(--blue-light); color: var(--navy); border: 1px solid #aabfd2; }
.button-quiet { color: var(--navy); background: #fff; border: 1px solid var(--line); }
.button-danger { background: #fff2f0; color: #8a261c; border: 1px solid #d9aaa5; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.storage-note { margin: 1rem 0 0; color: var(--success); font-weight: 700; }
.exam-top { position: sticky; top: 0; z-index: 20; margin: 0 calc((100vw - min(100vw - 1.2rem, 1040px))/ -2); padding: .7rem max(.7rem, calc((100vw - min(100vw - 1.2rem, 1040px))/2)); background: #f2f5f8f2; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.exam-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.exam-name { margin: 0; color: var(--navy); font-size: 1.05rem; font-weight: 800; }
.toolbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.timer { min-width: 8.8rem; padding: .35rem .7rem; border-radius: .6rem; background: var(--navy); color: #fff; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer.warning { background: #93451f; }
.timer.expired { background: #7d2525; }
.progress-wrap { display: flex; align-items: center; gap: .75rem; margin-top: .65rem; color: var(--muted); font-size: .86rem; }
progress { width: 100%; height: .7rem; accent-color: var(--blue); }
.exam-intro { padding: 1rem 1.2rem; margin: 1rem 0; }
.exam-intro p { margin: .2rem 0; }
.section-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.section-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .8rem; background: #fff; border: 1px solid var(--line); color: var(--navy); border-radius: 99px; text-decoration: none; font-weight: 700; }
.exam-section { margin: 1rem 0; padding: clamp(1rem,3vw,1.5rem); scroll-margin-top: 9rem; }
.exam-section h2 { color: var(--navy); font-size: clamp(1.1rem,2.6vw,1.35rem); line-height: 1.5; margin: 0 0 .25rem; font-weight: 800; }
.instruction { color: var(--muted); margin: 0 0 1rem; }
.question { padding: 1rem 0; border-top: 1px solid #e0e6ec; }
.question:first-of-type { border-top: 0; }
.question-title { margin: 0 0 .7rem; font-weight: 700; color: #172d44; }
.choice-set { margin: .5rem 0 0; padding: 0; border: 0; min-width: 0; }
.choice-set legend { margin: 0 0 .4rem; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.choice-option { min-height: 50px; padding: .55rem .75rem; display: flex; align-items: center; gap: .7rem; border: 1px solid #b8c6d4; border-radius: .65rem; background: #fff; cursor: pointer; }
.choice-option:has(input:checked) { border-color: var(--blue); background: #eef5fb; box-shadow: inset 0 0 0 1px var(--blue); }
.choice-option input { width: 1.2rem; height: 1.2rem; accent-color: var(--navy); flex: 0 0 auto; }
.field-label { display: block; font-weight: 700; margin: .6rem 0 .3rem; }
textarea, input[type="text"] { width: 100%; border: 1px solid #9eafbf; border-radius: .55rem; background: #fff; color: var(--ink); padding: .7rem .8rem; line-height: 1.7; }
textarea { min-height: 7rem; resize: vertical; }
textarea:focus, input[type="text"]:focus { border-color: var(--blue); }
.answer-table { display: grid; grid-template-columns: minmax(9rem,.8fr) minmax(0,1.2fr) minmax(0,1.2fr); border: 1px solid var(--line); border-radius: .7rem; overflow: hidden; }
.answer-table.glossary { grid-template-columns: minmax(10rem,1fr) minmax(0,2fr); }
.answer-row { display: contents; }
.table-head, .table-label, .table-input { min-width: 0; padding: .65rem; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.table-head { color: var(--navy); background: #edf2f7; font-weight: 800; }
.table-label { display: flex; align-items: center; font-weight: 700; background: #fafbfd; }
.table-input { background: #fff; }
.table-input input { min-height: 48px; }
.table-input textarea { min-height: 4.5rem; }
.exam-footer { margin: 1.2rem 0 0; padding: 1.2rem; }
.save-status { margin-inline-start: auto; color: var(--success); font-size: .86rem; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; background: #11223599; }
.dialog-box { width: min(100%, 34rem); padding: 1.4rem; background: #fff; border-radius: 1rem; border: 1px solid var(--line); box-shadow: 0 18px 60px #0003; }
.dialog-box h2 { margin: 0 0 .5rem; color: var(--navy); }
.dialog-box p { margin: .35rem 0; }
.no-script { margin: 2rem; padding: 1rem; background: #fff3f0; border: 1px solid #a44; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }
@media (max-width: 620px) {
  main { width: min(100% - .8rem, 1040px); margin-top: .8rem; }
  .header-inner { align-items: flex-start; }
  .header-chip { font-size: .75rem; }
  .model-grid { grid-template-columns: 1fr; }
  .exam-toolbar { align-items: stretch; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .button { flex: 1 1 auto; }
  .timer { flex: 1 0 8rem; }
  .choice-grid { grid-template-columns: 1fr; }
  .answer-table, .answer-table.glossary { display: block; border: 0; overflow: visible; }
  .answer-table .table-head { display: none; }
  .answer-row { display: block; margin: .7rem 0; padding: .65rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; }
  .answer-row .table-label { border: 0; background: transparent; padding: .1rem .1rem .35rem; }
  .answer-row .table-input { border: 0; padding: .2rem .1rem; }
  .answer-row .table-input::before { display: block; content: attr(data-column-label); color: var(--muted); font-size: .85rem; font-weight: 700; margin-bottom: .15rem; }
  .answer-row .table-input input, .answer-row .table-input textarea { min-height: 48px; }
  .exam-section { scroll-margin-top: 11rem; }
}
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .exam-top, .section-nav, .button-row, .button, .skip-link, .storage-note { display: none !important; }
  main { width: 100%; margin: 0; }
  .card { box-shadow: none; border-color: #aaa; break-inside: avoid; }
  .exam-section { border: 0; padding: .3rem 0; margin: .2rem 0; break-inside: auto; }
  .question { break-inside: avoid; }
  textarea { min-height: 2.8rem; border: 1px solid #888; }
  input[type="text"] { border: 0; border-bottom: 1px solid #777; border-radius: 0; }
  .answer-table { break-inside: avoid; }
  .answer-table .table-head { display: block !important; }
}
