:root {
  color-scheme: light;
  --ink: #142b49;
  --text: #27384b;
  --muted: #5f6b7a;
  --line: #dce2e8;
  --paper: #fff;
  --wash: #f5f7f9;
  --tint: #e9eff5;
  --error: #8f3a35;
  --error-wash: #faf1f0;
  --radius: 12px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
    sans-serif;
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); line-height: 1.7; word-break: keep-all; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: var(--ink); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid #4679b8; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { color: var(--ink); line-height: 1.3; letter-spacing: -.02em; }
p, li, strong, a { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Masthead */
.masthead { max-width: 1120px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 750; line-height: 1.2; }
.wordmark small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.wordmark-symbol { width: 42px; height: 42px; border: 1.5px solid var(--ink); border-radius: 8px; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.stamp { color: var(--muted); font-size: 13px; text-align: right; }

main { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); font-weight: 650; text-decoration: none; line-height: 1.3; text-align: center; transition: background-color .15s, color .15s; }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover:not(:disabled) { background: #0c1d33; }
.button-secondary { background: var(--paper); color: var(--ink); }
.button-secondary:hover:not(:disabled), .button-ghost:hover { background: var(--tint); }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-large { min-height: 56px; padding: 0 28px; font-size: 17px; }

/* Home */
.hero { padding: 56px 0 36px; max-width: 760px; }
.eyebrow { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 750; white-space: pre-line; }
.lead { margin-top: 18px; font-size: 18px; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.notice { margin-top: 20px; color: var(--muted); font-size: 14px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.how-steps li { display: grid; align-content: start; gap: 4px; padding: 18px; background: var(--wash); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.how-steps strong { color: var(--ink); font-size: 16px; }
.how-number { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.articles { padding-top: 48px; scroll-margin-top: 16px; }
.section-heading { display: grid; gap: 6px; margin-bottom: 8px; }
.section-heading h2 { font-size: 26px; }
.article-group { margin-top: 28px; }
.article-group > h3 { font-size: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.article-group > p { margin-top: 8px; font-size: 14px; }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.article-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.article-card:hover { border-color: var(--ink); box-shadow: 0 2px 10px rgba(20, 43, 73, .08); }
.card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.badge { padding: 1px 8px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); font-size: 12px; font-weight: 650; }
.card-title { color: var(--ink); font-size: 18px; line-height: 1.45; }
.card-reason { color: var(--muted); font-size: 15px; flex: 1; }
.card-open { color: var(--ink); font-weight: 650; font-size: 15px; }

/* Reader */
.reader { max-width: 860px; margin: 0 auto; }
.reader-nav { padding: 20px 0 8px; display: grid; gap: 14px; }
.back-link { font-weight: 600; text-decoration: none; font-size: 15px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stepper a { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px; border-radius: 10px; background: var(--wash); text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.step-number { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 13px; }
.stepper .done a { color: var(--ink); }
.stepper .current a { background: var(--ink); color: #fff; }
.article-header { padding: 24px 0 8px; display: grid; gap: 12px; }
.article-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 750; }
.reason { padding: 14px 16px; background: var(--wash); border-left: 3px solid var(--ink); border-radius: 0 8px 8px 0; }
.reason span { font-size: 13px; font-weight: 650; color: var(--muted); }
.article-body { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.article-body summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--ink); }
.article-body p { margin-bottom: 14px; font-size: 16px; }
.article-body .source-link { display: inline-block; margin-bottom: 16px; font-weight: 600; }
.coach { margin: 16px 0 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--tint); color: var(--ink); font-weight: 600; }
.coach:empty { display: none; }
.step-panel { display: grid; gap: 16px; padding-top: 12px; }
.made-by { color: var(--muted); font-size: 14px; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--line); }

/* People */
.people { border: 1px solid var(--line); border-radius: var(--radius); }
.people summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; }
.people-faces { display: flex; }
.people-faces .avatar { width: 32px; height: 32px; margin-right: -6px; font-size: 11px; border: 2px solid var(--paper); }
.people-toggle { font-weight: 600; color: var(--ink); white-space: nowrap; }
.people-faces { min-width: 0; overflow: hidden; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 4px 16px 16px; }
.person { display: grid; gap: 2px; padding: 12px; background: var(--wash); border-radius: 10px; font-size: 14px; }
.person .avatar { margin-bottom: 6px; }
.person strong { color: var(--ink); font-size: 16px; }
.person p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 650; }

/* Rounds and speeches */
.rounds { display: grid; gap: 24px; }
.round { display: grid; gap: 4px; }
.round-question { padding: 14px 16px; border-radius: var(--radius); background: var(--wash); margin-bottom: 4px; }
.round-question span { font-size: 13px; font-weight: 650; color: var(--muted); }
.round-question p { color: var(--ink); font-weight: 600; }
.speech { display: flex; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.speech:last-of-type { border-bottom: 0; }
.speech-body { min-width: 0; flex: 1; }
.speech-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.speech-heading strong { color: var(--ink); font-size: 17px; }
.speech-heading span { color: var(--muted); font-size: 13px; }
.round-done { color: var(--muted); font-size: 14px; padding-left: 4px; }
.round-done::before { content: "✓ "; color: var(--ink); font-weight: 700; }
.markdown { display: grid; gap: 10px; }
.markdown h3 { font-size: 18px; margin-top: 10px; }
.markdown ul, .markdown ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.markdown blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.markdown code { background: var(--wash); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.round-summary .markdown { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.streaming { color: var(--muted); }
.progress { display: flex; align-items: center; gap: 12px; padding: 18px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.round-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--error-wash); color: var(--error); font-weight: 600; }

/* Evidence under each speech */
.speech-heading .badge-ai { padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 650; }
.evidence { display: grid; gap: 6px; margin-top: 8px; font-size: 14px; }
.evidence-details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.evidence-details summary::before { content: "▸"; font-size: 12px; }
.evidence-details[open] summary::before { content: "▾"; }
.evidence-item { margin: 6px 0 0; padding: 10px 12px; background: var(--wash); border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; }
.evidence-item figcaption { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.evidence-item p { font-size: 14px; }
.evidence mark { padding: 0 2px; border-radius: 3px; background: #fbefc5; color: inherit; }
.evidence-none, .evidence-checking { color: var(--muted); font-size: 13px; }
.evidence-conflict { padding: 6px 10px; border-radius: 8px; background: var(--error-wash); color: var(--error); font-size: 13px; font-weight: 600; }

/* Reader note */
.comment-box { display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wash); }
.comment-box h2 { font-size: 20px; }
.comment-box textarea { background: var(--paper); }
.comment-privacy { color: var(--muted); font-size: 13px; }
.comment-status { color: var(--ink); font-weight: 600; }
.comment-status:empty { display: none; }

/* Editor memo page */
.editor { max-width: 860px; margin: 0 auto; padding: 32px 0; display: grid; gap: 16px; }
.editor h1 { font-size: 28px; }
.editor-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.editor-form label { display: grid; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 600; }
.editor-form input, .editor-form select { min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-preview { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.editor-preview:empty { display: none; }

/* Offline archive */
.offline-banner { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); background: var(--tint); color: var(--ink); font-size: 14px; font-weight: 600; }
.offline-section { display: grid; gap: 12px; }
.offline-section > h2 { font-size: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }

/* Ask box */
.ask { display: grid; gap: 12px; padding: 22px; border: 2px solid var(--ink); border-radius: var(--radius); margin-top: 8px; }
.ask h2 { font-size: 20px; }
.chips { display: grid; gap: 8px; }
.chip { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 16px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; font-weight: 550; color: var(--ink); }
.chip:hover:not(:disabled) { border-color: var(--ink); background: var(--wash); }
.chip-suggested { border-color: var(--ink); }
.chip-badge { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 650; }
.custom-question { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-top: 4px; }
.custom-question label { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--muted); }
.custom-question textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; }

/* Compare */
.compare-tabs { display: none; gap: 6px; }
.compare-tabs button { flex: 1; min-height: 48px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); font-weight: 600; color: var(--muted); }
.compare-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.compare-column { min-width: 0; display: grid; align-content: start; gap: 12px; }
.compare-title { font-size: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.compare-grid .speech { gap: 10px; }
.compare-grid .avatar { width: 36px; height: 36px; font-size: 12px; }

.page-footer { max-width: 1120px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (min-width: 900px) {
  .reader:has(.compare-grid) { max-width: 1120px; }
}
@media (max-width: 760px) {
  .masthead { padding: 14px 16px; }
  .stamp { display: none; }
  main { padding: 0 16px 48px; }
  .hero { padding-top: 36px; }
  .lead { font-size: 17px; }
  .hero-actions .button { width: 100%; }
  .how-steps { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .stepper a { font-size: 14px; }
  .people-faces .avatar { width: 26px; height: 26px; margin-right: -8px; font-size: 9px; }
  .compare-tabs { display: flex; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-column:not(.active) { display: none; }
  .compare-column .compare-title { display: none; }
  .custom-question { grid-template-columns: 1fr; }
  .step-nav .button { flex: 1; }
  .page-footer { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dots i { animation: none; opacity: .6; }
}
