:root {
  --navy: #1F1D40;
  --navy-2: #2c2a57;
  --orange: #EE9F20;
  --orange-ink: #8a5600;
  --blue: #4574A0;
  --blue-soft: #eef3f8;
  --ink: #1F1D40;
  --text: #2b2a3d;
  --muted: #5a5970;
  --line: #d9dce6;
  --paper: #ffffff;
  --cream: #fbf7ef;
  --err: #b42318;
  --err-bg: #fdf0ee;
  --ok: #1e7a5a;
  --r: 14px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans", Ubuntu, Cantarell, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-size: 1.125rem; line-height: 1.55; color: var(--text); background: var(--paper); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
code, .mono { font-family: var(--mono); font-size: .85em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }
.wrap--narrow { max-width: 640px; }
.wrap--wide { max-width: 1180px; }
.wrap--login { max-width: 440px; padding-top: 48px; padding-bottom: 64px; }
.muted { color: var(--muted); font-size: 1rem; }
.eyebrow { font-size: 0.875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin: 0 0 8px; }
.eyebrow--light { color: var(--orange); }

/* Header */
.site-top { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-top__in { max-width: 1080px; margin: 0 auto; padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand-logo { display: inline-block; line-height: 0; }
.logo-mark { height: 56px; width: auto; margin: 8px; display: block; }
@media (min-width: 768px) { .logo-mark { height: 72px; } }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 36px 0 64px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(238,159,32,.16); pointer-events: none; }
.hero__title { color: #fff; font-size: clamp(1.75rem, 1rem + 4vw, 2.75rem); font-weight: 800; letter-spacing: -.01em; max-width: 18ch; }
.hero__brand { color: var(--orange); display: block; }
.hero__lead { font-size: 1.1875rem; color: #e7e6f2; max-width: 58ch; margin: 0 0 24px; }
.demo-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 30rem; margin: 0 auto 24px; }
.demo-gallery__item { display: block; min-width: 0; color: #e7e6f2; text-decoration: none; border-radius: 12px; }
.demo-gallery__item:hover { color: #fff; }
.demo-gallery figure { margin: 0; }
.demo-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; border: 0; border-radius: 12px; }
.demo-gallery figcaption { padding-top: 8px; font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; text-align: center; }
.site-top__cta { flex-shrink: 0; }
@media (max-width: 639px) { .site-top__cta { order: 3; flex-basis: calc(100% - 16px); margin: 0 8px 8px; } }
.demo-gallery__enlarge { display: block; margin-top: 5px; color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 130px; }
.facts strong { color: #fff; font-size: 1.125rem; }
.facts span { color: #cfcde3; font-size: 0.9375rem; }

.about { position: relative; margin: -36px 0 22px; background: var(--paper); border-radius: var(--r); padding: 20px 22px 20px 26px; box-shadow: 0 12px 32px -12px rgba(31,29,64,.28); border-left: 6px solid var(--orange); }
.about__h { font-size: 0.9375rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 6px; }
.about p { margin: 0; font-size: 1.0625rem; }
.webinar-outline { margin: 0 0 28px; padding: 20px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r); }
.webinar-outline h2 { font-size: 1.5rem; }
.webinar-outline__list { margin: 0; padding: 0; list-style: none; }
.webinar-outline__list li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.webinar-outline__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.webinar-outline__duration { display: block; padding: 5px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--orange-ink); text-align: center; font-size: 1rem; font-weight: 700; }
.webinar-outline__list h3 { margin: 0 0 5px; color: var(--text); font-size: 1.0625rem; }
.webinar-outline__list p { margin: 0; font-size: 1rem; }
.faq { margin: 0 0 28px; }
.faq h2 { font-size: 1.5rem; margin-bottom: 14px; }
.faq details { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.faq summary { padding: 14px 16px; min-height: 48px; font-weight: 700; font-size: 1.0625rem; cursor: pointer; color: var(--text); overflow-wrap: anywhere; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0; padding: 14px 16px; font-size: 1rem; overflow-wrap: anywhere; }
.about--mobile { display: none; }
@media (max-width: 639px) {
  .about--desktop { display: none; }
  .about--mobile { display: block; margin: 20px 0 24px; color: var(--navy); z-index: 1; }
}
.req-note { color: var(--muted); font-size: 1rem; margin: 0 0 12px; }
.req { color: var(--err); font-weight: 700; }
.opt { color: var(--muted); font-weight: 400; font-size: 1rem; }

/* Stepper */
.stepper { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); margin: 0 -18px 8px; padding: 8px 18px; }
.stepper ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.stepper li { flex: 1; }
.stepper a { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 1rem; padding: 8px 6px; border-radius: 10px; transition: background .2s, color .2s; }
.stepper a span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-size: 0.875rem; }
.stepper a.is-on { color: var(--navy); background: var(--cream); }
.stepper a.is-on span { background: var(--orange); color: var(--navy); }

/* Form parts */
.part { padding: 28px 0 12px; border-bottom: 1px solid var(--line); }
.part:last-of-type { border-bottom: 0; }
.part__head { display: flex; flex-direction: column; margin-bottom: 18px; }
.part__no { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.part__head h2 { font-size: 1.625rem; margin: 2px 0 0; }
.part__head h2::after { content: ""; display: block; width: 48px; height: 4px; background: var(--orange); border-radius: 2px; margin-top: 10px; }

.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; color: var(--navy); margin-bottom: 6px; font-size: 1.125rem; padding: 0; }
.hint { color: var(--muted); font-size: 1rem; margin: 0 0 8px; }
.err { color: var(--err); font-weight: 600; font-size: 1rem; margin: 0 0 8px; display: flex; gap: 6px; }
.err::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--err); color: #fff; font-size: 0.8125rem; display: grid; place-items: center; margin-top: 2px; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], input[type=number], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; font-size: 1.125rem; color: var(--ink); background: #fff; border: 2px solid #b9bdcc; border-radius: 10px; padding: 12px 14px; min-height: 52px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 42px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(69,116,160,.22); }
.has-err input[type=text], .has-err input[type=email], .has-err input[type=tel], .has-err select, .has-err textarea, [aria-invalid=true] { border-color: var(--err); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; font-weight: 400; color: var(--text); }
.choice:hover { border-color: #aab4c8; }
.choice input { width: 24px; height: 24px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.choice:has(input:checked) { border-color: var(--navy); background: var(--blue-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.choice--consent { font-size: 1.0625rem; }
.has-err .choice { border-color: #e9b8b2; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: block; min-width: 76px; text-align: center; padding: 11px 14px; border: 2px solid var(--line); border-radius: 999px; font-weight: 600; transition: all .15s; }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

.terms { display: grid; gap: 10px; }
@media (min-width: 640px) { .terms { grid-template-columns: 1fr 1fr; } }
.term { position: relative; cursor: pointer; display: block; }
.term input { position: absolute; top: 18px; left: 16px; width: 22px; height: 22px; accent-color: var(--navy); }
.term__body { display: flex; flex-direction: column; padding: 14px 14px 14px 50px; border: 2px solid var(--line); border-radius: 12px; transition: all .15s; }
.term__day { font-weight: 700; color: var(--navy); }
.term__time { color: var(--muted); font-size: 1rem; }
.term input:checked + .term__body { border-color: var(--navy); background: var(--cream); box-shadow: inset 5px 0 0 var(--orange); }
.term input:focus-visible + .term__body { outline: 3px solid var(--orange); outline-offset: 2px; }
.empty { background: var(--cream); padding: 14px; border-radius: 12px; margin: 0; }

.js-cond { display: none; padding-left: 16px; border-left: 4px solid var(--orange); }
.js-cond.is-open { display: block; animation: rise .25s ease; }
.js-cond.has-err { display: block; }
.js-cond .hint { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.school-search { margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Quiz */
.quiz-intro { background: var(--cream); border-radius: var(--r); padding: 16px 18px; margin: 0 0 18px; font-size: 1.0625rem; }
.quiz-progress { position: sticky; top: 58px; z-index: 5; background: #fff; font-size: 0.9375rem; font-weight: 700; color: var(--navy); padding: 6px 0 10px; margin: 0 0 10px; }
.quiz-progress::after { content: ""; display: block; height: 6px; border-radius: 3px; margin-top: 6px; background: linear-gradient(90deg, var(--orange) var(--p, 0%), var(--blue-soft) var(--p, 0%)); }
.q-section { font-size: 1.0625rem; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 12px; }
.q > legend { display: flex !important; gap: 12px; align-items: flex-start; }
.q__no { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 1rem; transition: background .2s, color .2s; }
.q.is-done .q__no { background: var(--navy); color: var(--orange); }
.q__text { padding-top: 3px; }

.consents .field { margin-bottom: 10px; }
.note { font-size: 1rem; color: var(--muted); background: var(--blue-soft); padding: 14px 16px; border-radius: 12px; margin: 16px 0; }
.note strong { color: var(--navy); }
.privacy { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin: 0 0 22px; font-size: 1rem; }
.privacy h3 { font-size: 1.125rem; }
.privacy p { margin: 0 0 8px; }
details > summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 6px 0; }
.submit-row { padding: 6px 0 28px; }

/* Buttons */
.btn { font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-2); color: #fff; }
.btn--accent { background: var(--navy); color: #fff; box-shadow: 0 6px 0 var(--orange); }
.btn--accent:hover { color: #fff; box-shadow: 0 4px 0 var(--orange); transform: translateY(2px); }
.btn--xl { width: 100%; min-height: 60px; font-size: 1.25rem; }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn--sm { min-height: 40px; padding: 6px 14px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--danger { background: var(--err); color: #fff; }
.btn:disabled { opacity: .7; cursor: progress; }

/* Alerts */
.alert { border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; background: var(--blue-soft); border-left: 5px solid var(--blue); font-size: 1.0625rem; }
.alert--warn { background: var(--cream); border-color: var(--orange); }
.alert--err { background: var(--err-bg); border-color: var(--err); color: #5d1610; }
.err-summary ul { margin: 8px 0 0; padding-left: 20px; }
.err-summary a { color: var(--err); }

/* Message */
.msg { padding: 48px 0 56px; text-align: center; }
.msg__mark { width: 64px; height: 8px; margin: 0 auto 22px; background: linear-gradient(90deg, #EE9F20 25%, #3ABA99 25% 50%, #46A0D8 50% 75%, #824D9D 75%); border-radius: 4px; }
.msg h1 { font-size: clamp(1.625rem, 1rem + 3vw, 2.25rem); }
.lead { font-size: 1.1875rem; }
.msg .prose { text-align: left; font-size: 1rem; }
.term-card { margin: 24px auto; max-width: 460px; background: var(--navy); color: #fff; border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.term-card__k { color: var(--orange); font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.term-card__v { font-size: 1.375rem; }
.term-card__n { color: #d6d4ea; font-size: 1rem; }
.msg__back { margin-top: 28px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 0 10px 30px -18px rgba(31,29,64,.35); }

/* Footer */
.site-foot { margin-top: 40px; border-top: 1px solid var(--line); background: #fff; }
.site-foot__in { max-width: 736px; margin: 0 auto; padding: 24px 8px 20px; text-align: center; }
.logo-strip { display: block; width: 100%; max-width: 720px; height: auto; margin: 8px auto 16px; }
.funding { font-size: 0.875rem; color: #3d3c52; margin: 0 8px 10px; }
.foot-meta { font-size: 0.875rem; color: var(--muted); margin: 0 8px 10px; }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; font-size: 0.9375rem; }
.foot-links a { display: inline-block; padding: 6px 0; }
.id-strip { display: flex; height: 8px; }
.id-strip span { flex: 1; }
.id-strip span:nth-child(1) { background: #EE9F20; }
.id-strip span:nth-child(2) { background: #3ABA99; }
.id-strip span:nth-child(3) { background: #46A0D8; }
.id-strip span:nth-child(4) { background: #824D9D; }

/* Admin */
.is-admin { font-size: 1rem; background: #f7f8fb; }
.admin-top { background: #fff; border-bottom: 1px solid var(--line); }
.admin-top__in { max-width: 1180px; margin: 0 auto; padding: 8px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin-top__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.admin-top__brand span { display: flex; flex-direction: column; line-height: 1.2; }
.admin-top__brand small { color: var(--muted); }
.logo-admin { height: 48px; width: auto; margin: 8px; }
.admin { padding-top: 24px; padding-bottom: 40px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.admin-head h1 { font-size: 1.75rem; margin: 0; }
.mail-status { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.875rem; font-weight: 600; }
.mail-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.mail-status.bad .dot { background: var(--err); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat span { font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }
.stat strong { font-size: 1.75rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat--ok { border-top: 4px solid var(--ok); }
.stat--wait { border-top: 4px solid var(--orange); }
.term-load { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 20px; }
.tl { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.8125rem; }
.tl--off { opacity: .6; }
.tl__top { display: flex; justify-content: space-between; }
.tl__id { font-family: var(--mono); background: var(--blue-soft); color: var(--blue); border-radius: 6px; padding: 1px 6px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.tl__n { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.tl__label { color: var(--muted); margin: 6px 0; min-height: 2.6em; }
.tl__flag { color: var(--orange-ink); font-weight: 700; margin-top: 4px; }
.bar { height: 6px; background: var(--blue-soft); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--navy); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a[aria-current] { color: var(--navy); border-color: var(--orange); }
.filters { display: grid; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
@media (min-width: 900px) { .filters { grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto; align-items: end; } }
.filters .field { margin: 0; }
.filters label { font-size: 0.875rem; }
.filters input, .filters select { min-height: 44px; font-size: 1rem; padding: 8px 12px; }
.filters__act { display: flex; gap: 8px; }
.exports { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.exports__k { font-size: 0.875rem; color: var(--muted); }
.chip { display: inline-block; padding: 6px 12px; border: 1px solid var(--blue); border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-decoration: none; background: #fff; }
.chip:hover { background: var(--blue); color: #fff; }
.regs { display: grid; gap: 6px; }
.reg-row { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.reg-row > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; color: var(--text); font-weight: 400; align-items: center; }
.reg-row > summary::-webkit-details-marker { display: none; }
@media (min-width: 760px) { .reg-row > summary { grid-template-columns: 2fr 60px 140px 160px; } }
.reg-row__name { font-weight: 700; color: var(--navy); display: flex; flex-direction: column; min-width: 0; }
.reg-row__name small { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.reg-row__term { font-family: var(--mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.reg-row__date { font-size: 0.875rem; color: var(--muted); }
.reg-row[open] { box-shadow: 0 10px 30px -18px rgba(31,29,64,.35); }
.reg-row__body { padding: 0 14px 16px; border-top: 1px solid var(--line); }
.badge { display: inline-block; font-size: 0.8125rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; justify-self: start; }
.badge--potwierdzone { background: #e3f4ec; color: var(--ok); }
.badge--niepotwierdzone { background: #fdf1dc; color: var(--orange-ink); }
.badge--anonimizowane { background: #ececf1; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 0.9375rem; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.danger { border: 2px solid #f0c4be; background: var(--err-bg); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.danger h3 { color: var(--err); font-size: 1.0625rem; margin: 0; }
.danger p { margin: 0; font-size: 0.9375rem; }
.danger .field { margin: 0; }
.term-forms { display: grid; gap: 12px; }
@media (min-width: 900px) { .term-forms { grid-template-columns: 1fr 1fr; } }
.term-form { display: grid; gap: 12px; }
.term-form .field { margin: 0; }
.term-form__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.switch { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--navy); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: var(--blue-soft); color: var(--navy); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .04em; }
.empty-box { background: #fff; border: 2px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; }
.empty-box p { color: var(--muted); margin: 6px 0 0; }
.login h1 { font-size: 1.75rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Accessibility controls */
html { font-size: 100%; }
html.ts-1 { font-size: 112.5%; }
html.ts-2 { font-size: 125%; }
body { font-size: 1.125rem; }
.is-admin { font-size: 1rem; }
.skip { z-index: 100; }
.a11y { background: var(--cream); border-bottom: 1px solid var(--line); }
.a11y__in { max-width: 1080px; margin: 0 auto; padding: 6px 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.a11y__k { font-size: 1rem; font-weight: 600; color: var(--navy); }
.a11y__set { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.a11y__btn { font: inherit; font-size: 1rem; font-weight: 700; min-height: 44px; min-width: 44px; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; line-height: 1.1; }
.a11y__btn--1 { font-size: 1.125rem; }
.a11y__btn--2 { font-size: 1.25rem; }
.a11y__btn[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: inset 0 -4px 0 var(--orange); }
.a11y__btn:hover { border-color: var(--blue); }
.a11y__btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.site-top__in { flex-wrap: wrap; }
.admin-top__brand, .admin-top__brand span { min-width: 0; overflow-wrap: anywhere; }
h1, h2, h3, p, li, label, legend { overflow-wrap: break-word; }
@media (max-width: 480px) { .a11y__in { justify-content: flex-start; } .stepper a { font-size: .875rem; flex-wrap: wrap; } }

/* High contrast */
html.hc { --navy: #000; --navy-2: #000; --orange: #ffeb3b; --orange-ink: #ffeb3b; --blue: #ffeb3b; --blue-soft: #000; --ink: #fff; --text: #fff; --muted: #fff; --line: #fff; --paper: #000; --cream: #000; --err: #ff8a80; --err-bg: #000; --ok: #7CFC9A; }
html.hc body, html.hc .is-admin { background: #000; color: #fff; }
html.hc h1, html.hc h2, html.hc h3, html.hc h4, html.hc h5, html.hc h6, html.hc strong, html.hc legend, html.hc label { color: #fff; }
html.hc .term__day { color: #ffeb3b; }
html.hc .rep__box, html.hc .rep__scope { background: #000; color: #fff; border-color: #fff; }
html.hc .rep__scope dd, html.hc .rep__kv dd, html.hc .rep__tbl th[scope=row] { color: #fff; }
html.hc a, html.hc a:hover, html.hc details > summary { color: #ffeb3b; text-decoration: underline; }
html.hc :focus-visible, html.hc .choice:has(input:focus-visible), html.hc .pill input:focus-visible + span, html.hc .term input:focus-visible + .term__body { outline: 4px solid #ffeb3b !important; outline-offset: 3px; }
html.hc .hero, html.hc .about, html.hc .card, html.hc .stat, html.hc .tl, html.hc .filters, html.hc .reg-row, html.hc .table-wrap, html.hc .empty-box, html.hc .mail-status, html.hc .term-card, html.hc .note, html.hc .alert, html.hc .privacy, html.hc .quiz-intro, html.hc .danger, html.hc .facts li, html.hc .site-foot, html.hc .admin-top { background: #000 !important; color: #fff !important; border-color: #fff; box-shadow: none; }
html.hc .hero::after { display: none; }
html.hc .hero__lead, html.hc .facts span, html.hc .term-card__n, html.hc .funding, html.hc .hero__title { color: #fff; }
html.hc .demo-gallery__item, html.hc .demo-gallery__item:hover { color: #fff; text-decoration: none; }
html.hc .stepper { background: #000; backdrop-filter: none; }
html.hc .stepper a span, html.hc .q__no, html.hc .tl__id { background: #000; color: #ffeb3b; border: 2px solid #ffeb3b; }
html.hc .stepper a.is-on, html.hc .stepper a.is-on span, html.hc .q.is-done .q__no { background: #ffeb3b; color: #000; }
html.hc .quiz-progress { background: #000; color: #fff; }
html.hc .quiz-progress::after { background: linear-gradient(90deg, #ffeb3b var(--p, 0%), #444 var(--p, 0%)); }
html.hc input[type=text], html.hc input[type=email], html.hc input[type=tel], html.hc input[type=search], html.hc input[type=password], html.hc input[type=number], html.hc input[type=url], html.hc input[type=datetime-local], html.hc select, html.hc textarea { background-color: #000; color: #fff; border-color: #fff; }
html.hc select { background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); }
html.hc input:focus, html.hc select:focus, html.hc textarea:focus { border-color: #ffeb3b; box-shadow: 0 0 0 3px #ffeb3b; }
html.hc ::placeholder { color: #ccc; opacity: 1; }
html.hc .choice, html.hc .term__body, html.hc .pill span { background: #000; color: #fff; border-color: #fff; }
html.hc .choice input, html.hc .term input, html.hc .switch input { accent-color: #ffeb3b; }
html.hc .choice:has(input:checked), html.hc .term input:checked + .term__body { border-color: #ffeb3b; border-width: 4px; background: #000; box-shadow: inset 6px 0 0 #ffeb3b; }
html.hc .pill input:checked + span { background: #ffeb3b; color: #000; border-color: #ffeb3b; }
html.hc .err, html.hc .req, html.hc .alert--err, html.hc .err-summary a, html.hc .danger h3 { color: #ff8a80 !important; }
html.hc .err::before { background: #ff8a80; color: #000; }
html.hc .has-err input, html.hc .has-err select, html.hc .has-err textarea, html.hc [aria-invalid=true], html.hc .has-err .choice { border-color: #ff8a80; }
html.hc .btn--primary, html.hc .btn--accent, html.hc .btn--danger { background: #ffeb3b; color: #000; border-color: #ffeb3b; box-shadow: none; }
html.hc .btn--primary:hover, html.hc .btn--accent:hover { background: #fff; color: #000; }
html.hc .btn--ghost, html.hc .chip { background: #000; color: #ffeb3b; border-color: #ffeb3b; }
html.hc .badge { background: #000 !important; color: #fff !important; border: 1px solid #fff; }
html.hc .tbl th { background: #000; color: #ffeb3b; }
html.hc .a11y { background: #000; border-color: #fff; }
html.hc .a11y__k { color: #fff; }
html.hc .a11y__btn { background: #000; color: #ffeb3b; border-color: #ffeb3b; }
html.hc .a11y__btn[aria-pressed="true"] { background: #ffeb3b; color: #000; box-shadow: none; }
html.hc .skip { background: #ffeb3b; color: #000; }
/* Logos keep a white backing so their pixels stay legible */
html.hc .site-top { background: #000; }
html.hc .logo-mark, html.hc .logo-admin, html.hc .logo-strip { background: #fff; padding: 6px; border-radius: 8px; }
html.hc .bar span { background: #ffeb3b; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* v10: next term, resend, reminders */
.next-cta { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; max-width: 22rem; }
.next-cta .btn { width: 100%; }
.next-cta__date { margin: 0; font-size: .9375rem; line-height: 1.35; text-align: center; color: var(--text); overflow-wrap: anywhere; }
.next-cta__date span { color: var(--muted); }
.next-cta__line { margin: 10px 0 0; font-size: 1rem; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 639px) { .next-cta { max-width: none; } }
.msg__help { margin: 20px 0 0; font-size: 1rem; }
.resend__form { text-align: left; margin: 20px 0; }
.resend__rules { margin-top: 8px; }
.resend__rules h2 { font-size: 1.25rem; }
.resend__rules ul { padding-left: 1.25rem; margin: 0; }
.resend__rules li { margin-bottom: 8px; }
.resend .alert { text-align: left; }
.tl__rem { margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.rem-admin { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.rem-admin h2 { font-size: 1.25rem; }
.rem-admin p { margin: 0 0 10px; }
.rem-admin__n { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: 8px; margin: 0 0 10px; }
.rem-admin__n div { background: var(--blue-soft); border-radius: 10px; padding: 8px 10px; }
.rem-admin__n dt { font-size: .8125rem; color: var(--muted); }
.rem-admin__n dd { margin: 0; font-size: 1.375rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.rem-admin__meta { overflow-wrap: anywhere; }
.rem-admin__act { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
html.hc .rem-admin, html.hc .rem-admin__n div { background: #000; color: #fff; border-color: #fff; }
html.hc .rem-admin__n dd, html.hc .next-cta__date, html.hc .next-cta__date span { color: #fff; }
