/* Рабочий инструмент проектировщика: светлая тема, крупный читаемый шрифт, таблицы и лист рядом.
   Акцент — синий «кальки», критичность — красный/охра/серо-синий. PT Sans / PT Mono — кириллица ParaType. */
@import url("https://fonts.googleapis.com/css2?family=PT+Sans:wght@400;700&family=PT+Mono&display=swap");

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #18212d;
  --muted: #5b6676;
  --line: #d6dce5;
  --accent: #1d4f91;
  --accent-soft: #e6eef9;
  --ok: #2e6b34;
  --ok-soft: #e7f3e8;
  --critical: #b3261e;
  --critical-soft: #fbe9e7;
  --remark: #8a5300;
  --remark-soft: #fff2dc;
  --rec: #36618e;
  --rec-soft: #e8f0f8;
  --font: "PT Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "PT Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.45; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0.2rem 0 0.4rem; text-wrap: balance; }
h2 { font-size: 1.25rem; margin: 0 0 0.75rem; text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 0.6rem; }

.topbar { display: flex; align-items: baseline; gap: 1rem; padding: 0.8rem 24px; background: var(--ink); color: #fff; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.tagline { color: #b9c3d1; font-size: 0.95rem; }
.badge-proto { margin-left: auto; font-size: 0.8rem; color: #ffd98a; border: 1px solid #ffd98a55; border-radius: 999px; padding: 0 0.6rem; }

main { max-width: 1500px; margin: 0 auto; padding: 1.25rem 24px 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.5rem; }
.card.narrow { max-width: 420px; justify-self: center; width: 100%; }
.hint { color: var(--muted); max-width: 75ch; }
.small { font-size: 0.88rem; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 0.5rem; }
.error-text { color: var(--critical); }

label { font-weight: 700; }
input[type="text"], input[type="password"], input:not([type]), textarea, select {
  font: inherit; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; width: 100%; color: var(--ink);
}
input[type="file"] { font: inherit; max-width: 100%; }
button, .button {
  font: inherit; padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.3;
}
button:hover, .button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #163f75; }
button.secondary { background: var(--accent-soft); border-color: #b9cdea; color: var(--accent); }
button.danger { background: var(--critical); color: #fff; border-color: var(--critical); }
button:disabled { opacity: 0.6; cursor: wait; }
button.link { border: 0; padding: 0; background: none; color: var(--accent); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

table.list { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.list th, table.list td { text-align: left; padding: 0.4rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll { overflow-x: auto; }

.chip { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; border: 0; }
.chip.new { background: var(--accent-soft); color: var(--accent); margin-left: 0.3rem; }
.sev-critical { background: var(--critical-soft); color: var(--critical); }
.sev-remark { background: var(--remark-soft); color: var(--remark); }
.sev-rec { background: var(--rec-soft); color: var(--rec); }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.35rem; }
.dot.sev-critical { background: var(--critical); }
.dot.sev-remark { background: var(--remark); }
.dot.sev-rec { background: var(--rec); }

/* --- главная --- */
.intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.intro h1 { font-size: 1.9rem; }
.steps { padding-left: 1.3rem; display: grid; gap: 0.4rem; margin: 0.8rem 0 1.2rem; }
.inline-form { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.upload { display: grid; gap: 0.45rem; }
.upload button.primary { justify-self: start; padding: 0.6rem 1.6rem; margin-top: 0.4rem; }

/* --- шапка объекта --- */
.obj-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.obj-actions { display: grid; gap: 0.5rem; justify-items: end; }
.versions, .exports { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.ver { padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; background: var(--surface); }
.ver.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.back { font-size: 0.95rem; }

.overview { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; display: grid; gap: 0.75rem; }
.counters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.counter { display: flex; gap: 0.45rem; align-items: baseline; border-radius: 8px; padding: 0.55rem 0.9rem; border: 1px solid transparent; }
.counter b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.counter.sev-critical { border-color: #f1c2bd; }
.counter.sev-remark { border-color: #f0d9ad; }
.counter.sev-rec { border-color: #c9d9ea; }
.counter.neutral { background: var(--surface-2); }
.assumptions { margin: 0; color: var(--muted); display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: baseline; }
.assumptions .label { font-weight: 700; color: var(--ink); }
.edited-note { color: var(--remark); font-weight: 700; margin-left: 0.5rem; }
.diff { background: var(--accent-soft); border-radius: 6px; padding: 0.55rem 0.8rem; }
.diff .ok { color: var(--ok); }
.closed { margin: 0.4rem 0 0; padding-left: 1.2rem; }

.onboarding { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; background: #fffbea;
  border: 1px solid #f0e2a8; border-radius: 8px; padding: 0.8rem 1.1rem; }

.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tab { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 0.6rem 0.9rem; margin-bottom: -2px; color: var(--muted); font-weight: 700; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.tabpanel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

/* --- замечания --- */
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter.active { background: var(--accent-soft); border-color: var(--accent); }
.filter b { margin-left: 0.25rem; }
.toggle { font-weight: 400; display: inline-flex; gap: 0.4rem; align-items: center; margin-left: 0.5rem; }

.workspace { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.findings { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-height: calc(100vh - 140px); overflow-y: auto; position: sticky; top: 12px; }
.findings ol { list-style: none; margin: 0; padding: 0; }
.finding { display: grid; gap: 0.25rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.finding > .chip { justify-self: start; }
.finding:hover { background: var(--surface-2); }
.finding.selected { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.finding[data-status="accepted"] .f-title, .finding[data-status="fixed"] .f-title { color: var(--muted); }
.finding[data-status="rejected"] .f-title { color: var(--muted); text-decoration: line-through; }
.f-title { font-weight: 700; }
.f-meta { font-size: 0.85rem; color: var(--muted); }

.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.5rem; min-width: 0; }
#v-detail { font-family: var(--mono); font-size: 0.92rem; white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem 1rem; margin: 0 0 0.75rem; overflow-x: auto; }
.refs { margin: 0 0 1rem; padding-left: 1.2rem; }
.unverified { font-size: 0.8rem; padding: 0 0.4rem; border-radius: 4px; background: var(--remark-soft); color: var(--remark); }
.status-form { display: grid; gap: 0.4rem; }
.status-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.status-buttons button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.saved { color: var(--ok); font-weight: 700; }
.saved.error { color: var(--critical); }
.sheet { margin: 0 0 0.8rem; }
.sheet figcaption { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; display: flex; gap: 1rem; align-items: baseline; }
.sheet img { max-width: 100%; border: 1px solid var(--line); background: #fff; display: block; }
.viewer-holder { list-style: none; padding: 0.5rem; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.viewer.inline { padding: 1rem; }
.empty-state p { max-width: 75ch; }

/* --- распознанные данные --- */
details.panel > summary { cursor: pointer; display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: baseline; list-style-position: inside; }
.panel-name { font-weight: 700; font-size: 1.1rem; }
.panel-params { color: var(--ink); font-size: 0.92rem; }
details.panel[open] > summary { margin-bottom: 0.75rem; }
.data-table td { white-space: nowrap; }
.data-table td:nth-child(2) { white-space: normal; min-width: 12rem; }
.data-table tr.reserve td { color: var(--muted); }
input.cell { width: 5.2rem; padding: 0.2rem 0.4rem; text-align: right; font-variant-numeric: tabular-nums; border-color: transparent; background: transparent; }
input.cell:hover { border-color: var(--line); background: #fff; }
input.cell:focus { border-color: var(--accent); background: #fff; }
input.cell.edited { background: var(--remark-soft); border-color: #f0d9ad; font-weight: 700; }
input.cell.error { border-color: var(--critical); background: var(--critical-soft); }
.row-actions { display: flex; gap: 0.5rem; align-items: center; }

/* --- что проверено --- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.checks li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.checks .mark { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.checks .pass .mark { background: var(--ok-soft); color: var(--ok); }
.checks .fail .mark { background: var(--remark-soft); color: var(--remark); }
.checks .skipped .mark { background: var(--surface-2); color: var(--muted); }
.checks p { margin: 0.2rem 0 0; color: var(--muted); }
.plain { padding-left: 1.2rem; display: grid; gap: 0.35rem; margin: 0; }

/* --- параметры --- */
.settings { display: grid; gap: 0.9rem; max-width: 720px; }
.field { display: grid; gap: 0.3rem; }
.field input, .field select { max-width: 18rem; }
fieldset.group { border: 1px solid var(--line, #d9dde3); border-radius: 10px; padding: 0.9rem 1rem 1rem; margin: 0; display: grid; gap: 0.7rem; min-width: 0; }
fieldset.group legend { font-weight: 600; padding: 0 0.3rem; }
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.7rem 1rem; }
.small-heading { font-size: 0.95rem; margin: 0.3rem 0 0; }
.small-details summary { cursor: pointer; font-size: 0.9rem; }
.small-details[open] { display: grid; gap: 0.5rem; }
.settings button.primary { justify-self: start; }
.danger-zone { max-width: 720px; }
.danger-zone summary { cursor: pointer; color: var(--critical); font-weight: 700; }
.danger-zone form { margin-top: 0.75rem; }
.danger-zone button { justify-self: start; }

/* --- диалоги --- */
.dialog { border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; max-width: min(560px, 92vw); }
.dialog.wide { max-width: min(1200px, 96vw); }
.dialog::backdrop { background: rgb(24 33 45 / 0.45); }
.dialog-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
#sheet-image { max-width: 100%; display: block; border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .findings { max-height: none; position: static; }
  .workspace > .viewer { display: none; }
  .intro { grid-template-columns: 1fr; }
  .obj-actions { justify-items: start; }
}
@media (max-width: 640px) {
  main { padding-inline: 16px; }
  .card, .overview { padding: 1rem; }
  .topbar { padding-inline: 16px; }
  .badge-proto { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.toggle.check { margin-left: 0; font-weight: 400; }

/* ---- Калькуляторы ---- */
.topnav { display: flex; gap: 0.25rem; }
.topnav a { color: #dfe6f0; text-decoration: none; padding: 0.15rem 0.6rem; border-radius: 6px; }
.topnav a:hover, .topnav a.active { background: #2b3747; color: #fff; }
.calc-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.calc-nav { display: grid; gap: 0.15rem; position: sticky; top: 1rem; }
.calc-nav h1 { font-size: 1.3rem; }
.calc-nav a { padding: 0.45rem 0.6rem; border-radius: 6px; text-decoration: none; color: var(--ink); }
.calc-nav a:hover { background: var(--surface-2); }
.calc-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.calc-main { display: grid; gap: 1.25rem; min-width: 0; }
form.calc { display: grid; gap: 0.9rem; }
form.calc .field input, form.calc .field select { max-width: none; }
details.source { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; display: grid; gap: 0.6rem; background: var(--surface-2); }
details.source summary { cursor: pointer; font-weight: 700; }
details.source[open] summary { margin-bottom: 0.4rem; }
table.rows input, table.rows select { min-width: 4.5rem; padding: 0.3rem 0.45rem; }
table.rows td:first-child input { min-width: 10rem; }
.calc-result { border-top: 1px solid var(--line); padding-top: 0.9rem; display: grid; gap: 0.7rem; transition: opacity 0.15s; }
.calc-result.busy { opacity: 0.55; }
.calc-values { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.calc-values .value { border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.8rem; display: grid; min-width: 8.5rem; background: var(--surface); }
.calc-values .value.main { border-color: #9db8dd; background: var(--accent-soft); }
.calc-values .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-values .main .v { font-size: 1.6rem; color: var(--accent); }
.calc-values small { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.calc-values .k { color: var(--muted); font-size: 0.85rem; }
.chip.ok { background: var(--ok-soft); color: var(--ok); justify-self: start; }
.chip.unverified { background: var(--remark-soft); color: var(--remark); font-weight: 400; }
.calc-warning { background: var(--remark-soft); color: var(--remark); border-radius: 6px; padding: 0.45rem 0.7rem; margin: 0; }
.calc-error { background: var(--critical-soft); color: var(--critical); border-radius: 6px; padding: 0.45rem 0.7rem; margin: 0; }
.calc-lines { margin: 0; padding-left: 1.3rem; font-family: var(--mono); font-size: 0.86rem; display: grid; gap: 0.25rem; }
.refs { margin: 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--muted); }
table.variants tr.chosen td { background: var(--ok-soft); font-weight: 700; }
table.variants tr.fail td { color: var(--muted); }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--critical); font-weight: 700; }
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-nav { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding: 0.6rem; }
  .calc-nav h1, .calc-nav p { display: none; }
}

/* ---- Каталог ---- */
.import-form { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: end; }
.import-form .field { min-width: 14rem; flex: 1; }
.notice { background: var(--ok-soft); color: var(--ok); border-radius: 6px; padding: 0.5rem 0.75rem; }
.search-form .field.wide { grid-column: 1 / -1; }
.offers { display: grid; gap: 0.5rem; }
.offers h3 { margin: 0.4rem 0 0; }

/* ---- Конструктор щита ---- */
.panel-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.panel-side { display: grid; gap: 0.6rem; position: sticky; top: 1rem; }
.panel-side .new-panel { text-align: center; }
.side-title { font-size: 0.95rem; color: var(--muted); margin: 0.4rem 0 0; }
.saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.saved-list a { display: grid; padding: 0.45rem 0.55rem; border-radius: 6px; text-decoration: none; color: var(--ink); }
.saved-list a:hover { background: var(--surface-2); }
.saved-list a.active { background: var(--accent-soft); color: var(--accent); }
.saved-list small { color: var(--muted); }
.panel-main { display: grid; gap: 1.25rem; min-width: 0; }
.panel-head { display: grid; gap: 0.9rem; }
.title-row { display: flex; align-items: center; gap: 1rem; }
.panel-title { font-size: 1.5rem !important; font-weight: 700; border: 1px solid transparent !important; padding: 0.2rem 0.4rem !important; background: transparent !important; }
.panel-title:hover, .panel-title:focus { border-color: var(--line) !important; background: #fff !important; }
.save-state { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.7rem; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.85rem; display: grid; background: var(--surface-2); }
.kpi .v { font-size: 1.7rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .v small { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.kpi .k { color: var(--muted); font-size: 0.85rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.4rem; }
.section-head h2 { margin: 0; }
.starters { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip-button { border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.9rem; background: var(--accent-soft); border-color: #b9cdea; color: var(--accent); }
.groups-table input, .groups-table select { padding: 0.35rem 0.45rem; }
.groups-table td:first-child input { min-width: 13rem; }
.groups-table input.short { width: 5rem; text-align: right; }
.groups-table .result { cursor: pointer; white-space: nowrap; color: var(--ink); }
.groups-table .result:hover { background: var(--accent-soft); }
.groups-table tr.bad .result { color: var(--critical); }
.groups-table tr.detail td { background: var(--surface-2); }
.icon-button { border: 0; background: none; font-size: 1.3rem; line-height: 1; padding: 0.1rem 0.4rem; color: var(--muted); }
.icon-button:hover { color: var(--critical); }
.add-group { margin-top: 0.7rem; }
.settings-card summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; list-style: none; }
.settings-card summary::-webkit-details-marker { display: none; }
.settings-card summary h2 { margin: 0; }
.settings-card summary h2::after { content: " ›"; color: var(--muted); }
.settings-card[open] summary h2::after { content: " ⌄"; }
.settings-card[open] summary { margin-bottom: 0.8rem; }
.spec-table td { vertical-align: top; }
.refs { color: var(--muted); margin-top: 0.6rem; }
@media (max-width: 860px) {
  .panel-layout { grid-template-columns: minmax(0, 1fr); }
  .panel-side { position: static; }
}
.title-row > .panel-title { flex: 1; min-width: 0; width: auto; }
.topnav { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.topnav a { white-space: nowrap; }
@media (max-width: 860px) {
  .topbar { gap: 0.5rem 1rem; padding: 0.7rem 16px; }
  .topnav { order: 3; flex-basis: 100%; }
  main { padding: 1rem 16px 2.5rem; }
  .card { padding: 1rem; }
  .title-row { flex-wrap: wrap; }
}
.panel-main, .calc-main, .panel-head { grid-template-columns: minmax(0, 1fr); }

/* ---- Главная ---- */
.hub h1 { font-size: 1.9rem; margin: 0.4rem 0 1rem; }
.hub-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.hub-card { display: grid; gap: 0.7rem; align-content: start; }
.hub-card h2 { font-size: 1.4rem; margin: 0; }
.hub-kicker { color: var(--accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.link-card { text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.link-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(29, 79, 145, 0.12); transform: translateY(-1px); }
.link-card .go { color: var(--accent); font-weight: 700; margin-top: auto; }
.dropzone { display: grid; place-items: center; text-align: center; gap: 0.2rem; padding: 1.6rem 1rem; border: 2px dashed #b9cdea;
  border-radius: 12px; background: var(--accent-soft); cursor: pointer; font-weight: 400; transition: background 0.15s, border-color 0.15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #d9e6f7; }
.dropzone.has-files { border-style: solid; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dz-main { font-size: 1.1rem; font-weight: 700; color: var(--accent); word-break: break-word; }
.dz-sub { color: var(--muted); font-size: 0.9rem; }
.check-extra { display: grid; gap: 0.4rem; }
button.wide { width: 100%; padding: 0.65rem 1rem; font-size: 1.05rem; }
.demo-link { justify-self: center; font-size: 0.95rem; }
.recent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; }
.recent a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); }
.recent a:hover { background: var(--surface-2); }
.recent small { color: var(--muted); white-space: nowrap; }
@media (max-width: 980px) {
  .hub-grid, .recent-grid { grid-template-columns: minmax(0, 1fr); }
}

.spec-table td.actions { white-space: nowrap; }
.spec-table tr.detail > td { background: var(--surface-2); }
table.analogs td { vertical-align: middle; }

.groups-table small.proj { display: block; color: var(--muted); font-size: 0.78rem; }
.groups-table small.proj.diff { color: var(--remark); font-weight: 700; }
form.to-builder { display: inline; margin-left: auto; }
.small-button { padding: 0.2rem 0.6rem; font-size: 0.85rem; }

.doc-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Направления ---- */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 0.35rem 0.9rem; color: var(--muted); }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.direction { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem 1.5rem; margin-top: 0.6rem; }
.dir-section h3 { margin: 0.2rem 0 0.4rem; font-size: 1rem; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.tools li { display: grid; }
.tools a { font-weight: 700; text-decoration: none; }
.tools a:hover { text-decoration: underline; }
.tools small { color: var(--muted); font-size: 0.85rem; }
.tools li.soon span:first-child { color: var(--muted); font-weight: 700; }
.soon-chip { background: var(--surface-2); color: var(--muted); font-weight: 400; margin-left: 0.3rem; }
.calc-nav .nav-group { margin: 0.6rem 0 0.1rem; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tools li { display: block; }
.tools small { display: block; }
.soon-chip { display: inline-block; vertical-align: middle; }

/* ---- Условные обозначения ---- */
.symbols-page { display: grid; gap: 0.8rem; }
.steps-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---- Набросок на плане ---- */
.draft-start { display: grid; gap: 0.8rem; }
.draft-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.draft-plan { display: grid; gap: 0.8rem; position: sticky; top: 1rem; }
.draft-side { display: grid; gap: 1rem; min-width: 0; }
.draft-side details > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: baseline; list-style: none; }
.draft-side details > summary::-webkit-details-marker { display: none; }
.draft-side details > summary h2 { margin: 0; font-size: 1.1rem; }
.draft-side details[open] > summary { margin-bottom: 0.6rem; }
.plan-view { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; overflow: auto; max-height: 70vh; }
.plan-svg { width: 100%; height: auto; display: block; }
.plan-svg .room { fill: #eef3fa; stroke: #7c8da5; stroke-width: 1; cursor: pointer; }
.plan-svg .room:hover { fill: #dde8f6; }
.plan-svg .kind-corridor { fill: #f4f5f7; }
.plan-svg .kind-wc { fill: #f1f7f4; }
.plan-svg .kind-server { fill: #fdf3e3; }
.plan-svg .room-label { font: 700 11px var(--font); fill: var(--ink); text-anchor: middle; pointer-events: none; }
.plan-svg .room-area { font: 10px var(--font); fill: var(--muted); text-anchor: middle; pointer-events: none; }
.plan-svg .dev-detector { fill: #fff; stroke: var(--critical); stroke-width: 2; }
.plan-svg .dev-outlet { fill: var(--accent); }
.plan-svg .dev-outlet.far { fill: var(--remark); }
.plan-svg .dev-rack { fill: var(--ink); }
.legend { color: var(--muted); display: flex; gap: 0.4rem 1rem; flex-wrap: wrap; align-items: center; margin: 0; }
.lg { display: inline-block; width: 12px; height: 12px; margin-right: 0.3rem; vertical-align: middle; }
.lg.det { border: 2px solid var(--critical); border-radius: 50%; }
.lg.out { background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lg.rack { background: var(--ink); }
table.rooms select { padding: 0.25rem 0.35rem; }
table.rooms input.short, table.rooms input { width: 4.2rem; padding: 0.25rem 0.35rem; text-align: right; }
tr.flash td { background: var(--accent-soft); transition: background 0.3s; }
@media (max-width: 1100px) {
  .draft-layout { grid-template-columns: minmax(0, 1fr); }
  .draft-plan { position: static; }
}
