:root {
  --navy-900: #05101d;
  --navy-800: #0b1d33;
  --navy-700: #112846;
  --navy-600: #17355b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eef6;
  --text-dim: #a9bad0;
  --text-mute: #7f93ac;
  --blue: #2f8fff;
  --blue-dark: #1266d6;
  --green: #22c55e;
  --green-dark: #16a34a;
  --gold: #f5b93a;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1200px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--navy-900);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 16, 29, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 15px; color: #fff; letter-spacing: 0.4px; }
.brand-sub { font-size: 11px; color: var(--text-mute); }

.primary-nav { flex: 1; min-width: 0; }
.nav-list {
  display: flex; flex-wrap: wrap; gap: 2px;
  list-style: none; margin: 0; padding: 0; justify-content: flex-end;
}
.nav-link {
  display: block; padding: 7px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-dim); white-space: nowrap;
}
.nav-link:hover { background: var(--navy-700); color: #fff; text-decoration: none; }
.nav-link.is-current { background: var(--navy-600); color: #fff; }

.header-cta {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
}
.header-cta:hover { text-decoration: none; filter: brightness(1.1); }

.nav-toggle {
  display: none; margin-left: auto;
  background: var(--navy-700); border: 1px solid var(--line-strong);
  border-radius: 8px; width: 40px; height: 36px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 420px at 15% -10%, rgba(47, 143, 255, 0.22), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-bottom: 1px solid var(--line);
  padding: 34px 0 42px;
}

.hero-inner {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: center;
}

.breadcrumbs { margin-bottom: 12px; }
.breadcrumb-list {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0;
  font-size: 12.5px; color: var(--text-mute);
}
.breadcrumb-list li + li::before { content: "/"; margin-right: 8px; color: var(--text-mute); }
.breadcrumb-list a { color: var(--text-dim); }

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(25px, 3.4vw, 40px);
  line-height: 1.28; font-weight: 800; color: #fff; letter-spacing: -0.4px;
}

.hero-updated { margin: 0 0 20px; font-size: 13px; color: var(--text-mute); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-hint {
  margin: 18px 0 0; font-size: 14px; color: var(--text-dim);
  background: rgba(245, 185, 58, 0.09);
  border: 1px dashed rgba(245, 185, 58, 0.4);
  border-radius: var(--radius-sm); padding: 12px 14px;
}

.inline-code {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--gold); color: #201700; padding: 1px 9px; border-radius: 6px;
  font-size: 15px; letter-spacing: 1.5px; font-weight: 800;
}

.hero-figure { margin: 0; }
.hero-image {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}
.hero-caption { margin-top: 9px; font-size: 12px; color: var(--text-mute); text-align: center; }

/* ---------- CTA ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-align: center;
  border: 1px solid transparent; transition: transform 0.15s ease, filter 0.15s ease;
}
.cta:hover { text-decoration: none; filter: brightness(1.1); transform: translateY(-1px); }
.cta-main { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; }
.cta-app { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #04250f; }
.cta-block { display: flex; width: 100%; }
.cta-block + .cta-block { margin-top: 10px; }

/* ---------- Layout ---------- */
.content-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px;
  padding-top: 38px; padding-bottom: 56px; align-items: start;
}

.article { min-width: 0; }

.lead {
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 26px;
}
.lead-paragraph { margin: 0 0 12px; color: var(--text-dim); font-size: 15.5px; }
.lead-paragraph:last-child { margin-bottom: 0; }

.toc {
  background: var(--navy-800); border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 30px;
}
.toc-title { margin: 0 0 10px; font-size: 15px; color: #fff; font-weight: 700; }
.toc-list { margin: 0; padding-left: 20px; columns: 2; column-gap: 26px; }
.toc-list li { margin-bottom: 6px; font-size: 14px; break-inside: avoid; }
.toc-list a { color: var(--text-dim); }
.toc-list a:hover { color: var(--blue); }

.content-section { margin-bottom: 34px; scroll-margin-top: 88px; }

.section-title {
  margin: 0 0 14px; font-size: clamp(20px, 2.3vw, 26px);
  font-weight: 800; color: #fff; line-height: 1.35;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}

.paragraph { margin: 0 0 14px; color: var(--text-dim); font-size: 15.8px; }

.content-list { margin: 0 0 16px; padding-left: 22px; color: var(--text-dim); }
.content-list li { margin-bottom: 9px; font-size: 15.5px; }
.content-list-ordered { list-style: decimal; }

.note {
  background: rgba(47, 143, 255, 0.09);
  border: 1px solid rgba(47, 143, 255, 0.28);
  border-radius: var(--radius-sm); padding: 15px 18px; margin: 0 0 18px;
}
.note-title { margin: 0 0 6px; font-weight: 700; color: #fff; font-size: 15px; }
.note-text { margin: 0; color: var(--text-dim); font-size: 15px; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 14.5px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--navy-700); color: #fff; font-weight: 700; white-space: nowrap; }
.data-table tbody th { color: #fff; font-weight: 700; background: rgba(255, 255, 255, 0.02); }
.data-table td { color: var(--text-dim); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: none; }

.inline-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 6px; }

/* ---------- Bonus box ---------- */
.bonus-box {
  margin: 22px 0;
  background: linear-gradient(135deg, rgba(245, 185, 58, 0.14), rgba(47, 143, 255, 0.1));
  border: 1px solid rgba(245, 185, 58, 0.42);
  border-radius: var(--radius); padding: 20px 22px;
}
.bonus-box-title { margin: 0 0 10px; font-weight: 800; color: #fff; font-size: 17px; }
.bonus-box-code { margin: 0 0 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bonus-code-label { font-size: 13px; color: var(--text-mute); }
.bonus-code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--gold); color: #201700;
  padding: 6px 20px; border-radius: 8px;
  font-size: 22px; letter-spacing: 3px; font-weight: 800;
}
.bonus-box-text { margin: 0 0 16px; color: var(--text-dim); font-size: 15px; }
.bonus-box-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Hub grid ---------- */
.hub { margin-bottom: 34px; }
.hub-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hub-card { display: flex; }
.hub-link {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; transition: border-color 0.15s ease, transform 0.15s ease;
}
.hub-link:hover { text-decoration: none; border-color: var(--blue); transform: translateY(-2px); }
.hub-index { font-size: 12px; color: var(--blue); font-weight: 800; letter-spacing: 1px; }
.hub-name { font-size: 16.5px; font-weight: 700; color: #fff; }
.hub-desc { font-size: 13.5px; color: var(--text-mute); line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq-section { margin-bottom: 34px; scroll-margin-top: 88px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; }
.faq-question {
  cursor: pointer; list-style: none; padding: 15px 44px 15px 18px; position: relative;
  font-weight: 700; color: #fff; font-size: 15.5px;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq-item[open] .faq-question::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-answer { margin: 0; padding: 0 18px 16px; color: var(--text-dim); font-size: 15px; }

/* ---------- Final CTA ---------- */
.final-cta {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 24px 24px 26px; margin-bottom: 34px;
}
.final-cta .section-title { border-bottom: none; padding-bottom: 4px; }
.final-cta-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }

/* ---------- Related ---------- */
.related { margin-bottom: 10px; }
.related-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-link {
  display: flex; flex-direction: column; gap: 5px; height: 100%;
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.related-link:hover { text-decoration: none; border-color: var(--blue); }
.related-name { font-weight: 700; color: #fff; font-size: 15px; }
.related-desc { font-size: 12.5px; color: var(--text-mute); line-height: 1.55; }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.widget { background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.widget-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #fff; }
.widget-text { margin: 0 0 14px; font-size: 13.5px; color: var(--text-mute); }
.widget-cta { border-color: rgba(47, 143, 255, 0.35); background: linear-gradient(160deg, rgba(47, 143, 255, 0.12), var(--navy-800)); }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { border-bottom: 1px solid var(--line); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { display: block; padding: 9px 0; font-size: 14px; color: var(--text-dim); }
.widget-list a:hover { color: var(--blue); text-decoration: none; }
.widget-list a.is-current { color: #fff; font-weight: 700; }
.widget-steps { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14px; }
.widget-steps li { margin-bottom: 7px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-800); border-top: 1px solid var(--line); margin-top: 10px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 38px; padding-bottom: 30px; }
.footer-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #fff; }
.footer-text { margin: 0 0 10px; font-size: 13.5px; color: var(--text-mute); line-height: 1.7; }
.footer-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.footer-list li { margin-bottom: 7px; break-inside: avoid; }
.footer-list a { font-size: 13.5px; color: var(--text-dim); }
.footer-actions { display: flex; flex-direction: column; }
.footer-note { margin: 14px 0 0; font-size: 12.5px; color: var(--text-mute); line-height: 1.65; }
.footer-bottom { border-top: 1px solid var(--line); padding: 14px 0; }
.footer-bottom p { margin: 0; font-size: 12.5px; color: var(--text-mute); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .widget { flex: 1 1 280px; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none; order: 10; flex-basis: 100%; width: 100%;
    border-top: 1px solid var(--line); padding: 10px 0 12px;
  }
  .primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; justify-content: flex-start; gap: 2px; }
  .nav-link { padding: 11px 12px; font-size: 15px; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { order: 5; margin-left: auto; }
  .hub-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 620px) {
  body { font-size: 15.5px; }
  .container { padding: 0 15px; }
  .hero { padding: 22px 0 30px; }
  .toc-list { columns: 1; }
  .inline-cta, .bonus-box-actions, .final-cta-actions { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .cta { width: 100%; }
  .bonus-code-value { font-size: 19px; padding: 5px 15px; }
  .footer-list { columns: 1; }
}
