/* Article shell: the site's header, footer and page frame around a preserved .post-body.
   Tokens and shared component rules mirror methods/index.html. No selector here reaches
   inside .post-body; the article's own stylesheet owns that subtree. */
:root {
  --bg: #f8f5ef;
  --paper: #fffdf8;
  --paper-soft: #fbf8f1;
  --ink: #24211e;
  --ink-soft: #413a33;
  --muted: #665d53;
  --muted-light: #766c60;
  --brand: #704a2b;
  --brand-dark: #3d2a1d;
  --brand-soft: #efe2d1;
  --gold: #8a6a3f;
  --line: #e4dbcf;
  --line-dark: #cdbba8;
  --white: #ffffff;
  --max: 1160px;
  --post-max: 720px;
  --post-inset: 20px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}

:where(:not(.post-body, .post-body *)) { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 6%, rgba(112, 74, 43, .085), transparent 29rem),
    radial-gradient(circle at 94% 2%, rgba(176, 138, 91, .12), transparent 28rem),
    linear-gradient(180deg, #fbf8f1 0%, #f8f5ef 54%, #f4eee4 100%);
  line-height: 1.62;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:where(.site-header, .site-footer, .mobile-cta-bar, .post-head, .post-foot) a { color: inherit; text-decoration: none; }
.skip-link {
  position: fixed;
  top: 12px;
  left: -999px;
  z-index: 1000;
  color: var(--white);
  background: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: left .2s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  pointer-events: none;
}

.nav {
  width: min(var(--max), calc(100% - 40px));
  min-height: var(--nav-h);
  margin: 0 auto;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(228, 219, 207, .76);
  background: rgba(255, 253, 248, .78);
  backdrop-filter: blur(22px) saturate(145%);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(61, 42, 29, .06);
  pointer-events: auto;
}

.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo { width: 188px; height: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(36, 33, 30, .74);
  font-size: 14px;
  letter-spacing: -.01em;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand-dark);
  background: rgba(112, 74, 43, .075);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 21px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 3px; }
.btn.primary {
  background: var(--brand-dark);
  color: #fffaf1;
  box-shadow: 0 12px 26px rgba(61, 42, 29, .14);
}
.btn.primary:hover { background: #2f2118; }
.btn.secondary {
  color: var(--brand-dark);
  border-color: rgba(112, 74, 43, .26);
  background: rgba(255, 253, 248, .58);
}
.btn.secondary:hover { background: rgba(239, 226, 209, .62); border-color: rgba(112, 74, 43, .38); }

main { position: relative; }

.post-shell { padding-bottom: clamp(24px, 4vw, 48px); }

.post-head {
  width: min(var(--post-max), 100%);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--post-inset) clamp(26px, 4vw, 40px);
}

.post-category {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .02em;
}

.post-title {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 700;
  text-wrap: balance;
}

.post-meta {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.01em;
}
.post-meta time { font-variant-numeric: tabular-nums; }
.post-head .post-source {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--line-dark);
  text-underline-offset: .2em;
}
.post-head .post-source:hover,
.post-head .post-source:focus-visible { text-decoration-color: var(--brand); }

/* Inheritance boundary: every text property the page frame sets on body is returned to the
   browser default here, so the preserved article inherits nothing from the shell. */
.post-body-host {
  width: 100%;
  margin: 0;
  padding: 0;
  color: #000000;
  font: 400 16px/normal sans-serif;
  letter-spacing: normal;
  word-spacing: normal;
  word-break: normal;
  overflow-wrap: normal;
  line-break: auto;
  hyphens: manual;
  text-align: start;
  text-indent: 0;
  text-transform: none;
  text-shadow: none;
  text-rendering: auto;
  -webkit-font-smoothing: auto;
  font-kerning: auto;
  font-variant: normal;
  font-feature-settings: normal;
  direction: ltr;
}

.post-foot {
  width: min(var(--post-max), 100%);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) var(--post-inset) 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.site-footer p { margin: 0; }
.footer-logo {
  width: 190px;
  height: auto;
  display: block;
  margin-bottom: 18px;
  mix-blend-mode: multiply;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-contact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.7;
}
.footer-contact span { display: inline-flex; align-items: baseline; gap: 6px; }
.footer-contact strong { color: var(--muted); font-weight: 700; }

:where(.site-header, .site-footer, .mobile-cta-bar, .post-head, .post-foot) :is(a, button):focus-visible,
.skip-link:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 3px; }

@media (max-width: 1040px) {
  .nav { width: min(100% - 28px, var(--max)); }
  .nav-links { display: none; }
}

@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  .site-header { padding-top: 10px; }
  .nav { padding: 8px 10px 8px 14px; }
  .brand-logo { width: 168px; }
  .btn { min-height: 42px; padding: 10px 15px; font-size: 14px; }
  .post-head { padding-top: 30px; }
  .post-foot .btn { flex: 1 1 180px; }
  .site-footer { width: calc(100% - 28px); grid-template-columns: 1fr; padding-bottom: 42px; }
  .footer-links { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skip-link, .nav-links a, .btn { transition: none; }
  .btn:hover { transform: none; }
}
