/* ===========================================================================
   Термостаты для фотоплёнки — стили
   =========================================================================== */

:root {
  --ink:        #0f172a;
  --ink-2:      #334155;
  --ink-3:      #64748b;
  --ink-4:      #94a3b8;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;
  --bg:         #ffffff;
  --bg-alt:     #f6f8fb;
  --bg-soft:    #eef2f7;

  --pro:        #047857;
  --pro-bg:     #ecfdf5;
  --pro-line:   #a7f3d0;
  --mid:        #b45309;
  --mid-bg:     #fffbeb;
  --mid-line:   #fde68a;
  --diy:        #6d28d9;
  --diy-bg:     #f5f3ff;
  --diy-line:   #ddd6fe;
  --avoid:      #b91c1c;
  --avoid-bg:   #fef2f2;
  --avoid-line: #fecaca;

  --accent:     #0f172a;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow-sm:  0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md:  0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg:  0 10px 24px -6px rgba(15,23,42,.13), 0 4px 8px -4px rgba(15,23,42,.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.85rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 750; }
h3 { font-size: 1.075rem; font-weight: 650; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ============================ HEADER ============================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); font-size: .97rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: flex; color: var(--ink); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  padding: 7px 12px; border-radius: 8px; font-size: .9rem; font-weight: 550;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; font-size: 1.15rem; padding: 4px 11px; cursor: pointer; color: var(--ink);
}

/* ============================ HERO ============================ */
.hero {
  background:
    radial-gradient(900px 460px at 12% -12%, rgba(56,189,248,.20), transparent 62%),
    radial-gradient(760px 420px at 88% 6%, rgba(217,119,6,.20), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #101a2e 55%, #0d1526 100%);
  color: #e6edf7;
  padding: 74px 0 66px;
  border-bottom: 1px solid #1e293b;
}
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; font-weight: 700;
  color: #7dd3fc; margin: 0 0 16px;
}
.hero .lede {
  font-size: clamp(1rem, 1.5vw, 1.16rem); color: #b6c4d8; max-width: 62ch; margin: 0 0 34px;
}
.hero .lede b { color: #fff; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; }
.stat {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-sm);
  padding: 15px 17px;
}
.stat-v { font-size: 1.42rem; font-weight: 750; color: #fff; letter-spacing: -.02em; line-height: 1.15; }
.stat-l { font-size: .78rem; color: #93a4bd; margin-top: 4px; line-height: 1.4; }

/* ============================ SECTIONS ============================ */
.section { padding: 62px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { font-size: 1.02rem; color: var(--ink-3); max-width: 76ch; margin: 0 0 30px; }
.sub-h { margin-top: 42px; font-size: 1.2rem; }

.three-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 16px; margin-bottom: 8px; }
.mini-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); position: relative;
}
.mini-card.accent { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.mini-num {
  font-family: var(--mono); font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-4); margin-bottom: 10px;
}
.mini-card h3 { margin-bottom: .35em; }
.mini-card p { margin: 0 0 14px; font-size: .93rem; color: var(--ink-3); }
.mini-tag {
  display: inline-block; font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 100px;
}
.mini-tag.ok   { background: var(--bg-soft); color: var(--ink-2); }
.mini-tag.warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

.stage-list { display: grid; gap: 9px; margin-bottom: 26px; }
.stage-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 18px; box-shadow: var(--shadow-sm);
}
.stage-name { font-weight: 550; color: var(--ink); font-size: .95rem; }
.stage-tol { font-family: var(--mono); font-size: .9rem; font-weight: 650; color: var(--ink); white-space: nowrap; }
.stage-badge {
  font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; white-space: nowrap;
}
.stage-badge.pro { background: var(--pro-bg); color: var(--pro); border: 1px solid var(--pro-line); }
.stage-badge.mid { background: var(--mid-bg); color: var(--mid); border: 1px solid var(--mid-line); }

.callout {
  background: var(--bg-soft); border-left: 3px solid var(--ink);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px;
  font-size: .95rem; color: var(--ink-2); margin-top: 8px;
}
.callout.warn-box { border-left-color: #d97706; background: var(--mid-bg); }
.callout b { color: var(--ink); }

/* ============================ FILTERS ============================ */
.filters {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-row + .filter-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.filter-label {
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-4); white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2);
  border-radius: 100px; padding: 6px 14px; font-size: .86rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .chip-n { opacity: .6; font-weight: 500; margin-left: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.grow { flex: 1 1 190px; }
select, input[type="search"] {
  font-family: inherit; font-size: .9rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 8px 11px; min-width: 150px; width: 100%;
}
select:focus, input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.btn-reset {
  font-family: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--ink-3); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 8px 15px; align-self: flex-end; transition: all .15s;
}
.btn-reset:hover { color: var(--ink); border-color: var(--ink-3); }

/* ============================ GRID / CARDS ============================ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--line-2); }
.card.open { box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card.star { border-color: var(--pro-line); }
.card.avoid { border-color: var(--avoid-line); }

.card-media { position: relative; background: #f1f4f8; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.035); }
.badge-cls {
  position: absolute; top: 11px; left: 11px; font-size: .76rem; font-weight: 750;
  padding: 4px 11px; border-radius: 100px; backdrop-filter: blur(6px);
}
.badge-cls.pro   { background: rgba(4,120,87,.94);  color: #fff; }
.badge-cls.mid   { background: rgba(180,83,9,.94);  color: #fff; }
.badge-cls.diy   { background: rgba(109,40,217,.94);color: #fff; }
.badge-cls.avoid { background: rgba(185,28,28,.94); color: #fff; }
.badge-star {
  position: absolute; top: 11px; right: 11px; background: rgba(255,255,255,.95); color: #b45309;
  font-size: .74rem; font-weight: 750; padding: 4px 10px; border-radius: 100px;
}
.img-kind {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-size: .68rem; color: #fff; padding: 5px 11px;
  background: linear-gradient(transparent, rgba(15,23,42,.68));
}

.card-body { padding: 17px 18px 0; flex: 1; }
.card-brand { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4); }
.card-title { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin: 5px 0 8px; line-height: 1.3; }
.card-tagline { font-size: .9rem; color: var(--ink-3); margin: 0 0 14px; }

.kv { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.kv-item {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 7px 11px; font-size: .82rem; line-height: 1.35;
}
.kv-item b { display: block; color: var(--ink); font-weight: 650; font-size: .87rem; }
.kv-item span { color: var(--ink-4); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kv-item.hl { background: var(--pro-bg); border-color: var(--pro-line); }
.kv-item.hl b { color: var(--pro); }

.card-foot {
  padding: 14px 18px 17px; display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); margin-top: auto;
}
.price { font-size: 1.22rem; font-weight: 780; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; }
.price small { display: block; font-size: .74rem; font-weight: 500; color: var(--ink-4); letter-spacing: 0; }
.btn-open {
  margin-left: auto; font-family: inherit; font-size: .87rem; font-weight: 650; cursor: pointer;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  border-radius: var(--radius-sm); padding: 9px 16px; white-space: nowrap; transition: opacity .15s;
}
.btn-open:hover { opacity: .85; }

/* раскрывающаяся часть */
.card-detail { display: none; padding: 0 18px 18px; border-top: 1px solid var(--line); }
.card.open .card-detail { display: block; }
.card.open .btn-open { background: var(--bg); color: var(--ink-3); border-color: var(--line-2); }
.detail-h {
  font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-4); margin: 18px 0 9px;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.spec-table td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table td:first-child { color: var(--ink-3); padding-right: 14px; width: 45%; }
.spec-table td:last-child { color: var(--ink); font-weight: 550; }
.spec-table tr:last-child td { border-bottom: none; }

.pc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.pc-list li { position: relative; padding-left: 22px; font-size: .88rem; line-height: 1.5; }
.pc-list.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--pro); font-weight: 800; }
.pc-list.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--avoid); font-weight: 800; }

.variants { display: grid; gap: 5px; font-size: .87rem; }
.variant { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; background: var(--bg-alt); border-radius: 7px; }
.variant b { color: var(--ink); font-weight: 600; }
.variant span { font-family: var(--mono); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.variant em { font-style: normal; color: var(--ink-4); font-size: .8rem; }

.links { display: flex; flex-wrap: wrap; gap: 8px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 13px;
  color: var(--ink-2); background: var(--bg); transition: all .15s;
}
.link-btn:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; background: var(--bg-alt); }
.link-btn.shop { border-color: var(--pro-line); color: var(--pro); background: var(--pro-bg); }
.link-btn.shop:hover { border-color: var(--pro); }
.link-btn.doc { color: var(--ink-3); }

.empty { text-align: center; padding: 50px 0; color: var(--ink-4); }

/* ============================ TABLE ============================ */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--bg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 830px; }
table.cmp th {
  text-align: left; padding: 13px 15px; background: var(--bg-alt); color: var(--ink);
  font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap;
}
table.cmp th:hover { background: var(--bg-soft); }
table.cmp th.num, table.cmp td.num { text-align: right; font-family: var(--mono); }
table.cmp td { padding: 11px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp tr:hover td { background: #fafbfd; }
table.cmp td.model { font-weight: 650; color: var(--ink); }
table.cmp td.model small { display: block; font-weight: 500; color: var(--ink-4); font-size: .78rem; }
.pill { display: inline-block; font-size: .73rem; font-weight: 700; padding: 3px 9px; border-radius: 100px; white-space: nowrap; }
.pill.pro   { background: var(--pro-bg);   color: var(--pro);   border: 1px solid var(--pro-line); }
.pill.mid   { background: var(--mid-bg);   color: var(--mid);   border: 1px solid var(--mid-line); }
.pill.diy   { background: var(--diy-bg);   color: var(--diy);   border: 1px solid var(--diy-line); }
.pill.avoid { background: var(--avoid-bg); color: var(--avoid); border: 1px solid var(--avoid-line); }

.fineprint { font-size: .82rem; color: var(--ink-4); margin-top: 16px; line-height: 1.55; }

/* ============================ REQUIREMENTS ============================ */
.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.req {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 21px; box-shadow: var(--shadow-sm);
}
.req-icon { color: var(--ink); margin-bottom: 12px; display: flex; }
.req-icon svg { width: 26px; height: 26px; }
.req h3 { font-size: 1rem; margin-bottom: .4em; }
.req p { margin: 0; font-size: .9rem; color: var(--ink-3); line-height: 1.55; }

/* ============================ PICK ============================ */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pick {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.pick-task { font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); margin-bottom: 10px; }
.pick-answer { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; line-height: 1.35; }
.pick-why { font-size: .9rem; color: var(--ink-3); margin: 0; flex: 1; }

/* ============================ SOURCES ============================ */
.sources { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 7px; }
.sources li { font-size: .88rem; padding-left: 18px; position: relative; }
.sources li::before { content: "→"; position: absolute; left: 0; color: var(--ink-4); }
.sources a { color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.sources a:hover { color: var(--ink); border-bottom-color: var(--ink); text-decoration: none; }

/* ============================ FOOTER ============================ */
.footer { background: #0b1220; color: #8595ad; padding: 26px 0; font-size: .87rem; }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer a { color: #cbd5e1; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 20px 16px; gap: 2px; box-shadow: var(--shadow-md);
  }
  body.nav-open .nav { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav-toggle { display: block; }
  .stage-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .stage-badge { grid-column: 1 / -1; justify-self: start; }
  .section { padding: 46px 0; }
  .hero { padding: 54px 0 48px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .card-foot { flex-wrap: wrap; }
  .btn-open { width: 100%; margin-left: 0; }
  .filter-row { align-items: stretch; }
  .field, select, input[type="search"] { min-width: 100%; }
  .btn-reset { align-self: stretch; }
}

@media print {
  .topbar, .nav-toggle, .filters, .btn-open, .footer { display: none; }
  .card-detail { display: block !important; }
  .card { break-inside: avoid; box-shadow: none; }
}
