/* Well GaMR — общий стиль. Цвета заданы токенами; тёмная тема — своя ступень палитры. */
:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --surface-3: #e7e6e1;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #898781;
  --line: #e1e0d9;
  --line-2: #c3c2b7;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --accent-soft: #e3eefb;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --good: #0ca30c;
  --good-ink: #006300;
  --warn: #fab219;
  --serious: #ec835a;
  --bad: #d03b3b;
  --bad-soft: #fbe9e8;
  --warn-soft: #fdf4dc;
  --good-soft: #e5f4e3;
  --info-soft: #e8f0fa;
  --shadow: 0 1px 2px rgba(11, 11, 11, .06), 0 2px 8px rgba(11, 11, 11, .04);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --surface-3: #2c2c2a;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --ink-3: #898781;
    --line: #2c2c2a;
    --line-2: #383835;
    --accent: #3987e5;
    --accent-soft: #1b2a3d;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --good-ink: #0ca30c;
    --bad-soft: #3a1d1c;
    --warn-soft: #3a3018;
    --good-soft: #1b301b;
    --info-soft: #1b2a3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232321;
  --surface-3: #2c2c2a;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --ink-3: #898781;
  --line: #2c2c2a;
  --line-2: #383835;
  --accent: #3987e5;
  --accent-soft: #1b2a3d;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --good-ink: #0ca30c;
  --bad-soft: #3a1d1c;
  --warn-soft: #3a3018;
  --good-soft: #1b301b;
  --info-soft: #1b2a3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
a { color: var(--accent); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- верхняя панель ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand svg { width: 26px; height: 26px; }
.topbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; white-space: nowrap;
}
.chip b { color: var(--ink); font-weight: 600; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.good { background: var(--good-soft); color: var(--good-ink); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--ink-2); }

.tabs { display: flex; gap: 4px; }
.tab {
  border: 0; background: transparent; color: var(--ink-2);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500;
}
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- кнопки и поля ---------- */
button, .btn {
  text-decoration: none; display: inline-block;
  font: inherit; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  padding: 7px 14px; border-radius: 8px; font-weight: 500;
}
button:hover { background: var(--surface-2); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { filter: brightness(1.07); }
button.danger { color: var(--bad); border-color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; }
input, select {
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 9px; min-width: 0;
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); padding: 0; border: 0; background: none; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { color: var(--ink-2); font-size: 12px; }

/* ---------- раскладка ---------- */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 16px 20px 40px; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 32px; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1250px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- список скважин ---------- */
.wells { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 960px) {
  .wells { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .well-item { min-width: 230px; }
}
.well-item {
  text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer; display: block;
}
.well-item:hover { border-color: var(--line-2); background: var(--surface); }
.well-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.well-item .wi-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.well-item .wi-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.well-item .wi-row { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--good); }
.dot.no { background: var(--line-2); }

/* ---------- таблицы параметров ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { color: var(--ink-3); font-weight: 500; font-size: 12px; }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }

/* ---------- плитки ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 9px 11px; }
.tile .t-label { font-size: 12px; color: var(--ink-3); }
.tile .t-value { font-size: 19px; font-weight: 600; margin-top: 2px; }
.tile .t-value small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.tile.bad { box-shadow: inset 3px 0 0 var(--bad); }
.tile.warn { box-shadow: inset 3px 0 0 var(--warn); }
.tile.good { box-shadow: inset 3px 0 0 var(--good); }

/* ---------- предупреждения ---------- */
.alerts { display: flex; flex-direction: column; gap: 6px; }
.alert { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.alert .ic { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }
.alert.bad { background: var(--bad-soft); }
.alert.bad .ic { background: var(--bad); }
.alert.warn { background: var(--warn-soft); }
.alert.warn .ic { background: var(--warn); color: #0b0b0b; }
.alert.info { background: var(--info-soft); }
.alert.info .ic { background: var(--accent); }
.alert.good { background: var(--good-soft); }
.alert.good .ic { background: var(--good); }

.banner { padding: 10px 14px; border-radius: 8px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.banner.ok { background: var(--good-soft); }
.banner.pump_off, .banner.idle { background: var(--warn-soft); }
.banner.no_lift, .banner.above_static { background: var(--bad-soft); }

/* ---------- форма подбора ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; color: var(--ink-2); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field .hint { font-size: 11px; color: var(--ink-3); }
.field select, .field input { width: 100%; }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type="range"] { flex: 1; }
.range-row input[type="number"] { width: 82px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.check .price { color: var(--ink-3); font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- графики ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ax text { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .ax line, .chart .ax path { stroke: var(--line-2); }
.chart .grid line { stroke: var(--line); }
.chart .axlabel { fill: var(--ink-2); font-size: 11px; }
.chart .ref line { stroke: var(--ink-3); stroke-dasharray: 4 3; }
.chart .ref text { fill: var(--ink-2); font-size: 11px; }
.chart .mlabel { fill: var(--ink); font-size: 11px; font-weight: 600; }
.chart-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.chart-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.legend .key { display: inline-block; width: 16px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.legend .key.rect { height: 10px; width: 10px; border-radius: 2px; opacity: .35; }
.legend .key.dot { width: 9px; height: 9px; border-radius: 50%; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow);
  padding: 6px 9px; font-size: 12px; white-space: nowrap; min-width: 90px;
}
.tooltip .tt-h { color: var(--ink-3); margin-bottom: 3px; }
.tooltip .tt-r { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-r b { font-variant-numeric: tabular-nums; }
.tooltip .tt-k { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }

/* ---------- факторы надёжности ---------- */
.factor { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px; gap: 10px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--line); font-size: 13px; }
.factor:last-child { border-bottom: 0; }
.factor .f-val { color: var(--ink-3); font-size: 12px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; }

/* ---------- модальное окно / вход ---------- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(420px, 100%); }
.login input { font-size: 22px; letter-spacing: .2em; text-transform: uppercase; text-align: center; width: 100%; padding: 10px; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--surface); padding: 9px 16px; border-radius: 9px; font-size: 13px;
  box-shadow: var(--shadow); max-width: min(560px, calc(100% - 32px));
}
.toast.bad { background: var(--bad); color: #fff; }
.events { display: flex; flex-direction: column; gap: 6px; }
.event { padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 13px; }
.event .r { color: var(--ink-3); font-size: 12px; }
.prose { max-width: 860px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h3 { margin-top: 18px; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 10px; }
.loading { opacity: .55; transition: opacity .15s; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.card-head .chip { white-space: normal; }
@media (max-width: 760px) { .topbar { padding: 8px 16px; gap: 8px; } .tab { padding: 6px 8px; } }

/* ---------- схема скважины ---------- */
:root {
  --sk-rock: #f3f1ea; --sk-soil: #b9a483; --sk-ground: #8b7355; --sk-hatch: #cdbb9c;
  --sk-sand: #ecdcae; --sk-sand-dot: #c4a65e;
  --sk-steel: #a9afb8; --sk-steel-d: #6b727c; --sk-steel-line: #4b525c;
  --sk-gasfill: #f8fbff; --sk-panel: #fbfbf8;
  --sk-unit: #3a6ea5; --sk-unit-post: #4b525c; --sk-cw: #c4502a;
  --sk-box: #e6e9ee; --sk-box-line: #7a828d; --sk-cable: #22272e;
  --sk-motor: #5d7fa8; --sk-pump: #b5bcc6; --sk-module: #9aa3ae;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --sk-rock: #1e1d1a; --sk-soil: #4a3f30; --sk-ground: #8b7355; --sk-hatch: #3a3226;
    --sk-sand: #4d4224; --sk-sand-dot: #7d6a35;
    --sk-steel: #7c838d; --sk-steel-d: #a3aab4; --sk-steel-line: #c3c8cf;
    --sk-gasfill: #23262b; --sk-panel: #1d1d1b;
    --sk-unit: #4f86c2; --sk-unit-post: #9aa1aa; --sk-cw: #d4633b;
    --sk-box: #2c2f34; --sk-box-line: #8a929c; --sk-cable: #c9ced6;
    --sk-motor: #6f92bd; --sk-pump: #8d949e; --sk-module: #6e7681;
  }
}
:root[data-theme="dark"] {
  --sk-rock: #1e1d1a; --sk-soil: #4a3f30; --sk-ground: #8b7355; --sk-hatch: #3a3226;
  --sk-sand: #4d4224; --sk-sand-dot: #7d6a35;
  --sk-steel: #7c838d; --sk-steel-d: #a3aab4; --sk-steel-line: #c3c8cf;
  --sk-gasfill: #23262b; --sk-panel: #1d1d1b;
  --sk-unit: #4f86c2; --sk-unit-post: #9aa1aa; --sk-cw: #d4633b;
  --sk-box: #2c2f34; --sk-box-line: #8a929c; --sk-cable: #c9ced6;
  --sk-motor: #6f92bd; --sk-pump: #8d949e; --sk-module: #6e7681;
}
.design-grid { display: grid; grid-template-columns: minmax(300px, 520px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1180px) { .design-grid { grid-template-columns: minmax(0, 1fr); } }
.sketch-wrap { position: sticky; top: 64px; }
@media (max-width: 1180px) { .sketch-wrap { position: static; } }
.sketch { position: relative; width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sk-rock); }
.sketch svg { display: block; width: 100%; height: auto; user-select: none; touch-action: none; }
.sketch-note { font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.sk-tip { position: absolute; z-index: 6; max-width: 260px; pointer-events: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); padding: 6px 9px; font-size: 12px; line-height: 1.35; }
.sk-rock { fill: var(--sk-rock); }
.sk-soilband { opacity: .9; }
.sk-hatch { stroke: var(--sk-hatch); stroke-width: 1.2; }
.sk-ground { stroke: var(--sk-ground); stroke-width: 2.5; }
.sk-sand { fill: var(--sk-sand); }
.sk-sand-dot { fill: var(--sk-sand-dot); }
.sk-axis line { stroke: var(--line-2); }
.sk-axis text { fill: var(--ink-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.sk-label { fill: var(--ink-2); font-size: 10.5px; }
.sk-label.muted { fill: var(--ink-3); }
.sk-label-bad { fill: var(--bad); font-weight: 600; }
.sk-label-warn { fill: #b07a00; font-weight: 600; }
.sk-annulus-gas { fill: var(--sk-gasfill); }
.sk-liquid, .sk-liquid-panel { opacity: .38; }
.sk-casing { stroke: var(--sk-steel-line); stroke-width: 2.2; }
.sk-perf { stroke: var(--sk-steel-line); stroke-width: 1.2; }
.sk-dls-warn { fill: var(--warn); }
.sk-dls-bad { fill: var(--bad); }
.sk-level-st line { stroke: var(--s1); stroke-width: 1.5; stroke-dasharray: 4 3; }
.sk-level-st path { fill: var(--s1); }
.sk-level-dyn line { stroke: var(--s1); stroke-width: 2; }
.sk-level-dyn path { fill: var(--s1); }
.sk-stale { opacity: .45; }
.sk-steel { fill: var(--sk-steel); stroke: var(--sk-steel-line); stroke-width: .8; }
.sk-steel-d { fill: var(--sk-steel-d); }
.sk-valve { fill: var(--sk-steel-d); stroke: var(--sk-steel-line); stroke-width: .6; }
.sk-gauge { fill: var(--surface); stroke: var(--sk-steel-line); stroke-width: 1.4; }
.sk-needle { stroke: var(--bad); stroke-width: 1.4; }
.sk-flowline { stroke: var(--sk-steel-d); stroke-width: 4; fill: none; }
.sk-arrowhead { fill: var(--sk-steel-d); }
.sk-flowanim { stroke: var(--s1); stroke-width: 2; fill: none; stroke-dasharray: 3 7; animation: skflow 1.5s linear infinite; }
.sk-flow-up { stroke: var(--s3); opacity: .8; }
@keyframes skflow { to { stroke-dashoffset: -20; } }
.sk-box { fill: var(--sk-box); stroke: var(--sk-box-line); stroke-width: 1; }
.sk-boxlabel { fill: var(--ink); font-size: 10.5px; font-weight: 600; }
.sk-vsd { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.sk-display { fill: #10261a; stroke: #2b5e3d; }
.sk-display-text { fill: #49e083; font: 600 12px ui-monospace, Consolas, monospace; }
.sk-led { fill: #2fd06a; }
.sk-vent { stroke: var(--sk-box-line); stroke-width: 1; opacity: .7; }
.sk-chem { fill: #efe6fb; stroke: #7a52c7; }
:root[data-theme="dark"] .sk-chem { fill: #2b2340; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .sk-chem { fill: #2b2340; } }
.sk-tank { fill: #b79ae8; stroke: #7a52c7; }
.sk-chemline { stroke: #7a52c7; stroke-width: 1.6; stroke-dasharray: 4 3; fill: none; }
.sk-cable { stroke: var(--sk-cable); stroke-width: 2.4; fill: none; }
.sk-cable-thin { stroke: var(--sk-cable); stroke-width: 1.4; fill: none; opacity: .85; }
.sk-pole { stroke: var(--sk-steel-d); stroke-width: 3; }
.sk-wire { stroke: var(--sk-steel-d); stroke-width: .8; fill: none; }
.sk-tubing { stroke: var(--sk-steel-line); stroke-width: 1.4; }
.sk-tubing-in { fill: transparent; }
.sk-tubing-panel { fill: var(--sk-gasfill); }
.sk-paraffin rect { fill: #8a6a2c; }
.sk-paraffin.sk-treated rect { fill: #8a6a2c; opacity: .3; }
.sk-rods line { stroke: var(--sk-steel-d); stroke-width: 2; }
.sk-rods.sk-bad line, .sk-bad .sk-rod { stroke: var(--bad); fill: var(--bad); }
.sk-centralizer { fill: #1baf7a; stroke: var(--surface); stroke-width: .6; }
.sk-hot { fill: none; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 3 2; animation: skpulse 1.2s ease-in-out infinite; }
@keyframes skpulse { 50% { opacity: .3; } }
.sk-panel { fill: var(--sk-panel); stroke: var(--line-2); stroke-width: 1; }
.sk-panel-title { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.sk-pump { fill: var(--sk-pump); stroke: var(--sk-steel-line); stroke-width: 1; }
.sk-pump.sk-cr { fill: #9fc2cf; }
.sk-stage { stroke: var(--sk-steel-line); stroke-width: .7; opacity: .55; }
.sk-shaft { stroke: var(--sk-steel-line); stroke-width: 2; stroke-dasharray: 2 3; animation: skflow .8s linear infinite; }
.sk-wr { fill: #eda100; }
.sk-module { fill: var(--sk-module); stroke: var(--sk-steel-line); stroke-width: .8; }
.sk-gs { fill: #7fb7a3; }
.sk-port { fill: var(--sk-rock); stroke: var(--sk-steel-line); stroke-width: .5; }
.sk-motor { fill: var(--sk-motor); stroke: var(--sk-steel-line); stroke-width: 1; }
.sk-motor-warm { fill: #e0a43a; }
.sk-motor-hot { fill: var(--bad); }
.sk-fin { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.sk-hr { fill: #ec835a; opacity: .9; }
.sk-badbox-ring { fill: none; stroke: var(--bad); stroke-width: 1.6; stroke-dasharray: 4 2; animation: skpulse 1.2s ease-in-out infinite; }
.sk-warnbox-ring { fill: none; stroke: var(--warn); stroke-width: 1.6; stroke-dasharray: 4 2; }
.sk-tick { stroke: var(--line-2); }
.sk-bubble { fill: var(--surface); stroke: var(--ink-3); stroke-width: .7; }
.sk-leader path { stroke: var(--ink-3); stroke-dasharray: 3 3; fill: none; }
.sk-handle { cursor: ns-resize; }
.sk-pump-mini { fill: var(--s2); stroke: var(--surface); stroke-width: 1; }
.sk-grip { fill: var(--s2); }
.sk-grip-pill { fill: var(--s2); }
.sk-grip-text { fill: #fff; font-size: 11px; font-weight: 600; }
.sk-handle.dragging .sk-grip-pill, .sk-handle:hover .sk-grip-pill { filter: brightness(1.12); }
.sk-hit { fill: transparent; }
.sk-unit-base { fill: var(--sk-unit-post); }
.sk-unit-post { stroke: var(--sk-unit-post); stroke-width: 3.5; fill: none; stroke-linejoin: round; }
.sk-unit-beam { stroke: var(--sk-unit); stroke-width: 7; stroke-linecap: round; }
.sk-unit-head { fill: var(--sk-unit); }
.sk-unit-gear { fill: var(--sk-unit); }
.sk-unit-beam.sk-bad, .sk-unit-gear.sk-bad { stroke: var(--bad); fill: var(--bad); }
.sk-unit-pitman { stroke: var(--sk-unit-post); stroke-width: 3; stroke-linecap: round; }
.sk-unit-crank { stroke: var(--sk-unit-post); stroke-width: 5; stroke-linecap: round; }
.sk-unit-cw { fill: var(--sk-cw); }
.sk-bridle { stroke: var(--sk-cable); stroke-width: 1.4; }
.sk-polished { stroke: var(--sk-steel-line); stroke-width: 2.4; }
.sk-belt { stroke: var(--sk-cable); stroke-width: 1.4; }
.sk-rod { fill: var(--sk-steel-d); }
.sk-rod-0 { fill: #5b616b; } .sk-rod-1 { fill: #747b85; } .sk-rod-2 { fill: #8e959f; }
.sk-coupling { fill: var(--sk-steel-line); }
.sk-rod-line { stroke: var(--sk-steel-d); stroke-width: 3; }
.sk-barrel { fill: var(--sk-steel); stroke: var(--sk-steel-line); stroke-width: 1.2; }
.sk-wr-b { stroke: #eda100; stroke-width: 2; }
.sk-barrel-in { fill: var(--sk-gasfill); }
.sk-plunger { fill: var(--sk-steel-d); stroke: var(--sk-steel-line); stroke-width: .8; }
.sk-ball { fill: #e9ecef; stroke: var(--sk-steel-line); stroke-width: 1; }
.sk-seat { stroke: var(--sk-steel-line); stroke-width: 2; }
.sk-new { animation: skappear .6s ease-out; }
@keyframes skappear { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sk-flowanim, .sk-shaft, .sk-hot, .sk-badbox-ring, .sk-new { animation: none; } }

/* ---------- реалистичная поверхность ---------- */
:root { --sk-sky1: #cfe3f6; --sk-sky2: #f3f6f8; --sk-trees: #8fae8a; --sk-field: #c9d6a8; --sk-pad: #d8d2c4; --sk-pad-dot: #a99f8b; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --sk-sky1: #0f1a26; --sk-sky2: #1b2430; --sk-trees: #24372a; --sk-field: #2c3524; --sk-pad: #3a362e; --sk-pad-dot: #5a5243; }
}
:root[data-theme="dark"] { --sk-sky1: #0f1a26; --sk-sky2: #1b2430; --sk-trees: #24372a; --sk-field: #2c3524; --sk-pad: #3a362e; --sk-pad-dot: #5a5243; }
.sk-trees { fill: var(--sk-trees); }
.sk-field { fill: var(--sk-field); }
.sk-pad { fill: var(--sk-pad); }
.sk-pad-dot { fill: var(--sk-pad-dot); }
.sk-plate { fill: #26313b; font-size: 7.5px; font-weight: 700; letter-spacing: .03em; }
.sk-plate-w { fill: #fff; font-size: 7.5px; font-weight: 700; letter-spacing: .05em; }
.sk-dim line { stroke: var(--ink-2); stroke-width: 1; }
.sk-dim-head { fill: var(--ink-2); }
.sk-dim-text { fill: var(--ink); font-size: 12px; font-weight: 700; }
.sk-dim-sub { fill: var(--ink-2); font-size: 10.5px; }
.sk-flow-pipe { stroke: #8fd0ff; stroke-width: 1.6; stroke-dasharray: 3 9; opacity: .9; }
.sk-bad-beam rect, .sk-bad-beam path { fill: #d03b3b !important; }
