/* Сайт Романа Досеева. Один файл стилей, сначала телефон. */
:root {
  --bg: #f7f4ee;
  --card: #fffdf9;
  --ink: #23211d;
  --muted: #625c52;
  --accent: #2f5d50;
  --accent-dark: #244a40;
  --accent-ink: #ffffff;
  --line: #e0d9cb;
  --soft: #ece6da;
  --todo: #ffe98a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: 1.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin-top: 2.2em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.45em; }

/* Шапка */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { padding-top: 14px; padding-bottom: 10px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand span { font-weight: 400; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

/* Первый экран */
.hero { padding: 36px 0 28px; }
.hero h1 { font-size: 1.9rem; }
.lead { font-size: 1.12rem; color: var(--ink); }
.under { color: var(--muted); font-size: 0.95rem; margin-top: 12px; }
.btn-row { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; align-items: stretch; }
.btn {
  display: inline-block; text-align: center; text-decoration: none; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: 15px 22px; border-radius: 10px; font-size: 1.05rem; min-height: 52px;
}
.btn:hover { background: var(--accent-dark); color: var(--accent-ink); }
.btn-quiet { display: inline-block; padding: 10px 0; font-size: 1rem; }

/* Блоки */
section { padding: 6px 0 10px; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 1em 0; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 0; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card.soon { background: transparent; border-style: dashed; color: var(--muted); }
.badge { display: inline-block; font-size: 0.8rem; background: var(--soft); color: var(--muted); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.situations { list-style: none; padding: 0; }
.situations li { background: var(--card); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 12px 16px; margin-bottom: 10px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 16px; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--soft); color: var(--accent-dark); font-weight: 700; text-align: center; line-height: 32px;
}
.price { font-size: 1.15rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.note { background: var(--soft); border-radius: 10px; padding: 14px 16px; margin: 1.2em 0; }
.short { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 1.4em 0; }
.short h2 { margin-top: 0; font-size: 1.1rem; }
.short ul { margin-bottom: 0; }
.cta { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 18px; margin: 2.2em 0 1em; }
.cta h2 { margin-top: 0; }

/* Место для фото */
.photo {
  border: 2px dashed var(--muted); border-radius: 12px; background: var(--soft); color: var(--muted);
  min-height: 220px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 18px; font-size: 0.95rem; margin: 1em 0;
}

/* Пометки для Романа: убрать до публикации */
mark.todo { background: var(--todo); color: #3a2f00; padding: 1px 5px; border-radius: 4px; font-weight: 600; }

/* Вопрос – ответ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { margin-bottom: 14px; }

/* Статья */
.article-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.4em; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 18px 0 10px; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); }

/* Подвал */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 0.92rem; }
.site-footer .nav { margin: 0 0 12px; }

@media (min-width: 720px) {
  body { font-size: 19px; }
  h1 { font-size: 2.2rem; }
  .hero { padding: 56px 0 36px; }
  .hero h1 { font-size: 2.5rem; }
  .btn-row { flex-direction: row; align-items: center; gap: 22px; }
  .cards.two { grid-template-columns: 1fr 1fr; }
  .cards.three { grid-template-columns: 1fr 1fr 1fr; }
  .site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .nav { margin-top: 0; flex-wrap: nowrap; gap: 4px 14px; white-space: nowrap; }
  .brand { white-space: nowrap; flex-shrink: 0; }
  .brand span { display: block; font-size: 0.85rem; line-height: 1.3; }
  .btn { white-space: nowrap; }
}
@media print { .site-header .nav, .btn-row, .site-footer .nav { display: none; } }

.text-link { display: inline-block; padding: 10px 0; font-size: 1rem; text-decoration: underline; }

/* Технические страницы */
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }

/* Окно согласия на счётчик: появляется, только если счётчик подключён (см. _tools/site-config.json) */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; max-width: 44rem; margin: 0 auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 0.92rem; line-height: 1.5; box-shadow: 0 6px 24px rgba(35, 33, 29, 0.18); }
.consent p { margin: 0 0 10px; }
.consent-row { display: flex; flex-wrap: wrap; gap: 10px; }
.consent button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; padding: 10px 18px; min-height: 44px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.consent button.quiet { background: transparent; color: var(--accent); }
.consent button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button.linklike { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Компактное меню на телефоне (до 600 px): имя и кнопка «Меню» в одной строке, пункты раскрываются. Без JS. */
.menu-toggle, .menu-btn { display: none; }
@media (max-width: 1023px) {
  .site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 6px; }
  .menu-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
  .menu-btn { display: inline-block; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 9px 16px; min-height: 44px; font-size: 0.95rem; color: var(--ink); background: var(--bg); }
  .menu-toggle:focus-visible + .menu-btn { outline: 3px solid var(--accent); outline-offset: 2px; }
  .menu-toggle:checked + .menu-btn { background: var(--card); }
  .site-header .nav { display: none; flex-basis: 100%; flex-direction: column; margin-top: 6px; padding-bottom: 6px; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .site-header .nav a { padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
}
@media (max-width: 600px) {
  .site-header .brand span { display: none; }
}

/* Фото Романа */
.portrait { margin: 0 0 1.4em; }
.portrait picture, .portrait img { display: block; }
.portrait img { width: 100%; max-width: 320px; height: auto; border-radius: 12px; }
.about-block { display: grid; gap: 20px; }
@media (min-width: 700px) { .about-block { grid-template-columns: 240px 1fr; align-items: start; } .about-block .portrait { margin: 0; } }

/* отзывы */
.reviews { margin: 2em 0; }
.review { background: var(--card); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 0 0 14px; }
.review blockquote { margin: 0; }
.review blockquote p { margin: 0 0 .6em; }
.review figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

/* Телефон и планшет (в том числе лёжа): текст не мельче 16 px, нажимаемое не ниже 44 px */
@media (max-width: 1023px) {
  .brand span { font-size: 1rem; }
  .nav, .under, .small, .badge, .article-meta, .crumbs, table, .site-footer, .menu-btn, .review figcaption, .consent, .photo { font-size: 1rem; }
  .brand { display: inline-block; padding: 10px 0; }
  .site-footer .nav a, .crumbs a { display: inline-block; padding: 11px 0; }
}
