@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f1efe9; --ink: #1b1e21; --mute: #53595e; --joint: #d9d5cc;
  --shutter: rgba(5, 5, 5, .94);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(1rem, 4vw, 3rem);
  /* Shared two-column grid: the introduction and row labels on the left; the artwork and row text start on one line */
  --side: clamp(14rem, 20vw, 16rem); --col-gap: 2rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  font-synthesis: none; overflow-wrap: break-word;
}
h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration-color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -6rem; z-index: 10; padding: .6rem .9rem; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font: 400 1rem/1.2 var(--sans); }
.skip:focus { top: 1rem; }

.wrap { max-width: 76rem; margin: 0 auto; padding: 0 var(--pad); }

/* Masthead: compact upright Archivo name, small mono navigation */
.site-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .25rem 2rem; padding: clamp(1.25rem, 3vw, 2rem) 0 .55rem; border-bottom: 3px solid var(--ink); }
.name { margin: 0; color: var(--ink); font-family: var(--sans); font-size: clamp(2.75rem, 2rem + 2.2vw, 4rem); font-weight: 800; font-stretch: 76%; line-height: .86; letter-spacing: -.012em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font: 400 .875rem/1 var(--mono); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Research status */
.draft { display: inline-block; padding: .2em .5em .15em; border: 1px solid var(--ink); color: var(--ink); font: 400 .75rem/1.2 var(--mono); letter-spacing: .02em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: 0 0 .75rem; }

/* Home lead: introduction in a narrow column, artwork at right */
.lead {
  display: grid; grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-areas: "intro art";
  align-items: start; gap: 1.75rem var(--col-gap);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 clamp(2rem, 4vw, 2.75rem);
}
.lead .lead-copy { grid-area: intro; min-width: 0; }
.lead .art { grid-area: art; }
.lede { margin: 0; text-wrap: balance; max-width: 14ch; font-size: clamp(1.5rem, 1.1rem + .9vw, 1.875rem); font-weight: 600; font-stretch: 86%; line-height: 1.08; letter-spacing: -.012em; }
.lead-description { margin: .75rem 0 0; max-width: 24ch; color: var(--ink); font: 400 1rem/1.45 var(--sans); }
.row { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 1.25rem var(--col-gap); }

/* Artwork frame: image and overlay share the same 3:2 box at every width */
.art { margin: 0; min-width: 0; }
.frame { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--joint); }
.frame img, .frame svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.frame svg { pointer-events: none; }
/* Ribbon slats are drawn by curtains.js as an SVG path; CSS supplies colour and the right-hand mask */
.slats {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0 46%, #000 46%);
          mask-image: linear-gradient(90deg, transparent 0 46%, #000 46%);
}
/* Statue artwork only: colour and coded light stay inside the image; page type stays black */
.statue .art .slats { --shutter: rgba(26, 21, 17, .93); }
.statue .frame .light { overflow: hidden; pointer-events: none; user-select: none; }
/* Transparent full-frame pause and resume target: no text, icon or chrome; inset ring for keyboard focus */
.art-pause {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit;
  -webkit-appearance: none; appearance: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.art-pause:focus:not(:focus-visible) { outline: none; }
.art-pause:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; box-shadow: inset 0 0 0 4px var(--paper); }

/* About, Research and Tools */
.row { padding: 1.75rem 0 2rem; border-top: 1px solid var(--joint); }
.row:last-child { border-bottom: 1px solid var(--joint); }
.row-label h2 { font-size: 1.375rem; font-weight: 700; font-stretch: 86%; line-height: 1.15; }
.row-label p { margin: .4rem 0 0; color: var(--mute); font-size: .9375rem; }
.row-body { min-width: 0; }
.entry-summary { max-width: 38em; margin: .75rem 0 0; }
.tools { margin: 0; padding: 0; list-style: none; }
.tools li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .25rem 1.5rem; padding: .9rem 0; }
.tools li:first-child { padding-top: 0; }
.tools li + li { border-top: 1px solid var(--joint); }
.tool-name { margin: 0; font-size: 1.25rem; font-weight: 650; font-stretch: 86%; line-height: 1.3; }
.tool-text p { margin: 0; max-width: 38em; }

/* About: three parts in the row body */
.about-part + .about-part { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--joint); }
.about-title { font-size: 1.25rem; font-weight: 650; font-stretch: 86%; line-height: 1.3; }
.about-part p { max-width: 38em; margin: .35rem 0 0; }

/* Footer links */
.site-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem 2rem; padding: 1.5rem 0 calc(clamp(2.5rem, 6vw, 4rem) + env(safe-area-inset-bottom, 0px)); color: var(--mute); font-size: .875rem; line-height: 1.5; }
.site-foot a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); font-family: var(--mono); }

/* One forthcoming research brief, sharing the homepage's type and rules. */
.entry-title { margin: 0; font-size: 1.25rem; font-weight: 650; font-stretch: 86%; line-height: 1.3; text-wrap: balance; }
.entry-title + .entry-summary { margin-top: .35rem; }
.site-head .name a { color: inherit; text-decoration: none; }
.brief { max-width: 38em; padding: clamp(1.75rem, 4vw, 3rem) 0 2rem; }
.brief p { margin: .6rem 0 0; }
.brief .meta { margin: 0 0 .75rem; }
.brief-title { max-width: 30ch; font-size: clamp(1.75rem, 1.25rem + 1.2vw, 2.5rem); font-weight: 600; font-stretch: 86%; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
.brief .brief-intro { margin: 1rem 0 0; }
.brief h2 { margin: 2rem 0 0; padding-top: .9rem; border-top: 1px solid var(--joint); font-size: 1.25rem; font-weight: 650; font-stretch: 86%; line-height: 1.3; }
.brief .brief-status { margin-top: 2rem; color: var(--mute); }
.brief-back { margin: 0 0 1rem; font: 400 .875rem/1.4 var(--mono); }
.brief-back a { display: inline-flex; align-items: center; min-height: 2.75rem; }

@media (max-width: 900px) {
  .lead { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "art"; gap: 1.25rem; }
  .lede { max-width: 20ch; }
}
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; gap: .9rem; }
  .tools li { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-nav ul { gap: 0 1.1rem; }
}
@media print {
  .site-nav, .skip, .art-pause, .slats, .light { display: none !important; }
}
