:root {
  --guide-bg: #05070b;
  --guide-surface: #0b0f16;
  --guide-surface-raised: #111722;
  --guide-fg: #f4f6f8;
  --guide-muted: #a9b0ba;
  --guide-primary: #ff8a34;
  --guide-primary-strong: #f3731a;
  --guide-border: rgba(255, 255, 255, 0.13);
  --guide-border-strong: rgba(255, 255, 255, 0.24);
  --guide-ring: rgba(255, 138, 52, 0.45);
  --guide-max: 1180px;
  --guide-radius: 8px;
  --guide-space-2: 8px;
  --guide-space-3: 12px;
  --guide-space-4: 16px;
  --guide-space-5: 20px;
  --guide-space-6: 24px;
  --guide-space-8: 32px;
  --guide-space-10: 40px;
  --guide-space-12: 48px;
  --guide-space-16: 64px;
  --guide-space-20: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--guide-bg);
  color: var(--guide-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", "Noto Sans KR", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--guide-ring);
  outline-offset: 2px;
}
.en-shell { width: min(var(--guide-max), calc(100% - 40px)); margin: 0 auto; }

.en-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 7, 11, 0.9);
  border-bottom: 1px solid var(--guide-border);
  backdrop-filter: blur(16px);
}
.en-header nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--guide-space-6);
}
.en-brand { font-size: 1.05rem; font-weight: 850; }
.en-brand span {
  margin-left: var(--guide-space-2);
  padding: 3px var(--guide-space-2);
  border-radius: 4px;
  background: var(--guide-primary);
  color: #05070b;
  font-size: 0.7rem;
}
.en-header nav div { display: flex; align-items: center; gap: 4px; }
.en-header nav div a {
  padding: var(--guide-space-2) var(--guide-space-3);
  border-radius: var(--guide-radius);
  color: var(--guide-muted);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.en-header nav div a:hover,
.en-header nav div a[aria-current="page"] { background: var(--guide-surface-raised); color: var(--guide-fg); }

.en-home { padding: var(--guide-space-20) 0 120px; }
.en-hero {
  min-height: 500px;
  padding: var(--guide-space-16) 0 90px;
  border-bottom: 1px solid var(--guide-border);
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  align-items: end;
  gap: 50px;
}
.en-hero p,
.guide-index > header p,
.article-head > p {
  margin: 0;
  color: var(--guide-primary);
  font-size: 0.78rem;
  font-weight: 800;
}
.en-hero h1 {
  margin: var(--guide-space-5) 0 0;
  font-size: clamp(4rem, 10vw, 8.4rem);
  line-height: 0.86;
}
.en-hero > span { max-width: 440px; margin-bottom: var(--guide-space-2); color: var(--guide-muted); font-size: 1.1rem; }
.en-board { padding: 72px 0; border-bottom: 1px solid var(--guide-border); }
.en-board > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--guide-space-5);
  margin-bottom: var(--guide-space-8);
}
.en-board header p { display: none; }
.en-board h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.3rem); line-height: 1.1; }
.en-board > header a { color: var(--guide-primary); font-size: 0.86rem; font-weight: 750; }
.board-subtitle {
  margin: var(--guide-space-10) 0 var(--guide-space-5);
  color: var(--guide-muted);
  font-size: 0.86rem;
  font-weight: 750;
}
.en-board > header + .board-subtitle { margin-top: 0; }

.feature-row,
.guide-row {
  border-top: 1px solid var(--guide-border);
  transition: background 180ms ease-out, transform 180ms ease-out, border-color 180ms ease-out;
}
.feature-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--guide-space-6);
  padding: var(--guide-space-6) var(--guide-space-2);
}
.feature-row:hover,
.guide-row:hover { background: var(--guide-surface); border-color: var(--guide-border-strong); transform: translateX(4px); }
.feature-row strong { font-size: 1.3rem; }
.feature-row span { grid-row: 2; color: var(--guide-muted); }
.feature-row em { grid-row: 1 / 3; grid-column: 2; color: var(--guide-primary); font-style: normal; font-weight: 750; }

.guide-row {
  display: grid;
  grid-template-columns: 42px 168px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--guide-space-5);
  padding: var(--guide-space-5) var(--guide-space-2);
}
.guide-number { color: var(--guide-muted); font-size: 0.78rem; font-weight: 800; }
.guide-row img { width: 168px; height: 95px; border-radius: var(--guide-radius); object-fit: cover; background: var(--guide-surface); }
.guide-row > span:nth-of-type(2) { display: grid; gap: 5px; min-width: 0; }
.guide-row strong { font-size: 1.12rem; line-height: 1.3; }
.guide-row small { color: var(--guide-muted); font-size: 0.9rem; line-height: 1.45; }
.guide-row em { color: var(--guide-primary); font-style: normal; font-weight: 750; white-space: nowrap; }

.crumb { margin: 0 0 var(--guide-space-10); color: var(--guide-muted); font-size: 0.82rem; }
.crumb a { text-decoration: underline; text-underline-offset: 4px; }
.guide-index { padding: 52px 0 120px; }
.guide-index > header { max-width: 820px; margin-bottom: var(--guide-space-16); }
.guide-index > header h1 { margin: var(--guide-space-3) 0 var(--guide-space-4); font-size: clamp(3.2rem, 8vw, 6.6rem); line-height: 0.95; }
.guide-index > header span { color: var(--guide-muted); font-size: 1.08rem; }
.guide-list { border-bottom: 1px solid var(--guide-border); }
.topic-section { margin-bottom: var(--guide-space-20); }
.topic-section > header {
  margin-bottom: var(--guide-space-5);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--guide-space-5);
}
.topic-section h2,
.all-guides-title { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.topic-section > header a { color: var(--guide-primary); font-size: 0.86rem; font-weight: 750; }
.all-guides-title { margin-bottom: var(--guide-space-5); }
.topic-board { border-bottom: 1px solid var(--guide-border); }
.topic-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--guide-space-5);
  padding: var(--guide-space-5) var(--guide-space-2);
  border-top: 1px solid var(--guide-border);
  transition: background 180ms ease-out, transform 180ms ease-out, border-color 180ms ease-out;
}
.topic-row:hover { background: var(--guide-surface); border-color: var(--guide-border-strong); transform: translateX(4px); }
.topic-row > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.topic-row strong { font-size: 1.12rem; line-height: 1.3; }
.topic-row small { color: var(--guide-muted); font-size: 0.9rem; line-height: 1.45; }
.topic-row em { color: var(--guide-primary); font-style: normal; font-weight: 750; white-space: nowrap; }
.topic-index > header h1 { overflow-wrap: anywhere; }
.topic-switcher {
  margin-top: var(--guide-space-20);
  padding-top: var(--guide-space-6);
  border-top: 1px solid var(--guide-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--guide-space-3) var(--guide-space-5);
}
.topic-switcher strong { width: 100%; font-size: 0.9rem; }
.topic-switcher a { color: var(--guide-primary); font-size: 0.86rem; font-weight: 700; }

.article-layout {
  padding: 52px 0 120px;
  display: grid;
  grid-template-columns: minmax(0, 820px) 250px;
  justify-content: space-between;
  gap: 72px;
}
.article-head { padding-bottom: var(--guide-space-10); border-bottom: 1px solid var(--guide-border); }
.article-head h1 { margin: var(--guide-space-4) 0; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 0.98; overflow-wrap: anywhere; }
.article-head > span { display: block; max-width: 720px; color: var(--guide-muted); font-size: 1.14rem; }
.article-topics {
  margin-top: var(--guide-space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--guide-space-2) var(--guide-space-4);
  font-size: 0.82rem;
}
.article-topics strong { color: var(--guide-muted); }
.article-topics a { color: var(--guide-primary); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.article-hero { margin: var(--guide-space-10) 0 var(--guide-space-16); }
.article-hero img { display: block; width: 100%; height: auto; border-radius: var(--guide-radius); background: var(--guide-surface); }
.article-hero figcaption { margin-top: var(--guide-space-2); color: var(--guide-muted); font-size: 0.76rem; }
.article-body > .article-intro { margin: 0 0 var(--guide-space-16); color: var(--guide-fg); font-size: 1.3rem; line-height: 1.55; }
.article-body h2,
.article-body h3 { scroll-margin-top: 100px; position: relative; }
.article-body h2 { margin: var(--guide-space-20) 0 var(--guide-space-6); padding-top: var(--guide-space-12); border-top: 1px solid var(--guide-border); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.article-body h3 { margin: var(--guide-space-10) 0 var(--guide-space-4); font-size: 1.45rem; line-height: 1.25; }
.heading-link { margin-left: var(--guide-space-3); color: var(--guide-muted); font-size: 0.65em; opacity: 0; }
.article-body h2:hover .heading-link,
.article-body h3:hover .heading-link,
.heading-link:focus-visible { opacity: 1; }
.article-body p,
.article-body li { font-size: 1.02rem; }
.article-body p { margin: var(--guide-space-4) 0; }
.article-body ul,
.article-body ol { margin: var(--guide-space-5) 0; padding-left: 1.45rem; }
.article-body li + li { margin-top: var(--guide-space-2); }
.article-body a { color: var(--guide-primary); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article-body code { padding: 2px 5px; border-radius: 4px; background: var(--guide-surface-raised); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; word-break: break-word; }
.article-body pre { overflow: auto; margin: var(--guide-space-6) 0; padding: var(--guide-space-6); border: 1px solid var(--guide-border); border-radius: var(--guide-radius); background: var(--guide-surface); color: var(--guide-fg); line-height: 1.55; }
.article-body pre code { padding: 0; background: transparent; font-size: 0.82rem; }
.article-body blockquote { margin: var(--guide-space-6) 0; padding: var(--guide-space-4) var(--guide-space-5); border-left: 4px solid var(--guide-primary); background: var(--guide-surface); color: var(--guide-muted); }
.table-scroll { overflow-x: auto; margin: var(--guide-space-6) 0; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th,
td { padding: var(--guide-space-3) var(--guide-space-4); border: 1px solid var(--guide-border); text-align: left; vertical-align: top; }
th { background: var(--guide-surface-raised); font-size: 0.82rem; }
td { background: var(--guide-surface); }
.article-ad { min-height: 180px; margin: var(--guide-space-16) 0; border-top: 1px solid var(--guide-border); border-bottom: 1px solid var(--guide-border); display: grid; place-items: center; color: var(--guide-muted); }
.article-ad span { font-size: 0.72rem; }
.related-guides { padding-top: var(--guide-space-20); }
.related-guides h2 { margin: 0 0 var(--guide-space-5); font-size: 2rem; }
.related-guides > a { display: grid; grid-template-columns: 160px 1fr; gap: var(--guide-space-5); padding: var(--guide-space-4) 0; border-top: 1px solid var(--guide-border); font-weight: 700; }
.related-guides > a span { color: var(--guide-primary); font-size: 0.82rem; }
.article-toc { position: sticky; top: 108px; height: max-content; padding-left: var(--guide-space-5); border-left: 1px solid var(--guide-border); display: grid; gap: var(--guide-space-3); font-size: 0.78rem; color: var(--guide-muted); }
.article-toc strong { margin-bottom: 4px; color: var(--guide-fg); }
.article-toc a:hover { color: var(--guide-fg); }

.en-footer { border-top: 1px solid var(--guide-border); padding: var(--guide-space-8) 0; color: var(--guide-muted); font-size: 0.8rem; }
.en-footer > div { display: flex; justify-content: space-between; gap: var(--guide-space-6); }
.en-footer div div { display: flex; gap: var(--guide-space-5); }

@media (max-width: 900px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: var(--guide-space-10); }
}

@media (max-width: 760px) {
  .en-shell { width: min(calc(100% - 28px), var(--guide-max)); }
  .en-header nav { min-height: 64px; }
  .en-header nav div a { display: none; }
  .en-header nav div a:last-child { display: block; }
  .en-home { padding-top: var(--guide-space-8); }
  .en-hero { min-height: 500px; padding: 36px 0 var(--guide-space-16); grid-template-columns: 1fr; align-content: end; gap: 36px; }
  .en-hero h1 { font-size: clamp(3.7rem, 18vw, 6rem); }
  .en-board { padding: 52px 0; }
  .feature-row { grid-template-columns: 1fr; padding: var(--guide-space-5) 4px; }
  .feature-row em { grid-column: 1; grid-row: auto; }
  .guide-row { grid-template-columns: 32px 88px minmax(0, 1fr); gap: var(--guide-space-3); padding: var(--guide-space-4) 4px; }
  .guide-row img { width: 88px; height: 66px; }
  .guide-row strong { font-size: 0.96rem; }
  .guide-row small { font-size: 0.78rem; }
  .guide-row em { display: none; }
  .topic-section > header { align-items: flex-end; }
  .topic-row { grid-template-columns: 32px minmax(0, 1fr); gap: var(--guide-space-3); padding: var(--guide-space-4) 4px; }
  .topic-row strong { font-size: 0.96rem; }
  .topic-row small { font-size: 0.78rem; }
  .topic-row em { display: none; }
  .guide-index { padding-top: 34px; }
  .article-layout { padding-top: 34px; display: block; }
  .article-toc { display: none; }
  .article-head h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .article-body > .article-intro { font-size: 1.15rem; }
  .article-body h2 { margin-top: var(--guide-space-16); padding-top: var(--guide-space-10); }
  .article-body pre { margin-left: -14px; margin-right: -14px; border-radius: 0; }
  .related-guides > a { grid-template-columns: 1fr; gap: 4px; }
  .en-footer > div,
  .en-footer div div { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; transform: none !important; }
}
