:root {
  color-scheme: dark;
  --paper: var(--bg, #080f17);
  --secondary: var(--muted, #a2afab);
  --rule: var(--line, #2c3b48);
  --panel: var(--surface, #13202c);
  --focus: var(--accent, #d9eea6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}
:root[data-theme="light"] { color-scheme: light; --paper: #fcfbf8; --ink: #242a27; --secondary: #59645e; --rule: #dedfd8; --panel: #f0f2ec; --accent: #41652d; --focus: #41652d; }
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button, input, a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button { border: 0; }
.skip-link { position: absolute; z-index: 20; top: -90px; left: 20px; background: var(--ink); color: var(--paper); padding: 12px 18px; }
.skip-link:focus { top: 12px; }
.site-header { max-width: 1180px; min-height: 98px; margin: 0 auto; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); flex-shrink: 0; width: 210px; height: 50px; overflow: hidden; }
.brand-wordmark { width: 210px; max-width: 100%; flex-shrink: 0; }
:root[data-theme="light"] .brand-wordmark { filter: brightness(.27) sepia(.25) hue-rotate(50deg); }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.publisher { color: var(--secondary); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.site-nav { display: flex; align-items: center; flex-shrink: 0; gap: 24px; }
.site-nav > a { font-size: 14px; color: var(--secondary); text-decoration: none; white-space: nowrap; }
.site-nav > a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; font-weight: 650; }
.site-nav > .nav-subscribe, .site-nav > .nav-subscribe[aria-current] { background: var(--accent); color: var(--paper); padding: 8px 15px; border-radius: 5px; font-weight: 700; text-decoration:none; }
.subscribe-form { margin-top: 25px; }
.subscribe-form > label { display: block; font-size: 13px; margin-bottom: 8px; color: var(--secondary); }
.subscribe-input-row { display: flex; gap: 10px; }
.subscribe-input-row input { width: 100%; min-width: 0; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: 12px 14px; font-size: 15px; border-radius: 5px; }
.subscribe-input-row button { flex-shrink: 0; background: var(--accent); color: var(--paper); border-radius: 5px; padding: 12px 18px; font-weight: 700; font-size: 14px; }
.subscribe-input-row button:disabled { opacity: .6; cursor: wait; }
.subscribe-consents { display: grid; gap: 10px; margin-top: 17px; }
.subscribe-consents label { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.7; }
.subscribe-consents input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.subscribe-consents small { font-size: 10px; color: var(--secondary); margin-left: 4px; }
.subscribe-note, .subscribe-status { font-size: 12px; color: var(--secondary); line-height: 1.8; margin: 14px 0 0; }
.subscribe-status:empty { display: none; }
.subscribe-status[data-error] { color: #efb275; }
.subscribe-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: transparent; color: var(--secondary); border-radius: 50%; }
.theme-toggle:hover { background: var(--panel); color: var(--accent); }
.archive-shell, .reading-shell { width: 100%; max-width: 792px; margin: 0 auto; padding: 50px 36px 72px; min-width: 0; }
.reading-shell { font-size: 18px; line-height: 1.85; }
.archive-heading { margin-bottom: 28px; padding: 32px; background: linear-gradient(135deg, #172938, #111e2a); border-radius: 24px; }
:root[data-theme="light"] .archive-heading { background: var(--panel); }
.archive-heading h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.4; font-weight: 650; letter-spacing: -.05em; margin: 0 0 22px; }
.archive-heading h1 em { color: var(--accent); font-style: normal; }
.eyebrow { display: flex; align-items: center; gap: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #d9eea610; }
.publisher-link { font-size: 11px; text-decoration: none; }
.archive-heading > p:not(.eyebrow) { font-size: 17px; line-height: 1.75; color: var(--secondary); margin: 0; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: .14em; font-weight: 600; margin: 0 0 15px; }
.archive-count { color: var(--secondary); font-size: 13px; margin: 0; padding: 16px 0; }
.issue-list, .search-results { display: grid; gap: 16px; }
.issue-card { padding: 28px; background: var(--panel); border-radius: 20px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--secondary); font-size: 13px; margin-bottom: 14px; }
.sample-label { color: var(--secondary); }
.issue-card h2 { font-size: 28px; font-weight: 650; letter-spacing: -.04em; line-height: 1.5; margin: 0 0 12px; }
.issue-card h2 a { color: var(--ink); text-decoration: none; }
.issue-card h2 a:hover { color: var(--accent); }
.issue-card > p { color: var(--secondary); font-size: 17px; line-height: 1.85; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.tag { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); background: color-mix(in srgb, var(--ink) 4%, transparent); border: 1px solid transparent; border-radius: 5px; padding: 5px 10px; font-size: 12px; line-height: 1.6; text-decoration: none; text-align: left; max-width: 100%; overflow-wrap: anywhere; }
.tag:hover, .tag.is-selected { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.tag-count { opacity: .7; font-size: 11px; }
.article-header h1 { font-size: 38px; line-height: 1.35; letter-spacing: -.055em; font-weight: 700; margin: 0 0 19px; }
.article-deck { color: var(--secondary); font-size: 20px; line-height: 1.75; margin: 0; }
.article-toc { font-size: 14px; margin: 30px 0 32px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.article-toc summary { color: var(--ink); font-weight: 600; }
.article-toc ol { padding-left: 24px; margin: 14px 0 0; }
.article-toc li { margin: 6px 0; }
.article-intro { margin: 0 0 28px; }
.prose { min-width: 0; }
.prose p { margin: 0 0 22px; }
.prose h2 { font-size: 26px; line-height: 1.5; font-weight: 650; letter-spacing: -.04em; margin: 48px 0 21px; scroll-margin-top: 28px; }
.prose h3 { font-size: 20px; font-weight: 650; line-height: 1.65; letter-spacing: -.025em; margin: 32px 0 16px; }
.prose .section-number { color: var(--accent); font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: .05em; display: block; margin-bottom: 9px; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 25px; margin: 22px 0; }
.prose li { padding-left: 3px; margin: 10px 0; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 27px 0; padding: 6px 0 6px 20px; border-left: 3px solid var(--accent); color: var(--secondary); }
.prose blockquote p { margin-bottom: 12px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.prose code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .86em; overflow-wrap: anywhere; word-break: break-word; color: var(--accent); }
.prose pre { margin: 26px 0; padding: 21px 22px; max-width: 100%; overflow-x: auto; background: var(--panel); border-radius: 4px; font-size: 14px; line-height: 1.8; white-space: pre; overscroll-behavior-x: contain; }
.prose pre code { font-size: inherit; color: var(--ink); white-space: inherit; overflow-wrap: normal; word-break: normal; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; margin: 27px 0; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.8; table-layout: auto; }
.prose th { font-weight: 600; text-align: left; padding: 11px 18px 11px 0; border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.prose td { vertical-align: top; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--rule); }
.prose th:last-child, .prose td:last-child { padding-right: 0; }
.prose td:first-child { min-width: 95px; }
.prose table td code { font-size: .9em; }
.article-figure { margin: 30px 0; }
.image-zoom { display: block; text-decoration: none; border-radius: 12px; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.image-zoom img { width: 100%; }
.figure-tools { display: flex; justify-content: flex-end; padding-top: 7px; }
.figure-tools a { font-size: 12px; text-decoration: none; }
.article-figure figcaption { color: var(--secondary); font-size: 13px; line-height: 1.8; margin: 7px 0 0; }
.math.display { display: block; max-width: 100%; overflow-x: auto; padding: 9px 0; font-size: 1.02em; }
.katex-display { overflow-y: hidden; }
.prose details { padding: 18px 20px; margin: 24px 0; background: var(--panel); border-radius: 4px; }
.prose details summary { color: var(--accent); font-size: 15px; font-weight: 600; }
.prose details p:first-of-type { margin-top: 18px; }
.prose details p:last-child { margin-bottom: 0; }
.downloads { border-top: 1px solid var(--rule); margin-top: 44px; padding-top: 26px; }
.downloads h2 { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.download-links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; }
.article-bottom-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 14px; }
.article-bottom-nav a { text-decoration: none; }
.company-footer { --ink: #f3f0e8; --muted: #a2afab; --line: #2c3b48; --surface: #13202c; --accent: #d9eea6; color: var(--ink); font-size: 14px; line-height: 1.7; }
.company-footer a { color: inherit; text-decoration: none; }
.company-footer a:hover { color: var(--accent); }
.company-footer .business-info-link { color: var(--muted); text-decoration: underline; }
.company-footer .related-sites a[aria-current] { color: var(--accent); }
.search-form { margin-top: 26px; }
.search-form label { display: block; color: var(--secondary); font-size: 14px; margin-bottom: 9px; }
.search-row { display: flex; align-items: center; gap: 14px; }
.search-row input { flex: 1; width: 100%; min-width: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; padding: 12px 14px; }
.search-clear { flex-shrink: 0; background: transparent; color: var(--accent); font-size: 14px; padding: 10px 0; }
.search-shell .archive-count { margin-top: 22px; }
.empty-results { color: var(--secondary); padding: 30px 0; font-size: 16px; }
.tag-browser { margin-top: 40px; }
.tag-browser > h2 { font-size: 20px; font-weight: 600; margin: 0 0 26px; }
.tag-group { margin: 24px 0; }
.tag-group h3 { font-size: 13px; font-weight: 600; color: var(--secondary); margin: 0 0 11px; }
.tag-group .tags { margin: 0; }
.image-dialog { width: min(1640px, calc(100vw - 32px)); max-width: calc(100vw - 32px); height: min(1100px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow:hidden; border: 1px solid var(--rule); border-radius: 12px; color: var(--ink); background: var(--paper); }
.image-dialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.image-dialog::backdrop { background: rgba(0,0,0,.75); }
.image-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.image-dialog-toolbar a { text-decoration: none; }
.image-dialog-toolbar button { background: transparent; color: var(--ink); padding: 7px 3px; font-size: 14px; }
.image-dialog-viewport { overflow:hidden; min-height:0; min-width:0; width:100%; display:flex; align-items:center; justify-content:center; background:var(--panel); }
.image-dialog-viewport img { display:block; width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
.image-dialog-caption { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; font-size:13px; line-height:1.7; margin:12px 18px 17px; color:var(--secondary); }
.not-found { min-height: 45vh; }
@media (max-width: 700px) {
  .reading-shell { font-size: 17px; }
  .site-header { padding: 17px 24px; flex-wrap: wrap; gap: 12px 20px; }
  .brand { width: 175px; height: 44px; }
  .brand-wordmark { width: 175px; }
  .publisher { display: none; }
  .site-nav { gap: 18px; }
  .archive-shell, .reading-shell { padding: 35px 24px 48px; }
  .archive-heading, .issue-card { padding: 24px; border-radius: 20px; }
  .archive-heading h1 { font-size: 28px; }
  .issue-card h2 { font-size: 25px; }
  .article-header h1 { font-size: 30px; }
  .article-deck { font-size: 18px; }
  .prose h2 { font-size: 23px; }
  .prose h3 { font-size: 19px; }
  .prose pre { font-size: 13px; padding: 18px; }
  .prose table { font-size: 14px; }
  .image-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
}
@media (max-width: 380px) {
  .site-header { gap: 10px; }
  .brand { width: 162px; }
  .brand-wordmark { width: 162px; }
  .site-nav { margin-left: auto; }
  .site-nav { gap: 10px; }
  .brand-name { font-size: 18px; }
  .site-nav > a { font-size: 13px; }
  .theme-toggle { width: 28px; }
  .article-header h1 { font-size: 28px; }
}
@media (pointer: coarse) {
  .theme-toggle, .tag, .search-clear, .site-nav > a { min-height: 44px; }
  .site-nav > a { display: inline-flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { --paper: #fff; --ink: #111; --secondary: #444; --rule: #bbb; --panel: #f5f5f5; --accent: #29471e; }
  body { font-size: 12pt; background: #fff; }
  .site-header, .company-footer, .article-toc, .downloads, .article-bottom-nav, .figure-tools, .tags { display: none; }
  .reading-shell { max-width: none; padding: 0; }
  .prose table { min-width: 0; }
  .table-scroll, .prose pre { overflow: visible; }
  .prose pre { white-space: pre-wrap; }
  .article-figure, .prose h2, .prose h3 { break-inside: avoid; }
}
.subscription-action { background:var(--accent); color:#080f17; border:0; border-radius:12px; padding:13px 20px; font:inherit; cursor:pointer; }
.subscription-action:disabled, .subscribe-form button:disabled { opacity:.65; cursor:wait; }
.subscription-panel { padding:28px 32px; border:1px solid var(--rule); border-radius:20px; background:var(--panel); }
.subscription-panel .subscribe-form { margin-top:0; }
@media(max-width:600px) { .subscription-panel { padding:24px 22px; } }
.subscribe-reset { background:transparent; border:1px solid var(--rule); border-radius:10px; color:var(--secondary); padding:8px 12px; cursor:pointer; }
.subscribe-form[data-state="waiting"] input { opacity:.65; cursor:wait; }
.subscribe-form[data-state="confirmed"] [data-subscribe-status] { color:var(--accent); font-weight:650; }
.subscription-help { margin:24px 0 0; padding-top:20px; border-top:1px solid var(--rule); font-size:14px; color:var(--secondary); }
