/* ==========================================================================
   AMBER — site stylesheet
   No external fonts, no CDN, no imports. Light + dark via data-theme.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */

:root {
  color-scheme: light;

  --bg: #f8f6f3;
  --bg-elev: #ffffff;
  --bg-sunken: #f1ece4;
  --bg-code: #f3efe8;
  --bg-inverse: #1b1d23;

  --text: #1b1a17;
  --text-soft: #3f3a33;
  --text-muted: #6b6459;
  --text-inverse: #f6f3ee;

  --border: #e3ddd3;
  --border-strong: #cfc6b8;

  --accent: #b25c07;
  --accent-hover: #8f4905;
  --accent-fill: #e8821e;
  --accent-fill-hover: #d4740f;
  --accent-soft: #fdf1e3;
  --accent-ring: rgba(232, 130, 30, 0.32);

  --ok: #1f7a4d;
  --ok-soft: #e6f4ec;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --bad: #a33232;
  --bad-soft: #fbe9e9;

  --shadow-sm: 0 1px 2px rgba(30, 24, 16, 0.06);
  --shadow-md: 0 10px 30px -18px rgba(30, 24, 16, 0.35);
  --shadow-lg: 0 24px 60px -30px rgba(30, 24, 16, 0.45);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --container: 1160px;
  --gutter: 24px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --header-h: 68px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #15171c;
  --bg-elev: #1c1f26;
  --bg-sunken: #101216;
  --bg-code: #1a1d23;
  --bg-inverse: #e9e5de;

  --text: #e9e6e0;
  --text-soft: #c9c4bb;
  --text-muted: #9a948a;
  --text-inverse: #17191e;

  --border: #2b2f37;
  --border-strong: #3c424d;

  --accent: #f0a35e;
  --accent-hover: #ffb877;
  --accent-fill: #e8821e;
  --accent-fill-hover: #f09539;
  --accent-soft: #2a2118;
  --accent-ring: rgba(240, 163, 94, 0.35);

  --ok: #58c48d;
  --ok-soft: #17281f;
  --warn: #e0b052;
  --warn-soft: #2a2314;
  --bad: #ec8080;
  --bad-soft: #2c1a1a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #15171c;
    --bg-elev: #1c1f26;
    --bg-sunken: #101216;
    --bg-code: #1a1d23;
    --bg-inverse: #e9e5de;

    --text: #e9e6e0;
    --text-soft: #c9c4bb;
    --text-muted: #9a948a;
    --text-inverse: #17191e;

    --border: #2b2f37;
    --border-strong: #3c424d;

    --accent: #f0a35e;
    --accent-hover: #ffb877;
    --accent-fill: #e8821e;
    --accent-fill-hover: #f09539;
    --accent-soft: #2a2118;
    --accent-ring: rgba(240, 163, 94, 0.35);

    --ok: #58c48d;
    --ok-soft: #17281f;
    --warn: #e0b052;
    --warn-soft: #2a2314;
    --bad: #ec8080;
    --bad-soft: #2c1a1a;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  }
}

/* --- reset -------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 620;
  line-height: 1.18;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem);
}

h2 {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.95rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li + li {
  margin-top: 0.3em;
}

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

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.36em;
  overflow-wrap: anywhere;
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.55;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--accent-fill);
  color: var(--text-soft);
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-ring);
}

/* --- layout ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container.narrow {
  max-width: 760px;
}

main {
  display: block;
  min-height: 50vh;
  padding-bottom: 80px;
}

.section {
  padding: 64px 0;
}

.section + .section {
  padding-top: 0;
}

.section-sunken {
  background: var(--bg-sunken);
  border-block: 1px solid var(--border);
  padding-block: 64px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 56ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.12rem;
  color: var(--text-soft);
  max-width: 62ch;
}

.muted {
  color: var(--text-muted);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
  padding-top: 24px;
}

.sidebar-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-top: 16px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- skip link ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

/* --- header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.06rem;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  color: var(--accent-fill);
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  flex: 1 1 auto;
}

.main-nav a {
  display: inline-block;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 520;
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-sunken);
  box-shadow: inset 0 -2px 0 var(--accent-fill);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-soft);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.theme-icon-dark,
:root[data-theme="dark"] .theme-icon-light {
  display: none;
}

:root[data-theme="dark"] .theme-icon-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-light {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-icon-dark {
    display: block;
  }
}

.menu-toggle {
  display: none;
}

.menu-icon-close {
  display: none;
}

body.nav-open .menu-icon-open {
  display: none;
}

body.nav-open .menu-icon-close {
  display: block;
}

/* --- region picker ------------------------------------------------------ */

.region-picker {
  position: relative;
}

.region-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.region-picker > summary::-webkit-details-marker {
  display: none;
}

.region-picker > summary:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.region-picker .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.region-picker[open] .chevron {
  transform: rotate(180deg);
}

.region-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 300px;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 60;
}

.region-menu-title {
  margin: 4px 8px 8px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.region-menu li + li {
  margin: 0;
}

.region-menu a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.region-menu a:hover {
  background: var(--bg-sunken);
}
.region-menu a[aria-current="true"] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent-fill);
}

.region-code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.region-city {
  font-weight: 550;
}

.region-cc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-fill);
  color: #201406;
  border-color: var(--accent-fill);
}

.btn-primary:hover {
  background: var(--accent-fill-hover);
  border-color: var(--accent-fill-hover);
  color: #201406;
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-sunken);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* --- hero --------------------------------------------------------------- */

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 420px at 82% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero .lead {
  font-size: 1.15rem;
}

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

.hero-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.hero-stats div {
  min-width: 96px;
}

.hero-stats dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-stats dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.hero-visual {
  position: relative;
}

.hero-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

/* --- cards -------------------------------------------------------------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 8px;
}

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

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon .icon {
  width: 20px;
  height: 20px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* --- plans -------------------------------------------------------------- */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.plan-card-featured,
.plan-grid-featured .plan-card {
  border-color: var(--accent-fill);
  box-shadow: 0 0 0 1px var(--accent-fill), var(--shadow-md);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-height: 2.6rem;
  margin-bottom: 6px;
}

.plan-head h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-small {
  padding: 0 6px;
  font-size: 0.62rem;
}

.plan-desc {
  min-height: 2.9em;
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.plan-price .price {
  font-size: 1.85rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-suffix {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.spec-list {
  margin: 0 0 18px;
  font-size: 0.88rem;
}

.spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
}

.spec-list div:last-child {
  border-bottom: 0;
}

.spec-list dt {
  color: var(--text-muted);
}

.spec-list dd {
  margin: 0;
  font-weight: 550;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.feature-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.feature-list li {
  display: flex;
  gap: 8px;
  margin: 0 0 7px;
}

.feature-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--ok);
  flex: 0 0 auto;
}

.plan-card .btn {
  margin-top: auto;
}

/* --- games -------------------------------------------------------------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.game-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 4px;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.game-card:hover {
  border-color: var(--accent-fill);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.game-glyph {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.game-glyph .icon {
  width: 18px;
  height: 18px;
}

.game-name {
  font-weight: 620;
  font-size: 1.02rem;
}

.game-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.game-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- game detail -------------------------------------------------------- */

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.hero-price {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-price strong {
  color: var(--text);
  font-size: 1.3rem;
}

.game-facts {
  margin: 0;
  padding: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.game-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}

.game-facts div:last-child {
  border-bottom: 0;
}

.game-facts dt {
  color: var(--text-muted);
}

.game-facts dd {
  margin: 0;
  font-weight: 550;
  text-align: right;
}

/* --- tables ------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.data-table {
  min-width: 560px;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-sunken);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--bg-sunken);
}

.data-table tr.is-current {
  background: var(--accent-soft);
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.loc-code {
  display: inline-block;
  /* хватает на самый длинный код хоста (RU-MSK), чтобы города стояли в столбец */
  min-width: 4.4em;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* --- status ------------------------------------------------------------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-sunken);
  color: var(--text-soft);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-operational {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-degraded,
.status-maintenance {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-outage {
  background: var(--bad-soft);
  color: var(--bad);
}

.status-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.status-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}

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

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.status-row:last-child {
  border-bottom: 0;
}

.status-row {
  margin: 0;
}

/* --- timeline / changelog ---------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 28px 24px;
  margin: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}

.timeline-item:first-child::before {
  background: var(--accent-fill);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 2px;
}

.timeline-body h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.timeline-body p {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.timeline-meta {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
}

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

.changelog-entry {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.changelog-entry:first-child {
  padding-top: 0;
}

.changelog-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 8px;
}

.changelog-version {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 7px;
}

.changelog-meta time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.changelog-entry h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.changelog-entry ul {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* --- quotes ------------------------------------------------------------- */

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.quote {
  margin: 0;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.quote blockquote {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 0.98rem;
  color: var(--text);
}

.quote blockquote::before {
  content: "“";
  display: block;
  font-size: 2.2rem;
  line-height: 0.6;
  color: var(--accent-fill);
  margin-bottom: 8px;
}

.quote figcaption {
  display: flex;
  flex-direction: column;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.quote figcaption strong {
  color: var(--text);
  font-size: 0.92rem;
}

/* --- lists -------------------------------------------------------------- */

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

.link-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.link-list li:last-child {
  border-bottom: 0;
}

.link-list a {
  display: block;
  padding: 11px 4px;
  color: var(--text);
  text-decoration: none;
}

.link-list a:hover {
  color: var(--accent);
}

.link-list strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 560;
}

.link-list span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.link-list .is-current a {
  color: var(--accent);
  font-weight: 600;
}

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

.post-item {
  margin: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.post-item h3 {
  margin: 6px 0 6px;
  font-size: 1.12rem;
}

.post-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--accent);
}

.post-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.post-back {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* --- prose -------------------------------------------------------------- */

.prose {
  max-width: 72ch;
  font-size: 1rem;
}

.prose > h2 {
  margin-top: 2em;
  padding-top: 0.2em;
}

.prose > h3 {
  margin-top: 1.6em;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose img,
.prose svg {
  border-radius: var(--radius);
}

.prose table {
  margin: 1.4em 0;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--bg-sunken);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

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

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

/* --- callouts, steps ---------------------------------------------------- */

.callout {
  margin: 1.6em 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-fill);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  font-size: 0.94rem;
}

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

.callout-warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.callout-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.steps li {
  position: relative;
  padding: 0 0 22px 46px;
  counter-increment: step;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.steps li::after {
  content: "";
  position: absolute;
  left: 14.5px;
  top: 34px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps li:last-child::after {
  display: none;
}

.steps strong {
  display: block;
  margin-bottom: 2px;
}

/* --- faq ---------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--border);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  font-weight: 570;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 16px;
  font-size: 0.94rem;
  color: var(--text-soft);
}

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

/* --- calculator --------------------------------------------------------- */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
  margin: 28px 0 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calc-controls {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.calc-controls label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calc-controls select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.calc-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 26px;
  background: var(--bg-sunken);
  border-left: 1px solid var(--border);
}

.calc-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
}

.calc-price > span:first-child {
  font-size: 2rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.calc-total,
.calc-save {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  min-height: 1.3em;
}

.calc-save {
  color: var(--ok);
  font-weight: 550;
}

.calc-note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* --- forms -------------------------------------------------------------- */

.form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.form-status {
  font-size: 0.88rem;
  color: var(--ok);
  min-height: 1.2em;
  margin: 0;
}

.contact-aside {
  display: grid;
  gap: 14px;
}

.contact-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-line:last-child {
  border-bottom: 0;
}

.contact-line .icon {
  margin-top: 3px;
  color: var(--accent);
}

.contact-line strong {
  display: block;
  font-size: 0.9rem;
}

.contact-line span,
.contact-line a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.contact-line a {
  color: var(--text-soft);
}

/* --- search ------------------------------------------------------------- */

.search-box {
  position: relative;
  margin-bottom: 20px;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.empty-note {
  padding: 14px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- breadcrumbs -------------------------------------------------------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 20px 0 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .sep {
  color: var(--border-strong);
}

/* --- CTA ---------------------------------------------------------------- */

.cta-band {
  margin: 64px 0 0;
  padding: 40px 0;
  background: var(--bg-inverse);
  color: var(--text-inverse);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-inner h2 {
  margin-bottom: 6px;
  color: var(--text-inverse);
  font-size: 1.5rem;
}

.cta-inner p {
  margin: 0;
  color: color-mix(in srgb, var(--text-inverse) 70%, transparent);
  font-size: 0.94rem;
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding-top: 56px;
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
  padding-bottom: 44px;
}

.footer-brand {
  flex: 0 1 300px;
  min-width: 240px;
}

.footer-col {
  flex: 1 1 150px;
  min-width: 140px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-tagline {
  max-width: 34ch;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-brand address {
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.footer-brand address a {
  color: var(--text-muted);
}

.footer-brand address a:hover {
  color: var(--accent);
}

.footer-status {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-col h2 {
  margin: 0 0 12px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin: 0 0 7px;
}

.footer-col a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-bottom p {
  margin: 0;
}

/* --- errors ------------------------------------------------------------- */

.error-page {
  padding: 90px 0;
  max-width: 560px;
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  color: var(--accent-fill);
  opacity: 0.85;
}

.error-page .lead {
  margin-inline: auto;
}

/* --- misc --------------------------------------------------------------- */

.page-with-sidebar {
  padding-top: 8px;
}

.kbd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--bg-elev);
  color: var(--text-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-elev);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

.figure {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.figure figcaption {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- responsive --------------------------------------------------------- */

@media (max-width: 1060px) {
  .main-nav a {
    padding: 8px 8px;
    font-size: 0.9rem;
  }
  .page-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 62px;
  }

  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px var(--gutter) 18px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 12px 10px;
    font-size: 1rem;
  }

  .hero {
    padding: 44px 0 40px;
  }

  .hero-inner,
  .game-hero,
  .calc {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .calc-result {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .sidebar-layout .sidebar {
    order: 2;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-grid {
    gap: 32px 24px;
  }

  .footer-brand {
    flex-basis: 100%;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media (max-width: 620px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15.5px;
  }

  .section {
    padding: 44px 0;
  }

  .section-sunken {
    padding-block: 44px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-stats {
    gap: 20px 28px;
  }

  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .error-page {
    padding: 56px 0;
  }

  .region-menu {
    width: min(88vw, 300px);
    right: -46px;
  }

  .data-table {
    min-width: 0;
    font-size: 0.86rem;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }

  .data-table .col-country,
  .data-table .tag-small {
    display: none;
  }

  /* Код хоста на телефоне остаётся: у зеркал один город, и без кода
     четыре строки «Москва» неразличимы. Выравнивание при этом не нужно. */
  .data-table .loc-code {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .hero-visual,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
