/* Bala Time — сайт: политика конфиденциальности, удаление аккаунта.
   Цвета и шрифт — из приложения (lib/theme/tokens.dart, Manrope). */

@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("manrope-500.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("manrope-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("manrope-800.woff2") format("woff2"); }

:root {
  --ink: #0e1630;
  --slate: #5a6480;
  --faint: #98a1b8;
  --brand: #2f5bff;
  --brand-dark: #1e3fcc;
  --brand-soft: #e6ecff;
  --sky: #4a7dff;
  --star: #ffb31a;
  --star-soft: #fff3d6;
  --bad: #b42318;
  --bad-soft: #fee7e5;
  --paper: #f3f5fa;
  --line: #e1e5ef;
  --radius: 20px;
  /* Звёздочка из логотипа Bala Time */
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C13 7 17 11 24 12C17 13 13 17 12 24C11 17 7 13 0 12C7 11 11 7 12 0Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 500 17px/1.65 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--star); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ── Шапка: голубой фон детской версии приложения ───────────────────── */

.hero {
  background: var(--sky);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* большая звёздочка из логотипа, уходит за край */
.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: 40px;
  width: 340px;
  height: 340px;
  background: rgba(255, 255, 255, 0.10);
  -webkit-mask: var(--sparkle) center / contain no-repeat;
  mask: var(--sparkle) center / contain no-repeat;
  pointer-events: none;
}

.top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.brand:hover { color: #fff; }

.top nav { display: flex; gap: 6px; flex-wrap: wrap; }

.top nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 7px 14px;
  border-radius: 999px;
}

.top nav a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.top nav a[aria-current="page"] { background: #fff; color: var(--brand-dark); }

.hero-body {
  position: relative;
  z-index: 1;
  padding-top: 40px;
  padding-bottom: 56px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  max-width: 13em;
}

.date { margin: 14px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 16px; }

.lead { margin: 18px 0 0; max-width: 34em; font-size: 19px; line-height: 1.55; }

/* Обещания: отмечены звёздочкой из логотипа */
.promises {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 960px;
}

.promises li {
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 52px;
  background: rgba(14, 22, 48, 0.16);
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.45;
}

.promises li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--star);
  -webkit-mask: var(--sparkle) center / contain no-repeat;
  mask: var(--sparkle) center / contain no-repeat;
}

/* ── Текст документа ─────────────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 680px);
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.layout.single { grid-template-columns: minmax(0, 720px); }

.toc { position: sticky; top: 24px; align-self: start; }

.toc summary {
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  padding: 4px 0 10px;
}

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

.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }

.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--slate);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}

.toc a:hover { color: var(--brand); border-left-color: var(--brand); }

.doc > :first-child { margin-top: 0; }

.doc h2 {
  font-weight: 800;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
}

.doc h3 { font-weight: 800; font-size: 19px; line-height: 1.35; margin: 28px 0 8px; }

.doc p, .doc li { margin: 0 0 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li::marker { color: var(--brand); }
.doc strong { font-weight: 800; }

.intro { font-size: 19px; line-height: 1.6; }

.callout {
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
}

.callout.danger { background: var(--bad-soft); color: var(--bad); font-weight: 700; }

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

table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 15px; line-height: 1.5; }

th, td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }

th { color: var(--slate); font-weight: 700; font-size: 14px; border-bottom-color: var(--ink); }

td:first-child { font-weight: 700; }

/* Шаги удаления: настоящая последовательность — нумеруем */
.steps { counter-reset: step; list-style: none; padding: 0 !important; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: 3px 0 3px 48px;
  margin-bottom: 14px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  line-height: 32px;
  text-align: center;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 14px 24px;
  border-radius: 14px;
  margin: 4px 0 12px;
}

.btn:hover { background: var(--brand-dark); color: #fff; }

/* Главная */
.links { list-style: none; padding: 0; margin: 0; }

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

.links a {
  display: block;
  padding: 22px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 21px;
}

.links a span { display: block; color: var(--slate); font-weight: 500; font-size: 16px; margin-top: 2px; }
.links a:hover { color: var(--brand); }

footer { border-top: 1px solid var(--line); }

footer .wrap { padding-top: 24px; padding-bottom: 32px; color: var(--slate); font-size: 14px; }

/* ── Узкие экраны ────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 28px; }
  .toc { position: static; background: var(--paper); border-radius: 16px; padding: 12px 18px; }
  .toc summary { padding: 4px 0; }
  .toc summary::after { content: "Показать"; float: right; color: var(--brand); font-weight: 700; }
  .toc details[open] summary::after { content: "Скрыть"; }
  .toc ol { margin: 8px 0 6px; }
  .promises { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero::after { width: 220px; height: 220px; right: -60px; top: 20px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
  .hero-body { padding-top: 22px; padding-bottom: 36px; }
  .lead, .intro { font-size: 17px; }
  .doc h2 { font-size: 22px; margin-top: 38px; }
  .top nav { width: 100%; }
  .top nav a { padding: 6px 12px; font-size: 14px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  td { border: 0; padding: 1px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .hero { background: none; color: var(--ink); }
  .hero::after, .top nav, .toc { display: none; }
  .promises li { background: none; padding-left: 0; }
  .promises li::before { display: none; }
  .layout { display: block; }
}
