@import url("https://fonts.googleapis.com/css2?family=Syne:wght@500;700;800&family=Literata:opsz,wght@7..72,400;7..72,600;7..72,700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --ink: #06141c;
  --ink-2: #0d2430;
  --paper: #e7eef3;
  --paper-2: #d5e2ea;
  --blue: #1578b8;
  --blue-deep: #0a4f7a;
  --bg-green: #00966e;
  --bg-red: #c8102e;
  --muted: #5a7380;
  --line: rgba(6, 20, 28, 0.12);
  --glow: rgba(21, 120, 184, 0.35);
  --reader: #0c1820;
  --reader-ink: #e8f0f5;
  --reader-muted: #8aa0ae;
  --reader-line: rgba(232, 240, 245, 0.12);
  --cabinet: #0a141c;
  --cabinet-ink: #e4edf3;
  --cabinet-muted: #7f96a6;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(21, 120, 184, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(0, 150, 110, 0.12), transparent 50%),
    linear-gradient(180deg, #dfeaf1 0%, var(--paper) 35%, #edf3f7 100%);
  font-family: "Literata", Georgia, serif;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(21, 120, 184, 0.18);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

a {
  color: var(--blue-deep);
}

/* —— HERO —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 20, 28, 0.25) 0%, rgba(6, 20, 28, 0.55) 45%, rgba(6, 20, 28, 0.92) 100%),
    linear-gradient(90deg, rgba(200, 16, 46, 0.18), transparent 35%, rgba(0, 150, 110, 0.15));
}

.hero__stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #fff 0 33%, var(--bg-green) 33% 66%, var(--bg-red) 66%);
  z-index: 2;
  animation: stripeIn 1.1s var(--ease) both;
}

@keyframes stripeIn {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
  }
}

.hero__inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 4.5rem;
  color: #f4f8fb;
}

.hero__brand {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 14ch;
  text-wrap: balance;
  animation: rise 0.9s var(--ease) 0.15s both;
}

.hero__lead {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  max-width: 36ch;
  margin: 0 0 1.75rem;
  color: rgba(244, 248, 251, 0.88);
  animation: rise 0.9s var(--ease) 0.3s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.25rem;
  animation: rise 0.9s var(--ease) 0.45s both;
}

.hero__archive-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.btn--archive {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}

.archive-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  pointer-events: none;
  max-width: 11rem;
  text-align: center;
}

.archive-hint__arrow {
  display: block;
  transform: rotate(-8deg);
  opacity: 0.95;
}

.archive-hint__text {
  margin: 0;
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #ffd0d4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

@media (max-width: 720px) {
  .hero__archive-wrap {
    align-items: flex-start;
  }

  .archive-hint {
    align-items: flex-start;
    text-align: left;
    max-width: 14rem;
  }

  .archive-hint__arrow {
    margin-left: 1.4rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
  touch-action: manipulation;
}

.btn:hover {
  transform: translateY(-2px);
}

@media (hover: none) {
  .btn:hover {
    transform: none;
  }
}

.btn--solid {
  background: #fff;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}

/* —— LAYOUT —— */
.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section {
  padding: 4rem 0 2rem;
}

.section__head {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  max-width: 52ch;
}

.section__head h2 {
  font-family: "Syne", system-ui, sans-serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0;
  color: var(--muted);
}

.disclaimer {
  padding: 1.1rem 1.25rem;
  background: rgba(200, 16, 46, 0.08);
  border-left: 4px solid var(--bg-red);
  color: var(--ink-2);
  font-size: 0.98rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.stat {
  padding: 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 3px solid var(--blue);
}

.stat b {
  display: block;
  font-family: "Syne", system-ui, sans-serif;
  font-size: 1.7rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* —— MATRIX voice × year —— */
.matrix-wrap {
  display: grid;
  gap: 0.65rem;
}

.matrix {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.matrix table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.matrix th,
.matrix td {
  border: 1px solid var(--line);
  padding: 0;
  text-align: center;
}

.matrix th {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  background: rgba(6, 20, 28, 0.06);
  color: var(--ink-2);
  padding: 0.45rem 0.35rem;
  white-space: nowrap;
}

.matrix th.matrix__corner {
  text-align: left;
  padding-left: 0.65rem;
  min-width: 9.5rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #eef4f8;
}

.matrix th.matrix__row {
  text-align: left;
  padding: 0.35rem 0.65rem;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f3f7fa;
  font-size: 0.78rem;
}

.matrix__cell {
  appearance: none;
  border: 0;
  width: 100%;
  min-width: 2.6rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  background: transparent;
  transition: background 0.15s var(--ease), color 0.15s, transform 0.15s;
}

.matrix__cell:hover {
  transform: scale(1.04);
  background: rgba(21, 120, 184, 0.18);
}

.matrix__cell.is-on {
  background: var(--ink);
  color: #fff;
}

.matrix__cell[data-heat="0"] {
  color: var(--muted);
  cursor: default;
}

.matrix__cell[data-heat="1"] {
  background: rgba(21, 120, 184, 0.12);
}
.matrix__cell[data-heat="2"] {
  background: rgba(21, 120, 184, 0.28);
}
.matrix__cell[data-heat="3"] {
  background: rgba(0, 150, 110, 0.35);
}
.matrix__cell[data-heat="4"] {
  background: rgba(200, 16, 46, 0.38);
  color: #fff;
}

.matrix__cell.is-on[data-heat] {
  background: var(--ink);
  color: #fff;
}

.matrix-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.matrix__clear {
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: var(--ink-2);
  margin-left: 0.5rem;
}

/* —— CABINET archive —— */
.cabinet {
  background:
    linear-gradient(180deg, rgba(10, 20, 28, 0.97), var(--cabinet)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(255, 255, 255, 0.015) 28px
    );
  color: var(--cabinet-ink);
  padding-top: 3.5rem;
  margin-top: 1rem;
  box-shadow: inset 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cabinet .section__head h2 {
  color: #fff;
}

.cabinet .section__head p,
.cabinet .countline,
.cabinet .tr-banner {
  color: var(--cabinet-muted);
}

.cabinet .tr-banner {
  background: rgba(0, 150, 110, 0.15);
  border-left-color: var(--bg-green);
}

.cabinet .toolbar {
  background: rgba(6, 14, 20, 0.92);
  border-bottom-color: var(--reader-line);
}

.cabinet input[type="search"],
.cabinet select {
  background: #14232e;
  border-color: var(--reader-line);
  color: var(--cabinet-ink);
}

.cabinet .chip {
  color: var(--cabinet-ink);
  box-shadow: inset 0 0 0 1px var(--reader-line);
}

.cabinet .chip.is-on {
  background: #fff;
  color: var(--ink);
}

.cabinet .tog {
  color: var(--cabinet-ink);
}

.cabinet .item {
  border-top-color: var(--reader-line);
  color: var(--cabinet-ink);
}

.cabinet .item:hover,
.cabinet .item.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.cabinet .item__title {
  color: #fff;
}

.cabinet .item__sum {
  color: var(--cabinet-muted);
}

.cabinet .item__meta {
  color: var(--cabinet-muted);
}

.cabinet .item__open {
  color: #7ec8f0;
}

.cabinet .tag {
  background: #1a2c3a;
  color: var(--cabinet-ink);
}

.cabinet .item__tier {
  color: #7ec8f0;
}
.cabinet .item__tier[data-tier="B"] {
  color: #3dcc9a;
}
.cabinet .item__tier[data-tier="C"] {
  color: var(--cabinet-muted);
}
.cabinet .item__tier[data-tier="D"] {
  color: #f07178;
}

/* —— FILTERS —— */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(231, 238, 243, 0.88);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  margin: 0 0 1.5rem;
}

.toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

input[type="search"],
select {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.65rem 0.8rem;
  min-width: 0;
}

input[type="search"] {
  flex: 1 1 220px;
}

select {
  flex: 0 1 160px;
}

.chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.chip {
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--ink-2);
}

.chip.is-on {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

.countline {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

/* —— LIST —— */
.list {
  display: grid;
  gap: 0;
}

.item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1rem;
  padding: 1.15rem 0.25rem;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s var(--ease), padding 0.2s var(--ease);
  text-align: left;
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  color: inherit;
}

.item:hover,
.item.is-active {
  background: rgba(255, 255, 255, 0.65);
  padding-left: 0.6rem;
}

.item__tier {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--blue-deep);
}

.item__tier[data-tier="B"] {
  color: var(--bg-green);
}
.item__tier[data-tier="C"] {
  color: var(--muted);
}
.item__tier[data-tier="D"] {
  color: var(--bg-red);
}

.item__meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.item__title {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.015em;
}

.item__sum {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  background: var(--paper-2);
  padding: 0.15rem 0.4rem;
}

.item__open {
  align-self: center;
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-deep);
}

@media (max-width: 640px) {
  .item {
    grid-template-columns: 48px 1fr;
  }
  .item__open {
    display: none;
  }
}

/* —— READER (dark dossier) —— */
.reader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(2, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.reader.is-open {
  display: grid;
  place-items: center;
  animation: fade 0.25s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reader__panel {
  width: min(1040px, 100%);
  max-height: min(94vh, 980px);
  background:
    linear-gradient(180deg, #12202a 0%, var(--reader) 28%),
    var(--reader);
  color: var(--reader-ink);
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  animation: panelIn 0.35s var(--ease);
  border: 1px solid var(--reader-line);
}

@keyframes panelIn {
  from {
    transform: translateY(24px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.reader__ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.55rem 1.25rem;
  background: #061018;
  border-bottom: 1px solid var(--reader-line);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--reader-muted);
}

.reader__ribbon .rib {
  padding: 0.2rem 0.45rem;
  background: #1a2c38;
  color: var(--reader-ink);
}

.reader__ribbon .rib--tier {
  background: var(--blue-deep);
  color: #fff;
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
}

.reader__ribbon .rib--voice[data-v="afd_official"] {
  background: var(--bg-red);
  color: #fff;
}
.reader__ribbon .rib--voice[data-v="afd_internal"] {
  background: var(--bg-green);
  color: #fff;
}
.reader__ribbon .rib--voice[data-v="presselage"] {
  background: var(--blue);
  color: #fff;
}
.reader__ribbon .rib--voice[data-v="citizen"] {
  background: #4a5f6c;
  color: #fff;
}

.reader__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--reader-line);
}

.reader__docno {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #7ec8f0;
  margin-bottom: 0.35rem;
}

.reader__top h3 {
  font-family: "Syne", system-ui, sans-serif;
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.reader .item__meta {
  color: var(--reader-muted);
}

.reader__close {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  border: 0;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.reader .btn-mini {
  background: #1e3544;
  color: #fff;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.6rem 1.25rem 0;
  border-bottom: 1px solid var(--reader-line);
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0e1a22;
}

.tab {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  border: 0;
  background: transparent;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  color: var(--reader-muted);
  border-bottom: 2px solid transparent;
}

.tab.is-on {
  color: #fff;
  border-bottom-color: #7ec8f0;
}

.reader__body {
  overflow: auto;
  padding: 1.25rem 1.35rem 2rem;
  flex: 1;
  color: var(--reader-ink);
}

.reader__body pre,
.reader__body .orig {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Literata", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0;
  color: var(--reader-ink);
}

.reader .tr-banner {
  background: rgba(0, 150, 110, 0.18);
  color: var(--reader-ink);
  border-left-color: var(--bg-green);
}

.reader blockquote {
  border-left-color: #7ec8f0 !important;
  color: var(--reader-muted) !important;
}

.meta-grid {
  display: grid;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.meta-grid div {
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--reader-line);
}

.meta-grid b {
  font-family: "Syne", system-ui, sans-serif;
  display: block;
  font-size: 0.78rem;
  color: var(--reader-muted);
  margin-bottom: 0.15rem;
}

.dossier-grid {
  display: grid;
  gap: 0.75rem;
}

.dossier {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.dossier:hover h3 {
  color: var(--blue-deep);
}

.dossier h3 {
  font-family: "Syne", system-ui, sans-serif;
  margin: 0;
  font-size: 1.2rem;
}

.ideas {
  display: grid;
  gap: 0.9rem;
  counter-reset: idea;
}

.idea {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.idea::before {
  counter-increment: idea;
  content: counter(idea);
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--blue);
  line-height: 1;
}

.idea h3 {
  font-family: "Syne", system-ui, sans-serif;
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.idea p {
  margin: 0;
  color: var(--muted);
}

/* —— TIMELINE —— */
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid var(--blue);
}

.tl-item {
  position: relative;
  padding: 0 0 1.5rem 1.25rem;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--bg-green);
  box-shadow: 0 0 0 3px var(--paper);
}

.tl-item:hover .tl-year {
  color: var(--blue-deep);
}

.tl-year {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 0.2rem;
}

.tl-title {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.tl-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tl-cta {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-deep);
}

.tl-item.is-on {
  background: rgba(21, 120, 184, 0.08);
}

.tl-item.is-on::before {
  background: var(--blue);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.25rem 0 0.5rem;
}

.pager__n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  color: var(--cabinet-muted);
}

.cabinet .pager .btn-mini {
  background: #1e3544;
}

.btn-mini {
  font-family: "Syne", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn-mini--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.voice-badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  padding: 0.12rem 0.35rem;
  background: var(--ink);
  color: #fff;
  margin-right: 0.35rem;
}

.voice-badge[data-v="citizen"] {
  background: var(--muted);
}
.voice-badge[data-v="presselage"] {
  background: var(--blue-deep);
}
.voice-badge[data-v="afd_official"] {
  background: var(--bg-red);
}
.voice-badge[data-v="afd_internal"] {
  background: var(--bg-green);
}

.parallel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-height: 200px;
  align-items: start;
}

.parallel__col {
  background: #14232e;
  padding: 0;
  border-top: 3px solid #7ec8f0;
  max-height: 58vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.parallel__col:last-child {
  border-top-color: var(--bg-green);
}

.parallel__col h4 {
  font-family: "Syne", system-ui, sans-serif;
  margin: 0;
  font-size: 0.85rem;
  color: var(--reader-muted);
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1a2c38;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--reader-line);
}

.parallel__col .orig {
  padding: 0.85rem;
}

.reader__actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.tog {
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.tr-banner {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 150, 110, 0.12);
  border-left: 3px solid var(--bg-green);
  font-size: 0.9rem;
  color: var(--ink-2);
}

.bg-pill {
  font-family: "Syne", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--bg-green);
  color: #fff;
  padding: 0.12rem 0.4rem;
  margin-left: 0.35rem;
}

.doc-mini {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #7ec8f0;
  margin-right: 0.35rem;
}

.cabinet .doc-mini {
  color: #7ec8f0;
}

.parallel__col h4 .swap {
  float: right;
  font-size: 0.75rem;
  cursor: pointer;
  color: #7ec8f0;
  border: 0;
  background: none;
  font-family: inherit;
  font-weight: 700;
}

.orig--bg {
  font-size: 1.05rem;
  line-height: 1.65;
}

@media (max-width: 720px) {
  .parallel {
    grid-template-columns: 1fr;
  }

  .wrap,
  .hero__inner {
    width: min(var(--max), calc(100% - 1.25rem));
  }

  .hero {
    min-height: 100svh;
  }

  .hero__inner {
    padding: max(0.5rem, env(safe-area-inset-top)) 0
      max(2.75rem, env(safe-area-inset-bottom));
  }

  .hero__brand {
    font-size: clamp(2.05rem, 10.5vw, 3.1rem);
    max-width: none;
  }

  .hero__lead {
    max-width: none;
    font-size: 1.02rem;
    margin-bottom: 1.35rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero__cta > .btn {
    width: 100%;
    text-align: center;
    min-height: 48px;
    display: grid;
    place-items: center;
  }

  .hero__archive-wrap {
    width: 100%;
    align-items: center;
  }

  .archive-hint {
    align-items: center;
    text-align: center;
    max-width: 16rem;
  }

  .archive-hint__arrow {
    margin-left: 0;
    width: 56px;
    height: 44px;
  }

  .section {
    padding: 2.75rem 0 1.35rem;
  }

  .section__head {
    max-width: none;
    margin-bottom: 1.25rem;
  }

  .disclaimer {
    font-size: 0.92rem;
    padding: 0.95rem 1rem;
  }

  .toolbar {
    top: env(safe-area-inset-top, 0);
    padding: 0.7rem 0;
    margin-bottom: 1rem;
  }

  .toolbar__row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  input[type="search"],
  select {
    width: 100%;
    flex: 1 1 auto;
    min-height: 44px;
    font-size: 16px; /* iOS: без auto-zoom */
  }

  .tog {
    min-height: 44px;
    white-space: normal;
  }

  .chip {
    min-height: 40px;
    padding: 0.5rem 0.8rem;
    touch-action: manipulation;
  }

  .chiprow {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -0.625rem;
    padding-inline: 0.625rem;
    gap: 0.45rem;
  }

  .chiprow::-webkit-scrollbar {
    display: none;
  }

  .chiprow .chip {
    flex: 0 0 auto;
  }

  .item {
    grid-template-columns: 40px 1fr;
    gap: 0.7rem;
    padding: 1rem 0.05rem;
  }

  .item__tier {
    font-size: 1.2rem;
  }

  .item__title {
    font-size: 0.98rem;
  }

  .item__sum {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .item__open {
    display: none;
  }

  .matrix {
    -webkit-overflow-scrolling: touch;
    margin-inline: -0.625rem;
    border-left: 0;
    border-right: 0;
  }

  .matrix th.matrix__corner,
  .matrix th.matrix__row {
    min-width: 7.5rem;
    font-size: 0.68rem;
  }

  .matrix__cell {
    min-width: 2.8rem;
    min-height: 2.6rem;
  }

  .timeline {
    padding-left: 1rem;
  }

  .tl-item {
    padding-left: 0.95rem;
    padding-bottom: 1.25rem;
  }

  .tl-item::before {
    left: -1.3rem;
  }

  .cabinet {
    padding-top: 2.5rem;
  }

  /* Reader: full-bleed sheet on phones */
  .reader {
    padding: 0;
  }

  .reader.is-open {
    place-items: stretch;
  }

  .reader__panel {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .reader__ribbon {
    padding: 0.45rem 0.85rem;
    padding-top: max(0.45rem, env(safe-area-inset-top));
    gap: 0.3rem;
  }

  .reader__top {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0.7rem;
    align-items: center;
  }

  .reader__idblock {
    flex: 1 1 12rem;
    min-width: 0;
  }

  .reader__top h3 {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .reader__close {
    min-height: 44px;
    min-width: 5.5rem;
    flex: 0 0 auto;
    touch-action: manipulation;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.4rem 0.65rem 0;
    gap: 0;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
    touch-action: manipulation;
  }

  .reader__body {
    padding: 1rem 1rem max(1.75rem, env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .reader__body pre,
  .reader__body .orig {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .parallel__col {
    max-height: min(48vh, 420px);
  }

  .pager {
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }

  .pager .btn-mini {
    min-height: 44px;
    min-width: 44px;
    padding: 0.55rem 0.9rem;
    touch-action: manipulation;
  }

  .footer {
    padding: 2.25rem 0 max(3rem, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .hero__brand {
    font-size: clamp(1.85rem, 11vw, 2.4rem);
  }

  .archive-hint__text {
    font-size: 0.75rem;
  }

  .stats {
    gap: 0.5rem;
  }

  .stat {
    padding: 0.8rem 0.65rem;
  }

  .stat b {
    font-size: 1.35rem;
  }

  .tab {
    font-size: 0.78rem;
    padding: 0.65rem 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.footer {
  padding: 3rem 0 4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .stripe {
  height: 4px;
  width: 120px;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #fff, var(--bg-green), var(--bg-red));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.loading {
  padding: 3rem 0;
  font-family: "Syne", system-ui, sans-serif;
}
