/* White Circle — общие стили */
:root {
  --ink: #17191d;
  --ink-2: #4a4f58;
  --ink-3: #868c96;
  --line: #e4e6ea;
  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --focus: #17191d;
  --error: #c2362b;
  --radius: 14px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo span { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }

/* ---------- Переключатель языка ---------- */
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; background: var(--paper-2); border-radius: 999px; }
.lang-switch button {
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink-3); padding: 5px 10px; border-radius: 999px; line-height: 1;
  transition: background .15s, color .15s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lang-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.doc-header nav { display: flex; align-items: center; }
.doc-header .lang-switch { margin-left: 20px; }
[hidden] { display: none !important; }

/* ---------- Страница входа ---------- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 480px);
  background: #15171b url("bg.svg") 30% center / cover no-repeat;
}
.auth__aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}
.auth__aside strong { color: #fff; font-weight: 600; font-size: 15px; display: block; margin-bottom: 2px; }
.auth__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px 40px 0;
}
.card {
  background: var(--paper);
  border-radius: 22px;
  padding: 44px 40px 32px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  width: 100%;
  max-width: 420px;
  margin-left: auto;
}
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
.card h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 700; }
.card .lead { margin: 0 0 28px; color: var(--ink-3); font-size: 15px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input-wrap { position: relative; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input::placeholder { color: #a9aeb6; }
.field input:hover { border-color: var(--line); }
.field input:focus { background: var(--paper); border-color: var(--focus); box-shadow: 0 0 0 3px rgba(23, 25, 29, .08); }
.field.invalid input { border-color: var(--error); background: #fff; }
.field .error { display: none; color: var(--error); font-size: 12.5px; margin-top: 6px; }
.field.invalid .error { display: block; }
.input-wrap input[type="password"], .input-wrap input.has-toggle { padding-right: 48px; }
.toggle-pass {
  position: absolute; top: 0; right: 0;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); border-radius: 12px;
}
.toggle-pass:hover { color: var(--ink); }
.toggle-pass:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.toggle-pass svg { width: 20px; height: 20px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
.link { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); transition: color .15s, border-color .15s; }
.link:hover { color: var(--ink); border-color: var(--ink); }

.btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: #2b2e35; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(23, 25, 29, .25); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: default; }

.notice { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--paper-2); font-size: 13.5px; color: var(--ink-2); }
.notice.show { display: block; }
.notice--error { color: var(--error); background: #fff2f0; border: 1px solid #f3d1cc; }

.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--ink); }
.back-link svg { width: 16px; height: 16px; }
.form-note { margin: -6px 0 24px; color: var(--ink-3); font-size: 13.5px; }

.card__foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  justify-content: center;
  font-size: 13px; color: var(--ink-3);
}
.card__foot a { color: var(--ink-3); text-decoration: none; }
.card__foot .copy { order: 3; flex-basis: 100%; text-align: center; margin-top: 6px; font-size: 12px; }
.card__foot a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; background-position: 28% 20%; }
  .auth__aside { display: none; }
  .auth__main { padding: 32px 16px; }
  .card { margin: 0 auto; padding: 36px 24px 24px; }
}

/* ---------- Юридические страницы ---------- */
.doc-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.doc-header .inner, .doc-hero .inner, .doc, .doc-footer .inner { max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.doc-header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.doc-header nav a { font-size: 14px; text-decoration: none; color: var(--ink-2); margin-left: 20px; }
.doc-header nav a:hover, .doc-header nav a[aria-current="page"] { color: var(--ink); }
.doc-header nav a[aria-current="page"] { font-weight: 600; }

.doc-hero {
  background:
    linear-gradient(90deg, rgba(21, 23, 27, .55) 0%, rgba(21, 23, 27, 0) 60%),
    #15171b url("hero.svg") 80% 50% / cover no-repeat;
  color: #fff;
}
.doc-hero .inner { padding-top: 88px; padding-bottom: 56px; }
.doc-hero .eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin: 0 0 10px; }
.doc-hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 700; }
.doc-hero p { margin: 0; color: rgba(255, 255, 255, .7); font-size: 14px; }

.doc { padding-top: 48px; padding-bottom: 72px; font-size: 16px; color: #2a2d33; }
.doc .intro p:first-child { font-size: 18px; color: var(--ink); }
.doc h2 { font-size: 21px; letter-spacing: -0.015em; line-height: 1.3; margin: 48px 0 14px; color: var(--ink); scroll-margin-top: 80px; }
.doc h2 .num { color: var(--ink-3); font-weight: 500; margin-right: 8px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--ink-3); }
.doc b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ink); text-underline-offset: 3px; }
.doc address { font-style: normal; margin: 0 0 14px; padding: 16px 18px; background: var(--paper-2); border-radius: 12px; }
.ph { background: #fff4c7; border-radius: 4px; padding: 0 4px; }

.toc { margin: 32px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.toc p { font-size: 13px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 14.5px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--ink); text-decoration: underline; }

.doc-footer { border-top: 1px solid var(--line); background: var(--paper-2); }
.doc-footer .inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; font-size: 13.5px; color: var(--ink-3); }
.doc-footer a { color: var(--ink-3); text-decoration: none; margin-left: 18px; }
.doc-footer a:first-child { margin-left: 0; }
.doc-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .doc-header .inner, .doc-hero .inner, .doc, .doc-footer .inner { padding-left: 16px; padding-right: 16px; }
  .doc-header nav a.hide-sm { display: none; }
  .doc-hero {
    background:
      linear-gradient(90deg, rgba(21, 23, 27, .9) 0%, rgba(21, 23, 27, .55) 100%),
      #15171b url("hero.svg") 85% 50% / cover no-repeat;
  }
  .doc-hero .inner { padding-top: 56px; padding-bottom: 40px; }
  .toc ol { columns: 1; }
}
