:root {
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --hairline: #e8e8ed;
  --stage: #f5f5f7;
  --link: #0066cc;
  --accent: #0071e3;
  --r12: 12px;
  --r18: 18px;
  --col: 720px;
  --wide: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

img { display: block; max-width: 100%; height: auto; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 20; background: #fff; padding: 8px 12px; border-radius: var(--r12); }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top);
}
.nav-in {
  max-width: var(--wide);
  height: 52px;
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 20px; width: auto; }
.nav nav { display: flex; gap: 0; margin-right: -10px; }
.nav nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 15px;
}
.nav nav a[aria-current="page"] { font-weight: 600; }

main { padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }

/* Article */
.post { max-width: var(--col); margin: 0 auto; padding: 40px 0 72px; }
.eyebrow { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.eyebrow a { color: var(--muted); }
h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 7.4vw, 48px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead { margin: 0 0 16px; font-size: 19px; line-height: 1.68; color: var(--ink-2); text-wrap: pretty; }
.meta { margin: 0; font-size: 14px; color: var(--faint); }

figure { margin: 32px 0; }
figure img { border-radius: var(--r18); background: var(--stage); width: 100%; }
figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.wide { width: min(var(--wide), 100vw - 40px); margin-left: 50%; transform: translateX(-50%); }

.prose h2 {
  margin: 56px 0 14px;
  font-size: 24px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.prose h3 { margin: 32px 0 8px; font-size: 19px; line-height: 1.45; font-weight: 700; letter-spacing: -0.015em; }
.prose p { margin: 0 0 16px; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.25em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--faint); }
.prose strong { font-weight: 650; }

.note {
  margin: 28px 0;
  padding: 16px 18px;
  border-radius: var(--r12);
  background: var(--stage);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.62;
}
.note p { margin: 0; }
.small { font-size: 15px; color: var(--muted); }

.slogan {
  margin: 24px 0;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Tables */
.table-wrap { margin: 8px 0 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.6; }
.table-wrap table { min-width: 580px; }
th, td { padding: 13px 14px 13px 0; text-align: left; vertical-align: top; }
thead th { font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
tbody tr + tr th, tbody tr + tr td { border-top: 1px solid var(--hairline); }
.facts th { width: 6.5em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.facts td { padding-right: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; margin-bottom: 28px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }

/* FAQ */
.faq { margin-top: 64px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.faq h2 { margin-top: 40px; }
.faq h3 { margin: 28px 0 6px; font-size: 18px; }
.faq p { margin: 0; color: var(--ink-2); }

.related { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.related h2 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.related a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; font-size: 17px; }
.related a + a { border-top: 1px solid var(--hairline); }

.updated { margin-top: 40px; font-size: 14px; color: var(--faint); }

/* Home */
.home { max-width: var(--col); margin: 0 auto; padding: 48px 0 72px; }
.home h1 { margin-bottom: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 24px 0 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.pill:hover { background: #000; text-decoration: none; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }
.home h2 { margin: 56px 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.posts { margin: 0; padding: 0; list-style: none; }
.posts li { border-top: 1px solid var(--hairline); }
.posts li:first-child { border-top: 0; }
.posts a { display: block; padding: 20px 0; color: var(--ink); }
.posts a:hover { text-decoration: none; }
.posts a:hover .t { color: var(--link); }
.posts .t { display: block; font-size: 20px; line-height: 1.45; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.posts .s { display: block; margin-top: 6px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.posts .d { display: block; margin-top: 8px; font-size: 14px; color: var(--faint); }

/* Footer */
footer {
  background: var(--stage);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  padding: 36px max(20px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.foot-in { max-width: var(--wide); margin: 0 auto; }
.foot-in p { margin: 0 0 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 0 12px; }
.foot-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--ink-2); }

.hero-bleed img { aspect-ratio: 16 / 9; object-fit: cover; }

@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .hero-bleed img { aspect-ratio: 4 / 3; }
  .table-wrap { overflow: visible; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { display: block; padding: 14px 0; }
  .table-wrap tbody tr + tr { border-top: 1px solid var(--hairline); }
  .table-wrap td { display: block; padding: 2px 0; border-top: 0 !important; }
  .table-wrap td:first-child { font-weight: 700; font-size: 17px; padding-bottom: 4px; }
  .table-wrap td[data-label]:not(:first-child)::before { content: attr(data-label) " · "; color: var(--muted); font-size: 14px; }
  .hero-bleed { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
  .hero-bleed img { border-radius: 0; }
  .hero-bleed figcaption { padding: 0 20px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  .post { padding-top: 64px; }
  .home { padding-top: 80px; }
  .lead { font-size: 21px; }
  .prose h2 { font-size: 28px; }
  .prose h3 { font-size: 20px; }
}
