:root {
  color-scheme: dark;
  --ink: #f7f1df;
  --muted: #b8b2a3;
  --night: #070b12;
  --panel: #101824;
  --panel-2: #152132;
  --gold: #f4c864;
  --gold-2: #a97722;
  --line: rgba(244, 200, 100, 0.22);
  --green: #77d9ae;
  --red: #e98779;
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% -10%, rgba(244, 200, 100, 0.13), transparent 34rem),
    radial-gradient(circle at 100% 10%, rgba(47, 89, 139, 0.16), transparent 30rem),
    var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

main,
.shell,
.layout,
.policy,
.notice,
.grid,
.card,
.lang-panel,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}

p,
li,
td,
code,
a {
  overflow-wrap: anywhere;
}

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #ffe39a; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.9);
  backdrop-filter: blur(18px);
}

.site-header .shell {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 200, 100, 0.6);
  border-radius: 12px;
  background: linear-gradient(145deg, #24344c, #0b111c);
  color: var(--gold);
  box-shadow: 0 0 28px rgba(244, 200, 100, 0.14);
}

nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 700; }
nav a[aria-current="page"], nav a:hover { color: var(--gold); }

.hero { padding: 82px 0 48px; }
.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.18; }
h1 { margin: 14px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 700; }
h2 { margin: 0 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { margin: 26px 0 8px; font-size: 1.05rem; }

.lede { max-width: 760px; margin: 0; color: #d8d2c3; font-size: clamp(1.05rem, 2vw, 1.24rem); }
.meta { margin-top: 24px; color: var(--muted); font-size: 0.92rem; }

.notice {
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: rgba(244, 200, 100, 0.06);
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0 48px; }
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(21, 33, 50, 0.96), rgba(12, 19, 30, 0.96));
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.card strong { display: block; margin-bottom: 8px; color: var(--gold); font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 42px; align-items: start; padding-bottom: 80px; }
.toc {
  position: sticky;
  top: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 24, 36, 0.82);
}
.toc strong { color: var(--gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.toc ol { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.toc li { margin: 7px 0; }
.toc a { color: var(--muted); text-decoration: none; font-size: .88rem; }
.toc a:hover { color: var(--gold); }

.policy section { scroll-margin-top: 94px; padding: 30px 0; border-top: 1px solid rgba(244, 200, 100, .13); }
.policy section:first-child { border-top: 0; padding-top: 0; }
.policy p, .policy li { color: #d3cdc0; }
.policy ul { padding-left: 1.2rem; }
.policy li + li { margin-top: 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; background: rgba(16, 24, 36, .64); }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(244, 200, 100, .11); }
th { color: var(--gold); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(244, 200, 100, .055); }
tr:last-child td { border-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #f8d57f;
  border-radius: 13px;
  background: linear-gradient(135deg, #ffe195, #d49d35);
  color: #161009;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 34px rgba(244, 200, 100, .18);
}
.button.secondary { background: transparent; color: var(--gold); box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li { position: relative; min-height: 56px; padding: 4px 0 22px 58px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-2);
  border-radius: 50%;
  color: var(--gold);
  background: var(--panel);
  font-weight: 900;
}

.lang-panel { margin: 24px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,24,36,.66); }
details > summary { cursor: pointer; color: var(--gold); font-weight: 800; }

footer { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: .9rem; }
footer .shell { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

@media (max-width: 840px) {
  .grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .site-header .shell { min-height: 78px; }
  nav { gap: 12px; }
}

@media (max-width: 600px) {
  .shell { width: min(calc(100% - 22px), 1120px); }
  .site-header .shell { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  nav { width: 100%; justify-content: flex-start; }
  .hero { padding-top: 56px; }
  h1 { font-size: 2.55rem; }
  .card { padding: 18px; }
}
