/*
 * nfemz.com. One dark look (no light mode), Liquid Glass on chrome and plates only, text on solid ground.
 * The asset(path) calls in url() are replaced at build time with the hashed URL of static/assets/….
 * Each app's colors arrive as custom properties on .app-<slug> (generated from its entry, appended at build).
 */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url(/assets/fonts/schibsted-grotesk.e3b56e90.woff2) format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url(/assets/fonts/schibsted-grotesk-italic.c0aab3a5.woff2) format('woff2');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/assets/fonts/plex-mono-400.52de7009.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/assets/fonts/plex-mono-500.f17f5194.woff2) format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #09090b;
  --ground-raised: #121114;
  --ink: #f2efe9;
  --ink-2: #c4bfb6; /* 11.6:1 on ground */
  --ink-3: #9d978e; /* 7.1:1 on ground, 4.9:1 on the brightest glow */
  --rule: rgba(242, 239, 233, 0.12);
  --rule-strong: rgba(242, 239, 233, 0.22);
  --accent: #f2efe9;
  --accent-ink: #f2efe9;
  --glow: #1b1a1f;

  --glass-fill: rgba(22, 20, 21, 0.52);
  --glass-solid: #18161a;
  --glass-edge: rgba(255, 255, 255, 0.11);
  --glass-lit: rgba(255, 255, 255, 0.2);
  --glass-blur: blur(22px) saturate(1.7);

  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --side: minmax(9rem, 2.2fr);
  --main: 7.8fr;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  /* Set by site.js from the pointer and the scroll position; 0 without it. */
  --mx: 0;
  --my: 0;
  --sy: 0;
}

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

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: 'ss01', 'tnum' 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms var(--ease), color 160ms var(--ease);
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ground);
  font: 500 0.875rem var(--mono);
  text-decoration: none;
}
.skip:focus {
  top: 0.75rem;
}

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

.small {
  margin-top: 0.9rem;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ---------- Ambient glow: the app's own image, decoded tiny, blurred once, scaled up, darkened ---------- */

/* The glow sits in the root stacking context above the body's own background; everything else is lifted over it. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.8;
}
.ambient img {
  position: absolute;
  top: -22vmax;
  right: -24vmax;
  width: 92vmax;
  height: 92vmax;
  max-width: none;
  object-fit: cover;
  filter: blur(9vmax) saturate(1.35);
  transform: translate3d(calc(var(--mx) * -1.4vmax), calc(var(--sy) * -0.05px + var(--my) * -1.2vmax), 0) scale(1.1);
  will-change: transform;
}
main,
.colophon {
  position: relative;
  z-index: 1;
}
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 95% at 100% 0%, rgba(9, 9, 11, 0.05) 0%, rgba(9, 9, 11, 0.5) 42%, var(--ground) 78%);
}
.app-none .ambient {
  opacity: 0.55;
}
.page-legal .ambient {
  opacity: 0.4;
}

/* ---------- Glass ---------- */

.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 42%, rgba(255, 255, 255, 0.03)),
    var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 var(--glass-lit),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px -28px rgba(0, 0, 0, 0.75);
}
/* The specular: a soft light that follows the pointer across the surface (site.js sets --px/--py). */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--px, 28%) var(--py, -10%), rgba(255, 255, 255, 0.1), transparent 55%);
  transition: opacity 300ms var(--ease);
}
/* The refraction cue: a brighter rim along the top-left edge, fading out around the shape. */
.glass::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.14));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-solid);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .glass::before {
    display: none;
  }
  .ambient {
    display: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --ink-2: #e2ded7;
    --ink-3: #c9c4bc;
    --glass-edge: rgba(255, 255, 255, 0.4);
  }
  .glass {
    background: var(--glass-solid);
  }
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.75rem var(--gutter) 0;
  max-width: calc(var(--max) + 0px);
  margin-inline: auto;
}
.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.6rem 0.55rem 1.15rem;
  border-radius: 999px;
}
.wordmark {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.sitenav {
  display: flex;
  gap: 0.15rem;
}
.sitenav a,
.appnav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
}
.sitenav a:hover,
.appnav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.appnav-wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}
.appnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem 0.25rem 1.15rem;
}
.appnav__name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0 !important;
  color: var(--ink) !important;
  background: none !important;
}
.appnav__name img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}
.appnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.appnav a[aria-current='page'] {
  color: var(--accent-ink);
  background: rgba(255, 255, 255, 0.07);
}
.page-app .appnav,
.page-legal .appnav {
  border-radius: 999px;
  background: rgba(14, 13, 14, 0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
}
@media (prefers-reduced-transparency: reduce) {
  .page-app .appnav,
  .page-legal .appnav {
    background: var(--glass-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ---------- Editorial grid: a side-head column and a main column ---------- */

.intro,
.band {
  display: grid;
  grid-template-columns: var(--side) var(--main);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.band {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  border-top: 1px solid var(--rule);
}
.sidehead {
  position: sticky;
  top: 6.25rem;
  margin: 0.45rem 0 1.5rem;
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.sidehead span {
  display: block;
  color: var(--ink-3);
}
.sidehead a {
  text-decoration: none;
}
.sidehead a:hover {
  color: var(--ink);
}

.intro {
  padding-block: clamp(5rem, 16vw, 12rem) clamp(4rem, 10vw, 8rem);
}
.lede {
  font-size: clamp(1.6rem, 1rem + 2.3vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 500;
  max-width: 25ch;
}
/* The first sentence is the claim; the rest recedes. */
.lede__rest {
  color: var(--ink-2);
}

.prose {
  max-width: 38rem;
}
.prose p + p {
  margin-top: 1.1em;
}
.prose--lead {
  font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.prose--lead p + p {
  color: var(--ink-2);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Work index ---------- */

.work {
  margin: 0;
  padding: 0;
  list-style: none;
}
.work__entry {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}
.work__entry + .work__entry {
  margin-top: clamp(3rem, 7vw, 6rem);
}

.plate {
  display: block;
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background-color: var(--glow);
}
.plate__glow {
  position: absolute;
  inset: -30%;
  width: 160%;
  height: 160%;
  max-width: none;
  object-fit: cover;
  filter: blur(44px) saturate(1.5);
  opacity: 0.9;
  z-index: -2;
}
.plate__screen {
  position: absolute;
  right: 9%;
  top: 14%;
  width: 36%;
  border-radius: 1.4rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  transform: rotate(4deg) translate3d(calc(var(--mx) * 6px), calc(var(--my) * 6px), 0);
  transition: transform 600ms var(--ease);
  z-index: -1;
}
.plate__icon {
  position: absolute;
  left: 9%;
  bottom: 10%;
  width: 34%;
  border-radius: 23%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 50px -12px rgba(0, 0, 0, 0.75);
  transform: translate3d(calc(var(--mx) * -4px), calc(var(--my) * -4px), 0);
  transition: transform 600ms var(--ease);
}
/* No screens yet: the icon alone, centered and larger. */
.plate--icon .plate__icon {
  left: 32%;
  bottom: 27.5%; /* 36% of the width is 45% of the 5:4 plate's height */
  width: 36%;
}
/* Wide (16:9) screens: a landscape card behind a smaller icon. */
.plate--wide .plate__screen {
  right: 6%;
  top: 13%;
  width: 72%;
  border-radius: 0.7rem;
  transform: rotate(-2deg) translate3d(calc(var(--mx) * 6px), calc(var(--my) * 6px), 0);
}
.plate--wide .plate__icon {
  left: 7%;
  bottom: 9%;
  width: 26%;
}
.plate--wide:hover .plate__screen {
  transform: rotate(-1deg) translate3d(-4px, -8px, 0);
}
.plate:hover .plate__screen {
  transform: rotate(2deg) translate3d(-4px, -10px, 0);
}

.work__text {
  padding-bottom: 0.4rem;
}
.work__name {
  margin-top: 0.7rem;
  font-size: clamp(3rem, 2rem + 4.5vw, 6rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.92;
}
.work__name a {
  text-decoration: none;
}
.work__line {
  margin-top: 1rem;
  max-width: 24ch;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-2);
}
.work__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.6rem;
  font: 500 0.8rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.arrow {
  color: var(--accent-ink);
  text-decoration: none;
}
.arrow::after {
  content: ' →';
  display: inline-block;
  transition: transform 200ms var(--ease);
}
.arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Contact ---------- */

.contact__mail {
  font-size: clamp(1.6rem, 1rem + 3vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.contact__mail a {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}
.contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.25rem 2rem;
  margin: 2.5rem 0 0;
  max-width: 44rem;
}
.contact__list dt,
.facts dt,
.record dt {
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact__list dd,
.facts dd {
  margin: 0.25rem 0 0;
}

/* ---------- Case study ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 6.5rem);
}
.hero .sidehead {
  position: static;
}
.hero__name {
  font-size: clamp(4.5rem, 2rem + 11vw, 11.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.82;
  margin-left: -0.05em;
}
/* Names longer than eight letters: smaller, so they never run into the icon. */
.hero__name--long {
  font-size: clamp(3.25rem, 1.5rem + 7.5vw, 8rem);
}
.hero__line {
  margin-top: 1.5rem;
  max-width: 22ch;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink-2);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 2rem;
  margin: 2.5rem 0 0;
  max-width: 34rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  line-height: 1.45;
}
.hero__mark {
  aspect-ratio: 1;
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background-color: var(--glow);
}
.hero__glow {
  position: absolute;
  inset: -25%;
  width: 150%;
  height: 150%;
  max-width: none;
  object-fit: cover;
  filter: blur(50px) saturate(1.5);
  z-index: -2;
}
.hero__icon {
  width: 58%;
  border-radius: 23%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -24px rgba(0, 0, 0, 0.8);
  transform: perspective(900px) rotateX(calc(var(--my) * -6deg)) rotateY(calc(var(--mx) * 8deg));
  transition: transform 500ms var(--ease);
}

.screens {
  padding-block: 1rem clamp(3rem, 7vw, 6rem);
}
.screens__row {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
  margin: 0;
  padding: 1rem max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 2.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
}
.screen {
  flex: 0 0 clamp(13.5rem, 22vw, 17.5rem);
  scroll-snap-align: start;
}
/* A gentle stagger: alternate screens sit lower, and drift with scroll. */
.screen:nth-child(even) {
  margin-top: 3.5rem;
  transform: translate3d(0, calc(var(--sy) * -0.025px), 0);
}
.screen figure {
  margin: 0;
}
.screen__frame {
  padding: 7px;
  border-radius: 2.35rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 40%, rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 40px 70px -30px rgba(0, 0, 0, 0.9);
}
.screen__frame img {
  width: 100%;
  height: auto;
  border-radius: 1.95rem;
  background: var(--ground-raised);
}
.screen figcaption {
  margin-top: 1rem;
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.screens--wide .screen {
  flex-basis: clamp(17rem, 62vw, 46rem);
}
.screens--wide .screen:nth-child(even) {
  margin-top: 0;
  transform: none;
}
.screens--wide .screen__frame {
  padding: 5px;
  border-radius: 1.1rem;
}
.screens--wide .screen__frame img {
  border-radius: 0.8rem;
}
.screens__note {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
}
.feature {
  padding-block: 1.4rem 2.2rem;
  border-top: 1px solid var(--rule-strong);
}
.feature h3,
.ledger h3 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.feature p,
.ledger p {
  margin-top: 0.65rem;
  color: var(--ink-2);
  max-width: 34rem;
}

.figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 0;
}
.figure {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule-strong);
}
.figure dd {
  margin: 0;
  font-size: clamp(2.6rem, 1.5rem + 3.6vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
}
.figure dt {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 18ch;
}

.ledger {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 0.5rem clamp(1.5rem, 4vw, 3rem);
  padding-block: 1.4rem 1.6rem;
  border-top: 1px solid var(--rule);
}
.ledger li p {
  margin-top: 0;
}

.doorways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.doorway {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  padding: 1.3rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.doorway span {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.doorway span::after {
  content: ' →';
  color: var(--accent-ink);
}
.doorway small {
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ---------- Legal pages: plain, narrow, solid ---------- */

.legal {
  max-width: 50rem;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
}
.legal__head h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.legal__head p {
  margin-top: 1rem;
  max-width: 38rem;
  color: var(--ink-2);
}
.legal__head .contact__mail {
  margin-top: 1.5rem;
  color: var(--ink);
}
.legal__date {
  font: 500 0.8rem/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-ink) !important;
}
.toc {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ground-raised);
}
.toc ol {
  columns: 2 14rem;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--ink-3);
}
.toc a {
  color: var(--ink-2);
  text-decoration: none;
}
.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.legal__body {
  margin-top: 1rem;
}
.legal__body > section {
  padding-top: 2.6rem;
}
.legal__body h2 {
  font-size: 1.55rem;
  letter-spacing: -0.025em;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.legal__body p,
.legal__body li {
  color: var(--ink-2);
  max-width: 40rem;
}
.legal__body p + p,
.legal__body p + ul,
.legal__body ul + p {
  margin-top: 0.9rem;
}
.legal__body ul {
  margin: 0;
  padding-left: 1.2rem;
}
.legal__body li + li {
  margin-top: 0.55rem;
}
.legal__body li::marker {
  color: var(--accent-ink);
}
.legal__body a {
  color: var(--ink);
}

.record,
.processor {
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ground-raised);
}
.record h3,
.processor h3 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}
.record > p:first-of-type {
  margin-top: 0.5rem;
}
.record dl {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.6rem 1rem;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}
.record dl > div {
  display: contents;
}
.record dt {
  padding-top: 0.2rem;
}
.record dd {
  margin: 0;
  color: var(--ink-2);
}
.processor h3 span {
  display: block;
  margin-top: 0.3rem;
  font: 400 0.8rem/1.4 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.processor p {
  margin-top: 0.6rem;
}
.processor:target,
.record:target {
  border-color: var(--accent-ink);
}

.history {
  width: 100%;
  margin-top: 1.2rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.history th,
.history td {
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
}
.history th {
  font: 500 0.72rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.history td:first-child {
  white-space: nowrap;
  width: 11rem;
}

.notfound {
  min-height: 55vh;
}

/* ---------- Footer ---------- */

.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.colophon__grid {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 5fr) minmax(0, 2.8fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  row-gap: 1rem;
  align-items: start;
}
.colophon__legal {
  color: var(--ink-2);
}
.colophon__apps {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.colophon__apps li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}
.colophon__apps span {
  color: var(--ink-2);
  min-width: 4.5rem;
}
.colophon__apps a,
.colophon__mail a {
  color: var(--ink-3);
}
.colophon__apps a:hover,
.colophon__mail a:hover {
  color: var(--ink);
}
.colophon__mail {
  justify-self: end;
}

/* ---------- Motion: only for people who haven't asked for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from {
    opacity: 0.35;
    translate: 0 2.5rem;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ambient img,
  .plate__screen,
  .plate__icon,
  .hero__icon,
  .screen:nth-child(even) {
    transform: none !important;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .intro,
  .band {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidehead {
    position: static;
    margin-bottom: 1.25rem;
  }
  .sidehead span {
    display: inline;
    margin-left: 0.75rem;
  }
  .work__entry,
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__mark {
    max-width: 26rem;
    width: 100%;
  }
  .features,
  .doorways,
  .ledger li {
    grid-template-columns: minmax(0, 1fr);
  }
  .figures {
    grid-template-columns: minmax(0, 1fr);
  }
  .colophon__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .colophon__mail {
    justify-self: start;
  }
}
@media (max-width: 560px) {
  .masthead__bar {
    padding-left: 1rem;
  }
  .sitenav a {
    padding-inline: 0.55rem;
  }
  .appnav {
    border-radius: 20px !important;
    padding: 0.4rem 0.5rem 0.4rem 1rem;
  }
  .appnav a {
    padding-inline: 0.5rem;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .record dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }
  .record dd + dt,
  .record dl > div + div dt {
    margin-top: 0.6rem;
  }
  .screen:nth-child(even) {
    margin-top: 2rem;
  }
}

.app-nab{--accent:#ff8a4c;--accent-ink:#ffc29f;--glow:#3a2116}
.app-vessel{--accent:#d4ff3a;--accent-ink:#e3ff7a;--glow:#141a08}
.app-scrutiny{--accent:#78aefc;--accent-ink:#b3d1fd;--glow:#131c2a}
.app-drawstring{--accent:#45d69b;--accent-ink:#8fe8c2;--glow:#0b2219}
