/* Guides in the new design. Built on /assets/ds/styles.css (tokens and
   components); everything here is a token or a mix of tokens. Day for reading:
   the article sits on paper at 68ch; the guide's own graphics run wider than
   the text; night is kept for the calculator result and the next step. */

[hidden] { display: none !important; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.gd-hero { padding-block: var(--space-6) var(--space-10); border-bottom: 1px solid var(--color-divider); }
.gd-hero-grid { display: grid; gap: var(--space-8); }
.gd-hero-main { display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.gd-crumbs ol { row-gap: 2px; }
.gd-crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.gd-hero h1 { display: grid; gap: var(--space-3); }
.gd-h1-main { font-size: var(--text-h1); }
.gd-h1-sub {
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-text-2);
}
.gd-byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); font-size: var(--text-sm); color: var(--color-muted); }
.gd-author { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 700; color: var(--color-text); }
.gd-author img { width: 28px; height: 28px; border-radius: 8px; }

/* The answer: a plain surface with a night tag, never a side stripe */
.gd-answer { display: grid; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.gd-answer-tag {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-night);
  color: var(--color-on-night);
  font-family: var(--font-heading);
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.gd-answer-tag .i { width: 15px; height: 15px; color: var(--color-glow); }
.gd-answer > p:last-child { font-size: 1.0625rem; line-height: 1.6; color: var(--color-text-2); max-width: 62ch; }
@media (min-width: 768px) { .gd-answer > p:last-child { font-size: var(--text-lead); } }

/* At a glance: the cover from the night world, then four readings */
.gd-glance { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.gd-cover { overflow: hidden; border-radius: var(--radius-lg); background: var(--color-night); aspect-ratio: 16 / 9; }
.gd-cover img { width: 100%; height: 100%; object-fit: cover; }
.gd-glance-h { font-family: var(--font-heading); font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-accent-ink); }
.gd-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--color-divider); }
.gd-readings > div { display: grid; gap: 6px; padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 1px solid var(--color-divider); min-width: 0; }
.gd-readings > div:nth-child(even) { padding-left: var(--space-4); border-left: 1px solid var(--color-divider); }
.gd-readings dt { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.gd-readings .reading .unit, .gd-history .reading .unit { margin-left: 3px; font-size: 0.58em; }
.gd-bar .reading .unit { font-size: 0.72em; }

@media (min-width: 981px) {
  .gd-h1-sub { max-width: 34ch; }
  .gd-hero { padding-block: var(--space-8) var(--space-16); }
  .gd-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: start; }
  .gd-glance { margin-top: var(--space-10); }
}

/* ── Layout: contents rail and the article ─────────────────────────────── */
.gd-layout { display: grid; gap: var(--space-8); padding-block: var(--space-8) var(--space-16); }
.gd-article { display: grid; gap: var(--space-16); min-width: 0; counter-reset: sec; }

/* Contents: a swipe row on phones, a numbered rail on desktop */
.gd-toc { min-width: 0; }
.gd-toc-h { font-family: var(--font-heading); font-size: var(--text-eyebrow); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-2); }
.gd-toc ol {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.gd-toc ol::-webkit-scrollbar { display: none; }
.gd-toc li { flex: none; scroll-snap-align: start; }
.gd-toc a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target);
  padding: 0 var(--space-4) 0 var(--space-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.gd-toc-n {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-surface-2);
  font-family: var(--font-figure);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-accent-ink);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-state) var(--ease-out), color var(--dur-state) var(--ease-out);
}
.gd-toc a:hover { border-color: var(--color-accent-ink); color: var(--color-accent-ink); }
.gd-toc a[aria-current="true"] { color: var(--color-text); font-weight: 700; }
.gd-toc a[aria-current="true"] .gd-toc-n { background: var(--color-night); color: var(--color-glow); }

@media (min-width: 981px) {
  .gd-layout { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-12); padding-block: var(--space-12) var(--space-24); }
  .gd-toc { position: sticky; top: calc(var(--head-h) + var(--space-8)); align-self: start; }
  .gd-toc ol { display: grid; gap: 2px; overflow: visible; margin: 0; padding: 0; }
  .gd-toc a { display: flex; min-height: var(--target); padding: 0 var(--space-2); border: 0; background: none; border-radius: var(--radius-sm); white-space: normal; line-height: 1.3; }
  .gd-toc a:hover { background: var(--color-surface-2); }
}

/* ── The article ───────────────────────────────────────────────────────── */
.gd-takeaways { max-width: var(--measure); }
.gd-takeaways ul { font-size: 1rem; line-height: 1.55; }
.gd-intro { max-width: var(--measure); }
.gd-intro p { font-size: var(--text-lead); line-height: 1.65; color: var(--color-text-2); }

.gd-sec {
  display: grid;
  gap: 1.1em;
  align-content: start;
  min-width: 0;
  font-size: var(--text-article);
  line-height: 1.7;
  color: var(--color-text-2);
}
.gd-sec > * { max-width: var(--measure); min-width: 0; }
.gd-sec > .gd-wide { max-width: none; }
.gd-sec > h2 { font-size: var(--text-h2); margin-bottom: 0.15em; }
.gd-sec > h2::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-figure);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}
.gd-sec > h3 { margin-top: var(--space-6); }
.gd-sec ul { padding-left: 1.3em; }
.gd-sec ul li + li { margin-top: 0.45em; }
.gd-sec ul li::marker { color: var(--color-accent); }
.gd-sec hr { border: 0; border-top: 1px solid var(--color-divider); }
.gd-note { font-size: var(--text-sm); line-height: 1.55; color: var(--color-muted); }

/* Lists of terms ("**7kW:** adds about 24 miles an hour") */
.gd-deflist { display: grid; border-top: 1px solid var(--color-divider); }
.gd-deflist > div { display: grid; gap: var(--space-1); padding-block: var(--space-4); border-bottom: 1px solid var(--color-divider); }
.gd-deflist dt { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--color-text); }
.gd-deflist dd { font-size: 1rem; line-height: 1.6; }
.gd-deflist dd::first-letter { text-transform: uppercase; }
@media (min-width: 768px) {
  .gd-deflist:not(.is-long) > div { grid-template-columns: 13rem minmax(0, 1fr); gap: var(--space-6); }
}

/* Numbered steps */
.gd-steps { list-style: none; counter-reset: step; display: grid; gap: 0; }
.gd-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-4); padding-bottom: var(--space-5); }
.gd-steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-night);
  color: var(--color-on-night);
  font-family: var(--font-figure);
  font-weight: 800;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.gd-steps li:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 44px; bottom: 4px; width: 1px; background: var(--color-divider-strong); }
.gd-steps p { padding-top: 6px; font-size: 1rem; line-height: 1.6; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.gd-table-wrap { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--color-divider); border-radius: var(--radius-lg); background: var(--color-surface); }
.gd-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
.gd-table th, .gd-table td { padding: var(--space-3) var(--space-5); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--color-divider); }
.gd-table thead th { font-size: var(--text-sm); font-weight: 700; color: var(--color-muted); background: var(--color-surface-2); white-space: nowrap; }
.gd-table tbody th { font-weight: 700; color: var(--color-text); }
.gd-table tbody tr:last-child > * { border-bottom: 0; }

/* Stacked rows on phones: each row reads as a small card, labels from data-label */
@media (max-width: 767px) {
  .gd-table--stack thead, .gd-table--miles thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gd-table--stack, .gd-table--stack tbody, .gd-table--miles, .gd-table--miles tbody { display: block; }
  .gd-table--stack tr, .gd-table--miles tr { display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-divider); }
  .gd-table--stack tbody tr:last-child, .gd-table--miles tbody tr:last-child { border-bottom: 0; }
  .gd-table--stack th, .gd-table--stack td, .gd-table--miles th, .gd-table--miles td { display: block; padding: 0; border: 0; }
  .gd-table--stack tbody th, .gd-table--miles tbody th { margin-bottom: var(--space-1); font-size: 1rem; }
  .gd-table--stack td[data-label], .gd-table--miles td[data-label] { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: var(--space-3); }
  .gd-table--stack td[data-label]::before, .gd-table--miles td[data-label]::before { content: attr(data-label); font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); }
}

/* ── Figures: the guide's own graphics ─────────────────────────────────── */
.gd-figure { display: grid; gap: var(--space-4); margin-block: var(--space-2); }
.gd-fig-head { display: grid; gap: var(--space-1); }
.gd-fig-title { font-family: var(--font-heading); font-size: var(--text-h3); font-weight: 700; line-height: 1.25; letter-spacing: -0.012em; color: var(--color-text); }

/* Bars on one scale, with an energy-label tip */
.gd-bar { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.gd-track { position: relative; flex: 1; min-width: 72px; height: 14px; border-radius: 3px; background: var(--color-surface-2); }
.gd-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v, 0%);
  min-width: 10px;
  border-radius: 3px 0 0 3px;
  background: var(--color-accent);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
  transform-origin: left center;
}
.gd-fill.is-home { background: var(--color-night); }
.gd-bar .reading { min-width: 3.4rem; justify-content: flex-end; }
.gd-mark {
  position: absolute;
  left: var(--m);
  top: -5px;
  bottom: -5px;
  width: 2px;
  margin-left: -1px;
  background: repeating-linear-gradient(180deg, var(--color-text) 0 3px, transparent 3px 5px);
}
.gd-legend { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-muted); line-height: 1.45; }
.gd-key { flex: none; width: 2px; height: 18px; background: repeating-linear-gradient(180deg, var(--color-text) 0 3px, transparent 3px 5px); }

@media (prefers-reduced-motion: no-preference) {
  .gd-figure.is-armed .gd-fill { transform: scaleX(0); }
  .gd-figure.is-in .gd-fill { transform: scaleX(1); transition: transform var(--dur-fill) var(--ease-expo); }
  .gd-figure.is-in tr:nth-child(2) .gd-fill { transition-delay: var(--stagger); }
  .gd-figure.is-in tr:nth-child(3) .gd-fill { transition-delay: calc(2 * var(--stagger)); }
  .gd-figure.is-in tr:nth-child(4) .gd-fill { transition-delay: calc(3 * var(--stagger)); }
  .gd-figure.is-in tr:nth-child(5) .gd-fill { transition-delay: calc(4 * var(--stagger)); }
  .gd-figure.is-in tfoot .gd-fill { transition-delay: calc(5 * var(--stagger)); }
}

/* The price ladder */
.gd-table--ladder th:first-child { width: 11rem; }
.gd-table--ladder .gd-cable-cell { width: 1%; white-space: nowrap; }
.gd-kw { display: block; font-family: var(--font-figure); font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; color: var(--color-text); }
.gd-sub { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.gd-table--ladder tbody td, .gd-table--ladder tbody th { padding-block: var(--space-4); }
.gd-table tfoot tr.is-home > * { background: var(--color-accent-100); border-top: 1px solid var(--color-accent-200); border-bottom: 0; padding-block: var(--space-4); }
.gd-table tfoot tr.is-home .gd-track { background: var(--color-surface); }
@media (max-width: 767px) {
  .gd-table--ladder thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gd-table--ladder tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name cable" "bar bar";
    gap: var(--space-2) var(--space-3);
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
  }
  .gd-table--ladder tbody tr:last-child { border-bottom: 0; }
  .gd-table--ladder, .gd-table--ladder tbody, .gd-table--ladder tfoot { display: block; }
  .gd-table--ladder tbody th, .gd-table--ladder tbody td, .gd-table--ladder tfoot th, .gd-table--ladder tfoot td { display: block; width: auto; padding: 0; border: 0; }
  .gd-table--ladder th { grid-area: name; }
  .gd-table--ladder .gd-cable-cell { grid-area: cable; justify-self: end; width: auto; }
  .gd-table--ladder th:first-child { width: auto; }
  .gd-table--ladder .gd-bar-cell { grid-area: bar; }
  .gd-table--ladder .gd-kw { display: inline; margin-right: var(--space-2); }
  .gd-table--ladder .gd-sub { display: inline; }
  .gd-table--ladder .is-home .gd-sub { display: block; margin-top: 2px; }
  .gd-table tfoot tr.is-home { background: var(--color-accent-100); border-top: 1px solid var(--color-accent-200); }
  .gd-table tfoot tr.is-home > * { background: none; border: 0; padding: 0; }
  .gd-table--ladder .chip { font-size: var(--text-xs); min-height: 26px; padding: 2px 10px; }
}

/* The 100 miles table: cost drawn to scale */
.gd-table--miles .gd-bar-cell { min-width: 14rem; }
.gd-table--miles tr.is-home > * { background: var(--color-accent-100); }
@media (max-width: 767px) {
  .gd-table--miles tr.is-home { background: var(--color-accent-100); }
  .gd-table--miles tr.is-home > * { background: none; }
  .gd-table--miles .gd-bar-cell { min-width: 0; }
  .gd-table--miles td.gd-bar-cell[data-label] { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); margin-block: var(--space-1); }
  .gd-table--miles td[data-label] { grid-template-columns: 8.5rem minmax(0, 1fr); }
}

/* Price history of a 7kW charge */
.gd-history-steps { list-style: none; display: grid; gap: var(--space-3); }
.gd-history-steps li { position: relative; display: grid; gap: var(--space-1); align-content: start; padding: var(--space-4) var(--space-5); border: 1px solid var(--color-divider); border-radius: var(--radius-md); background: var(--color-surface); }
.gd-when { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.gd-history-steps .is-now { background: var(--color-night); border-color: var(--color-night); }
.gd-history-steps .is-now .gd-when { color: var(--color-on-night-muted); }
.gd-history-steps .is-now .reading { color: var(--color-surface); }
.gd-history-steps .is-now .reading .unit { color: var(--color-on-night-muted); }
@media (min-width: 600px) {
  .gd-history-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
  .gd-history-steps li + li::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--space-6) + 4px);
    top: 50%;
    width: calc(var(--space-6) - 8px);
    height: 16px;
    margin-top: -8px;
    background: var(--color-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* ── Calculator ────────────────────────────────────────────────────────── */
.gd-calc { margin-block: var(--space-6) var(--space-2); }
.gd-calc .tool { box-shadow: var(--shadow-md); }
.gd-calc .tool:has(> form[hidden]) { grid-template-columns: minmax(0, 1fr); }
.gd-calc-head { display: grid; gap: var(--space-1); }
.gd-calc-head h3 { margin: 0; }
.gd-seg { border: 0; display: grid; gap: var(--space-2); }
.gd-seg legend, .gd-range label, .gd-calc .field > label { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); }
.gd-seg legend { margin-bottom: var(--space-2); }
.gd-seg-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.gd-seg-opts label { position: relative; display: block; cursor: pointer; }
.gd-seg-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.gd-seg-opts span {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-divider-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color var(--dur-state) var(--ease-out), background-color var(--dur-state) var(--ease-out), box-shadow var(--dur-state) var(--ease-out);
}
.gd-seg-opts b { font-family: var(--font-figure); font-size: 1.0625rem; font-weight: 800; color: var(--color-text); }
.gd-seg-opts small { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.gd-seg-opts label:hover span { border-color: var(--color-accent-500); }
.gd-seg-opts input:checked + span { border-color: var(--color-accent-ink); background: var(--color-accent-100); box-shadow: inset 0 0 0 1px var(--color-accent-ink); }
.gd-seg-opts input:focus-visible + span { outline: 2px solid var(--color-accent-ink); outline-offset: 3px; }
.gd-range label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.gd-range output { font-family: var(--font-figure); font-weight: 800; color: var(--color-accent-ink); font-variant-numeric: tabular-nums; }
.gd-range input[type="range"] { width: 100%; min-height: var(--target); accent-color: var(--color-accent); cursor: pointer; }
.gd-calc-pair { display: grid; gap: var(--space-4); }
.gd-calc .result-sentence { font-size: var(--text-lead); max-width: 40ch; }
.gd-calc-note { font-size: var(--text-sm); line-height: 1.5; color: var(--color-on-night); max-width: 52ch; }
.gd-calc-note:empty { display: none; }
.gd-calc .meter-bar i { transition: width var(--dur-reveal) var(--ease-expo); }
.gd-calc-fine { max-width: 52ch; }

/* ── In-article advertising ────────────────────────────────────────────── */
.gd-ad { display: grid; gap: var(--space-2); max-width: var(--measure); padding-top: var(--space-3); border-top: 1px solid var(--color-divider); }
.gd-ad-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); }
.gd-ad ins { display: block; min-height: 280px; border-radius: var(--radius-md); background: color-mix(in oklch, var(--color-surface-2) 60%, transparent); }
/* AdSense marks a slot it will not serve "unfilled" or "unfill-optimized": collapse both. */
.gd-ad:has(ins[data-ad-status^="unfill"]) { display: none; }
@media (min-width: 981px) { .gd-ad ins { min-height: 250px; } }

/* ── Questions and sources ─────────────────────────────────────────────── */
.gd-faqs .faq { max-width: var(--measure); }
.gd-faqs .faq summary { font-size: 1.0625rem; line-height: 1.4; }
.gd-faqs .faq-a { font-size: 1rem; line-height: 1.65; }
.gd-source-list { list-style: none; display: grid; padding: 0 !important; border-top: 1px solid var(--color-divider); }
.gd-source-list li { display: grid; gap: 2px; padding-block: var(--space-3); border-bottom: 1px solid var(--color-divider); margin: 0 !important; }
.gd-source-list a { display: inline-flex; align-items: baseline; gap: 6px; font-size: 1rem; font-weight: 600; line-height: 1.45; }
.gd-source-list a .i { position: relative; top: 2px; color: var(--color-muted); }
.gd-source-list span { font-size: var(--text-sm); color: var(--color-muted); }
.gd-sources .fine { font-size: var(--text-sm); }
.gd-sec.gd-sources > h2 { font-size: var(--text-h3); }

/* ── Next step (night) and related guides ──────────────────────────────── */
.gd-next { padding-bottom: 0; }
.gd-next-panel p { margin-top: var(--space-3); font-size: var(--text-lead); line-height: 1.55; color: var(--color-on-night); max-width: 52ch; }
.gd-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
@media (min-width: 981px) { .gd-next-actions { flex-direction: column; align-items: stretch; } .gd-next-actions .link-arrow { justify-content: center; } }

.gd-related-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6); margin-bottom: var(--space-6); }
.gd-related-head h2 { font-size: var(--text-h2); }
.gd-cards { list-style: none; display: grid; gap: var(--space-8) var(--space-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.gd-card { position: relative; display: grid; gap: var(--space-3); align-content: start; }
.gd-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); background: var(--color-night); }
.gd-card h3 { font-size: 1.0625rem; line-height: 1.35; }
.gd-card h3 a { color: var(--color-text); text-decoration: none; }
.gd-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.gd-card:hover h3 a { color: var(--color-accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.gd-card h3 a:focus-visible { outline: none; }
.gd-card h3 a:focus-visible::after { outline: 2px solid var(--color-accent-ink); outline-offset: 4px; }
.gd-card-meta { font-size: var(--text-sm); color: var(--color-muted); }
