/* Калькулятор гибки Абамет (testai, 26.10.2026): цвета и шрифт сайта — --root-accent-1/2, IBM Plex Sans (OFL, файлы с сайта). */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-cyrillic.woff2) format("woff2"); unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/ibm-plex-sans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
  U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --red: #ee2737; --red-h: #d21020; --navy: #253746; --navy-h: #0c2233; --panel: #f1f5f8; --panel-h: #ced6db;
  --line: #d9e0e6; --muted: #727b83; --ok: #2ea555; --warn: #c77700; --bad: #d21020; --link: #0074d6;
  --r: 10px; --shadow: 0 1px 2px rgba(37, 55, 70, .06), 0 4px 16px rgba(37, 55, 70, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--navy); font: 400 16px/1.45 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hide { display: none !important; }

.testai { background: #ffcc00; color: #000; font-size: 13px; text-align: center; padding: 4px 16px; }
.top { border-bottom: 1px solid var(--line); background: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo img { display: block; height: 32px; width: auto; }
.top-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.top-nav a { color: var(--navy); font-weight: 500; font-size: 15px; }
.top-nav a:hover { color: var(--red); text-decoration: none; }

.crumbs { margin: 18px 0 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; margin: 4px 0 8px; font-weight: 600; }
.lead { margin: 0 0 18px; max-width: 760px; color: #3d4f5e; }

.tabs { display: inline-flex; background: var(--panel); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: transparent; color: var(--navy); font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1; padding: 11px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }

@media (max-width: 600px) { .tabs { display: flex; width: 100%; } .tabs button { flex: 1; padding: 10px 8px; font-size: 14px; white-space: normal; line-height: 1.2; } }

.grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.inputs { position: sticky; top: 12px; }
@media (max-width: 900px) { .inputs { position: static; } }

.f { display: block; margin: 0 0 14px; }
.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
select, input[type=number], input[type=text] { width: 100%; font: inherit; color: var(--navy); background: #fff; border: 1px solid #b9c4cd; border-radius: 8px; padding: 10px 12px; min-height: 44px; }
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
input[type=range] { width: 100%; accent-color: var(--red); }
.with-unit { display: flex; gap: 8px; }
.with-unit input { flex: 1; min-width: 0; }
.rm-note { font-size: 13px; color: var(--muted); margin: -8px 0 14px; }

.seg { display: flex; background: var(--panel); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; font-family: inherit; font-weight: 500; font-size: 14px; line-height: 1.2; color: var(--navy); padding: 9px 6px; border-radius: 6px; cursor: pointer; min-height: 38px; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.seg.small button { padding: 7px 10px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.chips button { border: 1px solid var(--line); background: #fff; color: var(--navy); font-family: inherit; font-size: 13px; line-height: 1; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.chips button:hover { border-color: var(--navy); }
.chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 600px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.kpi { background: var(--panel); border-radius: var(--r); padding: 14px 16px; }
.kpi.main { background: var(--navy); color: #fff; }
.kpi .lbl { font-size: 13px; opacity: .8; }
.kpi .val { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; line-height: 1.1; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; opacity: .8; }

.geo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
@media (max-width: 700px) { .geo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.geo div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.geo b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.geo span { font-size: 12px; color: var(--muted); }

.note { border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; font-size: 14px; }
.note.info { background: #eef5fb; }
.note.warn { background: #fff4e0; color: #6b4300; }
.note.bad { background: #fde8ea; color: #8a0d17; }

.results .card + .card { margin-top: 14px; }
.results h2 { font-size: 20px; margin: 0 0 10px; font-weight: 600; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.mlist { display: grid; gap: 8px; }
.m { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; color: var(--navy); }
.m:hover { border-color: var(--navy); text-decoration: none; }
.m-art { font-weight: 600; }
.m-art small { font-weight: 400; color: var(--muted); }
.m-go { color: var(--red); font-weight: 500; white-space: nowrap; }
.m-meta { grid-column: 1 / -1; font-size: 13px; color: #3d4f5e; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drive { background: var(--panel); border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.bar { grid-column: 1 / -1; height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.bar i.hi { background: var(--warn); }
.more-btn { margin-top: 10px; border: 1px solid var(--navy); background: #fff; color: var(--navy); font-family: inherit; font-weight: 500; font-size: 14px; line-height: 1; padding: 10px 14px; border-radius: 8px; cursor: pointer; }

table.byv { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.byv th, table.byv td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.byv tr.rec td { background: #eef5fb; font-weight: 600; }
table.byv tr.pick { cursor: pointer; }
table.byv tr.pick:hover td { background: var(--panel); }
.tbl-scroll { overflow-x: auto; }
.scheme { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.scheme svg { width: 100%; max-width: 360px; height: auto; flex: 0 1 360px; }
.scheme .legend { flex: 1 1 220px; font-size: 14px; color: #3d4f5e; }
.scheme .legend b { color: var(--navy); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions button { border: 0; background: var(--red); color: #fff; font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1; padding: 12px 16px; border-radius: 8px; cursor: pointer; }
.actions button:hover { background: var(--red-h); }
.actions button#print { background: var(--navy); }
.actions button#print:hover { background: var(--navy-h); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--panel); }
.cta a.btn { background: var(--red); color: #fff; padding: 11px 16px; border-radius: 8px; font-weight: 500; }
.cta a.btn:hover { background: var(--red-h); text-decoration: none; }

details.more { margin-top: 20px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.tbl-wrap { overflow-x: auto; margin-top: 12px; }
#abamet-table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
#abamet-table th, #abamet-table td { border: 1px solid var(--line); padding: 5px 7px; text-align: center; min-width: 38px; }
#abamet-table th { background: var(--panel); position: sticky; top: 0; }
#abamet-table td:first-child, #abamet-table th:first-child { position: sticky; left: 0; background: var(--panel); font-weight: 600; }
#abamet-table td.hit { background: var(--red); color: #fff; font-weight: 700; }
#abamet-table td.row, #abamet-table th.col { background: #fde8ea; }
#abamet-table sup { color: var(--bad); }
.how { margin: 12px 0 0; padding-left: 20px; }
.how li { margin-bottom: 8px; }
.foot { margin-top: 32px; border-top: 1px solid var(--line); padding: 18px 0 28px; font-size: 13px; color: var(--muted); }

@media print {
  .testai, .top, .tabs, .actions, .chips, details.more, .foot, .more-btn, .filters, .cta { display: none !important; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { box-shadow: none; }
  .kpi.main { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
}
