/* LSCP site, V4 (2026-07) - designed from scratch.
   Concept: "the record" - prose in a humanist sans; everything that is a
   RECORD (dates, counters, claims, proof tables) in monospace, so data
   reads as data. One stylesheet, system fonts, zero dependencies.
   Palette: cool paper, ink, deep teal accent. No amber, no dark header. */
:root {
  --ink: #14181c;
  --ink-mute: #5b6663;
  --paper: #f7f8f6;
  --surface: #ffffff;
  --line: #dee4e1;
  --line-soft: #eaeeec;
  --accent: #c07f1f;
  --accent-dark: #8a5606;
  --accent-wash: #f7efdd;
  --gold: #d99a3d;
  --black: #0e0e0e;
  --max: 820px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}

/* --- header: light, ruled, quiet ------------------------------------- */
header.site {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 16px 20px 12px;
}
header.site .inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px;
}
.wordmark {
  font-family: var(--mono);
  font-weight: 700; letter-spacing: .08em; font-size: 1.2rem;
  color: var(--ink); text-decoration: none;
}
.wordmark:hover { color: var(--accent-dark); }
.tagline {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute);
}
nav.site { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav.site a {
  color: var(--ink); text-decoration: none; font-size: .93rem;
  padding: 2px 0; border-bottom: 2px solid transparent;
}
nav.site a:hover { border-bottom-color: var(--line); }
nav.site a.here { border-bottom-color: var(--accent); color: var(--accent-dark); }

main { max-width: var(--max); margin: 0 auto; padding: 36px 20px 64px; }

h1 { font-size: 2.05rem; line-height: 1.18; margin: .35em 0 .45em; letter-spacing: -.01em; }
h2 {
  font-size: 1.28rem; margin-top: 2.1em; padding-top: .9em;
  border-top: 1px solid var(--line);
}
h3 { font-size: 1.05rem; margin-bottom: .35em; }
/* separator line above a block of body text – same rule an h2 draws */
.sep { margin-top: 2.1em; padding-top: .9em; border-top: 1px solid var(--line); }
/* inline video embed – responsive 16:9 */
.video { margin: 1.8em 0; }
.video iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: 6px; background: var(--ink);
}
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.lede { font-size: 1.14rem; color: var(--ink-mute); max-width: 44em; }

/* --- hero -------------------------------------------------------------- */
.hero { padding: 22px 0 4px; display: flex; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.hero .hero-text { flex: 1 1 420px; }
.hero .kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: .6em;
}
.hero .portrait {
  flex: 0 0 auto; width: 180px; height: 180px;
  border-radius: 14px; object-fit: cover;
  border: 1px solid var(--line);
  outline: 3px solid var(--accent-wash);
  margin-top: .8em;
}

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  text-decoration: none; padding: 10px 22px; border-radius: 4px;
  font-weight: 600; margin: 14px 12px 0 0;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost {
  background: transparent; color: var(--ink) !important;
  border: 1.5px solid var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper) !important; }

/* --- the record strip (home/spirit stats) ------------------------------- */
.recordbar { border-top: 2px solid var(--ink); margin: 34px 0 8px; }
.recordbar .stat {
  display: flex; align-items: baseline; gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 4px;
}
.recordbar .stat b {
  font-family: var(--mono); font-size: 1.35rem; font-weight: 700;
  color: var(--accent-dark); min-width: 5.2em; text-align: right;
  flex: 0 0 auto; letter-spacing: -.01em;
}
.recordbar .stat small { color: var(--ink-mute); font-size: .95rem; }

/* --- cards --------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--ink); border-radius: 0 0 6px 6px;
  padding: 16px 18px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* episode thumbnail inside a card */
.card a.thumb { display: block; margin: -16px -18px 14px; }
.card a.thumb img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; border-bottom: 1px solid var(--line);
}
.card a.thumb:hover img { opacity: .9; }

ul.clean { padding-left: 1.2em; }
ul.clean li { margin: .4em 0; }

.note {
  font-size: .94rem; background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 0 6px 6px 0; color: var(--ink);
}

blockquote {
  border-left: 3px solid var(--accent); margin: 1.2em 0;
  padding: .3em 1em; color: var(--ink-mute); font-style: italic;
}

/* --- tables: the record ---------------------------------------------------- */
table.simple, table.record { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .94rem; background: var(--surface); }
table.simple th, table.simple td,
table.record th, table.record td {
  border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top;
}
table.simple th, table.record th {
  background: var(--paper); border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
table.record td.when, time { font-family: var(--mono); font-size: .88em; white-space: nowrap; }

/* step tables (bounty "How it works"): keep the step label on one line */
table.simple.steps th:first-child,
table.simple.steps td:first-child { width: 10.5em; }

/* --- testimonials ----------------------------------------------------------- */
.testimonials blockquote { margin: 0 0 .8em; padding: .1em 0 .1em .9em; font-size: .95rem; }
.testimonials .attribution { font-size: .85rem; color: var(--ink-mute); margin: 0; font-family: var(--mono); }
.clutch-badge {
  display: inline-block; background: var(--surface); color: var(--ink) !important;
  border: 1.5px solid var(--ink); text-decoration: none; font-weight: 700;
  font-size: .9rem; padding: 8px 16px; border-radius: 4px; font-family: var(--mono);
}
.clutch-badge:hover { border-color: var(--accent); color: var(--accent-dark) !important; }

/* --- footer -------------------------------------------------------------------- */
footer.site {
  border-top: 2px solid var(--ink); background: var(--paper);
  color: var(--ink-mute); margin-top: 48px; padding: 22px 20px 30px; font-size: .88rem;
}
footer.site .inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px 30px; justify-content: space-between;
}
footer.site a { color: var(--ink-mute); }

.postlist li { margin: .5em 0; }
.postlist a { text-decoration: none; }
.postlist a:hover { text-decoration: underline; }
.postlist .yr { color: var(--ink-mute); font-size: .85rem; margin-left: .5em; font-family: var(--mono); }

@media (max-width: 640px) {
  nav.site { margin-left: 0; }
  h1 { font-size: 1.55rem; }
  .hero { gap: 20px; }
  .hero .portrait { width: 132px; height: 132px; margin: 0 auto; }
  .recordbar .stat b { min-width: 3.6em; font-size: 1.15rem; }
  table.simple.steps th:first-child,
  table.simple.steps td:first-child { width: 7.5em; }
}

/* --- article pages (Responsible Disclosure Lab archive) --- */
article.post { max-width: 46em; }
.post-meta {
  font-size: .82rem; color: var(--ink-mute); font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2em;
}
.post-meta a { text-decoration: none; }
article.post h1 { margin-top: .1em; }
article.post img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; margin: .6em 0; }
article.post figure { margin: 1.2em 0; }
article.post figcaption { font-size: .85rem; color: var(--ink-mute); margin-top: .3em; }
article.post pre {
  background: #14181c; color: #e8eeec; padding: 14px 16px; border-radius: 6px;
  overflow-x: auto; font-size: .86rem; line-height: 1.5;
}
article.post code { background: var(--line-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
article.post pre code { background: none; padding: 0; }
article.post h4 { font-size: 1.05rem; margin-top: 1.6em; }
.post-end { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0 1em; }
.post-foot { font-size: .9rem; color: var(--ink-mute); }

/* --- newsletter archive --- */
.issue-sub { color: var(--ink-mute); }
details.year {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 18px; margin: 10px 0;
}
details.year summary { cursor: pointer; font-weight: 700; font-family: var(--mono); }
details.year summary:hover { color: var(--accent-dark); }
.dateflow { color: var(--ink-mute); font-size: .92rem; line-height: 2; margin: 8px 0 4px; }
.issue-lines { font-size: .92rem; margin-top: 8px; }
.issue-lines time { color: var(--ink-mute); }

/* --- nav v3: Services dropdown, resources standalone (F182) --- */
.navgroup { position: relative; }
.navgroup .navtop { white-space: nowrap; }
.navgroup .navtop.here { border-bottom-color: var(--accent); color: var(--accent-dark); }
.navgroup .caret { font-size: .7em; color: var(--ink-mute); }
.navgroup .dropdown {
  display: none; position: absolute; left: 0; top: 100%; z-index: 20;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--ink); min-width: 200px; padding: 6px 0;
}
.navgroup:hover .dropdown, .navgroup:focus-within .dropdown { display: block; }
.navgroup .dropdown a {
  display: block; padding: 7px 14px; border-bottom: none; white-space: nowrap;
}
.navgroup .dropdown a:hover { background: var(--accent-wash); border-bottom: none; }
.navgroup .dropdown a.here { color: var(--accent-dark); font-weight: 600; }
@media (max-width: 640px) {
  .navgroup .dropdown { left: auto; right: 0; }
}
.navgroup .navtop:hover + .dropdown { display: block; }

/* --- nav v5 (F190): two-tier header, baseline-aligned groups --- */
header.site .inner { max-width: 1200px; }
nav.site { flex-basis: 100%; margin-left: 0; align-items: baseline; margin-top: 6px; }
.navgroup { display: inline-flex; position: relative; }

/* --- rebrand v6 (F191): the shield logo is canon - black + gold --- */
header.site { background: var(--black); border-bottom: 3px solid var(--gold); }
header.site .inner { align-items: center; }
.logo-img { height: 52px; width: auto; display: block; }
.wordmark { color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.wordmark:hover { color: var(--gold); }
.tagline { color: #8f8f88; }
nav.site a { color: #e8e8e3; }
nav.site a:hover { border-bottom-color: #55554e; color: #fff; }
nav.site a.here { color: #e9b45b; border-bottom-color: var(--gold); }
.navgroup .navtop.here { color: #e9b45b; border-bottom-color: var(--gold); }
.navgroup .caret { color: #8f8f88; }
.navgroup .dropdown { background: #161616; border: 1px solid #3a3a35; border-top: 2px solid var(--gold); }
.navgroup .dropdown a { color: #e8e8e3; }
.navgroup .dropdown a:hover { background: #24241f; color: #fff; }
.navgroup .dropdown a.here { color: #e9b45b; font-weight: 600; }
footer.site { background: var(--black); color: #9a9a92; border-top: 3px solid var(--gold); }
footer.site a { color: #c9c9c2; }
.btn { background: #141414; }
.btn:hover { background: #2e2e29; }
.recordbar { border-top-color: #141414; }
.card { border-top-color: #141414; }
h3.cred { font-family: var(--mono); font-size: 1.5rem; letter-spacing: .06em; color: var(--accent-dark); margin: 0 0 .3em; }

/* =====================================================================
   v9 (2026-07-22) – alignment + real responsiveness.
   Reader feedback: "поровняй блоки, контент плавает, с мобилки хуже".
   One column width for header, main and footer; one gutter; explicit
   behaviour at every breakpoint instead of whatever flex-wrap decided.
   ===================================================================== */
:root {
  --max: 860px;          /* the single content column – chrome and text */
  --gutter: 22px;        /* the single horizontal gutter */
  --ticker-h: 34px;
}

/* --- one column, one left edge ---------------------------------------- */
header.site .inner,
footer.site .inner,
main { max-width: var(--max); margin-left: auto; margin-right: auto; }

header.site { padding: 14px var(--gutter) 10px; }
footer.site { padding: 22px var(--gutter) 26px; }
main { padding: 34px var(--gutter) 64px; }

/* nothing may push the page sideways */
html, body { overflow-x: hidden; }
main img, main iframe, main video, main svg { max-width: 100%; }
main pre { overflow-x: auto; }

/* --- header rows: brand row, then nav row, both flush left ------------- */
header.site .inner { row-gap: 4px; column-gap: 16px; }
.tagline { flex: 1 1 auto; }
nav.site {
  flex-basis: 100%; margin-left: 0; margin-top: 4px;
  gap: 2px 16px; font-size: .88rem; align-items: center;
}
nav.site a { font-size: inherit; line-height: 1.9; white-space: nowrap; }

/* --- hero: a real grid, image first on narrow screens ------------------ */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr);
  align-items: start; gap: 32px; padding: 24px 0 4px;
}
/* the portrait column only exists where there is a portrait (ukraine.html has none) */
.hero:has(.portrait) { grid-template-columns: minmax(0, 1fr) auto; }
.hero .hero-text { flex: none; min-width: 0; }
.hero .portrait { width: 176px; height: 176px; margin-top: .5em; }
.lede { max-width: none; }
.btn { margin: 14px 10px 0 0; }

/* --- cards: never a stretched orphan, never a sideways overflow -------- */
.cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
}
.card { min-width: 0; }
.card p, .card blockquote { overflow-wrap: anywhere; }

/* --- tables keep their shape, scroll on their own if they must -------- */
table.simple, table.record { display: table; }
.recordbar .stat { gap: 14px; }

@media (max-width: 900px) {
  .hero { gap: 26px; }
  .hero .portrait { width: 150px; height: 150px; }
}

/* --- one-hand width ---------------------------------------------------- */
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  main { padding-top: 26px; }

  /* nav becomes a tidy two-column list – everything visible, nothing floats */
  nav.site {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    width: 100%; margin-top: 10px; border-top: 1px solid #2f2f2a;
  }
  nav.site > a, nav.site .navgroup > .navtop {
    display: block; width: 100%; padding: 9px 2px; line-height: 1.35;
    border-bottom: 1px solid #2f2f2a;
  }
  nav.site > a.here, nav.site .navgroup > .navtop.here { border-bottom-color: var(--gold); }
  nav.site > a:hover, nav.site .navgroup > .navtop:hover { border-bottom-color: #55554e; }
  /* no hover on a finger: the section pages list their own children */
  .navgroup .dropdown { display: none !important; }
  .navgroup .caret { display: none; }

  .hero, .hero:has(.portrait) { grid-template-columns: 1fr; gap: 14px; }
  .hero .portrait { order: -1; width: 124px; height: 124px; margin: 0 0 .2em; }
  h1 { font-size: 1.6rem; }
  .lede { font-size: 1.04rem; }
  .btn { display: block; width: 100%; text-align: center; margin: 10px 0 0; }

  .cards { grid-template-columns: 1fr; }

  table.simple, table.record { display: block; overflow-x: auto; font-size: .9rem; }
  table.simple th, table.record th,
  table.simple td, table.record td { padding: 8px 10px; }
  table.simple.steps th:first-child,
  table.simple.steps td:first-child { width: auto; min-width: 7em; }

  .recordbar .stat { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 11px 2px; }
  .recordbar .stat b { min-width: 0; text-align: left; }

  footer.site .inner { gap: 6px; }
  footer.site .inner span { flex: 1 1 100%; }
}

@media (max-width: 400px) {
  nav.site { grid-template-columns: 1fr; }
}

/* =====================================================================
   The wire – a CNN-style chyron with cyber threat headlines.
   Layout element on every page: fixed to the bottom, stepped motion,
   fed by /ticker.json (see Ассистент2/Промпт_Бегущая_Строка.md).
   ===================================================================== */
.wire {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--ticker-h);
  background: #07090b;
  border-top: 2px solid var(--gold);
  color: #d7ffe6;
  font-family: var(--mono);
  font-size: .78rem;
  display: flex; align-items: stretch;
  contain: content;
}
html.has-wire body { padding-bottom: var(--ticker-h); }

.wire-label {
  flex: 0 0 auto; display: flex; align-items: center; gap: 7px;
  background: var(--gold); color: #07090b;
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 0 10px; font-size: .72rem;
}
.wire-dot {
  width: 7px; height: 7px; background: #07090b; border-radius: 50%;
  animation: wire-blink 1.4s steps(1, end) infinite;
}
@keyframes wire-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

.wire-view { flex: 1 1 auto; overflow: hidden; position: relative; }
/* scanline + edge fade, the old-CRT part */
.wire-view::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #07090b 0, rgba(7,9,11,0) 26px),
    linear-gradient(270deg, #07090b 0, rgba(7,9,11,0) 26px),
    repeating-linear-gradient(180deg, rgba(255,255,255,.05) 0 1px, rgba(0,0,0,0) 1px 3px);
}
.wire-track {
  display: flex; align-items: center; height: 100%; width: max-content;
  white-space: nowrap; will-change: transform;
  /* movement is driven by ticker.js (stepped rAF loop), not CSS */
}

.wire-item {
  display: inline-flex; align-items: center; gap: 8px;
  color: #d7ffe6; text-decoration: none; padding: 0 4px;
}
.wire-item:hover { color: #fff; text-shadow: 0 0 6px rgba(215,255,230,.55); }
.wire-tag {
  color: #07090b; background: #6ee7a0; padding: 1px 6px;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
}
.wire-tag.kev { background: #ff6b5e; color: #0b0705; }
.wire-tag.cve { background: var(--gold); }
.wire-sep { color: #3f5a4b; padding: 0 14px; user-select: none; }
.wire-date {
  flex: 0 0 auto; display: flex; align-items: center; padding: 0 10px;
  color: #6d7f74; font-size: .68rem; letter-spacing: .08em; border-left: 1px solid #1d2a22;
}

@media (max-width: 640px) {
  :root { --ticker-h: 30px; }
  .wire { font-size: .72rem; }
  .wire-label { padding: 0 8px; font-size: .64rem; letter-spacing: .1em; }
  .wire-date { display: none; }
}
.wire-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media print {
  .wire { display: none; }
  html.has-wire body { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* the running strip is a deliberate signature element, so it keeps
     moving; only the gratuitous blink of the status dot is dropped */
  .wire-dot { animation: none; opacity: 1; }
}
