:root {
  --page: #161b23;
  --surface: #20262e;
  --surface-hover: #252d37;
  --line: #313b48;
  --line-strong: #465365;
  --text: #f7f9fc;
  --muted: #a8b4c3;
  --dim: #758294;
  --lime: #a9df5e;
  --lime-ink: #14200d;
  --cyan: #76d8ef;
  --amber: #f2bd65;
  --green: #78d59f;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.portal-shell { width: min(860px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 42px; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Unbounded, Arial, sans-serif; font-size: 16px; font-weight: 700; letter-spacing: 0; }
.brand strong { color: var(--lime); font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: var(--lime-ink); background: var(--lime); font-size: 14px; }
.support-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.support-link:hover, .support-link:focus-visible { color: var(--cyan); }
.support-link svg { width: 15px; height: 15px; }

.identity { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 38px 0 28px; }
.kicker, .eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Unbounded, Arial, sans-serif; letter-spacing: 0; }
h1 { margin-bottom: 14px; font-size: 34px; line-height: 1.18; }
h2 { margin: 0; font-size: 21px; line-height: 1.3; }
h3 { margin-bottom: 10px; font-size: 17px; line-height: 1.35; }
.intro { max-width: 540px; margin: 0; color: var(--muted); font-size: 15px; }
.live-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(120, 213, 159, .42); border-radius: var(--radius); color: var(--green); background: rgba(120, 213, 159, .08); font-size: 12px; font-weight: 700; }
.live-status svg { width: 16px; height: 16px; }

.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.status-card { display: flex; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.status-card > svg { flex: 0 0 auto; width: 21px; height: 21px; color: var(--muted); }
.status-card-good > svg { color: var(--green); }
.status-card-blue > svg { color: var(--cyan); }
.status-card-amber > svg { color: var(--amber); }
.status-card p { margin: 0 0 3px; color: var(--dim); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.status-card strong { display: block; overflow: hidden; color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.setup-panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.setup-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.platform-select { position: relative; }
.platform-select::after { position: absolute; top: 50%; right: 11px; width: 7px; height: 7px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); content: ""; pointer-events: none; transform: translateY(-70%) rotate(45deg); }
.platform-select select { min-width: 158px; height: 36px; padding: 0 31px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); outline: none; appearance: none; color: var(--text); background: #171d25; font-size: 13px; font-weight: 600; cursor: pointer; }
.platform-select select:focus-visible { border-color: var(--cyan); }

.app-bar { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.app-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(118, 216, 239, .35); border-radius: var(--radius); color: var(--cyan); background: rgba(118, 216, 239, .07); }
.app-icon svg { width: 18px; height: 18px; }
.app-bar div { display: grid; min-width: 0; gap: 1px; }
.app-bar strong { font-size: 14px; }
.app-bar span:not(.app-icon) { color: var(--muted); font-size: 12px; }
.client-tabs { display: inline-flex; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: #171d25; }
.client-tab { min-width: 72px; height: 32px; padding: 0 10px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.client-tab:hover, .client-tab:focus-visible { color: var(--text); }
.client-tab.is-active { color: var(--lime-ink); background: var(--lime); }

.steps { display: grid; }
.step { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.step-last { padding-bottom: 4px; border-bottom: 0; }
.step-number { display: grid; place-items: center; align-self: start; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: 11px; font-weight: 700; }
.step-number-good { border-color: rgba(120, 213, 159, .42); color: var(--green); }
.step-number svg { width: 17px; height: 17px; }
.step-content > p:not(.eyebrow) { max-width: 610px; margin-bottom: 15px; color: var(--muted); font-size: 14px; }

.action-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius); font-size: 13px; font-weight: 700; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.action-button svg { width: 16px; height: 16px; }
.action-primary { color: var(--lime-ink); background: var(--lime); }
.action-primary:hover, .action-primary:focus-visible { background: #c0ef7f; }
.action-secondary { border-color: var(--line-strong); color: var(--text); background: transparent; }
.action-secondary:hover, .action-secondary:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.private-note { display: flex; align-items: flex-start; gap: 8px; max-width: 610px; padding: 12px; border: 1px solid rgba(242, 189, 101, .34); border-radius: var(--radius); color: var(--amber); background: rgba(242, 189, 101, .06); }
.private-note svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.private-note p { margin: 0; font-size: 12px; line-height: 1.5; }

.route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-width: 620px; }
.route-grid > div { display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #1a2028; }
.route-badge { display: grid; place-items: center; width: 38px; height: 28px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.route-ru { color: #d4e7ff; background: #243e58; }
.route-us { color: #ffe1d3; background: #5b3433; }
.route-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.route-grid strong { color: var(--text); font-size: 13px; }
.network-note { display: flex; align-items: flex-start; gap: 7px; max-width: 620px; margin: 14px 0 0; color: var(--amber); font-size: 12px; }
.network-note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }

.portal-footer { display: flex; justify-content: space-between; gap: 18px; padding-top: 22px; color: var(--dim); font-size: 11px; font-weight: 600; }
.portal-footer span:first-child { color: var(--muted); font-family: Unbounded, Arial, sans-serif; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 720px) {
  .portal-shell { width: min(100% - 24px, 860px); padding-top: 18px; }
  .portal-header { padding-bottom: 19px; }
  .support-link span { display: none; }
  .identity { align-items: flex-start; flex-direction: column; gap: 13px; padding: 27px 0 22px; }
  h1 { font-size: 28px; }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-panel { padding: 16px; }
  .client-tab { min-width: 64px; }
  .route-grid { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .brand { font-size: 14px; }
  .platform-select select { min-width: 140px; }
  .setup-heading { align-items: flex-start; flex-direction: column; }
  .step { grid-template-columns: 34px 1fr; gap: 11px; }
  .portal-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .action-button { transition: none; }
}
