/* 성형 질문과 출처: a filed question-and-answer register. See DESIGN.md.
   Colours: Wada combination 303 (Naples Yellow, Peach Red, Deep Slate Olive, Neutral Gray), moved in lightness only. */
:root {
  --ground: #e3edef;        /* Neutral Gray at L93: the sheet */
  --ink: #253122;           /* Deep Slate Olive: all body text, 11.44:1 on the ground */
  --band: #253122;          /* the question band and the footer */
  --on-band: #e3edef;       /* question text on the band, 11.44:1 */
  --on-band-dim: #bac3c5;   /* masthead and metadata on the band, 7.59:1 */
  --slip: #fbe6a0;          /* Naples Yellow: the short-answer slip only; ink on it 10.98:1 */
  --cite: #556251;          /* Deep Slate Olive at L40: source tags and metadata, 5.42:1 on the ground, 5.21:1 on the slip */
  --mark: #c5320c;          /* Peach Red at L45: question marks and focus on the sheet, 4.6:1 */
  --mark-on-band: #fd6439;  /* Peach Red at L62: the same on the band, 4.58:1 */
  --drawer: #d0d9db;        /* Neutral Gray at L86: the sources drawer; ink 9.49:1, cite 4.6:1 */

  --font-display: "Noto Serif KR", "Noto Serif CJK KR", "Nanum Myeongjo", AppleMyungjo, Batang, serif;
  --font-text: "SUIT", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-ui: "SUIT", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;

  /* The frame: a question column and an answer column. */
  --q: 15rem;
  --gap: 2.5rem;
  --a: 42rem;
  --page: calc(var(--q) + var(--gap) + var(--a));
  --edge: 1.25rem;
  --inset: max(var(--edge), (100% - var(--page)) / 2);
  --overhang: 2rem;

  /* One spacing scale. */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: 6rem;

  /* One large jump (the question), then sizes close together. */
  --t-ui: 0.875rem;
  --t-body: 1.0625rem;
  --t-slip: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --t-follow: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --t-entry: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --t-question: clamp(2rem, 1.35rem + 2.9vw, 3.5rem);
  --t-front: clamp(2.5rem, 1.5rem + 4.4vw, 4.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--band); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body)/1.85 var(--font-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-kerning: normal;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }
.band :focus-visible, .masthead :focus-visible, .colophon :focus-visible { outline-color: var(--mark-on-band); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }
time, .count, .read, .sources-count, .list-count { font-variant-numeric: tabular-nums; }

/* The frame centres a question column and an answer column; bands and the drawer run full width around it. */
.frame { width: min(100% - 2 * var(--edge), var(--page)); margin-inline: auto; }
.band { background: var(--band); color: var(--on-band); }
.drawer { background: var(--drawer); }
main { flex: 1; display: flex; flex-direction: column; padding-bottom: var(--s9); }
.is-post main:not(:has(> .more)) { padding-bottom: 0; }

/* Masthead: after <main> in the document, on top of the band on screen. */
.masthead {
  order: -1;
  background: var(--band);
  color: var(--on-band-dim);
  padding: var(--s4) var(--inset) 0;
  display: grid;
  grid-template-columns: var(--q) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: baseline;
  font: 400 var(--t-ui)/1.5 var(--font-ui);
}
.wordmark {
  font: 700 1.0625rem/1.4 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--on-band);
  text-decoration: none;
}
.masthead ul { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: 0; padding: 0; list-style: none; }
.masthead nav a { text-decoration: none; padding-block: var(--s1); }
.masthead nav a:hover { color: var(--on-band); }
.masthead nav a[aria-current] { color: var(--on-band); text-decoration: underline 2px var(--mark-on-band); text-underline-offset: 0.45em; }
.count { margin-left: 0.3em; font-size: 0.86em; }
.is-home .wordmark { visibility: hidden; }

/* The question band and the short-answer slip. */
.piece-head, .list-head, .front { padding: clamp(var(--s6), 6vw, var(--s8)) 0 0; }
.piece-head .frame, .list-head .frame, .front .frame {
  display: grid;
  grid-template-columns: var(--q) minmax(0, var(--a));
  column-gap: var(--gap);
}
.piece-head h1, .list-head h1 {
  grid-column: 1 / -1;
  max-width: 17em;
  font-size: var(--t-question);
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--on-band);
  margin-bottom: var(--s6);
}
.standfirst {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  background: var(--slip);
  color: var(--ink);
  padding: var(--s5) var(--s5) calc(var(--s5) + 0.1rem);
  margin-bottom: calc(-1 * var(--overhang));
  font: 700 var(--t-slip)/1.7 var(--font-text);
  text-wrap: pretty;
}
.standfirst .cite { font-weight: 400; }
.piece-head .dateline {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  flex-direction: column;
  color: var(--on-band-dim);
  padding-top: var(--s2);
}
.piece-head .dateline a { color: var(--on-band); }
.plain .piece-head .dateline { grid-row: auto; padding-bottom: var(--s6); }
.piece-head:has(.standfirst) + * { margin-top: calc(var(--overhang) + var(--s7)); }
.plain .piece-head + * { margin-top: var(--s7); }

.dateline { display: flex; flex-wrap: wrap; gap: 0 var(--s4); font: 400 var(--t-ui)/1.6 var(--font-ui); color: var(--cite); }
.dateline a { text-decoration: none; font-weight: 700; color: var(--ink); }
.dateline a:hover { text-decoration: underline; }

/* Source tags inside the text: the second ink. */
.cite { font-size: 0.78em; color: var(--cite); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.qm { color: var(--mark); }

/* Contents: the follow-up questions this page answers. */
.contents {
  display: grid;
  grid-template-columns: var(--q) minmax(0, var(--a));
  column-gap: var(--gap);
  font: 400 var(--t-ui)/1.6 var(--font-ui);
}
.contents-label { font-weight: 700; padding-top: var(--s1); }
.contents ol { margin: 0; padding: 0 0 0 var(--s4); border-left: 2px solid var(--ink); list-style: none; }
.contents li + li { margin-top: var(--s2); }
.contents a { text-decoration: none; font: 700 0.9375rem/1.5 var(--font-display); }
.contents a:hover { text-decoration: underline; }

/* The long answer: follow-up questions hang in the question column, answers run in the answer column. */
.prose {
  display: grid;
  grid-template-columns: var(--q) minmax(0, var(--a));
  column-gap: var(--gap);
  align-items: start;
  margin-top: var(--s7);
}
.prose > * { grid-column: 2; margin: var(--s4) 0 0; }
.prose > :first-child { margin-top: 0; }
.prose > h2 {
  grid-column: 1;
  font-size: var(--t-follow);
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin-top: var(--s7);
  padding-top: var(--s1);
}
.prose > h2 + * { margin-top: var(--s7); }
.prose > h2:first-child, .prose > h2:first-child + * { margin-top: 0; }
.prose > h3 {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-top: var(--s6);
}
.prose > h3 + * { margin-top: var(--s2); }
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--s2); }
.prose li::marker { color: var(--cite); }
.prose strong { font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: 0 0 0 var(--s4); border-left: 2px solid var(--cite); }
.prose hr { border: 0; height: 2px; background: var(--ink); width: 4rem; margin-block: var(--s7); }
.prose a { text-decoration-color: var(--ink); }
.prose > .table-scroll {
  grid-column: 1 / -1;
  max-width: 100%;
  overflow-x: auto;
  margin-top: var(--s5);
  border-top: 2px solid var(--ink);
  -webkit-overflow-scrolling: touch;
}
.prose > h2 + .table-scroll { margin-top: var(--s7); }
.table-scroll:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font: 400 0.9375rem/1.55 var(--font-ui); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--s3) var(--s5) var(--s3) 0; min-width: 8rem; }
.prose thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--drawer) 55%, var(--ground)); }
.prose td:first-child, .prose th:first-child { padding-left: var(--s2); }
.prose td { font-variant-numeric: tabular-nums; }

/* Questions people also ask. */
.questions {
  display: grid;
  grid-template-columns: var(--q) minmax(0, var(--a));
  column-gap: var(--gap);
  margin-top: var(--s9);
  padding-top: var(--s5);
  border-top: 2px solid var(--ink);
}
.questions h2 { font: 700 var(--t-ui)/1.6 var(--font-ui); padding-top: 0.35rem; }
.questions dl { margin: 0; }
.questions dt { font: 700 1.125rem/1.5 var(--font-display); }
.questions dt:not(:first-child) { margin-top: var(--s6); }
.questions dd { margin: var(--s2) 0 0; }

/* The sources drawer. */
.sources { margin-top: var(--s9); padding: var(--s7) 0 var(--s8); }
.sources .frame { display: grid; grid-template-columns: var(--q) minmax(0, var(--a)); column-gap: var(--gap); }
.sources h2 { font-size: var(--t-follow); line-height: 1.3; }
.sources-count { font: 400 var(--t-ui)/1.6 var(--font-ui); color: var(--ink); margin-top: var(--s1); }
.sources ol { margin: 0; padding: 0; list-style: none; font: 400 var(--t-ui)/1.55 var(--font-ui); border-top: 2px solid var(--ink); }
.sources li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s5); padding: var(--s3) 0; }
.sources li + li { border-top: 1px solid color-mix(in srgb, var(--ink) 22%, var(--drawer)); }
.source a, .source-title { font-weight: 700; color: var(--ink); }
.source .sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.publisher { display: block; color: var(--ink); }
.read { white-space: nowrap; color: var(--ink); text-align: right; }

/* Ledger: every list of questions, question on the left, its short answer on the right. */
.ledger-block, .listing > .frame, .more { margin-top: var(--s8); }
.ledger-head { font: 700 var(--t-ui)/1.6 var(--font-ui); margin-bottom: var(--s3); }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ledger > li {
  display: grid;
  grid-template-columns: var(--q) minmax(0, var(--a));
  column-gap: var(--gap);
  padding: var(--s5) 0 var(--s6);
}
.ledger > li + li { padding-top: var(--s2); }
.entry-q { font-size: var(--t-entry); line-height: 1.45; letter-spacing: -0.015em; }
.entry-q a { text-decoration: none; }
.entry-q a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.entry-a > p:first-child { text-wrap: pretty; font-size: 1rem; line-height: 1.8; }
.entry-a .dateline { margin-top: var(--s2); }
.all { margin: var(--s5) 0 0; font: 700 var(--t-ui)/1.6 var(--font-ui); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }
.all a { text-underline-offset: 0.3em; }

/* List pages: count of questions beside the intro. */
.list-head { padding-bottom: var(--s7); }
.list-intro { grid-column: 2; color: var(--on-band); font: 400 var(--t-slip)/1.7 var(--font-text); text-wrap: pretty; }
.list-count { grid-column: 1; grid-row: 2; color: var(--on-band-dim); font: 400 var(--t-ui)/1.9 var(--font-ui); }
.list-head h1 + .list-count { grid-row: auto; }
.missing .list-head h1 { margin-bottom: var(--s5); }

/* Front page. */
.front { padding-bottom: var(--s8); }
.front h1 {
  grid-column: 1 / -1;
  font-size: var(--t-front);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--on-band);
  margin-bottom: var(--s6);
}
.front-tagline { grid-column: 2; font: 700 var(--t-slip)/1.65 var(--font-text); color: var(--on-band); text-wrap: pretty; }
.front-note { grid-column: 2; margin-top: var(--s4); color: var(--on-band-dim); text-wrap: pretty; }

/* Footer. */
.colophon { background: var(--band); color: var(--on-band-dim); padding: var(--s7) 0 var(--s8); font: 400 var(--t-ui)/1.6 var(--font-ui); }
.colophon-inner { width: min(100% - 2 * var(--edge), var(--page)); margin-inline: auto; display: grid; grid-template-columns: var(--q) minmax(0, var(--a)); column-gap: var(--gap); row-gap: var(--s3); }
.colophon-name { grid-row: 1 / span 2; font: 700 1.0625rem/1.4 var(--font-display); color: var(--on-band); }
.colophon-note { grid-column: 2; }
.colophon ul { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin: 0; padding: 0; list-style: none; }
.colophon a { color: var(--on-band); text-decoration-color: var(--on-band-dim); }

/* One column below 60rem. */
@media (max-width: 60rem) {
  .masthead, .piece-head .frame, .list-head .frame, .front .frame, .contents, .prose,
  .questions, .sources .frame, .ledger > li, .colophon-inner { grid-template-columns: minmax(0, 1fr); }
  .masthead { padding-top: var(--s1); }
  .is-home .wordmark { display: none; }
  .standfirst, .front-tagline, .front-note, .list-intro { grid-column: 1; grid-row: auto; }
  .piece-head h1, .list-head h1 { margin-bottom: var(--s3); }
  .piece-head .dateline { grid-column: 1; grid-row: 2; flex-direction: row; padding: 0 0 var(--s5); }
  .piece-head .standfirst { grid-row: 3; }
  .piece-head:has(.standfirst) + * { margin-top: calc(var(--overhang) + var(--s6)); }
  .plain .piece-head .dateline { padding-bottom: var(--s6); }
  .list-count { grid-column: 1; grid-row: auto; margin-top: var(--s3); }
  .contents-label { margin-bottom: var(--s2); }
  .prose > *, .prose > h2 { grid-column: 1; }
  .prose > h2 { margin-top: var(--s7); }
  .prose > h2 + * { margin-top: var(--s3); }
  .prose > .table-scroll { grid-column: 1; }
  .questions h2, .sources-head { margin-bottom: var(--s4); }
  .questions h2 { padding-top: 0; }
  .sources-head { display: flex; align-items: baseline; gap: var(--s3); }
  .sources-count { margin-top: 0; }
  .sources li { grid-template-columns: minmax(0, 1fr); }
  .read { text-align: left; }
  .entry-a { margin-top: var(--s2); }
  .ledger > li { padding-bottom: var(--s5); }
  .colophon-name, .colophon-note, .colophon ul { grid-column: 1; grid-row: auto; }

  /* Tap targets of at least 44px. The masthead keeps one row and scrolls sideways instead of growing. */
  .masthead { row-gap: 0; }
  .masthead nav { margin-inline: calc(-1 * var(--edge)); }
  .masthead ul { flex-wrap: nowrap; overflow-x: auto; gap: 0 var(--s5); padding-inline: var(--edge); scrollbar-width: none; }
  .wordmark { display: block; padding-block: 0.65rem; }
  .masthead nav a { display: block; padding: 0.75rem 0.625rem; margin-inline: -0.625rem; white-space: nowrap; }
  .dateline, .all { align-items: baseline; }
  .dateline a, .all a, .colophon ul a { display: inline-block; padding: 0.75rem 0.625rem; margin-inline: -0.625rem; }
  .entry-q a { display: block; padding-block: 0.6rem; }
  .ledger > li { padding-top: var(--s3); }
  .contents li + li { margin-top: 0; }
  .contents a { display: block; padding-block: 0.6875rem; }
  .sources li { padding-top: 0; }
  .source a, .source-title { display: block; padding-block: 0.7rem; }
  .publisher { margin-top: -0.6rem; }
}
@media (max-width: 30rem) {
  :root { --edge: 1.125rem; }
  .standfirst { margin-inline: calc(-1 * var(--s2)); padding: var(--s4) var(--s4) calc(var(--s4) + 0.1rem); }
  .prose th, .prose td { min-width: 9rem; }
}
@media print {
  .masthead nav, .more, .colophon ul { display: none; }
  html, body, .band, .drawer, .colophon, .masthead { background: #fff; color: #000; }
  .piece-head h1, .front h1, .list-head h1 { color: #000; }
  .standfirst { border: 2px solid #000; }
}
