/* Шрифты — self-host, subset cyrillic+latin (см. README) */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/GolosText-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/GolosText-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Piazzolla';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Piazzolla-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Piazzolla';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Piazzolla-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Piazzolla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Piazzolla-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Piazzolla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/Piazzolla-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Токены. Палитра интерполируется в main.js по --heat (0 = лёд, 1 = тропики);
   значения ниже — «холодный» дефолт, он же вид без JS.
   ========================================================================== */
:root {
  --heat: 0;
  --paper: #f2f7fb;
  --sheet: rgba(247, 250, 253, .93);
  --ink: #12313f;
  --muted: #4f6672;
  --accent: #2f6fa3;
  --accent-2: #7fb7dd;
  --tint: #d6e7f3;
  --link: #285d8a;
  --sky-top: #d9e9f5;
  --sky-bottom: #f3f8fc;
  --sea-top: #cfe3f2;
  --sea-bottom: #a7c9e2;
  --sun: #ffd166;
  --sand: #efe3c2;
  --palm: #3f8f5f;
  --umbrella: #ef5d82;

  --font-display: 'Piazzolla', 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --font-text: 'Golos Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --measure: 66ch;
  --radius: 18px;
  --radius-lg: 28px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --page: 1060px;
  color-scheme: light;
}

/* ==========================================================================
   База
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (max-width: 640px) { html { font-size: 100%; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-text);
  font-variation-settings: 'wght' 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* слои: сцена (0) → погода (1) → контент (2) → приборы (3) */
.scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; background: var(--sky-top); }
#weather { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.chrome { position: relative; z-index: 2; }
.thermo, .baro { z-index: 3; }

/* ==========================================================================
   Сцена: цвета берутся из переменных, чтобы JS менял только их
   ========================================================================== */
.st-sky-top { stop-color: var(--sky-top); }
.st-sky-bottom { stop-color: var(--sky-bottom); }
.st-sea-top { stop-color: var(--sea-top); }
.st-sea-bottom { stop-color: var(--sea-bottom); }
.st-sun { stop-color: var(--sun); }
.sun-glow { fill: var(--sun); opacity: .38; }
.sand-fill { fill: var(--sand); }
.fronds path { stroke: var(--palm); stroke-width: 14; stroke-linecap: round; fill: none; }
#palm2 .fronds path { stroke-width: 12; }
.umbrella { fill: var(--umbrella); }
.berg-under { fill: var(--sea-top); opacity: .55; }
.berg-facet { fill: #fff; opacity: .9; }
.berg-shade { fill: var(--tint); opacity: .9; }
.wave { fill: none; stroke: #fff; stroke-width: 3; opacity: .55; }
.wave--2 { opacity: .3; }
#berg, #palm1, #palm2, #beach { transform-box: fill-box; }
#berg { transform-origin: 50% 100%; }
#palm1, #palm2 { transform-origin: 50% 100%; transform: scale(0); }
#beach { transform-origin: 50% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .cloud--1 { animation: drift 90s linear infinite; }
  .cloud--2 { animation: drift 120s linear infinite reverse; }
  .cloud--3 { animation: drift 150s linear infinite; }
  .wave--1 { animation: swell 14s linear infinite; }
  .wave--2 { animation: swell 22s linear infinite reverse; }
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(120px); } }
@keyframes swell { from { transform: translateX(0); } to { transform: translateX(1440px); } }

/* ==========================================================================
   Шапка
   ========================================================================== */
.masthead {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.3rem var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem 2rem;
  align-items: end;
}
.masthead > * { min-width: 0; }
.brand { color: inherit; text-decoration: none; display: grid; gap: .1rem; }
.brand__name {
  font-family: var(--font-display);
  font-variation-settings: 'wght' 560, 'opsz' 20;
  font-size: 1.32rem;
  line-height: 1.15;
  letter-spacing: -.005em;
}
.brand__tag { color: var(--muted); font-size: .92rem; }
.station { margin: 0; text-align: right; font-size: .92rem; color: var(--muted); }
.station__temp {
  display: inline-block; margin-left: .5rem; padding: .1rem .55rem;
  border: 1.5px solid var(--accent-2); border-radius: 999px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.nav { grid-column: 1 / -1; margin-top: .4rem; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .1rem 1.5rem;
}
.nav a {
  display: inline-block; padding: .45rem 0; color: var(--ink); text-decoration: none;
  font-variation-settings: 'wght' 520;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--link); }
.nav a[aria-current="page"] {
  text-decoration: underline wavy var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: .4em;
}
@media (max-width: 720px) {
  .masthead { grid-template-columns: 1fr; }
  .station { text-align: left; }
  .nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
  .nav ul::-webkit-scrollbar { display: none; }
  .nav li { flex: 0 0 auto; }
}

/* ==========================================================================
   Герой главной: текст над открытой водой, справа от айсберга
   ========================================================================== */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) var(--gutter) clamp(7rem, 16vh, 12rem);
  min-height: 74vh;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
}
.hero__box { max-width: 30rem; }
.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-variation-settings: 'wght' 500, 'opsz' 30;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero__lede { font-size: 1.15rem; line-height: 1.5; margin: 0 0 1.6rem; max-width: 30rem; }
.hero__hint {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .95rem; color: var(--muted);
}
.hero__hint svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 720px) {
  .hero { min-height: 62vh; align-items: flex-start; padding-bottom: 6rem; }
}

/* ==========================================================================
   Лист: полупрозрачная бумага поверх пейзажа
   ========================================================================== */
.sheet {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto 3rem;
  padding: clamp(1.6rem, 4vw, 3.6rem) clamp(1.1rem, 4vw, 3.6rem);
  background: var(--sheet);
  border: 1px solid var(--tint);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -40px rgba(18, 49, 63, .35);
}
.sheet + .sheet { margin-top: -1rem; }
.sheet--head { padding-bottom: 0; }
.sheet--cut { margin-top: clamp(2rem, 8vh, 5rem); }
main > .sheet:first-child { margin-top: clamp(1.5rem, 5vh, 3rem); }

/* колонка текста + поле для заметок */
.prose {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: clamp(1.6rem, 4vw, 3.6rem);
  align-items: start;
}
.prose > * { grid-column: 1; min-width: 0; }
.prose > .note { grid-column: 2; grid-row: span 3; } /* заметка тянется на три «строки», чтобы текст тёк рядом, а не под ней */
.prose > .wide { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .prose { grid-template-columns: minmax(0, 1fr); }
  .prose > .note { grid-column: 1; grid-row: auto; }
}

/* ==========================================================================
   Типографика
   ========================================================================== */
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
.title {
  font-family: var(--font-display);
  font-variation-settings: 'wght' 500, 'opsz' 30;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.012em;
  margin-bottom: .5rem;
}
.title--long { max-width: 20ch; }
.lede { font-size: 1.15rem; line-height: 1.5; color: var(--muted); margin: .4rem 0 1.4rem; max-width: 50ch; }
h2 {
  font-family: var(--font-display);
  font-variation-settings: 'wght' 520, 'opsz' 24;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  line-height: 1.12;
  margin: 2.2rem 0 .8rem;
}
h2:first-child { margin-top: 0; }
h3 {
  font-variation-settings: 'wght' 620;
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 1.8rem 0 .5rem;
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
strong, b { font-variation-settings: 'wght' 640; }
em, i { font-style: italic; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin: .25rem 0; }
hr { border: 0; height: 1px; background: var(--tint); margin: 2rem 0; }
small, .small { font-size: .9rem; }
.muted { color: var(--muted); }
sup { line-height: 0; font-size: .72em; vertical-align: super; }
sup a { text-decoration: none; padding: 0 .15em; }
.latin { font-style: italic; color: var(--muted); }

blockquote {
  margin: 1.6rem 0;
  padding: 0 0 0 1.3rem;
  border-left: 3px solid var(--accent-2);
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: 'wght' 420, 'opsz' 24;
  font-size: 1.3rem;
  line-height: 1.35;
}
blockquote cite { display: block; margin-top: .6rem; font-family: var(--font-text); font-style: normal; font-size: .9rem; color: var(--muted); }

/* орнамент-разделитель между разделами */
.orn {
  grid-column: 1 / -1;
  display: flex; justify-content: center; gap: 1.1rem;
  margin: 2.6rem 0 .6rem;
  color: var(--accent-2);
}
.orn svg { width: 22px; height: 22px; }
.orn svg:nth-child(2) { width: 26px; height: 26px; }

/* заметки на полях */
.note {
  position: relative;
  margin: .2rem 0 1.2rem;
  padding: .85rem 1rem .85rem 1.1rem;
  font-size: .9rem; line-height: 1.5; color: var(--muted);
  background: color-mix(in srgb, var(--tint) 42%, transparent);
  border-radius: 12px;
}
.note b { color: var(--ink); }
.note--pin { transform: rotate(-1.2deg); }
.note--pin::before {
  content: ''; position: absolute; top: -12px; left: 14px; width: 12px; height: 28px;
  background: currentColor; opacity: .35;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 44'><path d='M6,12 v22 a4,4 0 0 0 8,0 v-26 a6,6 0 0 0 -12,0 v26 a8,8 0 0 0 16,0 v-20' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 44'><path d='M6,12 v22 a4,4 0 0 0 8,0 v-26 a6,6 0 0 0 -12,0 v26 a8,8 0 0 0 16,0 v-20' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round'/></svg>") no-repeat center / contain;
}
.note--pin::before { width: 14px; height: 32px; }
.note--stamp { background: none; padding: 0; }
.prose > .note--inline { grid-column: 1; grid-row: auto; margin: .4rem 0 1.4rem; }

/* штампы */
.stamp {
  display: inline-block;
  padding: .32em .7em;
  border: 3px double var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: .78rem;
  font-variation-settings: 'wght' 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.2;
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
  opacity: .85;
  white-space: nowrap;
}
.stamp--right { float: right; margin: .2rem 0 .6rem 1rem; transform: rotate(5deg); }

/* факты: утверждение с источником, без «плиток» */
.facts { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.facts li {
  display: grid; grid-template-columns: 34px 1fr; gap: .9rem; align-items: start;
  padding: .9rem 0; border-top: 1px dashed var(--accent-2);
}
.facts li:last-child { border-bottom: 1px dashed var(--accent-2); }
.facts svg { width: 30px; height: 30px; color: var(--accent); margin-top: .15rem; }
.facts b { font-variation-settings: 'wght' 640; }

/* досье вида */
.dossiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1.2rem 0 .6rem; }
@media (max-width: 900px) { .dossiers { grid-template-columns: 1fr; } }
.dossier {
  position: relative;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1.5px dashed var(--accent-2);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--sheet) 60%, transparent);
}
.dossier__no { position: absolute; top: .9rem; right: .9rem; font-size: .78rem; color: var(--muted); }
.dossier__pic { width: 88px; height: 112px; display: block; margin-bottom: .6rem; }
.dossier h3 { margin: 0 0 .1rem; font-family: var(--font-display); font-variation-settings: 'wght' 560, 'opsz' 20; font-size: 1.32rem; }
.dossier .latin { display: block; font-size: .9rem; margin-bottom: .6rem; }
.dossier p { font-size: .95rem; }
.dossier dl { margin: .6rem 0 0; font-size: .92rem; }
.dossier dt { color: var(--muted); font-size: .82rem; margin-top: .5rem; }
.dossier dd { margin: 0; }
.status {
  display: inline-block; padding: .12em .6em; border-radius: 999px;
  font-size: .8rem; font-variation-settings: 'wght' 600; color: #fff; background: var(--muted);
  vertical-align: middle;
}
.status--nt { background: #b48a1f; }
.status--vu { background: #c8731e; }
.status--en { background: #d2542d; }
.status--cr { background: #b2233b; }
.status--lc { background: #4a8f5c; }

/* ссылки-карточки разделов (тизеры) */
.teasers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.6rem; margin: 1rem 0; }
@media (max-width: 720px) { .teasers { grid-template-columns: 1fr; } }
.teaser { text-decoration: none; color: inherit; display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; padding: .6rem 0; }
.teaser svg { width: 40px; height: 40px; color: var(--accent); }
.teaser h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.teaser p { margin: 0; font-size: .93rem; color: var(--muted); }

/* кнопка (одна на весь сайт, нужна редко) */
.btn {
  display: inline-block; padding: .55rem 1.1rem;
  border: 1.5px solid var(--ink); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-variation-settings: 'wght' 560;
  background: transparent;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--tint); }

/* таблицы */
table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1rem 0; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--tint); vertical-align: top; }
th { font-variation-settings: 'wght' 620; color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; }

/* ==========================================================================
   Библиотека
   ========================================================================== */
.lib { list-style: none; padding: 0; margin: 0; }
.lib li { padding: 1rem 0 1.1rem; border-top: 1px solid var(--tint); }
.lib li:last-child { border-bottom: 1px solid var(--tint); }
.lib h3 { margin: 0 0 .2rem; font-size: 1.08rem; }
.lib h3 a { color: var(--ink); }
.lib__no { color: var(--accent); font-variation-settings: 'wght' 620; margin-right: .2rem; }
.lib .lib__orig { font-size: .88rem; color: var(--muted); margin-bottom: .4rem; display: block; }
.lib .lib__meta { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }
.lib .lib__meta span + span::before { content: '— '; }
.lib p { margin: .35rem 0 0; font-size: .96rem; }
.lib .tag { display: inline-block; margin: .5rem .3rem 0 0; padding: .1em .55em; border-radius: 999px; background: color-mix(in srgb, var(--tint) 70%, transparent); font-size: .78rem; color: var(--muted); }

/* ==========================================================================
   Дневник экспедиции
   ========================================================================== */
.log { list-style: none; padding: 0; margin: 1rem 0; }
.log li {
  display: grid; grid-template-columns: 7.2rem 1fr; gap: 1.2rem;
  padding: 1.1rem 0; border-top: 1px dashed var(--accent-2);
}
.log li:last-child { border-bottom: 1px dashed var(--accent-2); }
.log__day { font-family: var(--font-display); font-variation-settings: 'wght' 520, 'opsz' 20; font-size: 1.15rem; line-height: 1.25; }
.log__t {
  display: block; margin-top: .25rem; font-size: 1.5rem; line-height: 1;
  font-variation-settings: 'wght' 460, 'opsz' 30;
  color: color-mix(in oklab, #2f6fa3, #ef5d82 calc(var(--t, 0) * 100%));
  font-variant-numeric: tabular-nums;
}
.log__body p { margin-bottom: .6rem; }
.log__body p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .log li { grid-template-columns: 1fr; gap: .3rem; }
  .log__day { display: flex; gap: .8rem; align-items: baseline; }
  .log__t { margin: 0; }
}

/* словарь */
.gloss { margin: .6rem 0 0; }
.gloss dt { font-variation-settings: 'wght' 620; margin-top: .8rem; }
.gloss dd { margin: .15rem 0 0; color: var(--muted); }

/* ==========================================================================
   Вопросы
   ========================================================================== */
.faq details { border-top: 1px solid var(--tint); padding: .3rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--tint); }
.faq summary {
  cursor: pointer; padding: .75rem 2rem .75rem 0; list-style: none;
  font-variation-settings: 'wght' 580; font-size: 1.05rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: .3rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details > div { padding: 0 0 1rem; max-width: var(--measure); }

/* ==========================================================================
   Атлас
   ========================================================================== */
.atlas { position: relative; margin: 1rem 0 1.5rem; }
.atlas svg.map { width: 100%; height: auto; display: block; border-radius: var(--radius); background: color-mix(in srgb, var(--sea-top) 55%, transparent); }
.map .land { fill: #fff; stroke: var(--accent-2); stroke-width: 1.5; }
.map .ice { fill: #fff; stroke: var(--accent-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.map .grid { fill: none; stroke: var(--accent-2); stroke-width: .8; opacity: .5; }
.map .lbl { font-family: var(--font-text); font-size: 13px; fill: var(--muted); }
.map .mk { cursor: pointer; }
.map .mk circle { fill: var(--accent); stroke: #fff; stroke-width: 2.5; transition: r .15s ease; }
.map .mk:hover circle, .map .mk:focus circle, .map .mk.is-on circle { r: 11; fill: var(--umbrella); }
.map .mk text { font-family: var(--font-text); font-size: 12px; fill: var(--ink); pointer-events: none; }
.map .route { fill: none; stroke: var(--umbrella); stroke-width: 2; stroke-dasharray: 6 5; opacity: 0; transition: opacity .2s ease; }
.map .route.is-on { opacity: .9; }
.tip {
  position: absolute; z-index: 5; max-width: 300px;
  padding: .8rem .95rem; border-radius: 12px;
  background: #fff; color: var(--ink); box-shadow: 0 16px 40px -18px rgba(18, 49, 63, .5);
  border: 1px solid var(--tint); font-size: .9rem; line-height: 1.45;
  pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
}
.tip.is-on { opacity: 1; transform: none; }
.tip b { display: block; font-variation-settings: 'wght' 640; margin-bottom: .2rem; }
.tip .plan { margin-top: .5rem; padding-top: .45rem; border-top: 1px dashed var(--accent-2); color: var(--muted); font-style: italic; }
.species { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .4rem 1.6rem; }
.species li { padding: .75rem 0; border-top: 1px solid var(--tint); font-size: .95rem; }
.species li b { display: block; }
.species .plan { color: var(--muted); font-style: italic; }

/* ==========================================================================
   Калькулятор — «бланк»
   ========================================================================== */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; align-items: start; margin-top: 1rem; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.calc fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.calc legend { font-variation-settings: 'wght' 620; margin-bottom: .5rem; padding: 0; }
.calc select, .calc input[type="range"] { width: 100%; font: inherit; color: inherit; }
.calc select {
  padding: .55rem .7rem; border: 1.5px solid var(--accent-2); border-radius: 10px; background: #fff;
}
.calc .range { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: center; }
.calc output { font-family: var(--font-display); font-size: 1.5rem; font-variation-settings: 'wght' 520, 'opsz' 24; min-width: 3.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.calc input[type="range"] { accent-color: var(--accent); }
.calc .radios { display: grid; gap: .35rem; }
.calc .radios label { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .5rem .6rem; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; }
.calc .radios label:has(input:checked) { border-color: var(--accent-2); background: color-mix(in srgb, var(--tint) 45%, transparent); }
.calc .radios input { margin-top: .3rem; accent-color: var(--accent); }
.calc .radios small { display: block; color: var(--muted); }
.blank {
  position: relative;
  padding: 1.4rem 1.4rem 1.2rem;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: #fff;
}
.blank__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.blank__title { font-family: var(--font-display); font-variation-settings: 'wght' 560, 'opsz' 20; font-size: 1.25rem; line-height: 1.2; }
.blank__no { font-size: .8rem; color: var(--muted); }
.blank dl { margin: 0; }
.blank dt { font-size: .8rem; color: var(--muted); margin-top: .8rem; }
.blank dd { margin: .1rem 0 0; }
.blank .big { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; font-variation-settings: 'wght' 500, 'opsz' 30; }
.blank .verdict { margin-top: 1rem; padding: .8rem .9rem; border-radius: 10px; background: color-mix(in srgb, var(--tint) 55%, transparent); font-style: italic; }
.blank .src { margin-top: .9rem; font-size: .82rem; color: var(--muted); }
.gauge { display: grid; grid-template-columns: 1fr; gap: .3rem; margin-top: .8rem; }
.gauge__bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #7fb7dd, #8fd3c4, #f7b840, #ef5d82); position: relative; }
.gauge__pin { position: absolute; top: -5px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transform: translateX(-50%); transition: left .3s ease; }
.gauge__scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }

/* ==========================================================================
   Об институте
   ========================================================================== */
.staff { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.staff li { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: start; }
.staff svg { width: 64px; height: 84px; }
.staff b { display: block; }
.staff span { display: block; font-size: .9rem; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 1rem 0; border-left: 2px solid var(--accent-2); }
.timeline li { position: relative; padding: .2rem 0 1rem 1.4rem; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: .55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.timeline b { font-family: var(--font-display); font-variation-settings: 'wght' 560, 'opsz' 20; font-size: 1.1rem; margin-right: .5rem; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.footer {
  width: min(var(--page), calc(100% - 2 * var(--gutter))); margin: 0 auto 2.5rem; padding: .4rem clamp(1.1rem, 4vw, 3.6rem) 1.6rem; font-size: .92rem;
  background: var(--sheet); border: 1px solid var(--tint); border-radius: var(--radius-lg);
}
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem 2.5rem; padding: 1.6rem 0; }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { font-family: var(--font-display); font-variation-settings: 'wght' 560, 'opsz' 20; font-size: 1.1rem; margin-bottom: .4rem; }
.footer__head { font-variation-settings: 'wght' 620; margin-bottom: .3rem; }
.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin: .15rem 0; }
.footer__closed, .footer__small { color: var(--muted); }
.footer__small { font-size: .85rem; }
.footer__legal { color: var(--muted); font-size: .85rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--tint); }

/* ==========================================================================
   Приборы: термометр и пингвин-барометр
   ========================================================================== */
.thermo {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: grid; justify-items: center; gap: .3rem;
  pointer-events: none;
}
.thermo__tube { fill: var(--ink); opacity: .85; }
.thermo__glass { fill: #fff; }
.thermo__fill { fill: var(--accent); }
.thermo__bulb { fill: var(--accent); stroke: var(--ink); stroke-width: 3; }
.thermo__ticks line { stroke: var(--muted); stroke-width: 1.5; }
.thermo__ticks text { font-family: var(--font-text); font-size: 9px; fill: var(--muted); }
.thermo__label { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .thermo { display: none; } }

.baro { position: fixed; left: 14px; bottom: 10px; }
.baro__btn { background: none; border: 0; padding: 0; cursor: pointer; display: block; }
.baro__btn svg { width: 96px; height: 136px; display: block; }
.baro__shadow { fill: var(--ink); opacity: .12; }
.baro__layer { opacity: 0; transition: opacity .35s ease, transform .35s ease; transform-box: fill-box; transform-origin: center; }
.baro.is-scarf .baro__scarf { opacity: 1; }
.baro.is-glasses .baro__glasses { opacity: 1; }
.baro.is-shirt .baro__shirt { opacity: 1; }
.baro.is-drink .baro__drink { opacity: 1; }
.baro.is-hat .baro__hat { opacity: 1; }
.baro__bubble {
  position: absolute; left: 70px; bottom: 120px; width: max-content; max-width: 220px;
  padding: .5rem .75rem; border-radius: 14px 14px 14px 3px;
  background: #fff; border: 1.5px solid var(--tint); color: var(--ink); font-size: .88rem; line-height: 1.35;
  box-shadow: 0 14px 30px -18px rgba(18, 49, 63, .45);
  opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.baro__bubble.is-on { opacity: 1; transform: none; }
@media (max-width: 640px) {
  .baro { left: 8px; bottom: 6px; }
  .baro__btn svg { width: 64px; height: 90px; }
  .baro__bubble { left: 50px; bottom: 80px; max-width: 180px; font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .baro__layer, .tip, .gauge__pin, .btn { transition: none; }
}

/* ==========================================================================
   404
   ========================================================================== */
.lost { text-align: center; padding: 3rem var(--gutter) 5rem; max-width: 40rem; margin: 0 auto; }
.lost .title { font-size: clamp(2.4rem, 6vw, 4rem); }
.lost svg { width: 140px; height: 180px; margin: 0 auto 1rem; display: block; }

/* печать: без сцены и приборов */
@media print {
  .scene, #weather, .thermo, .baro { display: none !important; }
  .sheet { box-shadow: none; border: 0; }
}
