/* AptitudeTester.com. Colours come from the logo: dark slate and gold. */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(/fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(/fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(/fonts/barlow-700.woff2) format("woff2"); }

:root {
  --slate: #2d343d;
  --slate-700: #3a434e;
  --slate-600: #4b5562;
  --gold: #eab441;
  --gold-600: #c9951f;
  --gold-700: #8a6100;
  --gold-50: #fdf6e3;
  --bg: #f4f5f7;
  --card: #fff;
  --line: #e1e5ea;
  --text: #2d343d;
  --muted: #606b79;
  --ok: #178a50;
  --ok-50: #e7f6ee;
  --bad: #c93a3a;
  --bad-50: #fcecec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(45, 52, 61, 0.06), 0 8px 24px rgba(45, 52, 61, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 Barlow, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { flex: 1; width: 100%; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--gold-700); text-underline-offset: 3px; }
a:hover { color: var(--slate); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.ic { flex: none; vertical-align: -0.18em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 8px 14px; background: var(--gold); color: var(--slate); font-weight: 600; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 10px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.section-title { margin: 36px 0 16px; font-size: 1.45rem; }
main > section:first-child > .section-title, .with-aside .section-title:first-child { margin-top: 0; }

/* Header */
.site-header { background: var(--slate); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: inline-flex; flex: none; }
.logo img { display: block; }
.search { display: flex; flex: 0 1 340px; background: var(--slate-700); border: 1px solid var(--slate-600); border-radius: 999px; overflow: hidden; }
.search input { flex: 1; min-width: 0; padding: 9px 4px 9px 18px; border: 0; background: none; color: #fff; font: inherit; font-size: 0.95rem; }
.search input::placeholder { color: #a9b2be; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--gold); }
.search button { display: grid; place-items: center; width: 44px; border: 0; background: none; color: var(--gold); cursor: pointer; }
.site-nav { background: var(--slate-700); border-top: 1px solid var(--slate-600); }
.site-nav ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a { display: block; padding: 11px 10px; color: #d6dbe2; font-size: 0.95rem; font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; border-bottom-color: var(--gold); }

/* Dark band under the header */
.band { position: relative; overflow: hidden; background: var(--slate); color: #fff; padding: 30px 0 38px; }
.band::after { content: ""; position: absolute; right: -70px; top: -50px; width: 380px; height: 380px; background: url(/images/logo-mark.svg) center / contain no-repeat; opacity: 0.07; pointer-events: none; }
.band .wrap { position: relative; z-index: 1; }
.band h1 { max-width: 20ch; margin-bottom: 12px; }
.band-lead { max-width: 60ch; margin: 0; color: #cfd5dd; font-size: 1.1rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.crumbs a { color: inherit; }
.band .crumbs ol { color: #a9b2be; }
.band .crumbs a:hover { color: #fff; }

.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 18px 0 14px; }
.hero h1 { max-width: 17ch; font-size: clamp(2rem, 5vw, 3.1rem); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.stats li { padding: 16px 18px; background: var(--slate-700); border: 1px solid var(--slate-600); border-radius: var(--radius); color: #cfd5dd; font-size: 0.95rem; }
.stats b { display: block; color: var(--gold); font-size: 1.9rem; line-height: 1.1; }

/* Buttons and small parts */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 2px solid var(--gold); border-radius: 10px; background: var(--gold); color: var(--slate); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: var(--gold-600); border-color: var(--gold-600); color: var(--slate); }
.btn-lg { padding: 12px 24px; font-size: 1.05rem; }
.btn-dark { background: var(--slate); border-color: var(--slate); color: #fff; }
.btn-dark:hover { background: var(--slate-600); border-color: var(--slate-600); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card); border-color: var(--slate); }
.band .btn-ghost { border-color: var(--slate-600); color: #fff; }
.band .btn-ghost:hover { background: var(--slate-700); border-color: #fff; color: #fff; }
.btn:disabled, .link:disabled { opacity: 0.45; cursor: not-allowed; }
.link { padding: 0; border: 0; background: none; color: var(--gold-700); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link.danger { color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold-50); color: var(--gold-700); font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a { display: block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 0.92rem; text-decoration: none; }
.chips a:hover { border-color: var(--gold); background: var(--gold-50); }
.notice { padding: 12px 16px; border: 1px solid #a9dcc0; border-radius: 10px; background: var(--ok-50); }
.notice.error { border-color: #efb4b4; background: var(--bad-50); }
.ad-slot { min-height: 110px; margin: 1.5rem 0; padding: .5rem 0; text-align: center; }
.ad-label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.loading { padding: 40px 0; color: var(--muted); text-align: center; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.card.empty h1 { color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.subject { display: flex; flex-direction: column; gap: 16px; }
.subject-head { display: flex; align-items: center; gap: 14px; }
.subject-head h3 { margin: 0; font-size: 1.25rem; }
.subject-head h3 a { color: inherit; text-decoration: none; }
.subject-head h3 a:hover { text-decoration: underline; }
.subject-head small { color: var(--muted); }
.subject-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--slate); color: var(--gold); }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.features li { display: flex; gap: 14px; }
.features .ic { margin-top: 3px; color: var(--gold-600); }
.features h3 { margin-bottom: 4px; }
.features p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 36px; }
.promo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.promo h2 { margin: 8px 0 0; }
.promo p { color: var(--muted); }
.promo .btn { margin-top: auto; }
.about { margin-top: 36px; }
.recent { margin-bottom: 36px; }
.recent-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.recent-item { display: grid; gap: 2px; padding: 16px 18px; color: var(--text); text-decoration: none; border-left: 4px solid var(--gold); }
.recent-item small { color: var(--muted); }
.recent-item .again { margin-top: 6px; color: var(--gold-700); font-weight: 600; font-size: 0.92rem; }
.recent-item:hover .again { text-decoration: underline; }

/* Category and topic pages */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.with-aside aside { display: grid; gap: 18px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.topic-grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.topic { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.topic:hover { border-color: var(--gold); transform: translateY(-1px); color: var(--text); }
.topic h2, .topic h3 { margin: 0 0 2px; font-size: 1.08rem; }
.topic p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.topic .ic { color: var(--gold-600); }
.quick p { color: var(--muted); }
.notes .prose { font-size: 0.97rem; }
.notes .prose ul { padding-left: 20px; }
.test-list { display: grid; gap: 14px; }
.test { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.test h2, .test h3 { margin: 0 0 2px; font-size: 1.2rem; }
.test p { margin: 0; color: var(--muted); }
.test .actions { margin: 0; }
.test .best { margin-top: 6px; color: var(--ok); font-weight: 600; font-size: 0.95rem; }
.sections { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.88rem; }
.sections li { padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.sections b { color: var(--text); }
.links { margin: 0; padding-left: 20px; }
.links li { margin-bottom: 6px; }

.instructions { max-width: 780px; }
.ticks { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: 12px; }
.ticks .ic { margin-top: 4px; color: var(--gold-600); }

/* Long text */
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose li { margin-bottom: 0.4em; }
.prose table, .data { border-collapse: collapse; margin: 0.8em 0; }
.prose th, .prose td, .data th, .data td { padding: 6px 12px; border: 1px solid var(--line); text-align: center; }
.prose thead th, .data thead th { background: var(--bg); }
.lead { font-size: 1.15rem; color: var(--muted); }
.article { padding: 32px; }
.narrow { max-width: 780px; }

/* Forms */
.form label { display: block; margin-bottom: 16px; font-weight: 600; }
.form input:not([type="file"]), .form textarea, .form select { display: block; width: 100%; max-width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #c9d0d8; border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-weight: 400; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--gold-600); }
.form small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }
.form .hp { position: absolute; left: -9999px; }
.optional { color: var(--muted); font-weight: 400; }
.search-big { display: flex; gap: 10px; max-width: 640px; margin-top: 8px; }
.search-big input { flex: 1; min-width: 0; padding: 12px 16px; border: 2px solid var(--slate-600); border-radius: 10px; background: #fff; font: inherit; }
.results { display: grid; gap: 0; margin: 0; padding: 6px 22px; list-style: none; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.results a { display: block; color: var(--text); font-weight: 500; text-decoration: none; }
.results a:hover { text-decoration: underline; }
.results small { color: var(--muted); }

/* Question status symbols, shared by the instructions and the test screen.
   Shapes as well as colours differ, as on the consoles used in computer-based examinations. */
.st { position: relative; display: inline-grid; place-items: center; flex: none; width: 38px; height: 34px; color: #fff; font-weight: 600; font-size: 0.95rem; line-height: 1; }
.st.nv { border: 1px solid #b4bac2; border-radius: 4px; background: #f3f4f6; color: #333; }
.st.na { background: #e0452f; clip-path: polygon(0 0, 100% 0, 100% 66%, 78% 100%, 22% 100%, 0 66%); }
.st.an { background: #2e9d4d; clip-path: polygon(22% 0, 78% 0, 100% 34%, 100% 100%, 0 100%, 0 34%); }
.st.mr, .st.am { width: 36px; height: 36px; border-radius: 50%; background: #6c4bb0; }
.st.am::after { content: ""; position: absolute; right: -2px; bottom: -1px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #2e9d4d; }
.x-legend { display: grid; gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none; }
.x-legend li { display: flex; align-items: center; gap: 12px; }
.rules { display: grid; gap: 12px; margin: 14px 0; padding-left: 22px; }
.instructions summary { font-weight: 600; cursor: pointer; }

/* Test screen: fills the window, with its own header, like an examination console. */
body.focus { background: #fff; }
body.focus main { display: block; }
.xc { --x-blue: #1c6fb7; --x-blue-dark: #155a96; --x-line: #c5d2df; --x-tint: #e9f2fb; display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100vh; height: 100dvh; color: #222; font-size: 16px; }
.xc > .loading { grid-row: 1 / -1; }
.xc button { font: inherit; cursor: pointer; }
.xc-head { display: flex; align-items: center; gap: 18px; padding: 8px 16px; border-bottom: 1px solid var(--x-line); background: #fff; }
.xc-logo { display: inline-flex; flex: none; }
.xc-title { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 1.1rem; text-overflow: ellipsis; white-space: nowrap; }
.xc-mode { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: var(--gold-50); color: var(--gold-700); font-size: 0.78rem; font-weight: 600; vertical-align: middle; }
.xc-tools { display: flex; gap: 8px; }
.xc-tools button { padding: 5px 12px; border: 1px solid var(--x-line); border-radius: 4px; background: #fff; color: var(--x-blue-dark); font-size: 0.9rem; }
.xc-tools button:hover { background: var(--x-tint); }
.xc-bar { display: flex; align-items: stretch; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--x-line); background: var(--x-tint); }
.xc-tabs { display: flex; flex: 1; gap: 4px; min-width: 0; padding-top: 6px; overflow-x: auto; scrollbar-width: none; }
.xc-tabs::-webkit-scrollbar { display: none; }
.xc-tabs button { padding: 7px 14px; border: 1px solid var(--x-line); border-bottom: 0; border-radius: 4px 4px 0 0; background: #fff; color: #222; font-size: 0.92rem; white-space: nowrap; }
.xc-tabs button.on { border-color: var(--x-blue); background: var(--x-blue); color: #fff; font-weight: 600; }
.xc-time { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.xc-time b { min-width: 3.4em; padding: 3px 10px; border-radius: 4px; background: #fff; border: 1px solid var(--x-line); font-variant-numeric: tabular-nums; text-align: center; }
.xc-time b.low { border-color: #e0452f; background: var(--bad-50); color: #c0321f; }
.xc-toggle { display: none; align-self: center; padding: 6px 8px; border: 1px solid var(--x-line); border-radius: 4px; background: #fff; color: var(--x-blue-dark); }
.xc-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 0; }
.xc-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.xc-qhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 9px 18px; border-bottom: 1px solid var(--x-line); font-size: 0.92rem; }
.xc-qhead strong { font-size: 1.05rem; }
.xc-qhead .plus { color: #2e9d4d; }
.xc-qhead .minus { color: #c0321f; }
.xc-q { padding: 18px; overflow-y: auto; }
.xc-q:focus { outline: none; }
.xc-q .q-text { margin-bottom: 16px; font-size: 1.08rem; font-weight: 500; }
.xc-opts { display: grid; gap: 4px; }
.xc-opt { display: flex; align-items: flex-start; gap: 12px; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.xc-opt:hover { background: #f4f8fc; }
.xc-opt input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--x-blue); }
.xc-opt.correct { border-color: #2e9d4d; background: var(--ok-50); }
.xc-opt.wrong { border-color: #e0452f; background: var(--bad-50); }
.xc-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--x-line); background: #f7f9fb; }
.xc-actions div { display: flex; flex-wrap: wrap; gap: 8px; }
.xc-actions button, .xc-dialog-actions button { padding: 8px 16px; border: 1px solid #aab4bf; border-radius: 4px; background: #fff; color: #222; }
.xc-actions button:hover:not(:disabled), .xc-dialog-actions button:hover { background: var(--x-tint); }
.xc-actions button:disabled { opacity: 0.45; cursor: not-allowed; }
.xc-actions .primary, .xc-dialog-actions .primary { border-color: var(--x-blue); background: var(--x-blue); color: #fff; font-weight: 600; }
.xc-actions .primary:hover:not(:disabled), .xc-dialog-actions .primary:hover { background: var(--x-blue-dark); }
.xc-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--x-line); background: var(--x-tint); overflow-y: auto; }
.xc-user { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--x-line); background: #fff; }
.xc-avatar { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--x-line); border-radius: 4px; background: #eef1f4; color: #7a8591; }
.xc-avatar .ic { width: 26px; height: 26px; }
.xc-user small { display: block; color: var(--muted); }
.xc-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--x-line); background: #fff; list-style: none; font-size: 0.82rem; }
.xc-counts li { display: flex; align-items: center; gap: 8px; }
.xc-counts li:nth-child(5) { grid-column: 1 / -1; }
.xc-counts .st { width: 30px; height: 27px; font-size: 0.82rem; }
.xc-counts .st.mr, .xc-counts .st.am { width: 29px; height: 29px; }
.xc-section { margin: 0; padding: 8px 14px; background: var(--x-blue); color: #fff; font-size: 0.95rem; }
.xc-choose { margin: 0; padding: 10px 14px 4px; font-weight: 600; font-size: 0.9rem; }
.xc-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 10px 6px; margin: 0; padding: 8px 14px 16px; list-style: none; justify-items: center; }
.xc-palette button { border: 0; padding: 0; }
.xc-palette .st.nv { border: 1px solid #b4bac2; }
.xc-palette .current { outline: 3px solid #f0a500; outline-offset: 2px; }
.xc-submit { margin-top: auto; padding: 12px 14px; border-top: 1px solid var(--x-line); background: #fff; text-align: center; }
.xc-submit button { padding: 9px 34px; border: 1px solid #2090c5; border-radius: 4px; background: #2aa0d8; color: #fff; font-weight: 600; }
.xc-submit button:hover { background: #1f8cc0; }
.xc-backdrop { display: none; }
.xc-dialog { width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 22px; border: 0; border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); color: #222; }
.xc-dialog.wide { width: min(900px, calc(100vw - 24px)); }
.xc-dialog .grid { font-size: 0.88rem; }
.xc-dialog::backdrop { background: rgba(20, 30, 45, 0.55); }
.xc-dialog h2 { margin-bottom: 12px; }
.xc-dialog .grid th, .xc-dialog .grid td { text-align: center; }
.xc-dialog .grid tbody th { text-align: left; }
.xc-dialog-actions { display: flex; justify-content: center; gap: 10px; margin: 16px 0 0; }
.xc-info-body { max-height: 60vh; overflow-y: auto; }
.xc-paper-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.xc-paper-item p { display: inline; margin: 0; }
.q-common { margin-bottom: 18px; padding: 14px 16px; border-radius: 8px; background: var(--bg); font-size: 0.98rem; overflow-x: auto; }
.q-img { text-align: center; }
.q-text p:last-child { margin-bottom: 0; }
.feedback { margin-top: 18px; padding: 14px 16px; border-radius: 8px; background: var(--ok-50); }
.feedback.bad { background: var(--bad-50); }
.feedback strong { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.feedback.bad strong { color: var(--bad); }
.solution { margin-top: 8px; }
.opt-key { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.opt-body { flex: 1; }

/* Questions listed with their answers folded away */
.qa { display: grid; gap: 14px; margin: 16px 0; padding: 0; list-style: none; }
.qa .q-text { margin-bottom: 12px; font-size: 1.05rem; font-weight: 500; }
.qa-num { color: var(--gold-700); font-weight: 700; }
.qa-section { margin: 14px 0 0; font-size: 1.15rem; }
.qa-opts { display: grid; gap: 6px; margin: 0 0 14px; padding-left: 26px; list-style: upper-alpha; }
.qa-opts li::marker { color: var(--muted); font-weight: 600; }
.qa details summary { color: var(--gold-700); font-weight: 600; cursor: pointer; }
.qa-answer { margin: 12px 0 0; }
.qa .solution { padding: 12px 14px; border-radius: 8px; background: var(--gold-50); font-size: 0.98rem; }
.cta { margin-top: 22px; text-align: center; }
.cta h2 { justify-content: center; }
.cta .actions { justify-content: center; }
.cta .best { color: var(--ok); font-weight: 600; }
.faq details { margin-bottom: 10px; padding: 0; box-shadow: none; }
.faq summary { padding: 14px 18px; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }
.faq details[open] summary { color: var(--gold-700); }

/* Report */
.report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.report-head h1 { margin-bottom: 6px; }
.report-head .eyebrow { color: var(--gold-700); }
.report-head p { margin: 0; }
.report-head .actions { margin: 0; }
.report-app > section { margin-bottom: 22px; }
.score { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; }
.ring { position: relative; flex: none; width: 150px; height: 150px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--bg); }
.ring-value { stroke: var(--gold); stroke-linecap: round; }
.ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring b { font-size: 2.2rem; line-height: 1; }
.ring small { color: var(--muted); }
.score-detail { flex: 1; min-width: 260px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.tiles li, .tile { padding: 12px 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 0.9rem; }
.tiles b, .tile b { display: block; color: var(--text); font-size: 1.5rem; line-height: 1.2; }
.tiles .correct b { color: var(--ok); }
.tiles .wrong b { color: var(--bad); }
.score-detail p { margin: 0; font-size: 0.95rem; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.review-head .section-title { margin: 0; }
.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter button { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: 0.92rem; cursor: pointer; }
.filter button.on { border-color: var(--slate); background: var(--slate); color: #fff; }
.filter button:disabled { opacity: 0.45; cursor: default; }
.review { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.r-item { border-left: 5px solid var(--line); }
.r-item.correct { border-left-color: var(--ok); }
.r-item.wrong { border-left-color: var(--bad); }
.r-item header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.r-num { font-weight: 700; }
.r-time { margin-left: auto; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.badge { padding: 2px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.badge.correct { background: var(--ok-50); color: var(--ok); }
.badge.wrong { background: var(--bad-50); color: var(--bad); }
.r-common { margin-bottom: 12px; }
.r-common summary { color: var(--gold-700); cursor: pointer; }
.r-common .prose { margin-top: 10px; padding: 14px 16px; border-radius: 10px; background: var(--bg); overflow-x: auto; }
.r-item .q-text { font-size: 1.05rem; margin-bottom: 14px; }
.r-opts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.r-opts li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.r-opts .opt-body { padding: 0; }
.r-opts .correct { border-color: var(--ok); background: var(--ok-50); }
.r-opts .correct .opt-key { background: var(--ok); color: #fff; }
.r-opts .wrong { border-color: var(--bad); background: var(--bad-50); }
.r-opts .wrong .opt-key { background: var(--bad); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 600; }
.tag.ok { color: var(--ok); }
.tag.bad { color: var(--bad); }
.tag .ic { width: 14px; height: 14px; }
.r-item .solution { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--gold-50); font-size: 0.98rem; }
.r-item .solution strong { display: block; margin-bottom: 4px; color: var(--gold-700); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Tables */
.table-scroll { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.95rem; }
.grid th, .grid td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { background: var(--bg); font-weight: 600; white-space: nowrap; }

/* Footer */
.site-footer { background: var(--slate); color: #b9c1cc; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.footer-about p { margin: 14px 0 0; max-width: 34ch; }
.site-footer h2 { margin-bottom: 12px; color: #fff; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #d6dbe2; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-base { padding-top: 18px; padding-bottom: 22px; border-top: 1px solid var(--slate-600); font-size: 0.88rem; }
.site-footer.focus .footer-base { border-top: 0; text-align: center; }

/* Admin */
.admin { background: var(--bg); }
.admin-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 20px; background: var(--slate); color: #fff; }
.admin-tag { padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--slate); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-links { display: flex; gap: 18px; margin-left: auto; }
.admin-links a { color: #d6dbe2; }
.admin-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); flex: 1; }
.admin-nav { padding: 20px 14px; background: #fff; border-right: 1px solid var(--line); }
.admin-nav h2 { margin: 18px 10px 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-nav ul { margin: 0; padding: 0; list-style: none; }
.admin-nav a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 0.97rem; text-decoration: none; }
.admin-nav a:hover { background: var(--bg); }
.admin-nav a.active { background: var(--gold-50); color: var(--gold-700); font-weight: 600; }
.admin-main { padding: 26px 28px 60px; min-width: 0; }
.admin-main.solo { grid-column: 1 / -1; max-width: 460px; margin: 40px auto; }
.admin-main h1 { font-size: 1.7rem; }
.admin-main .form { max-width: 820px; }
.tiles.admin-tiles, .admin .tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 22px; }
.tile { display: block; background: #fff; text-decoration: none; }
.tile:hover { border-color: var(--gold); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.filters select, .filters input { padding: 8px 10px; border: 1px solid #c9d0d8; border-radius: 10px; background: #fff; font: inherit; font-size: 0.95rem; max-width: 280px; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin-left: 10px; }
.pager { margin-top: 16px; text-align: center; }
.import { margin: 14px 0; padding: 14px 18px; box-shadow: none; }
.import summary { font-weight: 600; cursor: pointer; }
.upload { margin-bottom: 8px; }
pre { overflow-x: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 0.85rem; }
code { padding: 1px 5px; border-radius: 5px; background: var(--bg); font-size: 0.9em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.toolbar button { min-width: 34px; padding: 4px 8px; border: 1px solid #c9d0d8; border-radius: 8px; background: #fff; font: inherit; font-size: 0.92rem; cursor: pointer; }
.toolbar button:hover { border-color: var(--slate); }
.toolbar + textarea { margin-top: 4px !important; font-family: Consolas, "Courier New", monospace; font-size: 0.92rem; }
.preview { margin-top: 6px; padding: 12px 14px; border: 1px dashed #c9d0d8; border-radius: 10px; background: #fff; font-weight: 400; }
.preview::before { content: "Preview"; display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.file-row { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; font-size: 0.92rem; }
.thumb { display: block; max-height: 120px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 900px) {
  .hero, .with-aside { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .xc-body { grid-template-columns: minmax(0, 1fr); }
  .xc-toggle { display: inline-grid; }
  .xc-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: min(310px, 88vw); transform: translateX(100%); transition: transform 0.2s; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18); }
  .palette-open .xc-side { transform: none; }
  .palette-open .xc-backdrop { display: block; position: absolute; inset: 0; z-index: 2; background: rgba(20, 30, 45, 0.45); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-body { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav h2 { display: none; }
  .admin-nav ul { display: contents; }
  .admin-main { padding: 20px 16px 48px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .logo img { width: 178px; height: 34px; }
  .search { flex: none; border: 0; background: none; }
  .search input { display: none; }
  .search button { width: 40px; height: 40px; border-radius: 50%; background: var(--slate-700); }
  .band { padding: 22px 0 28px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .article { padding: 22px 18px; }
  .test .actions, .test .actions .btn { width: 100%; }
  .xc-logo img { width: 126px; height: 24px; }
  .xc-head { gap: 10px; padding: 6px 10px; }
  .xc-title { font-size: 0.95rem; }
  .xc-tools button { padding: 4px 8px; font-size: 0.8rem; }
  .xc-bar { padding: 0 10px; }
  .xc-q { padding: 14px 12px; }
  .xc-actions { padding: 8px 10px; }
  .xc-actions button { padding: 8px 10px; font-size: 0.92rem; }
  .xc-qhead { padding: 8px 12px; }
  #x-paper { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .search-big { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .actions, .filter { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* Guided preparation and browser progress. */
.qa,.review{grid-template-columns:minmax(0,1fr)}.qa>li,.review>li{min-width:0}.xc{grid-template-columns:minmax(0,1fr);overflow:hidden}.xc-main{min-width:0;grid-template-columns:minmax(0,1fr)}.xc-q{min-width:0}.practice-data{width:100%;min-width:0;max-width:100%}.practice-data table{min-width:420px}.practice-data:focus-visible{outline:3px solid #9b6300;outline-offset:3px}
.preflight{max-width:760px;margin:24px auto;line-height:1.65}.preflight li{margin-bottom:10px}.learning-form{display:flex;flex-wrap:wrap;gap:16px;align-items:end}.learning-form label{display:grid;gap:6px}.learning-form select{min-height:44px;padding:8px}.learning-plan li{margin-bottom:18px}.learning-plan input{width:20px;height:20px;vertical-align:middle;margin-right:8px}.learning-plan label{cursor:pointer}#progress-app details{padding:12px 0;border-bottom:1px solid var(--line)}#progress-app button,#learning-report button,.preflight button{min-height:44px}#x-bookmark{margin-top:18px;min-height:44px}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #9b6300;outline-offset:3px}.table-scroll{max-width:100%;overflow-x:auto}caption{text-align:left;padding:8px;font-weight:600}@media(max-width:640px){.preflight{margin:12px}.learning-form{display:grid;grid-template-columns:1fr}.learning-form select{width:100%}.learning-plan{padding-left:22px}#progress-app .grid{min-width:650px}}

/* Usability audit: focus, mobile search, touch targets and status contrast. */
.xc-palette-close{display:none}
.xc-tools button,.xc-tabs button,.xc-toggle,.xc-actions button,.xc-submit button,.xc-dialog-actions button,.xc-palette button{min-height:44px}
.xc-palette button{min-width:44px}
.xc-submit button{background:#155a96;border-color:#155a96}
.xc-qhead .plus{color:#217638}
.xc-q:focus-visible{outline:3px solid #9b6300;outline-offset:-4px}
.table-scroll:focus-visible{outline:3px solid #9b6300;outline-offset:2px}
.xc-opt:focus-within{outline:3px solid #9b6300;outline-offset:1px}
.xc-opt input:focus-visible{outline:none}
@media(max-width:900px){.xc-palette-close{display:block;min-height:44px;margin:8px;background:#fff;color:#155a96;border:1px solid #aab4bf}.xc-side[aria-hidden="true"]{visibility:hidden}}
@media(max-width:640px){.header-row{flex-wrap:wrap}.search{flex:1 0 100%;display:flex;border:1px solid #657180;border-radius:10px;background:var(--slate-700)}.search input{display:block;width:0;min-height:44px}.search button{height:44px;border-radius:0}.xc-head{flex-wrap:wrap}.xc-title{min-width:0;overflow-wrap:anywhere}.xc-tools{flex-wrap:wrap}.xc-bar{flex-wrap:wrap}.xc-tabs{min-width:0}.xc-time{margin-left:0}.xc-actions>div{flex-wrap:wrap}.xc-actions{flex-wrap:wrap}.xc-qhead{flex-wrap:wrap}.xc-dialog-actions{flex-wrap:wrap}}

.st.an{background:#217638}.st.na{background:#b52f20}

.site-header :focus-visible,.site-footer :focus-visible,.band :focus-visible{outline-color:var(--gold)}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

#learning-import-form{display:grid;gap:12px;max-width:100%;margin-top:16px}#learning-import-file{min-width:0;max-width:100%;min-height:44px}#learning-import-preview{overflow-wrap:anywhere}

.report-trap{display:none}.report-details{white-space:pre-wrap;overflow-wrap:anywhere}.question-reference{font-size:.9rem;overflow-wrap:anywhere;color:var(--muted);margin-top:16px}.question-reference a{display:inline-block;min-height:24px} .form input[type="checkbox"]{display:inline-block;width:20px;height:20px;vertical-align:middle}
.spatial-grid{display:block;max-width:100%;height:auto;margin:8px 0;color:var(--slate)}.spatial-description{display:block;font-size:.85rem;line-height:1.4;max-width:28rem;overflow-wrap:anywhere}.xc-time small{display:block;font-size:.8rem}
