@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/spacemono-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/spacemono-700.woff2) format('woff2');
}

:root {
  --accent: #0b74ff;
  --accent2: #00d4ff;
  --bg: #030712;
  --bg2: #0a0e1a;
  --card: rgba(255, 255, 255, .045);
  --border: rgba(255, 255, 255, .1);
  --text: #e6eef8;
  --muted: #a3adc6;
  --ok: #34d399;
  --no: #f87171;
  --warn: #fbbf24;
  --radius: 18px;
  --mono: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(11, 116, 255, .16) 0, transparent 45%),
    radial-gradient(circle at 90% 30%, rgba(0, 212, 255, .08) 0, transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  font-size: 1.0625rem;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: var(--accent2); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 0;
}
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.logo {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 34px rgba(11, 116, 255, .4);
}
.logo img { width: 62%; height: 62%; object-fit: contain; }
.brand-name { display: block; font-size: 1.35rem; font-weight: 900; line-height: 1.1; }
.brand-sub { display: block; font-size: .78rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

.lang { display: flex; gap: 4px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang a {
  color: rgba(230, 238, 248, .75); padding: 5px 12px; border-radius: 7px;
  font-weight: 700; font-size: .85rem; text-decoration: none;
}
.lang a[aria-current] { background: rgba(255, 255, 255, .16); color: #fff; }
.lang a:hover { color: #fff; }

/* Hero */
.hero { padding: 36px 0 28px; }
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 900; line-height: 1.08; letter-spacing: -.02em;
  background: linear-gradient(135deg, #fff, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 18px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }
.lead strong { color: var(--text); }

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; list-style: none; }
.facts li {
  padding: 7px 16px; border-radius: 50px; font-size: .9rem; font-weight: 700;
  background: linear-gradient(135deg, rgba(11, 116, 255, .2), rgba(0, 212, 255, .08));
  border: 1px solid rgba(11, 116, 255, .35); color: #cfeeff;
}

.ua {
  margin-top: 30px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; align-items: baseline;
}
.ua dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.ua + p { margin-top: 12px; }
.ua dd { font-family: var(--mono); font-size: .95rem; overflow-wrap: anywhere; }

.toc { margin: 30px 0 10px; }
.toc h2 { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.toc ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-block; padding: 7px 14px; border-radius: 10px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); color: var(--text); font-size: .92rem;
}
.toc a:hover { border-color: var(--accent); }

/* Sections */
main section { padding: 34px 0; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 10px; color: var(--accent2); }
p { margin: 0 0 14px; }
p, li { max-width: 50em; }
.muted { color: var(--muted); }
ul.list, ol.list { padding-left: 1.3em; margin: 0 0 16px; }
ul.list li, ol.list li { margin: 6px 0; }
code { font-family: var(--mono); font-size: .88em; background: rgba(255, 255, 255, .07); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }

.code { position: relative; margin: 10px 0 18px; }
.code-label { font-size: .8rem; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
pre {
  font-family: var(--mono); font-size: .9rem; line-height: 1.55;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; white-space: pre; color: #dbe7f7;
}
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.copy {
  position: absolute; top: 30px; right: 8px;
  font: 700 .78rem Inter, sans-serif; color: var(--text); cursor: pointer;
  background: rgba(10, 14, 26, .9); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px;
}
.copy:hover { background: rgba(40, 50, 75, .95); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; margin: 16px 0;
}
.card > :last-child { margin-bottom: 0; }
.card.good { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .06); }
.card.bad { border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .06); }
.card.note { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .05); }
.card h3:first-child { margin-top: 0; }
.card.good h3 { color: var(--ok); }
.card.bad h3 { color: var(--no); }
.card.note h3 { color: var(--warn); }

.never { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 0 0 18px; }
.never li { position: relative; padding-left: 28px; max-width: none; }
.never li::before { content: "\2715"; position: absolute; left: 0; top: 0; color: var(--no); font-weight: 700; }
.yes { list-style: none; margin: 0 0 16px; }
.yes li { position: relative; padding-left: 28px; margin: 6px 0; }
.yes li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--ok); font-weight: 700; }

.steps { counter-reset: s; list-style: none; margin: 0 0 16px; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin: 12px 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700; font-size: .9rem;
}

.table-wrap { overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; background: var(--bg2); }
tr:last-child td { border-bottom: 0; }
td:first-child { width: 38%; }
td code { overflow-wrap: normal; word-break: normal; }

/* Footer */
footer { margin-top: 40px; padding: 36px 0 44px; border-top: 1px solid var(--border); text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin-bottom: 14px; }
.foot-links a {
  color: inherit; text-decoration: none; font-family: var(--mono); font-size: .75rem;
  letter-spacing: .08em; text-transform: uppercase; opacity: .8;
}
.foot-links a:hover { opacity: 1; color: #e8f542; }
.foot-links a:not(:last-child)::after { content: "|"; margin: 0 .7em; opacity: .3; color: var(--text); }
.copyright {
  color: var(--muted); font-size: .85rem;
  max-width: none; margin: 0;
}

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .top { padding: 18px 0; }
  .brand-sub { display: none; }
  .never { grid-template-columns: 1fr; }
  .ua { grid-template-columns: 1fr; gap: 2px; }
  .ua dd { margin-bottom: 10px; }
  .card { padding: 18px; }
  .copy { top: 28px; }
  /* The address table: one block per row, the address above its purpose. */
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; width: auto; }
  td:first-child { width: auto; margin-bottom: 4px; font-weight: 700; }
  td code { overflow-wrap: anywhere; }
}
