/* work.brianstehman.com
   TriState brand tokens (values from tokens.css, kept here so the page loads
   one stylesheet), the landing page, and the 404 page. */

@font-face { font-family: "Archivo Expanded"; src: url("fonts/archivo-expanded-black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo Condensed"; src: url("fonts/archivo-condensed-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("fonts/noto-serif-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("fonts/noto-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ts-blue: #1a9ad7;
  --ts-blue-dark: #0a587e;
  --ts-navy: #002247;
  --ts-gray: #7e7e7c;
  --ts-black: #000000;
  --ts-white: #ffffff;
  --ts-near-white: #f9f9fb;
  --ts-near-black: #212326;
  --ts-orange: #e07a3c;
  --ts-amber: #f2b134;
  --ts-green: #7fb03b;
  --ts-raspberry: #c2417f;
  --ts-font-display: "Archivo Expanded", "Archivo", "Noto Serif", Arial, sans-serif;
  --ts-font-sans: "Archivo", "Noto Serif", Arial, sans-serif;
  --ts-font-serif: "Noto Serif", "Archivo", Georgia, serif;
  --ts-font-narrow: "Archivo Condensed", "Archivo", "Noto Serif", "Arial Narrow", sans-serif;

  --bg: var(--ts-near-white);
  --surface: var(--ts-white);
  --ink: var(--ts-near-black);
  --ink-soft: color-mix(in srgb, var(--ts-near-black) 88%, var(--ts-white));
  --muted: color-mix(in srgb, var(--ts-gray) 70%, var(--ts-near-black));
  --line: color-mix(in srgb, var(--ts-navy) 11%, var(--ts-white));
  --line-strong: color-mix(in srgb, var(--ts-navy) 22%, var(--ts-white));
  --chrome: color-mix(in srgb, var(--ts-navy) 4%, var(--ts-white));
  --on-dark: rgb(255 255 255 / 84%);
  --on-dark-soft: color-mix(in srgb, var(--ts-white) 78%, var(--ts-blue));
  --stripe: linear-gradient(90deg, var(--ts-blue) 0 52%, var(--ts-green) 52% 64%,
    var(--ts-amber) 64% 76%, var(--ts-orange) 76% 88%, var(--ts-raspberry) 88% 100%);
  --max: 1280px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --gap: clamp(20px, 2.4vw, 34px);
  --radius: 12px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgb(0 34 71 / 6%), 0 8px 24px -6px rgb(0 34 71 / 10%);
  --shadow-lift: 0 2px 6px rgb(0 34 71 / 8%), 0 30px 50px -14px rgb(0 34 71 / 30%);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ts-font-sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd { margin: 0; }

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--ts-blue);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ts-white);
  color: var(--ts-navy);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus { transform: none; }

/* --- Hero: a navy drawing sheet --------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--ts-white);
  /* White text stays above 13:1 on this ground, the soft text above 9:1. */
  background:
    radial-gradient(900px 560px at calc(50% + 420px) 18%, rgb(26 154 215 / 18%), rgb(26 154 215 / 0%) 70%),
    radial-gradient(640px 420px at calc(50% - 760px) 112%, rgb(194 65 127 / 10%), rgb(194 65 127 / 0%) 70%),
    var(--ts-navy);
}

/* Blueprint grid: 24 px minor, 120 px major, fading out toward the edges. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(26 154 215 / 12%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(26 154 215 / 12%) 1px, transparent 1px),
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(120% 95% at 70% 30%, #000 30%, transparent 85%);
  mask-image: radial-gradient(120% 95% at 70% 30%, #000 30%, transparent 85%);
}

/* The brand stripe closes the band, full width. */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: var(--stripe);
  transform-origin: 0 50%;
}

/* Sheet border with zone references, on wide screens only. */
.sheet { display: none; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: clamp(20px, 2.2vw, 30px);
  padding-bottom: clamp(40px, 4.6vw, 62px);
}

.hero__logo {
  display: block;
  width: auto;
  height: clamp(38px, 3.4vw, 46px);
}

.hero__copy {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  padding-top: clamp(36px, 5.4vw, 76px);
}

.kicker {
  color: var(--on-dark-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-bottom: 1rem;
  background: var(--stripe);
  transform-origin: 0 50%;
}

.kicker span { white-space: nowrap; }
.kicker__dot { margin-inline: 0.2em; }
/* The dot is hidden from screen readers; a spoken comma takes its place. */
.kicker > span:first-child::after { content: "" / ","; }

/* When the copy column cannot hold the kicker on one line, the two names
   stack and the dot goes, so no line ends on a stray dot. */
@container (max-width: 459px) {
  .kicker span { display: block; }
  .kicker .kicker__dot { display: none; }
}

.hero__title {
  margin-top: 0.9rem;
  color: var(--ts-white);
  font-family: var(--ts-font-display);
  font-weight: 900;
  /* Sized to the copy column so the title always sets on two lines. */
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-size: clamp(2rem, 10.1cqi, 4.1rem);
  letter-spacing: -0.012em;
  line-height: 1.04;
}

.lede {
  max-width: 34rem;
  margin-top: clamp(1rem, 1.8vw, 1.5rem);
  color: var(--on-dark);
  font-family: var(--ts-font-serif);
  font-size: clamp(1rem, 0.93rem + 0.32vw, 1.2rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.hero__fig {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

/* --- Hero chart (computed by scripts/make-hero-chart.mjs) --------------- */

.hc {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hc text {
  fill: rgb(255 255 255 / 58%);
  font-family: var(--ts-font-narrow);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hc-grid, .hc-h, .hc-ax, .hc-rh path, .hc-sat, .hc-room, .hc-mix, .hc-coil, .hc-xh path { fill: none; }
.hc-area { fill: rgb(26 154 215 / 7%); }
.hc-grid { stroke: rgb(255 255 255 / 7%); }
.hc-grid--major { stroke: rgb(255 255 255 / 12%); }
.hc-h { stroke: rgb(255 255 255 / 13%); stroke-dasharray: 2 4; }
.hc-ax { stroke: rgb(255 255 255 / 30%); }
.hc-rh path { stroke: rgb(26 154 215 / 62%); stroke-width: 1.15; }
.hc-sat { stroke: var(--ts-blue); stroke-width: 2.4; stroke-linejoin: round; }
.hc .hc-unit { fill: rgb(255 255 255 / 42%); }
/* The halo matches the local ground and knocks out a curve passing behind a label. */
.hc-lab text {
  fill: color-mix(in srgb, var(--ts-blue) 62%, var(--ts-white));
  font-size: 12.5px;
  paint-order: stroke;
  stroke: color-mix(in srgb, var(--ts-navy) 85%, var(--ts-blue));
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.hc-room { stroke: rgb(255 255 255 / 34%); stroke-dasharray: 4 4; }
.hc-mix { stroke: rgb(255 255 255 / 62%); stroke-width: 1.5; }
.hc-coil { stroke: var(--ts-orange); stroke-width: 2.6; stroke-linecap: round; }
.hc-arrow { fill: var(--ts-orange); }
.hc-pts circle { fill: var(--ts-navy); stroke: var(--ts-white); stroke-width: 1.8; }
.hc-pts text { fill: rgb(255 255 255 / 90%); font-size: 13.5px; letter-spacing: 0.08em; }

/* Crosshair readout, moved by app.js. */
.hero.is-reading { cursor: crosshair; }
.hc-xh { opacity: 0; transition: opacity 0.18s ease; }
.hc-xh.is-on { opacity: 1; }
.hc-xh path { stroke: rgb(255 255 255 / 42%); stroke-dasharray: 3 3; }
.hc-xh circle { fill: var(--ts-amber); }
.hc .hc-xh text {
  fill: var(--ts-white);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  paint-order: stroke;
  stroke: var(--ts-navy);
  stroke-width: 5px;
  stroke-linejoin: round;
}

/* Cover title block. */
.stamp {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 1px;
  margin-top: clamp(14px, 1.6vw, 22px);
  border: 1px solid rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 22%);
}

.stamp div {
  padding: 7px 13px 8px;
  background: var(--ts-navy);
}

.stamp dt {
  color: rgb(255 255 255 / 64%);
  font: 600 9.5px/1.2 var(--ts-font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stamp dd {
  margin-top: 3px;
  color: var(--ts-white);
  font: 400 14.5px/1.2 var(--ts-font-narrow);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: clamp(28px, 4.4vw, 80px);
  }
  .hero__logo { grid-area: 1 / 1; }
  .hero__copy { grid-area: 2 / 1; align-self: end; }
  .hero__fig { grid-area: 1 / 2 / 3 / 3; align-self: end; }
  .hc { max-width: 560px; }
}

/* Mid widths: the chart renders smaller, so its type is set larger. */
@media (min-width: 700px) and (max-width: 1199.98px) {
  .hc text { font-size: 15px; }
  .hc-lab text { font-size: 15.5px; }
  .hc-pts text, .hc .hc-xh text { font-size: 16.5px; }
  .hc-rh path { stroke-width: 1.4; }
}

@media (min-width: 700px) and (max-width: 979.98px) {
  .hc text { font-size: 18px; }
  .hc-lab text { font-size: 18.5px; }
  .hc-pts text, .hc .hc-xh text { font-size: 19.5px; }
  .hc-rh path { stroke-width: 1.6; }
  .hc-sat { stroke-width: 3; }
  .hc-coil { stroke-width: 3.2; }
  .hc-lab text:nth-child(2), .hc-lab text:nth-child(4) { display: none; }
  .stamp { grid-template-columns: repeat(2, auto); }
}

@media (min-width: 1024px) {
  /* Keeps the logo clear of the sheet's top rule at every width. */
  .hero__grid { padding-top: 30px; }
  .sheet {
    display: block;
    position: absolute;
    top: 18px;
    bottom: 23px;
    left: max(18px, calc(50% - var(--max) / 2 - 44px));
    right: max(18px, calc(50% - var(--max) / 2 - 44px));
    border: 1px solid rgb(255 255 255 / 13%);
    pointer-events: none;
  }
  .zones {
    position: absolute;
    display: flex;
    color: rgb(255 255 255 / 36%);
    font: 400 10px/1 var(--ts-font-narrow);
    letter-spacing: 0.1em;
  }
  .zones i {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;
    font-style: normal;
  }
  .zones i + i::before {
    content: "";
    position: absolute;
    background: rgb(255 255 255 / 16%);
  }
  .zones--x { inset: -15px 0 auto; height: 14px; }
  .zones--x i + i::before { left: 0; top: 4px; width: 1px; height: 14px; }
  .zones--y { inset: 0 auto 0 -15px; width: 14px; flex-direction: column; }
  .zones--y i + i::before { top: 0; left: 4px; width: 14px; height: 1px; }
}

/* Phones: the chart becomes a faint corner drawing behind the copy, raised
   so its AHU cycle clears the kicker and H1. */
@media (max-width: 699.98px) {
  .hero__fig {
    position: absolute;
    z-index: -1;
    top: -36px;
    right: -10%;
    width: min(70%, 320px);
    opacity: 0.5;
  }
  .hc-pts text, .hc-xh { display: none; }
  /* Hidden rather than removed, so their entrance does not replay when the
     window crosses 700px. */
  .hc-tl, .hc-lab, .stamp { visibility: hidden; }
  /* Hidden text would still fetch the condensed face. */
  .hc text, .stamp dd { font-family: var(--ts-font-sans); }
  .kicker { letter-spacing: 0.13em; }
}

/* --- The tools ------------------------------------------------------- */

.main {
  flex: 1 0 auto;
  padding-bottom: clamp(3.25rem, 6vw, 5rem);
}

.main:focus { outline: none; }

.list-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  margin-bottom: clamp(22px, 2.4vw, 32px);
  padding: clamp(26px, 2.8vw, 38px) 0 12px;
  border-bottom: 1px solid var(--line-strong);
}

/* A scale under the heading: a tick every 24 px, a long one every 120 px. */
.list-head::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 8px;
  background:
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 120px) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 24px) 0 0 / 100% 4px no-repeat;
}

.list-head__title {
  color: var(--ts-navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.list-head__hint {
  color: var(--muted);
  font-family: var(--ts-font-serif);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.4;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  margin: 0 0 calc(var(--gap) * -1.4);
  padding: 0;
  list-style: none;
}

/* Each tool spans five shared rows (window, label, title, text, link), so
   labels, titles, text and links line up across a row of cards. */
.tool {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  row-gap: 0;
  margin-bottom: calc(var(--gap) * 1.4);
}

.card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* The lifted shadow lives on its own layer and fades in. */
.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Navy, so the ring holds its contrast over the lifted shadow. */
.card:focus-visible {
  outline: 3px solid var(--ts-navy);
  outline-offset: 4px;
}

@supports not (grid-template-rows: subgrid) {
  .tool { display: block; }
  .card { display: flex; flex-direction: column; height: 100%; }
  .card__foot { margin-top: auto; }
  .card__body { padding-bottom: 18px; }
}

/* Browser window */
.window {
  grid-row: 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--chrome);
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
}

.window__dots {
  display: flex;
  flex: none;
  gap: 5px;
}

.window__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ts-navy) 18%, var(--ts-white));
}

.window__url {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 21px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ts-white);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.lock {
  flex: none;
  margin-right: 6px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.3;
}

.lock rect { fill: var(--muted); stroke: none; }

/* The path gives way first; the host takes an ellipsis only once it alone
   is wider than the pill (16px is the lock and its margin). */
.window__url b {
  flex: none;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-weight: 600;
}

.window__url span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Until a screenshot arrives, the frame shows a page skeleton. */
.window__view {
  --sk: color-mix(in srgb, var(--ts-navy) 8%, var(--ts-white));
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(var(--sk) 0 0) 6.8% 21% / 36% 6% no-repeat,
    linear-gradient(var(--sk) 0 0) 10.4% 33% / 58% 3% no-repeat,
    linear-gradient(var(--sk) 0 0) 8.3% 40% / 47% 3% no-repeat,
    linear-gradient(var(--sk) 0 0) 6% 84% / 27% 32% no-repeat,
    linear-gradient(var(--sk) 0 0) 50% 84% / 27% 32% no-repeat,
    linear-gradient(var(--sk) 0 0) 94% 84% / 27% 32% no-repeat,
    linear-gradient(color-mix(in srgb, var(--ts-navy) 14%, var(--ts-white)) 0 0) top / 100% 9% no-repeat,
    color-mix(in srgb, var(--ts-navy) 3%, var(--ts-white));
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transform-origin: 50% 30%;
  transition: opacity 0.45s ease;
}

.shot.is-loading { opacity: 0; }

/* Full-page capture that scrolls through the frame (added by app.js). */
.shot-tall {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  /* On leave the capture fades out where it is, then snaps back to the top
     once it is invisible. */
  transition: opacity 0.3s linear, transform 0s linear 0.3s;
}

.scrollbar {
  position: absolute;
  top: 6px;
  right: 4px;
  bottom: 6px;
  width: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scrollbar i {
  display: block;
  height: var(--thumb-h);
  border-radius: 5px;
  background: rgb(0 34 71 / 48%);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 60%);
  transition: transform 0s linear 0.3s;
}

.card.is-active .shot-tall,
.card.is-active .scrollbar i { will-change: transform; }

.card.is-active.has-tall .shot-tall {
  opacity: 1;
  transform: translateY(var(--pan));
  transition:
    opacity 0.25s linear 0.15s,
    transform var(--pan-dur) cubic-bezier(0.45, 0.05, 0.3, 1) 0.6s;
}

.card.is-active.has-tall .scrollbar {
  opacity: 1;
  transition-delay: 0.3s;
}

.card.is-active.has-tall .scrollbar i {
  transform: translateY(var(--thumb-to));
  transition: transform var(--pan-dur) cubic-bezier(0.45, 0.05, 0.3, 1) 0.6s;
}

/* Card text */
.card__meta {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 14px 0;
  color: var(--ts-blue-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.card__num {
  color: var(--ts-navy);
  font-family: var(--ts-font-display);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.card__rule {
  flex: none;
  width: 18px;
  height: 2px;
  background: var(--ts-blue);
}

.card__head {
  grid-row: 3;
  margin: 8px 14px 0;
}

.card__title {
  color: var(--ts-navy);
  font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.34rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.card__sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: var(--ts-font-serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
  text-wrap: pretty;
}

/* Spoken periods, so the card description reads as sentences. */
.card__kind::after,
.card__sub::after { content: "" / "."; }

.card__body {
  grid-row: 4;
  margin: 10px 14px 0;
}

.card__blurb {
  color: var(--ink-soft);
  font-family: var(--ts-font-serif);
  font-size: 0.94rem;
  line-height: 1.62;
  text-wrap: pretty;
}

/* Highlights, set as drafting notes with a slash marker. */
.card__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ts-blue-dark);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
}

.card__notes li {
  position: relative;
  padding-left: 13px;
}

.card__notes li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.2em;
  width: 1.5px;
  height: 0.8em;
  background: var(--ts-blue);
  transform: rotate(32deg);
}

.card__foot {
  grid-row: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 14px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ts-blue-dark);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
}

.card__open { transition: color 0.25s ease; }

/* Two stacked arrows: on hover the first leaves right as the second
   comes in from the left. */
.card__go {
  position: relative;
  isolation: isolate;
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ts-navy);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.card__go::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 50%;
  background: var(--ts-navy);
  transform: scale(0);
  transition: transform 0.4s var(--ease-out);
}

.card__go svg {
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease-out);
}

.card__go svg + svg { transform: translateX(-190%); }

/* Hover and focus. Hover is read from the list item, which never moves, so
   a lifted card cannot slip out from under the pointer at its edge. */
@media (hover: hover) and (pointer: fine) {
  .tool:hover .card::before { opacity: 1; }
  .tool:hover .card__open { color: var(--ts-navy); }
  .tool:hover .card__go { border-color: var(--ts-navy); color: var(--ts-white); }
  .tool:hover .card__go::before { transform: scale(1); }
}

.card:focus-visible::before { opacity: 1; }
.card:focus-visible .card__open { color: var(--ts-navy); }
.card:focus-visible .card__go { border-color: var(--ts-navy); color: var(--ts-white); }
.card:focus-visible .card__go::before { transform: scale(1); }

@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.5s cubic-bezier(0.3, 1.35, 0.5, 1); }
  .card--zoom .shot { transition: opacity 0.45s ease, transform 0.9s ease; }

  @media (hover: hover) and (pointer: fine) {
    .tool:hover .card { transform: translateY(-6px); }
    .tool:hover .card--zoom .shot { transform: scale(1.045); }
    .tool:hover .card__go svg:first-child { transform: translateX(190%); }
    .tool:hover .card__go svg + svg { transform: none; }
  }

  .card:focus-visible { transform: translateY(-6px); }
  .card--zoom:focus-visible .shot { transform: scale(1.045); }
  .card:focus-visible .card__go svg:first-child { transform: translateX(190%); }
  .card:focus-visible .card__go svg + svg { transform: none; }
}

/* Touch: a press instead of hover. */
@media (hover: none) {
  .card { transition: transform 0.2s ease; }
  .card:active { transform: scale(0.985); }
}

@media (max-width: 1199.98px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639.98px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 8px 8px 16px; }
  .card__meta, .card__head, .card__body, .card__foot { margin-inline: 12px; }
  .window__bar { min-height: 30px; }
}

/* Narrow two-column band: slightly smaller address text, so the paths still
   tell the three brianstehman.com tools apart. */
@media (min-width: 640px) and (max-width: 699.98px) {
  .window__url { font-size: 0.66rem; }
}

/* Short laptop windows (about 1366x657, 1440x789, 1536x730): a smaller
   chart and tighter spacing so the first card row shows above the fold. */
@media (min-width: 700px) and (max-height: 820px) {
  .hc { max-width: 430px; }
  .stamp { margin-top: 8px; }
  .hero:not(.hero--nf) .hero__grid { padding-bottom: 34px; }
  .hero:not(.hero--nf) .hero__copy { padding-top: 28px; }
  .list-head { padding-top: 20px; }
}
@media (min-width: 1200px) and (max-height: 820px) {
  .hc text { font-size: 15px; }
  .hc-lab text { font-size: 15.5px; }
  .hc-pts text, .hc .hc-xh text { font-size: 16.5px; }
  .hc-rh path { stroke-width: 1.4; }
}

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

.foot {
  position: relative;
  background: var(--ts-navy);
  color: var(--on-dark-soft);
  font-size: 0.9rem;
}

.foot::before {
  content: "";
  display: block;
  height: 5px;
  background: var(--stripe);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.foot__text {
  max-width: 52ch;
  font-family: var(--ts-font-serif);
  line-height: 1.6;
  text-wrap: pretty;
}

.foot__text .nb { white-space: nowrap; }

.foot__logo {
  display: block;
  width: auto;
  height: 40px;
}

/* --- 404 -------------------------------------------------------------- */

/* The 404 band fills the window above the footer; its stripe is the only one. */
.hero--nf {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.hero--nf + .foot::before { display: none; }
.hero__grid--nf {
  flex: 1 0 auto;
  grid-template-rows: auto 1fr;
  padding-bottom: clamp(48px, 7vw, 96px);
}
.hero__grid--nf .hero__copy { align-self: center; }
.hero__grid--nf .lede { max-width: 32rem; }

.nf__title {
  margin-top: 0.9rem;
  max-width: 12ch;
  color: var(--ts-white);
  font-family: var(--ts-font-display);
  font-size: clamp(2rem, 1.1rem + 3.6vw, 3.6rem);
  /* Capped by the copy column too, so it never sets as a three-line rag. */
  font-size: clamp(2rem, min(1.1rem + 3.6vw, 11.5cqi), 3.6rem);
  font-weight: 900;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-wrap: balance;
}

.nf__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 1.75rem;
  padding: 0.7rem 1.1rem 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--ts-white);
  color: var(--ts-navy);
  font-weight: 700;
  text-decoration: none;
}

.nf__back svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease-out);
}

.nf__back:hover svg,
.nf__back:focus-visible svg { transform: translateX(-3px); }

.nf__sketch {
  display: block;
  width: min(100%, 320px);
  height: auto;
  overflow: visible;
}

.nf__sketch .s-ax { fill: none; stroke: rgb(255 255 255 / 30%); }
.nf__sketch .s-rh { fill: none; stroke: rgb(26 154 215 / 60%); stroke-width: 1.2; }
.nf__sketch .s-sat { fill: none; stroke: var(--ts-blue); stroke-width: 2.4; }
.nf__sketch .s-lead { fill: none; stroke: rgb(255 255 255 / 45%); stroke-dasharray: 3 3; }
.nf__sketch .s-pt { fill: var(--ts-amber); }
.nf__sketch .s-ring { fill: none; stroke: var(--ts-amber); stroke-width: 1.5; }

@media (min-width: 700px) {
  .hero__grid--nf .hero__fig { grid-area: 2 / 2; align-self: center; }
}

@media (max-width: 699.98px) {
  .hero__grid--nf .hero__fig {
    position: static;
    width: 200px;
    margin-top: 36px;
    opacity: 1;
  }
}

/* --- Motion ------------------------------------------------------------- */

/* The entrance is CSS only and needs the js class from the head script, so
   it always completes, with or without app.js. */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero::after { animation: sweep 1.2s cubic-bezier(0.6, 0, 0.2, 1) 0.1s backwards; }
  html.js .kicker::before { animation: sweep 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.2s backwards; }
  html.js .kicker { animation: fade-up 0.8s var(--ease-out) 0.05s backwards; }
  html.js .hero__logo { animation: fade 0.8s ease backwards; }

  /* Each word rises out of its own mask. */
  html.js .hero__title .w {
    display: inline-block;
    overflow: hidden;
    margin-block: -0.08em -0.14em;
    padding-block: 0.08em 0.14em;
    vertical-align: top;
  }
  html.js .hero__title .w > span {
    display: inline-block;
    animation: word-rise 0.95s var(--ease-out) backwards;
  }
  html.js .hero__title .w:nth-of-type(1) > span { animation-delay: 0.14s; }
  html.js .hero__title .w:nth-of-type(2) > span { animation-delay: 0.21s; }
  html.js .hero__title .w:nth-of-type(3) > span { animation-delay: 0.28s; }
  html.js .hero__title .w:nth-of-type(4) > span { animation-delay: 0.35s; }
  html.js .hero__title .w:nth-of-type(5) > span { animation-delay: 0.42s; }

  html.js .lede { animation: fade-up 0.9s var(--ease-out) 0.5s backwards; }

  /* 404: the headline, sketch and link join the shared kicker/lede entrance. */
  html.js .nf__title { animation: fade-up 0.9s var(--ease-out) 0.14s backwards; }
  html.js .nf__sketch { animation: fade 1.1s ease 0.3s backwards; }
  html.js .nf__back { animation: fade-up 0.8s var(--ease-out) 0.6s backwards; }

  /* Chart draw-on. */
  html.js .hc-area, html.js .hc-grid, html.js .hc-h, html.js .hc-ax, html.js .hc-tl {
    animation: fade 1.1s ease 0.1s backwards;
  }
  html.js .hc-sat, html.js .hc-rh path, html.js .hc-mix, html.js .hc-coil {
    animation: draw 1.2s cubic-bezier(0.55, 0.1, 0.25, 1) 0.2s backwards;
  }
  html.js .hc-rh path:nth-child(1) { animation-delay: 0.62s; }
  html.js .hc-rh path:nth-child(2) { animation-delay: 0.57s; }
  html.js .hc-rh path:nth-child(3) { animation-delay: 0.52s; }
  html.js .hc-rh path:nth-child(4) { animation-delay: 0.47s; }
  html.js .hc-rh path:nth-child(5) { animation-delay: 0.42s; }
  html.js .hc-rh path:nth-child(6) { animation-delay: 0.37s; }
  html.js .hc-rh path:nth-child(7) { animation-delay: 0.32s; }
  html.js .hc-rh path:nth-child(8) { animation-delay: 0.27s; }
  html.js .hc-rh path:nth-child(9) { animation-delay: 0.22s; }
  html.js .hc-lab { animation: fade 0.6s ease 1.15s backwards; }
  html.js .hc-mix { animation-duration: 0.5s; animation-delay: 1.3s; }
  html.js .hc-coil { animation-duration: 0.6s; animation-delay: 1.65s; }
  html.js .hc-room, html.js .hc-arrow { animation: fade 0.5s ease 2s backwards; }
  html.js .hc-pts g {
    transform-box: fill-box;
    transform-origin: center;
    animation: pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) backwards;
  }
  html.js .hc-pts g:nth-child(1) { animation-delay: 1.15s; }
  html.js .hc-pts g:nth-child(2) { animation-delay: 1.25s; }
  html.js .hc-pts g:nth-child(3) { animation-delay: 1.6s; }
  html.js .hc-pts g:nth-child(4) { animation-delay: 2.1s; }
  /* The title block signs off the drawing. */
  html.js .stamp { animation: fade 0.6s ease 1.6s backwards; }

  /* Cards rise in, in reading order. */
  html.js .list-head { animation: fade 0.8s ease 0.4s backwards; }
  html.js .tool { animation: fade-up 0.8s var(--ease-out) backwards; }
  html.js .tool:nth-child(1) { animation-delay: 0.45s; }
  html.js .tool:nth-child(2) { animation-delay: 0.53s; }
  html.js .tool:nth-child(3) { animation-delay: 0.61s; }
  html.js .tool:nth-child(4) { animation-delay: 0.69s; }
  html.js .tool:nth-child(5) { animation-delay: 0.77s; }
  html.js .tool:nth-child(6) { animation-delay: 0.85s; }
}

@keyframes sweep { from { transform: scaleX(0); } }
@keyframes word-rise { from { transform: translateY(110%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } }
@keyframes draw {
  from { stroke-dasharray: 1 2; stroke-dashoffset: 1.02; }
  to { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card::before, .card__go, .card__go::before, .card__go svg, .card__open, .shot, .hc-xh { transition: none; }
  .shot-tall, .scrollbar { display: none; }
}

/* --- Forced colors and print ------------------------------------------- */

@media (forced-colors: active) {
  .card { border: 1px solid CanvasText; }
  .hero::after, .foot::before, .kicker::before { background: CanvasText; }
  .card__notes li::before, .card__rule { background: CanvasText; }
  /* The white logo keeps a navy plate, so it shows on a light Canvas too. */
  .hero__logo, .foot__logo {
    forced-color-adjust: none;
    box-sizing: content-box;
    padding: 6px 10px;
    border-radius: 4px;
    background-color: var(--ts-navy);
  }
  /* SVG fills and strokes are not forced; map the white ones to system
     colors, keeping the grid a faint texture. */
  .hc text, .hc .hc-unit { fill: CanvasText; }
  .hc-lab text { stroke: Canvas; }
  .hc-ax, .hc-mix, .hc-room { stroke: GrayText; }
  .hc-grid, .hc-h { stroke: CanvasText; stroke-opacity: 0.2; }
  .hc-pts circle { fill: Canvas; stroke: CanvasText; }
  .hc-xh path { stroke: CanvasText; stroke-opacity: 0.6; }
  .hc .hc-xh text { fill: CanvasText; stroke: Canvas; }
  .nf__sketch .s-ax, .nf__sketch .s-lead { stroke: CanvasText; }
}

@media print {
  .hero, .foot { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .skip, .hc-xh, .sheet { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}
