/* ==========================================================================
   Калькула — стили. Тёплая палитра, лёгкие анимации, адаптив без фреймворков.
   Внешние шрифты не подключаются: системный стек быстрее и надёжнее.
   ========================================================================== */

:root {
  --brand: #d2603a;
  --brand-d: #b34a28;
  --brand-l: #e8845c;
  --accent: #f2a65a;
  --accent-l: #ffd9ae;
  --bg: #fff9f3;
  --bg-2: #fdf1e6;
  --card: #fffdfb;
  --ink: #2c2018;
  --ink-2: #5b4a3e;
  --muted: #8a786b;
  --line: #f0e2d6;
  --line-2: #e6d3c2;
  --good: #2f9e6b;
  --good-bg: #e8f7ef;
  --warn: #c98a1a;
  --warn-bg: #fdf3dd;
  --bad: #c0392b;
  --bad-bg: #fceceb;
  --info: #3a7ca5;
  --info-bg: #eaf4fa;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(92,60,36,.05), 0 8px 24px -12px rgba(92,60,36,.18);
  --shadow-h: 0 2px 6px rgba(92,60,36,.08), 0 20px 40px -18px rgba(92,60,36,.28);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(1200px 400px at 90% -120px, #ffefe0 0%, rgba(255,239,224,0) 70%);
}

h1, h2, h3 { line-height: 1.22; color: var(--ink); margin: 0 0 .6em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); }
h2 { font-size: clamp(1.28rem, 1.05rem + .8vw, 1.7rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--brand-d); text-decoration: none; }
a:hover { color: var(--brand); }
strong, b { font-weight: 650; }
code { font-family: var(--mono); font-size: .92em; background: var(--bg-2); padding: .12em .4em; border-radius: 6px; }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.25em; }
li { margin: .25em 0; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: .6em 1em; border-radius: 0 0 var(--radius-s) 0;
}
.skip:focus { left: 0; }

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

/* ---------------------------------------------------------------- Шапка -- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,250,245,.86);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-in { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }

.logo { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.logo-mark { display: inline-flex; filter: drop-shadow(0 3px 8px rgba(210,96,58,.35)); transition: transform .35s ease; }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 1.18rem; letter-spacing: -.02em; }
.logo-text i { font-style: normal; font-size: .72rem; color: var(--muted); max-width: 22ch; }

.hdr-search { display: flex; flex: 1 1 260px; min-width: 200px; max-width: 480px; }
.hdr-search input {
  flex: 1; min-width: 0; padding: .55rem .8rem;
  border: 1px solid var(--line-2); border-right: 0; border-radius: var(--radius-s) 0 0 var(--radius-s);
  background: #fff; font: inherit; font-size: .95rem;
}
.hdr-search input::placeholder { color: var(--muted); }
.hdr-search button {
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: .55rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; font: inherit; font-weight: 600; cursor: pointer;
  transition: background .2s ease;
}
.hdr-search button:hover { background: var(--brand-d); }

.hdr-nav { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: .5rem .85rem; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: #fff; font-weight: 600; font-size: .93rem; display: inline-flex; align-items: center; gap: .45rem;
}
.menu > summary::-webkit-details-marker { display: none; }
.caret { width: 0; height: 0; border: 5px solid transparent; border-top-color: var(--brand); transform: translateY(2px); transition: transform .2s ease; }
.menu[open] .caret { transform: translateY(-1px) rotate(180deg); }
.menu ul {
  position: absolute; right: 0; top: calc(100% + .4rem); margin: 0; padding: .5rem; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-h); width: min(340px, 86vw);
  display: grid; grid-template-columns: 1fr; gap: .1rem;
  max-height: min(70vh, 520px); overflow: auto; z-index: 50;
}
.menu ul a { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: var(--radius-s); font-size: .95rem; }
.menu ul a:hover { background: var(--bg-2); }
.menu .ico { font-size: 1.05rem; }
.hdr-all { font-weight: 600; font-size: .93rem; padding: .5rem .6rem; white-space: nowrap; }

/* ----------------------------------------------------------- Крошки ------ */
.crumbs { margin: 1rem auto .2rem; font-size: .85rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: var(--line-2); }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--muted); }

/* ----------------------------------------------------------- Блоки ------- */
main { padding-bottom: 3rem; }
.block { margin: 2.2rem 0; }
.block-title { display: flex; align-items: center; gap: .5rem; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.more { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.block-desc { color: var(--ink-2); max-width: 80ch; margin-top: -.3em; }

.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.cols2 p { color: var(--ink-2); }

/* ----------------------------------------------------------- Hero ------- */
.hero { margin: 1.4rem 0 2.4rem; }
.hero-in {
  display: grid; grid-template-columns: 1.35fr .9fr; gap: 2rem; align-items: center;
  background: linear-gradient(135deg, #fff4e9 0%, #ffeadb 55%, #ffe2cf 100%);
  border: 1px solid var(--line); border-radius: 26px; padding: clamp(1.4rem, 3vw, 2.6rem);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-in::after {
  content: ""; position: absolute; inset: auto -60px -120px auto; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,166,90,.35), rgba(242,166,90,0) 68%); pointer-events: none;
}
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--brand-d); margin-bottom: .5rem; }
.hero h1 { margin-bottom: .5rem; }
.hero-lead { color: var(--ink-2); max-width: 62ch; }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin: 1.1rem 0 1.3rem; }
.hero-search { display: flex; flex: 1 1 320px; min-width: 240px; }
.hero-search input {
  flex: 1; min-width: 0; padding: .75rem 1rem; border: 1px solid var(--line-2); border-radius: var(--radius-s) 0 0 var(--radius-s);
  font: inherit; background: #fff;
}
.hero-search button { border-radius: 0 var(--radius-s) var(--radius-s) 0 !important; }
.hero-search.wide { max-width: 560px; margin-bottom: 1rem; }
.hero-facts { display: flex; gap: 1.6rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font-size: 1.5rem; color: var(--brand-d); line-height: 1.1; }
.hero-facts span { font-size: .82rem; color: var(--muted); }

.hero-art { position: relative; min-height: 260px; }
.art-card {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem .9rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
  min-width: 128px; animation: floaty 6s ease-in-out infinite;
}
.art-card i { font-style: normal; font-size: .76rem; color: var(--muted); }
.art-card b { font-size: 1.15rem; color: var(--ink); }
.art-ico { font-size: 1.2rem; }
.art-1 { top: 2%; left: 4%; animation-delay: 0s; }
.art-2 { top: 30%; right: 2%; animation-delay: .8s; }
.art-3 { bottom: 20%; left: 0; animation-delay: 1.6s; }
.art-4 { bottom: 2%; right: 14%; animation-delay: 2.4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ------------------------------------------------------ Сетки и карточки - */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.card {
  display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.05rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--accent); color: var(--ink); }
.card-ico { font-size: 1.5rem; line-height: 1; }
.card-title { font-weight: 650; }
.card-cat { font-size: .78rem; color: var(--muted); }

.links { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .15rem 1.4rem; }
.links-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.links li { margin: 0; }
.links a { display: inline-block; padding: .32rem 0; border-bottom: 1px dashed transparent; }
.links a:hover { border-bottom-color: var(--accent); }
.links-more { font-weight: 600; }

.seo-block { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }

/* ------------------------------------------------------- Калькулятор ---- */
.calc-page { margin-top: .6rem; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; }
.h1-ico { font-size: .92em; }
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 82ch; }
.meta-line { font-size: .86rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.dot { color: var(--line-2); }
.tag { background: var(--accent-l); color: #7a4a12; border-radius: 999px; padding: .1em .7em; font-size: .8rem; font-weight: 600; }

.calc-shell { display: grid; grid-template-columns: 1.5fr .85fr; gap: 1.4rem; margin: 1.6rem 0 2rem; align-items: start; }

/* --- форма --- */
.calc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.25rem; box-shadow: var(--shadow);
}
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem 1.1rem; }
.fld { display: flex; flex-direction: column; gap: .35rem; }
.fld label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.fld .unit { font-weight: 500; color: var(--muted); }
.fld input[type="number"], .fld input[type="text"], .fld input[type="date"], .fld select {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  font: inherit; font-size: .98rem; background: #fff; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.fld input:focus, .fld select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(210,96,58,.14); outline: none; }
.hint { font-size: .78rem; color: var(--muted); }
.fld[hidden] { display: none !important; }

.radios { display: flex; flex-wrap: wrap; gap: .4rem; }
.radio { position: relative; display: inline-flex; }
.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio span {
  padding: .42rem .8rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .9rem; background: #fff;
  transition: all .16s ease; cursor: pointer; color: var(--ink-2);
}
.radio input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui {
  width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; flex: none;
  transition: background .2s ease;
}
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s ease;
}
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch-text { font-size: .92rem; color: var(--ink-2); }

.rows { display: flex; flex-direction: column; gap: .5rem; }
.row-item { display: flex; gap: .4rem; align-items: center; }
.row-item input { flex: 1; min-width: 0; padding: .5rem .6rem; border: 1px solid var(--line-2); border-radius: var(--radius-s); font: inherit; background: #fff; }
.row-del {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff;
  color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; transition: all .15s ease;
}
.row-del:hover { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }

.calc-bar { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); flex-wrap: wrap; }
.calc-hint { font-size: .82rem; color: var(--muted); }

.btn {
  font: inherit; font-weight: 620; border-radius: var(--radius-s); padding: .62rem 1.15rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-l), var(--brand)); color: #fff; box-shadow: 0 6px 16px -8px rgba(210,96,58,.9); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand), var(--brand-d)); }
.btn-ghost { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-d); }
.btn-mini { padding: .35rem .7rem; font-size: .85rem; background: var(--bg-2); border-color: var(--line-2); color: var(--ink-2); }
.btn-mini:hover { border-color: var(--brand); color: var(--brand-d); }

/* --- выдача --- */
.calc-col { display: flex; flex-direction: column; gap: 1rem; }
.out {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.25rem; box-shadow: var(--shadow); min-height: 90px;
  animation: fadeUp .35s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.out-placeholder { color: var(--muted); font-size: .95rem; }

.out-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: .9rem; }
.out-card {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius-s); padding: .75rem .85rem;
}
.out-card-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.out-card-value { font-size: 1.5rem; font-weight: 750; color: var(--ink); line-height: 1.15; margin-top: .15rem; }
.out-card-value b { font-weight: inherit; }
.out-card-unit { font-size: .62em; font-weight: 600; color: var(--ink-2); margin-left: .15em; }
.out-card-hint { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

.tone-good { border-left-color: var(--good); background: var(--good-bg); }
.tone-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.tone-bad { border-left-color: var(--bad); background: var(--bad-bg); }
.tone-info { border-left-color: var(--info); background: var(--info-bg); }
.tone-accent { border-left-color: var(--accent); }

.out-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.badge { font-size: .8rem; font-weight: 620; padding: .22rem .7rem; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.badge.tone-good { background: var(--good-bg); color: #1d6b48; border-color: #b8e3cd; }
.badge.tone-warn { background: var(--warn-bg); color: #8a5c0c; border-color: #f0d9a6; }
.badge.tone-bad { background: var(--bad-bg); color: #9a2b20; border-color: #f0c2bd; }
.badge.tone-info { background: var(--info-bg); color: #285c7d; border-color: #bfdcec; }

.out-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: .3rem; }
.out-row { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.out-row span { color: var(--ink-2); }
.out-row b { font-variant-numeric: tabular-nums; text-align: right; }

.out-table-wrap { overflow-x: auto; margin-top: .9rem; }
.out-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.out-table caption { text-align: left; font-size: .84rem; color: var(--muted); padding-bottom: .35rem; }
.out-table th, .out-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.out-table thead th { background: var(--bg-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.out-table td { font-variant-numeric: tabular-nums; }

.out-note { font-size: .87rem; color: var(--ink-2); margin: .8rem 0 0; }
.out-warn { font-size: .9rem; color: #8a5c0c; background: var(--warn-bg); border: 1px solid #f0d9a6; border-radius: var(--radius-s); padding: .55rem .8rem; margin: .8rem 0 0; }
.out-svg { margin-top: 1rem; }
.out-svg svg { width: 100%; height: auto; display: block; }

/* --- сайдбар --- */
.calc-side { display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 84px; }
.side-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .95rem 1.05rem; box-shadow: var(--shadow); }
.side-box b { display: block; margin-bottom: .4rem; font-size: .95rem; }
.side-box ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--ink-2); }
.side-note { background: var(--info-bg); border-color: #bfdcec; }
.side-note p { margin: 0; font-size: .88rem; color: #285c7d; }

/* -------------------------------------------------------- Быстрые плитки - */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.quick-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .8rem; text-align: center; }
.quick-item b { display: block; font-size: 1.25rem; color: var(--brand-d); }
.quick-item span { font-size: .82rem; color: var(--muted); }

/* ---------------------------------------------------------- Таблицы ------ */
.dropcap::first-letter { font-size: 2.6em; float: left; line-height: .82; padding: .06em .12em 0 0; color: var(--brand); font-weight: 700; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--bg-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); position: sticky; top: 0; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fffaf5; }
.tbl td b { color: var(--ink); }
.tbl-tech code { font-size: .85em; }

.tech-notes { margin-top: 1rem; }
.tech-notes p { font-size: .92rem; color: var(--ink-2); }
.res-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .35rem; }
.res-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .8rem; background: var(--bg-2); border-radius: var(--radius-s); }
.res-list b { font-variant-numeric: tabular-nums; }
.note-list { color: var(--ink-2); }
.note-list li { margin: .4em 0; }

/* ------------------------------------------------------------- FAQ ------- */
.faq { display: flex; flex-direction: column; gap: .55rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); overflow: hidden; }
.faq summary { cursor: pointer; padding: .8rem 1rem; font-weight: 620; list-style: none; position: relative; padding-right: 2.4rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1rem; top: .72rem; color: var(--brand); font-weight: 700; font-size: 1.2rem; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 1rem .9rem; color: var(--ink-2); }
.faq-a p { margin: 0; }

/* --------------------------------------------- Похожие калькуляторы ------ */
.related-box {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff5ec 0%, #ffeadb 58%, #ffe2cf 100%);
  border: 1px solid var(--line-2); border-radius: 22px;
  padding: clamp(1.2rem, 2.6vw, 1.8rem); box-shadow: var(--shadow);
}
.related-box::before,
.related-box::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.related-box::before {
  inset: auto -70px -130px auto; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(242,166,90,.38), rgba(242,166,90,0) 68%);
}
.related-box::after {
  inset: -140px auto auto -90px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(232,132,92,.18), rgba(232,132,92,0) 70%);
}
.related-head { position: relative; z-index: 1; margin-bottom: 1rem; }
.related-head h2 { margin-bottom: .25rem; }
.related-sub { margin: 0; color: var(--ink-2); font-size: .95rem; max-width: 70ch; }

.related-grid {
  position: relative; z-index: 1; list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem;
}
.rel-item { margin: 0; }
.rel-card {
  display: flex; align-items: center; gap: .75rem; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem .85rem; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--accent); color: var(--ink); }
.rel-ico {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.2rem;
  border-radius: 12px; background: linear-gradient(135deg, #fff2e6, #ffe3cd);
  border: 1px solid var(--line); transition: transform .25s ease;
}
.rel-card:hover .rel-ico { transform: rotate(-6deg) scale(1.06); }
.rel-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rel-title { font-weight: 620; }
.rel-cat { font-size: .78rem; color: var(--muted); }
.rel-arrow {
  margin-left: auto; color: var(--brand); opacity: 0; transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.rel-card:hover .rel-arrow { opacity: 1; transform: none; }
.related-box .back { position: relative; z-index: 1; margin-top: 1.1rem; }
.related-box .back a {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px;
  padding: .5rem 1rem; font-size: .92rem;
  transition: border-color .2s ease, color .2s ease, transform .15s ease;
}
.related-box .back a:hover { border-color: var(--brand); transform: translateX(2px); }

/* ----------------------------------------------------------- Chips ------- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.6rem; }
.chip { padding: .38rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: .88rem; color: var(--ink-2); transition: all .15s ease; }
.chip:hover { border-color: var(--brand); color: var(--brand-d); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.back { margin-top: 1rem; font-weight: 600; }

/* ---------------------------------------------------------- Футер -------- */
.ftr { background: #2f241c; color: #e9dccf; margin-top: 3rem; padding: 2.4rem 0 1rem; }
.ftr a { color: #f0d0b6; }
.ftr a:hover { color: #fff; }
.ftr-in { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1.6rem; }
.ftr-col b { display: block; margin-bottom: .5rem; color: #fff; }
.ftr-col p { font-size: .88rem; color: #c9b6a5; }
.ftr-col ul { list-style: none; padding: 0; font-size: .9rem; }
.ftr-note { font-size: .8rem !important; color: #a89a8c !important; }
.ftr-bot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.6rem; padding-top: .9rem; font-size: .82rem; color: #b5a294; }

/* ---------------------------------------------------------- Анимации ----- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------- Адаптив ------- */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .calc-shell { grid-template-columns: 1fr; }
  .calc-side { position: static; }
  .cols2 { grid-template-columns: 1fr; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hdr-search { order: 3; flex-basis: 100%; max-width: none; }
  .hdr-nav { margin-left: 0; }
  .logo-text i { display: none; }
  .out-cards { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .tbl td { border: 0; padding: .3rem .85rem; }
  .tbl td[data-th]::before { content: attr(data-th) ": "; color: var(--muted); font-size: .8rem; }
  .ftr-in { grid-template-columns: 1fr; }
}
