:root {
  --surface-main: #f2f2f7;
  --surface-secondary: #ffffff;
  --surface-inset: #ebebf0;
  --surface-info: rgba(88, 86, 214, 0.12);
  --surface-warning: rgba(255, 141, 40, 0.12);
  --surface-danger: rgba(255, 59, 48, 0.1);
  --border-subtle: #ededf2;
  --border-default: #dfdfe4;
  --text-primary: #171717;
  --text-meta: #6d6d72;
  --text-success: #1f8c3f;
  --icon-link: #0088ff;
  --icon-info: #5856d6;
  --icon-warn: #ff8d28;
  --icon-danger: #d70015;

  --on-dark-primary: #fafafa;
  --on-dark-secondary: rgba(250, 250, 250, 0.72);
  --on-dark-meta: rgba(250, 250, 250, 0.5);
  --hero-start: #3a38a6;
  --hero-end: #171717;

  --radius-hero: 32px;
  --radius-box: 24px;
  --radius-btn: 22px;
  --radius-ava: 15px;
  --tile-inset: 16px;
  --page-inset: 24px;
  --page-width: 560px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --surface-main: #0a0a0a;
  --surface-secondary: #1a1a1c;
  --surface-inset: #2c2c2e;
  --surface-info: rgba(94, 92, 230, 0.18);
  --surface-warning: rgba(255, 159, 10, 0.18);
  --surface-danger: rgba(255, 69, 58, 0.16);
  --border-subtle: #232325;
  --border-default: #2f2f31;
  --text-primary: #fafafa;
  --text-meta: #ababb2;
  --text-success: #30d158;
  --icon-link: #0a84ff;
  --icon-info: #5e5ce6;
  --icon-warn: #ff9f0a;
  --icon-danger: #ff6961;

  color-scheme: dark;
}

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

body {
  margin: 0;
  padding: 24px var(--page-inset) 48px;
  background: var(--surface-main);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.h1,
.h2 {
  font-family: "Montserrat", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: inherit;
}

.h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3333;
  letter-spacing: -0.5px;
}

.h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.body-medium {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.caption {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4286;
}

.tiny {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3333;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3333;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-title {
  margin: 16px 0 0;
  padding: 0 4px;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero {
  border-radius: var(--radius-hero);
  padding: 24px 32px;
  background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%);
  color: var(--on-dark-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero .eyebrow {
  color: var(--on-dark-secondary);
}

.hero .caption {
  color: var(--on-dark-secondary);
}

.hero .hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(250, 250, 250, 0.1);
  color: var(--on-dark-primary);
}

.hero-note .icon {
  width: 16px;
  height: 16px;
  color: var(--on-dark-secondary);
}

.hero-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--on-dark-secondary);
}

.hero-list li {
  position: relative;
  padding-left: 16px;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--on-dark-meta);
}

.lead {
  padding: 0 8px;
  text-align: center;
  color: var(--text-meta);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  border: none;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--on-dark-primary);
  background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%);
  transition: transform 0.12s ease-out, opacity 0.12s ease-out;
}

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

.btn:active {
  transform: scale(0.985);
  opacity: 0.9;
}

.box {
  background: var(--surface-secondary);
  border-radius: var(--radius-box);
  overflow: hidden;
}

.box--info,
.box--danger {
  border-radius: var(--radius-box);
  padding: 16px var(--tile-inset);
  display: flex;
  align-items: center;
  gap: 12px;
}

.box--info {
  background: var(--surface-info);
  color: var(--icon-info);
}

.box--danger {
  background: var(--surface-danger);
  color: var(--icon-danger);
}

.box--info .icon,
.box--danger .icon {
  width: 24px;
  height: 24px;
}

.box--pad {
  padding: var(--tile-inset);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.box--pad p {
  color: var(--text-meta);
}

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--tile-inset);
}

.tile-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tile-title {
  color: var(--text-primary);
}

.tile-sub {
  color: var(--text-meta);
}

.ava {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-ava);
  background: var(--surface-info);
  color: var(--icon-info);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ava .icon {
  width: 22px;
  height: 22px;
}

.ava--warn {
  background: var(--surface-warning);
  color: var(--icon-warn);
}

.ava--inset {
  background: var(--surface-inset);
  color: var(--text-meta);
}

.div {
  height: 1px;
  background: var(--border-subtle);
  margin: 0 var(--tile-inset);
}

.change {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.change .was {
  color: var(--text-meta);
}

.change .arrow {
  width: 14px;
  height: 14px;
  color: var(--text-meta);
}

.change .now {
  color: var(--text-primary);
  font-weight: 500;
}

.change--kept .now {
  color: var(--text-meta);
  font-weight: 400;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-inset);
  color: var(--text-meta);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3333;
  white-space: nowrap;
}

.badge--now {
  background: var(--surface-info);
  color: var(--icon-info);
}

.link-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--tile-inset);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease-out;
}

.link-tile:active {
  background: var(--surface-inset);
}

.link-tile .chevron {
  width: 16px;
  height: 16px;
  color: var(--text-meta);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--surface-info);
  color: var(--icon-info);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.btn--ghost {
  background: none;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
}

.btn--ghost .icon {
  color: var(--icon-link);
}

.url {
  color: var(--icon-link);
  text-decoration: none;
  word-break: break-word;
}

.footer {
  padding: 24px 4px 0;
  text-align: center;
  color: var(--text-meta);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer .icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 380px) {
  body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 20px 24px;
  }
}

.switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-inset);
  align-self: center;
  min-width: 240px;
}

.switch-opt {
  padding: 7px 10px;
  border: none;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 500;
  color: var(--text-meta);
  cursor: pointer;
  transition: background 0.12s ease-out, color 0.12s ease-out;
}

html[lang="ru"] .switch-opt[data-lang="ru"],
html[lang="kk"] .switch-opt[data-lang="kk"],
html[lang="ky"] .switch-opt[data-lang="ky"],
html[lang="en"] .switch-opt[data-lang="en"] {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.box--doc {
  padding: var(--tile-inset);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.box--doc p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
}

.clause {
  display: flex;
  gap: 8px;
}

.clause-num {
  flex-shrink: 0;
  min-width: 32px;
  color: var(--text-meta);
  font-variant-numeric: tabular-nums;
}

.clause--sub {
  padding-left: 12px;
}

.clause--head {
  font-weight: 500;
}

.clause--head + .clause,
.clause--head + .clause--sub {
  margin-top: -4px;
}

body [lang] {
  display: none;
}

html[lang="ru"] body [lang="ru"],
html[lang="kk"] body [lang="kk"],
html[lang="ky"] body [lang="ky"],
html[lang="en"] body [lang="en"] {
  display: contents;
}
