/* Read mode: a source-led journal. Ivory paper, ink typography, cobalt links.
   The headline and indexed articles lead; real comparisons supply the content. */
body { background: var(--bg); font-size: 17px; line-height: 1.85; word-break: keep-all; }
main { max-width: 1240px; margin: auto; padding: 0 48px; }
h1, h2, h3 { line-height: 1.4; letter-spacing: -.035em; }
h1 { font-size: 42px; margin: 0 0 24px; font-weight: 800; }
h2 { font-size: 26px; margin: 44px 0 18px; }
h3 { font-size: 21px; margin: 28px 0 12px; }
p { margin: 0 0 20px; }
li { margin-block: 8px; }
img { max-width: 100%; }
a:hover { color: var(--accent-hover); }
/* Menu underlines sit on the header rule, so the current section reads as a tab. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--ink); margin-bottom: 56px; }
.site-brand { display: inline-flex; align-items: center; gap: 11px; min-height: 76px; color: var(--ink); text-decoration: none; }
.site-header ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.site-header li { margin: 0; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 76px; margin-bottom: -1px; font-size: 16px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
nav[aria-label="현재 위치"] { margin-bottom: 28px; color: var(--muted); font-size: 13px; }
nav[aria-label="현재 위치"] ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; margin: 0; padding: 0; }
nav[aria-label="현재 위치"] li { margin: 0; }
nav[aria-label="현재 위치"] li + li::before { content: '/'; color: var(--line); margin-right: 10px; }
/* The current page repeats the h1 below, so it stays available only to screen readers. */
nav[aria-label="현재 위치"] li:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
nav[aria-label="현재 위치"] a { color: var(--muted); text-decoration: none; }
nav[aria-label="현재 위치"] a:hover { color: var(--accent); }
/* The home page leads with articles, so its h1 names the site for screen readers only. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; font-weight: 700; text-decoration: none; }
.text-link::after { content: ''; width: 16px; height: 16px; background: currentColor; clip-path: polygon(0 44%, 78% 44%, 46% 12%, 54% 4%, 100% 50%, 54% 96%, 46% 88%, 78% 56%, 0 56%); transition: transform 180ms ease-out; }
.text-link:hover::after { transform: translateX(4px); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); margin-bottom: 28px; }
.section-title h2 { font-size: 23px; margin: 0; }
/* Home, after Yozm IT and Toss Feed: a lead story beside a numbered panel of the next notes. */
.home-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: stretch; padding-top: 8px; }
.home-top > .article-entry { min-height: 480px; padding: 48px; background: var(--ink); border-color: var(--ink); }
.home-top > .article-entry :is(h2 a, .entry-meta, p) { color: var(--paper); }
.home-top > .article-entry h2 { margin-top: auto; font-size: 40px; line-height: 1.3; margin-bottom: 20px; }
.home-top > .article-entry > p:not(.entry-meta) { font-size: 17px; -webkit-line-clamp: 3; max-width: 36em; opacity: .78; }
.home-top > .article-entry > .entry-meta { margin-top: 0; border-color: color-mix(in srgb, var(--paper) 24%, transparent); opacity: .78; }
.home-top > .article-entry:hover h2 a { color: var(--paper); text-decoration: underline; text-underline-offset: .18em; }
.home-top > .article-entry:only-child { grid-column: 1 / -1; }
.latest-panel { display: flex; flex-direction: column; padding: 32px 28px 20px; background: var(--paper); border: 1px solid var(--line); }
.latest-panel h2 { font-size: 21px; margin: 0 0 12px; }
.latest-panel ol { list-style: none; margin: 0 0 auto; padding: 0; counter-reset: note 1; }
.latest-panel li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); counter-increment: note; }
.latest-panel li::before { content: counter(note); grid-row: span 2; font-family: var(--font-mono); font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--accent); }
.latest-panel li h3 { font-size: 16px; line-height: 1.55; margin: 0 0 4px; }
.latest-panel li h3 a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.latest-panel li h3 a::after { content: ''; position: absolute; inset: 0; }
.latest-panel li:hover h3 a { color: var(--accent); }
.latest-panel li:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.latest-panel li h3 a:focus-visible { outline: none; }
.latest-panel li .entry-meta { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.latest-panel .text-link { align-self: flex-end; margin-top: 12px; }
.more-notes { margin-top: 72px; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.article-entry { position: relative; display: flex; flex-direction: column; min-height: 240px; padding: 28px; background: var(--paper); border: 1px solid var(--line); transition: border-color 180ms ease-out; }
.article-entry:hover { border-color: var(--ink); }
.article-entry:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.article-entry h2, .article-entry h3 { font-size: 22px; line-height: 1.45; margin: 0 0 12px; }
.article-entry h2 a, .article-entry h3 a { color: var(--ink); text-decoration: none; }
.article-entry h2 a::after, .article-entry h3 a::after { content: ''; position: absolute; inset: 0; }
.article-entry h2 a:focus-visible, .article-entry h3 a:focus-visible { outline: none; }
.article-entry:hover :is(h2, h3) a { color: var(--accent); }
.article-entry > p { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 0 0 24px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.article-entry > .entry-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--muted); }
.entry-meta time { font-family: var(--font-mono); font-size: 12px; }
.entry-empty { grid-column: 1 / -1; margin: 0; padding: 56px 0; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.page-heading { padding: 0 0 32px; max-width: 780px; }
.page-heading h1 { font-size: 46px; margin-bottom: 16px; }
.page-heading p { color: var(--muted); margin: 0; }
.page-heading.is-index { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 20px; margin-bottom: 32px; border-bottom: 1px solid var(--ink); }
.page-heading.is-index h1 { margin: 0; }
main > article { max-width: 760px; margin: 0 auto 56px; }
main > article > header { padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
main > article > header > p { color: var(--muted); font-size: 15px; }
main > article > header > p:last-child { margin-bottom: 0; }
.article-summary { font-size: 19px; line-height: 1.85; }
.article-date { font-size: 12px; font-family: var(--font-mono); color: var(--muted); margin: 24px 0 0; }
.article-body { overflow-wrap: anywhere; overflow-x: auto; }
.article-body h2 { margin-top: 48px; }
.article-body h3 { margin-top: 32px; }
.article-body .ql-table-wrapper { max-width: 100%; overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
/* Saved bodies cannot carry classes, so research-note components key off the
   sanitized elements and the inline colors the editor allows. */
.article-body table { display: table; table-layout: fixed; font-size: 14.5px; line-height: 1.6; }
.article-body table:not(:has(colgroup)) { table-layout: auto; }
.article-body td, .article-body th { min-width: 0; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); overflow-wrap: normal; word-break: keep-all; }
.article-body thead th { font-size: 13px; color: var(--muted); }
.article-body tbody tr:last-child > * { border-bottom: 0; }
.article-body tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.article-body caption { font-size: 13px; font-weight: 400; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article-body td p, .article-body th p { margin: 0; }
.article-body > div[style*="background-color"] { padding: 18px 22px; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 10px; }
.article-body > div[style*="background-color"] > :last-child { margin-bottom: 0; }
.article-body > div[style*="background-color"] ul { margin: 0; }
.article-body span[style*="background-color"] { padding: 0 4px; border-radius: 4px; }
.article-body :is(td, th):has(> span[style*="background-color"]:only-of-type) { white-space: nowrap; }
.article-body :is(td, th) > span[style*="background-color"]:only-of-type { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: 1px; white-space: nowrap; }
main > article nav[aria-label="목차"] { padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); margin: 32px 0; font-size: 14px; }
main > article nav ul { margin: 0; padding-left: 20px; }
main > article li::marker { color: var(--accent); }
table { display: block; overflow: auto; border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.75; font-variant-numeric: tabular-nums; }
th, td { border: 1px solid var(--line); padding: 16px; text-align: left; vertical-align: top; min-width: 140px; }
th { background: var(--paper); font-weight: 700; }
caption { text-align: left; font-weight: 600; margin-bottom: 12px; }
blockquote { margin: 28px 0; padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); }
pre { overflow: auto; padding: 20px; background: var(--paper); }
code { font-size: .85em; }
.back-link { display: flex; align-items: center; gap: 12px; max-width: 760px; min-height: 64px; margin: 0 auto; border-top: 1px solid var(--line); font-size: 15px; font-weight: 700; text-decoration: none; }
.back-link::before { content: ''; width: 16px; height: 16px; background: currentColor; clip-path: polygon(100% 44%, 22% 44%, 54% 12%, 46% 4%, 0 50%, 46% 96%, 54% 88%, 22% 56%, 100% 56%); }
.site-footer { border-top: 1px solid var(--ink); padding: 24px 0 40px; margin-top: 96px; display: flex; align-items: center; justify-content: space-between; gap: 28px; color: var(--muted); font-size: 13px; }
.site-footer strong { font-family: var(--font-brand); font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.035em; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.pagination { display: flex; justify-content: center; padding: 40px 0 0; margin: 0; font-size: 14px; }
.pagination a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border: 1px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; }
.pagination a:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 1000px) {
  main { padding-inline: 32px; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-top { grid-template-columns: 1fr; }
  .home-top > .article-entry { min-height: 360px; padding: 36px; }
  .home-top > .article-entry h2 { font-size: 32px; }
    }
@media (max-width: 700px) {
  body { font-size: 16px; }
  main { padding-inline: 20px; }
  .site-header { flex-wrap: wrap; gap: 0 16px; margin-bottom: 32px; }
  .site-brand, .site-header nav a { min-height: 60px; }
  .brand-wordmark { font-size: 21px; }
  .brand-mark { width: 28px; height: 28px; }
  .site-header ul { gap: 20px; }
  .site-header nav a { font-size: 15px; }
  .section-title h2 { font-size: 20px; }
  .entry-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-top > .article-entry { min-height: 280px; padding: 24px; }
  .home-top > .article-entry h2 { font-size: 26px; }
  .home-top > .article-entry > p:not(.entry-meta) { font-size: 15px; }
  .latest-panel { padding: 24px 20px 12px; }
  .more-notes { margin-top: 48px; }
  .article-entry { min-height: 0; padding: 24px; }
  .article-entry h2, .article-entry h3 { font-size: 20px; }
  h1, .page-heading h1 { font-size: 31px; }
  h2 { font-size: 23px; margin-top: 36px; }
  h3 { font-size: 20px; }
  .page-heading.is-index { flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 16px; margin-bottom: 24px; }
  .page-heading { padding-bottom: 20px; }
  nav[aria-label="현재 위치"] { margin-bottom: 20px; }
  main > article > header { padding-bottom: 24px; margin-bottom: 28px; }
  .article-summary { font-size: 17px; }
  .site-footer { margin-top: 56px; padding-block: 20px 28px; }
}
@media (prefers-reduced-motion: reduce) { .text-link::after, .article-entry { transition: none; } }
