/* STD-002 — Стандарт визуальной публикации документов
   doc_id: STD-002 · v1.0 · approved 03.07.2026
   Автор: Гип · Утвердил: Олег
   Не изменять без нового STD или DEC.
*/

/* ═══════════════════════════════════════════════════════════════
   Жизнь по проекту · Единый стиль публикации документов
   Шрифты: Cormorant Garamond (заголовки) · Montserrat (текст)
   Палитра: forest + gold + cream
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --ink: #1c1917;
  --ink-soft: #44403c;
  --gold: #b8860b;
  --gold-light: #d4a853;
  --gold-pale: #f5ecd7;
  --cream: #faf8f4;
  --paper: #fffef9;
  --forest: #2c4a3e;
  --forest-mid: #3d5a4e;
  --forest-deep: #1a2f28;
  --line: rgba(184, 134, 11, 0.22);
  --line-solid: #e8e2d8;
  --shadow: rgba(26, 47, 40, 0.1);
  --pros-bg: #edf5f0;
  --cons-bg: #faf0ee;
  --pros-accent: #2c4a3e;
  --cons-accent: #9a4a3a;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Hero / Document header ── */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 3.5rem 2rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 168, 83, 0.14) 0%, transparent 55%),
    linear-gradient(175deg, var(--forest-deep) 0%, var(--forest) 50%, var(--forest-mid) 100%);
  color: #faf8f4;
  border-bottom: 3px solid var(--gold);
}

.hero--manifest {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4a853' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(212, 168, 83, 0.45);
  padding: 0.45rem 1.15rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(250, 248, 244, 0.82);
  margin-bottom: 1.5rem;
}

.ornament {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  margin: 1.5rem auto;
}

.hero-meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(250, 248, 244, 0.55);
  line-height: 2;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(212, 168, 83, 0.65);
  animation: hero-pulse 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes hero-pulse {
  0%, 100% { opacity: 0.45; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(5px); }
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
  text-align: left;
  font-size: 0.78rem;
}

.meta-item {
  background: rgba(255, 255, 255, 0.07);
  padding: 0.6rem 0.9rem;
  border-radius: 4px;
  border-left: 3px solid var(--gold-light);
}

.meta-item label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.15rem;
}

/* ── Layout ── */
.document {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Section cards (DEC, CON flow) */
section.card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 2rem 2.1rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 2px 12px var(--shadow);
}

/* Open sections (MAN flow) */
section.open {
  margin-bottom: 3.5rem;
}

.section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

section.card h2 {
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--gold-pale);
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest);
  margin: 1.5rem 0 0.65rem;
}

p {
  margin-bottom: 1.1rem;
  color: var(--ink-soft);
}

p.lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
}

p strong { color: var(--ink); font-weight: 600; }

ul, ol { margin: 0 0 1rem 1.4rem; color: var(--ink-soft); }
li { margin-bottom: 0.3rem; }

hr {
  border: none;
  border-top: 1px solid var(--line-solid);
  margin: 2rem 0;
}

/* ── Quotes ── */
blockquote,
.pullquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--gold-pale) 0%, #fff 100%);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 3px 16px var(--shadow);
  color: var(--forest-deep);
  font-weight: 500;
}

.pullquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
  color: var(--forest-deep);
  margin: 0;
}

.pullquote p + p { margin-top: 0.65rem; }

/* ── Meta box (CON inline) ── */
.meta-box {
  background: var(--gold-pale);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  border-radius: 0 6px 6px 0;
}

.meta-box p { margin: 0.2rem 0; color: var(--ink-soft); }
.meta-box strong { color: var(--ink); }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.15rem 0;
  font-size: 0.88rem;
}

th, td {
  border: 1px solid var(--line-solid);
  padding: 0.65rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--gold-pale);
  color: var(--forest);
  font-weight: 600;
}

.loss-table th {
  background: var(--forest-deep);
  color: #faf8f4;
}

.loss-table td:first-child {
  font-weight: 600;
  color: var(--forest);
  width: 38%;
}

.history-table { font-size: 0.82rem; }

/* ── Role cards ── */
.role-card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1.15rem 1.35rem;
  margin: 1rem 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.role-card h3 {
  margin-top: 0;
  color: var(--forest);
}

.role-card blockquote {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* ── Values grid ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.value-card {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  padding: 1.35rem 1rem;
  text-align: center;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.value-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}

.value-card span {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--forest);
}

/* ── Ecosystem list ── */
.ecosystem {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 1.25rem 0;
}

.ecosystem li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.ecosystem li::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Locale bar (STD-003) ── */
.locale-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-bottom: 1rem;
  min-height: 2rem;
}

.locale-bar[hidden] {
  display: none !important;
}

.locale-bar__link {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(212, 168, 83, 0.45);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.hero .locale-bar__link {
  color: #faf8f4;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(212, 168, 83, 0.5);
}

.locale-bar__link:hover {
  background: var(--gold-pale);
  color: var(--forest-deep);
}

.hero .locale-bar__link:hover {
  background: rgba(212, 168, 83, 0.25);
  color: #fff;
}

.locale-bar__link.is-active {
  background: var(--gold);
  color: var(--forest-deep);
  border-color: var(--gold);
  cursor: default;
  pointer-events: none;
}

.hero .locale-bar__link.is-active {
  background: var(--gold-light);
  color: var(--forest-deep);
}

.draft-banner {
  background: #fff8e6;
  border: 1px solid #e6d4a8;
  color: #7a5c00;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ── Lists ── */
.dont-list,
.problem-list {
  list-style: none;
  margin: 1rem 0;
}

.dont-list li,
.problem-list li {
  padding: 0.75rem 0 0.75rem 1.75rem;
  border-bottom: 1px solid var(--line-solid);
  color: var(--ink-soft);
  position: relative;
}

.dont-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.problem-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* ── Motto ── */
.motto {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
  background: var(--forest-deep);
  color: #faf8f4;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212, 168, 83, 0.2);
}

.motto::before {
  content: '"';
  position: absolute;
  top: -0.15em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: 7rem;
  color: rgba(212, 168, 83, 0.1);
  line-height: 1;
}

.motto-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.motto p {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.55;
  color: #faf8f4;
  margin: 0;
  position: relative;
}

/* ── Conclusion ── */
.conclusion {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--line-solid);
  border-bottom: 1px solid var(--line-solid);
}

.conclusion p {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  line-height: 1.6;
  color: var(--forest-deep);
  max-width: 600px;
  margin: 0 auto;
}

.conclusion strong { color: var(--gold); font-weight: 700; }

/* ── Timeline ── */
.timeline {
  list-style: none;
  margin: 1.25rem 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--gold);
}

.timeline li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.1rem;
  color: var(--ink-soft);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.75rem;
  width: 9px;
  height: 9px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
}

/* ── Variants (DEC) ── */
.variant {
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
}

.variant-header {
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--cream);
  border-bottom: 1px solid var(--line-solid);
  color: var(--forest-deep);
}

.variant-header.chosen {
  background: var(--gold-pale);
  border-bottom-color: rgba(184, 134, 11, 0.3);
  color: var(--forest);
}

.variant-header.chosen::after {
  content: ' ← принят';
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--gold);
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pros, .cons {
  padding: 1rem 1.2rem;
  font-size: 0.84rem;
}

.pros {
  background: var(--pros-bg);
  border-right: 1px solid var(--line-solid);
}

.cons { background: var(--cons-bg); }

.pros h4, .cons h4 {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.45rem;
  font-family: var(--font-sans);
}

.pros h4 { color: var(--pros-accent); }
.cons h4 { color: var(--cons-accent); }

.pros ul, .cons ul { margin-left: 1rem; color: var(--ink-soft); }

.variant-body {
  padding: 1rem 1.2rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-solid);
}

/* ── Tags ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.65rem 0;
}

.tag {
  font-size: 0.72rem;
  padding: 0.22rem 0.6rem;
  background: var(--gold-pale);
  color: var(--forest);
  border-radius: 3px;
  font-weight: 500;
  border: 1px solid var(--line);
}

/* ── Decision box ── */
.decision-box {
  background: linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 100%);
  color: #faf8f4;
  padding: 1.65rem 1.85rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid var(--gold);
}

.decision-box p {
  color: rgba(250, 248, 244, 0.92);
  margin: 0;
}

.decision-box strong { color: var(--gold-light); }

.decision-box p + p { margin-top: 0.65rem; }

/* ── Goals ── */
.goals {
  list-style: none;
  counter-reset: goal;
}

.goals li {
  counter-increment: goal;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line-solid);
  color: var(--ink-soft);
}

.goals li::before {
  content: counter(goal);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: var(--gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Checklist ── */
.checklist {
  list-style: none;
  margin: 1rem 0;
}

.checklist li {
  padding: 0.55rem 0 0.55rem 1.85rem;
  position: relative;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line-solid);
}

.checklist li::before {
  content: '☐';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 1rem;
}

/* ── Footer ── */
.doc-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-solid);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.doc-footer h3 {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.doc-signature,
.page-footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(68, 64, 60, 0.55);
}

/* ── CON single-page layout ── */
.page-single {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  padding: 0 0 3rem;
  box-shadow: 0 4px 32px var(--shadow);
}

.page-single .document {
  padding: 2.5rem 2.5rem 3rem;
}

.page-single .hero {
  border-radius: 0;
}

/* ── DIA-000 Летопись (STD-002 §7) ── */
.hero--letopis {
  padding: 4rem 2rem 3.5rem;
}

.hero--letopis .hero-sub {
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

.letopis-book .document {
  max-width: 920px;
}

.letopis-intro {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: 0 2px 12px var(--shadow);
}

.letopis-intro a {
  color: var(--forest);
  font-weight: 600;
}

.letopis-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: -0.5rem 0 1.25rem;
  line-height: 1.45;
}

.letopis-shell {
  display: grid;
  grid-template-columns: minmax(88px, 110px) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line-solid);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  margin-bottom: 2rem;
  min-height: 420px;
}

.letopis-year-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-solid);
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}

.letopis-year-panel .panel-label {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  padding: 0.75rem 0.5rem 0.45rem;
  text-align: center;
}

.letopis-main { min-width: 0; padding: 0 0 0.5rem; }

.letopis-shell .year-wheel {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.letopis-shell .year-wheel__scroller {
  height: 100%;
  max-height: 360px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.letopis-shell .year-wheel__scroller::-webkit-scrollbar { display: none; }

.letopis-shell .year-wheel__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.letopis-shell .year-wheel__list > li {
  height: 56px;
  margin: 0;
  padding: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.letopis-shell .year-wheel__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink-soft);
  opacity: 0.45;
  transition: font-size 0.28s ease, opacity 0.28s ease, color 0.28s ease;
}

.letopis-shell .year-wheel__item.is-active {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--forest-deep);
  opacity: 1;
}

.letopis-shell .year-wheel__hint {
  flex-shrink: 0;
  font-size: 0.55rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0.35rem 0.25rem 0.5rem;
  opacity: 0.65;
}

.letopis-shell .letopis-toc {
  margin: 1.25rem 1.5rem 0.75rem;
  border-radius: 8px;
}

.letopis-shell #letopis-entries {
  padding: 0 1.5rem 1.5rem;
}

.letopis-toc {
  background: var(--gold-pale);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.letopis-toc h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--forest-deep);
  margin-bottom: 0.75rem;
}

.letopis-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.letopis-toc li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
}

.letopis-toc li:last-child { border-bottom: none; }

.letopis-toc a {
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.letopis-toc a:hover { color: var(--gold); }

.letopis-toc .toc-date-primary {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 0.15rem;
}

.letopis-toc .toc-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--forest);
  line-height: 1.35;
}

.letopis-toc .toc-id {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
  font-weight: 400;
}

.letopis-toc .toc-date {
  float: right;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.letopis-toc li.letopis-hidden { display: none; }

/* Панель фильтров */
.letopis-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(26, 47, 40, 0.08);
}

.letopis-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.letopis-toolbar label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
  display: block;
  margin-bottom: 0.2rem;
}

.letopis-field { flex: 1 1 140px; min-width: 0; }

.letopis-field--search { flex: 2 1 200px; }

.letopis-field input,
.letopis-field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-solid);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

.letopis-field input:focus,
.letopis-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15);
}

.letopis-count {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
  white-space: nowrap;
  padding: 0.5rem 0.25rem;
}

.letopis-reset {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-solid);
  border-radius: 6px;
  background: var(--paper);
  color: var(--forest);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.letopis-reset:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.letopis-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--gold-pale);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.letopis-empty.letopis-hidden { display: none; }

.letopis-entry.letopis-hidden { display: none; }

.letopis-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.letopis-entry-tags .tag {
  font-size: 0.65rem;
  cursor: pointer;
  transition: background 0.15s;
}

.letopis-entry-tags .tag:hover {
  background: var(--forest);
  color: var(--cream);
}

.letopis-entry {
  background: var(--paper);
  border: 1px solid var(--line-solid);
  border-radius: 8px;
  padding: 0;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 16px var(--shadow);
  border-top: 4px solid var(--gold);
  overflow: hidden;
}

.letopis-entry-header {
  background: linear-gradient(135deg, var(--gold-pale) 0%, var(--paper) 100%);
  padding: 1.5rem 2rem 1.25rem;
  border-bottom: 1px solid var(--line-solid);
}

.letopis-entry-date {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--forest-deep);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.letopis-entry-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

.letopis-entry-number {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.letopis-entry-id {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

.letopis-entry-id:hover {
  color: var(--forest-deep);
}

.letopis-entry-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.letopis-entry-meta a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.letopis-entry-body {
  padding: 2rem 2.1rem 2.25rem;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.letopis-entry-body h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-deep);
  margin: 1.75rem 0 1rem;
  line-height: 1.35;
}

.letopis-entry-body h2:first-child { margin-top: 0; }

.letopis-entry-body p {
  margin-bottom: 1rem;
}

.letopis-entry-body p:last-child { margin-bottom: 0; }

.letopis-entry-body strong { color: var(--ink); }

.letopis-day-summary {
  background: var(--gold-pale);
  border-radius: 8px;
  padding: 1rem 1.15rem 1.05rem;
  margin-top: 1.35rem;
  border-left: 4px solid var(--gold);
  max-width: 100%;
}

.letopis-day-summary h2 {
  margin-top: 0 !important;
  margin-bottom: 0.65rem !important;
  font-size: 0.95rem !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold) !important;
}

.letopis-day-summary dl { margin: 0; }

.letopis-day-summary dt {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
  margin-top: 0.65rem;
}

.letopis-day-summary dt:first-child { margin-top: 0; }

.letopis-day-summary dd {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.letopis-day-summary dd strong {
  font-weight: 600;
  color: var(--ink);
}

.letopis-entry-body ul {
  margin: 0.75rem 0 1rem 1.25rem;
}

.letopis-entry-body li { margin-bottom: 0.35rem; }

/* ── Print & responsive ── */
@media print {
  body { background: white; }
  .hero { min-height: auto !important; page-break-after: avoid; }
  .hero-scroll { display: none; }
  section.card { box-shadow: none; break-inside: avoid; }
  .value-card:hover { transform: none; box-shadow: none; }
  .page-single { box-shadow: none; }
  .letopis-entry { break-inside: avoid; box-shadow: none; }
  .letopis-toolbar { display: none; }
  .letopis-hint { display: none; }
  .letopis-year-panel { display: none; }
  .letopis-shell { display: block; border: none; }
  .letopis-empty { display: none; }
}

@media (max-width: 600px) {
  .document { padding: 2rem 1.15rem 3.5rem; }
  .page-single .document { padding: 1.75rem 1.25rem 2rem; }
  section.card { padding: 1.5rem; }
  .pros-cons { grid-template-columns: 1fr; }
  .pros { border-right: none; border-bottom: 1px solid var(--line-solid); }
  .doc-footer { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .letopis-entry-body { padding: 1.5rem 1.25rem; }
  .letopis-entry-header { padding: 1.25rem 1.25rem 1rem; }
  .letopis-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .letopis-year-panel {
    border-right: none;
    border-bottom: 1px solid var(--line-solid);
    max-height: 200px;
  }
  .letopis-shell .year-wheel__scroller { max-height: 140px; }
  .letopis-shell .letopis-toc,
  .letopis-shell #letopis-entries {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .letopis-toolbar-row { flex-direction: column; align-items: stretch; }
  .letopis-field { flex: 1 1 auto; }
  .letopis-count { text-align: center; padding: 0.25rem; }
}
