/* ==========================================================================
   Draw Vancouver — design system
   ========================================================================== */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efebe3;
  --surface-3: #e7e1d6;
  --text: #1b1916;
  --text-2: #3f3b35;
  --muted: #736d62;
  --border: #e3ddd1;
  --accent: #e4572e;
  --accent-hover: #c94520;
  --accent-ink: #ffffff;
  --accent-soft: #fde8df;
  --blue: #23668f;
  --blue-soft: #e2eef6;
  --green: #2c7a57;
  --green-soft: #e2f1e9;
  --yellow-soft: #fff4d4;
  --yellow-line: #f0c75e;
  --shadow-sm: 0 1px 2px rgba(27, 25, 22, .06);
  --shadow: 0 1px 2px rgba(27, 25, 22, .05), 0 10px 30px -12px rgba(27, 25, 22, .14);
  --shadow-lg: 0 2px 4px rgba(27, 25, 22, .05), 0 24px 48px -16px rgba(27, 25, 22, .22);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --wrap: 1200px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, Cambria, "Times New Roman", serif;
  --header-h: 68px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121110; --surface: #1b1a18; --surface-2: #24221f; --surface-3: #2d2a26;
  --text: #f2eee7; --text-2: #d6d0c6; --muted: #9c958a; --border: #322f2a;
  --accent: #ff7a52; --accent-hover: #ff9471; --accent-ink: #1b0d07; --accent-soft: #3a2117;
  --blue: #84bde2; --blue-soft: #18262f; --green: #73d1a4; --green-soft: #17271f;
  --yellow-soft: #2b2416; --yellow-line: #8c6d22;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110; --surface: #1b1a18; --surface-2: #24221f; --surface-3: #2d2a26;
    --text: #f2eee7; --text-2: #d6d0c6; --muted: #9c958a; --border: #322f2a;
    --accent: #ff7a52; --accent-hover: #ff9471; --accent-ink: #1b0d07; --accent-soft: #3a2117;
    --blue: #84bde2; --blue-soft: #18262f; --green: #73d1a4; --green-soft: #17271f;
    --yellow-soft: #2b2416; --yellow-line: #8c6d22;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: .82em; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); font-weight: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- buttons, chips, tags */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 0; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.chip-btn, .share-btn, .link-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: .9rem;
  font-weight: 600; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s;
}
.chip-btn:hover, .share-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.is-done { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.link-btn { border: 0; background: none; height: auto; padding: 0; color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 650;
  background: var(--accent-soft); color: var(--accent-hover); text-decoration: none;
}
:root[data-theme="dark"] .pill { color: var(--accent); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: .88rem; font-weight: 550;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); text-decoration: none; transition: all .15s;
}
.tag small { color: var(--muted); font-weight: 500; }
.tag:hover, .tag.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 750; color: var(--accent); margin-bottom: 12px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--text); flex-shrink: 0; }
.logo:hover { color: var(--text); }
.logo-mark { border-radius: 9px; box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
.main-nav { display: flex; gap: 2px; margin-left: 10px; }
.main-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--text-2); }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.search { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-header { margin-left: auto; width: 280px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 6px; max-height: 60vh; overflow: auto;
}
.suggest a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; font-size: .95rem; color: var(--text-2); line-height: 1.35; }
.suggest a:hover, .suggest a.is-active { background: var(--accent-soft); color: var(--text); }
.suggest .suggest-all { color: var(--accent); font-weight: 650; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.page-home .progress, .page-list .progress { display: none; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 64px; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(700px 360px at -5% 110%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: auto -5% -1px -5%; height: 90px; opacity: .5; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cpath d='M0 90 L120 40 L210 70 L330 18 L430 64 L540 30 L640 72 L760 22 L880 60 L990 34 L1100 66 L1200 38 L1200 90Z' fill='none' stroke='%23e4572e' stroke-width='2' stroke-linejoin='round' opacity='.45'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; text-align: center; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.8rem); letter-spacing: -0.025em; line-height: 1.08; margin-bottom: 18px; }
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 30%, transparent) 62%); padding: 0 .08em; }
.hero-sub { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--text-2); max-width: 640px; margin: 0 auto 28px; }
.search-hero { max-width: 640px; margin: 0 auto; }
.search-hero input { height: 60px; padding-left: 50px; padding-right: 128px; font-size: 1.05rem; box-shadow: var(--shadow); }
.search-hero .search-icon { left: 18px; }
.search-hero .btn { position: absolute; right: 7px; height: 46px; }
.hero-topics { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; font-size: .9rem; color: var(--muted); }

/* ---------------------------------------------------------------- sections */
.home-section { margin: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-link { font-weight: 650; font-size: .95rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }
.empty { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cat-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: inherit; }
.cat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-2); font-size: 1.45rem; margin-bottom: 8px; }
.cat-name { font-weight: 700; line-height: 1.3; }
.cat-count { font-size: .85rem; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }
.card-img { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-ph {
  display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; color: var(--accent);
  background: radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%), linear-gradient(135deg, var(--surface-2), var(--blue-soft));
}
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-cat { font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.card-title { font-size: 1.06rem; line-height: 1.32; margin: 0; letter-spacing: -0.01em; }
.card-link:hover .card-title { color: var(--accent); }
.card-text { font-size: .92rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--muted); font-weight: 550; }

.popular-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 32px; }
.popular-list li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.popular-n { grid-row: span 2; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.popular-list a { font-weight: 650; text-decoration: none; line-height: 1.35; }
.popular-cat { font-size: .8rem; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 56px 0 72px; padding: 32px 36px;
  border-radius: calc(var(--radius) + 6px); background: linear-gradient(120deg, var(--accent-soft), var(--blue-soft)); border: 1px solid var(--border);
}
.cta h2 { margin-bottom: 4px; }
.cta p { margin: 0; color: var(--text-2); }

/* ---------------------------------------------------------------- breadcrumbs, lists */
.breadcrumbs { margin: 22px 0 18px; font-size: .88rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--muted); }
.breadcrumbs a { text-decoration: none; color: var(--text-2); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] span { color: var(--muted); }

.list-head { display: flex; gap: 18px; align-items: center; margin: 8px 0 26px; }
.list-icon { display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 1.9rem; font-weight: 800; color: var(--accent); box-shadow: var(--shadow-sm); }
.list-head h1 { margin: 0 0 4px; }
.list-intro { margin: 0; color: var(--muted); }
.subnav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 26px; scrollbar-width: thin; }
.subnav .tag { white-space: nowrap; }
.search-page { max-width: 640px; margin-bottom: 28px; }
.search-page input { height: 52px; padding-right: 116px; }
.search-page .btn { position: absolute; right: 5px; height: 42px; }
.q-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.q-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.q-list li:last-child { border-bottom: 0; }
.q-list a { font-weight: 600; text-decoration: none; }
.q-meta { font-size: .82rem; color: var(--muted); white-space: nowrap; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 40px 0 64px; }
.page-nums { display: flex; gap: 6px; align-items: center; }
.page-num, .page-btn { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-weight: 650; }
.page-num.is-current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.page-num:hover, .page-btn:hover { border-color: var(--accent); }
.page-gap { color: var(--muted); padding: 0 2px; }

.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.cat-card h2 { font-size: 1.25rem; margin-bottom: 6px; }
.cat-card h2 a { text-decoration: none; }
.cat-card p { font-size: .92rem; }
.cat-card ul { list-style: none; margin: 0 0 16px; padding: 0; flex: 1; }
.cat-card li { padding: 8px 0; border-top: 1px solid var(--border); font-size: .95rem; line-height: 1.4; }
.cat-card li a { text-decoration: none; }

/* ---------------------------------------------------------------- article */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.article { min-width: 0; max-width: 760px; }
.article-head { margin-bottom: 24px; }
.article-head h1 { margin: 16px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; color: var(--muted); }
.article-meta a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.article-meta .dot { opacity: .5; }

.answer-box {
  position: relative; margin: 0 0 28px; padding: 22px 24px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--yellow-soft), color-mix(in srgb, var(--yellow-soft) 40%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--yellow-line) 55%, var(--border)); box-shadow: var(--shadow-sm);
}
.answer-box::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--yellow-line); }
.answer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.answer-label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.answer-label svg { color: #e0a100; }
.answer-text { margin: 0; font-size: 1.14rem; line-height: 1.65; color: var(--text); }

.figure { margin: 28px 0; }
.figure img { width: 100%; border-radius: var(--radius); background: var(--surface-2); max-height: 560px; object-fit: cover; }
.figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.figure .credit a { color: var(--muted); }

.toc-mobile { display: none; margin: 0 0 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.toc-mobile summary { padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.toc-mobile[open] summary::after { content: "−"; }
.toc-mobile ol { margin: 0; padding: 0 18px 14px 38px; }
.toc-mobile li { padding: 4px 0; }
.toc-mobile a { text-decoration: none; color: var(--text-2); }

.prose { font-size: 1.08rem; line-height: 1.75; color: var(--text-2); }
.prose h2 { color: var(--text); margin: 2em 0 .6em; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h3 { color: var(--text); margin: 1.6em 0 .5em; }
.prose p { margin: 0 0 1.15em; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { margin: 0 0 1.3em; padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 30px; margin: .5em 0; }
.prose ul > li::before { content: ""; position: absolute; left: 9px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; }
.prose ol > li::before {
  content: counter(li); position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-hover); font-size: .78rem; font-weight: 800; line-height: 1;
}
:root[data-theme="dark"] .prose ol > li::before { color: var(--accent); }

.read-also {
  display: flex; flex-direction: column; gap: 2px; margin: 1.6em 0; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--blue-soft); border-left: 4px solid var(--blue); line-height: 1.45;
}
.read-also-label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.prose .read-also a, .read-also a { color: var(--text); font-weight: 700; text-decoration: none; font-size: 1.02rem; }
.read-also a:hover { color: var(--blue); text-decoration: underline; }

.facts { margin: 40px 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--green-soft); border: 1px solid color-mix(in srgb, var(--green) 25%, var(--border)); }
.facts h2 { font-size: 1.3rem; margin-bottom: 14px; scroll-margin-top: calc(var(--header-h) + 16px); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 32px; line-height: 1.55; color: var(--text-2); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 21px; height: 21px; border-radius: 50%; background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bottom-line { margin: 28px 0 0; padding: 24px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.bottom-line h2 { font-size: 1.3rem; margin-bottom: 10px; }
.bottom-line p { margin: 0; font-size: 1.05rem; line-height: 1.7; color: var(--text-2); }

.paa { margin: 44px 0 0; }
.paa h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.paa-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.paa-item + .paa-item { border-top: 1px solid var(--border); }
.paa-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; transition: background .15s; }
.paa-item summary::-webkit-details-marker { display: none; }
.paa-item summary:hover { background: var(--surface-2); }
.paa-item summary h3 { margin: 0; font-size: 1.04rem; font-weight: 650; letter-spacing: -0.005em; line-height: 1.4; }
.paa-icon { position: relative; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); transition: transform .2s, background .2s; }
.paa-icon::before, .paa-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: var(--text-2); border-radius: 2px; }
.paa-icon::after { transform: rotate(90deg); transition: transform .2s; }
.paa-item[open] .paa-icon { background: var(--accent-soft); }
.paa-item[open] .paa-icon::after { transform: rotate(0); }
.paa-answer { padding: 0 22px 20px; color: var(--text-2); line-height: 1.7; }
.paa-answer p { margin: 0; }
.paa-more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: .95rem; color: var(--accent); text-decoration: none; }
.paa-more:hover { text-decoration: underline; }

.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 36px 0 0; padding: 18px 22px; border-radius: var(--radius); border: 1px dashed var(--border); }
.feedback-q { font-weight: 700; }
.feedback-btns { display: flex; gap: 8px; }
.feedback-thanks { color: var(--green); font-weight: 650; }

.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 26px 0 0; }
.tags-label, .share-label { font-size: .88rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; }
.editorial-note { margin: 26px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.55; }
.editorial-note a { color: var(--text-2); }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 0; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.pn:hover { border-color: var(--accent); box-shadow: var(--shadow); color: inherit; }
.pn-next { text-align: right; }
.pn-label { font-size: .78rem; color: var(--muted); font-weight: 650; }
.pn-title { font-weight: 700; line-height: 1.35; }

.sidebar { min-width: 0; height: 100%; }
.sidebar-sticky { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 20px; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; scrollbar-width: thin; padding-bottom: 8px; }
.side-title { font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc li a { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; font-size: .9rem; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
.toc li a:hover { color: var(--text); }
.toc li a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 650; }
.side-box { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 9px 0; border-top: 1px solid var(--border); font-size: .9rem; line-height: 1.4; }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.side-list a { text-decoration: none; font-weight: 550; color: var(--text-2); }
.side-list a:hover { color: var(--accent); }

.related { margin: 64px 0 72px; padding-top: 40px; border-top: 1px solid var(--border); }
.ad { margin: 28px 0; text-align: center; min-height: 90px; }

/* ---------------------------------------------------------------- static pages, 404 */
.static-page { max-width: 760px; margin-bottom: 72px; }
.static-page h1 { margin-bottom: .6em; }
.lead { font-size: 1.22rem; color: var(--text); line-height: 1.6; }
.not-found { text-align: center; padding-top: 56px; }
.not-found .search-page { margin: 28px auto; }
.not-found .q-list, .not-found .grid { text-align: left; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 36px; }
.footer-brand p { margin: 14px 0 0; color: var(--muted); font-size: .93rem; max-width: 340px; }
.footer-title { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 5px 0; }
.site-footer li a { text-decoration: none; color: var(--text-2); font-size: .94rem; }
.site-footer li a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 26px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
}
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- admin */
.admin { background: var(--bg); }
.admin-wrap { padding-top: 24px; padding-bottom: 60px; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.admin-head h1 { font-size: 1.6rem; margin: 0; }
.admin-login { max-width: 340px; margin: 14vh auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: 14px; box-shadow: var(--shadow); }
.admin-login input, .admin textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; }
.admin-error { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.admin-flash { padding: 12px 16px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.stat b { font-size: 1.45rem; letter-spacing: -0.02em; }
.stat span { font-size: .82rem; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.admin-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
.admin-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; min-width: 0; }
.admin-box h2 { font-size: 1.1rem; }
.admin-box form .btn { margin: 10px 0 18px; }
.admin-log { font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; max-height: 520px; overflow: auto; }
.admin-log div { padding: 3px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
.log-error { color: var(--accent); }
.log-warn { color: #b7791f; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table .num { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article { max-width: 780px; margin: 0 auto; }
  .sidebar { display: none; }
  .toc-mobile { display: block; }
  .search-header { width: 220px; }
}
@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    padding: 10px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 13px 12px; font-size: 1.02rem; }
  .menu-toggle { display: inline-grid; }
  .search-header { width: auto; flex: 1; margin-left: 4px; }
  .logo-text { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .admin-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --header-h: 62px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 44px 0 52px; }
  .search-hero input { height: 54px; padding-right: 16px; }
  .search-hero .btn, .search-page .btn { display: none; }
  .search-page input { padding-right: 16px; }
  .home-section { margin: 40px 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { padding: 14px; }
  .cards-grid { grid-template-columns: 1fr; }
  .popular-list { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .answer-box { padding: 18px 18px 16px; }
  .answer-text { font-size: 1.06rem; }
  .prose { font-size: 1.04rem; }
  .facts, .bottom-line { padding: 20px; }
  .paa-item summary { padding: 16px 16px; }
  .paa-answer { padding: 0 16px 18px; }
  .prev-next { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .list-icon { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 16px; }
  .figure { margin-left: -16px; margin-right: -16px; }
  .figure img { border-radius: 0; }
  .figure figcaption { padding: 0 16px; }
  .q-list li { padding: 12px 16px; }
  .section-head { flex-wrap: wrap; }
  .page-btn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .sidebar, .share, .feedback, .related, .to-top, .ad, .progress, .toc-mobile, .prev-next { display: none !important; }
  body { background: #fff; color: #000; }
  .paa-item:not([open]) .paa-answer { display: block; }
}
