/* МЕДДОСЬЕ — сайт (версия для поиска). Первый экран главной — утверждённый вариант А. */
:root {
  --ink: #26313D; --accent: #C8763B; --bg: #F6F7F8; --muted: #5C6B7A;
  --line: #DDE3E8; --paper: #FFFFFF; --back: #B9C3CC; --soft: #EEF1F4;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #EEF1F4; --bg: #1B232C; --muted: #9AA7B4; --line: #2C3844; --paper: #25303B; --back: #4A5866; --soft: #222C36; }
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
a:hover { color: var(--accent); }

/* ---- первый экран главной (вариант А) ---- */
.stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 56px 20px;
}
.hero { min-height: clamp(520px, 88vh, 900px); }
.mark { width: 76px; height: 76px; margin-bottom: 30px; }
.m-back  { fill: none; stroke: var(--back); stroke-width: 2.5; }
.m-sheet { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.m-fold  { fill: var(--accent); }
.m-line  { stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; opacity: .55; }
.brand { margin: 0; font-weight: 700; line-height: 1; letter-spacing: .08em; font-size: clamp(36px, 6.4vw, 68px); }
.brand span { color: var(--accent); }
.brand small {
  display: block; margin-top: 20px; font-size: clamp(13px, 1.5vw, 17px); font-weight: 400; line-height: 1.5;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.rule { width: 56px; height: 2px; border: 0; background: var(--accent); margin: 30px auto 0; }

/* ---- внутренние страницы ---- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.logo {
  display: block; max-width: 808px; margin: 0 auto; padding: 18px 24px; border: 0;
  font-weight: 700; letter-spacing: .08em; font-size: 20px;
}
.logo span { color: var(--accent); }
.crumbs { max-width: 808px; width: 100%; margin: 0 auto; padding: 18px 24px 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); border-bottom-color: var(--line); }
.crumbs span { margin: 0 .5em; }

/* ---- текст ---- */
.text { flex: 1; width: 100%; max-width: 808px; margin: 0 auto; padding: 8px 24px 64px; font-size: 17px; line-height: 1.7; }
.text > h1 { margin: 22px 0 18px; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.2; }
.text .lead { font-size: 18.5px; color: var(--ink); opacity: .92; }
.text section { padding: 40px 0 6px; border-top: 1px solid var(--line); margin-top: 28px; }
.home .text section:first-child { border-top: 0; margin-top: 0; }
.text h2 { margin: 0 0 16px; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.25; }
.text h2::before { content: ""; display: block; width: 32px; height: 2px; background: var(--accent); margin-bottom: 16px; }
.text h3 { margin: 24px 0 6px; font-size: 18px; }
.text p, .text li { opacity: .9; }
.text ul, .text ol { padding-left: 1.3em; }
.text li { margin: 6px 0; }
.text table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15.5px; line-height: 1.5; }
.text th, .text td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.text th { font-weight: 600; color: var(--muted); font-size: 14px; letter-spacing: .02em; border-bottom: 2px solid var(--line); }
.text tr td:first-child { width: 45%; }
.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; margin: 16px 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 8px; }
.card {
  display: block; padding: 18px 18px 16px; border: 1px solid var(--line); border-top: 2px solid var(--accent);
  border-radius: 10px; background: var(--paper);
}
.card b { display: block; margin-bottom: 6px; font-size: 16.5px; line-height: 1.3; }
.card span { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.card:hover b { color: var(--accent); }
.faq { border-top: 1px solid var(--line); }
.faq:first-of-type { border-top: 0; }
.updated { margin-top: 44px; font-size: 14px; color: var(--muted); }

/* ---- подвал ---- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 22px 20px; }
.foot-nav ul { list-style: none; margin: 0 auto 14px; padding: 0; max-width: 808px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot-nav a { color: var(--muted); border-bottom-color: var(--line); }
.foot-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.foot-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; }
.foot-line .sep { margin: 0 .7em; opacity: .5; }
@media (max-width: 520px) {
  .foot-line { flex-direction: column; align-items: center; } .foot-line .sep { display: none; }
  .text tr td:first-child { width: auto; }
  .text th, .text td { padding: 8px 6px; }
}
