/* ============================================================
   Ритм — редакционный портал о времени
   ============================================================ */

:root {
  --paper: #faf7f1;
  --paper-2: #f4efe5;
  --paper-3: #ece5d7;
  --card: #fffdf9;
  --ink: #23211c;
  --ink-2: #4b463d;
  --muted: #7d7669;
  --line: #e6ded1;
  --line-2: #d7cbb9;
  --green: #2f5d50;
  --green-2: #3d7364;
  --green-soft: #e8efe9;
  --green-ink: #234a40;
  --clay: #b5652f;
  --clay-soft: #f6e8db;
  --yellow-soft: #f7efdc;
  --danger: #9a443b;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', 'PT Serif', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 18px 40px -24px rgba(46, 38, 24, 0.35);
  --shadow-sm: 0 8px 20px -14px rgba(46, 38, 24, 0.35);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #141513;
    --paper-2: #1a1b18;
    --paper-3: #232420;
    --card: #1c1d1a;
    --ink: #ede9e0;
    --ink-2: #c6c0b4;
    --muted: #948d7f;
    --line: #2e2f2a;
    --line-2: #3b3c35;
    --green: #8cbfa9;
    --green-2: #79ab96;
    --green-soft: #22302b;
    --green-ink: #bfe0d2;
    --clay: #d18a55;
    --clay-soft: #33261c;
    --yellow-soft: #2b2619;
    --danger: #e08a80;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
    --shadow-sm: 0 8px 20px -14px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper: #141513;
  --paper-2: #1a1b18;
  --paper-3: #232420;
  --card: #1c1d1a;
  --ink: #ede9e0;
  --ink-2: #c6c0b4;
  --muted: #948d7f;
  --line: #2e2f2a;
  --line-2: #3b3c35;
  --green: #8cbfa9;
  --green-2: #79ab96;
  --green-soft: #22302b;
  --green-ink: #bfe0d2;
  --clay: #d18a55;
  --clay-soft: #33261c;
  --yellow-soft: #2b2619;
  --danger: #e08a80;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --shadow-sm: 0 8px 20px -14px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: var(--green-soft);
  color: var(--green-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

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

:focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--green);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 200;
}

.skip-link:focus {
  left: 12px;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.progress.is-visible {
  opacity: 1;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green-2);
  transform-origin: 0 50%;
}

/* -------------------------------- шапка ------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.logo__mark {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 22px;
  padding: 4px 7px;
  background: var(--green);
  border-radius: 7px;
}

.logo__mark span {
  display: block;
  width: 2.5px;
  border-radius: 2px;
  background: var(--paper);
  height: 6px;
}

.logo__mark span:nth-child(2) {
  height: 11px;
}

.logo__mark span:nth-child(3) {
  height: 14px;
}

.logo__mark span:nth-child(4) {
  height: 8px;
}

.logo__text {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s;
}

.nav__link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.nav__link.is-active {
  color: var(--green);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.search-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  color: var(--muted);
  transition: border-color 0.16s, box-shadow 0.16s;
}

.search-mini:focus-within {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.search-mini input {
  width: 128px;
  border: none;
  outline: none;
  background: none;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
}

.search-mini input::placeholder {
  color: var(--muted);
}

.search-mini button {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--ink-2);
  transition: background 0.16s, color 0.16s;
}

.icon-btn:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.theme-icon {
  display: none;
}

.theme-icon--moon {
  display: block;
}

:root[data-theme='dark'] .theme-icon--moon {
  display: none;
}

:root[data-theme='dark'] .theme-icon--sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon--moon {
    display: none;
  }

  :root:not([data-theme='light']) .theme-icon--sun {
    display: block;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.1s;
}

.btn:active {
  transform: translateY(0.5px);
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: var(--green-2);
}

.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--paper-2);
}

.btn--lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15.5px;
}

.btn--telegram {
  border: 1px solid var(--line-2);
  height: 34px;
  padding: 0 13px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.btn--telegram:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.menu-btn {
  display: none;
}

/* -------------------------------- главная ----------------------------- */

.main {
  min-height: 60vh;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 76px 28px 30px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 18px;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero__title em {
  font-style: italic;
  color: var(--green);
}

.hero__lead {
  margin-top: 22px;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.hero__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 24px 18px;
  box-shadow: var(--shadow);
  position: relative;
}

.hero__card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto;
  height: 5px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--green), var(--clay));
  opacity: 0.85;
}

.hero__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hero__card-label {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__card-time {
  font-size: 12px;
  color: var(--muted);
}

.start-list {
  list-style: none;
  padding: 6px 0 2px;
}

.start-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.start-list li:last-child {
  border-bottom: none;
}

.start-list__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 11.5px;
  font-weight: 700;
}

.start-list a {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
}

.start-list a:hover {
  color: var(--green);
}

.start-list__time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 4px;
}

.hero__card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}

.hero__card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------- секции ------------------------------- */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px;
}

.section--tight {
  padding-top: 26px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section__title {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}

.section__link:hover {
  color: var(--green);
}

.section__hint {
  font-size: 13px;
  color: var(--muted);
}

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

.cat-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}

.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.cat-card__emoji {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat) 14%, transparent);
  font-size: 20px;
}

.cat-card__title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cat-card__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-card__count {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

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

.post-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.post-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.post-card__emoji {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--cat) 13%, transparent);
  font-size: 21px;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.post-card__meta {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card__title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-card:hover .post-card__title {
  color: var(--green);
}

.post-card__summary {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__arrow {
  align-self: center;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s, transform 0.18s;
}

.post-card:hover .post-card__arrow {
  opacity: 1;
  transform: none;
}

.post-card--compact {
  padding: 13px 16px;
  align-items: center;
  gap: 12px;
}

.post-card--compact .post-card__emoji {
  width: 32px;
  height: 32px;
  font-size: 16px;
  border-radius: 9px;
}

.post-card--compact .post-card__title {
  font-size: 16.5px;
}

.post-card--compact .post-card__meta {
  display: none;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-list--wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px 40px;
}

.quote-band {
  max-width: 1180px;
  margin: 8px auto;
  padding: 0 28px;
}

.quote-band blockquote {
  background: var(--green);
  color: #f4efe4;
  border-radius: 20px;
  padding: 48px 56px;
  text-align: center;
}

.quote-band p {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  font-style: italic;
  letter-spacing: -0.01em;
}

.quote-band cite {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.cta-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.cta-card--tg {
  background: linear-gradient(160deg, var(--green-soft), var(--card) 70%);
}

.cta-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--green);
  font-size: 20px;
}

.cta-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}

.cta-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 420px;
}

.cta-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}

.cta-card--wide {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
  width: 100%;
}

.about-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-strip h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  margin-bottom: 10px;
}

.about-strip p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 640px;
}

/* ------------------------------- страницы ----------------------------- */

.page-head {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 28px 34px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-head__lead {
  margin-top: 18px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.page-head__lead a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cat-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 28px 34px;
}

.cat-hero__emoji {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--cat) 15%, transparent);
  font-size: 30px;
  margin: 18px 0 16px;
}

.cat-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cat-hero__desc {
  margin-top: 14px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.cat-hero__meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.crumb,
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
}

.crumb:hover,
.breadcrumbs a:hover {
  color: var(--green);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

/* ------------------------------- статья ------------------------------- */

.article-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 28px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 64px;
  align-items: start;
}

.article {
  min-width: 0;
  max-width: 720px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat) 12%, transparent);
  color: color-mix(in srgb, var(--cat) 78%, var(--ink));
  font-size: 12.5px;
  font-weight: 600;
}

.article__head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
}

.article__head h1 {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.article__lead {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink-2);
}

.article__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.article__meta .dot {
  opacity: 0.6;
}

.article__body {
  font-family: var(--serif);
  font-size: 19.5px;
  line-height: 1.74;
  color: var(--ink);
}

.article__body > * + * {
  margin-top: 22px;
}

.article__body h2 {
  margin-top: 46px;
  font-size: 29px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  scroll-margin-top: 90px;
}

.article__body h3 {
  margin-top: 32px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  scroll-margin-top: 90px;
}

.article__body p {
  margin-top: 0;
}

.article__body a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article__body a:hover {
  color: var(--green-2);
}

.article__body strong {
  font-weight: 700;
}

.article__body em {
  font-style: italic;
}

.article__body ul,
.article__body ol {
  padding-left: 26px;
}

.article__body li {
  margin: 8px 0;
}

.article__body li::marker {
  color: var(--green);
}

.article__body blockquote {
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--green);
  font-style: italic;
  color: var(--ink-2);
}

.article__body blockquote p {
  margin: 0;
}

.article__body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

.article__body code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.85em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 5px;
}

.figure {
  margin: 30px 0;
}

.figure img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.figure figcaption {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 26px 0;
  font-family: var(--sans);
  font-size: 14px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  font-weight: 650;
  color: var(--ink-2);
  background: var(--paper-2);
}

/* врезки */
.callout {
  margin: 30px 0;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

.callout__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
}

.callout__title::before {
  font-size: 16px;
  line-height: 1;
}

.callout--tip {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 25%, var(--line));
}

.callout--tip .callout__title::before {
  content: '💡';
}

.callout--example {
  background: var(--yellow-soft);
  border-color: color-mix(in srgb, var(--clay) 22%, var(--line));
}

.callout--example .callout__title::before {
  content: '🧩';
}

.callout--warning {
  background: var(--clay-soft);
  border-color: color-mix(in srgb, var(--clay) 30%, var(--line));
}

.callout--warning .callout__title::before {
  content: '⚠️';
}

.callout--note {
  background: var(--paper-2);
}

.callout--note .callout__title::before {
  content: '📌';
}

.callout__body > * + * {
  margin-top: 12px;
}

.callout__body p {
  margin: 0;
}

.article__foot {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12.5px;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--paper-2);
}

.share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.share__link {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share__link:hover {
  color: var(--green);
}

.article__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 38px;
  padding: 26px 28px;
  border-radius: 16px;
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line));
}

.article__cta h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}

.article__cta p {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 430px;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.article-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.16s, background 0.16s;
}

.article-nav__item:hover {
  border-color: var(--line-2);
  background: var(--card);
}

.article-nav__item span {
  font-size: 12px;
  color: var(--muted);
}

.article-nav__item strong {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.article-nav__item--next {
  text-align: right;
  align-items: flex-end;
}

/* оглавление */
.toc {
  position: sticky;
  top: 96px;
  font-size: 13px;
}

.toc__title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.toc__list {
  list-style: none;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc__item {
  padding: 2px 0 2px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
}

.toc__item a {
  color: var(--muted);
  display: block;
  padding: 3px 0;
  line-height: 1.45;
}

.toc__item a:hover {
  color: var(--ink);
}

.toc__item--h3 {
  padding-left: 26px;
  font-size: 12.5px;
}

.toc__item.is-active {
  border-left-color: var(--green);
}

.toc__item.is-active a {
  color: var(--ink);
  font-weight: 600;
}

.section--related {
  padding-top: 40px;
}

/* ------------------------------ программа ----------------------------- */

.program {
  list-style: none;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 28px;
  counter-reset: step;
}

.program__item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.program__num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--line-2);
  line-height: 1;
  padding-top: 4px;
}

.program__meta {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.program__body h2 {
  margin: 6px 0 6px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.program__body h2 a:hover {
  color: var(--green);
}

.program__body p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 620px;
}

.notice {
  max-width: 820px;
  margin: 32px auto;
  padding: 18px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.notice--accent {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 20%, var(--line));
}

.notice a {
  color: var(--green);
  text-decoration: underline;
}

/* -------------------------------- поиск ------------------------------- */

.page-head--search {
  padding-bottom: 10px;
}

.search-big {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  max-width: 620px;
}

.search-big input {
  flex: 1;
  height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card);
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

.search-big input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent);
}

.search-big .btn {
  height: 50px;
  padding: 0 24px;
}

.search-big__meta {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.search-results {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 28px 40px;
  display: flex;
  flex-direction: column;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.search-result:hover strong {
  color: var(--green);
}

.search-result__meta {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-result strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.search-result__snippet {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}

.empty {
  max-width: 720px;
  margin: 30px auto;
  padding: 0 28px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.7;
}

.empty a {
  color: var(--green);
  text-decoration: underline;
}

/* ------------------------------ о проекте ----------------------------- */

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px 30px;
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.72;
}

.prose--wide {
  max-width: 900px;
}

.prose h2 {
  margin: 40px 0 14px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 18px;
}

.prose a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0 10px;
  font-family: var(--sans);
}

.principle {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.principle span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.principle h3 {
  font-size: 15.5px;
  font-weight: 650;
  margin-bottom: 5px;
}

.principle p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* --------------------------------- 404 -------------------------------- */

.not-found {
  max-width: 640px;
  margin: 0 auto;
  padding: 110px 28px;
  text-align: center;
}

.not-found h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
}

.not-found p {
  margin: 16px auto 26px;
  max-width: 420px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

.not-found__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* -------------------------------- подвал ------------------------------ */

.footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 28px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
}

.footer__brand p {
  margin: 14px 0 16px;
  max-width: 380px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.footer__tg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}

.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer__cols h3 {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer__cols ul {
  list-style: none;
  padding: 0;
}

.footer__cols li {
  margin: 7px 0;
}

.footer__cols a {
  font-size: 14px;
  color: var(--ink-2);
}

.footer__cols a:hover {
  color: var(--green);
}

.footer__bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 28px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ------------------------------- адаптив ------------------------------ */

@media (max-width: 1020px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 34px;
  }

  .toc {
    display: none;
  }

  .hero__grid {
    gap: 36px;
  }
}

@media (max-width: 860px) {
  .header__inner {
    padding: 0 18px;
    gap: 14px;
  }

  .nav {
    position: fixed;
    inset: 68px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav__link {
    padding: 12px 10px;
    font-size: 16px;
  }

  .menu-btn {
    display: grid;
  }

  .search-mini {
    display: none;
  }

  .btn--telegram span {
    display: none;
  }

  .btn--telegram {
    width: 34px;
    padding: 0;
  }

  .hero {
    padding-top: 46px;
  }

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

  .hero__card {
    order: 2;
  }

  .section {
    padding: 42px 18px;
  }

  .cat-grid,
  .cat-grid--wide {
    padding: 0 18px;
  }

  .post-grid,
  .two-col,
  .principles {
    grid-template-columns: minmax(0, 1fr);
  }

  .quote-band {
    padding: 0 18px;
  }

  .quote-band blockquote {
    padding: 34px 26px;
  }

  .about-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 18px;
  }

  .page-head,
  .cat-hero,
  .post-list--wide,
  .program,
  .search-results,
  .prose,
  .footer__inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .article-layout {
    padding: 26px 18px 10px;
  }

  .article__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

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

  .article-nav__item--next {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .logo__text {
    font-size: 19px;
  }

  .hero__title {
    font-size: 36px;
  }

  .hero__lead {
    font-size: 16.5px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .section__head {
    flex-direction: column;
    gap: 8px;
  }

  .start-list li {
    grid-template-columns: 22px 1fr;
  }

  .start-list__time {
    display: none;
  }

  .article__body {
    font-size: 18px;
  }

  .article__body h2 {
    font-size: 25px;
  }

  .program__item {
    grid-template-columns: 40px 1fr;
    gap: 14px;
  }

  .program__num {
    font-size: 22px;
  }

  .search-big {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .header,
  .footer,
  .toc,
  .progress,
  .article__cta,
  .article-nav,
  .article__foot {
    display: none !important;
  }

  .article-layout {
    display: block;
    padding: 0;
  }

  .article__body {
    font-size: 12pt;
  }

  body {
    background: #fff;
  }
}
