/* ТехноДок — стилі.
   Концепція: «Діагностичний стенд» (Swiss Hardware Lab).
   Світла тема: теплий керамічний верстак, глибокий графіт, сигнальний помаранчевий
   і діагностичний бірюзово-зелений. Темна тема: нічний осцилографний стенд. */

/* Шрифт Fixel (MacPaw, Україна), ліцензія SIL OFL 1.1 — static/fonts/OFL.txt.
   Файли лежать локально: сайт працює без інтернету, а CSP не дозволяє чужі сервери. */
@font-face { font-family: "Fixel Text"; src: url("fonts/FixelText-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fixel Text"; src: url("fonts/FixelText-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fixel Text"; src: url("fonts/FixelText-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Fixel Display"; src: url("fonts/FixelDisplay-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ── Токени: світла тема («Керамічний верстак») ── */
:root {
  --font-sans: "Fixel Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fixel Display", "Fixel Text", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;

  --bg: #efece5;
  --surface: #fbf9f5;
  --surface-2: #e6e1d7;
  --line: #d4cec2;
  --line-strong: #a79f91;
  --grid-line: rgba(18, 23, 26, 0.055);

  --text: #12171a;
  --muted: #4f565c;

  --primary: #141b1f;
  --primary-ink: #fbf9f5;
  --primary-hover: #243038;

  --red: #c23712;
  --accent: #c23712;
  --accent-hover: #a12c0d;
  --accent-ink: #ffffff;
  --accent-soft: #fae9e2;

  --teal: #0b6359;
  --teal-soft: #dceeeb;
  --teal-line: #9fcfc8;
  --teal-ring: rgba(11, 99, 89, 0.2);

  /* Інвертовані темні інженерні панелі (факти, бриф заявки, підвал) */
  --ink-panel: #11171a;
  --ink-panel-2: #1a2328;
  --ink-panel-line: #2a373e;
  --ink-panel-text: #edf2f0;
  --ink-panel-muted: #9baab0;
  --ink-panel-accent: #ff6e3f;
  --ink-panel-teal: #3ad4bd;

  /* Діагностичний монітор */
  --frame: #20292e;
  --frame-edge: #35424a;
  --screen: #081214;
  --screen-text: #eaf3f1;
  --screen-muted: #8fa5a8;
  --screen-line: #24373b;

  --focus: #1466c2;

  --ok: #16603f;    --ok-bg: #dcefe5;
  --err: #a62626;   --err-bg: #f9e2e2;
  --warn: #7a4e0b;  --warn-bg: #f6ebda;
  --info: #1e4f86;  --info-bg: #e0ecf9;

  --st-new: #1e4f86;   --st-new-bg: #e0ecf9;
  --st-diag: #7a4e0b;  --st-diag-bg: #f6ebda;
  --st-wait: #593e8a;  --st-wait-bg: #ebe4f8;
  --st-rep: #0b6359;   --st-rep-bg: #d9efea;
  --st-ready: #16603f; --st-ready-bg: #dcefe5;
  --st-done: #4a5258;  --st-done-bg: #e7e5df;

  --shadow-sm: rgba(18, 23, 26, 0.06);
  --shadow-strong: rgba(12, 18, 22, 0.24);

  --r: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  color-scheme: light;
}

/* ── Токени: темна тема («Нічний осцилограф») ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f12;
    --surface: #11181c;
    --surface-2: #192328;
    --line: #253239;
    --line-strong: #3e515c;
    --grid-line: rgba(237, 242, 240, 0.045);

    --text: #edf2f0;
    --muted: #94a6ac;

    --primary: #edf2f0;
    --primary-ink: #0a0f12;
    --primary-hover: #d4dfdb;

    --red: #ff6e3f;
    --accent: #ff6e3f;
    --accent-hover: #ff855c;
    --accent-ink: #0b0e10;
    --accent-soft: #2c1811;

    --teal: #3ad4bd;
    --teal-soft: #0e2825;
    --teal-line: #1e544d;
    --teal-ring: rgba(58, 212, 189, 0.24);

    --ink-panel: #131d22;
    --ink-panel-2: #1b282f;
    --ink-panel-line: #2c3d46;
    --ink-panel-text: #edf2f0;
    --ink-panel-muted: #98aab0;
    --ink-panel-accent: #ff6e3f;
    --ink-panel-teal: #3ad4bd;

    --frame: #27333a;
    --frame-edge: #3e4f58;
    --screen: #050b0d;
    --screen-text: #edf4f2;
    --screen-muted: #8fa5a8;
    --screen-line: #22353a;

    --focus: #68b2ff;

    --ok: #6ad89f;    --ok-bg: #10251c;
    --err: #ff8c82;   --err-bg: #2d1514;
    --warn: #e8bc68;  --warn-bg: #271e0f;
    --info: #84bef5;  --info-bg: #122132;

    --st-new: #84bef5;   --st-new-bg: #122132;
    --st-diag: #e8bc68;  --st-diag-bg: #271e0f;
    --st-wait: #c4a9f5;  --st-wait-bg: #201730;
    --st-rep: #4ad9c4;   --st-rep-bg: #0e2725;
    --st-ready: #6ad89f; --st-ready-bg: #10251c;
    --st-done: #a0b0b6;  --st-done-bg: #1a2429;

    --shadow-sm: rgba(0, 0, 0, 0.35);
    --shadow-strong: rgba(0, 0, 0, 0.55);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0f12;
  --surface: #11181c;
  --surface-2: #192328;
  --line: #253239;
  --line-strong: #3e515c;
  --grid-line: rgba(237, 242, 240, 0.045);

  --text: #edf2f0;
  --muted: #94a6ac;

  --primary: #edf2f0;
  --primary-ink: #0a0f12;
  --primary-hover: #d4dfdb;

  --red: #ff6e3f;
  --accent: #ff6e3f;
  --accent-hover: #ff855c;
  --accent-ink: #0b0e10;
  --accent-soft: #2c1811;

  --teal: #3ad4bd;
  --teal-soft: #0e2825;
  --teal-line: #1e544d;
  --teal-ring: rgba(58, 212, 189, 0.24);

  --ink-panel: #131d22;
  --ink-panel-2: #1b282f;
  --ink-panel-line: #2c3d46;
  --ink-panel-text: #edf2f0;
  --ink-panel-muted: #98aab0;
  --ink-panel-accent: #ff6e3f;
  --ink-panel-teal: #3ad4bd;

  --frame: #27333a;
  --frame-edge: #3e4f58;
  --screen: #050b0d;
  --screen-text: #edf4f2;
  --screen-muted: #8fa5a8;
  --screen-line: #22353a;

  --focus: #68b2ff;

  --ok: #6ad89f;    --ok-bg: #10251c;
  --err: #ff8c82;   --err-bg: #2d1514;
  --warn: #e8bc68;  --warn-bg: #271e0f;
  --info: #84bef5;  --info-bg: #122132;

  --st-new: #84bef5;   --st-new-bg: #122132;
  --st-diag: #e8bc68;  --st-diag-bg: #271e0f;
  --st-wait: #c4a9f5;  --st-wait-bg: #201730;
  --st-rep: #4ad9c4;   --st-rep-bg: #0e2725;
  --st-ready: #6ad89f; --st-ready-bg: #10251c;
  --st-done: #a0b0b6;  --st-done-bg: #1a2429;

  --shadow-sm: rgba(0, 0, 0, 0.35);
  --shadow-strong: rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* ── Основа ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.58 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }
/* main — flex-елемент з margin:auto: без явної ширини він ужимається до min-content таблиці й дає горизонтальний скрол */
main.container { width: 100%; min-width: 0; }

img { max-width: 100%; height: auto; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

h1, h2, h3, h4 {
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.025em;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.3vw, 28px);
}
h3 { font-size: 19px; }
h4 { font-size: 17px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.muted { color: var(--muted); }
.ok { color: var(--ok); }
.error { color: var(--err); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.small-text { font-size: 13px; }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Шапка ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px var(--shadow-sm);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); text-decoration: none; }

.brand-logo {
  width: 44px;
  height: 44px;
  flex: none;
  transition: transform .18s ease;
}
.brand:hover .brand-logo { transform: translateY(-1px); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.025em;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.lg-frame { fill: var(--frame); }
.lg-screen { fill: var(--screen); }
.lg-stand { stroke: var(--frame); stroke-width: 5; stroke-linecap: round; fill: none; }
.lg-circle { fill: #fbf9f5; }
.lg-cross { stroke: var(--accent); stroke-width: 4.5; fill: none; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
}

nav > a:not(.account-link) {
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--r);
  transition: background-color .15s ease, color .15s ease;
}
nav > a:not(.account-link):hover {
  background: var(--surface-2);
  color: var(--accent);
  text-decoration: none;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 10px;
  margin-left: 4px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.account-link svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.account-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ── Загальна сітка та контейнери ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 32px;
}

.narrow {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px var(--shadow-sm);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.danger {
  border-color: var(--err);
  border-left-width: 4px;
}

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.flashes { padding-top: 16px; padding-bottom: 0; }
main.container > .flashes { padding: 0 0 14px; }

.flash {
  padding: 12px 16px;
  border: 1px solid currentColor;
  border-left-width: 4px;
  border-radius: var(--r);
  margin-bottom: 10px;
  font-weight: 500;
}
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.flash.warning { background: var(--warn-bg); color: var(--warn); }

/* ── Головна: перший екран (Діагностичний стенд) ── */
.landing { counter-reset: td-sec; }
.landing .container { padding-top: 48px; padding-bottom: 48px; }
.landing .band { padding-top: 52px; padding-bottom: 52px; }

.hero-band {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 48px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 22px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-text h1 {
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin: 0 0 20px;
  max-width: 14.5em;
  overflow-wrap: break-word;
}
.hero-text h1::after {
  content: "";
  display: block;
  width: 68px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 22px;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.hero-guarantees li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-guarantees li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--teal);
  flex: none;
}

/* Живий індикатор графіка (без блимання) */
.open-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.open-state.small {
  margin: 6px 0 0;
  padding: 4px 10px;
  font-size: 13px;
}
.open-state .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.open-state.is-open {
  color: var(--teal);
  border-color: var(--teal-line);
  background: var(--teal-soft);
}
.open-state.is-open .dot {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-ring);
}
.open-state.is-closed .dot {
  background: var(--muted);
}

/* Монітор перевірки статусу (діагностичний термінал) */
.monitor {
  max-width: 500px;
  width: 100%;
  justify-self: end;
}

.screen {
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 48px -24px var(--shadow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.screen-in {
  background-color: var(--screen);
  background-image:
    radial-gradient(circle at 86% 14%, rgba(58, 212, 189, 0.12), transparent 52%),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(58, 212, 189, 0.03) 3px 4px);
  color: var(--screen-text);
  border: 1px solid var(--screen-line);
  border-radius: 8px;
  padding: 20px 24px 24px;
  min-height: 274px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: screen-reveal .45s ease-out both;
}

@keyframes screen-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--screen-line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-panel-teal);
}

.screen-badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--screen-line);
  color: var(--screen-muted);
  font-size: 10px;
}

.screen-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--screen-text);
}

/* Статичний курсор на екрані (без блимання) */
.caret {
  display: inline-block;
  width: 0.42em;
  height: 0.85em;
  margin-left: 0.24em;
  vertical-align: -0.08em;
  border-radius: 2px;
  background: var(--ink-panel-accent);
}

.screen-form label {
  display: block;
  color: var(--screen-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.screen-row {
  display: flex;
  gap: 8px;
}

.screen-row input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  color: var(--screen-text);
  border: 1px solid var(--screen-line);
  border-radius: var(--r);
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.1em;
}
.screen-row input::placeholder { color: var(--screen-muted); } /* a11y: було 3.9:1, стало 7.3:1 */
.screen-row input:focus {
  outline: 2px solid var(--ink-panel-teal);
  outline-offset: 1px;
  border-color: var(--ink-panel-teal);
}
.screen-row .btn {
  background: var(--screen-text);
  border-color: var(--screen-text);
  color: var(--screen);
  white-space: nowrap;
}
.screen-row .btn.accent {
  background: var(--ink-panel-accent);
  border-color: var(--ink-panel-accent);
  color: #0b0e10;
}
.screen-row .btn.accent:hover {
  background: #ff855c;
  border-color: #ff855c;
}

.screen-note {
  color: var(--screen-muted);
  font-size: 13px;
  line-height: 1.48;
  margin: 18px 0 0;
  padding-left: 11px;
  border-left: 2px solid var(--ink-panel-teal);
}

.stand {
  position: relative;
  height: 44px;
}
.stand::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 28px;
  height: 32px;
  margin-left: -14px;
  background: var(--frame);
  border-left: 1px solid var(--frame-edge);
  border-right: 1px solid var(--frame-edge);
}
.stand::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 48%;
  height: 14px;
  transform: translateX(-50%);
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* ── Інвертована телеметрична смуга фактів ── */
.facts {
  background: var(--ink-panel);
  color: var(--ink-panel-text);
  border-bottom: 1px solid var(--ink-panel-line);
}

.facts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0;
  padding-bottom: 0;
}
.landing .facts-row {
  padding-top: 0;
  padding-bottom: 0;
}

.facts-row p {
  margin: 0;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-panel-muted);
  font-size: 14px;
  position: relative;
}
.facts-row p:first-child { padding-left: 0; }
.facts-row p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  height: 56%;
  width: 1px;
  background: var(--ink-panel-line);
}
.facts-row p:first-child::before { display: none; }
.facts-row p::after {
  content: "";
  display: block;
  order: -1;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink-panel-accent);
  margin-bottom: 10px;
}
.facts-row b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.7vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-panel-text);
}

/* ── Заголовки секцій і асиметрична сітка ── */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 24px;
}
.section-head .section-title { margin: 0; flex: 1 1 260px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing .section-title {
  counter-increment: td-sec;
}
.landing .section-title::before {
  content: "0" counter(td-sec);
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 8px;
}

.section-sub { font-size: 14px; }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 310px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.split-aside {
  position: sticky;
  top: 96px;
}
.split-aside .section-title {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.split-aside p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Що ремонтуємо: модульні картки ── */
.devices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: td-dev;
}

.device {
  counter-increment: td-dev;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px 22px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line-strong);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 2px 6px var(--shadow-sm);
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.device::before {
  content: "0" counter(td-dev);
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.device-icon {
  width: 72px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 12px;
  transition: background-color .16s ease, border-color .16s ease;
}

.device svg {
  width: 52px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.device b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.device span:not(.device-icon) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.device .dc {
  opacity: 0;
  transform: scale(0.65);
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity .18s ease, transform .18s ease;
}
.device .dc circle { fill: #fbf9f5; stroke: var(--frame); stroke-width: 1.5; }
.device .dc path { stroke: var(--accent); stroke-width: 2.8; stroke-linecap: butt; }

.device:hover,
.device:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.device:hover .device-icon,
.device:focus-visible .device-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.device:hover .dc,
.device:focus-visible .dc {
  opacity: 1;
  transform: scale(1);
}
.device:hover b { color: var(--accent); }

/* Бренди — рейка чипів */
.brands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.brands .muted {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 8px;
  background: none;
  border: 0;
  padding: 0;
}
.brands span:not(.muted) {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ── Прайс-лист (технічна специфікація) ── */
.pricelist {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-sm);
}

.pricelist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.pricelist li:last-child { border-bottom: 0; }
.pricelist li:hover {
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent);
}

.pl-name { min-width: 0; }
.pl-name span {
  display: block;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.pl-name small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.pl-dots {
  flex: 1 1 24px;
  border-bottom: 1px dotted var(--line-strong);
  min-width: 20px;
  align-self: center;
}

.pl-price {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 5px 11px;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.pricelist li:hover .pl-price {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ── Табло «Зараз у майстерні» ── */
.board-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: 0 2px 10px var(--shadow-sm);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-line);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.board {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.board li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 148px;
  gap: 12px 18px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s ease;
}
.board li:hover { background: var(--bg); }

.b-dev {
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.board time {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.board-note {
  font-size: 14px;
  margin: 18px 0 0;
  padding: 10px 14px;
  background: var(--bg);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0;
  max-width: 74ch;
}

/* ── Етапи ремонту: карткова послідовність ── */
.steps-line {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
}

.steps-line li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 22px 20px 24px;
  box-shadow: 0 2px 6px var(--shadow-sm);
  transition: border-top-color .15s ease;
}
.steps-line li:hover { border-top-color: var(--accent); }

.steps-line li::before {
  content: "0" counter(step);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r);
  padding: 4px 9px;
  margin-bottom: 16px;
}

.steps-line h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

.steps-line p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ── Часті питання (<details> без JS) ── */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 0;
  padding: 0;
  transition: border-color .15s ease;
}
.faq details[open] {
  border-color: var(--line-strong);
}

.faq summary {
  list-style: none;
  padding: 18px 56px 18px 22px;
  font-size: 17px;
  font-weight: 600;
  position: relative;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--accent), var(--accent)) center / 12px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 2px 12px no-repeat,
    var(--bg);
  transition: transform .2s ease, border-color .15s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  border-color: var(--accent);
}

.faq details p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.62;
}

/* ── Заявка: двопанельний фінальний блок ── */
#contact { scroll-margin-top: 88px; }
#contacts { scroll-margin-top: 88px; }

.request {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 18px 40px -28px var(--shadow-strong);
}

.request > :first-child {
  padding: 36px 40px;
}
.request h2 { margin-top: 0; }

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.request-next {
  background: var(--ink-panel);
  color: var(--ink-panel-text);
  padding: 36px 36px;
  border-left: 1px solid var(--ink-panel-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  counter-reset: req-step;
}

.request-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-panel-teal);
  margin-bottom: 10px;
}

.request-next h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-panel-text);
  margin: 0 0 24px;
}

.request-next p {
  counter-increment: req-step;
  position: relative;
  margin: 0 0 18px;
  padding: 0 0 18px 44px;
  border-bottom: 1px solid var(--ink-panel-line);
  color: var(--ink-panel-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 44ch;
}
.request-next p:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.request-next p::before {
  content: "0" counter(req-step);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-panel-accent);
  background: var(--ink-panel-2);
  border: 1px solid var(--ink-panel-line);
  border-radius: 4px;
  padding: 3px 6px;
}

.request-meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-panel-line);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-panel-muted);
}
.request-meta strong {
  display: block;
  color: var(--ink-panel-text);
  font-weight: 600;
}

/* ── Форми й кнопки ── */
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 13px;
  width: 100%;
  transition: border-color .15s ease, background-color .15s ease;
}
input:hover, textarea:hover, select:hover { border-color: var(--text); }
input:focus, textarea:focus, select:focus {
  background: var(--surface);
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
textarea { resize: vertical; }
select { width: auto; max-width: 100%; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row .short { width: 120px; }

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
small { font-weight: 400; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--primary-ink);
  border: 1px solid var(--primary);
  border-radius: var(--r);
  padding: 10px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .08s ease;
}
.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-ink);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn.big { padding: 13px 26px; font-size: 16px; border-radius: var(--r-md); }
.btn.small { padding: 6px 12px; font-size: 13px; }

.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.ghost:hover {
  border-color: var(--text);
  background: var(--surface-2);
  color: var(--text);
}

.btn.danger {
  background: var(--err);
  border-color: var(--err);
  color: #ffffff;
}
.btn.danger:hover { opacity: 0.9; color: #ffffff; }

.linklike {
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: var(--r);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: color .15s ease, background-color .15s ease, text-decoration-color .15s ease;
}
.linklike:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
  background: var(--surface-2);
}

form.inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.search, .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 20px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.search input, .filters input {
  flex: 1 1 200px;
  min-width: min(200px, 100%);
}

/* ── Мітки й статуси ── */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg);
}
.tag.owasp {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}
:root[data-theme="dark"] .tag.owasp { color: #0a0f12; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag.owasp { color: #0a0f12; }
}
.tag.on {
  border-color: var(--ok);
  color: var(--ok);
  background: var(--ok-bg);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.st-new { color: var(--st-new); background: var(--st-new-bg); }
.st-diagnostics { color: var(--st-diag); background: var(--st-diag-bg); }
.st-waiting_parts { color: var(--st-wait); background: var(--st-wait-bg); }
.st-repair { color: var(--st-rep); background: var(--st-rep-bg); }
.st-ready { color: var(--st-ready); background: var(--st-ready-bg); }
.st-done { color: var(--st-done); background: var(--st-done-bg); }

.status-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  padding: 10px 22px;
  margin: 8px 0;
  border-radius: 999px;
}
.status-big::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.track-result {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}

/* ── Панель персоналу та адмінка ── */
.panel-head {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.panel-head h1 {
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.panel-head p { margin: 0; }

.dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  margin: 0 0 18px;
}
.dl dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--line);
}
.timeline li {
  position: relative;
  padding: 4px 0 14px 18px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--teal);
}
.timeline li:last-child { padding-bottom: 2px; }
.event-text {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.card.table-wrap {
  padding: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
tbody tr:hover { background: var(--bg); }

.log td { overflow-wrap: anywhere; }
tr.sev-info { background: var(--info-bg); }
tr.sev-warning { background: var(--warn-bg); }
tr.sev-alert { background: var(--err-bg); }

.alerts {
  border-color: var(--err);
  border-left: 4px solid var(--err);
}
.alerts h2 { color: var(--err); }

#log-integrity { font-weight: 600; }

ul.backups {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
ul.backups li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
}
ul.backups li:last-child { border-bottom: 0; }

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(115px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.photo { margin: 0; text-align: center; }
.photo img {
  width: 100%;
  height: 104px;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--line);
  display: block;
}

/* ── Сторінка «Безпека» і 2FA ── */
.hero {
  padding: 12px 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.hero h1 { margin: 0 0 12px; }
.hero p { max-width: 70ch; margin: 0; color: var(--muted); font-size: 17px; }

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 8px 20px;
}

.measure h4 { margin: 18px 0 6px; }
.measure p { margin: 0; max-width: 75ch; }

details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  background: var(--bg);
}
summary { cursor: pointer; font-weight: 600; }

pre {
  background: var(--ink-panel);
  color: var(--ink-panel-text);
  border: 1px solid var(--ink-panel-line);
  padding: 14px 16px;
  border-radius: var(--r);
  overflow-x: auto;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.qr {
  display: block;
  width: 204px;
  height: 204px;
  margin: 14px auto;
  background: #ffffff;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}

.secret {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.steps { padding-left: 22px; }
.steps li { margin-bottom: 6px; }

/* ── Вхід / реєстрація клієнта ── */
.auth {
  display: flex;
  justify-content: center;
  padding: 28px 0 48px;
}

.auth-box {
  width: 100%;
  max-width: 450px;
  border-top: 3px solid var(--accent);
}
.auth-box h1 { margin: 0 0 6px; font-size: 30px; }
.auth-box > .muted { margin: 0 0 22px; }
.auth-switch {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ── Кабінет клієнта ── */
.cab-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.cab-head h1 { margin: 0 0 4px; }

.cab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}
.cab-grid h2 { font-size: 22px; margin: 0 0 14px; }
.cab-grid h2 ~ h2 { margin-top: 36px; }

.add-order {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.add-order label { font-size: 14px; margin-bottom: 8px; }
.add-order input,
#add-code {
  flex: 1 1 180px;
  min-width: min(180px, 100%);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.cab-requests { list-style: none; padding: 0; margin: 0; }
.cab-requests li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cab-requests li:last-child { border-bottom: 0; }

.cab-side h3 { margin: 0 0 12px; font-size: 18px; }

/* ── Архітектурний підвал ── */
.footer {
  background: var(--ink-panel);
  color: var(--ink-panel-text);
  border-top: 3px solid var(--accent);
  font-size: 15px;
  margin-top: 36px;
}

.footer a {
  color: var(--ink-panel-text);
  text-decoration: none;
}
.footer a:hover {
  color: var(--ink-panel-accent);
  text-decoration: underline;
  text-decoration-color: var(--ink-panel-accent);
}
.footer .muted { color: var(--ink-panel-muted); }

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 32px 32px;
  display: grid;
  grid-template-columns: 1.35fr 1.2fr 0.95fr 0.95fr;
  gap: 32px;
}

.footer h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-panel-teal);
  margin: 0 0 14px;
}

.f-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink-panel-text);
}

.f-brand .muted {
  margin: 0;
  max-width: 30ch;
  line-height: 1.6;
}

.f-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.f-phone {
  font-family: var(--font-mono);
  font-size: 14px;
}

.f-hours {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 3px 14px;
  margin: 6px 0 0;
  font-size: 14px;
}
.f-hours dt { color: var(--ink-panel-muted); }
.f-hours dd { margin: 0; font-family: var(--font-mono); font-size: 13px; }
.f-hours dt:nth-last-of-type(1),
.f-hours dd:nth-last-of-type(1) { color: var(--ink-panel-muted); }

.f-social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.f-social svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.f-social a:hover svg { stroke: var(--ink-panel-accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px 26px;
  border-top: 1px solid var(--ink-panel-line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-panel-muted);
}
.footer-bottom .muted { max-width: 72ch; }

/* ── Адаптивність (планшети та мобільні, без скролу на 390px) ── */
@media (max-width: 960px) {
  .hero-grid,
  .cols,
  .split-section,
  .request,
  .cab-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 36px;
    padding-top: 40px;
    padding-bottom: 44px;
  }

  .monitor {
    justify-self: stretch;
    max-width: 100%;
  }

  .split-section { gap: 22px; }
  .split-aside { position: static; }

  .facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-row p:nth-child(odd) { padding-left: 0; }
  .facts-row p:nth-child(odd)::before { display: none; }
  .facts-row p:nth-child(n+3) { border-top: 1px solid var(--ink-panel-line); }

  .devices,
  .steps-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-next {
    border-left: 0;
    border-top: 1px solid var(--ink-panel-line);
  }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 10px 16px;
    gap: 10px 12px;
  }
  .brand-logo { width: 38px; height: 38px; }
  .brand-text b { font-size: 21px; }
  .brand-sub { display: none; }

  nav { gap: 4px 6px; }
  nav > a:not(.account-link) { padding: 6px 8px; font-size: 14px; }
  .account-link { padding: 6px; margin-left: 0; }
  .account-link span { display: none; }

  .container,
  .footer-grid,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }
  .landing .container,
  .landing .band {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero-grid {
    padding-top: 28px;
    padding-bottom: 36px;
  }
  .hero-text h1 { font-size: 32px; }
  .lead { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 160px; }

  .screen { padding: 10px; border-radius: 12px; }
  .screen-in { padding: 18px 16px; min-height: 0; }
  .screen-title { font-size: 23px; }
  .screen-row { flex-direction: column; }

  .facts-row p { padding: 18px 14px; }
  .facts-row p:nth-child(odd) { padding-left: 0; }
  .facts-row b { font-size: 24px; }

  .devices { gap: 10px; }
  .device { padding: 16px 14px; }
  .device-icon { width: 60px; height: 48px; }
  .device svg { width: 44px; height: 34px; }
  .device b { font-size: 16px; }

  .brands { padding: 14px; }

  .pricelist li { padding: 14px 14px; gap: 10px; justify-content: space-between; }
  .pl-dots { display: none; }
  .pl-price { font-size: 13px; padding: 4px 8px; }

  .board-panel { padding: 20px 16px; border-radius: var(--r-lg); }
  .board li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 4px; }
  .board time { grid-column: 1 / -1; text-align: left; font-size: 12px; }

  .steps-line { grid-template-columns: minmax(0, 1fr); }

  .faq summary { padding: 16px 48px 16px 16px; font-size: 16px; }
  .faq details p { padding: 0 16px 16px; }

  .request > :first-child,
  .request-next { padding: 24px 18px; }
  .form-row-2 { grid-template-columns: minmax(0, 1fr); }

  .card { padding: 18px 16px; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 10px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screen-in { animation: none; }
  *, *::before, *::after { transition: none !important; }
  *, *::before, *::after { animation: none !important; }
  .btn:active, .device:hover, .device:focus-visible, .brand:hover .brand-logo { transform: none; }
}

/* ===== A11y-правки за рецензією Hydrogen (перевірено перерахунком контрасту WCAG) ===== */
/* Небезпечна кнопка: у темній темі --err світлий (#ff8c82), білий текст давав 2.25:1 → фіксований темно-червоний, 6.9:1 */
.btn.danger, .btn.danger:hover { background: #a62626; border-color: #a62626; color: #ffffff; }
/* Ховер посилань на --surface-2 у світлій темі: акцент 4.19:1 → темніший акцент 5.59:1 */
nav > a:not(.account-link):hover, .linklike:hover { color: var(--accent-hover); }
/* Рамка фокуса на темних інвертованих панелях світлої теми: 3.19:1 → 8.09:1 */
.footer :focus-visible, .request-next :focus-visible, .facts :focus-visible { outline-color: #68b2ff; }
@media (max-width: 640px) {
  /* Підпис кнопки кабінету ховаємо лише візуально — для скрінрідера посилання зберігає ім'я */
  .account-link span { display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
