/* XR4HRI — shared styles
   Palette: the physical world is ink on light grey; the virtual layer is "holo" cyan,
   used only for things that are overlays (the ghost arm, current-edition markers, focus). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --bg: #f3f5f4;
  --surface: #e6eaea;
  --ink: #17202b;
  --muted: #56616d;
  --line: #c9d0d4;
  --holo: #0b8fa5;
  --holo-soft: #c4ecf2;

  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --measure: 66ch;
  --page: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f151c;
    --surface: #18212b;
    --ink: #e5ebee;
    --muted: #9ba7b2;
    --line: #2c3743;
    --holo: #3fd0e6;
    --holo-soft: #133b44;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
}

img, svg { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--holo); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--holo); }

:focus-visible { outline: 3px solid var(--holo); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.wordmark {
  font-weight: 800; font-stretch: 125%; font-size: 1.35rem; letter-spacing: 0.01em;
  text-decoration: none;
}
.wordmark span { color: var(--holo); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 0.975rem; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--holo); }

/* ---------- Type ---------- */
h1, h2, h3 { line-height: 1.08; margin: 0 0 0.6em; font-weight: 700; }
h1 { font-stretch: 125%; font-size: clamp(2.3rem, 5.6vw, 4.4rem); letter-spacing: -0.015em; }
h2 { font-stretch: 112%; font-size: clamp(1.55rem, 2.8vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-stretch: 100%; font-size: 1.15rem; margin-bottom: 0.4em; }
p, ul, ol, dl { margin: 0 0 1rem; }
.prose { max-width: var(--measure); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 40ch; }
.small { font-size: 0.9rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2rem 3rem; align-items: center;
  padding-top: clamp(2.5rem, 7vw, 5.5rem); padding-bottom: clamp(2rem, 5vw, 4rem);
}
.hero h1 { margin-bottom: 0.45em; }
.hero-art { justify-self: end; width: 100%; max-width: 30rem; }
.hero-art .real { fill: var(--ink); }
.hero-art .table { stroke: var(--line); stroke-width: 2; }
.hero-art .ghost { fill: none; stroke: var(--holo); stroke-width: 2; stroke-dasharray: 5 4; }
.hero-art .path { fill: none; stroke: var(--holo); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1 7; }
.hero-art .target { fill: var(--holo-soft); stroke: var(--holo); stroke-width: 2; }
.hero-art .ghost-group { animation: project 1.6s ease-out 0.4s both; }
@keyframes project { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; margin-top: 1.75rem; }
.button {
  display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none;
  padding: 0.7rem 1.2rem; border-radius: 3px; font-weight: 600;
}
.button:hover { background: var(--holo); color: var(--bg); }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.section-head { max-width: var(--measure); margin-bottom: 1.75rem; }

.next {
  border-left: 4px solid var(--holo); background: var(--surface);
  padding: 1.5rem 1.75rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: end;
}
.next h2 { margin-bottom: 0.3em; }
.next p { margin: 0; max-width: 58ch; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
.topics ul { padding-left: 1.1rem; margin: 0; }
.topics li { margin-bottom: 0.3rem; }

/* ---------- Editions table ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 36rem; }
th, td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 0.95rem; }
td.year { font-weight: 700; font-stretch: 112%; font-variant-numeric: tabular-nums; width: 5rem; }
tr.xr td.year { color: var(--holo); }
.series-break td { padding-top: 1.5rem; color: var(--muted); font-size: 0.95rem; border-bottom-color: transparent; }

/* ---------- Edition pages ---------- */
.page-head .wrap { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: 2rem; }
.crumb { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 22ch; }
.status {
  border-left: 4px solid var(--holo); background: var(--surface);
  padding: 1rem 1.25rem; max-width: var(--measure); margin: 1.5rem 0 0;
}
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.people { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.9rem 2rem; }
.people li { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.people strong { display: block; font-weight: 600; }
.people span { color: var(--muted); font-size: 0.95rem; }
ol.program { padding-left: 1.3rem; max-width: var(--measure); }
ol.program li { margin-bottom: 0.45rem; padding-left: 0.25rem; }
ol.program li span { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { justify-self: start; max-width: 22rem; order: -1; }
  .next { grid-template-columns: 1fr; }
  .two-col, .tracks { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .ghost-group { animation: none; }
}
