/* ===========================================================================
   Deflock — Scene
   ---------------------------------------------------------------------------
   One stylesheet, no build step. It carries, in order:

     1. the four self-hosted faces
     2. the design tokens
     3. the base layer
     4. the page furniture: header, footer, grain
     5. the structures: scenes, heroes, sections, shells, splits
     6. the type scale
     7. links, buttons and form fields
     8. the lists: rows, steps, definitions
     9. panels and asides
    10. motion, and what replaces it when a reader asks for less
    11. the page-specific treatments, which exist because the
        Content-Security-Policy forbids a style attribute

   A value appears once. Anything that could be reused is a token in :root.
   =========================================================================== */

/* --- 1. faces ---------------------------------------------------------------
   Self-hosted, because the footer promises the site loads nothing from a third
   party. IBM Plex Sans and Geist Mono are variable, so one file each covers
   every weight and the rule declares the axis rather than a single number. */

@font-face {
  font-family: "DM Serif Display";
  src: url("/assets/fonts/dm-serif-display-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --- 2. tokens ------------------------------------------------------------- */

:root {

  /* Surface. The page is black. Nothing is a lighter grey; depth comes from
     hairlines and from the photograph underneath. */
  --bg:            #000000;
  --bg-blank:      #05070a;   /* a scene still waiting for its photograph */
  --bg-cell:       #060606;   /* a cell in a ruled grid, just off black so the rules show where they cross */
  --bg-raised:     rgba(255, 255, 255, 0.03);
  --bg-header:     rgba(0, 0, 0, 0.75);

  /* Ink. One colour, eight opacities, and no second text colour. */
  --ink:           #ffffff;
  --ink-90:        rgba(255, 255, 255, 0.90);
  --ink-85:        rgba(255, 255, 255, 0.85);
  --ink-80:        rgba(255, 255, 255, 0.80);
  --ink-75:        rgba(255, 255, 255, 0.75);
  --ink-70:        rgba(255, 255, 255, 0.70);
  --ink-65:        rgba(255, 255, 255, 0.65);
  --ink-60:        rgba(255, 255, 255, 0.60);
  --ink-55:        rgba(255, 255, 255, 0.55);
  --ink-50:        rgba(255, 255, 255, 0.50);

  /* Hairlines. Four weights for four jobs. */
  --line-faint:    rgba(255, 255, 255, 0.05);
  --line:          rgba(255, 255, 255, 0.10);
  --line-mid:      rgba(255, 255, 255, 0.12);
  --line-strong:   rgba(255, 255, 255, 0.15);
  --line-accent:   rgba(0, 184, 212, 0.30);

  /* Accent. The soft value carries links, because it has to stay readable on
     black across a paragraph. The bright value marks the one phrase per page
     that the page is about. */
  --accent:        #00B8D4;
  --accent-bright: #22D3EE;
  --accent-soft:   rgba(0, 184, 212, 0.80);

  /* State, used by the contact form notices. */
  --state-ok:      #0E8A5F;
  --state-risk:    #DC3D43;

  /* Faces. Four, four jobs, no overlap. */
  --face-display:  "DM Serif Display", Georgia, "Times New Roman", serif;
  --face-word:     "Instrument Serif", Georgia, serif;
  --face-text:     "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --face-mono:     "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Display sizes. Fluid, one weight, tracked tight. Line height falls as size
     rises: a 112px heading at 1.05 reads loose; the same heading at 0.92 reads
     as one block. */
  --display-1:     clamp(2.75rem, 7vw, 7rem);
  --display-3:     clamp(2.5rem, 5vw, 5rem);
  --display-scene: clamp(2.25rem, 4.6vw, 3.75rem);
  --head-section:  clamp(2rem, 4vw, 3.5rem);
  --head-block:    1.875rem;

  --lh-tightest:   0.92;
  --lh-tighter:    0.95;
  --lh-tight:      1.05;
  --track-display: -0.025em;

  /* Text sizes. */
  --t-lede:        1.125rem;
  --t-lede-lg:     1.25rem;
  --t-body:        1rem;
  --t-small:       0.875rem;
  --t-fine:        0.75rem;
  --t-mono:        0.6875rem;
  --t-script:      0.8125rem;
  --lh-prose:      1.625;
  --lh-body:       1.5;
  --lh-script:     1.75;

  --track-eyebrow: 0.14em;
  --track-mono:    0.08em;
  --track-badge:   0.12em;
  --track-accent:  0.20em;
  --track-script:  0.02em;

  /* Layout. Three widths, one gutter, one reading measure. */
  --shell-narrow:  64rem;
  --shell:         72rem;
  --shell-wide:    80rem;
  --gutter:        1.5rem;
  --measure:       42rem;
  --measure-tight: 36rem;

  /* Rhythm. */
  --bay:           6rem;
  --bay-tight:     5rem;
  --bay-close:     8rem;
  --hero-top:      clamp(9rem, 11vw, 11rem);
  --hero-bottom:   4rem;
  --scene-pad:     4rem;

  /* Shape. Almost nothing is rounded. */
  --radius-btn:    0.375rem;   /* deviates from stock Scene, which is a full pill */
  --radius-panel:  1rem;
  --radius-field:  0.5rem;

  /* Motion. */
  --ease-reveal:   cubic-bezier(0.165, 0.84, 0.44, 1);
  --hover-dur:     300ms;
  --reveal-rise:   0.55em;

  /* Media. */
  --media-opacity: 0.55;
  --media-opacity-hero: 0.65;
  --grain-opacity: 0.06;
  --grain-tile:    200px;

  /* The fixed header's height, used by anything that has to clear it. */
  --header-h:      5rem;

  color-scheme: dark;
}

/* --- 3. base --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--face-text);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, dl, figure, pre { margin: 0; }

ul, ol { padding: 0; list-style: none; }

a { color: var(--accent-soft); text-decoration: none; transition: color var(--hover-dur); }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: #000; }

:focus-visible { outline: 2px solid var(--ink-70); outline-offset: 4px; }

/* The first thing in the tab order, hidden until it is focused. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: #000;
  padding: 0.75rem 1.25rem;
  font-size: var(--t-small);
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  color: #000;
}

/* --- 4. furniture ---------------------------------------------------------- */

/* One fixed film over the whole page, so every screen shares the same grain.
   Without it the black reads as screen black and the photographs look pasted
   on. The tile is generated, so no image file ships for it. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: var(--grain-tile) var(--grain-tile);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* Transparent over the first screen, solid once the page has moved. The change
   is the only thing that tells a reader they have left the top. */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--hover-dur), border-color var(--hover-dur), backdrop-filter var(--hover-dur);
}
.site-header[data-scrolled="true"] {
  background: var(--bg-header);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
}
.site-header__bar {
  max-width: var(--shell-wide);
  margin-inline: auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* The site name, set in the one face that sets nothing else. */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--face-word);
  font-size: 1.5rem;
  letter-spacing: var(--track-display);
  color: var(--ink-90);
}
.wordmark:hover { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; font-size: var(--t-small); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink-60);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }

/* The hidden attribute hides an element through a rule in the browser's own
   stylesheet, which any author rule setting display outranks. The menu and its
   button both set display, so without these two selectors the script can set
   hidden all it likes and nothing moves. */
.site-nav[hidden],
.nav-toggle[hidden] { display: none; }

/* The menu button appears only where the row of links will not fit. The markup
   ships with the nav open, so the menu still works with scripting off. */
.nav-toggle {
  display: none;
  min-height: 48px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--ink-60);
  font-family: var(--face-mono);
  font-size: var(--t-fine);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--hover-dur);
}
.nav-toggle:hover { color: var(--ink); }

@media (max-width: 48rem) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg-header);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .site-nav a { width: 100%; font-size: var(--t-body); }
  .site-header__bar { position: relative; }
}

/* --- footer ---------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: var(--bay) var(--gutter) 3rem;
}
.site-footer__cols {
  max-width: var(--shell-wide);
  margin-inline: auto;
  display: grid;
  gap: 3rem 2.5rem;
}
@media (min-width: 40rem) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .site-footer__cols { grid-template-columns: 1.6fr 1.1fr 1fr 1fr; } }

.site-footer .wordmark { min-height: 0; font-size: 1.125rem; color: var(--ink); }
.site-footer .statement {
  margin-top: 1.25rem;
  max-width: 28rem;
  font-family: var(--face-display);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: var(--track-display);
  color: var(--ink);
}
.site-footer h2 {
  margin-bottom: 1rem;
  font-family: var(--face-text);
  font-size: var(--t-fine);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-mono);
  color: var(--ink-50);
}
.site-footer ul { display: grid; gap: 0.5rem; font-size: var(--t-small); }
.site-footer li a { color: var(--ink-70); }
.site-footer li a:hover { color: var(--ink); }
.site-footer__base {
  max-width: var(--shell-wide);
  margin: 5rem auto 0;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: var(--t-small);
  color: var(--ink-50);
}

/* --- 5. structures --------------------------------------------------------- */

.shell         { width: 100%; max-width: var(--shell);        margin-inline: auto; padding-inline: var(--gutter); }
.shell--narrow { max-width: var(--shell-narrow); }
.shell--wide   { max-width: var(--shell-wide); }

.section        { border-top: 1px solid var(--line); padding-block: var(--bay); }
.section--tight { padding-block: var(--bay-tight); }
.section--close { padding-block: var(--bay-close); }

/* A section that fills the screen and carries its own photograph. The home page
   is built from these; no other page uses them, because a page of full screens
   is a page nobody finishes. */
.scene {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--line-faint);
  padding-block: var(--scene-pad);
}
/* A scene whose content is short enough that a full screen would be mostly
   empty. It takes the room it needs and stops. */
.scene--snug { min-height: 0; }

.scene__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--media-opacity);
}
/* Top and bottom are darkened hardest, so the heading and the section edge sit
   on something close to black while the middle keeps its detail. */
.scene__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.15), rgba(0,0,0,0.85));
}
.scene__inner { position: relative; z-index: 20; }

/* The top of a page that is not the home page. Same treatment as a scene, but
   it ends where the reading starts. */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--hero-top) var(--gutter) var(--hero-bottom);
}
.hero__media { position: absolute; inset: 0; pointer-events: none; }
.hero__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--media-opacity-hero);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.60), rgba(0,0,0,0.35), #000);
}
.hero__inner { position: relative; }

/* Column splits. Every one collapses to a single column below 64rem. */
.split { display: grid; gap: 3rem; }
@media (min-width: 64rem) {
  .split              { grid-template-columns: 1fr 1fr; }
  .split--wide-right  { grid-template-columns: 1fr 1.6fr; gap: 4rem; }
  .split--label       { grid-template-columns: 260px 1fr; gap: 3rem; }
  .split--form        { grid-template-columns: 1.3fr 1fr; gap: 4rem; }
}

/* --- 6. type --------------------------------------------------------------- */

.display-1, .display-3, .h-scene, .h-section, .h-block {
  font-family: var(--face-display);
  font-weight: 400;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.display-1 { font-size: var(--display-1);     line-height: var(--lh-tightest); }
.display-3 { font-size: var(--display-3);     line-height: var(--lh-tighter); }
.h-scene   { font-size: var(--display-scene); line-height: var(--lh-tight); }
.h-section { font-size: var(--head-section);  line-height: var(--lh-tight); max-width: 48rem; }
.h-block   { font-size: var(--head-block);    line-height: 1.2; }

/* The one phrase a page is about. Once per page. */
.accent { color: var(--accent-bright); }

.lede {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: var(--t-lede);
  line-height: var(--lh-prose);
  color: var(--ink-75);
  text-wrap: pretty;
}
.lede--lg    { font-size: var(--t-lede-lg); }
.lede--tight { margin-top: 1.5rem; font-size: var(--t-body); }

.prose { max-width: var(--measure); color: var(--ink-80); font-size: var(--t-lede); line-height: var(--lh-prose); }
.prose p { margin-bottom: 1.5rem; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

.note { color: var(--ink-65); font-size: var(--t-small); line-height: var(--lh-prose); max-width: var(--measure-tight); text-wrap: pretty; }
.fine      { color: var(--ink-50); font-size: var(--t-fine); line-height: var(--lh-prose); }
.fine--wide{ max-width: 48rem; }

/* One line in the display face, where the page needs to slow down. */
.quote {
  font-family: var(--face-display);
  font-size: 1.5rem;
  line-height: 1.375;
  letter-spacing: var(--track-display);
  color: var(--ink-85);
  max-width: 48rem;
  text-wrap: balance;
}
@media (min-width: 40rem) { .quote { font-size: 1.875rem; } }

/* Sits above a heading and names the section. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  font-size: var(--t-fine);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--ink-60);
}
.eyebrow .dot {
  display: block;
  flex: none;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* Mono, for anything that is data rather than language. */
.label-mono {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-mono);
  text-transform: lowercase;
  color: var(--ink-70);
}
/* --- 7. links, buttons, fields --------------------------------------------- */

/* The standard onward link: underlined, with an arrow that steps away on
   hover. */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 45px;
  color: var(--ink-80);
  font-size: var(--t-body);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.arrow-link:hover { color: var(--ink); }
.arrow-link svg { width: 1rem; height: 1rem; transition: transform var(--hover-dur); }
.arrow-link:hover svg { transform: translate(2px, -2px); }

.plain-link { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 4px; }
.plain-link:hover { color: var(--accent); }

/* The same link on a line of its own, outside a sentence. It takes the 44px
   box the other standalone links have, so a thumb can find it. */
.plain-link--alone { display: inline-flex; align-items: center; min-height: 44px; }

/* Small, spaced, cyan. For a link to a directory or a document rather than to
   another page of this site. */
.accent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  font-size: var(--t-fine);
  text-transform: uppercase;
  letter-spacing: var(--track-accent);
  color: var(--accent-soft);
}
.accent-link:hover { color: var(--accent); }
.accent-link svg { width: 0.875rem; height: 0.875rem; transition: transform var(--hover-dur); }
.accent-link:hover svg { transform: translate(2px, -2px); }

/* Two buttons, and no third. White is the thing to do; outlined is the other
   thing. The corner is square-ish rather than a full pill, which is where this
   site departs from stock Scene. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: var(--t-small);
  background: var(--ink);
  color: #000;
  cursor: pointer;
  transition: background var(--hover-dur);
}
.pill:hover { background: var(--ink-90); color: #000; }
.pill--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.30);
  transition: border-color var(--hover-dur);
}
.pill--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }
.pill:disabled { opacity: 0.6; cursor: not-allowed; }
.pill-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

/* Fields. A hairline box on a five per cent white fill. */
.field { display: block; margin-bottom: 1.5rem; }
.field > label { display: block; margin-bottom: 0.75rem; font-size: var(--t-small); font-weight: 500; }
.field .hint {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--t-fine);
  font-weight: 400;
  color: var(--ink-50);
}
.field .req { color: var(--accent-soft); }
.field input, .field textarea, .field select {
  display: block;
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--t-body);
  line-height: 1.5;
  padding: 0.625rem 0.75rem;
  transition: border-color var(--hover-dur);
}
.field select {
  /* The arrow is drawn here because a select cannot carry a pseudo-element. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.125rem;
  padding-right: 2.5rem;
}
.field option { background: #111; color: var(--ink); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(255, 255, 255, 0.20); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field--bad input, .field--bad textarea, .field--bad select { border-color: var(--state-risk); }
.field__error { display: block; margin-top: 0.5rem; font-size: var(--t-small); color: var(--state-risk); }

.field-pair { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .field-pair { grid-template-columns: 1fr 1fr; } }

/* The honeypot. It is in the markup for a robot and out of the way of a person
   and a screen reader both. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* What the form says back. No box: a coloured rule and a heading is enough. */
.notice {
  max-width: var(--measure);
  border-left: 2px solid var(--line-strong);
  padding-left: 1.25rem;
  margin-bottom: 3rem;
}
.notice h2 {
  font-family: var(--face-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: var(--track-display);
  margin-bottom: 0.5rem;
}
.notice p { color: var(--ink-70); line-height: var(--lh-prose); }
.notice--good { border-left-color: var(--state-ok); }
.notice--good h2 { color: var(--state-ok); }
.notice--bad  { border-left-color: var(--state-risk); }
.notice--bad h2 { color: var(--state-risk); }

/* --- 8. lists -------------------------------------------------------------- */

/* A list where a short name sits beside a long explanation. The name column is
   fixed, so the explanations align down the page. The rule between rows is the
   one coloured line on the site. */
.rows > li {
  display: grid;
  gap: 0.75rem;
  padding-block: 1.5rem;
  align-items: start;
}
.rows > li + li { border-top: 1px solid var(--line-accent); }
@media (min-width: 40rem) {
  .rows > li { grid-template-columns: 200px 1fr; gap: 2rem; }
}
.rows .row-name {
  display: inline-flex;
  align-items: start;
  gap: 0.5rem;
  font-family: var(--face-display);
  font-size: 1.3125rem;
  letter-spacing: var(--track-display);
  color: var(--accent);
}
a.row-name:hover { opacity: 0.8; color: var(--accent); }
.rows .row-name svg { width: 1.125rem; height: 1.125rem; margin-top: 0.3rem; flex: none; opacity: 0.4; transition: all var(--hover-dur); }
a.row-name:hover svg { opacity: 1; transform: translate(2px, -2px); }
.rows p { color: var(--ink-80); font-size: var(--t-lede); line-height: var(--lh-prose); text-wrap: pretty; }

/* Stages of a process, side by side, each opened by a cyan rule. No numbers:
   the order is the reading order. */
.steps { display: grid; gap: 3rem; margin-top: 3rem; }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.steps > li { border-top: 1px solid var(--line-accent); padding-top: 1.5rem; }
.steps h3 {
  font-family: var(--face-display);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: var(--track-display);
}
@media (min-width: 40rem) { .steps h3 { font-size: 1.5rem; } }
.steps p { margin-top: 1rem; color: var(--ink-75); text-wrap: pretty; }

/* Facts about the thing, each opened by a strong hairline. Two columns, or
   three when the answers are short. */
.defs { display: grid; gap: 3rem; margin-top: 3.5rem; }
@media (min-width: 40rem) { .defs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 40rem) { .defs--three { grid-template-columns: repeat(3, 1fr); } }
.defs > div { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; }
.defs h3 {
  margin-bottom: 0.75rem;
  font-family: var(--face-display);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: var(--track-display);
}
/* 16px rather than the 14px stock Scene uses, because these paragraphs carry
   argument rather than annotation. */
.defs p { color: var(--ink-70); font-size: var(--t-body); line-height: var(--lh-prose); }
.defs p strong { color: var(--ink-85); font-weight: 600; }

/* --- 9. panels and asides -------------------------------------------------- */

/* The one raised surface on the site: a hairline box with the faintest wash
   across it. It closes a page, or it holds the form. */
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  background: linear-gradient(to bottom right, var(--bg-raised), transparent);
  padding: 2.5rem;
}
@media (min-width: 40rem) { .panel { padding: 3.5rem; } }
.panel--form { padding: 2rem; }
@media (min-width: 40rem) { .panel--form { padding: 2.5rem; } }

/* Short notes beside the form. On a wide screen they hang off a left rule; on a
   narrow one they drop below with a rule on top. */
.sidenote { align-self: start; border-top: 1px solid var(--line); padding-top: 2.5rem; display: grid; gap: 2.5rem; }
@media (min-width: 64rem) {
  .sidenote { border-top: 0; border-left: 2px solid var(--line); padding: 0 0 0 3rem; }
}
.sidenote h3 {
  font-family: var(--face-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: var(--track-display);
}
.sidenote p { margin-top: 1rem; color: var(--ink-70); line-height: var(--lh-prose); max-width: 28rem; text-wrap: pretty; }

/* --- 10. motion ------------------------------------------------------------ */

/* A heading arrives one word at a time. The script splits the words; this is
   what they look like before it animates them. A page with scripting off never
   gets the ready flag and shows every heading as written. */
[data-reveal] .word { display: inline-block; will-change: transform, opacity; }
[data-reveal][data-reveal-ready]:not([data-reveal-done]) .word { opacity: 0; transform: translateY(var(--reveal-rise)); }

/* A still photograph that never quite stops. The move is slow enough that a
   reader cannot see it happening and long enough that it never repeats while
   they are looking. */
.drift        { animation: drift 70s ease-in-out infinite alternate; transform-origin: 65% 40%; }
.drift--mid   { animation-duration: 95s; animation-direction: alternate-reverse; transform-origin: 60% 50%; }
@keyframes drift {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.2%, 0.8%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .drift { animation: none; }
  .lensring { display: none; }
  [data-reveal][data-reveal-ready]:not([data-reveal-done]) .word { opacity: 1; transform: none; }
}

/* --- 11. page treatments ---------------------------------------------------
   The Content-Security-Policy on this site has no 'unsafe-inline', so a style
   attribute would be dropped. Every offset, mask and mono block below would
   have been one in the prototypes. */

/* Home hero. The pole stands on the right and its left edge dissolves into the
   page, so the heading has black to sit on rather than a straight cut. */
.scene__media--pole {
  inset: 0 0 0 auto;
  width: 70%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
          mask-image: linear-gradient(to right, transparent 0, #000 22%);
}

/* The court. Its vignette is baked into the file, so it needs no mask, only
   placing: centred vertically, starting about under the word "program". */
.scene__media--court {
  inset: 12% 0 12% auto;
  width: 58%;
  height: auto;
  max-height: 76%;
  margin-block: auto;
}

/* The flag on Get Involved. It starts below the fixed header and fades in from
   the top so it never collides with the menu. */
.hero__media > img.hero__media--flag {
  /* 6rem rather than the header's own 5rem: the extra rem keeps the top of the
     flag clear of the menu instead of tucked right under it. */
  inset: 6rem 0 0 auto;
  width: 70%;
  height: calc(100% - 6rem);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}

/* The network graphic behind the anonymization page. It is busy edge to edge,
   so it needs more than the standard hero scrim to carry type.

   Two gradients on one layer. The radial one is the vignette: it holds the
   middle open and closes hard to black by the corners, which keeps the eye on
   the graph instead of on its edges. The horizontal one lays a dark bed under
   the left column, where the heading and the lede sit and where the image is
   at its brightest. The vertical .hero__scrim still runs underneath both, so
   the bottom of the hero reaches solid black and the page continues. */
.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 68% at 55% 45%,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.22) 48%,
      rgba(0, 0, 0, 0.8) 80%,
      #000 100%),
    linear-gradient(to right,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.66) 38%,
      rgba(0, 0, 0, 0.1) 70%,
      rgba(0, 0, 0, 0.3) 100%);
}

/* The graphic runs brighter than a photograph, so it sits below the standard
   media opacity rather than at it. Matching the specificity of the rule that
   sets every hero image, or this does nothing. */
.hero__media > img.hero__media--network { opacity: 0.7; }

/* On a narrow screen the text runs the full width, so there is no side to keep
   dark. The bed becomes an even wash instead, and the vignette tightens. */
@media (max-width: 64rem) {
  .hero__vignette {
    background:
      radial-gradient(ellipse 85% 62% at 50% 40%,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.52) 52%,
        rgba(0, 0, 0, 0.9) 82%,
        #000 100%),
      linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.7));
  }
}

/* A section that carries a photograph behind its text. Heroes and scenes do
   this already; an ordinary section does not, because most of them do not need
   it. This one exists for the de-identification section, where the picture is
   the argument: the plate is blurred and the car, the road and the weather are
   all still there.

   Three gradients on one layer. The vertical one takes the image to solid
   black at the top and the bottom, so it fades into the sections either side
   instead of ending on a hard edge. The radial one holds open the part of the
   frame worth seeing. The horizontal one lays a dark bed under the text
   column. The photograph underneath is a bright overcast grey, so it runs at a
   little over a third and still needs all three. */
.section--media { position: relative; overflow: hidden; }
.section--media > .shell { position: relative; z-index: 2; }

.section__media { position: absolute; inset: 0; pointer-events: none; }
.section__media > img {
  position: absolute;
  inset: 0;
  /* Wider than the section, anchored left, so the visible window falls on the
     left of the frame and the car sits right of centre, clear of the text.
     Widening crops harder top and bottom, so the vertical position is pushed
     past the middle to keep the whole car in shot. */
  width: 112%;
  /* The base img rule caps every image at the width of its container, which
     silently undoes the line above. */
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  opacity: 0.55;
}
.section__vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      #000 0%,
      rgba(0, 0, 0, 0.22) 24%,
      rgba(0, 0, 0, 0.22) 74%,
      #000 100%),
    radial-gradient(ellipse 62% 60% at 70% 58%,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.35) 58%,
      rgba(0, 0, 0, 0.85) 86%,
      #000 100%),
    linear-gradient(to right,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.72) 38%,
      rgba(0, 0, 0, 0.08) 72%,
      rgba(0, 0, 0, 0.3) 100%);
}

/* Narrow screens put the text across the whole frame, so the bed becomes an
   even wash and the picture drops further back. */
@media (max-width: 64rem) {
  .section__media > img { opacity: 0.4; }
  .section__vignette {
    background:
      linear-gradient(to bottom,
        #000 0%,
        rgba(0, 0, 0, 0.62) 22%,
        rgba(0, 0, 0, 0.62) 78%,
        #000 100%),
      radial-gradient(ellipse 85% 60% at 50% 55%,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 55%,
        #000 100%);
  }
}

/* The arc that traces the lens of the plate reader on the home page.

   It has to land on the lens at every window size, and the photograph behind
   it is cropped by object-fit: cover. An SVG with the image's own dimensions
   as its viewBox and preserveAspectRatio="xMidYMid slice" crops by exactly the
   same rule, so a circle drawn at the lens's coordinates in the photograph
   stays on the lens without any script measuring anything.

   It runs the drift as well, so it moves with the picture rather than sliding
   across it. Both belong to one animation declaration on purpose: .drift and
   this rule both set the animation shorthand, so putting the class in the
   markup would have silently replaced one with the other. */
.lensring {
  position: absolute;
  inset: 0 0 0 auto;
  width: 70%;
  height: 100%;
  pointer-events: none;
  transform-origin: 65% 40%;
  animation:
    lensring-cycle 13s ease-in-out infinite,
    drift 70s ease-in-out infinite alternate;
}
.lensring__arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  /* The path carries pathLength="100", so this is a percentage of the way
     round whatever size it is: about a fifth, which reads as a sweep rather
     than a ring. Changing the radius needs no change here. */
  stroke-dasharray: 22 78;
  stroke-dashoffset: 0;
  /* The sweep travels along the path rather than riding a rotation of it. The
     path is not a circle, so rotating the element would carry the flattened
     quadrant round with it instead of leaving it on the lens. */
  animation: lensring-spin 3.4s linear infinite;
}
@keyframes lensring-spin { to { stroke-dashoffset: -100; } }

/* Four seconds on, nine off. It should look like something the camera does
   now and then, not like a loading spinner. */
@keyframes lensring-cycle {
  0%, 6%    { opacity: 0; }
  15%, 33%  { opacity: 0.5; }
  42%, 100% { opacity: 0; }
}

/* A scene still waiting for its photograph. It holds the shape and prints the
   shot it is waiting for in the corner. Delete the note element and the scene
   is simply black. */
.scene__media--blank {
  background: var(--bg-blank);
  display: grid;
  place-items: end;
  padding: 1rem 1.25rem;
}
.photo-note {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-mono);
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.3);
  text-align: right;
}

/* A sentence lifted out of the prose around it. A cyan rule and a step up in
   size, not a box: the site has one raised surface and this is not it. */
.callout {
  max-width: var(--measure);
  border-left: 2px solid var(--line-accent);
  padding-left: 1.75rem;
  margin-block: 2.5rem;
  font-size: var(--t-lede-lg);
  line-height: 1.5;
  color: var(--ink-85);
  text-wrap: pretty;
}

/* A plain bulleted list inside prose. The marker is a hairline dash rather
   than a disc, which is the only kind of bullet the rest of the site draws. */
.bullets { display: grid; gap: 1rem; margin-top: 1.5rem; max-width: var(--measure); }
.bullets > li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 1rem;
  font-size: var(--t-lede);
  line-height: var(--lh-prose);
  color: var(--ink-80);
  text-wrap: pretty;
}
.bullets > li::before {
  content: "";
  margin-top: 0.85em;
  height: 1px;
  background: var(--accent);
}

/* Emphasis inside running prose, at the weight the definition lists use. */
.prose strong, .callout strong, .bullets strong { color: var(--ink); font-weight: 600; }

/* A hairline that opens a block rather than separating two. */
.rule-top        { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; }
.rule-top--faint { border-top-color: var(--line); }

/* Upcoming meetings. Everything here was one line of 11px lowercase mono,
   which is the right size for a label and the wrong size for the two things a
   reader has actually come for: where it is and what time to be there. */

.meetwhen__place {
  margin-top: 0.85rem;
  max-width: 34rem;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--ink-90);
  text-wrap: pretty;
}
.meetwhen__time {
  margin-top: 0.5rem;
  font-family: var(--face-mono);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* One block per date, so six meetings read as six things rather than as a
   line of text with separators in it. Same hairline grid as the rest of the
   site: the 1px gaps are the rules, and the cells sit just off black so the
   lines stay visible where they cross. */
.meetdates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 1px;
  margin-top: 2.25rem;
  border: 1px solid var(--line-mid);
  background: var(--line-mid);
}
.meetdates > li {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  background: var(--bg-cell);
  padding: 1.35rem 0.75rem;
}
.meetdates .m {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-badge);
  text-transform: uppercase;
  color: var(--ink-60);
}
.meetdates .d {
  font-family: var(--face-display);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: var(--track-display);
  color: var(--ink);
}
.meetdates .w {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-mono);
  text-transform: lowercase;
  color: var(--ink-55);
}

/* A commissioner's email and phone, set in mono so they are easy to copy and
   easy to read back over a phone. */
.seat-contact { font-family: var(--face-mono); font-size: var(--t-small); color: var(--ink-70); }

/* Our own number, which is the one on the site a reader is actually meant to
   tap. An inline link is about 18px tall, so it gets the same 44px target as
   every other control. */
.callnumber {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--face-mono);
  font-size: var(--t-body);
  color: var(--ink-85);
}
.callnumber:hover { color: var(--ink); }
.seat-contact:hover { color: var(--ink); }
.seat-sep { color: var(--ink-50); }
.rows p strong { color: var(--ink-90); font-weight: 600; }

/* A script somebody is going to read aloud or paste into an email. It keeps its
   line breaks and takes no box: the label column beside it is the frame. */
.script {
  white-space: pre-wrap;
  font-family: var(--face-mono);
  font-size: var(--t-script);
  letter-spacing: var(--track-script);
  line-height: var(--lh-script);
  color: var(--ink-75);
}

/* --- the candidate survey ---------------------------------------------------
   The public tiles, one candidate's answers, the questionnaire itself, and the
   list of invites on the admin page. */

/* One square tile per candidate who answered. Each carries its own hairline
   rather than sharing a ruled grid, so a last row of one or two leaves black
   space rather than a grey hole. */
.tilegrid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .tilegrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .tilegrid { grid-template-columns: repeat(3, 1fr); } }
.tilegrid > li { display: flex; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  min-height: 13rem;
  padding: 2rem;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color var(--hover-dur), background var(--hover-dur);
}
.tile:hover { border-color: var(--line-accent); background: var(--bg-raised); color: var(--ink); }
.tile__name {
  font-family: var(--face-display);
  font-size: var(--head-block);
  line-height: 1.1;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.tile__office { color: var(--ink-70); line-height: var(--lh-body); text-wrap: pretty; }
.tile__count { align-self: flex-start; }
.tile__seat { color: var(--ink-70); }

/* Marks a candidate who holds the seat now, on the tile and the answer page. */
.incumbent { color: var(--accent-bright); }
.tile__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}
.tile__foot svg { width: 1rem; height: 1rem; color: var(--accent-soft); transition: transform var(--hover-dur), color var(--hover-dur); }
.tile:hover .tile__foot svg { transform: translate(2px, -2px); color: var(--accent); }

/* Mono, outlined in its own colour, never filled. Yes and No look the same on
   purpose: the page publishes answers and does not grade them. */
.badge {
  display: inline-block;
  justify-self: start;
  border: 1px solid currentColor;
  border-radius: 0.125rem;
  padding: 0.25rem 0.5rem;
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-badge);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-85);
}

/* One candidate's nine answers. The question runs long and the answer sits at
   the end of its line, where the eye looks for it. */
.answers { margin-top: 1.5rem; max-width: 56rem; }
.answers > li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}
.answers > li:last-child { border-bottom: 1px solid var(--line); }
.answers p { color: var(--ink-80); font-size: var(--t-lede); line-height: var(--lh-prose); text-wrap: pretty; }
.answers .badge { min-width: 3.75rem; padding: 0.375rem 0.75rem; font-size: var(--t-small); text-align: center; }

/* The answer to question 10, with the candidate's own paragraph breaks. */
.stance {
  max-width: var(--measure);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-85);
  font-size: var(--t-lede);
  line-height: var(--lh-prose);
}
.note--wide { max-width: var(--measure); }

/* The typed signature, set as a name rather than as a field value. */
.signed {
  font-family: var(--face-display);
  font-size: var(--head-block);
  line-height: 1.2;
  letter-spacing: var(--track-display);
  color: var(--ink);
}

/* TO, FROM, DATE and DEADLINE at the head of the questionnaire. */
.memo { display: grid; gap: 0.75rem; max-width: var(--measure); }
.memo > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline; }
.memo dt {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--track-mono);
  color: var(--ink-60);
}
.memo dd { margin: 0; color: var(--ink-85); }

/* A yes-or-no row. The radio button itself is hidden but stays focusable, and
   its label is drawn as a ghost button that fills white once chosen, the same
   white as the primary button. */
.yesno { min-width: 0; margin: 0; padding: 1.25rem 0; border: 0; border-top: 1px solid var(--line); }
.yesno legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 1rem;
  color: var(--ink-85);
  line-height: var(--lh-prose);
  text-wrap: pretty;
}
.yesno legend .req { color: var(--accent-soft); }
.yesno__choices { clear: both; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  font-family: var(--face-mono);
  font-size: var(--t-small);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--ink-75);
  cursor: pointer;
  transition: border-color var(--hover-dur), background var(--hover-dur), color var(--hover-dur);
}
.choice:hover span { border-color: var(--ink-50); color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #000; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.yesno--bad .choice span { border-color: var(--state-risk); }

/* The admin page's invites: one row each, in a table that scrolls sideways on
   a phone rather than pushing the page wider. */
/* Positioned so the screen-reader labels inside, which are absolutely placed,
   scroll with the table instead of widening the page. */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); }
.invites { width: 100%; border-collapse: collapse; font-size: var(--t-fine); line-height: 1.4; }
.invites th,
.invites td { padding: 0.4375rem 0.625rem; text-align: left; vertical-align: top; white-space: nowrap; border-bottom: 1px solid var(--line); }
.invites tbody tr:last-child td { border-bottom: 0; }
.invites th {
  font-family: var(--face-mono);
  font-size: var(--t-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-60);
  white-space: nowrap;
}
.invites abbr { text-decoration: none; }

/* Column headings sort the table. The page's script puts a button in each,
   and the sorted column carries an arrow. */
.invites__sort {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.invites__sort:hover,
.invites th[aria-sort] .invites__sort { color: var(--accent-bright); }
.invites th[aria-sort="ascending"] .invites__sort::after { content: " \2191"; }
.invites th[aria-sort="descending"] .invites__sort::after { content: " \2193"; }

/* A new link, shown once, with its Copy button beside it. */
.link-copy { display: flex; align-items: center; gap: 0.5rem; }
.link-copy input { flex: 1; min-width: 0; }

/* The counts above the table. Each filters the table to its status, and the
   total shows every row again. */
.tally {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.tally:hover { color: var(--accent-bright); }
.tally[aria-pressed="true"] { color: var(--accent-bright); text-decoration-color: currentColor; }
.invites td { color: var(--ink-85); }
.invites tbody tr:hover { background: var(--bg-raised); }
.invites tr:target,
.invites tr.is-editing { background: var(--bg-raised); box-shadow: inset 2px 0 0 var(--accent); }
/* Every row stays one line. A long name, office or party is cut short, and
   the cell's title holds all of it. */
.invites__clip { display: block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.invites__clip--short { max-width: 8rem; }
.invites__email .invites__clip { max-width: 15rem; }
.invites__email a {
  font-family: var(--face-mono);
  color: var(--ink-90);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.invites__email a:hover { color: var(--accent-bright); text-decoration-color: currentColor; }
.invites__inc { text-align: center; color: var(--accent-bright); }
.invites__date { font-family: var(--face-mono); color: var(--ink-70); }

/* One word for where an invite stands. Colour only marks the two that need
   an admin: queued is about to go out, unsent did not. */
.status { font-family: var(--face-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; color: var(--ink-70); }
.status--queued { color: var(--accent-bright); }
.status--unsent { color: var(--state-risk); }
.status--withdrawn { color: var(--ink-50); }
a.status { text-decoration: underline; text-underline-offset: 3px; }
a.status:hover { color: var(--accent-bright); }

/* One invite opened from the table: its fields, then what can be done to it. */
.edit-title { overflow-wrap: anywhere; }
.edit-form { display: grid; gap: 1rem; align-items: end; }
.edit-form .field { margin-bottom: 0; }
.edit-form > :is(.choice, .pill) { justify-self: start; }
@media (min-width: 64rem) { .edit-form { grid-template-columns: 1fr 1.5fr 1fr auto auto; } }
.edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; }

/* The send queue: how many are left, and the button that starts or stops it. */
.queue { border-left: 2px solid var(--line-accent); padding-left: 1rem; }
.queue__line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.queue__summary { color: var(--ink-85); font-size: var(--t-small); }
.queue__last { margin-top: 0.375rem; color: var(--ink-60); }
.queue__last:empty { display: none; }
.queue__note { margin-top: 0.25rem; font-size: var(--t-fine); color: var(--ink-50); }

/* Background sending: whether the host's cron job is running, and its address. */
.cron summary { cursor: pointer; color: var(--ink-60); }
.cron__text { margin-top: 0.5rem; font-size: var(--t-fine); color: var(--ink-60); }
.cron__url { margin-top: 0.5rem; }

/* The invites heading, with export and import on the same line. */
.invites-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 0.75rem; }
.invites-head__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.pill--small { padding: 0.5rem 1rem; font-size: var(--t-fine); }

/* Import is one button. The file field is hidden behind its label, and the
   page's script sends the form as soon as a file is picked. Without the
   script, the Import button beside it does that. */
.import { display: flex; align-items: center; gap: 0.75rem; }
.import label { cursor: pointer; }
.import input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.import.is-auto [data-import-submit] { display: none; }

/* What an import reports back. */
.import-list { margin-top: 0.5rem; padding-left: 1.25rem; list-style: disc; color: var(--ink-70); }
.import-list li { overflow-wrap: anywhere; }

/* A button that reads as a link, for the small actions in a list. Paired with
   .accent-link, which supplies the look; this takes the button's own chrome
   away. */
.textbutton { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }

/* The sign-in form needs two fields, not the width of the page. */
.panel--slim { max-width: 30rem; }

/* A command written into a sentence. */
code { font-family: var(--face-mono); font-size: 0.875em; color: var(--ink-85); overflow-wrap: anywhere; }

/* Read by a screen reader, not drawn. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- spacing utilities ----------------------------------------------------- */

.mt-s  { margin-top: 1.5rem; }
.mt-m  { margin-top: 2.5rem; }
.mt-l  { margin-top: 3.5rem; }
.mt-xl { margin-top: 4.5rem; }

/* --- print -----------------------------------------------------------------
   Somebody will print the scripts and the records letter. Browsers drop the
   background by default, so the page has to come back to ink on paper. */

@media print {
  :root { --ink: #000; --ink-90: #000; --ink-85: #111; --ink-80: #222; --ink-75: #222;
          --ink-70: #333; --ink-65: #333; --ink-60: #444; --ink-55: #444; --ink-50: #555;
          --line: #ccc; --line-strong: #999; --line-accent: #999; --line-faint: #ddd; }
  body { background: #fff; color: #000; }
  .grain, .site-header, .scene__media, .scene__scrim, .hero__media, .hero__scrim,
  .pill-row, .site-footer__cols { display: none; }
  .scene, .hero { min-height: 0; padding: 1.5rem 0; }
  .section { padding-block: 1.5rem; }
  .accent, .rows .row-name { color: #000; }
  .panel { border: 1px solid #999; background: none; }
  a { color: #000; text-decoration: underline; }
  .script { font-size: 10pt; color: #000; }
}
