:root {
  --paper: #f5f0e4;
  --paper-deep: #e7decb;
  --paper-light: #fbf8f0;
  --ink: #25322c;
  --muted: #687269;
  --forest: #173f35;
  --forest-soft: #31594d;
  --ochre: #b86f27;
  --gold: #d8b46b;
  --line: #cfc3aa;
  --white: #fffdf7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, Helvetica, sans-serif;
  --article-text: "Segoe UI Variable Text", "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  --wide: 1880px;
  --reading: 1220px;
  --lead: 1120px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(184,111,39,.055) 0 1px, transparent 1.5px) 0 0 / 24px 24px,
    linear-gradient(180deg, #f9f5eb 0, var(--paper) 55%, #f1eadc 100%);
  font: 16px/1.58 var(--sans);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
::selection { color: var(--white); background: var(--ochre); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; padding: 10px 14px; color: var(--white); background: var(--forest); }
.skip-link:focus { top: 12px; }

.top-rule {
  height: 7px;
  background: linear-gradient(90deg, var(--ochre) 0 23%, var(--forest) 23% 100%);
}
.site-header {
  position: relative;
  z-index: 30;
  color: var(--ink);
  background: rgba(250,247,239,.97);
  border-bottom: 1px solid var(--line);
}
body > .site-header:first-child {
  border-top: 7px solid transparent;
  border-image: linear-gradient(90deg, var(--ochre) 0 23%, var(--forest) 23% 100%) 1;
}
.nav-shell {
  width: min(1380px, calc(100% - 80px));
  min-height: 96px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(270px, 340px) 1fr 245px;
  align-items: center;
  gap: 28px;
}
.brand {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 15px;
  color: var(--forest);
}
.brand img {
  grid-row: 1 / 3;
  width: 54px;
  height: 54px;
  border-radius: 50%;
}
.brand > span { align-self: end; font: 700 24px/1 var(--serif); letter-spacing: -.025em; }
.brand > span span { color: inherit; }
.brand::after {
  content: "Palaeontological atlas";
  grid-column: 2;
  align-self: start;
  margin-top: 4px;
  color: var(--ochre);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; justify-content: center; gap: clamp(17px, 2vw, 32px); font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.site-nav a { position: relative; padding: 36px 0 32px; color: var(--ink); font-size: 14px; font-weight: 650; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 25px; height: 2px; background: var(--ochre); transition: right .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ochre); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a[lang="ru"] { min-width: 42px; padding: 8px 10px; border: 1px solid var(--line); text-align: center; }
.site-nav a[lang="ru"]::after { content: none; }
.header-search { height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 13px; background: var(--white); border: 1px solid var(--line); }
.header-search svg { width: 18px; flex: 0 0 auto; fill: none; stroke: var(--forest); stroke-width: 1.7; }
.header-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.header-search input::placeholder { color: #7d817a; }
.nav-toggle { display: none; color: var(--forest); background: transparent; border: 1px solid var(--forest); padding: 8px 12px; font-weight: 700; }

.home-hero { position: relative; min-height: 690px; overflow: hidden; isolation: isolate; }
.home-hero picture, .home-hero picture img { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(248,244,234,.28) 0%, rgba(248,244,234,.08) 41%, rgba(248,244,234,0) 61%); }
.home-hero::after { content: none; }
.hero-copy { width: min(var(--wide), calc(100% - 48px)); min-height: 690px; margin: 0 auto; padding: 72px 0 95px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 16px; margin: 0; color: var(--ochre); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.eyebrow::after { content: ""; width: 56px; height: 1px; background: currentColor; }
h1, h2, h3 { color: var(--forest); font-family: var(--serif); letter-spacing: -.025em; }
.home-hero h1 { max-width: 820px; margin: 17px 0 16px; font: 700 clamp(48px, 5.2vw, 78px)/.98 var(--serif); letter-spacing: -.045em; }
.home-hero h1 em { color: var(--ochre); font-weight: 400; font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 0; color: #536059; font-size: 18px; line-height: 1.65; }
.button-row { display: flex; align-items: center; gap: 27px; margin-top: 30px; }
.button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: 28px; padding: 0 22px; color: var(--white); background: var(--ochre); border: 1px solid transparent; font-size: 13px; font-weight: 750; letter-spacing: .035em; }
.button:hover { background: #9d5b1e; }
.button.secondary { color: var(--forest); background: transparent; border: 0; border-bottom: 1px solid rgba(23,63,53,.45); padding-inline: 0; }
.hero-latest { position: absolute; z-index: 2; right: max(24px, calc((100vw - var(--wide)) / 2)); top: 58px; width: 310px; padding: 17px 18px; color: var(--white); background: rgba(31,31,27,.94); border-left: 2px solid var(--ochre); }
.hero-latest small { display: block; margin-bottom: 8px; color: #d49a65; font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-latest a { font: 700 16px/1.45 var(--serif); }
.hero-stats { position: absolute; z-index: 2; right: max(24px, calc((100vw - var(--wide)) / 2)); bottom: 30px; display: flex; margin: 0; background: rgba(250,247,239,.93); border: 1px solid #3c403a; }
.hero-stats div { min-width: 145px; padding: 14px 22px; border-left: 1px solid #3c403a; }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dt { font: 700 23px/1 var(--serif); }
.hero-stats dd { margin: 6px 0 0; color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.image-credit { display: none; }

.section { padding: 74px 24px; }
.section-shell { width: min(var(--wide), 100%); margin: 0 auto; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 28px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.section-head h2, .method-grid h2 { max-width: 780px; margin: 4px 0 0; font: 700 clamp(34px, 4vw, 55px)/1.02 var(--serif); }
.section-head p { max-width: 530px; margin: 0; color: var(--muted); }
.dark-section { color: var(--ink); background: transparent; }
.dark-section .section-head p { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature-card { position: relative; min-height: 280px; display: flex; flex-direction: column; padding: 26px; color: var(--ink); background: rgba(255,253,247,.5); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-card::before { content: attr(data-mark); position: absolute; right: 22px; top: 14px; color: rgba(184,111,39,.18); font: italic 700 70px/1 var(--serif); }
.feature-card:hover { background: var(--paper-deep); }
.feature-card small { color: var(--ochre); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.feature-card h3 { margin: auto 0 8px; font-size: 28px; line-height: 1.08; }
.feature-card p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.feature-card span { color: var(--forest); font-size: 12px; font-weight: 750; border-bottom: 1px solid var(--forest); align-self: flex-start; }
.method-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.method-grid > div:first-child > p:last-child { color: var(--muted); font-size: 17px; }
.principles { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.principle { min-height: 150px; display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle b { color: var(--ochre); font: italic 700 18px/1 var(--serif); }
.principle h3 { margin: 0 0 6px; font: 700 18px/1.2 var(--serif); }
.principle p { margin: 0; color: var(--muted); font-size: 13px; }

.page-head { padding: 0 40px 28px; color: var(--ink); background: transparent; }
.page-head .inner { width: min(var(--reading), 100%); margin: 0 auto; text-align: center; }
.breadcrumbs { width: 100%; min-height: 63px; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.breadcrumbs span::before { content: "/"; margin-right: 9px; color: var(--ochre); }
.breadcrumbs a:hover { color: var(--ochre); }
.page-head .eyebrow { display: none; }
.page-head h1 { max-width: 970px; margin: 38px auto 18px; color: var(--forest); font: 700 clamp(44px, 6vw, 73px)/1.04 var(--serif); letter-spacing: -.045em; }
.page-head .dek { max-width: 790px; margin: 0 auto; color: var(--muted); font: 20px/1.58 var(--serif); }
.article-byline { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 20px; color: var(--muted); font: 700 10px/1.58 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.article-byline i { color: var(--ochre); font-style: normal; }

.article-figure, .hub-cover { width: min(var(--lead), calc(100% - 80px)); margin: 0 auto 55px; padding: clamp(8px, 1vw, 14px); overflow: hidden; background: rgba(255,253,247,.72); border: 1px solid var(--line); }
.article-figure img, .hub-cover img { width: 100%; height: clamp(360px, 54vw, 680px); object-fit: contain; }
.article-figure figcaption, .hub-cover figcaption { padding: 11px 2px 1px; color: var(--muted); font: 600 14px/1.4 var(--sans); text-align: center; }
.article-wrap { width: min(1120px, calc(100% - 80px)); margin: 0 auto; padding: 0 0 90px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; align-items: start; }
.article-main { min-width: 0; grid-column: 2; color: #28332e; font: 18px/1.78 var(--article-text); letter-spacing: .006em; }
.article-main > p:first-child::first-letter { float: left; margin: 3px 8px 0 0; color: var(--ochre); font: 700 68px/.78 var(--serif); }
.article-main p { margin: 0 0 22px; }
.article-main a { color: var(--forest); border-bottom: 1px solid rgba(23,63,53,.55); font-weight: 650; }
.article-main h2 { margin: 2em 0 .65em; color: var(--forest); font: 700 35px/1.18 var(--serif); letter-spacing: -.025em; }
.article-main h3 { margin: 1.7em 0 .55em; color: var(--forest); font: 700 27px/1.24 var(--serif); letter-spacing: -.025em; }
.article-main table { width: 100%; margin: 20px 0 34px; border-collapse: collapse; font-size: 14px; }
.article-main th, .article-main td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-main th { width: 34%; color: var(--forest); background: rgba(231,222,203,.52); }
.aside-card { grid-column: 1; grid-row: 1; position: sticky; top: 24px; padding: 20px 0; background: transparent; border: 0; border-top: 2px solid var(--ochre); border-bottom: 1px solid var(--line); }
.aside-card h2 { margin: 0 0 14px; color: var(--muted); font: 800 9px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.aside-card dl { margin: 0; }
.aside-card dt { margin-top: 13px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.aside-card dd { margin: 3px 0 0; color: var(--forest); font: 700 14px/1.35 var(--serif); }
.aside-card a { color: var(--forest); border-bottom: 1px solid var(--forest); }
.evidence-note { margin: 30px 0; padding: 18px 22px; color: var(--ink); background: var(--paper-deep); border-left: 3px solid var(--ochre); }
.evidence-note strong { display: block; margin-bottom: 4px; color: var(--forest); font: 700 18px var(--serif); }
.faq { margin-top: 60px; padding-top: 30px; border-top: 2px solid var(--ochre); }
.faq h2 { margin-top: 0; }
.faq details { padding: 18px 0; border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { color: var(--forest); font: 700 19px/1.4 var(--serif); cursor: pointer; }
.faq details p { margin: 11px 0 0; color: var(--muted); font: 15px/1.65 var(--sans); }

.catalog-tools { width: min(var(--lead), calc(100% - 80px)); margin: 0 auto 28px; display: flex; align-items: center; gap: 18px; }
.catalog-search { position: relative; flex: 1; }
.catalog-search span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--forest); }
.catalog-search input { width: 100%; min-height: 54px; padding: 0 18px 0 46px; color: var(--ink); background: var(--white); border: 1px solid var(--forest); outline: 0; }
.catalog-count { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.catalog-grid { width: min(var(--lead), calc(100% - 80px)); margin: 0 auto; padding: 0 0 90px; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.catalog-card { min-height: 250px; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto 1fr auto; column-gap: 18px; padding: 26px; color: var(--ink); background: rgba(255,253,247,.46); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catalog-card:hover { background: var(--paper-deep); }
.catalog-card .mark { grid-row: 1 / 4; color: var(--ochre); font: italic 700 30px/1 var(--serif); }
.catalog-card h2 { align-self: end; margin: 52px 0 8px; font: 700 29px/1.08 var(--serif); }
.catalog-card p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.catalog-card b { color: var(--forest); font-size: 12px; }
.catalog-card[hidden] { display: none; }
.empty-state { display: none; grid-column: 1 / -1; padding: 42px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.empty-state.visible { display: block; }

.comparison-shell { width: min(var(--lead), calc(100% - 80px)); margin: 0 auto 60px; }
.comparison-panel { overflow: hidden; background: rgba(255,253,247,.6); border: 1px solid var(--line); box-shadow: none; }
.comparison-controls { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; padding: 1px; color: var(--white); background: var(--forest); }
.field { min-width: 0; padding: 18px; border: 1px solid rgba(255,255,255,.14); }
.field label { display: block; margin-bottom: 7px; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.field select, .field input { width: 100%; min-width: 0; min-height: 45px; padding: 0 11px; color: var(--ink); background: var(--paper-light); border: 1px solid #9f9a88; border-radius: 0; }
.comparison-stage { padding: 28px; }
.comparison-summary { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 24px; }
.metric { padding: 18px; background: rgba(255,253,247,.56); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 5px; color: var(--forest); font: 700 clamp(26px, 4vw, 38px)/1 var(--serif); }
.scale-board { padding: 20px; background: linear-gradient(#ddd5c5 1px, transparent 1px), linear-gradient(90deg, #ddd5c5 1px, transparent 1px), #faf6ec; background-size: 32px 32px; border: 1px solid var(--line); }
.scale-row { min-height: 68px; display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 16px; }
.scale-row + .scale-row { border-top: 1px solid var(--line); }
.scale-row span { color: var(--muted); font-size: 11px; font-weight: 750; }
.scale-bar { min-width: 8px; max-width: 100%; height: 28px; background: var(--forest); transition: width .35s ease; }
.scale-bar.reference { background: var(--ochre); }
.comparison-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.range-note { margin: 18px 0 0; padding: 15px 18px; color: var(--ink); background: var(--paper-deep); border-left: 3px solid var(--ochre); }

.site-footer { padding: 44px 40px; color: rgba(255,253,247,.72); background: var(--forest); border-top: 7px solid var(--ochre); }
.footer-shell { width: min(var(--wide), 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.site-footer .brand { width: max-content; margin-bottom: 15px; color: var(--white); }
.site-footer .brand img { outline: 1px solid rgba(216,180,107,.45); outline-offset: 3px; }
.site-footer .brand::after { color: var(--gold); }
.site-footer p { max-width: 600px; margin: 0; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
.footer-links a { color: var(--white); font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.35); }

@media (min-width: 1640px) {
  .article-wrap {
    width: 1372px;
    margin-left: calc(50% - 812px);
    grid-template-columns: 190px minmax(0, 1120px);
    gap: 62px;
  }
}

@media (min-width: 901px) {
  .nav-shell, .hero-copy, .section-shell, .footer-shell {
    width: min(1880px, calc(100% - 48px));
  }
}

@media (max-width: 1180px) {
  .nav-shell { grid-template-columns: 300px 1fr 220px; gap: 18px; }
  .site-nav { gap: 15px; }
  .hero-latest { display: none; }
}

@media (max-width: 900px) {
  .nav-shell { width: min(calc(100% - 40px), 700px); min-height: 82px; grid-template-columns: 1fr auto; }
  .header-search { display: none; }
  .brand > span { font-size: 21px; }
  .nav-toggle { display: inline-flex; justify-self: end; }
  .site-nav { position: absolute; left: 0; right: 0; top: 82px; display: none; align-self: auto; padding: 10px 18px 18px; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper-light); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .site-nav a[lang="ru"] { margin-top: 10px; }
  .home-hero { min-height: 640px; }
  .home-hero::before { background: linear-gradient(0deg, rgba(249,245,235,.99) 0%, rgba(249,245,235,.88) 52%, rgba(249,245,235,.05) 100%); }
  .home-hero picture img { object-position: 68% center; }
  .hero-copy { width: min(calc(100% - 40px), 700px); min-height: 640px; padding-top: 220px; justify-content: flex-end; }
  .hero-stats { display: none; }
  .section-head, .method-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card:last-child { grid-column: 1 / -1; }
  .article-wrap { grid-template-columns: 1fr; width: min(700px, calc(100% - 40px)); gap: 20px; }
  .article-main, .aside-card { grid-column: 1; }
  .aside-card { position: static; grid-row: auto; display: none; }
  .catalog-grid { grid-template-columns: 1fr 1fr; }
  .comparison-controls { grid-template-columns: 1fr 1fr; }
  .comparison-controls .field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-shell { width: min(calc(100% - 28px), 520px); }
  .brand { grid-template-columns: 49px 1fr; column-gap: 12px; }
  .brand img { width: 46px; height: 46px; }
  .brand > span { font-size: 21px; }
  .brand::after { font-size: 8px; letter-spacing: .11em; }
  .home-hero, .hero-copy { min-height: 650px; }
  .hero-copy { width: min(calc(100% - 28px), 520px); padding-top: 54px; justify-content: flex-start; }
  .home-hero h1 { font-size: clamp(42px, 13vw, 60px); }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .button-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .section { padding: 56px 18px; }
  .section-head h2, .method-grid h2 { font-size: 37px; }
  .feature-grid, .principles { grid-template-columns: 1fr; }
  .feature-card:last-child { grid-column: auto; }
  .page-head { padding: 0 14px 24px; }
  .breadcrumbs { width: 100%; min-height: 63px; }
  .page-head h1 { margin-top: 28px; font-size: 42px; }
  .page-head .dek { font-size: 17px; }
  .article-figure, .hub-cover, .catalog-tools, .catalog-grid, .comparison-shell { width: calc(100% - 28px); }
  .article-figure, .hub-cover { padding: 8px; margin-bottom: 35px; }
  .article-figure img, .hub-cover img { height: clamp(280px, 78vw, 440px); }
  .article-wrap { width: min(calc(100% - 28px), 520px); }
  .article-main { font-size: 16px; line-height: 1.72; }
  .article-main h2 { font-size: 31px; }
  .catalog-tools { align-items: stretch; flex-direction: column; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-card { min-height: 220px; }
  .comparison-controls, .comparison-summary { grid-template-columns: 1fr; }
  .comparison-controls .field:first-child { grid-column: auto; }
  .comparison-stage { padding: 16px; }
  .scale-row { grid-template-columns: 72px 1fr; gap: 10px; }
  .footer-shell { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

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