@import url("/assets/katex/katex.min.css");

:root {
  --canvas: #f8f9fb;
  --surface: #ffffff;
  --surface-soft: #f0f3f7;
  --ink: #171b24;
  --muted: #697180;
  --line: #e1e5eb;
  --line-strong: #cbd1da;
  --accent: #4f82ed;
  --navy: #172b66;
  --warning: #8a641f;
  --danger: #a84747;
  --sans: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --accent-image: url("/assets/images/blue-navy-gradient.png");
}

* { box-sizing: border-box; }
html { background: var(--canvas); color: var(--ink); font-family: var(--sans); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { color: inherit; font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #dce7ff; color: var(--navy); }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.brand-logo { align-items: center; display: inline-flex; gap: 9px; justify-self: start; }
.brand-logo img { display: block; height: 34px; object-fit: contain; transition: transform 180ms ease; width: 34px; }
.brand-logo:hover img { transform: rotate(-3deg) scale(1.04); }
.brand-logo > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; margin: 0 0 12px; text-transform: uppercase; }
.muted { color: var(--muted); }

.primary-action, .secondary-action { align-items: center; border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: inline-flex; font-size: 13px; font-weight: 700; justify-content: center; min-height: 42px; padding: 0 18px; transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease; }
.primary-action { background-color: var(--navy); background-image: var(--accent-image); background-position: center; background-size: cover; box-shadow: 0 8px 22px rgba(23, 43, 102, .16); color: #fff; }
.primary-action:hover { box-shadow: 0 10px 28px rgba(23, 43, 102, .24); transform: translateY(-1px); }
.secondary-action { background: var(--surface); border-color: var(--line-strong); }
.secondary-action:hover { border-color: var(--accent); color: var(--navy); }
.danger-action { color: var(--danger); }
.danger-action:hover { border-color: var(--danger); color: var(--danger); }

/* Login */
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .7fr); min-height: 100svh; }
.login-intro { background-color: var(--navy); background-image: var(--accent-image); background-position: center; background-size: cover; color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; padding: clamp(30px, 5vw, 72px); }
.login-brand img { filter: brightness(0) invert(1); height: 48px; width: 48px; }
.login-intro h1 { font-size: clamp(66px, 9vw, 132px); font-weight: 760; letter-spacing: -.075em; line-height: .9; margin: auto 0; }
.login-form-wrap { align-items: center; background: var(--surface); display: flex; justify-content: center; padding: 48px; }
.login-form { display: grid; gap: 22px; max-width: 380px; width: 100%; }
.form-heading { border-top: 4px solid var(--accent); padding-top: 26px; }
.form-heading h2 { font-size: 36px; font-weight: 740; letter-spacing: -.045em; margin: 0; }
.login-form label, .document-fields label { display: grid; gap: 8px; }
.login-form label > span, .document-fields label > span, .document-fields .field-label, .body-field > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.login-form input, .document-fields input, .document-fields textarea { background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; min-height: 46px; padding: 8px 0; width: 100%; }
.login-form input:focus, .document-fields input:focus, .document-fields textarea:focus { border-color: var(--accent); outline: 0; }
.login-form .primary-action { margin-top: 8px; width: 100%; }
.form-error { border-left: 3px solid var(--danger); color: var(--danger); font-size: 13px; margin: 0; padding: 4px 0 4px 12px; }

/* Admin chrome */
.admin-shell { background: var(--canvas); }
.admin-header { align-items: center; background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; height: 68px; padding: 0 32px; position: sticky; top: 0; z-index: 30; }
.header-section { color: var(--muted); font-size: 12px; }
.admin-header nav { align-items: center; display: flex; gap: 24px; justify-content: flex-end; }
.admin-header nav a, .admin-header nav button { background: none; border: 0; cursor: pointer; font-size: 12px; padding: 8px 0; }
.admin-header nav form { margin: 0; }
.admin-header nav button { color: var(--muted); }
.admin-content { margin: 0 auto; max-width: 1260px; padding: 70px 40px 100px; }

/* List */
.list-heading { align-items: end; display: grid; gap: 64px; grid-template-columns: 1fr minmax(520px, .9fr); margin-bottom: 58px; }
.list-heading h1 { font-size: clamp(44px, 5vw, 68px); font-weight: 750; letter-spacing: -.06em; line-height: 1; margin: 0 0 14px; }
.list-heading .muted { font-size: 13px; margin: 0; }
.list-heading-side { align-content: end; display: grid; gap: 20px; }
.list-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 26px; }
.list-tabs a { color: var(--muted); font-size: 12px; font-weight: 750; padding: 0 1px 10px; position: relative; transition: color 160ms ease; }
.list-tabs a::after { background: var(--accent); bottom: -1px; content: ""; height: 2px; left: 0; position: absolute; transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; width: 100%; }
.list-tabs a:hover { color: var(--navy); }
.list-tabs a[aria-current="page"] { color: var(--ink); }
.list-tabs a[aria-current="page"]::after { transform: scaleX(1); }
.archive-help { border-top: 1px solid var(--navy); color: var(--muted); font-size: 13px; margin: 0; padding-top: 18px; }
.new-post-form { align-items: end; border-top: 1px solid var(--navy); display: grid; gap: 18px; grid-template-columns: 1fr 1fr auto; padding-top: 18px; }
.new-post-form label { display: grid; gap: 7px; }
.new-post-form label span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.new-post-form input { background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); min-width: 0; padding: 8px 0 10px; }
.new-post-form input:focus { border-color: var(--accent); outline: 0; }
.post-list { border-top: 1px solid var(--navy); }
.post-list-labels, .post-row { align-items: center; display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 24px; }
.post-list-labels { color: var(--muted); font-size: 10px; letter-spacing: .1em; padding: 13px 0; text-transform: uppercase; }
.post-list-labels span:first-child { padding-left: 34px; }
.post-row { border-top: 1px solid var(--line); min-height: 82px; padding: 10px 0; position: relative; transition: background-color 160ms ease, padding 160ms ease; }
.post-row:hover { background: var(--surface); padding-left: 10px; padding-right: 10px; }
.status-dot { border-radius: 50%; height: 7px; left: 5px; position: absolute; width: 7px; }
.status-draft { background-color: #9299a5; }
.status-scheduled { background-color: var(--warning); }
.status-published { background-color: var(--accent); }
.status-archived { background-color: var(--navy); }
.post-row-main { display: grid; gap: 5px; padding-left: 34px; }
.post-row-main strong { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.post-row-main span, .post-row time, .status-label { color: var(--muted); font-size: 11px; }
.row-arrow { color: var(--accent); opacity: 0; transform: translateX(-5px); transition: opacity 160ms ease, transform 160ms ease; }
.post-row:hover .row-arrow { opacity: 1; transform: translateX(0); }
.empty-state { border-top: 1px solid var(--line); padding: 70px 34px; }
.empty-state p { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.empty-state span { color: var(--muted); font-size: 13px; }

/* Analytics */
.analytics-page { max-width: 1320px; }
.analytics-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 54px; }
.analytics-heading h1 { font-size: clamp(44px, 5vw, 68px); font-weight: 750; letter-spacing: -.06em; line-height: 1; margin: 0; }
.dashboard-actions { align-items: center; display: flex; gap: 10px; }
.analytics-kpis { border-bottom: 1px solid var(--navy); border-top: 1px solid var(--navy); display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); }
.analytics-kpis > div { display: grid; min-height: 176px; padding: 24px 28px 24px 0; }
.analytics-kpis > div + div { border-left: 1px solid var(--line); padding-left: 32px; }
.analytics-kpis span, .analytics-kpis small { color: var(--muted); font-size: 10px; }
.analytics-kpis > div > span { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.analytics-kpis strong { align-self: center; font-size: clamp(42px, 4.8vw, 68px); font-variant-numeric: tabular-nums; font-weight: 720; letter-spacing: -.065em; line-height: 1; }
.analytics-kpis .analytics-primary-kpi strong { color: var(--navy); font-size: clamp(60px, 7vw, 92px); }
.analytics-kpis small { align-self: end; }
.analytics-kpis small span { color: inherit; }
.analytics-kpis .trend-up { color: var(--accent); font-weight: 800; }
.analytics-kpis .trend-down { color: var(--danger); font-weight: 800; }
.analytics-kpis .trend-neutral { color: var(--muted); }
.analytics-scope { color: var(--muted); font-size: 10px; margin: 13px 0 0; text-align: right; }
.analytics-detail-grid { display: grid; gap: clamp(42px, 6vw, 88px); grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); padding-top: 68px; }
.analytics-chart { margin: 0; min-width: 0; }
.analytics-chart figcaption, .popular-paths > div { align-items: end; display: flex; justify-content: space-between; }
.analytics-chart figcaption > div:first-child { display: grid; gap: 5px; }
.analytics-chart figcaption strong, .popular-paths h2 { font-size: 20px; font-weight: 740; letter-spacing: -.03em; margin: 0; }
.analytics-chart figcaption span, .popular-paths > div > span { color: var(--muted); font-size: 10px; }
.chart-legend { align-items: center; display: flex; gap: 17px; }
.chart-legend span { align-items: center; display: inline-flex; gap: 7px; }
.chart-legend span::before { border-radius: 50%; content: ""; height: 7px; width: 7px; }
.chart-legend .visitor-legend::before { background: var(--accent); }
.chart-legend .view-legend::before { background: var(--navy); opacity: .45; }
.analytics-chart svg { display: block; height: auto; margin-top: 34px; overflow: visible; width: 100%; }
.analytics-chart svg line { stroke: var(--line); stroke-width: 1; }
.analytics-chart-area { fill: rgba(79, 130, 237, .1); stroke: none; }
.analytics-chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.analytics-chart-visitors { stroke: var(--accent); stroke-width: 3; }
.analytics-chart-views { opacity: .48; stroke: var(--navy); stroke-dasharray: 4 7; stroke-width: 2; }
.analytics-chart circle { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.analytics-chart-labels { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 8px; }
.analytics-chart-labels span { display: grid; gap: 3px; text-align: center; }
.analytics-chart-labels strong { color: var(--muted); font-size: 9px; font-weight: 700; }
.analytics-chart-labels small { color: var(--navy); font-size: 9px; font-variant-numeric: tabular-nums; }
.popular-paths { min-width: 0; }
.popular-paths ol { border-top: 1px solid var(--navy); list-style: none; margin: 34px 0 0; padding: 0; }
.popular-paths li { border-bottom: 1px solid var(--line); }
.popular-paths li a { align-items: center; display: grid; gap: 10px; grid-template-columns: 24px minmax(0, 1fr) auto 14px; min-height: 58px; transition: background-color 160ms ease, padding 160ms ease; }
.popular-paths li a:hover { background: var(--surface); padding-left: 8px; padding-right: 8px; }
.popular-paths li span, .popular-paths li small { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.popular-paths li strong { font-size: 12px; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-paths li i { color: var(--accent); font-size: 11px; font-style: normal; opacity: 0; transform: translateX(-4px); transition: opacity 160ms ease, transform 160ms ease; }
.popular-paths li a:hover i { opacity: 1; transform: translateX(0); }
.popular-paths .analytics-empty { color: var(--muted); display: block; font-size: 12px; padding: 24px 0; }
.content-overview { border-top: 1px solid var(--navy); margin-top: 86px; padding-top: 28px; }
.content-overview > header { align-items: end; display: flex; justify-content: space-between; }
.content-overview > header .eyebrow { margin-bottom: 8px; }
.content-overview h2 { font-size: 30px; font-weight: 740; letter-spacing: -.045em; margin: 0; }
.content-overview > header > a { border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; padding-bottom: 4px; transition: border-color 160ms ease, color 160ms ease; }
.content-overview > header > a:hover { border-color: var(--accent); color: var(--navy); }
.content-status-strip { border-bottom: 1px solid var(--navy); display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 30px; }
.content-status-strip a { align-items: end; display: flex; justify-content: space-between; min-height: 92px; padding: 18px 24px 18px 0; transition: background-color 160ms ease, padding 160ms ease; }
.content-status-strip a + a { border-left: 1px solid var(--line); padding-left: 24px; }
.content-status-strip a:hover { background: var(--surface); padding-left: 12px; padding-right: 12px; }
.content-status-strip a + a:hover { padding-left: 36px; }
.content-status-strip span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.content-status-strip strong { color: var(--navy); font-size: 38px; font-variant-numeric: tabular-nums; font-weight: 720; letter-spacing: -.05em; line-height: 1; }
.content-workspace { display: grid; gap: clamp(48px, 7vw, 96px); grid-template-columns: minmax(260px, .72fr) minmax(0, 1.55fr); padding-top: 62px; }
.content-workspace h3 { font-size: 18px; font-weight: 740; letter-spacing: -.025em; margin: 0; }
.next-scheduled-post, .next-scheduled-empty { border-top: 1px solid var(--navy); display: grid; margin-top: 22px; min-height: 190px; padding: 22px 0; }
.next-scheduled-post > span, .next-scheduled-empty > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.next-scheduled-post strong, .next-scheduled-empty strong { align-self: center; font-size: 24px; font-weight: 720; letter-spacing: -.035em; line-height: 1.35; }
.next-scheduled-post time { align-self: end; color: var(--accent); font-size: 12px; font-weight: 750; }
.next-scheduled-post i { align-self: end; color: var(--accent); font-style: normal; justify-self: end; transition: transform 160ms ease; }
.next-scheduled-post:hover i { transform: translate(3px, -3px); }
.next-scheduled-empty a { align-self: end; color: var(--muted); font-size: 11px; }
.recent-work > div:first-child { align-items: baseline; display: flex; justify-content: space-between; }
.recent-work > div:first-child span { color: var(--muted); font-size: 9px; }
.dashboard-post-list { border-top: 1px solid var(--navy); margin-top: 22px; }
.dashboard-post-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 8px minmax(0, 1fr) auto 14px; min-height: 68px; padding: 9px 2px; transition: background-color 160ms ease, padding 160ms ease; }
.dashboard-post-row:hover { background: var(--surface); padding-left: 10px; padding-right: 10px; }
.dashboard-post-row .status-dot { left: auto; position: static; }
.dashboard-post-row > span:not(.status-dot) { display: grid; gap: 4px; }
.dashboard-post-row strong { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-post-row small, .dashboard-post-row time { color: var(--muted); font-size: 9px; }
.dashboard-post-row i { color: var(--accent); font-size: 11px; font-style: normal; opacity: 0; transform: translateX(-4px); transition: opacity 160ms ease, transform 160ms ease; }
.dashboard-post-row:hover i { opacity: 1; transform: translateX(0); }
.dashboard-empty { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; margin: 0; padding: 28px 0; }
.analytics-heading, .analytics-kpis, .analytics-detail-grid, .content-overview { animation: dashboard-enter 440ms cubic-bezier(.2, .75, .2, 1) both; }
.analytics-kpis { animation-delay: 55ms; }
.analytics-detail-grid { animation-delay: 110ms; }
.content-overview { animation-delay: 165ms; }
.analytics-chart-line { animation: chart-draw 720ms 180ms ease-out both; stroke-dashoffset: 0; }

@keyframes dashboard-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chart-draw { from { opacity: 0; stroke-dashoffset: 28; } to { opacity: 1; stroke-dashoffset: 0; } }

/* Editor */
.editor-page { min-height: calc(100svh - 68px); }
.editor-toolbar { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; min-height: 72px; padding: 12px 32px; }
.editor-identity, .editor-actions { align-items: center; display: flex; gap: 14px; }
.editor-actions { flex-wrap: wrap; justify-content: flex-end; }
.editor-actions form { margin: 0; }
.editor-identity { color: var(--muted); font-size: 11px; }
.editor-identity > a { color: var(--ink); font-weight: 700; }
.status-chip { border-radius: 999px; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 5px 9px; }
.notice { background: #e8efff; border-bottom: 1px solid #c9d8fa; color: var(--navy); font-size: 12px; margin: 0; padding: 10px 32px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100svh - 140px); }
.editor-form { background: var(--surface); border-right: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.document-fields { border-bottom: 1px solid var(--line); display: grid; gap: 26px; grid-template-columns: minmax(240px, 1.5fr) minmax(190px, 1fr); padding: 30px 36px 28px; }
.document-fields .title-field, .document-fields .tags-field, .document-fields .schedule-field { grid-column: 1 / -1; }
.document-fields .schedule-field { max-width: 320px; }
.title-field input { font-size: 30px; font-weight: 730; letter-spacing: -.035em; }
.document-fields textarea { min-height: 46px; resize: vertical; }
.tags-field { display: grid; gap: 8px; }
.tag-editor { align-items: center; border-bottom: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: 7px; min-height: 48px; padding: 6px 0; transition: border-color 160ms ease; }
.tag-editor:focus-within { border-color: var(--accent); }
.document-fields .tag-editor input { border: 0; flex: 1 1 180px; min-height: 34px; min-width: 140px; padding: 4px 2px; width: auto; }
.tag-list { display: contents; }
.tag-chip { align-items: center; background: var(--surface-soft); border: 1px solid transparent; border-radius: 999px; color: var(--navy); cursor: pointer; display: inline-flex; font-size: 12px; font-weight: 700; gap: 6px; line-height: 1; max-width: 100%; min-height: 30px; padding: 6px 9px 6px 11px; transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease; }
.tag-chip:hover { background: #e8efff; border-color: #c9d8fa; transform: translateY(-1px); }
.tag-chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-chip > span:last-child:not(:first-child) { color: var(--muted); font-size: 15px; font-weight: 500; }
.tag-chip--readonly { cursor: default; padding-right: 11px; }
.tag-chip--readonly:hover { background: var(--surface-soft); border-color: transparent; transform: none; }
.tags-field > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.slug-input { align-items: center; border-bottom: 1px solid var(--line-strong); display: flex; }
.slug-input span { color: var(--muted); font-size: 12px; }
.slug-input input { border: 0; }
.seo-fields { border-top: 1px solid var(--line); grid-column: 1 / -1; padding-top: 18px; }
.seo-fields summary { color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.seo-fields > div { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; padding-top: 22px; }
.seo-fields > div label:last-child { grid-column: 1 / -1; }
.body-field { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 24px 36px 36px; }
.body-field > span { margin-bottom: 14px; }
#body-input { background: transparent; border: 0; font-family: var(--mono); font-size: 14px; line-height: 1.75; min-height: 500px; outline: 0; resize: none; width: 100%; }
.preview-pane { background: var(--canvas); min-width: 0; overflow: auto; padding: 24px 48px 80px; }
.pane-label { align-items: center; border-bottom: 1px solid var(--line); color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; letter-spacing: .08em; padding-bottom: 14px; text-transform: uppercase; }
.preview-pane .prose { margin: 48px auto 0; max-width: 680px; }

/* Rendered markdown */
.prose { color: #252a34; font-size: 17px; line-height: 1.85; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--ink); font-family: var(--sans); font-weight: 740; letter-spacing: -.04em; line-height: 1.25; text-wrap: balance; }
.prose h1 { font-size: 2.1em; margin: 2.4em 0 .75em; }
.prose h2 { font-size: 1.58em; margin: 2.35em 0 .8em; }
.prose h3 { font-size: 1.25em; margin: 2.3em 0 .7em; }
.prose h4 { font-size: 1.05em; letter-spacing: -.025em; margin: 2em 0 .65em; }
.prose h5, .prose h6 { color: var(--navy); font-size: .78em; letter-spacing: .09em; margin: 2em 0 .7em; text-transform: uppercase; }
.prose p { margin: 0 0 1.5em; }
.prose strong { color: var(--ink); font-weight: 760; }
.prose em { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 30%, transparent); text-decoration-thickness: 5px; text-underline-offset: -2px; }
.prose a { color: var(--accent); font-weight: 650; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 42%, transparent); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 160ms ease, text-decoration-color 160ms ease; }
.prose a:hover { color: var(--navy); text-decoration-color: currentColor; }
.prose a[data-footnote-ref] { align-items: center; background: #e7eeff; border: 1px solid #cfdbf8; border-radius: 999px; color: var(--navy); display: inline-flex; font-size: .68em; font-variant-numeric: tabular-nums; font-weight: 800; height: 1.55em; justify-content: center; line-height: 1; margin: 0 .12em; min-width: 1.55em; padding: 0 .35em; text-decoration: none; transform: translateY(-.38em); transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease; vertical-align: baseline; }
.prose a[data-footnote-ref]:hover, .prose a[data-footnote-ref][aria-expanded="true"] { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateY(-.45em); }
.prose a[data-footnote-ref]:focus-visible { box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px rgba(79, 130, 237, .7); outline: 0; }
.article-toc { border-bottom: 1px solid var(--line); border-top: 1px solid var(--navy); margin: 0 0 3.7em; padding: 18px 0 20px; }
.article-toc-heading { align-items: baseline; display: flex; justify-content: space-between; margin-bottom: 14px; }
.article-toc-heading strong { color: var(--navy); font-size: .72em; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.article-toc-heading > span { color: var(--muted); font-size: .58em; }
.article-toc ol { list-style: none; margin: 0; padding: 0; }
.article-toc ol ol { margin: 2px 0 3px 2.95em; }
.article-toc li { padding: 0; }
.article-toc li + li { margin-top: 2px; }
.article-toc a { align-items: baseline; color: #394255; display: grid; font-size: .82em; font-weight: 620; gap: 8px; grid-template-columns: 2.45em minmax(0, 1fr); line-height: 1.55; min-height: 32px; padding: 4px 6px 4px 0; text-decoration: none; transition: color 150ms ease, padding-left 150ms ease; }
.article-toc a:hover, .article-toc a:focus-visible { color: var(--accent); padding-left: 5px; }
.article-toc-number { color: var(--accent); font-family: var(--mono); font-size: .78em; font-variant-numeric: tabular-nums; font-weight: 750; }
.prose h2[id], .prose h3[id] { align-items: baseline; display: grid; gap: .62em; grid-template-columns: auto minmax(0, 1fr); }
.article-heading-number { color: var(--accent); font-family: var(--mono); font-size: .5em; font-variant-numeric: tabular-nums; font-weight: 760; letter-spacing: 0; line-height: 1; white-space: nowrap; }
.article-heading-title { min-width: 0; }
.reader-prose h2[id], .reader-prose h3[id] { scroll-margin-top: 104px; }
.prose ul, .prose ol { margin: 0 0 1.65em; padding-left: 1.4em; }
.prose li { padding-left: .35em; }
.prose li + li { margin-top: .48em; }
.prose li::marker { color: var(--accent); font-size: .82em; font-weight: 800; }
.prose li > ul, .prose li > ol { margin: .55em 0 .2em; }
.prose li > p { margin: .4em 0; }
.prose code { background: #e9edf3; border: 1px solid #dde2e9; border-radius: 5px; color: var(--navy); font-family: var(--mono); font-size: .83em; padding: .14em .38em; }
.prose pre { background: #111d42; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; box-shadow: 0 18px 42px rgba(23, 43, 102, .12); color: #f5f7ff; line-height: 1.72; margin: 2.2em 0; overflow-x: auto; padding: 24px 26px; scrollbar-color: #5f75ad transparent; scrollbar-width: thin; }
.prose pre code { background: none; border: 0; color: inherit; font-size: .82em; padding: 0; }
.prose del { color: var(--muted); text-decoration-color: color-mix(in srgb, var(--danger) 68%, transparent); text-decoration-thickness: 1.5px; }
.prose hr { background: linear-gradient(90deg, var(--accent) 0 42px, var(--line) 42px 100%); border: 0; height: 1px; margin: 3.4em 0; }
.prose img { border-radius: 10px; box-shadow: 0 18px 48px rgba(23, 43, 102, .13); display: block; height: auto; margin: 2.4em auto; max-width: 100%; }
.prose a img { transition: box-shadow 180ms ease, transform 180ms ease; }
.prose a:hover img { box-shadow: 0 22px 56px rgba(23, 43, 102, .2); transform: translateY(-2px); }
.prose table { border-collapse: separate; border-spacing: 0; font-size: .9em; line-height: 1.6; margin: 2.35em 0; table-layout: fixed; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid var(--line); overflow-wrap: anywhere; padding: 13px 16px; text-align: left; vertical-align: top; }
.prose th { background: #edf1f7; border-bottom-color: var(--line-strong); color: var(--navy); font-size: .75em; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.prose th:first-child { border-top-left-radius: 8px; }
.prose th:last-child { border-top-right-radius: 8px; }
.prose tbody tr { transition: background-color 160ms ease; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.prose tbody tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.prose tbody tr:last-child td:last-child { border-bottom-right-radius: 8px; }
.prose .contains-task-list { list-style: none; padding-left: 0; }
.prose .task-list-item { align-items: baseline; display: flex; gap: 10px; padding-left: 0; }
.prose .task-list-item + .task-list-item { margin-top: .52em; }
.prose .task-list-item input[type="checkbox"] { appearance: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 4px; flex: 0 0 auto; height: 17px; margin: 0; position: relative; top: 3px; width: 17px; }
.prose .task-list-item input[type="checkbox"]:checked { background-color: var(--navy); background-image: var(--accent-image); background-position: center; background-size: cover; border-color: transparent; }
.prose .task-list-item input[type="checkbox"]:checked::after { border: solid #fff; border-width: 0 1.5px 1.5px 0; content: ""; height: 7px; left: 5px; position: absolute; top: 2px; transform: rotate(45deg); width: 3px; }
.prose blockquote { background: linear-gradient(90deg, rgba(79, 130, 237, .09), rgba(79, 130, 237, .025)); border-left: 3px solid var(--accent); color: #465064; font-size: 1.04em; margin: 2.35em 0; padding: 24px 26px 24px 28px; position: relative; }
.prose blockquote::before { color: color-mix(in srgb, var(--accent) 35%, transparent); content: "“"; font-family: Georgia, serif; font-size: 48px; left: 12px; line-height: 1; position: absolute; top: 7px; }
.prose blockquote > * { position: relative; }
.prose blockquote > :last-child { margin-bottom: 0; }
.directive { background: linear-gradient(110deg, rgba(79, 130, 237, .1), rgba(79, 130, 237, .025)); border-left: 3px solid var(--accent); margin: 2.35em 0; padding: 21px 24px; }
.directive::before { color: var(--accent); content: attr(data-directive); display: block; font-size: 10px; font-weight: 850; letter-spacing: .14em; margin-bottom: 9px; text-transform: uppercase; }
.directive > :last-child { margin-bottom: 0; }
.directive--tip { background: linear-gradient(110deg, rgba(40, 138, 105, .1), rgba(40, 138, 105, .025)); border-color: #288a69; }
.directive--tip::before { color: #23785d; }
.directive--warning { background: linear-gradient(110deg, rgba(138, 100, 31, .12), rgba(138, 100, 31, .025)); border-color: var(--warning); }
.directive--warning::before { color: var(--warning); }
.directive--unsupported { background: linear-gradient(110deg, rgba(168, 71, 71, .1), rgba(168, 71, 71, .02)); border-color: var(--danger); }
.directive--unsupported::before { color: var(--danger); content: "unsupported: " attr(data-directive); }
.prose .katex { color: var(--navy); font-size: 1.06em; }
.prose .katex-display { background: linear-gradient(115deg, rgba(23, 43, 102, .055), rgba(79, 130, 237, .025)); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); margin: 2.5em 0; overflow-x: auto; overflow-y: hidden; padding: 28px 20px; scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
.prose .katex-display > .katex { font-size: 1.16em; min-width: max-content; }
.prose .katex-error { background: rgba(168, 71, 71, .08); border-bottom: 1px dashed var(--danger); color: var(--danger) !important; font-family: var(--mono); font-size: .85em; padding: .1em .25em; }
.prose section[data-footnotes] { border-top: 1px solid var(--navy); color: var(--muted); font-size: .86em; margin-top: 4.4em; padding-top: 1.5em; }
.prose section[data-footnotes]::before { color: var(--navy); content: "각주"; display: block; font-size: .72em; font-weight: 850; letter-spacing: .14em; margin-bottom: 1.25em; text-transform: uppercase; }
.prose section[data-footnotes] ol { margin-bottom: 0; padding-left: 1.65em; }
.prose section[data-footnotes] li { padding-left: .55em; }
.prose section[data-footnotes] li + li { margin-top: .8em; }
.prose section[data-footnotes] p { margin: 0; }
.prose a[data-footnote-backref] { color: var(--muted); font-size: .82em; margin-left: .35em; text-decoration: none; }
.prose a[data-footnote-backref]:hover { color: var(--accent); }

/* Reader */
.reader-shell { background: var(--canvas); }
.preview-banner { align-items: center; background: var(--navy); color: #fff; display: flex; font-size: 11px; font-weight: 700; justify-content: space-between; letter-spacing: .06em; padding: 10px 24px; }
.reader-main { margin: 0 auto; max-width: 1100px; padding: 56px 40px 132px; }
.reader-main article { margin: 0 auto; max-width: 760px; }
.article-header { border-bottom: 1px solid var(--line); margin-bottom: 56px; padding-bottom: 48px; text-align: center; }
.article-progress { align-items: center; display: grid; gap: 12px; grid-template-columns: minmax(0, 440px) 36px; justify-content: center; margin: 0 auto 62px; }
.article-progress-track { background: #dfe4ec; border-radius: 999px; display: block; height: 3px; overflow: hidden; }
#reading-progress-bar { background-color: var(--navy); background-image: var(--accent-image); background-position: center; background-size: cover; display: block; height: 100%; transition: width 100ms linear; width: 0; }
.article-progress output { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.article-meta { margin-bottom: 24px; }
.article-meta time { color: var(--muted); font-size: 11px; }
.article-header h1 { font-size: clamp(40px, 4vw, 54px); font-weight: 720; letter-spacing: -.06em; line-height: 1.14; margin: 0 auto; max-width: 880px; text-wrap: balance; }
.reader-prose { font-size: 18px; line-height: 1.95; }
.article-tag-footer { border-top: 1px solid var(--navy); display: grid; gap: 28px; grid-template-columns: 96px minmax(0, 1fr); margin-top: 76px; padding-top: 18px; }
.article-tag-footer > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; padding-top: 8px; text-transform: uppercase; }
.article-tag-footer > div { display: grid; gap: 0 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.article-tag-footer a { align-items: center; border-bottom: 1px solid var(--line); display: flex; font-size: 14px; font-weight: 720; justify-content: space-between; min-height: 42px; transition: border-color 160ms ease, color 160ms ease, padding 160ms ease; }
.article-tag-footer a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-tag-footer a > span:last-child { color: var(--accent); font-size: 11px; opacity: 0; transform: translate(-5px, 3px); transition: opacity 160ms ease, transform 160ms ease; }
.article-tag-footer a:hover, .article-tag-footer a:focus-visible { border-color: var(--accent); color: var(--navy); padding-left: 6px; }
.article-tag-footer a:hover > span:last-child, .article-tag-footer a:focus-visible > span:last-child { opacity: 1; transform: translate(0, 0); }
.footnote-popover { background: rgba(255, 255, 255, .98); border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: 8px; box-shadow: 0 22px 64px rgba(23, 43, 102, .2); color: var(--ink); max-height: min(340px, calc(100svh - 32px)); opacity: 0; overflow: auto; position: fixed; transform: translateY(-5px) scale(.985); transform-origin: top center; transition: opacity 140ms ease, transform 140ms ease, visibility 140ms step-end; visibility: hidden; width: min(360px, calc(100vw - 32px)); z-index: 80; }
.footnote-popover[data-open] { opacity: 1; transform: translateY(0) scale(1); transition: opacity 140ms ease, transform 140ms ease, visibility 0s; visibility: visible; }
.footnote-popover:focus { outline: 0; }
.footnote-popover > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 44px; padding: 0 12px 0 16px; }
.footnote-popover > header strong { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.footnote-popover > header button { align-items: center; background: transparent; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; display: inline-flex; font-size: 20px; height: 30px; justify-content: center; line-height: 1; padding: 0 0 2px; transition: background-color 140ms ease, color 140ms ease; width: 30px; }
.footnote-popover > header button:hover { background: var(--surface-soft); color: var(--ink); }
.footnote-popover > header button:focus-visible { background: var(--surface-soft); box-shadow: 0 0 0 2px rgba(79, 130, 237, .55); outline: 0; }
.footnote-popover-body { color: #3d4657; font-size: 14px; line-height: 1.75; padding: 16px; }
.footnote-popover-body > :first-child { margin-top: 0; }
.footnote-popover-body > :last-child { margin-bottom: 0; }
.footnote-popover-body p { margin: 0 0 .8em; }
.footnote-popover-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Errors */
.error-shell { align-items: center; background: var(--canvas); display: flex; justify-content: center; }
.error-shell main { max-width: 520px; padding: 40px; text-align: center; }
.error-shell main > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.error-shell h1 { font-size: 44px; font-weight: 750; letter-spacing: -.05em; margin: 18px 0; }
.error-shell p { color: var(--muted); }
.error-shell a { border-bottom: 1px solid var(--ink); display: inline-block; font-size: 12px; margin-top: 20px; padding-bottom: 4px; }

/* Public site */
.home-shell { background: var(--canvas); }
.public-header { align-items: center; background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(225, 229, 235, .9); display: flex; height: 80px; justify-content: space-between; padding: 0 clamp(20px, 4vw, 64px); position: sticky; top: 0; z-index: 20; }
.public-header-actions { align-items: center; display: flex; gap: 22px; }
.public-header nav { align-items: center; display: flex; gap: 28px; }
.public-header nav a { color: var(--muted); font-size: 12px; font-weight: 700; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.public-header nav a:hover { color: var(--navy); }
.public-header nav .cms-link { border: 1px solid var(--line-strong); border-radius: 999px; color: var(--navy); padding: 7px 11px; }
.public-header nav .cms-link:hover { background: var(--surface-soft); border-color: var(--accent); transform: translateY(-1px); }
.header-search { position: relative; }
.header-search summary { align-items: center; border-radius: 50%; color: var(--muted); cursor: pointer; display: flex; height: 34px; justify-content: center; list-style: none; transition: background-color 160ms ease, color 160ms ease, transform 160ms ease; width: 34px; }
.header-search summary::-webkit-details-marker { display: none; }
.header-search summary:hover, .header-search[open] summary { background: var(--surface-soft); color: var(--accent); transform: translateY(-1px); }
.header-search-icon { border: 1.5px solid currentColor; border-radius: 50%; height: 13px; position: relative; width: 13px; }
.header-search-icon::after { background: currentColor; bottom: -4px; content: ""; height: 1.5px; position: absolute; right: -3px; transform: rotate(45deg); transform-origin: center; width: 6px; }
.header-search-panel { align-items: center; animation: header-search-enter 160ms cubic-bezier(.2, .75, .2, 1) both; background: rgba(255, 255, 255, .98); border: 1px solid var(--line); border-top: 2px solid var(--accent); box-shadow: 0 18px 48px rgba(23, 43, 102, .12); display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; position: absolute; right: 0; top: calc(100% + 23px); width: min(320px, calc(100vw - 40px)); }
.header-search-panel input { appearance: none; background: transparent; border: 0; font-size: 14px; font-weight: 650; min-width: 0; outline: 0; padding: 8px 2px; width: 100%; }
.header-search-panel input::placeholder { color: #9299a5; font-weight: 520; }
.header-search-panel input::-webkit-search-cancel-button { cursor: pointer; }
.header-search-panel button { align-items: center; background: transparent; border: 0; color: var(--navy); cursor: pointer; display: inline-flex; font-size: 11px; font-weight: 800; gap: 8px; min-height: 34px; padding: 0 2px 0 8px; }
.header-search-panel button span { color: var(--accent); transition: transform 160ms ease; }
.header-search-panel button:hover span { transform: translateX(3px); }
.public-brand img { height: 36px; width: 36px; }
.public-section { margin: 0 auto; max-width: 1180px; padding: clamp(82px, 9vw, 128px) clamp(20px, 4vw, 56px); }
.latest-section { padding-top: clamp(74px, 8vw, 112px); }
.section-heading { align-items: end; display: grid; gap: 18px; grid-template-columns: 8px 1fr auto; margin-bottom: 48px; }
.section-accent { background-color: var(--navy); background-image: var(--accent-image); background-position: center; background-size: cover; border-radius: 999px; display: block; height: 42px; width: 4px; }
.section-heading h1, .section-heading h2 { font-size: clamp(42px, 5vw, 64px); font-weight: 750; letter-spacing: -.06em; line-height: .95; margin: 0; }
.section-heading p { color: var(--muted); font-size: 11px; margin: 0 0 3px; }
.search-summary { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--navy); display: flex; justify-content: space-between; min-height: 62px; padding: 0 4px; }
.search-summary p { color: var(--muted); font-size: 12px; margin: 0; }
.search-summary strong { color: var(--ink); font-size: 14px; }
.search-summary a { border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; padding-bottom: 3px; transition: border-color 160ms ease, color 160ms ease; }
.search-summary a:hover { border-color: var(--accent); color: var(--navy); }
.public-post-list { border-top: 1px solid var(--navy); }
.search-summary + .public-post-list { border-top: 0; }
.public-post-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 24px; grid-template-columns: 52px minmax(0, 1fr) 130px 24px; min-height: 112px; padding: 20px 4px; transition: background-color 180ms ease, padding 180ms ease; }
.public-post-row:hover { background: var(--surface); padding-left: 14px; padding-right: 14px; }
.post-index { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.public-post-row > span:nth-child(2) { display: grid; gap: 8px; }
.public-post-row strong { font-size: clamp(21px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.04em; }
.public-post-row small { color: var(--muted); font-size: 12px; }
.public-post-row time { color: var(--muted); font-size: 11px; }
.public-post-row:hover .row-arrow { opacity: 1; transform: translateX(0); }
.tag-index-section { border-top: 1px solid var(--line); }
.public-tag-list { border-top: 1px solid var(--navy); display: grid; grid-template-columns: repeat(3, 1fr); }
.public-tag-list a { align-items: center; border-bottom: 1px solid var(--line); display: flex; font-size: 20px; font-weight: 700; justify-content: space-between; min-height: 78px; padding: 12px 20px 12px 0; transition: color 160ms ease, padding 160ms ease; }
.public-tag-list a:hover { color: var(--accent); padding-left: 8px; }
.public-tag-list a:not(:nth-child(3n)) { border-right: 1px solid var(--line); margin-right: 20px; }
.public-tag-list small { color: var(--accent); font-size: 10px; }
.public-empty { border-top: 1px solid var(--navy); color: var(--muted); margin: 0; padding: 44px 0; }
.public-footer { align-items: end; border-top: 1px solid var(--line); display: grid; gap: 24px; grid-template-columns: 1fr auto; min-height: 154px; padding: 54px clamp(20px, 4vw, 64px); }
.public-footer span { color: var(--muted); font-size: 11px; }
.footer-brand img { height: 44px; width: 44px; }
.tag-page { min-height: calc(100svh - 80px); }
.tag-page-heading { border-bottom: 1px solid var(--navy); display: grid; gap: 18px; grid-template-columns: 8px 1fr; margin-bottom: 68px; padding: 34px 0 58px; }
.tag-page-heading .section-accent { grid-row: 1 / 3; }
.tag-page-heading h1 { font-size: clamp(54px, 8vw, 104px); font-weight: 750; letter-spacing: -.075em; line-height: .9; margin: 0; }
.tag-page-heading > p:last-child { color: var(--muted); margin: 0; }

@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes header-search-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.article-header, .section-heading, .tag-page-heading { animation: page-enter 480ms cubic-bezier(.2, .75, .2, 1) both; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 32svh; padding: 28px; }
  .login-intro h1 { font-size: 54px; margin-top: 70px; }
  .login-form-wrap { min-height: 68svh; padding: 42px 28px; }
  .admin-header { grid-template-columns: 1fr 1fr; padding: 0 18px; }
  .header-section { display: none; }
  .admin-content { padding: 42px 20px 80px; }
  .list-heading { align-items: stretch; gap: 34px; grid-template-columns: 1fr; }
  .new-post-form { grid-template-columns: 1fr 1fr; }
  .new-post-form .primary-action { grid-column: 1 / -1; }
  .post-list-labels { display: none; }
  .post-row { grid-template-columns: minmax(0, 1fr) 64px 20px; }
  .post-row time { display: none; }
  .analytics-heading { align-items: start; flex-direction: column; gap: 16px; }
  .analytics-kpis { grid-template-columns: 1.15fr 1fr; }
  .analytics-kpis > div { min-height: 155px; padding: 22px 20px 22px 0; }
  .analytics-kpis > div + div { padding-left: 20px; }
  .analytics-kpis > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .analytics-kpis > div:nth-child(4) { border-top: 1px solid var(--line); }
  .analytics-kpis .analytics-primary-kpi strong { font-size: clamp(58px, 14vw, 86px); }
  .analytics-detail-grid { grid-template-columns: 1fr; padding-top: 54px; }
  .content-workspace { grid-template-columns: 1fr; }
  .editor-toolbar { align-items: flex-start; flex-direction: column; padding: 16px 18px; }
  .editor-identity > span:not(.status-chip) { display: none; }
  .editor-actions { gap: 8px; justify-content: flex-start; width: 100%; }
  .editor-actions .primary-action, .editor-actions .secondary-action { min-height: 38px; padding: 0 11px; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-form { border-bottom: 1px solid var(--line); border-right: 0; }
  .document-fields { grid-template-columns: 1fr; padding: 24px 20px; }
  .document-fields .title-field, .document-fields .tags-field, .document-fields .schedule-field, .seo-fields { grid-column: auto; }
  .seo-fields > div { grid-template-columns: 1fr; }
  .seo-fields > div label:last-child { grid-column: auto; }
  .body-field { min-height: 520px; padding: 22px 20px; }
  .preview-pane { padding: 24px 20px 70px; }
  .public-header { height: 64px; }
  .header-search-panel { top: calc(100% + 15px); }
  .public-brand img { height: 32px; width: 32px; }
  .reader-main { padding: 36px 20px 92px; }
  .article-progress { grid-template-columns: minmax(0, 1fr) 34px; margin-bottom: 48px; }
  .article-header { margin-bottom: 42px; padding-bottom: 38px; }
  .article-header h1 { font-size: clamp(36px, 10vw, 48px); }
  .reader-prose { font-size: 17px; line-height: 1.88; }
  .public-post-row { gap: 12px; grid-template-columns: 30px minmax(0, 1fr) 18px; min-height: 104px; }
  .public-post-row time { display: none; }
  .public-post-row strong { font-size: 21px; }
  .public-tag-list { grid-template-columns: 1fr; }
  .public-tag-list a:not(:nth-child(3n)) { border-right: 0; margin-right: 0; }
  .public-footer { align-items: start; grid-template-columns: 1fr; min-height: auto; }
}

@media (max-width: 520px) {
  .public-header-actions { gap: 14px; }
  .public-header nav { gap: 18px; }
  .article-header h1 { font-size: 36px; }
  .public-section { padding-left: 20px; padding-right: 20px; }
  .section-heading { grid-template-columns: 6px 1fr auto; }
  .section-accent { height: 34px; }
  .section-heading h1, .section-heading h2 { font-size: 40px; }
  .search-summary { align-items: flex-start; flex-direction: column; gap: 8px; justify-content: center; padding-bottom: 12px; padding-top: 12px; }
  .public-post-row { grid-template-columns: 24px minmax(0, 1fr) 16px; }
  .public-post-row small { line-height: 1.55; }
  .new-post-form { grid-template-columns: 1fr; }
  .new-post-form .primary-action { grid-column: auto; }
  .analytics-heading { margin-bottom: 36px; }
  .analytics-heading h1 { font-size: 48px; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions a { flex: 1; padding-left: 10px; padding-right: 10px; }
  .analytics-kpis { grid-template-columns: 1fr 1fr; }
  .analytics-kpis > div { min-height: 136px; padding-right: 12px; }
  .analytics-kpis > div + div { padding-left: 12px; }
  .analytics-kpis strong { font-size: 42px; }
  .analytics-kpis .analytics-primary-kpi strong { font-size: 58px; }
  .analytics-kpis small span { display: none; }
  .analytics-scope { line-height: 1.6; text-align: left; }
  .analytics-detail-grid { gap: 58px; }
  .analytics-chart figcaption { align-items: start; gap: 14px; }
  .popular-paths > div { align-items: start; flex-direction: column; gap: 6px; }
  .analytics-chart svg { margin-top: 24px; }
  .analytics-chart-labels strong { font-size: 8px; }
  .analytics-chart-labels small { display: none; }
  .content-overview { margin-top: 68px; }
  .content-status-strip { grid-template-columns: 1fr 1fr; }
  .content-status-strip a { min-height: 78px; padding-right: 14px; }
  .content-status-strip a + a { padding-left: 14px; }
  .content-status-strip a:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .content-status-strip a:nth-child(4) { border-top: 1px solid var(--line); }
  .content-status-strip a + a:hover { padding-left: 22px; }
  .content-workspace { gap: 52px; padding-top: 48px; }
  .dashboard-post-row { grid-template-columns: 8px minmax(0, 1fr) 14px; }
  .dashboard-post-row time { display: none; }
  .prose h1 { font-size: 1.82em; }
  .prose h2 { font-size: 1.4em; }
  .article-toc { margin-bottom: 3em; padding: 15px 0 17px; }
  .article-toc ol ol { margin-left: 1.5em; }
  .article-toc a { font-size: .86em; grid-template-columns: 2.4em minmax(0, 1fr); min-height: 34px; }
  .prose h2[id], .prose h3[id] { gap: .52em; }
  .reader-prose h2[id], .reader-prose h3[id] { scroll-margin-top: 82px; }
  .prose pre { border-radius: 8px; margin-left: -4px; margin-right: -4px; padding: 20px; }
  .prose th, .prose td { padding: 11px 10px; }
  .prose blockquote, .directive { margin-left: -4px; margin-right: -4px; padding-left: 22px; padding-right: 20px; }
  .prose .katex-display { margin-left: -4px; margin-right: -4px; padding: 22px 12px; }
  .article-tag-footer { gap: 10px; grid-template-columns: 1fr; margin-top: 60px; }
  .article-tag-footer > span { padding-top: 0; }
  .article-tag-footer > div { display: flex; flex-wrap: wrap; gap: 9px 22px; }
  .article-tag-footer a { border-bottom: 0; min-height: 30px; }
  .article-tag-footer a > span:last-child { display: none; }
  .article-tag-footer a:hover, .article-tag-footer a:focus-visible { padding-left: 0; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
  .footnote-popover { border-radius: 10px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px !important; max-height: min(46svh, 360px); right: 12px; top: auto !important; transform: translateY(10px); transform-origin: bottom center; width: auto; }
  .footnote-popover[data-open] { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
