@import url('https://fonts.googleapis.com/css2?family=Hahmlet:wght@400;500;700&family=Nanum+Gothic:wght@400;700;800&display=swap');

:root { --font-hahmlet: 'Hahmlet'; --font-nanum: 'Nanum Gothic'; }

:root {
  --canvas: #fcfbf9;
  --paper: #ffffff;
  --hazel: #8a6d4f;
  --hazel-deep: #5e4a33;
  --hazel-soft: #f1e9df;
  --hazel-tint: #f7f2ea;
  --line: #dfe2e6;
  --line-soft: #e9ebee;
  --ink: #2b2620;
  --ink-soft: #5d574e;
  --muted: #8d877d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 12px 30px rgba(94, 74, 51, 0.07);
  --shadow: 0 20px 48px rgba(94, 74, 51, 0.12);
  --shell: min(1120px, calc(100% - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-nanum), "Apple SD Gothic Neo", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: -0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-hahmlet), "Apple SD Gothic Neo", serif;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--hazel-deep);
  color: var(--paper);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--hazel);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-inverse {
  color: #e7d6c2;
}

/* ---------- Masthead: single-row left wordmark + inline nav + thin clinical rule ---------- */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead-inner {
  width: var(--shell);
  margin: 0 auto;
  padding: 18px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.wordmark-bar {
  width: 4px;
  height: 38px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--hazel), var(--hazel-deep));
}

.wordmark-text strong {
  display: block;
  font-family: var(--font-hahmlet), serif;
  font-size: 1.34rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hazel-deep);
}

.wordmark-text small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.masthead-nav {
  display: flex;
  gap: 26px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.masthead-nav a {
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.masthead-nav a:hover {
  color: var(--hazel-deep);
  border-bottom-color: var(--hazel);
}

.masthead-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

main {
  width: var(--shell);
  margin: 0 auto;
}

/* ---------- 1. Lead (asymmetric: copy left, clinical image right) ---------- */
.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0 56px;
}

.lead h1 {
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  line-height: 1.28;
}

.lead-lede {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.82;
  max-width: 30em;
}

.lead-trust {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-trust li {
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.lead-visual {
  height: clamp(280px, 30vw, 400px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(43, 38, 32, 0.02), rgba(94, 74, 51, 0.18)),
    url("/images/hazelguide-lead.jpg") center / cover no-repeat,
    linear-gradient(150deg, #f3ece2 0%, #e7d8c5 55%, #cdb89c 100%);
  box-shadow: var(--shadow);
}

/* ---------- Section heading ---------- */
.section-head {
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--hazel-soft);
}

.section-head h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.core,
.criteria,
.recent,
.about {
  padding: 58px 0;
}

/* ---------- 2. Core guide cards ---------- */
.core-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.core-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.core-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d2c4b1;
}

.core-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.core-index {
  font-family: var(--font-hahmlet), serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--hazel);
  line-height: 1;
}

.core-topic {
  color: var(--hazel-deep);
  background: var(--hazel-soft);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.core-card h3 {
  margin: 16px 0 8px;
  font-size: 1.22rem;
}

.core-note {
  margin: 0 0 16px;
  color: var(--ink-soft);
  line-height: 1.66;
  font-size: 0.97rem;
}

.core-criteria {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.core-criteria li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.core-criteria li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--hazel);
}

.core-count {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ---------- 3. Criteria comparison table preview (signature) ---------- */
.criteria-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.criteria-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.criteria-table caption {
  caption-side: top;
  text-align: left;
  padding: 18px 22px 14px;
  font-family: var(--font-hahmlet), serif;
  font-weight: 700;
  color: var(--hazel-deep);
  background: var(--hazel-tint);
  border-bottom: 1px solid var(--line);
}

.criteria-table thead th {
  background: var(--hazel-soft);
  color: var(--hazel-deep);
  font-weight: 800;
  text-align: left;
  padding: 13px 22px;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--line);
}

.criteria-table tbody th {
  text-align: left;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.criteria-table tbody th,
.criteria-table tbody td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  color: var(--ink-soft);
  line-height: 1.6;
}

.criteria-table tbody tr:last-child th,
.criteria-table tbody tr:last-child td {
  border-bottom: 0;
}

.criteria-table tbody tr:nth-child(even) {
  background: #fdfcfa;
}

/* ---------- 4. Evidence band (warm hazel-deep, NOT black) ---------- */
.evidence-band {
  margin: 18px 0;
  padding: 52px clamp(28px, 4vw, 52px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% -20%, rgba(255, 240, 222, 0.16), transparent 22rem),
    linear-gradient(160deg, #5e4a33 0%, #46361f 100%);
  color: #f6eee2;
}

.evidence-band-head {
  margin-bottom: 30px;
}

.evidence-band-head h2 {
  color: #fbf5ec;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.evidence-item {
  border-top: 2px solid rgba(231, 214, 194, 0.4);
  padding-top: 18px;
}

.evidence-item h3 {
  margin: 0 0 10px;
  color: #fbf5ec;
  font-size: 1.12rem;
}

.evidence-item p {
  margin: 0;
  color: #e3d3c0;
  line-height: 1.74;
  font-size: 0.96rem;
}

/* ---------- 5. Recent guides (list rows, not cards) ---------- */
.recent-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.recent-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.16s ease;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-row:hover {
  background: var(--hazel-tint);
}

.recent-topic {
  align-self: start;
  color: var(--hazel-deep);
  border: 1px solid #e3d6c4;
  background: var(--hazel-soft);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: center;
}

.recent-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-body strong {
  font-family: var(--font-hahmlet), serif;
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.recent-desc {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.recent-date {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

/* ---------- 6. About ---------- */
.about-inner {
  background: var(--hazel-tint);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(28px, 4vw, 44px);
  max-width: 820px;
}

.about-inner h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin-bottom: 16px;
}

.about-text {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.82;
  font-size: 1.02rem;
}

.about-points {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.about-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 600;
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--hazel);
  border-bottom: 2px solid var(--hazel);
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  width: var(--shell);
  margin: 0 auto;
  padding: 36px 0 56px;
  color: var(--muted);
}

.footer-inner strong {
  display: block;
  font-family: var(--font-hahmlet), serif;
  color: var(--hazel-deep);
  font-size: 1.12rem;
}

.footer-desc {
  margin: 10px 0 18px;
  max-width: 520px;
  line-height: 1.66;
  font-size: 0.92rem;
}

.footer-disclosure {
  display: inline-block;
  margin: 0;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--hazel-soft);
  color: var(--hazel-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ---------- Article (single column) ---------- */
.article-shell {
  max-width: 760px;
  padding: 34px 0 80px;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.breadcrumb a:hover {
  color: var(--hazel-deep);
}

.article-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(26px, 5vw, 54px);
  box-shadow: var(--shadow-soft);
}

.article-topic {
  display: inline-block;
  color: var(--hazel-deep);
  background: var(--hazel-soft);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.article-head h1 {
  margin: 16px 0 0;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.3;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 핵심 답변 panel (left hazel bar + tint) */
.answer-panel {
  margin: 28px 0 8px;
  padding: 22px 26px 22px 24px;
  background: var(--hazel-tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--hazel);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.answer-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--hazel-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.answer-panel p {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.76;
}

.article-content {
  margin-top: 30px;
  color: #322c25;
  font-size: 1.05rem;
  line-height: 1.88;
}

.article-content h2 {
  margin: 44px 0 14px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  padding-left: 14px;
  border-left: 4px solid var(--hazel);
}

.article-content p {
  margin: 0 0 18px;
}

.article-content a {
  color: var(--hazel-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--hazel);
  text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.article-content ul li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  line-height: 1.66;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--hazel);
  border-bottom: 2px solid var(--hazel);
  transform: rotate(-45deg);
}

.article-content ol {
  counter-reset: ol;
}

.article-content ol li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
  line-height: 1.66;
  counter-increment: ol;
}

.article-content ol li::before {
  content: counter(ol);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hazel-deep);
  font-weight: 800;
}

/* Inline 근거 callout box (signature) */
.article-content aside.evidence {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--hazel-soft);
  border: 1px solid #e4d6c3;
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
}

.article-content aside.evidence .evidence-label {
  justify-self: start;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--hazel-deep);
  color: #f7eee2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.article-content aside.evidence p {
  margin: 0;
  color: var(--hazel-deep);
  font-size: 0.97rem;
  line-height: 1.7;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 8px 0 8px 26px;
  border-left: 3px solid var(--hazel);
  color: var(--hazel-deep);
  font-family: var(--font-hahmlet), serif;
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.62;
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  font-size: 0.96rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.article-content th,
.article-content td {
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
}

.article-content th:last-child,
.article-content td:last-child {
  border-right: 0;
}

.article-content tbody tr:last-child td {
  border-bottom: 0;
}

.article-content thead th {
  background: var(--hazel-soft);
  color: var(--hazel-deep);
  font-weight: 800;
}

.article-content tbody tr:nth-child(even) {
  background: #fdfcfa;
}

/* FAQ + source */
.faq-section,
.source-note {
  margin-top: 42px;
}

.faq-section h2,
.source-note h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin-bottom: 10px;
}

.faq-section details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  gap: 10px;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::before {
  content: "Q";
  color: var(--hazel);
  font-family: var(--font-hahmlet), serif;
  font-weight: 700;
}

.faq-section details p,
.source-note p {
  color: var(--ink-soft);
  line-height: 1.76;
}

.faq-section details p {
  margin: 10px 0 0 1.5em;
}

.source-note {
  padding: 22px 24px;
  background: var(--hazel-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-foot {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hazel-deep);
  font-weight: 800;
}

.back-link::before {
  content: "←";
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .lead {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 52px 0 40px;
  }

  .lead-visual {
    order: -1;
  }

  .core-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .recent-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .recent-topic {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .masthead-nav {
    gap: 18px;
  }

  .criteria-table-wrap,
  .article-content table {
    overflow-x: auto;
  }

  .criteria-table,
  .article-content table {
    min-width: 520px;
  }
}
