:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --bg-soft: #13161b;
  --surface: #191d24;
  --surface-2: #20252d;
  --border: #2b313b;
  --text: #f3f5f7;
  --muted: #a4adb9;
  --accent: #ff6b2c;
  --accent-soft: rgba(255, 107, 44, 0.12);
  --accent-strong: #ff8a55;
  --ok: #32d74b;
  --radius: 18px;
  --max: 940px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 50% -180px, rgba(255, 107, 44, 0.16), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: #ffb08a; }

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

.wrap {
  width: min(calc(100% - 32px), var(--max));
  max-width: 100%;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 15, 18, 0.88);
  border-bottom: 1px solid rgba(43, 49, 59, 0.7);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.06em;
  box-shadow: 0 6px 18px rgba(255, 107, 44, 0.28);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 11px;
  border-radius: 9px;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

main { padding: 48px 0 64px; }

.hero { padding: 34px 0 22px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 900; }
h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 800; margin-top: 38px; }
h3 { font-size: 20px; font-weight: 800; margin-top: 28px; }
h4 { font-size: 17px; font-weight: 700; margin-top: 22px; }

p { margin: 0 0 16px; overflow-wrap: break-word; }
ul, ol { margin: 0 0 18px; padding-left: 24px; }
li { margin-bottom: 7px; }
li > p { margin: 0 0 8px; }

hr { border: 0; border-top: 1px solid var(--border); margin: 34px 0; }

blockquote {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

pre {
  overflow-x: auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
pre code { background: none; border: 0; padding: 0; }

.hero-text {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 10px 26px rgba(255, 107, 44, 0.2);
}
.button:hover { background: #ff7d43; color: #fff; }
.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.button.secondary:hover { background: var(--surface); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0;
}

.card {
  display: block;
  padding: 22px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}
.card:hover { border-color: rgba(255, 107, 44, 0.55); color: var(--text); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .meta { display: block; margin-top: 14px; color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.notice {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 107, 44, 0.28);
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}
.notice strong { color: var(--text); }

.page-head {
  padding: 10px 0 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}
.page-head h1 { font-size: clamp(30px, 5vw, 44px); }
.page-head .meta { color: var(--muted); font-size: 14px; }
.page-head .meta span { display: inline-block; margin-right: 16px; }

.doc { max-width: 820px; }
.table-wrap {
  margin: 20px 0 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.doc table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
}
.doc th, .doc td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.doc th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.doc tr:nth-child(even) td { background: rgba(25, 29, 36, 0.45); }

.doc h2 { padding-top: 8px; }
.doc h3 { margin-top: 32px; }
.doc a { word-break: break-word; }

.toc {
  margin: 22px 0 30px;
  padding: 18px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc strong { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: 14px; }
.toc li { break-inside: avoid; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--accent-strong); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; gap: 8px; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  main { padding-top: 30px; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .doc table { font-size: 13px; min-width: 620px; }
}

@media print {
  body { background: #fff; color: #111; font-size: 12pt; }
  .site-header, .site-footer, .hero-actions, .toc, .skip-link { display: none !important; }
  main { padding: 0; }
  .wrap { width: 100%; }
  .doc { max-width: none; }
  a { color: #111; text-decoration: underline; }
  .doc th { background: #eee; }
  .doc th, .doc td { border-color: #999; }
}
