/* ─────────────────────────────────────────────────────────────────────────────
   /blog — the guides index.
   Layers on site.css + legal.css + page.css. Scoped to .gidx-page.

   WHY. It was a single narrow column of stacked rows, each a title over a line
   of grey text with a hairline under it — "vertical tabs". Nothing was open,
   nothing was scannable, and eleven of them in a 780px column left most of the
   screen empty while the text itself was squeezed.

   Now: a grid of cards, each already showing what the guide covers, laid out
   across the full width. Every card is the same height so the rows read as rows,
   and the "Read the guide" line is pinned to the bottom of each so the eye has a
   consistent place to land.

   ⚠️ Classes are prefixed `g-`. Five plain names in compare.css already
   collided with site.css — `.mk` is `display: none` there, which silently blanked
   every table cell. Do not add an unprefixed class to this file.
   ───────────────────────────────────────────────────────────────────────────── */

/* ⚠️ Wider than .doc's 780px on purpose. The instruction was not to compress the
   open space, and a 3-up grid needs the room. `width: 100%` is required for the
   same reason it is on .doc — <body> is a column flex container and the auto
   margin cancels align-items:stretch, so without it this stays 1160px on a
   phone. */
.gidx-page { max-width: 1160px; width: 100%; }

.gidx-page h1 {
  font-size: clamp(36px, 5.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.042em;
}
.gidx-page .g-dek {
  color: var(--text-mut);
  font-size: 16.5px;
  margin: 12px 0 0;
  max-width: 58ch;
}

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin: 40px 0 0;
}

/* ⚠️ display:flex + column is what lets .g-go sit at the bottom of every card
   regardless of how long the summary is. Without it the link floats directly
   under the text and the row looks ragged. */
.g-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 26px 24px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color .16s ease, box-shadow .16s ease,
              transform .25s ease, background .25s ease;
}

/* ⚠️ ONLY THE OUTLINE CHANGES ON HOVER. The whole card is one <a>, and
   `.doc a:hover { text-decoration: underline }` propagates to every descendant,
   so without this the title and the entire summary underline together. Same fix
   as the comparison cards. */
.gidx-page a.g-card:hover,
.gidx-page a.g-card:focus-visible {
  border-color: var(--gold-soft);
  box-shadow: 0 0 34px -10px oklch(var(--gold-l) var(--gold-c) var(--gold-h) / 0.34);
  text-decoration: none;
  transform: translateY(-3px);
  background: var(--surface);
}
.gidx-page a.g-card:hover .g-title,
.gidx-page a.g-card:focus-visible .g-title { color: oklch(0.99 0.002 80); }
.gidx-page a.g-card:hover .g-title,
.gidx-page a.g-card:hover .g-sum,
.gidx-page a.g-card:hover .g-go { text-decoration: none; }

.g-title {
  font-size: 18.5px; font-weight: 650; letter-spacing: -0.025em;
  line-height: 1.28; color: var(--text); margin: 0 0 10px;
}
.g-sum {
  font-size: 14.5px; line-height: 1.55; color: var(--text-mut); margin: 0;
}
/* margin-top:auto is the whole trick — it pushes this to the bottom of the card. */
.g-go {
  margin-top: auto; padding-top: 18px;
  font-size: 13.5px; font-weight: 550; color: var(--gold);
  display: flex; align-items: center;
}

/* The arrow assembles itself on hover: the head slides right while the shaft
   grows out from a dot behind it. Two absolutely-positioned pieces in a fixed
   34px box, so nothing around them reflows as it animates — a growing arrow
   that nudges the text beside it reads as a layout bug rather than a flourish. */
.g-arrow { position: relative; width: 34px; height: 14px; flex: 0 0 auto; }
.g-chev {
  position: absolute; top: 1px; left: 6.5px; width: 7px; height: 12px; display: block;
  transition: left .3s cubic-bezier(.2, .65, .3, 1);
}
.g-line {
  position: absolute; top: 6px; left: 11px; width: 2px; height: 2px;
  background: currentColor; border-radius: 1px;
  transition: left .3s cubic-bezier(.2, .65, .3, 1),
              width .3s cubic-bezier(.2, .65, .3, 1);
}
.gidx-page a.g-card:hover .g-chev,
.gidx-page a.g-card:focus-visible .g-chev { left: 26.5px; }
.gidx-page a.g-card:hover .g-line,
.gidx-page a.g-card:focus-visible .g-line { left: 12px; width: 20px; }

.g-foot {
  margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--text-mut); font-size: 15.5px;
}
.gidx-page .g-foot a { color: var(--gold); }

@media (max-width: 620px) {
  .g-grid { grid-template-columns: 1fr; gap: 14px; }
  .g-card { min-height: 0; padding: 22px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  /* The arrow is decorative; the destination is already stated in words, so it
     simply arrives in place rather than travelling. */
  .g-card, .g-chev, .g-line { transition: none; }
  .gidx-page a.g-card:hover, .gidx-page a.g-card:focus-visible { transform: none; }
}
