:root {
  --page-bg: #090f1f;
  --header-bg: #121a2c;
  --content-bg: #0d1527;
  --gold: #f3bf37;
  --gold-soft: #ffe47a;
  --green: #16b35c;
  --teal: #39d0c3;
  --text: #ffffff;
  --muted: #d2d5dd;
  --border: #26334c;
  --shadow: 0 24px 60px rgb(0 0 0 / 24%);
  --content-width: 1150px;
  --reading-width: 920px;
  --radius: 6px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Noto Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgb(57 208 195 / 7%), transparent 28rem),
    radial-gradient(circle at 88% 32%, rgb(243 191 55 / 5%), transparent 26rem);
  content: "";
  pointer-events: none;
}

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-radius: 3px;
  outline: 3px solid var(--gold-soft);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  transform: translateY(-160%);
  border-radius: var(--radius);
  background: var(--gold-soft);
  color: #09101e;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgb(18 26 44 / 96%);
  backdrop-filter: blur(14px);
}

.header-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: min(100%, 1440px);
  min-height: 66px;
  margin: 0 auto;
  padding: 0 32px;
  column-gap: clamp(32px, 5vw, 76px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  text-decoration: none;
}

.site-brand::after {
  width: 8px;
  height: 8px;
  margin: 15px 0 0 8px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.site-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 62px);
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 44px);
  max-width: 610px;
}

.primary-menu a,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--text);
}

.header-cta {
  min-width: 112px;
  padding: 0 20px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: #04190d;
}

.header-cta:hover {
  background: #29ca72;
  color: #04190d;
}

.menu-toggle {
  display: none;
}

.site-main {
  min-height: 60vh;
}

.content-shell,
.reading-shell,
.footer-shell {
  width: min(calc(100% - 48px), var(--content-width));
  margin-inline: auto;
}

.reading-shell {
  width: min(calc(100% - 48px), var(--reading-width));
}

.article-header {
  padding-top: clamp(52px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 68px);
  text-align: center;
}

.article-header h1 {
  max-width: 940px;
  margin: 0 auto;
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.breadcrumb {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  margin-right: 8px;
  color: #aeb6c7;
  content: ">";
}

.breadcrumb a {
  min-height: 44px;
  padding-block: 10px;
}

.article-intro {
  max-width: 820px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.65;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 30px;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: #141008;
  font-weight: 900;
  text-decoration: none;
}

.button-link:hover {
  background: var(--gold-soft);
  color: #141008;
}

.article-body {
  padding-bottom: 78px;
}

.hero-secondary-action {
  margin: 0 0 34px;
  text-align: center;
}

.hero-secondary-action .button-link {
  margin-top: 0;
  border-color: var(--border);
  background: var(--content-bg);
  color: var(--text);
}

.article-body > section,
.article-body > .page-section {
  margin-top: 0;
  padding-block: 48px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.article-body > section:first-child,
.article-body > .page-section:first-child {
  border-top: 0;
}

.article-body h2 {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.article-body h3 {
  margin: 32px 0 12px;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.28;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-body strong {
  color: var(--text);
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 10px;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  font-weight: 800;
}

.inline-link::after {
  margin-left: 8px;
  content: "→";
}

.content-figure {
  margin: 34px 0 12px;
}

.editorial-image {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--content-bg);
  box-shadow: var(--shadow);
}

.content-figure figcaption {
  margin-top: 10px;
  color: #aeb6c7;
  font-size: 14px;
}

.table-scroll {
  overflow-x: auto;
  margin: 30px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--content-bg);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #151f34;
  color: var(--text);
  font-size: 14px;
}

td {
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

.steps {
  margin: 28px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 58px;
  padding: 0 0 28px 58px;
  counter-increment: step;
}

.steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-soft);
  content: counter(step, decimal-leading-zero);
  font-size: 13px;
  font-weight: 900;
}

.steps li:not(:last-child)::after {
  position: absolute;
  top: 42px;
  bottom: 2px;
  left: 19px;
  width: 1px;
  background: var(--border);
  content: "";
}

.notice {
  margin: 28px 0;
  padding: 20px 22px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: rgb(243 191 55 / 6%);
}

.notice p:last-child {
  margin-bottom: 0;
}

.home-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--content-bg);
}

.home-toc summary {
  min-height: 52px;
  padding: 12px 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
}

.home-toc ul {
  margin: 0;
  padding: 0 24px 20px 42px;
}

.faq-list {
  margin-top: 28px;
}

.faq-item {
  border-top: 1px solid var(--border);
  background: var(--content-bg);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  min-height: 58px;
  padding: 15px 46px 15px 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.faq-item p {
  margin: 0;
  padding: 0 18px 20px;
}

.updated-note {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: #aeb6c7;
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #0a1120;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(280px, 1fr);
  gap: 34px 70px;
  padding-block: 52px;
}

.footer-brand p {
  max-width: 500px;
  margin: 14px 0 0;
  color: var(--muted);
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px 22px;
}

.footer-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.footer-notes {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-notes p {
  margin: 0;
  color: #aeb6c7;
  font-size: 14px;
}

.footer-notes p + p {
  margin-top: 8px;
}

.archive-view,
.error-view {
  padding-block: 84px;
}

.archive-view h1,
.error-view h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.archive-item {
  padding-block: 24px;
  border-top: 1px solid var(--border);
}

.eyebrow {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .header-shell {
    padding-inline: 22px;
    column-gap: 26px;
  }

  .primary-menu {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    font-size: 16px;
  }

  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 64px;
    padding-inline: 20px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .menu-toggle-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .menu-toggle-icon,
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentcolor;
    content: "";
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle-icon {
    position: relative;
  }

  .menu-toggle-icon::before {
    position: absolute;
    top: -6px;
  }

  .menu-toggle-icon::after {
    position: absolute;
    top: 6px;
  }

  .menu-open .menu-toggle-icon {
    background: transparent;
  }

  .menu-open .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-open .menu-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .site-navigation {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0 18px;
  }

  .menu-open .site-navigation {
    display: grid;
  }

  .primary-menu {
    display: grid;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
  }

  .primary-menu a,
  .header-cta {
    justify-content: flex-start;
    min-height: 46px;
    padding-inline: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--content-bg);
    font-size: 14px;
  }

  .header-cta {
    justify-content: center;
    border-color: var(--green);
    background: var(--green);
    color: #04190d;
  }

  .content-shell,
  .reading-shell,
  .footer-shell {
    width: min(calc(100% - 40px), var(--content-width));
  }

  .article-header {
    padding-top: 52px;
    padding-bottom: 40px;
  }

  .article-header h1 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.12;
  }

  .article-intro {
    margin-top: 20px;
    font-size: 17px;
  }

  .article-body > section,
  .article-body > .page-section {
    padding-block: 34px;
    scroll-margin-top: 76px;
  }

  .article-body h2 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .table-scroll {
    width: calc(100vw - 40px);
  }

  th,
  td {
    padding: 14px;
  }

  .footer-shell {
    grid-template-columns: 1fr;
    padding-block: 42px;
  }

  .footer-notes {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  .content-shell,
  .reading-shell,
  .footer-shell {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .header-shell {
    padding-inline: 16px;
  }

  .primary-menu {
    grid-template-columns: 1fr;
  }

  .table-scroll {
    width: calc(100vw - 32px);
  }

  .article-header h1 {
    font-size: 30px;
  }

  .footer-menu {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
