:root {
  --ink: #1c3451;
  --text: #22303f;
  --muted: #4a5b72;
  --blue: #255aca;
  --blue-soft: #eaf0fc;
  --paper: #f5f7fb;
  --card: #ffffff;
  --line: #ccd6e4;
  --warm: #fff6ec;
  --radius: 10px;
  --gutter: 16px;
  --read: 720px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 17px/1.75 "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: var(--blue); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--ink); line-height: 1.35; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  max-width: 1120px; margin: 0 auto; padding: 18px var(--gutter);
}
.brand { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--blue); }
.preview-bar { margin: 0; padding: 8px var(--gutter); background: #fff1d6; color: #5a3d00; text-align: center; font-size: 14px; }

main { max-width: 1120px; margin: 0 auto; padding: 8px var(--gutter) 56px; }
.foot {
  max-width: 1120px; margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted);
}
.foot small { flex-basis: 100%; font-size: 13px; }

/* S01 home */
.hello { max-width: 760px; margin: 24px auto 28px; text-align: center; }
.hello h1 { font-size: clamp(30px, 6vw, 44px); margin: 0 0 8px; }
.lead { margin: 0; color: var(--muted); font-size: 18px; }
.ask { margin: 28px 0 0; font-size: clamp(22px, 4.2vw, 28px); }
.entries { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .entries { grid-template-columns: 1fr 1fr; } }
.entry {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(28, 52, 81, .06);
}
.entry:hover { border-color: var(--blue); }
.entry-art { display: block; aspect-ratio: 16 / 10; background: var(--blue-soft); overflow: hidden; }
.entry-art img, .entry-diagram { width: 100%; height: 100%; object-fit: cover; }
.entry-text { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; }
.entry-text strong { font-size: 22px; color: var(--ink); }
.entry-text strong::after { content: " →"; color: var(--blue); }
.entry-text span { color: var(--muted); }

/* lists, hubs, cards */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 8px 0 20px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.list-head { max-width: var(--read); margin-bottom: 24px; }
.list-head h1 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 8px; }
.list-head p { margin: 0; color: var(--muted); }
.hub-head { display: grid; gap: 20px; align-items: center; margin-bottom: 28px; }
@media (min-width: 768px) { .hub-head { grid-template-columns: 1.2fr 1fr; } }
.hub-head h1 { font-size: clamp(28px, 5vw, 38px); margin: 0 0 8px; }
.hub-head p { margin: 0; color: var(--muted); }
.hub-head figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--blue-soft); }
.hub-head figure img { width: 100%; height: 100%; object-fit: cover; }

.cards { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.featured .cards { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .featured .card { flex-direction: row; }
  .featured .card-art { flex: 0 0 45%; aspect-ratio: auto; min-height: 260px; }
}
.card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.card:hover { border-color: var(--blue); }
.card-art { display: block; aspect-ratio: 4 / 3; background: var(--blue-soft); overflow: hidden; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-diagram {
  display: flex; height: 100%; align-items: center; justify-content: center; color: var(--ink); font-weight: 700;
  background: repeating-linear-gradient(135deg, var(--blue-soft) 0 18px, #dfe8f8 18px 36px);
}
.card-text { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.card-text strong { font-size: 19px; line-height: 1.45; color: var(--ink); }
.card-text > span:last-child { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.card-meta span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; color: var(--muted); }
.status { background: #fff1d6 !important; border-color: #e6c27a !important; color: #5a3d00 !important; border-radius: 999px; padding: 0 9px; font-size: 13px; }
.aside-link a { display: block; padding: 16px 18px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); text-decoration: none; color: var(--muted); }
.aside-link strong { color: var(--ink); }
.side { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.side h2 { font-size: 16px; margin: 16px 0 6px; }
.side ul, .plain, .soon ul { padding-left: 1.2em; margin: 0 0 8px; }
.soon { max-width: var(--read); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.soon p { margin: 0 0 8px; }

/* S07 article */
.article, .after { max-width: var(--read); margin: 0 auto; }
.article-head h1 { font-size: clamp(27px, 5vw, 36px); margin: 4px 0 12px; }
.eyebrow { margin: 0; font-size: 14px; color: var(--muted); }
.dek { margin: 0 0 10px; font-size: 19px; color: var(--muted); }
.byline { margin: 0; font-size: 14px; color: var(--muted); }
.cover { margin: 24px 0; }
.cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: var(--blue-soft); }
.cover figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.prose { font-size: 18px; line-height: 1.85; }
.prose h2 { font-size: 23px; margin: 36px 0 10px; }
.prose h3 { font-size: 19px; margin: 28px 0 6px; }
.prose p { margin: 0 0 18px; }
.reflect { margin: 32px 0; padding: 20px 22px; background: var(--warm); border-left: 4px solid #c8a88d; border-radius: 0 var(--radius) var(--radius) 0; }
.reflect h2 { font-size: 17px; margin: 0 0 6px; }
.reflect p { margin: 0; }
.sources { font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.sources h2 { font-size: 16px; }
.sources li { margin-bottom: 8px; }
.scope { display: block; font-size: 13px; }
.after { margin-top: 32px; }
.after h2 { font-size: 19px; }
.back { font-weight: 700; }
.also { color: var(--muted); font-size: 15px; }

/* concept diagrams (from the old site; labelled "개념도" in their own caption) */
.diagram { margin: 24px 0; background: var(--blue-soft); padding: 24px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; }
.diagram b { font-size: 15px; color: var(--ink); }
.diagram small { font-size: 13px; color: var(--muted); }
.diagram-row { display: flex; align-items: center; gap: 8px; }
.diagram-row span, .diagram-box { border: 1px solid #b5c6e5; background: #fff; border-radius: 6px; padding: 9px 8px; text-align: center; flex: 1; font-size: 15px; line-height: 1.4; }
.diagram-row .accent { background: var(--blue); color: #fff; border-color: var(--blue); }
.diagram-row .rose { background: #fff1e7; border-color: #c8a88d; color: #684125; }
.diagram-row em { font-style: normal; color: #617a9f; }
.diagram.relations { background: #eaf3f3; }
.diagram.growth { background: #f4eee7; }
.method-grid { margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-step { padding: 14px; background: var(--blue-soft); border-top: 3px solid var(--blue); }
.method-step b { display: block; font-size: 22px; color: #3f5f98; }
.method-step span { font-weight: 700; line-height: 1.45; }
@media (min-width: 768px) { .method-grid { grid-template-columns: repeat(4, 1fr); } }

@media (prefers-reduced-motion: no-preference) { .card, .entry { transition: border-color .15s; } }
