:root {
  color-scheme: light;
  --brand-navy: #0f2a4a;
  --brand-navy-deep: #091d33;
  --brand-red: #d7263d;
  --brand-blue-gray: #3e5a73;
  --brand-light-gray: #e8edf3;
  --brand-soft-white: #fafbfd;
  --white: #ffffff;
  --ink: #132238;
  --muted: #53677a;
  --line: #d9e1e9;
  --focus: #d7263d;
  --radius-sm: .55rem;
  --radius-md: .9rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 2px 12px rgba(15, 42, 74, .05);
  --shadow-md: 0 14px 38px rgba(15, 42, 74, .09);
  --space-1: .35rem;
  --space-2: .65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --content: 72rem;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { background: var(--brand-soft-white); }
body { margin: 0; color: var(--ink); background: var(--brand-soft-white); line-height: 1.6; }
a { color: var(--brand-navy); text-underline-offset: .22em; }
a:hover { color: var(--brand-red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 20; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--white); color: var(--brand-navy); box-shadow: var(--shadow-md); }
.skip-link:focus { top: 1rem; }

.site-header { min-height: 4.75rem; padding: .7rem max(1rem, calc((100vw - var(--content)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); background: rgba(250, 251, 253, .98); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .85rem; color: var(--brand-navy); text-decoration: none; }
.brand-logo { display: block; width: clamp(10rem, 17vw, 13.25rem); height: auto; }
.brand-logo-compact { display: none; width: 2.75rem; height: 2.75rem; object-fit: contain; }
.brand-product { padding-left: .75rem; border-left: 1px solid #b8c5d1; color: var(--brand-blue-gray); font-size: .9rem; font-weight: 600; }
.header-link { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--brand-navy); background: var(--white); text-decoration: none; font-size: .9rem; font-weight: 700; }
.header-link:hover { border-color: var(--brand-navy); color: var(--brand-navy); }

main { width: min(var(--content), calc(100% - 2rem)); margin: 0 auto; }
.library { padding: clamp(2.25rem, 6vw, 4.75rem) 0 5rem; }
.intro { max-width: 50rem; }
.eyebrow, .p-code, .mode-label { margin: 0 0 .5rem; color: var(--brand-red); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; color: var(--brand-navy); font-size: clamp(2.35rem, 6.5vw, 4.75rem); line-height: 1.02; letter-spacing: -.045em; }
h2, h3 { color: var(--brand-navy); }
.intro > p:last-child { margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }

.finder { margin: 2.25rem 0 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.finder label { display: block; margin-bottom: .55rem; color: var(--brand-navy); font-weight: 700; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: .7rem; }
input, button { min-height: 3.1rem; border-radius: var(--radius-sm); font: inherit; }
input { width: 100%; padding: .75rem .9rem; border: 1px solid #91a5b8; background: var(--white); color: var(--ink); font-size: 1rem; }
input:hover { border-color: var(--brand-blue-gray); }
input:focus { border-color: var(--brand-navy); }
button { padding: .7rem 1.2rem; border: 1px solid var(--brand-navy); color: var(--white); background: var(--brand-navy); font-weight: 700; cursor: pointer; }
button:hover { background: var(--brand-navy-deep); }
button:disabled { opacity: .45; cursor: not-allowed; }
.hint { margin: .55rem 0 0; color: var(--muted); font-size: .86rem; }

.section-nav, .mode-nav { display: flex; flex-wrap: wrap; gap: .55rem; padding: .45rem 0 .6rem; }
.section-nav a, .mode-nav a { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 .95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--brand-navy); text-decoration: none; font-size: .9rem; font-weight: 700; }
.section-nav a:hover, .mode-nav a:hover { border-color: var(--brand-blue-gray); color: var(--brand-navy); }
.section-nav a[aria-current="page"], .mode-nav a[aria-current="page"] { border-color: var(--brand-navy); color: var(--white); background: var(--brand-navy); }
.mode-nav { margin-top: 1.05rem; padding: .75rem; border-radius: var(--radius-md); background: var(--brand-light-gray); }
.mode-nav a { flex: 1 1 9rem; justify-content: center; border-radius: var(--radius-sm); letter-spacing: .045em; }
.result-bar { margin: 1.35rem 0 .9rem; color: var(--muted); }
.result-bar strong { color: var(--brand-navy); font-variant-numeric: tabular-nums; }

.question-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20.5rem), 1fr)); gap: .9rem; }
.question-card { position: relative; display: flex; flex-direction: column; min-height: 14.5rem; padding: 1.2rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.question-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.question-card:hover { transform: translateY(-2px); border-color: #a9b8c7; box-shadow: var(--shadow-md); }
.question-card.is-65-20::before { background: var(--brand-red); }
.card-topline { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.card-code { color: var(--brand-red); font-weight: 800; letter-spacing: .07em; }
.card-section { color: var(--muted); font-size: .78rem; text-align: right; }
.question-card h2 { margin: .85rem 0 1.15rem; font-size: 1.08rem; line-height: 1.42; letter-spacing: -.012em; }
.question-card h2 a { color: inherit; text-decoration: none; }
.question-card h2 a::after { content: "  →"; color: var(--brand-red); }
.mode-links { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; }
.mode-links a { min-height: 2.65rem; display: inline-flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--brand-navy); background: var(--brand-soft-white); text-decoration: none; font-size: .76rem; font-weight: 800; letter-spacing: .045em; }
.mode-links a:hover { border-color: var(--brand-navy); }
.empty { margin-top: 1rem; padding: 2rem; border: 1px dashed #91a5b8; border-radius: var(--radius-lg); text-align: center; background: var(--white); }

.question-detail { max-width: 54rem; padding: clamp(1.75rem, 5vw, 4.25rem) 0 5rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.25rem; color: var(--muted); font-size: .9rem; }
.crumbs a { color: var(--brand-blue-gray); }
.question-header { padding: 0 0 2.25rem; border-bottom: 1px solid var(--line); }
.question-number { margin: 0 0 .75rem; color: var(--muted); }
.question-header h1 { max-width: 51rem; font-size: clamp(2rem, 5.5vw, 3.65rem); line-height: 1.12; }
.route-badge { display: inline-flex; margin-top: 1.15rem; padding: .38rem .7rem; border-radius: 999px; color: var(--white); background: var(--brand-red); font-size: .8rem; font-weight: 700; }
.mode-choice { margin-top: 2rem; }
.mode-choice > h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.mode-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.mode-action { position: relative; min-height: 11rem; display: flex; flex-direction: column; padding: 1.15rem; border: 1px solid var(--line); border-top: 4px solid var(--brand-blue-gray); border-radius: var(--radius-md); color: var(--ink); background: var(--white); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.mode-action.mode-learn { border-top-color: var(--brand-navy); }
.mode-action.mode-recall { border-top-color: var(--brand-blue-gray); }
.mode-action.mode-interview { border-top-color: var(--brand-red); }
.mode-action strong { color: var(--brand-navy); font-size: 1.12rem; }
.mode-action > span:last-child { margin-top: .6rem; color: var(--muted); }
.mode-action::after { content: "→"; margin-top: auto; color: var(--brand-red); font-weight: 800; }
.mode-action:hover { transform: translateY(-2px); border-right-color: #a9b8c7; border-bottom-color: #a9b8c7; border-left-color: #a9b8c7; color: var(--ink); box-shadow: var(--shadow-md); }
.mode-card { padding: clamp(1.15rem, 4vw, 1.75rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.mode-card.selected-mode { margin-top: 1.5rem; border-top: 5px solid var(--brand-navy); box-shadow: var(--shadow-md); }
.mode-card.selected-mode.mode-recall { border-top-color: var(--brand-blue-gray); }
.mode-card.selected-mode.mode-interview { border-top-color: var(--brand-red); }
.mode-card h2 { margin: 0; font-size: 1.4rem; }
.mode-card > p:not(.mode-label) { margin: .55rem 0 1.15rem; color: var(--muted); }
audio { display: block; width: 100%; min-height: 3.4rem; }
.back-aggregator { min-height: 2.75rem; display: inline-flex; align-items: center; margin-top: 1.1rem; font-weight: 700; }
.question-pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.question-pagination a { min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); text-decoration: none; font-weight: 700; }
footer { padding: 2rem 1rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .85rem; }
footer strong { color: var(--brand-navy); }

.root-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: radial-gradient(circle at 86% 18%, rgba(232, 237, 243, .9), transparent 28rem), var(--brand-soft-white); }
.root-header { width: 100%; }
.root-landing { width: min(var(--content), calc(100% - 2rem)); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(17rem, .6fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); padding: clamp(3.5rem, 9vw, 7.5rem) 0; }
.root-copy { max-width: 48rem; }
.root-logo { display: block; width: min(100%, 30rem); height: auto; margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }
.root-landing h1 { color: var(--brand-red); font-size: clamp(3.25rem, 7vw, 6.25rem); line-height: .96; }
.root-rule { display: block; width: 7.5rem; height: .35rem; margin: 1.25rem 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand-navy) 0 46%, transparent 46% 51%, var(--brand-red) 51%); }
.root-description { max-width: 40rem; margin: 1.5rem 0 0; color: var(--brand-blue-gray); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.root-promise { margin: 1.25rem 0 2rem; color: var(--brand-navy); font-weight: 700; }
.root-promise span { padding: 0 .4rem; color: var(--brand-red); }
.root-action { min-height: 3.35rem; display: inline-flex; align-items: center; gap: 1rem; padding: 0 1.25rem; border-radius: var(--radius-sm); color: var(--white); background: var(--brand-navy); text-decoration: none; font-weight: 700; }
.root-action:hover { color: var(--white); background: var(--brand-navy-deep); }
.root-action span { color: #ff98a5; }
.root-summary { display: grid; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-md); }
.root-summary div { display: grid; gap: .1rem; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line); }
.root-summary div:last-child { border-bottom: 0; }
.root-summary strong { color: var(--brand-navy); font-size: 1.35rem; }
.root-summary span { color: var(--muted); font-size: .88rem; }

@media (max-width: 50rem) {
  .root-landing { grid-template-columns: 1fr; gap: 2.25rem; }
  .root-summary { grid-template-columns: repeat(3, 1fr); }
  .root-summary div { border-right: 1px solid var(--line); border-bottom: 0; }
  .root-summary div:last-child { border-right: 0; }
}

@media (max-width: 40rem) {
  .site-header { min-height: 4.25rem; }
  .brand-logo { display: none; }
  .brand-logo-compact { display: block; }
  .brand-product { display: none; }
  .header-link { padding: 0 .8rem; }
  .library { padding-top: 2rem; }
  .search-row { grid-template-columns: 1fr; }
  .search-row button { width: 100%; }
  .mode-action-grid { grid-template-columns: 1fr; }
  .mode-action { min-height: 8.5rem; }
  .root-landing { padding: 3rem 0; }
  .root-logo { width: min(100%, 22rem); margin-bottom: 1.75rem; }
  .root-landing h1 { font-size: clamp(2.8rem, 14vw, 4.25rem); }
  .root-summary { grid-template-columns: 1fr; }
  .root-summary div, .root-summary div:last-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .root-summary div:last-child { border-bottom: 0; }
}

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