/* ============ Buttons & controls ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--paper);
  transition: border-color var(--dur-fast), background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { border-color: var(--azure); background: var(--ink-750); transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* 2026-09-13, инкремент 013: основная кнопка заливалась --azure-bright
   ("тихий" акцент, accent-soft) — на главной и на лаунчере тем же тоном
   красится ВТОРИЧНАЯ кнопка, а основная берёт полный --azure (accent).
   Из-за этого здесь не хватало тихого тона для вторичной кнопки (см.
   .btn ниже), и, шире, три раздела сайта показывали три разных диалекта
   одной и той же пары ролей. */
.btn--primary {
  background: var(--azure);
  border-color: var(--azure);
  color: var(--ink-900);
  font-weight: 600;
}
.btn--primary:hover {
  background: var(--azure-bright);
  border-color: var(--azure-bright);
  color: var(--ink-900);
}

.btn--small { min-height: 34px; padding: 0.3rem 0.7rem; font-size: var(--step--2); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* A text link that reads as an action, with a rule that grows on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--step--1);
  color: var(--azure-bright);
}
.link-arrow::after {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  transition: width var(--dur) var(--ease-out);
}
.link-arrow:hover::after { width: 2.6rem; }

/* Segmented switch: LOCAL / UTC, gallery filters, event ranges. */
.segmented {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--surface-sunken);
}
.segmented button {
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  color: var(--fog);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.segmented button + button { border-left: 1px solid var(--line-strong); }
.segmented button:hover { color: var(--paper); }
.segmented button[aria-pressed="true"] {
  background: var(--ink-700);
  color: var(--azure-bright);
}

/* Filter chips: only where a set of options is genuinely a set. */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}
.chip {
  min-height: 34px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: var(--step--1);
  color: var(--fog);
  transition: all var(--dur-fast);
}
.chip:hover { color: var(--paper); border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  color: var(--ink-900);
  background: var(--paper-dim);
  border-color: var(--paper-dim);
  font-weight: 500;
}

/* ============ State blocks (loading / error / empty) ============ */
.state {
  padding: var(--space-md) 0;
  font-size: var(--step--1);
  color: var(--fog);
  line-height: 1.55;
}
.state__title { color: var(--paper-dim); margin-bottom: 0.25rem; }
.state__meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fog-deep);
  margin-top: 0.35rem;
}
.state--error .state__title { color: var(--signal-poor); }

.skeleton {
  background: linear-gradient(90deg, var(--ink-800) 0%, var(--ink-750) 50%, var(--ink-800) 100%);
  background-size: 200% 100%;
  animation: skeleton-slide 1.6s linear infinite;
  border-radius: 2px;
}
@keyframes skeleton-slide {
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background: var(--ink-800); }
}
.skeleton-line { height: 0.75rem; margin-block: 0.4rem; }

/* A tag for content that is illustrative rather than measured. */
.demo-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog-deep);
}
.demo-flag::before {
  content: "";
  width: 5px; height: 5px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--azure);
}
.live-flag::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ============ Forms ============ */
.field { display: block; margin-bottom: var(--space-md); }
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 0.4rem;
}
.field__label .req { color: var(--azure); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.75rem;
  background: var(--ink-850);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--paper);
  transition: border-color var(--dur-fast);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.55; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--fog-deep); }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible { border-color: var(--azure); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--signal-poor); }
.field__error {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--step--1);
  color: var(--signal-poor);
}
.field__error:empty { display: none; }
.field__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--step--2);
  color: var(--fog-deep);
}

/* Bots fill this; humans never see it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  padding: var(--space-sm) var(--space-md);
  border-left: 2px solid var(--line-strong);
  font-size: var(--step--1);
  color: var(--paper-dim);
}
.form-status[data-tone="ok"] { border-color: var(--signal-good); }
.form-status[data-tone="error"] { border-color: var(--signal-poor); }

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: color-mix(in oklab, var(--surface-sunken) 96%, transparent);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none !important; }
.lightbox__bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--gutter);
  border-bottom: 1px solid var(--line-hair);
}
.lightbox__counter {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fog-deep);
  letter-spacing: var(--track-caps);
}
.lightbox__stage {
  position: relative;
  min-height: 0;
}
/* Absolutely positioned so `max-height: 100%` resolves against the stage.
   As an in-flow grid item the image would size the track it is measured
   against, and the constraint would never apply. */
.lightbox__stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: calc(100% - var(--gutter) * 2);
  max-height: calc(100% - var(--space-md) * 2);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 64px;
  display: grid;
  place-items: center;
  color: var(--fog);
  background: color-mix(in oklab, var(--ink-900) 55%, transparent);
  transition: color var(--dur-fast);
}
.lightbox__nav:hover { color: var(--paper); }
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav--prev { left: 0; }
.lightbox__nav--next { right: 0; }
.lightbox__foot {
  padding: var(--space-md) var(--gutter) var(--space-lg);
  border-top: 1px solid var(--line-hair);
  max-height: 42vh;
  overflow-y: auto;
}
@media (min-width: 60rem) {
  .lightbox__foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: var(--space-xl);
    align-items: start;
  }
}

/* ============ Notice strip ============ */
.notice {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-left: 2px solid var(--azure-deep);
  background: var(--surface);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  font-size: var(--step--1);
  color: var(--fog);
  line-height: 1.5;
}
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 0.2rem; color: var(--azure); }

/* ============ Disclosure ============ */
.disclosure summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  color: var(--azure);
  padding-block: 0.35rem;
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-fast);
}
.disclosure[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.disclosure__body {
  font-size: var(--step--1);
  color: var(--fog);
  line-height: 1.55;
  padding-block: var(--space-xs) var(--space-sm);
  max-width: 60ch;
}

/* ============ Page masthead, breadcrumbs, tag rows ============ */
/* Used by every section page, so these live here rather than in one page sheet. */

.page-head {
  position: relative;
  overflow: hidden;
  margin-top: var(--space-sm);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(115deg, rgba(110, 231, 191, 0.09), transparent 42%),
    linear-gradient(145deg, var(--surface-raised), var(--ink-850));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}
.page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--azure), transparent 58%);
}
.page-head__grid { display: grid; gap: var(--space-md); }
@media (min-width: 56rem) {
  .page-head__grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: end;
  }
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.page-head__note {
  font-size: var(--step-1);
  color: var(--paper-dim);
  line-height: 1.55;
  max-width: 52ch;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  padding-block: var(--space-md) var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog-deep);
}
.breadcrumbs a:hover { color: var(--paper-dim); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.3rem; color: var(--line-strong); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-sm);
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog-deep);
}

/* ============ Ruled index list ============ */
/* Used for the journal index, the arXiv feed and the news feed — three
   different sources, one reading pattern. Lives here rather than in a page
   sheet because the pages that use it do not share a stylesheet. */
.article-index {
  display: grid;
  gap: var(--space-sm);
}
.article-index > li {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  overflow: hidden;
}
.article-index a {
  display: grid;
  gap: 0.35rem var(--space-lg);
  padding: var(--space-md);
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
@media (min-width: 52rem) {
  .article-index a {
    grid-template-columns: 7rem minmax(0, 1fr) 5rem;
    align-items: baseline;
  }
}
.article-index a:hover { background: var(--surface-raised); transform: translateX(3px); }
.article-index a:hover .article-index__title { color: var(--azure-bright); }
.article-index__kicker {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--fog-deep);
}
.article-index__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.2;
  transition: color var(--dur-fast);
}
.article-index__excerpt {
  font-size: var(--step--1);
  color: var(--fog);
  margin-top: 0.3rem;
  max-width: 62ch;
}
.article-index__time {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--fog-deep);
  white-space: nowrap;
}
@media (min-width: 52rem) { .article-index__time { text-align: right; } }

/* ── Моноширинный — для чисел, а не для слов ───────────────────────
   Перевод --font-mono на настоящий моноширинный вскрыл, что часть
   «значений» в обсерватории — не данные, а проза: «под горизонтом»,
   «71 минуту назад». Моноширинный шире пропорционального примерно на
   четверть, поэтому такие подписи сразу обрезало.

   Чинить надо не ширину контейнера, а правило: приборным шрифтом
   набирается то, что ИЗМЕРЕНО — число, время, координата, величина.
   Словесное значение остаётся прозой, иначе оно и шире, и читается
   хуже: моноширинный замедляет чтение слов, для того он и сделан. */
.article-index__time {  font-family: var(--font-ui);
  font-variant-numeric: normal;
}

/* Длинное слово в узкой колонке переносится, а не вылезает. */
[class*="value"], [class*="spec"] dd, .metric { overflow-wrap: anywhere; }
