:root {
  color-scheme: dark;
  --background: #080d14;
  --background-deep: #050910;
  --surface: #101720;
  --surface-raised: #151e29;
  --surface-soft: #0d141d;
  --text: #f2f4f7;
  --text-secondary: #a3adba;
  --text-muted: #778392;
  --border: #202c39;
  --border-strong: #314052;
  --accent: #7657ff;
  --accent-hover: #8b72ff;
  --accent-soft: rgb(118 87 255 / 14%);
  --success: #22c55e;
  --success-soft: rgb(34 197 94 / 12%);
  --error: #ef4444;
  --error-soft: rgb(239 68 68 / 12%);
  --warning: #f59e0b;
  --radius-sm: 0.55rem;
  --radius-md: 0.8rem;
  --radius-lg: 1rem;
  --shadow-soft: 0 1.5rem 4rem rgb(0 0 0 / 18%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--background-deep);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: #a996ff;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #c2b5ff;
}

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

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

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.policy-content {
  max-width: 52rem;
}

.policy-content > p {
  color: var(--text-secondary);
}

.policy-content section {
  margin-top: 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.policy-content section p,
.policy-content section li {
  overflow-wrap: anywhere;
}

.policy-content section p:last-child,
.policy-content section ul:last-child {
  margin-bottom: 0;
}

.policy-content section h3 {
  margin-top: 1.5rem;
}

.policy-content ul {
  padding-left: 1.35rem;
}

.policy-content li + li {
  margin-top: 0.35rem;
}

.policy-content code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.legal-version {
  margin-bottom: 0;
  color: var(--text-muted);
}

.legal-requisites {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.legal-requisites div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.35fr) minmax(0, 1fr);
  gap: 0.75rem;
}

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

.legal-requisites dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 36rem) {
  .legal-requisites div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 7.5vw, 3.4rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  line-height: 1.18;
}

h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

::selection {
  color: #fff;
  background: rgb(118 87 255 / 55%);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: #9e8bff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.72rem 1.15rem;
  color: #fff;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(135deg, #6847f5, var(--accent));
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  box-shadow: 0 0.5rem 1.5rem rgb(83 52 226 / 18%);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  color: #fff;
  background: linear-gradient(135deg, #795cf6, var(--accent-hover));
  transform: translateY(-1px);
}

.button.secondary {
  color: #b6a7ff;
  background: var(--accent-soft);
  border-color: rgb(118 87 255 / 32%);
  box-shadow: none;
}

.button.secondary:hover {
  color: #d3caff;
  background: rgb(118 87 255 / 21%);
  border-color: rgb(118 87 255 / 48%);
}

.button:disabled {
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.5;
  transform: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(139 114 255 / 42%);
  outline-offset: 3px;
}

input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
textarea,
select,
.form-select {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  background: #0b121a;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

select,
.form-select {
  padding-right: 2.3rem;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):hover,
textarea:hover,
select:hover,
.form-select:hover {
  border-color: #42536a;
}

input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):focus,
textarea:focus,
select:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--accent-soft);
  outline: none;
}

input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: none;
}

label:has(input[type="radio"]:focus-visible),
label:has(input[type="checkbox"]:focus-visible) {
  outline: 2px solid rgb(139 114 255 / 42%);
  outline-offset: 2px;
}

.consent-field {
  padding: 0.8rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.consent-control {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
}

.consent-control input[type="checkbox"] {
  width: 1.1rem;
  min-width: 1.1rem;
  height: 1.1rem;
  min-height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.consent-control span {
  font-size: 0.82rem;
  line-height: 1.45;
}

input[type="file"] {
  min-height: auto;
  padding: 0.55rem;
}

input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.7rem;
  color: var(--text);
  cursor: pointer;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: 0.45rem;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: #dce1e7;
  font-size: 0.9rem;
  font-weight: 700;
}

.optional-label,
.field-help {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.field-help {
  margin: 0.4rem 0 0;
}

.field-help ul {
  margin: 0.45rem 0 0;
  padding-left: 1.2rem;
}

.field-error {
  margin: 0.4rem 0 0;
  color: #ff8a8a;
  font-size: 0.84rem;
}

.form-field.has-error input,
.form-field.has-error textarea,
.form-field.has-error select {
  border-color: var(--error);
}

.notice {
  padding: 1rem 1.1rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.notice h2,
.notice p:last-child {
  margin-bottom: 0;
}

.notice.success {
  color: #a7f3c0;
  background: var(--success-soft);
  border-color: rgb(34 197 94 / 32%);
}

.notice.error {
  color: #ffaaaa;
  background: var(--error-soft);
  border-color: rgb(239 68 68 / 35%);
}

.messages {
  margin-bottom: 1.25rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.18rem;
  height: 1.18rem;
  padding-inline: 0.28rem;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
