/* ============================================================
   Guide (/guide) — article index + long-form article pages.
   Markup is generated by scripts/build-guide.py: edit guide-src/, not guide/.
   Depends on design tokens from styles.css. Tokens only, so both themes follow.
   ============================================================ */
.guide-main {
  min-height: calc(100vh - 76px);
  padding-block: 72px 104px;
  background: var(--c-canvas);
}

.guide-shell,
.guide-article {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--s-lg);
}
.guide-shell { max-width: 880px; }
.guide-article { max-width: 728px; } /* ~40 Korean characters per line at 17px */

/* --- Index --- */
.guide-index__header { margin-bottom: 56px; }
.guide-index__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6.4vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  word-break: keep-all;
}
.guide-index__lead {
  max-width: 34em;
  margin-top: var(--s-md);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--c-ink-80);
  word-break: keep-all;
}

/* Editorial list: one strong rule on top, hairlines between entries, no cards. */
.guide-list {
  list-style: none;
  border-top: 1px solid var(--c-ink);
}
.guide-list__item {
  position: relative;
  display: grid;
  gap: var(--s-xs);
  padding-block: 28px;
  border-bottom: 1px solid var(--c-hairline);
}
.guide-list__date {
  font-size: var(--fz-data);
  color: var(--c-ink-48);
  font-variant-numeric: tabular-nums;
}
.guide-list__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  word-break: keep-all;
}
.guide-list__title a { color: var(--c-ink); }
.guide-list__title a::after { /* the whole entry is the tap target */
  content: "";
  position: absolute;
  inset: 0;
}
.guide-list__summary {
  margin-top: var(--s-xs);
  font-size: var(--fz-reading);
  line-height: 1.6;
  color: var(--c-ink-80);
  word-break: keep-all;
}
.guide-empty {
  padding-block: var(--s-xxl);
  border-block: 1px solid var(--c-hairline);
  color: var(--c-ink-48);
}

/* --- Article --- */
.guide-article__header {
  margin-bottom: var(--s-xxl);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-hairline);
}
.guide-article__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.028em;
  color: var(--c-ink);
  word-break: keep-all;
}
.guide-article__lead {
  margin-top: var(--s-md);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.55;
  color: var(--c-ink-80);
  word-break: keep-all;
}
.guide-meta {
  margin-top: var(--s-lg);
  font-size: var(--fz-data);
  color: var(--c-ink-48);
  font-variant-numeric: tabular-nums;
}

.guide-prose {
  font-size: var(--fz-body);
  line-height: 1.82;
  letter-spacing: -0.01em;
  color: var(--c-ink-80);
  word-break: keep-all;
  overflow-wrap: break-word;
}
.guide-prose > * + * { margin-top: 1.2em; }
.guide-prose h2 {
  margin-top: 2.6em;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 26px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.022em;
  color: var(--c-ink);
}
.guide-prose h3 {
  margin-top: 2em;
  font-size: var(--fz-lead);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--c-ink);
}
.guide-prose h2 + *,
.guide-prose h3 + * { margin-top: 0.8em; }
.guide-prose a,
.guide-source a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.guide-prose strong { font-weight: 600; color: var(--c-ink); }
.guide-prose ul,
.guide-prose ol { padding-left: 1.4em; }
.guide-prose li + li { margin-top: 0.5em; }
.guide-prose li::marker { color: var(--c-ink-48); font-variant-numeric: tabular-nums; }
.guide-prose blockquote {
  padding-left: var(--s-md);
  border-left: 3px solid var(--c-primary);
  color: var(--c-ink);
}

/* Wide tables scroll inside their own region instead of pushing the page sideways. */
.guide-table {
  margin-block: 2em;
  overflow-x: auto;
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-md);
}
.guide-table table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}
.guide-table th,
.guide-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-hairline);
}
.guide-table thead th {
  background: var(--c-surface-inset);
  font-size: var(--fz-data);
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
}
.guide-table tbody th {
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
}
.guide-table tbody tr:last-child > * { border-bottom: 0; }

.guide-source {
  margin-top: var(--s-xxl);
  font-size: var(--fz-caption);
}

/* --- Fixed footer of every article: free audit CTA, then related posts --- */
.guide-cta {
  display: grid;
  gap: var(--s-lg);
  align-items: center;
  margin-top: 72px;
  padding: var(--s-xl);
  border-radius: var(--r-lg);
  background: var(--c-parchment);
  box-shadow: var(--shadow-card);
}
.guide-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  word-break: keep-all;
}
.guide-cta p {
  margin-top: var(--s-xs);
  font-size: var(--fz-reading);
  line-height: 1.6;
  color: var(--c-ink-80);
  word-break: keep-all;
}
.guide-cta .btn { justify-self: start; }

.guide-related { margin-top: 64px; }
.guide-related h2 {
  padding-bottom: var(--s-sm);
  border-bottom: 1px solid var(--c-ink);
  font-size: var(--fz-caption);
  font-weight: 600;
  color: var(--c-ink-48);
}
.guide-related ul {
  list-style: none;
  display: grid;
}
.guide-related li { border-bottom: 1px solid var(--c-hairline); }
.guide-related a {
  display: grid;
  gap: 6px;
  padding-block: 22px;
}
.guide-related__title {
  font-size: var(--fz-lead);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--c-ink);
  word-break: keep-all;
}
.guide-related__summary {
  font-size: var(--fz-caption);
  line-height: 1.55;
  color: var(--c-ink-80);
  word-break: keep-all;
}

@media (hover: hover) and (pointer: fine) {
  .guide-list__title a:hover,
  .guide-related a:hover .guide-related__title { color: var(--c-primary); }
}

@media (min-width: 45rem) {
  .guide-list__item {
    grid-template-columns: 9.5rem 1fr;
    gap: var(--s-lg);
    padding-block: 36px;
  }
  .guide-list__date { padding-top: 0.5em; }
  .guide-cta {
    grid-template-columns: 1fr auto;
    padding: 36px 40px;
  }
  .guide-cta .btn { justify-self: end; }
  .guide-related ul {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--s-xl);
  }
}

@media (max-width: 40rem) {
  .guide-main { padding-block: 48px 72px; }
  .guide-index__header { margin-bottom: 40px; }
  .guide-cta { margin-top: 56px; padding: var(--s-lg); }
}

/* Topic-specific questions live in each article source, before the audit CTA. */
.guide-faq { margin-top: 3em; border-top: 1px solid var(--c-hairline); }
.guide-faq h2 { margin-top: 1.4em; margin-bottom: 1em; }
.guide-faq__item { border-bottom: 1px solid var(--c-hairline); }
.guide-faq__item summary { padding-block: 18px; color: var(--c-ink); font-weight: 600; cursor: pointer; }
.guide-faq__item p { padding-bottom: 22px; }
