/* Hallmark · genre: editorial · macrostructure: Long Document · theme: custom (warm paper, ochre accent, Newsreader + IBM Plex Mono) · enrichment: none · nav: N9 · footer: Ft4 (register on the right margin ≥ 80rem)
 * tone: austere-editorial · anchor hue: 58–82 (ochre) · motion: none (link underline only)
 */

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--text-base);
  font-weight: var(--weight-text);
  font-optical-sizing: auto;
  line-height: 1.62;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--color-link-rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--color-accent); text-decoration-color: currentColor; }
a:active { color: var(--color-ink); }
a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
  text-decoration-color: currentColor;
}

.nowrap { white-space: nowrap; }

/* N9 · edge-aligned: wordmark left, one address right, nothing between */
.nav-edge {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--page-gutter);
}
.nav-edge a { position: relative; }
.nav-edge a::after { content: ""; position: absolute; inset: -10px -6px; }
.wordmark {
  font-weight: var(--weight-strong);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-edge .mail {
  font-size: 1rem;
  white-space: nowrap;
}

/* Long Document · single left-biased column */
.doc {
  padding: var(--space-3xl) var(--page-gutter) var(--space-md);
  padding-left: calc(var(--page-gutter) + var(--column-indent));
}
.doc > * { max-width: var(--measure); }

.doc > h1 {
  margin: 0 0 var(--space-xl);
  max-width: 11em;
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  font-style: normal;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.doc .lede {
  margin: 0 0 var(--space-2xl);
  font-size: var(--text-lede);
  font-weight: var(--weight-lede);
  line-height: 1.5;
}

/* run-in heads: the heading opens the paragraph */
.doc section { margin: 0 0 1.62em; hyphens: auto; }
.doc section > h2 {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: var(--weight-strong);
  font-style: normal;
  letter-spacing: 0;
}
.doc section > h2 + p { display: inline; }
.doc p { margin: 0; text-wrap: pretty; }
.doc p + p { margin-top: var(--space-md); }

.doc .updated {
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Ft4 · colophon: the company register, set small in mono */
.colophon {
  margin: var(--space-2xl) var(--page-gutter) 0;
  padding: var(--space-xl) 0 var(--space-2xl);
  padding-left: var(--column-indent);
  border-top: var(--rule);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-muted);
}
.colophon h2 {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  font-style: normal;
  color: var(--color-ink);
}
.colophon dl {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  column-gap: var(--space-lg);
  row-gap: var(--space-xs);
  margin: 0;
  max-width: 48rem;
}
.colophon dt { color: var(--color-muted); }
.colophon dd { margin: 0; color: var(--color-ink); }
.colophon [lang="ka"] { font-size: 1.08em; }
.colophon p { margin: var(--space-xl) 0 0; }
.colophon--short p { margin: 0; }

@media (max-width: 640px) {
  .doc { padding-top: var(--space-2xl); }
  .colophon dl { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .colophon dd { margin-bottom: var(--space-sm); }
}

@media (max-width: 360px) {
  .nav-edge .mail { font-size: 0.9375rem; }
}

/* Wide screens: the register moves to the right margin, level with the headline */
@media (min-width: 80rem) {
  .home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    column-gap: var(--space-2xl);
    padding-right: var(--page-gutter);
  }
  .home .nav-edge { grid-column: 1 / -1; padding-right: 0; }
  .home .doc { grid-column: 1; grid-row: 2; padding-right: 0; }
  .home .colophon {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
    padding: calc(var(--space-3xl) + 0.9rem) 0 var(--space-2xl);
    border-top: 0;
  }
  .home .colophon dl { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .home .colophon dd { margin-bottom: var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

/* Русский текст: у Newsreader нет кириллицы — без этого слова собирались из
   двух шрифтов. Цельный серифный шрифт с кириллицей на весь блок. */
[lang="ru"], [lang="ru"] h1, [lang="ru"] h2 {
  font-family: Georgia, "PT Serif", "Times New Roman", serif;
}
