/* ============================================================================
   Selecline BM1250C — справочник владельца.
   Дизайн-система: тёплая светлая палитра, зелёный акцент, редакционная вёрстка.
   ========================================================================== */

:root {
  color-scheme: light;

  /* поверхности и текст */
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --surface-2: #f0eae0;
  --ink: #33302b;
  --ink-strong: #1b1916;
  --muted: #6e665c;
  --line: #e3dccf;
  --line-2: #cec3b0;

  /* акценты */
  --green: #3f6b34;
  --green-ink: #35592c;
  --green-soft: #e9efe2;
  --on-green: #ffffff;
  --clay: #a8592f;
  --clay-soft: #f8ece3;
  --amber: #8a6412;
  --amber-soft: #f7efd9;
  --red: #99392b;
  --red-soft: #f8e8e4;

  /* иллюстрации */
  --dough: #ead9b8;
  --dough-line: #c6a97e;
  --dough-hi: #f8f0dd;
  --water: #a8cde8;

  /* геометрия */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --w-shell: 1260px;
  --w-text: 720px;
  --w-toc: 220px;
  --gutter: 30px;
  --shadow: 0 10px 30px -18px rgba(45, 35, 25, .5);
  --bleed: 0px;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Literata", Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14120f;
  --surface: #1c1916;
  --surface-2: #262119;
  --ink: #e5ddd1;
  --ink-strong: #fbf6ed;
  --muted: #a1968a;
  --line: #322c25;
  --line-2: #4a4238;

  --green: #8dc077;
  --green-ink: #a7d492;
  --green-soft: #232c1d;
  --on-green: #16190f;
  --clay: #dc9a6f;
  --clay-soft: #2e2018;
  --amber: #d9ac5e;
  --amber-soft: #2c2413;
  --red: #e0917f;
  --red-soft: #2e1c18;

  --dough: #c7ab7e;
  --dough-line: #8e764f;
  --dough-hi: #e3d0a8;
  --water: #6b93b1;
  --shadow: 0 10px 30px -18px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.68;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--green-ink); text-decoration-thickness: 1px; text-underline-offset: .17em; }
a:hover { color: var(--ink-strong); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: 12px; top: 8px; z-index: 100;
  transform: translateY(-200%);
  background: var(--surface); color: var(--ink-strong); padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: var(--r);
}
.skip:focus { transform: none; }

.shell { width: 100%; max-width: var(--w-shell); margin-inline: auto; padding-inline: 20px; }

/* =========================== типографика ================================= */

h1, h2, h3 { color: var(--ink-strong); }

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(29px, 4.2vw, 42px);
  line-height: 1.16;
  letter-spacing: -.015em;
  margin: .1em 0 .4em;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.7vw, 29px);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 2.1em 0 .55em;
  text-wrap: balance;
}

h3 { font-size: 19px; font-weight: 700; line-height: 1.35; margin: 1.9em 0 .45em; }

p { margin: 0 0 1.05em; }
ul, ol { padding-left: 1.25em; }
li { margin: .35em 0; }
strong, b { color: var(--ink-strong); font-weight: 600; }

.lead {
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 1.2em;
}

.kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .8em;
}

.fine { font-size: 15px; color: var(--muted); }
.fine a { color: var(--muted); }

code {
  background: var(--surface-2); padding: .1em .38em; border-radius: var(--r-sm);
  font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.crumbs { font-size: 13.5px; color: var(--muted); margin: 20px 0 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink-strong); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 .5em; opacity: .5; }

/* ============================== шапка ==================================== */

.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  max-width: var(--w-shell); margin-inline: auto; padding: 0 20px;
  display: flex; align-items: center; gap: 16px; min-height: 66px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink-strong); flex: 0 0 auto; }
.brand-mark { width: 32px; height: 23px; color: var(--green); flex: 0 0 32px; }
.brand-t { display: block; font-weight: 700; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; }
.brand-s { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .more > summary {
  display: block; padding: 9px 12px; border-radius: var(--r);
  font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none;
  white-space: nowrap; cursor: pointer;
}
.nav > a:hover, .more > summary:hover { background: var(--surface-2); color: var(--ink-strong); }
.nav > a[aria-current] { color: var(--green-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--green); border-radius: var(--r) var(--r) 0 0; }

.more { position: relative; }
.more > summary { display: flex; align-items: center; gap: 4px; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more .chev { width: 16px; height: 16px; color: var(--muted); }
.more[open] .chev { transform: rotate(180deg); }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 264px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 6px; box-shadow: var(--shadow);
}
.more-menu a {
  display: block; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 14.5px; color: var(--ink); text-decoration: none;
}
.more-menu a:hover { background: var(--surface-2); color: var(--ink-strong); }
.more-menu a[aria-current] { color: var(--green-ink); font-weight: 600; }

.ibtn {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--muted); cursor: pointer;
}
.ibtn:hover { background: var(--surface-2); color: var(--ink-strong); }
.ibtn svg { width: 20px; height: 20px; }
.theme-btn .i-dark, :root[data-theme="dark"] .theme-btn .i-light { display: none; }
:root[data-theme="dark"] .theme-btn .i-dark { display: block; }
.burger { display: none; }

.mobnav { display: none; border-top: 1px solid var(--line); padding: 8px 20px 18px; }
.mobnav a {
  display: block; padding: 13px 2px; font-size: 16px; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line);
}
.mobnav a:last-child { border-bottom: 0; }
.mobnav-sep {
  display: block; margin-top: 14px; padding: 8px 2px 4px;
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: grid; margin-left: auto; }
  .mobnav { display: block; }
  .mobnav[hidden] { display: none; }
}

/* ============================ раскладка ================================== */

main { display: block; padding-bottom: 8px; }

.prose { max-width: var(--w-text); margin-inline: auto; min-width: 0; overflow-wrap: break-word; }
@media (min-width: 940px) { .prose { --bleed: 40px; } }
@media (min-width: 1260px) { .prose { --bleed: 125px; } }

.with-toc { display: grid; gap: 0; }
.with-toc > * { min-width: 0; }
.with-toc .prose { --bleed: 0px; order: 2; }
.with-toc .toc { order: 1; }
.page-hd { padding-top: 2px; }

/* Общая сетка широких экранов: поле — колонка текста — поле.
   Текст всегда по центру, в правом поле живут оглавление и иллюстрация. */
@media (min-width: 1260px) {
  .with-toc {
    grid-template-columns: var(--w-toc) minmax(0, var(--w-text)) var(--w-toc);
    column-gap: var(--gutter); justify-content: center;
  }
  .with-toc .prose { order: 1; grid-column: 2; }
  .with-toc .toc { order: 2; grid-column: 3; }
  .toc-box { position: sticky; top: 90px; }
}

/* локальное оглавление */
.toc { margin: 4px 0 26px; }
.toc-box { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2px 16px; background: var(--surface); }
.toc-box > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 13px 0; font-size: 13px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.toc-box > summary::-webkit-details-marker { display: none; }
.toc-box > summary svg { width: 17px; height: 17px; flex: 0 0 17px; }
.toc-box > summary .chev { margin-left: auto; }
.toc-box[open] > summary .chev { transform: rotate(180deg); }
.toc ol { list-style: none; padding: 0; margin: 0 0 14px; }
.toc li { margin: 0; }
.toc li a {
  display: block; padding: 6px 0 6px 13px; margin-left: -1px;
  border-left: 2px solid var(--line); font-size: 14.5px; line-height: 1.4;
  color: var(--muted); text-decoration: none;
}
.toc li a:hover { color: var(--ink-strong); border-left-color: var(--green); }

@media (min-width: 1260px) {
  .toc-box { border: 0; border-radius: 0; padding: 0; background: none; }
  .toc-box > summary { padding: 0 0 10px 13px; cursor: default; pointer-events: none; }
  .toc-box > summary svg:first-child, .toc-box > summary .chev { display: none; }
}

/* ============================ первый экран =============================== */

.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-in {
  display: grid; grid-template-columns: minmax(0, var(--w-text)); justify-content: center;
  padding-top: 40px; padding-bottom: 40px; align-items: center;
}
.hero h1 { margin-top: .15em; }
.hero-img { max-width: 250px; margin-top: 28px; }

@media (min-width: 700px) {
  .hero-in { padding-top: 54px; padding-bottom: 50px; }
}

@media (min-width: 1260px) {
  .hero-in {
    grid-template-columns: var(--w-toc) minmax(0, var(--w-text)) var(--w-toc);
    column-gap: var(--gutter);
  }
  .hero-txt { grid-column: 2; }
  .hero-img { grid-column: 3; max-width: none; margin-top: 0; }
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 11px 22px; border-radius: var(--r); font-weight: 600; font-size: 16px;
  background: var(--green); color: var(--on-green); text-decoration: none; border: 1px solid var(--green);
}
.btn:hover { color: var(--on-green); filter: brightness(1.07); }
.btn-2 { background: transparent; color: var(--ink-strong); border-color: var(--line-2); }
.btn-2:hover { color: var(--ink-strong); background: var(--surface-2); filter: none; }
.cta {
  display: inline-flex; align-items: center; min-height: 46px; padding: 11px 22px;
  border-radius: var(--r); font-weight: 600; background: var(--green); color: var(--on-green); text-decoration: none;
}
.cta:hover { color: var(--on-green); filter: brightness(1.07); }

.link-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; text-decoration: none; color: var(--green-ink);
}
.link-more:hover { color: var(--green-ink); text-decoration: underline; }
.link-more .ico svg { width: 18px; height: 18px; display: block; }
.row-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.facts { display: flex; flex-wrap: wrap; gap: 0; list-style: none; padding: 0; margin: 30px 0 0; }
.facts li { margin: 0; padding: 2px 22px; border-left: 1px solid var(--line-2); }
.facts li:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 620px) {
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .facts li { padding: 0; border-left: 0; }
}
.facts b { display: block; font-size: 18px; line-height: 1.3; color: var(--ink-strong); letter-spacing: -.01em; }
.facts span { display: block; font-size: 13.5px; color: var(--muted); }

/* ====================== лист «быстрый старт» ============================= */

.sheet {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  margin: 40px 0 44px;
  overflow: hidden;
}
.sheet-hd { padding: 26px 26px 20px; border-bottom: 2px solid var(--ink-strong); }
.sheet-hd h2 { margin: 0 0 .3em; font-size: clamp(24px, 3.2vw, 32px); }
.sheet-hd .kicker { color: var(--clay); margin-bottom: .55em; }
.sheet-sub { margin: 0; color: var(--muted); font-size: 15.5px; }
.sheet-sub b { color: var(--ink-strong); }

.sheet-grid { display: grid; grid-template-columns: 1fr; }
.sheet-col { padding: 22px 26px 24px; border-top: 1px solid var(--line); }
.sheet-col:first-child { border-top: 0; }
.sheet-col h3 { display: flex; align-items: center; gap: 11px; margin: 0 0 14px; font-size: 17px; }
.sheet-n {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink);
  font-size: 13.5px; font-weight: 700;
}
.sheet-fine { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); }
.sheet-foot {
  display: flex; gap: 12px; align-items: flex-start; margin: 0;
  padding: 18px 26px; border-top: 1px solid var(--line); background: var(--surface-2);
  font-size: 15.5px;
}
.sheet-foot .ico { flex: 0 0 21px; color: var(--green-ink); }
.sheet-foot .ico svg { width: 21px; height: 21px; display: block; }

@media (min-width: 760px) {
  .sheet-grid { grid-template-columns: 1fr 1fr; }
  .sheet-col:nth-child(2) { border-left: 1px solid var(--line); }
  .sheet-col-full { grid-column: 1 / -1; border-left: 0; }
}

/* количества: цифра слева, название справа */
.qty { display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; margin: 0; }
.qty dt, .qty dd { padding: 8px 0; border-bottom: 1px dotted var(--line-2); margin: 0; }
.qty dt { font-weight: 700; color: var(--ink-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qty dd { color: var(--ink); }
.qty dd span { display: block; font-size: 13.5px; color: var(--muted); }
.qty dt:last-of-type, .qty dd:last-of-type { border-bottom: 0; }
.qty-lg { font-size: 17px; margin: 18px 0 6px; }
.qty-lg dt, .qty-lg dd { padding: 11px 0; }

.ctrl { display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; margin: 0; }
.ctrl dt, .ctrl dd { padding: 8px 0; border-bottom: 1px dotted var(--line-2); margin: 0; }
.ctrl dt {
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  align-self: center; white-space: nowrap;
}
.ctrl dt span, .defs dt span {
  display: block; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--muted); text-transform: none;
}
.ctrl dd span { color: var(--muted); font-weight: 400; font-size: 14px; }
.ctrl dd { font-weight: 600; color: var(--ink-strong); }
.ctrl dt:last-of-type, .ctrl dd:last-of-type { border-bottom: 0; }

/* ===================== три состояния колобка ============================= */

.dough3 { display: grid; grid-template-columns: 1fr; gap: 0; margin: 22px 0; }
.dough3 figure { position: relative; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); }
.dough3 figure:first-child { border-top: 0; padding-top: 4px; }
.dough3 .dough { width: 100%; max-width: 230px; height: auto; display: block; }
.dough3 figcaption { margin-top: 8px; }
.dough3 b { display: flex; align-items: center; gap: 8px; color: var(--ink-strong); font-size: 16px; }
.dough3 b::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.d-dry b::before { background: var(--amber); }
.d-ok b::before { background: var(--green); }
.d-wet b::before { background: var(--clay); }
.d-sign { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.d-act { display: block; font-size: 14.5px; color: var(--ink); margin-top: 7px; padding-top: 7px; border-top: 1px dotted var(--line-2); }

@media (min-width: 620px) {
  .dough3 { grid-template-columns: repeat(3, 1fr); gap: 0 26px; }
  .dough3 figure { border-top: 0; padding: 4px 0 0; }
  .dough3 figure + figure::before {
    content: ""; position: absolute; left: -13px; top: 0; bottom: 4px; width: 1px; background: var(--line);
  }
  .dough3 .dough { max-width: 100%; }
}

/* ======================= порядок закладки ================================ */

.seq { margin: 26px 0 30px; }
.seq-pre {
  display: flex; align-items: center; gap: 14px; margin: 0;
  padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  font-size: 15px; color: var(--muted);
}
.seq-pre .seq-pan { flex: 0 0 52px; width: 52px; }
.seq-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.seq-list li {
  position: relative; margin: 0; display: grid;
  grid-template-columns: 26px 62px 1fr; align-items: center; gap: 14px;
  padding: 8px 0;
}
.seq-n {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--green-ink); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700;
}
.seq-pan { width: 100%; height: auto; display: block; }
.seq-t { font-weight: 600; color: var(--ink-strong); font-size: 15.5px; line-height: 1.35; }
.seq-t em { display: block; font-style: normal; font-weight: 400; font-size: 13.5px; color: var(--muted); }

@media (min-width: 860px) {
  .seq-list { grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 24px; }
  .seq-list li { display: block; text-align: center; padding: 0 14px; }
  .seq-n { margin: 0 auto 6px; }
  .seq-pan { max-width: 104px; margin: 0 auto; }
  .seq-t { margin-top: 8px; display: block; }
  .seq-list li + li::before {
    content: ""; position: absolute; left: -6px; top: 72px; width: 11px; height: 11px;
    border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2);
    transform: rotate(45deg);
  }
}

/* =========================== список рецептов ============================= */

.rlist { list-style: none; margin: 24px 0 20px; padding: 0; border-top: 1px solid var(--line); }
.rlist li { margin: 0; }
.rlist a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 8px 20px;
  padding: 15px 2px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.rlist a:hover { background: var(--surface-2); color: inherit; }
.rl-t { display: block; font-size: 17.5px; font-weight: 600; color: var(--ink-strong); line-height: 1.3; }
.rl-m { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; }
.rl-m b { color: var(--green-ink); font-weight: 700; }
.rl-r { font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-r i { font-style: normal; color: var(--muted); margin: 0 2px; }
.rl-a { width: 20px; height: 20px; color: var(--line-2); }
.rlist a:hover .rl-a { color: var(--green); }

@media (max-width: 560px) {
  .rlist a { grid-template-columns: minmax(0, 1fr) 22px; gap: 4px 14px; }
  .rl-main { grid-column: 1; grid-row: 1; }
  .rl-r { grid-column: 1; grid-row: 2; font-size: 13.5px; color: var(--muted); }
  .rl-a { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

/* ============================ страница рецепта =========================== */

.recipe .r-ratio {
  font-size: 18px; color: var(--muted); margin: -.2em 0 1em;
  font-variant-numeric: tabular-nums;
}
.r-setup {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 0 0 1.6em; padding: 14px 18px;
  background: var(--surface-2); border-radius: var(--r-lg);
  font-size: 15.5px; font-weight: 600; color: var(--ink-strong);
}
.r-setup span { white-space: nowrap; }
.r-prog { color: var(--green-ink); font-size: 17px; letter-spacing: .01em; }
.r-setup i { display: block; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }
.r-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }

.ticks { list-style: none; padding: 0; margin: 18px 0; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; margin: 0; }
.ticks .ico { flex: 0 0 21px; color: var(--green); }
.ticks .ico svg { width: 21px; height: 21px; display: block; }

/* ============================== шаги ===================================== */

.steps { list-style: none; counter-reset: s; margin: 20px 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative; margin: 0 0 0 12px;
  padding: 0 0 16px 30px; border-left: 1px solid var(--line);
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: -13px; top: -1px;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--green-ink);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
}

/* =========================== плашки ====================================== */

.note, .warn, .tip {
  margin: 22px 0; padding: 14px 18px;
  border-left: 3px solid var(--green); border-radius: 0 var(--r) var(--r) 0;
  background: var(--green-soft); overflow: hidden;
}
.warn { border-left-color: var(--amber); background: var(--amber-soft); }
.tip { border-left-color: var(--clay); background: var(--clay-soft); }
.note :last-child, .warn :last-child, .tip :last-child { margin-bottom: 0; }
.note .ico, .warn .ico, .tip .ico { float: left; margin: 2px 11px 4px 0; }
.note .ico { color: var(--green-ink); }
.warn .ico { color: var(--amber); }
.tip .ico { color: var(--clay); }
.note .ico svg, .warn .ico svg, .tip .ico svg { width: 21px; height: 21px; display: block; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 22px; margin: 22px 0;
}
.card > :last-child { margin-bottom: 0; }

/* определения: кнопка → что делает */
.defs { display: grid; grid-template-columns: max-content 1fr; column-gap: 22px; margin: 20px 0; }
.defs dt, .defs dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.defs dt { font-size: 13px; font-weight: 700; letter-spacing: .07em; color: var(--ink-strong); white-space: nowrap; align-self: center; }
.defs dd { color: var(--ink); font-size: 15.5px; }
.defs dt:last-of-type, .defs dd:last-of-type { border-bottom: 0; }

/* помощник выбора программы */
.picker { list-style: none; margin: 22px 0; padding: 0; border-top: 1px solid var(--line); }
.picker li {
  margin: 0; display: grid; grid-template-columns: 1fr max-content; align-items: baseline; gap: 4px 18px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.picker b { font-weight: 400; color: var(--ink); }
.picker span {
  font-weight: 700; color: var(--green-ink); font-size: 15px; letter-spacing: .02em; white-space: nowrap;
}
.picker span i { font-style: normal; color: var(--muted); font-weight: 600; margin-right: 7px; }

/* ============================= таблицы =================================== */

.table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th {
  text-align: left; padding: 9px 16px 9px 0; vertical-align: bottom;
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1.5px solid var(--line-2); white-space: nowrap;
}
td { text-align: left; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }

.tbl-sticky th { position: sticky; top: 66px; z-index: 2; background: var(--bg); }

@media (max-width: 660px) {
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr { display: block; width: 100%; }
  .tbl-stack tr {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 12px 15px; margin-bottom: 12px; background: var(--surface);
  }
  .tbl-stack td {
    border: 0; padding: 4px 0; display: grid; grid-template-columns: 108px 1fr; gap: 12px;
    white-space: normal;
  }
  .tbl-stack td::before { content: attr(data-l); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
  .tbl-stack td:first-child {
    display: block; font-weight: 600; font-size: 16.5px; color: var(--ink-strong); padding-bottom: 8px;
  }
  .tbl-stack td:first-child::before { display: none; }
  .tbl-stack tbody tr:hover td { background: none; }
  .tbl-stack th { position: static; }
  td.num { white-space: normal; }
}

/* =========================== иллюстрации ================================= */

.panel { display: block; width: 100%; height: auto; margin: 26px 0; }

/* фотографии */
.ph { margin: 26px 0; }
.ph img, .gallery img, .hero-img img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2);
}
.ph figcaption { margin-top: 10px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px; margin: 26px 0; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 3 / 4; object-fit: cover; }
.gallery figcaption { font-size: 14px; margin-top: 9px; }

.ph-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 24px 0; }
.ph-row img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); }

figure { margin: 26px 0; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* ============================== FAQ ====================================== */

.faq { border-top: 1px solid var(--line); margin: 22px 0 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 17px 2px; min-height: 44px; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 600; color: var(--ink-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green-ink); }
.faq .chev { width: 20px; height: 20px; flex: 0 0 20px; color: var(--muted); margin-top: 4px; transition: transform .15s ease; }
.faq details[open] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 36px 18px 2px; }
.faq-a > :last-child { margin-bottom: 0; }

/* ============================= подвал ==================================== */

.ftr {
  border-top: 1px solid var(--line); background: var(--surface);
  margin-top: 76px; padding: 44px 0 56px; font-size: 14.5px; color: var(--muted);
}
.ftr-in { display: grid; grid-template-columns: 1fr; gap: 32px; }
.ftr-brand { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink-strong); margin: 0 0 10px; }
.ftr-about p { margin: 0 0 .8em; max-width: 52ch; }
.ftr a { color: var(--ink); }
.ftr-h { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.ftr-nav a { display: block; padding: 6px 0; text-decoration: none; }
.ftr-nav a:hover { color: var(--green-ink); text-decoration: underline; }

@media (min-width: 820px) {
  .ftr-in { grid-template-columns: 1.7fr 1fr 1.1fr; gap: 48px; }
}

/* ============================== прочее =================================== */

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

/* широкие блоки выходят за колонку текста вправо, на свободное поле */
.prose > .table-wrap,
.prose > figure,
.prose > .panel,
.prose > .seq,
.prose > .dough3,
.prose > .sheet,
.prose > .rlist,
.prose > .picker { width: calc(100% + var(--bleed) * 2); max-width: none; margin-inline: calc(-1 * var(--bleed)); }

@media print {
  .hdr, .ftr, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  .sheet, .card { break-inside: avoid; border-color: #bbb; }
  a { text-decoration: underline; }
}
