/* ======================================================
   LetterBot — LOCAL OPERATOR design system
   «Почта как локальная система наблюдения»
   Editorial / technical interface. Not a SaaS landing.
   ====================================================== */

/* ── Tokens (разделы 4–7 designgpt.md) ── */
:root {
  --bg:          #F4F1EA;
  --ink:         #171815;
  --accent:      #E8482E;
  --accent-btn:  #C6371C;
  --accent-dark: #B22E15;
  --blue:        #2E5BFF;
  --green:       #23845B;
  --green-ink:   #1D6B47;
  --gray:        #73756F;
  --gray-ink:    #585A54;
  --line:        #C9C6BC;
  --paper:       #FFFDF8;
  --dark:        #171815;
  --dark-soft:   #E9E6DD;
  --warn:        #E8B54A;
  --amber-ink:   #A8740B;

  --r-panel: 2px;
  --r-shot:  0px;
  --r-btn:   2px;

  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --w-1200: 1200px;
  --w-1024: 1024px;
  --w-768:  768px;
  --w-480:  480px;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 5px;
}

section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, figure, ul, ol, table { margin: 0; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--paper); }

/* ── Grid: 12 колонок / gutter 20 / max-width 1440 ── */
.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

/* ── Type ── */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

h1 { font-size: 72px; line-height: 0.96; margin-bottom: 28px; }
h2 { font-size: 48px; line-height: 1.0; margin-bottom: 20px; }
h3 { font-size: 28px; line-height: 1.1; margin-bottom: 12px; }

.lead { font-size: 21px; line-height: 1.45; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.small { font-size: 14px; line-height: 1.4; }

/* Eyebrow: редакционный маркер-annotation (раздел 8) */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-ink);
  margin-bottom: 18px;
}
.eyebrow::before { content: '// '; color: var(--accent); }

/* ── Sections ── */
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }

.section-head { max-width: 860px; margin-bottom: 56px; }
.section-head .sub {
  margin-top: 14px;
  font-size: 21px;
  line-height: 1.45;
  color: var(--gray-ink);
  max-width: 680px;
}

/* ── Buttons (2px, не pills) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

.btn-primary { background: var(--accent-btn); color: var(--paper); }
.btn-primary:hover { background: var(--accent-dark); color: var(--paper); }

.btn-outline { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }

.btn-ghost {
  padding: 13px 4px;
  background: none;
  color: var(--ink);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-ghost:hover { color: var(--accent); }

.btn .ico { width: 15px; height: 15px; flex: none; }

/* ── Focus (контрастный outline) ── */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ═══════════════════ HEADER (раздел 9) ═══════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.logo-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.logo-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--green-ink);
  border: 1px solid rgba(35, 132, 91, 0.4);
  border-radius: 999px;
  padding: 2px 9px;
}
.logo-status .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
  vertical-align: 1px;
}

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 22px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 160ms ease-out, color 160ms ease-out;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current] { border-bottom-color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 8px;
}
.header-actions .btn { padding: 9px 16px; }

.nav-burger { display: none; }

/* ═══════════════════ HERO (раздел 10) ═══════════════════ */
.hero {
  padding: 96px 0 88px;
  overflow: hidden;
}

.hero-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-ink);
  margin-bottom: 26px;
}

.hero-sub {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 21px;
  line-height: 1.45;
  color: var(--gray-ink);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 20px; }

.hero-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-ink);
  letter-spacing: 0.04em;
}

/* Документальный артефакт Telegram-уведомления */
.artifact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}

.artifact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--gray-ink);
}

.artifact-dots { display: inline-flex; gap: 5px; }
.artifact-dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.pm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-btn);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.pm .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.artifact-body { padding: 20px 22px 22px; }

.artifact-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.artifact-text { font-size: 14.5px; color: var(--gray-ink); line-height: 1.5; }
.artifact-action { font-size: 14.5px; font-weight: 500; margin-top: 12px; }
.artifact-action::before { content: '→ '; color: var(--accent); }
.artifact-codes {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-ink);
  margin-top: 12px;
  word-break: break-word;
}
.artifact-codes .rc { color: var(--blue); }

.artifact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.abtn {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--gray-ink);
  background: var(--paper);
}
.abtn.is-red { border-color: var(--accent); color: var(--accent-dark); }
.abtn.is-blue { border-color: var(--blue); color: var(--blue); }

/* Лог (терминальный артефакт) */
.log {
  margin: 0;
  background: var(--dark);
  color: var(--dark-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  padding: 16px 18px;
  border-radius: var(--r-panel);
  overflow-x: auto;
  white-space: pre;
}
.log .t { color: #8B8B84; margin-right: 12px; }
.log .hl { color: #FFB59C; }
.log .hl.b { color: var(--accent); font-weight: 600; }
.log .blue { color: #7FA1FF; }
.log .warn { color: var(--warn); }

.artifact-caption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-ink);
}
.artifact-caption::before { content: '— '; color: var(--accent); }

/* ═══════════════════ STATUS STRIP (раздел 11) ═══════════════════ */
.status-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-strip-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.fact {
  padding: 26px 32px 24px;
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: 0; }

.fact .f-value {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.fact .f-label {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-ink);
}

/* ═══════════════════ FLOW (раздел 12) ═══════════════════ */
.flow {
  display: flex;
  align-items: stretch;
}

.flow-step {
  flex: 1;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  min-width: 0;
}

.flow-index {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.flow-name {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.flow-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-ink);
  margin-bottom: 10px;
}

.flow-desc { font-size: 14px; line-height: 1.45; color: var(--gray-ink); max-width: 260px; }

.flow-conn {
  flex: none;
  width: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 22px;
  color: var(--gray);
  font-family: var(--font-mono);
  font-size: 13px;
  position: relative;
}
.flow-conn::after {
  content: '';
  position: absolute;
  top: 0; bottom: 22px;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.flow-conn span { position: relative; z-index: 1; background: var(--bg); padding: 0 3px; }

/* ═══════════════════ LOCAL (раздел 14) ═══════════════════ */
.fact-list { list-style: none; padding: 0; }
.fact-list li {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.fact-list li:first-child { border-top: 1px solid var(--line); }
.fact-list .fl-key {
  flex: none;
  width: 150px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
}
.fact-list .fl-text { font-size: 15px; line-height: 1.5; color: var(--gray-ink); }
.fact-list .fl-text code { white-space: normal; overflow-wrap: anywhere; }

.scheme {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.scheme-box {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-panel);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.scheme-box.is-pc { border-color: var(--ink); }
.scheme-arrow { color: var(--gray); font-family: var(--font-mono); }

.scheme-note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ═══════════════════ TG-FIRST (раздел 15) ═══════════════════ */
.tg-list { list-style: none; padding: 0; }
.tg-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.tg-list li:first-child { border-top: 1px solid var(--line); }
.tg-key {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}
.tg-key .tg-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
  min-width: 92px;
}
.tg-key b { font-size: 17px; font-weight: 600; }
.tg-list .tg-desc { font-size: 14.5px; color: var(--gray-ink); line-height: 1.5; }

/* Telegram chat artifact */
.chat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 18px;
  max-width: 470px;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-ink);
  letter-spacing: 0.04em;
}
.chat-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.bubble {
  margin-top: 14px;
  background: var(--dark-soft);
  border-radius: 2px 12px 12px 12px;
  padding: 13px 15px;
}
.bubble .b-title { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.bubble .b-text { font-size: 14px; color: var(--gray-ink); line-height: 1.5; }
.bubble .b-meta {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-ink);
}
.bubble .b-meta .rc { color: var(--blue); }

.chat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.chat-time {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gray);
  text-align: right;
}

/* ═══════════════════ EXPLAIN (раздел 16) ═══════════════════ */
.code-stack { display: grid; gap: 10px; }

.code-line {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-panel);
  padding: 16px 22px;
  word-break: break-word;
}

.wt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.wt-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-ink);
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
}
.wt-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.wt-table td.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}
.wt-table .w { text-align: right; font-family: var(--font-mono); color: var(--accent-dark); white-space: nowrap; }

/* ═══════════════════ COCKPIT (раздел 17) ═══════════════════ */
.shot { margin: 0; }

.shot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--paper);
  border-radius: var(--r-shot);
}

.shot-caption {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
}
.shot-caption .sc-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-ink);
  white-space: nowrap;
}
.shot-caption .sc-desc { font-size: 14px; color: var(--gray-ink); }

.shot-offset { margin-left: 9%; margin-top: 72px; }

/* ═══════════════════ HEALTH (раздел 18) ═══════════════════ */
.status-table { width: 100%; border-collapse: collapse; font-size: 15px; }

.status-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-ink);
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.status-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.status-table td.c-name { font-weight: 600; white-space: nowrap; }
.status-table td.c-detail { color: var(--gray-ink); font-size: 14px; }

.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.st .dot { width: 7px; height: 7px; border-radius: 50%; }
.st-ok   { color: var(--green-ink); } .st-ok .dot   { background: var(--green); }
.st-active { color: var(--blue); }   .st-active .dot { background: var(--blue); }
.st-idle { color: var(--gray-ink); } .st-idle .dot { background: var(--gray); }

/* ═══════════════════ DEGRADE (раздел 19) ═══════════════════ */
.journal {
  background: var(--dark);
  color: var(--dark-soft);
  border-radius: var(--r-panel);
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.journal .j-status {
  display: grid;
  gap: 2px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #3A3A36;
}
.journal .j-status b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.journal .j-status .st-line { color: #FFB59C; }

.journal .ev-ts { color: #8B8B84; margin-right: 10px; }
.journal .ev-lvl { display: inline-block; width: 52px; margin-right: 8px; font-weight: 600; }
.journal .lvl-warn { color: var(--warn); }
.journal .lvl-info { color: #7FA1FF; }

/* ═══════════════════ MULTI-INBOX (раздел 20) ═══════════════════ */
.streams { list-style: none; padding: 0; }

.streams li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
}
.streams li:first-child { border-top: 1px solid var(--line); }
.streams .s-host { font-size: 11.5px; color: var(--gray-ink); font-weight: 400; }

.streams li.s-plus {
  border-bottom-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}
.streams li.s-plus .s-host { color: var(--accent); }

/* ═══════════════════ COMPARISON (раздел 21) ═══════════════════ */
.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; }

.cmp-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 820px; }

.cmp-table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.cmp-table th.c-param {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-ink);
}

.cmp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--gray-ink);
}
.cmp-table td.c-param {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.cmp-table .c-lb { color: var(--ink); font-weight: 500; }

.cmp-table .lb-col {
  border-left: 2px solid var(--accent);
  background: var(--paper);
}

.yes { color: var(--green-ink); font-weight: 500; white-space: nowrap; }
.no  { color: var(--gray); white-space: nowrap; }

/* ═══════════════════ INSTALL (раздел 22) ═══════════════════ */
.install-steps { list-style: none; padding: 0; margin: 0; }

.install-steps li {
  display: flex;
  gap: 22px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.install-steps li:first-child { border-top: 1px solid var(--line); }

.install-steps .is-num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  width: 26px;
}

.install-steps .is-cmd {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
}
.install-steps .is-desc { font-size: 14px; color: var(--gray-ink); }

.install-note {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.03em;
}

/* ═══════════════════ OLD HARDWARE (раздел 23) ═══════════════════ */
.hw-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--paper);
  padding: 28px 32px;
  flex-wrap: wrap;
}
.hw-band h3 { margin-bottom: 6px; }
.hw-band p { font-size: 14.5px; color: var(--gray-ink); max-width: 520px; }
.hw-spec {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gray-ink);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: 10px 16px;
  background: var(--bg);
  white-space: nowrap;
}

/* ═══════════════════ FAQ (раздел 24) ═══════════════════ */
.acc { border-bottom: 1px solid var(--line); }
.acc:first-of-type { border-top: 1px solid var(--line); }

.acc summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}
.acc summary::-webkit-details-marker { display: none; }

.acc summary::after {
  content: '+';
  flex: none;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--gray-ink);
  transition: transform 160ms ease-out;
}
.acc[open] summary::after { content: '−'; }

.acc-body {
  padding: 0 48px 24px 0;
  max-width: 780px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--gray-ink);
}
.acc-body a { color: var(--blue); text-decoration: underline; }

/* ═══════════════════ SUPPORT (раздел 25) ═══════════════════ */
.support-qr {
  width: 200px;
  height: 200px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--paper);
  padding: 10px;
  display: block;
}

/* ═══════════════════ FINAL CTA (раздел 26) ═══════════════════ */
.cta-band {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--paper);
  padding: 72px 72px;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--gray-ink);
  margin-bottom: 32px;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 24px; }
.cta-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray-ink);
  letter-spacing: 0.03em;
}

/* ═══════════════════ FOOTER (раздел 27) ═══════════════════ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  padding: 64px 0 48px;
}

.footer-brand .f-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.footer-brand .f-desc { font-size: 14px; color: var(--gray-ink); margin-top: 8px; max-width: 280px; }

.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.footer-tags { text-align: right; }
.footer-tags .ft {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  color: var(--gray-ink);
  padding: 4px 0;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  font-size: 13px;
  color: var(--gray-ink);
}
.footer-bottom .fb-mono { font-family: var(--font-mono); font-size: 11.5px; }
.footer-bottom .fb-right { margin-left: auto; }
.footer-bottom a { color: var(--gray-ink); text-decoration: underline; }
.footer-bottom a:hover { color: var(--accent); }

/* ═══════════════════ MOTION (раздел 29) ═══════════════════ */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.hero-inner > * {
  animation: rise 220ms ease-out both;
}
.hero-inner > *:nth-child(2) { animation-delay: 60ms; }
.hero-inner > *:nth-child(3) { animation-delay: 120ms; }
.hero-inner > *:nth-child(4) { animation-delay: 180ms; }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}
.reveal.is-visible { opacity: 1; transform: none; }

.pulse { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ═══════════════════ TABLET (раздел 6) ═══════════════════ */
@media (max-width: 1199px) {
  .wrap { padding: 0 32px; }

  .row { grid-template-columns: repeat(8, 1fr); gap: 16px; }
  .col-2, .col-3, .col-4, .col-5, .col-6, .col-8 { grid-column: span 4; }
  .col-7, .col-9, .col-10, .col-12 { grid-column: span 8; }

  h1 { font-size: 56px; }
  h2 { font-size: 40px; }

  .section { padding: 84px 0; }

  .status-strip-inner { grid-template-columns: repeat(3, 1fr); }
  .fact:nth-child(4) { border-left: 0; }
  .fact { padding: 22px 24px; }

  .shot-offset { margin-left: 0; margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-tags { text-align: left; }
}

/* ── header: burger-regex (768–1099) ── */
@media (max-width: 1099px) and (min-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 24px;
    margin: 0;
  }
  body.nav-open .site-nav { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 15px 0; font-size: 16px; }
  .site-nav a[aria-current] { border-bottom-color: transparent; }
  .site-nav a[aria-current]::after { content: ' ←'; color: var(--accent); }

  .header-actions { gap: 12px; }
  .header-actions .btn { padding: 9px 13px; font-size: 14px; }
  .header-actions .btn-ghost { padding: 9px 0; }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform 160ms ease-out, opacity 160ms ease-out;
  }
  body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header-actions .btn.ghost-mobile-hidden { display: none; }
}

/* ═══════════════════ MOBILE (раздел 28) ═══════════════════ */
@media (max-width: 767px) {
  .wrap { padding: 0 20px; }

  .row { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-12 { grid-column: span 4; }

  h1 { font-size: 46px; line-height: 1.0; margin-bottom: 20px; }
  h2 { font-size: 36px; line-height: 1.05; }
  h3 { font-size: 24px; }
  .lead { font-size: 19px; }
  .hero-sub { font-size: 22px; }
  body { font-size: 16px; }
  .small { font-size: 13px; }

  .section { padding: 68px 0; }
  .section-head { margin-bottom: 40px; }

  /* header → menu */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 24px;
    margin: 0;
  }
  body.nav-open .site-nav { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { display: block; padding: 15px 0; font-size: 16px; }
  .site-nav a[aria-current] { border-bottom-color: transparent; }
  .site-nav a[aria-current]::after { content: ' ←'; color: var(--accent); }

  .header-actions { gap: 12px; }
  .header-actions .btn { padding: 9px 13px; font-size: 14px; }
  .header-actions .btn-ghost { padding: 9px 0; }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform 160ms ease-out, opacity 160ms ease-out;
  }
  body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header-actions .btn.ghost-mobile-hidden { display: none; }

  /* hero: текст всегда выше screenshot */
  .hero { padding: 56px 0 56px; }

  .status-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .fact { border-left: 0; border-top: 1px solid var(--line); padding: 18px 0; }
  .fact:nth-child(3) { border-top: 1px solid var(--line); }
  .fact:nth-child(odd) { padding-right: 16px; }
  .fact:first-child { border-top: 0; }
  .fact:nth-child(2) { border-top: 0; }

  /* flow вертикально */
  .flow { flex-direction: column; }
  .flow-conn {
    width: auto;
    height: 34px;
    padding: 0;
    align-items: center;
    justify-content: flex-start;
    padding-left: 26px;
  }
  .flow-conn::after {
    content: '';
    position: absolute;
    top: 50%; bottom: auto;
    left: 0; right: 0;
    width: auto;
    height: 1px;
    background: var(--line);
  }
  .flow-conn span { background: var(--bg); }
  .flow-step { border-top: 2px solid var(--ink); }

  .code-line { font-size: 21px; padding: 13px 16px; }

  .shot-offset { margin-top: 48px; }

  .hw-band { padding: 24px 22px; gap: 20px; }
  .hw-spec { white-space: normal; }

  .cta-band { padding: 44px 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 36px; }
  .footer-bottom { align-items: flex-start; }
  .footer-bottom .fb-right { margin-left: 0; }

  .acc summary { font-size: 17px; padding: 19px 0; }
  .acc-body { padding-right: 0; }

  .artifact-body { padding: 16px 16px 18px; }
  .artifact-caption { margin-top: 10px; }
}

@media (max-width: 480px) {
  .status-strip-inner { grid-template-columns: 1fr; }
  .fact { border-top: 1px solid var(--line); padding: 16px 0; }
  .fact:first-child, .fact:nth-child(2), .fact:nth-child(3) { border-top: 1px solid var(--line); }
  .fact:first-child { border-top: 0; }
  .fact:nth-child(odd) { padding-right: 0; }

  .scheme { gap: 12px; }
  .scheme-box { padding: 10px 14px; font-size: 12px; }

  .logo-status { display: none; }

  .tg-list .tg-key { flex-direction: column; gap: 4px; }
}
