/* Gemini browser look — Lagrange-style, ported from the iwnaak legacy:
   sans for prose, mono for headings/links/preformatted, unified cream
   heading colour, no chrome around preformatted blocks. */

.gmi-doc {
  font-family: var(--mono);
  color: var(--page-fg);
}

/* Prose text uses the proportional font. Lagrange does the same: text/gemini
   text-line rendering is the author's prose, not code, so sans reads better. */
.gmi-text {
  font-family: var(--sans);
  margin: 0 0 0.7em;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.gmi-empty {
  margin: 0;
  min-height: 0.6em;
}

/* All heading levels share the same colour and font — hierarchy comes from
   size and weight, not chromatic noise. */
.gmi-h {
  font-family: var(--mono);
  color: var(--page-cream);
  font-weight: 800;
  margin: 1.6em 0 0.5em;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.gmi-h1 { font-size: 1.45rem; }
.gmi-h2 { font-size: 1.2rem;  }
.gmi-h3 { font-size: 1.05rem; }

.gmi-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9em;
  font-family: var(--sans);
  line-height: 1.85;
}
.gmi-list li {
  position: relative;
  padding-left: 1.8em;
  margin: 0 0 0.2em;
}
.gmi-list li::before {
  content: "•";
  position: absolute;
  left: 0.3em;
  color: var(--page-muted);
}

/* Ordered variant — switched on per-page via front-matter listStyle. */
.gmi-list--ordered {
  counter-reset: gmi-li;
}
.gmi-list--ordered li {
  counter-increment: gmi-li;
}
.gmi-list--ordered li::before {
  content: counter(gmi-li) ".";
  left: 0;
  color: var(--page-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 1.4em;
}

.gmi-quote {
  position: relative;
  margin: 0.9em 0;
  padding-left: 1.9em;
  font-family: var(--sans);
  font-style: italic;
  color: var(--page-cyan);
  line-height: 1.85;
}
.gmi-quote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.05em;
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
  color: var(--page-cyan);
  opacity: 0.95;
}
.gmi-quote p { margin: 0 0 0.4em; }
.gmi-quote p:last-child { margin-bottom: 0; }

/* Preformatted: just the mono text, no panel or border. The dense
   letter-spacing matches how ASCII art reads in the legacy site. */
.gmi-pre {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--page-pink);
  background: none;
  border: none;
  padding: 0;
  margin: 0.9em 0;
  white-space: pre;
  overflow-x: auto;
  letter-spacing: -0.06em;
}

/* Numbered link block: gemini-browser footnoting. Counter resets per
   <ol> group; multi-link groups only — solo links use .gmi-link-solo. */
.gmi-links {
  list-style: none;
  counter-reset: gmi-link;
  padding: 0;
  margin: 0 0 1em;
  font-family: var(--mono);
}
.gmi-links > li {
  counter-increment: gmi-link;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin: 0 0 0.35em;
}
.gmi-links > li::before {
  content: "[" counter(gmi-link) "]";
  color: var(--page-accent);
  flex: 0 0 auto;
  min-width: 2.4ch;
}
.gmi-links a {
  color: var(--page-fg);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  flex-wrap: wrap;
}
.gmi-link-date {
  color: var(--page-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.gmi-link-title {
  color: var(--page-cream);
  font-weight: 700;
}
.gmi-links a:hover .gmi-link-title { color: var(--page-accent); }

/* Image embeds. Any link-line whose URL targets an image extension is
   rendered as the image itself (Lagrange convention). The link label
   becomes the alt text and figcaption. */
.gmi-figure {
  margin: 1.2em 0;
}
.gmi-figure-link {
  display: block;
  line-height: 0;
}
.gmi-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.gmi-figcaption {
  margin-top: 0.5em;
  font-family: var(--sans);
  font-style: italic;
  color: var(--page-muted);
  font-size: 0.95em;
  text-align: center;
}

/* Single-link "nav" style: no counter, no list chrome — just the label. */
.gmi-link-solo {
  margin: 0.4em 0 0.8em;
  font-family: var(--mono);
}
.gmi-link-solo a {
  color: var(--page-cream);
  text-decoration: none;
  font-weight: 700;
}
.gmi-link-solo a:hover { color: var(--page-accent); }
