:root {
  --bg: #0b0c10;
  --surface: #15171d;
  --surface-2: #1c1f27;
  --ink: #ece8dd;
  --muted: #a39f93;
  --line: #2c2f3a;
  --gold: #d9b45a;
  --gold-light: #f1d68a;
  --gold-dark: #a8842f;
  --note: #221d0f;
  --note-line: #6b5520;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg) radial-gradient(1200px 500px at 50% -120px, #2a2212 0%, transparent 70%) no-repeat;
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

a { color: var(--gold-light); }
a:hover { color: #fff; }
a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

.notice { background: #000; color: var(--ink); font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--gold-dark); }
.notice strong { color: var(--gold-light); }
.notice span { color: var(--muted); }

.site-header { background: rgba(11, 12, 16, .92); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-top: 12px; padding-bottom: 12px; }
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.site-header nav { flex: 1 1 auto; }
.site-header ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-header nav a { text-decoration: none; font-size: 15px; padding: 6px 0; display: inline-block; color: var(--ink); border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--gold-light); }
.site-header nav a[aria-current="page"] { color: var(--gold-light); border-bottom-color: var(--gold); }
.lang { font-size: 14px; border: 1px solid var(--gold-dark); border-radius: 20px; padding: 4px 12px; text-decoration: none; }

.crumbs { font-size: 14px; color: var(--muted); padding-top: 18px; }

h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
h1 { font-size: 36px; line-height: 1.18; margin: 18px 0 8px; color: #fff; }
h2 { font-size: 24px; line-height: 1.3; margin: 40px 0 12px; color: var(--gold-light); }
h2::after { content: ""; display: block; width: 48px; height: 2px; background: var(--gold-dark); margin-top: 8px; }
h3 { font-size: 18px; margin: 22px 0 6px; color: #fff; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
strong { color: #fff; }

.byline { color: var(--muted); font-size: 14px; }
.lead {
  font-size: 19px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0 20px;
}
.lead p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 16px; }
caption { text-align: left; font-weight: 700; padding: 12px 14px 10px; color: var(--gold-light); font-family: Georgia, serif; font-size: 18px; background: var(--surface); }
th, td { border-top: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); color: var(--gold-light); border-top: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:first-child th, tbody tr:first-child td { border-top: 0; }
thead + tbody tr:first-child td { border-top: 1px solid var(--line); }
table.facts th { width: 38%; font-weight: 600; color: var(--muted); }

.cta {
  background: linear-gradient(135deg, #1d1a12, var(--surface));
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  padding: 18px;
  margin: 22px 0;
}
.disclosure { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: #17130a;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(217, 180, 90, .22);
}
.btn:hover { color: #000; filter: brightness(1.08); }
.small { font-size: 14px; color: var(--muted); }
.cta .small { margin: 10px 0 0; }

.box { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 2px 18px 6px; margin-top: 36px; }
.box h2 { margin-top: 18px; }

.note { background: var(--note); border: 1px solid var(--note-line); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.note p:last-child { margin-bottom: 0; }

.faq h3 { margin-top: 20px; }
.related ul { padding-left: 20px; }
.changelog { font-size: 14px; color: var(--muted); }
.changelog h2 { font-size: 17px; color: var(--muted); font-family: inherit; }
.changelog h2::after { display: none; }

.calc { background: var(--surface); border: 1px solid var(--gold-dark); border-radius: 12px; padding: 18px; }
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.calc input, .calc select { display: block; width: 100%; margin-top: 4px; padding: 10px; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.calc output { display: block; font-size: 28px; font-weight: 800; margin: 6px 0; color: var(--gold-light); font-family: Georgia, serif; }

.site-footer { background: #000; border-top: 1px solid var(--gold-dark); margin-top: 56px; padding: 8px 0 28px; }
.site-footer h2 { font-size: 18px; margin: 22px 0 8px; }
.site-footer h2::after { display: none; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.badge { display: inline-block; background: var(--gold); color: #17130a; font: 700 13px/1.5 system-ui, sans-serif; border-radius: 20px; padding: 1px 9px; vertical-align: middle; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .brand-name { font-size: 19px; }
  .calc .row { grid-template-columns: 1fr; }
  table.facts th { width: 44%; }
}
