/* Стили документов super-market.uz (/privacy, /courier-terms, /offer, /delete-account).
   Шапка, подвал, кнопки .button и шрифты — общие с лендингом, в landing.css (подключается раньше). */
:root {
  --red: #e11d2a;
  --red-dark: #c01622;
  --ink: #101828;
  --text: #344054;
  --muted: #667085;
  --border: #d0d5dd;
  --line: #eaecf0;
  --bg: #f7f7f8;
  --card: #ffffff;
  --success: #12b76a;
  --success-bg: #ecfdf3;
  --error: #d92d20;
  --error-bg: #fef3f2;
  --error-text: #b42318;
  --warning: #f79009;
  --radius: 16px;
  --focus: 0 0 0 3px rgba(225, 29, 42, .28);
  color-scheme: light;
}

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

body.docpage { background: var(--bg); }

/* ---------- Раскладка страниц-документов ---------- */
.docmain { padding: 24px 0 56px; }
.docmain__grid { display: flex; flex-direction: column; gap: 16px; }
.doc-card { background: var(--card); border-radius: 20px; padding: 24px 20px; min-width: 0; }
.doc .crumbs { color: var(--muted); font-size: 14px; font-weight: 500; margin: 0 0 12px; }
.doc .doc-meta { color: var(--muted); font-size: 15px; font-weight: 500; margin: 0 0 4px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.doc-meta a { color: var(--muted); text-decoration: none; }
.doc-meta a:hover { color: var(--ink); text-decoration: underline; }
.doc-meta a[aria-current="page"] { color: var(--muted); }

/* ---------- Документы ---------- */
.doc h1 { font-size: 30px; line-height: 1.18; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.doc-card h1 { hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 400px) { .doc-card h1 { font-size: 27px; } }
.doc h2 { font-size: 21px; line-height: 1.33; font-weight: 700; margin: 32px 0 12px; }
.doc h3 { font-size: 18px; line-height: 1.4; font-weight: 600; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text); font-size: 16px; line-height: 1.65; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 0 0 6px; }
.doc li::marker { color: var(--muted); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc h2[id], .doc h3[id] { scroll-margin-top: 16px; }
.doc .lead-date { color: var(--muted); font-size: 14px; }
.doc .lead-date strong { color: var(--muted); font-weight: 500; }

.table-wrap { overflow-x: auto; margin: 4px 0 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.doc th { color: var(--ink); font-weight: 600; background: #fcfcfd; }
.doc tr:last-child td { border-bottom: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }

.toc { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }
.toc__title { font-weight: 700; color: var(--ink); margin: 0 0 8px; font-size: 15px; }
.toc ol { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 1.6; }
.toc li { display: inline; margin: 0; color: var(--muted); }
.toc li + li::before { content: " · "; color: var(--muted); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc a[aria-current="true"] { font-weight: 600; }

.back-top { display: inline-block; margin-top: 28px; font-size: 14px; }


/* ---------- Форма удаления ---------- */
/* ---------- Удаление аккаунта: карточка шагов + «Что произойдёт» ---------- */
.flow-grid { display: flex; flex-direction: column; gap: 16px; }
.flow-card { padding: 24px 20px; min-width: 0; }
.flow-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.flow-steps li { padding: 6px 12px; border-radius: 999px; background: #f2f4f7; color: var(--muted); font-size: 13px; line-height: 16px; font-weight: 600; }
.flow-steps li[aria-current="step"] { background: #fde8ea; color: var(--red); }
[data-step="code"] .what, [data-step="done"] .what { display: none; }
.about-wrap { margin-top: 16px; }

.flow h1 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.flow h1:focus { outline: none; }
.flow .intro { color: var(--text-2, #475467); font-size: 17px; line-height: 26px; margin: 0 0 18px; }

.what { margin: 0; padding: 24px 20px; align-self: flex-start; }
.what h2 { font-size: 20px; line-height: 24px; font-weight: 700; margin: 0 0 12px; }
.what .checklist li { font-size: 16px; line-height: 22px; }
.what__apps { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; }
.what__apps h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.what__apps p { font-size: 14px; line-height: 22px; color: var(--text-2, #475467); margin: 0; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 6px 0; color: var(--ink); font-weight: 500; }
.checklist .sub { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.ico { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.ico--ok { color: var(--success); }
.ico--wait { color: var(--warning); }
.ico--info { color: var(--muted); }
.ico--err { color: var(--error); }

.field { margin: 0 0 16px; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 8px; }

.phone {
  display: flex; align-items: center; gap: 12px; height: 60px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); padding: 0 16px 0 8px; font-size: 19px; font-weight: 500;
}
.phone:focus-within { border-color: var(--red); box-shadow: var(--focus); }
.phone__prefix { color: var(--ink); background: #f2f4f7; border-radius: 10px; padding: 8px 12px; font-size: 17px; font-weight: 600; line-height: 21px; white-space: nowrap; }
.phone input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 0; height: 100%;
}
.phone input::placeholder { color: #98a2b3; }
.phone[data-invalid] { border-color: var(--error); }

.field-error { color: var(--error); font-size: 14px; margin: 8px 0 0; }
.field-error:empty { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px;
  border-radius: 14px; border: 1px solid transparent; padding: 12px 18px; font-family: inherit; font-weight: 600; font-size: 17px; line-height: 1.2;
  cursor: pointer; text-decoration: none; transition: background-color .15s, opacity .15s;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--secondary { background: var(--card); color: var(--ink); border-color: var(--border); }
.btn--secondary:hover { background: #f9fafb; color: var(--ink); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: default; }
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: spin .7s linear infinite; display: none;
}
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.linkbtn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; margin: 0 0 14px;
  color: var(--red); font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.3; cursor: pointer;
}
.linkbtn:hover { color: var(--red-dark); }

.otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 6px; max-width: 360px; }
.otp__box {
  height: 56px; border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  display: grid; place-items: center; font-size: 24px; font-weight: 600; color: var(--ink);
}
.otp__box.is-active { border-color: var(--red); border-width: 2px; }
.otp[data-invalid] .otp__box { border-color: var(--error); }
.otp input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0;
  font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text;
}

.alert {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  border-radius: 12px; padding: 12px 14px; margin: 16px 0; font-size: 14px;
}
.alert p { margin: 0; }
.alert p + p { margin-top: 6px; }
.alert--warn { background: var(--error-bg); color: var(--error-text); }
.alert--error { background: var(--error-bg); color: var(--error-text); border: 1px solid #fecdca; }
.alert a { color: inherit; font-weight: 600; }

.resend { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.resend button { background: none; border: 0; padding: 4px 0; color: var(--red); font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.3; cursor: pointer; }

.done-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; margin: 0 0 16px; }
.done-icon svg { width: 36px; height: 36px; }
.result { margin: 0 0 18px; background: var(--soft, #f9fafb); border: 0; border-radius: 16px; padding: 20px; }
.result .checklist li { padding: 7px 0; }

#about h2:first-child { margin-top: 0; }

[hidden] { display: none !important; }

@media (min-width: 720px) {
  .docmain { padding: 48px 0 80px; }
  .doc h1, .flow h1 { font-size: 36px; }
  .card { padding: 22px 24px; }
  .doc-card { border-radius: 24px; padding: 40px; }
  .flow-card, .what { padding: 40px; border-radius: 24px; }
  .doc h2 { font-size: 24px; line-height: 32px; }
  .doc p, .doc li { font-size: 17px; line-height: 28px; }
}
@media (min-width: 1024px) {
  .docmain { padding: 64px 0 96px; }
  .docmain__grid { flex-direction: row; align-items: flex-start; gap: 80px; }
  .docmain__aside { flex: 0 0 300px; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; border-radius: 20px; }
  .docmain__aside .toc { padding: 24px; }
  .docmain__aside .toc ol { display: flex; flex-direction: column; gap: 12px; line-height: 20px; }
  .docmain__aside .toc li { display: block; white-space: normal; }
  .docmain__aside .toc li + li::before { content: none; }
  .docmain__aside .toc a { color: var(--text-2, #475467); }
  .docmain__aside .toc a[aria-current="true"] { color: var(--red); }
  .doc-card { flex: 1 1 820px; padding: 48px 56px; }
  .doc-card h1 { font-size: 44px; line-height: 52px; }
  .doc .doc-meta { margin-top: 16px; }

  .docmain--flow { padding: 80px 0 120px; }
  .flow-grid { flex-direction: row; justify-content: center; align-items: flex-start; gap: 32px; }
  .flow-card { flex: 0 1 600px; }
  .what { flex: 0 1 440px; padding: 32px; }
  .flow h1 { font-size: 40px; line-height: 48px; }
  .about-wrap { max-width: calc(1072px + 2 * var(--gutter)); margin-top: 32px; }
  #about { padding: 48px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .toc, .back-top, .docmain__aside, .flow-steps { display: none; }
  body { background: #fff; }
  .table-wrap { border: 0; overflow: visible; }
  .doc table { min-width: 0; }
}
