/* ==========================================================================
   시저 기출 아카이브 — 공개 사이트 스타일
   브랜드 색상은 data/site.config.js에서 --brand / --accent 로 주입됩니다.
   ========================================================================== */
:root {
  --brand: #1d4ed8;
  --accent: #f59e0b;
  --navy: #0b1b3a;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #d1d5db;
  --bg: #f6f7fb;
  --card: #ffffff;
  --tint: #eef2f9;
  --brand-soft: color-mix(in srgb, var(--brand) 8%, white);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .06);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --wrap: 1160px;
  /* exam kinds */
  --k-csat: #1d4ed8; --k-sep: #7c3aed; --k-jun: #0f766e; --k-pilot: #6b7280;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, white); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); font-weight: 750; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: .25em 0 .4em; }
h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
h3 { font-size: 1.08rem; }
.small, small { font-size: .875rem; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 780px); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 12px; }
.icon { width: 1.05em; height: 1.05em; vertical-align: -.16em; flex: none; }
.eyebrow { font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0 0 .3rem; letter-spacing: .02em; }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 780px; }
.lead-sm { color: var(--ink-2); max-width: 780px; }

/* buttons */
.button { display: inline-flex; align-items: center; gap: .45em; background: var(--brand); color: #fff; border: 1px solid var(--brand); padding: .62em 1.05em; border-radius: 10px; font: 650 .93rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: filter .15s, background .15s; white-space: nowrap; }
.button:hover { filter: brightness(1.08); }
.button-ghost { background: #fff; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, white); }
.button-ghost:hover { background: var(--brand-soft); filter: none; }
.button-light { background: #fff; color: var(--brand); border-color: #fff; }
.button-small { padding: .42em .8em; font-size: .86rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .95); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; }
.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 8px 13px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: var(--tint); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font: 600 .9rem var(--font); color: var(--ink); cursor: pointer; }

.admin-bar { background: #1d2327; color: #dcdcde; font-size: .85rem; }
.admin-bar .container { display: flex; gap: 16px; align-items: center; min-height: 34px; flex-wrap: wrap; }
.admin-bar a, .admin-bar button { color: #fff; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; padding: 0; }
.admin-bar a:hover, .admin-bar button:hover { color: #72aee6; }
.admin-bar .admin-bar-note { color: #a7aaad; margin-left: auto; }

/* hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%), linear-gradient(180deg, var(--navy), #0f2550); color: #fff; padding: 52px 0 96px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); line-height: 1.25; margin: 0 0 12px; letter-spacing: -.03em; }
.hero-lead { color: #cbd5e1; max-width: 720px; margin: 0; font-size: 1.08rem; font-weight: 600; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 18px 0 0; padding: 0; font-size: .9rem; color: #a5b4fc; }
.hero-stats li { white-space: nowrap; }
.hero-stats li + li::before { content: "·"; margin: 0 10px; color: rgba(255,255,255,.35); }
.hero-stats b { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 2px; }

/* finder */
.finder-wrap { margin-top: -64px; position: relative; z-index: 2; }
.finder { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: clamp(16px, 2.5vw, 26px); }
.finder-flat { box-shadow: none; padding: 16px 18px; margin-bottom: 18px; position: sticky; top: 72px; z-index: 5; }
.finder-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.finder-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.finder-head a { font-weight: 650; font-size: .92rem; text-decoration: none; }
.finder-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.finder-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; min-width: 0; }
.finder-row > *, .seg { min-width: 0; max-width: 100%; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; font: 650 .9rem var(--font); cursor: pointer; }
.seg button:hover { border-color: var(--brand); color: var(--brand); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg-sm button { padding: 5px 11px; font-size: .84rem; font-weight: 600; }
.seg-sm button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.select select { font: 600 .9rem var(--font); color: var(--ink); padding: 7px 34px 7px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; cursor: pointer; }
.finder-count { margin: 10px 0 0; font-size: .88rem; color: var(--muted); font-weight: 600; }
.finder-more { text-align: center; margin: 16px 0 0; }
.finder-none, .finder-empty { color: var(--muted); padding: 28px 0; text-align: center; list-style: none; }

/* exam list rows */
.exam-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.exam-row { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 8px 18px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.exam-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.exam-title { font-weight: 700; color: var(--ink); text-decoration: none; }
.exam-title:hover { color: var(--brand); text-decoration: underline; }
.exam-held { font-size: .83rem; color: var(--muted); width: 100%; padding-left: 0; }
.kind { display: inline-block; font-size: .74rem; font-weight: 750; padding: 2px 8px; border-radius: 6px; white-space: nowrap; color: #fff; background: var(--k-csat); letter-spacing: 0; }
.kind-csat { background: var(--k-csat); }
.kind-sep { background: var(--k-sep); }
.kind-jun { background: var(--k-jun); }
.kind-pilot, .kind-sample { background: var(--k-pilot); }
.kind-edu { background: #c2410c; }
.maker { color: var(--ink-2); font-weight: 600; }
.seg-grade button { font-size: .95rem; padding: 8px 16px; }
.seg-grade button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.paper-chip.chip-ext::after { content: "↗"; }
.paper-chip.chip-file { border-color: color-mix(in srgb, var(--brand) 35%, white); color: var(--brand); }
.sub-link { font-size: .85rem; font-weight: 650; margin-left: 10px; text-decoration: none; }
.maker-list { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; font-size: .86rem; }
.maker-list li { margin: 0 !important; line-height: 1.5; }
.maker-list b { display: block; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.paper-chip { display: inline-flex; align-items: center; font-size: .84rem; font-weight: 600; padding: 4px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink-2); white-space: nowrap; transition: all .12s; }
.paper-chip::after { content: "↓"; font-size: .78rem; margin-left: 4px; color: var(--muted); }
.paper-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.pending { font-size: .86rem; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; padding: 4px 10px; border-radius: 8px; }

/* sections */
.section { padding: 56px 0; }
.section-tight { padding: 22px 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 650; font-size: .93rem; text-decoration: none; }
.section-head-gap { margin-top: 40px; }
.section-label { font-size: 1.08rem; color: var(--ink-2); }
.sub-head { font-size: 1.02rem; margin: 34px 0 12px; color: var(--ink-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.h2-gap { margin-top: 2.2em; }

/* recent exam cards & years */
.exam-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.exam-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.exam-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.exam-card .kind { align-self: flex-start; color: #fff; }
.exam-card strong { font-size: 1.12rem; letter-spacing: -.02em; }
.exam-card span { color: var(--muted); font-size: .9rem; }
.exam-card .exam-card-foot { margin-top: auto; padding-top: 10px; color: var(--brand); font-weight: 650; font-size: .88rem; }
.year-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.year-grid a { display: block; text-align: center; padding: 9px 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.year-grid a:hover { border-color: var(--brand); color: var(--brand); }

.regional { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.regional h2 { margin-top: 0; }
.regional p { max-width: 640px; color: var(--ink-2); }
.regional-links { display: flex; gap: 8px; flex-wrap: wrap; }

.cat-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.cat-strip a { display: flex; gap: 10px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); height: 100%; }
.cat-strip a:hover { border-color: var(--brand); }
.cat-strip b { display: block; font-size: .95rem; }
.cat-strip small { color: var(--muted); }
.cat-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.cat-icon .icon { width: 20px; height: 20px; }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: var(--shadow); }
.card h3 { margin: 6px 0 8px; font-size: 1.06rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); text-decoration: underline; }
.card p { margin: 0 0 10px; color: var(--ink-2); font-size: .93rem; }
.card .card-meta { margin-top: auto; margin-bottom: 0; font-size: .83rem; color: var(--muted); }
.card-kicker { font-size: .8rem; font-weight: 700; color: var(--brand); text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.column-kicker { color: #b45309; }
.column-card { border-top: 3px solid var(--accent); }
.column-list { display: grid; gap: 14px; max-width: 860px; }

.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.principles li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.principles h3 { margin: 0 0 4px; font-size: .97rem; }
.principles p { margin: 0; font-size: .89rem; color: var(--ink-2); }

/* author */
.avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; font-weight: 800; font-size: 1.2rem; flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar-lg { width: 104px; height: 104px; font-size: 2rem; }
.author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 32px 0 0; }
.author-box .eyebrow { margin: 0; }
.author-box .author-name { margin: 2px 0 6px; font-size: 1.2rem; }
.author-box .author-name a { color: var(--ink); text-decoration: none; }
.author-box p { margin: 0 0 8px; color: var(--ink-2); font-size: .93rem; }
.author-links { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 650; }
.author-links a { text-decoration: none; }
.author-hero { display: flex; gap: 26px; align-items: flex-start; }
.author-hero h1 { margin-top: 0; }
.author-hero p { color: var(--ink-2); max-width: 740px; }
.owner-link { font-weight: 700; }
.admin-branch { border-radius: var(--radius); padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); }
.admin-branch .branch-title { font-weight: 750; font-size: 1.05rem; margin: 0 0 4px; color: var(--ink); }
.admin-branch p { margin: 0 0 6px; color: var(--ink-2); }
.branch-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px !important; }
html.is-admin .admin-branch { background: #fffbeb; border-left-color: var(--accent); }

/* page heads */
.page-band { background: #fff; border-bottom: 1px solid var(--line); }
.page-head { padding: 24px 0 26px; }
.page-head h1 { margin-bottom: .3em; }
.page-body { padding: 28px 0 10px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 12px; padding: 0; font-size: .85rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 4px; color: #9ca3af; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink-2); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-eyebrow { display: inline-flex; gap: 6px; align-items: center; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); background: #fff; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: .9rem; }
.link-list { padding-left: 1.2em; }
.link-list li { margin: .35em 0; }
.inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; }
.cat-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 28px 0 40px; }
.cat-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cat-block-head { display: flex; gap: 14px; align-items: flex-start; }
.cat-block-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.cat-block-head h2 a { color: var(--ink); text-decoration: none; }
.cat-block-head p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.cat-block > p a { font-weight: 650; text-decoration: none; }

/* exams index & detail */
.archive-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding: 26px 0 48px; align-items: start; }
.archive-aside { position: sticky; top: 80px; display: grid; gap: 14px; }
.archive-aside .box { margin: 0; font-size: .9rem; }
.year-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 6px; margin-bottom: 14px; }
.year-block h2 { margin: 0; font-size: 1.25rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.year-block h2 small { font-size: .82rem; font-weight: 600; color: var(--muted); }
.year-block .exam-list { margin-top: 10px; }
.year-block .exam-row:last-child { border-bottom: 0; }
.exam-badges { display: flex; gap: 8px; align-items: center; margin: 0; }
.era-chip { font-size: .78rem; font-weight: 650; color: var(--ink-2); background: var(--tint); padding: 2px 9px; border-radius: 6px; }
.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding: 26px 0 48px; align-items: start; }
.exam-main-col h2 { margin: 1.6em 0 .6em; }
.exam-main-col h2:first-child { margin-top: 0; }
.paper-table th[scope="row"] { font-weight: 700; color: var(--ink); width: 45%; }
.paper-table td { text-align: right; }
.exam-aside { display: grid; gap: 14px; position: sticky; top: 80px; }
.exam-aside .box { margin: 0; }
.facts { margin: 0; display: grid; gap: 6px; font-size: .92rem; }
.facts div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; text-align: right; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.mini-list a { font-weight: 600; text-decoration: none; }
.prevnext { display: grid; gap: 8px; }
.prevnext a { display: block; text-decoration: none; font-weight: 650; font-size: .92rem; color: var(--ink); }
.prevnext a:hover { color: var(--brand); }
.prevnext small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; }

/* difficulty */
.diff { font-size: 1em; margin-left: 2px; cursor: help; text-decoration: none; display: inline-block; }
.diff-lg { font-size: .9em; vertical-align: .05em; }
.diff-box { background: var(--card); border: 1px solid var(--line); border-left: 5px solid #9ca3af; border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; }
.diff-box p { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; }
.diff-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.diff-head h2 { margin: 0; font-size: 1.25rem; }
.diff-head .eyebrow { margin: 0; }
.diff-emoji { font-size: 2rem; line-height: 1; }
.diff-stats b { color: var(--ink); margin-right: 6px; }
.diff-src { margin: 4px 0 8px; padding-left: 1.1em; font-size: .88rem; }
.diff-src a { text-decoration: none; }
.diff-src a:hover { text-decoration: underline; }
.diff-note { font-size: .8rem !important; color: var(--muted) !important; margin: 6px 0 0 !important; }
.diff-fire { border-left-color: #dc2626; background: #fff7f7; }
.diff-hot { border-left-color: #f97316; background: #fffaf5; }
.diff-normal { border-left-color: #64748b; }
.diff-water { border-left-color: #0ea5e9; background: #f5fbff; }
.diff-pending { border-left-color: #a855f7; background: #fbf8ff; }
.legend { list-style: none; padding: 0 !important; margin: 0 0 8px; display: grid; gap: 6px; }
.legend li { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; line-height: 1.5; margin: 0 !important; }
.legend-emoji { font-size: 1.1rem; line-height: 1.3; }

/* exam downloads */
.dl-note { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); background: var(--tint); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.dl-note .icon { margin-top: .25em; color: var(--brand); }
.dl-list { display: grid; gap: 12px; }
.dl-sec { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; scroll-margin-top: 84px; }
.dl-sec:target { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.dl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.dl-head h3 { margin: 0; font-size: 1.05rem; }
.dl-src { font-size: .8rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.dl-src:hover { color: var(--brand); }
.dl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-weight: 650; font-size: .88rem; text-decoration: none; color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.dl-btn:hover { filter: brightness(1.08); }
.dl-btn small { font-size: .7rem; font-weight: 700; opacity: .8; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.18); }
.dl-btn.dl-k1 { background: #fff; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, white); }
.dl-btn.dl-k1 small { background: var(--brand-soft); }
.dl-btn.dl-k2, .dl-btn.dl-k3 { background: #fff; color: var(--k-jun); border-color: color-mix(in srgb, var(--k-jun) 35%, white); }
.dl-btn.dl-k2 small, .dl-btn.dl-k3 small { background: #ecfdf5; }
.dl-ico { font-weight: 800; }
.dl-subs { list-style: none; margin: 0; padding: 0; display: grid; }
.dl-subs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.dl-subs li:first-child { border-top: 0; padding-top: 0; }
.dl-sub-name { font-weight: 650; font-size: .93rem; }

/* articles */
.article-head { padding: 24px 0 22px; }
.article-head h1 { max-width: 860px; }
.dek { font-size: 1.1rem; color: var(--ink-2); max-width: 780px; margin: 0 0 16px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .88rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 740px) 270px; gap: 52px; justify-content: space-between; padding: 28px 0 56px; }
.article-aside { display: grid; gap: 12px; align-content: start; position: sticky; top: 82px; }
.aside-cta { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--brand); color: #fff; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .92rem; }
.toc-mobile { display: none; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: .9rem; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: .3em 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.box-title { font-weight: 750; font-size: .95rem; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
h2.box-title { font-size: 1.02rem; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 22px 0; }
.box ul { margin: 0; padding-left: 1.2em; }
.box li { margin: .35em 0; }
.box p:last-child { margin-bottom: 0; }
.box-summary { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 20%, white); margin-top: 0; }
.box-warn { background: #fff7ed; border-color: #fed7aa; }
.box-warn .box-title { color: #9a3412; }
.box-check .box-title { color: #166534; }
.box-context { background: #fffbeb; border-color: #fde68a; }
.box-context .box-title { color: #92400e; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border: 2px solid #16a34a; border-radius: 5px; background: #fff; }
.prose { font-size: 1.05rem; line-height: 1.85; }
.prose h2 { margin: 1.9em 0 .55em; padding-top: .2em; }
.prose h3 { margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: .4em 1.2em; border-left: 4px solid var(--accent); color: var(--ink-2); background: #fff; }
.prose code { background: var(--tint); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.table-wrap { overflow-x: auto; margin: 1.1em 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { background: #f9fafb; font-size: .85rem; color: var(--muted); font-weight: 700; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 13px 0; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }
.note { font-size: .87rem; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 14px; margin-top: 28px; }
.column-band { background: #fffdf7; }
.column-body { max-width: 760px; padding: 28px 0 56px; }
.column .prose { font-size: 1.08rem; line-height: 1.95; }

/* contact & misc */
.contact-grid { display: grid; gap: 22px; padding: 28px 0 48px; }
.email-big { font-size: 1.15rem; font-weight: 750; word-break: break-all; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 650; font-size: .93rem; }
.contact-form input, .contact-form select, .contact-form textarea { font: 1rem var(--font); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.contact-form button { justify-self: start; }
.form-note { color: var(--muted); margin: 0; }
.sitemap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px 0 56px; }
.sitemap-grid ul { padding-left: 1.1em; }
.sitemap-grid h3 { margin-bottom: .2em; font-size: 1rem; }
.error-page { padding: 60px 0; }

/* CTA & footer */
.cta { padding: 44px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: linear-gradient(120deg, var(--navy), var(--brand)); color: #fff; border-radius: 20px; padding: 28px 32px; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); }
.site-footer { background: #0b1220; color: #9ca3af; padding: 48px 0 24px; font-size: .92rem; }
.site-footer a { color: #e5e7eb; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: .82rem; color: #6b7280; margin: 4px 0 12px; letter-spacing: .04em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .45em 0; }
.footer-about p { max-width: 360px; }
.footer-bottom { border-top: 1px solid #1f2937; margin-top: 32px; padding-top: 18px; display: grid; gap: 4px; font-size: .84rem; color: #6b7280; }
.footer-bottom p { margin: 0; }

/* responsive */
@media (max-width: 1080px) {
  .cat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { display: none; }
  .toc-mobile { display: block; margin: 16px 0; }
}
@media (max-width: 900px) {
  .archive-layout, .exam-layout, .two-col, .cat-blocks, .sitemap-grid { grid-template-columns: minmax(0, 1fr); }
  .archive-aside, .exam-aside { position: static; }
  .exam-row { grid-template-columns: 1fr; }
  .card-grid, .exam-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .finder-flat { position: static; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 62px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(0, 0, 0, .06); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 12px 14px; }
  .site-nav a { padding: 12px; }
}
@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .section { padding: 40px 0; }
  .hero { padding: 28px 0 80px; }
  .hero h1 { font-size: 1.7rem; }
  .hero-lead { font-size: 1rem; }
  .hero-stats { font-size: .82rem; margin-top: 14px; }
  .hero-stats li + li::before { margin: 0 7px; }
  .card-grid, .card-grid-2, .exam-cards, .cat-strip, .principles { grid-template-columns: 1fr; }
  .author-box, .author-hero { flex-direction: column; }
  .avatar-lg { width: 80px; height: 80px; font-size: 1.6rem; }
  .cta-inner { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .paper-table td { text-align: left; }
  .seg { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .seg button { flex: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .site-header, .site-footer, .cta, .article-aside, .admin-bar, .finder-controls { display: none !important; } body { background: #fff; } }
