/* Aptitude Practice Test - styles. v1 (2026-11-04).
   Palette, fonts and card treatment match the NEC practice test (../../App Production/app/styles.css) so both apps
   read as one product. Every color is a variable; dark mode overrides them at the end. */

@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/SourceSansPro-400.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/SourceSansPro-600.woff2") format("woff2"); }
@font-face { font-family: "Source Sans Pro"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/SourceSansPro-700.woff2") format("woff2"); }
@font-face { font-family: "Volkhov"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Volkhov-400.woff2") format("woff2"); }
@font-face { font-family: "Volkhov"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Volkhov-700.woff2") format("woff2"); }

:root {
  --navy: #316cb6; --navy-2: #2a5d9e; --amber: #f49516; --amber-dark: #d97f06;
  --ink: #1f2937; --muted: #6b7b8c; --line: #e2e8f0; --bg: #f8fafc; --card: #ffffff;
  --good: #1f9d57; --good-bg: #e7f6ee; --bad: #d2453b; --bad-bg: #fbeae8; --bad-strong: #d2453b;
  --surface: #ffffff; --choice-hover-bg: #f6f9fc; --choice-selected-bg: #eef3f9; --track: #e3e9f0;
  --passage-bg: #fbfcfe; --timer-warn-ink: #8a5a00; --timer-warn-bg: #fff7e8;
  --radius: 12px; --shadow: 0 2px 12px rgba(49, 108, 182, 0.10);
  --font-head: "Volkhov", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html, body { background: var(--bg); margin: 0; }
:root { color-scheme: light dark; }

.app { font-family: var(--font-body); color: var(--ink); background: var(--bg); max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; line-height: 1.5; }
.app.wide { max-width: 1120px; }
.hidden { display: none !important; }
.masthead h1, .card h2, .question-text, .result-title { font-family: var(--font-head); }

.masthead { text-align: center; margin: 8px 0 22px; }
.masthead .logo { width: 72px; height: 72px; display: block; margin: 0 auto 10px; }
.masthead h1 { color: var(--navy); font-size: 1.6rem; margin: 0 0 6px; }
.tagline { color: var(--amber-dark); font-weight: 600; margin: 0; }

.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--navy) 0%, var(--amber) 100%); border-radius: var(--radius) var(--radius) 0 0; }
.card h2 { color: var(--navy); font-size: 1.05rem; margin: 0 0 6px; }
.intro p { margin: 0 0 14px; }
.intro p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); font-size: .9rem; }

/* mode choice */
.mode-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.mode-btn { flex: 1 1 200px; text-align: left; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.mode-btn:hover, .mode-btn:focus-visible { border-color: var(--amber); outline: none; }
.mode-name { display: block; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.mode-meta { display: block; font-size: .85rem; color: var(--muted); }
.timed-toggle, .missed-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: .95rem; cursor: pointer; }

/* buttons */
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 11px 20px; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: var(--surface); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn:disabled { opacity: .45; cursor: default; }

/* test bar */
.testbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.testbar-left { display: flex; align-items: center; gap: 10px; }
.logo-sm { width: 34px; height: 34px; }
.section-name { display: block; font-weight: 700; color: var(--navy); }
.progress { display: block; font-size: .9rem; color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--navy); }
.timer.warn { color: var(--timer-warn-ink); background: var(--timer-warn-bg); border-color: var(--amber); }
.timer.low { color: #fff; background: var(--bad-strong); border-color: var(--bad-strong); }
.timer.untimed { color: var(--muted); font-weight: 600; font-size: .9rem; }

/* question */
.question-num { margin: 0 0 4px; font-size: .85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.question-text { font-size: 1.15rem; line-height: 1.45; color: var(--ink); margin: 0 0 14px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { background: var(--choice-hover-bg); border-color: #c8d4e2; }
.choice.selected { background: var(--choice-selected-bg); border-color: var(--navy); }
.choice .letter { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--track); color: var(--navy); }
.choice.selected .letter { background: var(--navy); color: #fff; }
.test-actions { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }

/* reading passage */
.passage-label { margin: 0 0 2px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.passage-text { background: var(--passage-bg); border-radius: 8px; padding: 4px 2px; }
.passage-text p { margin: 0 0 12px; font-size: 1rem; line-height: 1.6; }
.passage-text p.memo-head { white-space: pre-line; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
@media (min-width: 960px) {
  .test-body.reading { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
  .test-body.reading .passage { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; margin-bottom: 0; }
}

/* navigator */
.navigator-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.navigator { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin: 10px 0 14px; }
.nav-btn { font: inherit; font-size: .9rem; height: 38px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.nav-btn.answered { background: var(--choice-selected-bg); border-color: #b9cbe2; color: var(--navy); font-weight: 600; }
.nav-btn.current { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber) inset; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid var(--line); background: var(--surface); vertical-align: -1px; }
.dot-answered { background: var(--choice-selected-bg); border-color: #b9cbe2; }
.btn-finish { width: 100%; }
.finish-confirm { border: 1.5px solid var(--amber); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--timer-warn-bg); }
.finish-confirm p { margin: 0 0 10px; color: var(--ink); }

/* break */
.break-card { text-align: center; padding: 32px 22px; }
.break-card h2 { font-size: 1.35rem; }

/* results */
.result-title { font-size: 1.35rem !important; }
.result-scores { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 12px; }
.score-box { flex: 1 1 220px; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.score-box .score-label { display: block; font-weight: 700; color: var(--navy); }
.score-box .score-num { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--ink); line-height: 1.2; }
.score-box .score-meta { display: block; font-size: .85rem; color: var(--muted); }
.result-note { margin: 0 0 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.review-section h2 { font-size: 1.15rem; }
.review-passage { font-weight: 700; color: var(--navy); margin: 18px 0 8px; font-size: .95rem; }
.review-item { border: 1px solid var(--line); border-left: 5px solid var(--good); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.review-item.missed { border-left-color: var(--bad); }
.review-item.blank { border-left-color: var(--amber); }
.review-item .ri-q { font-weight: 600; margin: 0 0 6px; }
.review-item .ri-line { margin: 2px 0; font-size: .95rem; }
.review-item .ri-why { margin: 8px 0 0; font-size: .93rem; color: var(--muted); }
.ri-tag { font-weight: 700; }
.ri-tag.ok { color: var(--good); }
.ri-tag.no { color: var(--bad); }
.ri-tag.skip { color: var(--amber-dark); }
.review.only-missed .review-item:not(.missed):not(.blank) { display: none; }

#selftest-out { white-space: pre-wrap; max-width: 760px; margin: 0 auto; padding: 0 16px; } /* ?selftest=1 report only */
.app-disclaimer { margin-top: 26px; font-size: .8rem; color: var(--muted); text-align: center; }

.animate-in { animation: fadein .25s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .animate-in { animation: none; } * { transition: none !important; } }

@media (max-width: 520px) {
  .masthead h1 { font-size: 1.35rem; }
  .question-text { font-size: 1.05rem; }
  .card { padding: 16px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #7fb0ec; --navy-2: #9cc2f2; --amber: #f6a540; --amber-dark: #f6a540;
    --ink: #e6ebf2; --muted: #9aa8b8; --line: #2c3a4b; --bg: #0f1722; --card: #162131;
    --good: #4cc584; --good-bg: #173527; --bad: #ef7a70; --bad-bg: #3a1f1d; --bad-strong: #c2443a;
    --surface: #1b2838; --choice-hover-bg: #1f2e40; --choice-selected-bg: #213651; --track: #26364a;
    --passage-bg: #182436; --timer-warn-ink: #f6c27a; --timer-warn-bg: #2e2516;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  }
  .btn-primary { color: #0f1722; }
  .choice.selected .letter { color: #0f1722; }
}
