/* ────────────────────────────────────────────────────────────────
   GUNVIR DHESI — EDITION Nº 02 · SWISS POSTER / BRUTALIST EDITORIAL
   Paper white, ink, one red. Rules do the decorating.
   ──────────────────────────────────────────────────────────────── */

:root {
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --red: #E30613;
  --rule: rgba(10, 10, 10, 0.25);      /* thin rules only */
  --rule-red: rgba(227, 6, 19, 0.35);  /* grid overlay only */
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --frame-max: 1360px;
  --frame-pad: clamp(16px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.red { color: var(--red); }
b { font-weight: 700; }

/* Numbers line up in columns: clocks, folios, stats, datelines. */
.topbar__clocks time,
.sec__num,
.stats__n,
.toc__no,
.signal__wire,
.edu__geo {
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}
.skip:focus { top: 8px; }

/* ── Frame: the exposed page grid ────────────────────────────── */

.frame {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--frame-pad);
}
@media (min-width: 900px) {
  .frame {
    border-left: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
  }
}

/* ── Topbar ──────────────────────────────────────────────────── */

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar__item--mid { display: none; }
@media (min-width: 720px) {
  .topbar__item--mid { display: inline; }
}
.topbar__clocks { white-space: nowrap; }
.topbar__clocks time { font-weight: 700; }

/* ── Masthead ────────────────────────────────────────────────── */

.mast { padding: clamp(32px, 5vw, 64px) 0 clamp(24px, 4vw, 48px); }

.mast__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: clamp(16px, 2vw, 24px);
}

.mast__name {
  font-weight: 900;
  font-size: clamp(3.2rem, 11.5vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.mast__line {
  display: block;
  overflow: hidden;
  /* negative tracking pulls the last glyph past the content box —
     pad so overflow:hidden never shaves it (visible at 375px) */
  padding: 0 0.06em 0.05em 0;
}
.mast__line > span { display: inline-block; }
.mast__line--red { color: var(--red); }
.mast__dot { color: var(--red); }

/* Kinetic masthead: letters rise on load. JS-gated; ≤600ms total. */
@media (prefers-reduced-motion: no-preference) {
  html.js .mast__line > span {
    transform: translateY(115%);
    animation: rise 0.3s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
    animation-delay: calc(var(--i) * 18ms);
  }
  /* After the rise (JS adds .mast--done) letters sit still… */
  html.js .mast--done .mast__line > span {
    transform: none;
    animation: none;
  }
  /* …until hovered: one small jiggle, then back to rest. */
  html.js .mast--done .mast__line > span:hover,
  html:not(.js) .mast__line > span:hover {
    animation: jiggle 0.35s ease-in-out;
  }
}
@keyframes rise {
  to { transform: translateY(0); }
}
@keyframes jiggle {
  30% { transform: translateY(-0.035em) rotate(-1.4deg); }
  65% { transform: translateY(0.015em) rotate(0.9deg); }
  100% { transform: none; }
}

.mast__byline { display: flex; align-items: center; gap: 14px; }
.mast__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid var(--ink);
  flex: none;
}
.mast__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 32px;
  margin-top: clamp(24px, 3vw, 40px);
  padding-top: 16px;
  border-top: 1px solid var(--ink);
}
.mast__tag {
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: -0.01em;
}
.mast__now {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Ticker ──────────────────────────────────────────────────── */

.ticker {
  display: block;
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
  background: var(--paper);
}
.ticker__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.ticker__group {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  padding-right: 3em;
}
@media (prefers-reduced-motion: no-preference) {
  .ticker__track { animation: tick 26s linear infinite; }
  /* Pause on hover AND any focus (mouse focus included). */
  .ticker:hover .ticker__track,
  .ticker:focus .ticker__track,
  .ticker:focus-visible .ticker__track { animation-play-state: paused; }
}
/* Slower crawl on small screens — same distance, more time. */
@media (prefers-reduced-motion: no-preference) and (max-width: 719px) {
  .ticker__track { animation-duration: 40s; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__group + .ticker__group { display: none; }
}
@keyframes tick {
  to { transform: translateX(-50%); }
}

/* ── Education band ──────────────────────────────────────────── */

.edu {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.edu__inner { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 56px); }
@media (min-width: 900px) {
  .edu .frame { border-color: var(--paper); }
}
.edu__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 24px;
  margin-bottom: 16px;
}
.edu__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red);
}
/* Marginalia: where the plate was printed. */
.edu__geo {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.edu__line {
  font-weight: 900;
  font-size: clamp(1.6rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.edu__coop { font-weight: 400; }
.edu__sub {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Sections ────────────────────────────────────────────────── */

.sec {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--ink);
  padding: clamp(24px, 4vw, 48px) 0;
  gap: clamp(16px, 2.5vw, 32px);
}
@media (min-width: 900px) {
  .sec { grid-template-columns: 220px 1fr; }
  .sec__head { border-right: 1px solid var(--rule); padding-right: 24px; }
}

.sec__num {
  display: block;
  color: var(--red);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.sec__title {
  margin-top: 8px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Scroll reveal — motion only with JS on and no reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ── 01 Stats ────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  /* Rules run full-bleed: past the frame padding to the page edge. */
  margin: 0 calc(-1 * var(--frame-pad));
}
.stats__cell:nth-child(even) { border-right: 0; }
@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
    /* Head column sits left; bleed to the frame's right rule only. */
    margin: 0 calc(-1 * var(--frame-pad)) 0 0;
    border-left: 1px solid var(--ink);
  }
  .stats__cell:nth-child(even) { border-right: 1px solid var(--ink); }
  .stats__cell:last-child { border-right: 0; }
}
.stats__cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(16px, 2.5vw, 28px);
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stats__n {
  order: -1;
  font-weight: 900;
  font-size: clamp(3.4rem, 8.5vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.stats__cell:nth-child(3) .stats__n { color: var(--red); }
.stats__l {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}

/* ── 02 Index of works ───────────────────────────────────────── */

/* Rows carry 8px side padding for the hover plate; the -8px margin
   keeps their text on the same grid line as everything else. */
.toc { list-style: none; border-top: 1px solid var(--ink); margin: 0 -8px; }

.toc__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid var(--ink);
}
@media (min-width: 720px) {
  .toc__row { grid-template-columns: 72px 1fr 200px; }
}

.toc__no {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}
.toc__main { display: block; }
.toc__name {
  display: block;
  font-weight: 900;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}
/* Leader dots run from the title to the meta column. */
@media (min-width: 720px) {
  .toc__name { display: flex; align-items: baseline; }
  .toc__name::after {
    content: "";
    flex: 1 1 auto;
    min-width: 32px;
    margin: 0 4px 0 16px;
    border-bottom: 2px dotted var(--rule);
  }
}
.toc__desc {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}
.toc__meta {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .toc__meta { grid-column: auto; text-align: right; }
}

.toc__flag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--red);
}
.toc__arrow { color: var(--red); font-weight: 400; }

/* Whole-row inversion on hover/focus: red display type on ink —
   folio number, title and leaders all go red together. */
a.toc__row:hover,
a.toc__row:focus-visible,
div.toc__row:hover {
  background: var(--ink);
  color: var(--paper);
}
a.toc__row:hover .toc__no,
a.toc__row:focus-visible .toc__no,
div.toc__row:hover .toc__no,
a.toc__row:hover .toc__name,
a.toc__row:focus-visible .toc__name,
div.toc__row:hover .toc__name { color: var(--red); }
a.toc__row:hover .toc__name::after,
a.toc__row:focus-visible .toc__name::after,
div.toc__row:hover .toc__name::after { border-bottom-color: var(--red); }
.toc__row:hover .toc__flag { background: var(--paper); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .toc__row { transition: background-color 0.12s linear, color 0.12s linear; }
}

.toc__also {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.toc__link { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.toc__link:hover,
.toc__link:focus-visible { color: var(--red); text-decoration-color: var(--red); }

.toc__chip { cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.toc__chip:hover, .toc__chip:focus-visible { color: var(--red); text-decoration-color: var(--red); }

/* the clickable rows/chips above open this — same paper/ink/red
   discipline, sharp corners, no border-radius anywhere in this theme */
dialog.pmodal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(640px, 92vw);
  max-height: 85vh;
  color: var(--ink);
  font-family: var(--sans);
}
dialog.pmodal::backdrop { background: rgba(10, 10, 10, 0.6); }
@media (prefers-reduced-motion: no-preference) {
  dialog.pmodal { animation: pmodal-in 160ms ease; }
  @keyframes pmodal-in { from { opacity: 0; } }
}
.pmodal__panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 32px;
  max-height: 85vh;
  overflow-y: auto;
}
.pmodal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
}
.pmodal__close:hover { background: var(--ink); color: var(--paper); }
.pmodal__eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 2rem 0.6rem 0;
}
.pmodal__title {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 2rem 1rem 0;
  text-transform: uppercase;
}
.pmodal__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 1rem;
}
.pmodal__gallery img {
  width: 100%;
  aspect-ratio: 16 / 10; /* height derives from width — robust in a grid regardless of load state */
  height: auto;
  object-fit: cover;
  border: 1px solid var(--ink);
  filter: grayscale(1) contrast(1.05);
}
.pmodal__desc { font-size: 15px; line-height: 1.6; margin: 0 0 1.2rem; }
.pmodal__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.pmodal__links a {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 5px 12px;
  text-decoration: none;
}
.pmodal__links a:hover { background: var(--ink); color: var(--paper); }

/* Row thumbnail: a real photo, held to the strict paper/ink/red
   palette with a grayscale+contrast filter. Editorial, not hero —
   capped small so it never fights the row's type. */
.toc__main--img {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.toc__thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 96px;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid var(--ink);
}
.toc__main-text { min-width: 0; }
@media (min-width: 480px) {
  .toc__thumb { width: 56px; height: 122px; }
}
a.toc__row:hover .toc__thumb,
a.toc__row:focus-visible .toc__thumb { border-color: var(--paper); }

/* ── 03 Record ───────────────────────────────────────────────── */

.cv { list-style: none; border-top: 1px solid var(--ink); margin: 0 -8px; }
.cv__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 2px 20px;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid var(--ink);
}
@media (min-width: 720px) {
  .cv__row { grid-template-columns: 72px 260px 1fr; }
}
.cv__when {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.cv__role {
  font-weight: 900;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.cv__org { grid-column: 2; font-size: 14px; }
@media (min-width: 720px) {
  .cv__org { grid-column: auto; }
}

/* Awards: a quieter row list under the record — same rule system,
   smaller type, no folio numbers (these are honours, not works). */
.awards {
  list-style: none;
  margin-top: 24px;
  border-top: 1px dotted var(--rule);
}
.awards__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.awards__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: auto;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid var(--ink);
}
.awards__text b { color: var(--red); }

/* ── 04 Signal ───────────────────────────────────────────────── */

/* Set like wire copy: WATERLOO, JUL 2 (SIGNAL) — headline. */
.signal__note {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 60ch;
}
.signal { list-style: none; border-top: 1px solid var(--ink); margin: 0 -8px; }
.signal__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--ink);
}
.signal__wire {
  flex: 1 1 36ch;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}
.signal__dateline {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.signal__source { font-weight: 700; letter-spacing: 0.06em; }
.signal__type {
  padding: 2px 8px;
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.signal__title { font-weight: 400; }
a.signal__title {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
a.signal__title:hover,
a.signal__title:focus-visible { color: var(--red); text-decoration-color: var(--red); }

/* wire photos run like newsprint: ink frame, no color */
.signal__img {
  display: block;
  margin-top: 8px;
  max-width: min(100%, 300px);
  max-height: 180px;
  border: 1px solid var(--ink);
  filter: grayscale(1) contrast(1.05);
}

.signal__empty {
  padding: 16px 8px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 13px;
}
.signal__empty a { color: var(--red); font-weight: 700; }

.signal__links {
  display: flex;
  gap: 28px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.signal__links a:hover,
.signal__links a:focus-visible { color: var(--red); }

/* ── 05 Contact ──────────────────────────────────────────────── */

.contact { list-style: none; border-top: 1px solid var(--ink); margin: 0 -8px; }
.contact__row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: baseline;
  padding: 16px 8px;
  border-bottom: 1px solid var(--ink);
}
.contact__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.contact__value {
  font-weight: 900;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.contact__arrow { font-weight: 900; }
.contact__row:hover,
.contact__row:focus-visible {
  background: var(--red);
  color: var(--paper);
}
.contact__row:hover .contact__label,
.contact__row:focus-visible .contact__label { color: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .contact__row { transition: background-color 0.12s linear, color 0.12s linear; }
}

/* ── Colophon ────────────────────────────────────────────────── */

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 24px 0 96px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.colophon__hint kbd {
  font-family: inherit;
  border: 1px solid var(--ink);
  padding: 1px 5px;
}

/* ── Theme switcher ──────────────────────────────────────────── */

.themes {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 100;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.themes__label { text-transform: lowercase; }
.themes a { font-weight: 700; }
.themes a:hover,
.themes a:focus-visible { color: var(--red); }
.themes a.is-current {
  color: var(--paper);
  background: var(--red);
  padding: 1px 5px;
}

/* ── Grid hint: discreet [G] chip, bottom-left ───────────────── */

.grid-hint {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.grid-hint:hover { color: var(--red); border-color: var(--red); }
.grid-hint[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
/* No JS → no toggle → no button. The colophon hint still reads. */
html:not(.js) .grid-hint { display: none; }

/* ── Grid overlay (press G) ──────────────────────────────────── */

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  /* baseline rows — thin rules, allowed */
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule) 0,
    var(--rule) 1px,
    transparent 1px,
    transparent 8px
  );
}
.grid-overlay__cols {
  height: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--frame-pad);
  background-clip: content-box;
  background-origin: content-box;
  background-image: repeating-linear-gradient(
    to right,
    var(--rule-red) 0,
    var(--rule-red) 1px,
    transparent 1px,
    transparent calc((100% - 1px) / 12)
  );
  border-left: 1px solid var(--rule-red);
  border-right: 1px solid var(--rule-red);
}

/* persona trio = cross-theme switcher — metallic gold + a subtle shimmer
   (glow is invisible on white paper, so the attention cue is a color pulse) */
.persona a {
  color: #9a7400;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.persona a:hover { color: #b8860b; border-bottom-color: #c8a415; text-decoration: none; }
.persona a[aria-current] { color: #b8860b; border-bottom: 2px solid #c8a415; }
@media (prefers-reduced-motion: no-preference) {
  .persona a { animation: persona-shimmer 2.8s ease-in-out infinite; }
  .persona a:nth-of-type(2) { animation-delay: 0.3s; }
  .persona a:nth-of-type(3) { animation-delay: 0.6s; }
  .persona a:hover { animation: none; }
}
@keyframes persona-shimmer {
  0%, 100% { color: #9a7400; }
  50% { color: #d4a017; }
}
