/* Typefaces from the joshcool.com design, self-hosted. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono.woff2") format("woff2-variations");
}

:root {
  --paper: #f3f0e8;
  --card: #fbfaf6;
  --card-tint: #f7f4ec;
  --band: #e9e4d8;
  --ink: #15171c;
  --text: #2e323a;
  --muted: #4a4f5a;
  --rule: #d6cfbf;
  --pill: #8c8472;
  --accent: #2447d6;
  --current: #b8430f;
  --night-text: #d9d4c8;
  --night-muted: #b9b4a8;
  --night-rule: #3a3d45;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --pad-x: clamp(1.25rem, 7.5vw, 7.5rem);
  --section-gap: clamp(4.5rem, 9vw, 7.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 1rem; }
.skip:focus { left: 1.5rem; z-index: 10; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; border-radius: 8px; }

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

/* Shared type */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.plain { color: var(--muted); }

.display-1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 1.3rem + 4.6vw, 4.75rem);
  line-height: 1.02;
  font-weight: 760;
  letter-spacing: -0.035em;
}
.display-2 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.5rem);
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: -0.03em;
}
.display-3 {
  font-family: var(--display);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem);
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: -0.03em;
}
.title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.375rem); line-height: 1.55; color: var(--text); }

.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; }
.pills li, .pill {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--pill);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { color: var(--paper); background: #2b2e36; }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--card); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.redact {
  display: inline-block;
  width: 11.875rem;
  max-width: 100%;
  height: 1.125rem;
  border-radius: 4px;
  background: var(--ink);
  vertical-align: middle;
}
.unredacted { font-weight: 600; color: var(--ink); }

/* Header */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem var(--pad-x);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.brand-name { font-family: var(--display); font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding: 0; }
.site-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.site-nav a[aria-current="page"] { font-weight: 600; }
.site-nav .nav-cta { margin-left: 0.5rem; padding: 0 1.125rem; border-radius: 10px; background: var(--ink); color: var(--paper); }
.site-nav .nav-cta:hover { color: var(--paper); }

.keybar { padding: 0.875rem var(--pad-x); background: var(--band); font-size: 1rem; color: var(--text); }
.keybar a { font-family: var(--mono); font-size: 0.875rem; }

main { display: flex; flex-direction: column; }
.section { padding: var(--section-gap) var(--pad-x) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; }
.section-head > div { display: flex; flex-direction: column; gap: 1rem; }
.section-head > p { max-width: 27.5rem; font-size: 1.1875rem; line-height: 1.55; color: var(--text); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 3rem;
  align-items: end;
  padding: clamp(3rem, 7vw, 6rem) var(--pad-x) clamp(3rem, 6vw, 5.5rem);
}
.hero-copy { grid-column: 1 / span 7; display: flex; flex-direction: column; }
.hero-copy h1 { margin-top: 1.5rem; }
.hero-copy .lede { margin-top: 2rem; max-width: 38.75rem; }
.hero-copy .actions { margin-top: 2.5rem; }

.spec {
  grid-column: 8 / span 5;
  padding: 1.75rem 1.75rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.spec-head { display: flex; align-items: center; justify-content: space-between; }
.spec-head h2 { font-family: var(--mono); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.spec-head span { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.spec > p { margin-top: 0.75rem; font-size: 1.0625rem; line-height: 1.5; color: var(--text); }
.spec dl { margin-top: 1.25rem; }
.spec dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.875rem 0; border-top: 1px solid var(--rule); }
.spec dt { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.spec dd { font-size: 1.0625rem; font-weight: 600; text-align: right; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1.5rem;
  margin: 0 var(--pad-x);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.stats div { display: flex; flex-direction: column; gap: 0.625rem; padding: 2rem 0; }
.stats .num { font-family: var(--display); font-size: clamp(2.75rem, 2rem + 2.4vw, 3.75rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; }
.stats .label { font-size: 1.0625rem; line-height: 1.45; color: var(--muted); }

/* Changelog */

.cl-bar {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cl-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border-radius: 999px;
  border: 1px solid var(--pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  cursor: pointer;
}
.chip span { font-size: 0.75rem; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.legend { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.legend i { display: block; width: 12px; height: 12px; border-radius: 50%; }
.legend .now { background: var(--current); }
.legend .past { border: 2px solid var(--accent); }
.order-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 10px;
  border: 1px solid var(--pill);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  cursor: pointer;
}
.order-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cl-count { margin-top: 1rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

.cl-list { list-style: none; margin-top: 2rem; padding: 0; }
.cl-list > li { display: grid; grid-template-columns: 13.75rem 3rem minmax(0, 1fr); }
.cl-when { padding: 1.75rem 1.5rem 0 0; text-align: right; display: flex; flex-direction: column; gap: 0.375rem; }
.cl-date { font-family: var(--mono); font-size: 0.9375rem; font-weight: 600; }
.cl-type { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cl-rail { position: relative; display: flex; justify-content: center; }
.cl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; background: var(--rule); }
.cl-rail i {
  position: relative;
  display: block;
  margin-top: 1.875rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px var(--paper);
}
.is-now .cl-rail i { background: var(--current); border-color: var(--current); }
.cl-body { padding: 1.25rem 0 2.5rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.cl-org { font-style: italic; color: var(--muted); }
.cl-body > p:not(.cl-org) { margin-top: 0.375rem; max-width: 48.75rem; }
.cl-body .pills { margin-top: 0.625rem; }

/* Work cards */

.cards { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-top svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card .status { padding: 0.25rem 0.625rem; border: 1px solid var(--pill); border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; color: var(--text); }
.card h3 { margin-top: 0.5rem; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .pills { margin-top: auto; padding-top: 0.5rem; }
.more-link { margin-top: 2rem; font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; }

/* Ventures and credentials */

.duo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 1.5rem; row-gap: 4rem; }
.duo > div { display: flex; flex-direction: column; gap: 1rem; }
.duo .ventures { grid-column: 1 / span 5; }
.duo .credentials { grid-column: 7 / span 6; }
.duo .ventures > p:not(.eyebrow) { margin-top: 0.5rem; font-size: 1.1875rem; color: var(--text); }
.out-link { display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start; min-height: 2.75rem; font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; }
.out-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.certs { list-style: none; margin-top: 0.5rem; padding: 0; border-bottom: 1px solid var(--rule); }
.certs li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; padding: 0.875rem 0; border-top: 1px solid var(--rule); }
.certs .yr { font-family: var(--mono); font-size: 0.875rem; color: var(--muted); padding-top: 0.15rem; }
.certs .by { color: var(--muted); }

/* Contact (dark) */

.contact {
  margin-top: var(--section-gap);
  padding: clamp(4.5rem, 8vw, 7rem) var(--pad-x) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background: var(--ink);
  color: var(--paper);
}
.contact .eyebrow { color: var(--night-muted); }
.contact h2 { font-family: var(--display); font-size: clamp(3rem, 1.6rem + 5.6vw, 6rem); line-height: 1; font-weight: 760; letter-spacing: -0.04em; }
.contact .lede { max-width: 40rem; color: var(--night-text); }
.contact .actions { margin-top: 0.75rem; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { color: var(--ink); background: #fff; }
.btn-ghost { border: 1px solid var(--paper); color: var(--paper); }
.btn-ghost:hover { color: var(--paper); background: #24272e; }
.contact .note { font-size: 1rem; color: var(--night-text); max-width: 40rem; }
.contact .note a { color: var(--paper); }
.contact-meta, .site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.contact-meta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--night-rule); color: var(--night-muted); }
.site-footer { margin-top: var(--section-gap); padding: 1.5rem var(--pad-x) 3rem; border-top: 1px solid var(--rule); color: var(--muted); }

/* Projects page */

.page-hero { padding: clamp(3rem, 6vw, 5.5rem) var(--pad-x) 3.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.page-hero h1 { max-width: 61.25rem; }
.segmented { display: flex; align-self: flex-start; margin-top: 0.5rem; border: 1px solid var(--ink); border-radius: 12px; overflow: hidden; }
.segmented a { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; padding: 0 1.375rem; color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 0.9375rem; }
/* Without JavaScript the first link looks selected; with tabs, the selected one does. */
.segmented a:first-child,
.tabs-ready .segmented a[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs-ready .segmented a[aria-selected="false"] { background: transparent; color: var(--ink); }
.tabs-ready .segmented a:hover[aria-selected="false"] { background: var(--card); }
.tabs-ready [role="tabpanel"] + [role="tabpanel"] { padding-top: 0; }
.segmented a { transition: background-color 0.15s ease, color 0.15s ease; }
@media (prefers-reduced-motion: no-preference) {
  .tabs-ready [role="tabpanel"]:not([hidden]) { animation: panel-in 0.25s ease; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.segmented span { font-size: 0.75rem; }

.group { padding: 0 var(--pad-x); display: flex; flex-direction: column; gap: 2rem; scroll-margin-top: 1rem; }
.group + .group { padding-top: var(--section-gap); }
.group-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 3rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.group-head p { max-width: 32.5rem; color: var(--text); }

.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.proj { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; }
.sig { display: block; width: 100%; height: 120px; background: var(--card-tint); border-bottom: 1px solid var(--rule); border-radius: 16px 16px 0 0; }
.sig .base { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 4 6; }
.sig .wave { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.proj-body { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.75rem 2rem 2rem; flex-grow: 1; }
.proj-body .built-for { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; font-size: 1rem; color: var(--text); }
.proj-body .pills { margin-top: 0.5rem; }
.proj-body .read { margin-top: auto; padding-top: 0.5rem; font-family: var(--mono); font-size: 0.875rem; font-weight: 500; }

.sealed {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 1.5rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
}
.sealed-art { grid-column: 1 / span 7; width: 100%; height: auto; display: block; background: #efebe1; border-radius: 12px; }
.sealed-info { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 0.875rem; padding: 0.5rem 0; }
.sealed-info h3 { font-family: var(--display); font-size: clamp(2.25rem, 1.8rem + 1.6vw, 2.75rem); line-height: 1; font-weight: 760; letter-spacing: -0.03em; }
.lock-label { display: flex; align-items: center; gap: 0.5rem; }
.lock-label svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.redact-lines { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.25rem; }
.redact-lines span { display: block; height: 1rem; border-radius: 4px; background: var(--ink); }
.facts { margin-top: 0.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.facts div { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.625rem; border-top: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.facts .redact { width: 7.5rem; height: 0.875rem; }

.per-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }


/* Case studies */

.case { padding: clamp(2.5rem, 6vw, 5rem) var(--pad-x) 0; display: flex; flex-direction: column; }
.case > * { max-width: 48rem; }
.case .back { font-family: var(--mono); font-size: 0.875rem; }
.case .eyebrow { margin-top: 2rem; }
.case h1 { margin-top: 1rem; }
.case > .lede { margin-top: 1.5rem; }
.case .details { margin-top: 2.5rem; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.75rem 2rem; padding: 1.25rem 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.case .details dt { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
.case section { margin-top: 3rem; display: flex; flex-direction: column; gap: 1rem; }
.case section h2 { font-family: var(--display); font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem); font-weight: 700; letter-spacing: -0.02em; }
.case section ul { padding-left: 1.25rem; }
.case section li + li { margin-top: 0.5rem; }

/* Narrow screens */

@media (max-width: 1080px) {
  .hero-copy, .spec { grid-column: 1 / -1; }
  .spec { max-width: 36rem; }
  .cards, .per-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo .ventures, .duo .credentials { grid-column: 1 / -1; }
  .sealed-art, .sealed-info { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0 0.5rem; font-size: 0.8125rem; }
  .site-nav .nav-cta { margin-left: 0.25rem; padding: 0 0.75rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .per-grid, .proj-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-list > li { grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.75rem; }
  .cl-when { grid-column: 2; grid-row: 1; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; padding: 1.5rem 0 0; text-align: left; }
  .cl-when .cl-type::before { content: "· "; }
  .cl-rail { grid-column: 1; grid-row: 1 / span 2; }
  .cl-rail i { margin-top: 1.6rem; width: 16px; height: 16px; }
  .cl-body { grid-column: 2; padding: 0.5rem 0 2rem; }
  .card, .proj-body, .sealed { padding: 1.5rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .case .details { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .case .details dd + dt { margin-top: 0.75rem; }
}

@media print {
  .site-nav, .keybar, .cl-bar, .actions, .skip { display: none !important; }
  body { background: #fff; }
  .contact { background: #fff; color: #000; }
}

.redact-lines .w100 { width: 100%; }
.redact-lines .w86 { width: 86%; }
.redact-lines .w62 { width: 62%; }
.read { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; }
.sealed-info .read { align-self: flex-start; margin-top: 0.25rem; }
.case .locked-note { padding: 1rem 1.25rem; background: var(--band); border-radius: 12px; font-size: 1rem; color: var(--text); }
.case .locked-note a { font-family: var(--mono); font-size: 0.875rem; }


/* A note from Claude */
.claude-note {
  margin: 3rem 0 0;
  max-width: 48rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
}
.claude-note blockquote { margin: 0; }
.claude-note blockquote p { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.65; }
.claude-note blockquote p + p { margin-top: 1.1em; }
.claude-note figcaption { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 0.35rem; }
.claude-note .who { font-family: var(--display); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.claude-note .what { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.site-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.site-line .redact { width: 9rem; }

/* Redaction bars explain themselves on hover, or on tap on touch screens. */
.redact, .redact-lines { position: relative; cursor: help; }
.redact:focus, .redact-lines:focus { outline: none; }
.redact::after,
.redact-lines::after {
  content: "Key required to view";
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.redact:hover::after,
.redact:focus::after,
.redact-lines:hover::after,
.redact-lines:focus::after { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .redact::after, .redact-lines::after { transition: opacity 0.15s ease, visibility 0.15s; }
}

/* Playground: shared layout for every experiment (see pg-core.js) */

.pg-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.pg-card { position: relative; transition: border-color 0.15s ease, transform 0.15s ease; }
.pg-card:hover { border-color: var(--ink); }
.pg-card h2 a { color: inherit; text-decoration: none; }
.pg-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.pg-card h2 a:focus-visible { outline: none; }
.pg-card:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.pg-card-tldr { color: var(--text); }
.pg-card-tldr strong, .tldr strong { margin-right: 0.5rem; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--accent); }

.pg-experiment { padding: clamp(2rem, 5vw, 4rem) var(--pad-x) 0; display: flex; flex-direction: column; gap: 2rem; }
.pg-head { display: flex; flex-direction: column; gap: 0.75rem; max-width: 52rem; }
.pg-head .back { font-family: var(--mono); font-size: 0.875rem; }
.pg-head .eyebrow { margin-top: 0.75rem; }
.tldr { max-width: 44rem; font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.5; color: var(--text); }

.pg-bench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem); gap: 1.5rem; align-items: start; }
.pg-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }

/* Stage and transport read as one object, like a player. */
.pg-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(13rem, 32vw, 26rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  background: var(--card);
  background-image: radial-gradient(circle at 1px 1px, var(--rule) 1px, transparent 0);
  background-size: 22px 22px;
  border: 1px solid var(--rule);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.pg-stage.is-dark { background-color: #0f1116; background-image: radial-gradient(circle at 1px 1px, #22262e 1px, transparent 0); border-color: #0f1116; }
.pg-stage svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
.pg-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 16px 16px 0 0; }

.pg-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0 0 16px 16px;
}
.pg-spacer { flex: 1 1 auto; }
.pg-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--pill);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  cursor: pointer;
}
.pg-tool:hover { background: var(--band); }
.pg-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-play { background: var(--ink); border-color: var(--ink); color: var(--paper); padding: 0 1.125rem; }
.pg-play:hover { background: #2b2e36; }
.pg-play svg { fill: currentColor; stroke: none; }
.pg-tool[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pg-speed { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; padding: 0 0.5rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.pg-speed input { width: 7.5rem; accent-color: var(--accent); }
.pg-speed output { min-width: 2.5rem; color: var(--ink); }
.pg-status { margin-top: 0.875rem; font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); min-height: 1.3em; }

/* Settings panel */
.pg-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  overscroll-behavior: contain;
}
.pg-group + .pg-group { border-top: 1px solid var(--rule); }
.pg-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  padding: 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.pg-group summary::-webkit-details-marker { display: none; }
.pg-group summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform 0.15s ease; }
.pg-group:not([open]) summary::after { transform: rotate(-45deg); }
.pg-group summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pg-group-body { display: flex; flex-direction: column; gap: 1rem; padding: 0 1.25rem 1.25rem; }
.pg-group-body > [hidden] { display: none; }

.field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .field legend {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field legend { margin-bottom: 0.375rem; }
.field input[type="text"], .field input[type="search"], .field select, .pg-font-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--pill);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
}
.field input[type="color"], .pg-swatches input { width: 100%; min-height: 2.75rem; padding: 0.2rem; border: 1px solid var(--pill); border-radius: 10px; background: var(--paper); cursor: pointer; }
.pg-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }

/* Chips: radio buttons that look like pills */
.pg-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pg-chips.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pg-chips label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--pill);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}
.pg-chips label:hover { background: var(--band); }
.pg-chips input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pg-chips input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Font browser (Quill's custom control) */
.pg-custom { display: flex; flex-direction: column; gap: 0.625rem; }
.picker-count { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.pg-font-search { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; }
.pg-font-combo { position: relative; }
.pg-font-combo input { width: 100%; min-height: 2.75rem; padding: 0 0.75rem; border: 1px solid var(--pill); border-radius: 10px; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1rem; }
.picker-list.is-dropdown { position: absolute; top: calc(100% + 0.375rem); left: 0; right: 0; z-index: 30; height: auto; max-height: 16rem; box-shadow: 0 12px 32px rgba(21, 23, 28, 0.16); }
.picker-list[hidden] { display: none; }
.pg-font-search .pg-tool[disabled] { opacity: 0.6; cursor: progress; }
.picker-list {
  height: 13rem;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid var(--pill);
  border-radius: 10px;
  background: var(--paper);
  overscroll-behavior: contain;
}
.picker-list:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.picker-option { padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 1rem; line-height: 1.3; cursor: pointer; }
.picker-option:hover, .picker-option.is-active { background: var(--band); }
.picker-option[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.picker-more { padding: 0.625rem 0.75rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

@media (max-width: 1080px) {
  .pg-bench { grid-template-columns: minmax(0, 1fr); }
  .pg-panel { position: static; max-height: none; }
  .pg-index { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  /* One row of buttons, speed on its own row underneath. */
  .pg-transport { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .pg-spacer { display: none; }
  .pg-speed { order: 1; grid-column: 1 / -1; justify-content: space-between; }
  .pg-speed input { flex: 1 1 auto; width: auto; }
  /* Icon-only on small screens; the labels stay available to screen readers. */
  .pg-transport .pg-tool:not(.pg-play) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Playground page (single page, matches the design board) */
.pg-hero { padding: clamp(3rem, 7vw, 4.5rem) var(--pad-x) 2.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.pg-wave-title { margin: 0; min-height: 1.25em; display: flex; align-items: center; font-family: var(--display); font-size: clamp(3.5rem, 11vw, 10.5rem); line-height: 1; font-weight: 780; letter-spacing: -0.045em; }
.pg-wave-title [data-wave] { display: flex; }
.pg-wave-title [data-wave] > span { display: inline-block; will-change: transform; }
.pg-wave-title .is-accent { color: var(--accent); }
.pg-globals { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; align-self: flex-start; margin-top: 0.75rem; padding: 1.25rem 1.5rem; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; }
.pg-global-row { display: flex; align-items: center; gap: 0.875rem; }
.pg-global-row input { width: min(16rem, 60vw); min-height: 2.75rem; accent-color: var(--accent); }
.pg-global-row output { min-width: 3.5rem; font-family: var(--mono); font-size: 0.875rem; }

.pg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding: 0 var(--pad-x); }
.pg-tile { display: flex; flex-direction: column; gap: 1.25rem; padding: clamp(1.25rem, 2.5vw, 1.75rem); background: var(--card); border: 1px solid var(--rule); border-radius: 18px; min-width: 0; }
.pg-tile.wide { grid-column: 1 / -1; }
.pg-tile-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2.5rem; }
.pg-tile-head > div { display: flex; flex-direction: column; gap: 0.375rem; }
.pg-tile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.pg-tile-title { margin: 0; display: flex; align-items: center; gap: 0.625rem; font-family: var(--display); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.pg-tile-title .lock { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pg-tile > p { font-size: 1.0625rem; line-height: 1.55; color: var(--text); }
.pg-footnote { padding: 2rem var(--pad-x) 0; font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

/* Harmonic */
.hx-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.hx-panel { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.hx-panel.is-harmonic { border-color: var(--accent); }
.hx-panel figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.hx-panel figcaption > span:first-child { font-weight: 600; color: var(--ink); }
.hx-panel.is-harmonic figcaption > span:first-child { color: var(--accent); }
.hx-panel svg { display: block; width: 100%; height: clamp(15rem, 28vw, 21rem); background: var(--paper); }
.hx-panel.is-harmonic svg { cursor: pointer; }
.hx-ghost { fill: none; stroke: var(--pill); stroke-width: 1; stroke-dasharray: 4 4; }
.hx-plain { fill: var(--pill); fill-opacity: 0.85; fill-rule: evenodd; stroke: var(--muted); stroke-width: 1.2; stroke-linejoin: round; }
.hx-sf { fill: var(--accent); fill-opacity: 0.9; fill-rule: evenodd; stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; transition: fill-opacity 0.2s ease; }
.hx-sf.is-faint { fill-opacity: 0.08; }
.hx-circles { fill: none; stroke: var(--pill); stroke-width: 0.8; }
.hx-chain { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.hx-arm { fill: none; stroke: var(--current); stroke-width: 1.6; stroke-dasharray: 3 3; }
.hx-trail { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hx-pen { fill: var(--current); }
.hx-dots circle { fill: var(--current); stroke: var(--card); stroke-width: 1.4; }
.hx-picker { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.5rem; }
.hx-icon { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 2.75rem; padding: 0.5rem; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); cursor: pointer; }
.hx-icon svg { width: 100%; height: 100%; }
.hx-icon path { fill: var(--ink); fill-rule: evenodd; }
.hx-icon:hover { border-color: var(--ink); }
.hx-icon[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.hx-icon[aria-pressed="true"] path { fill: var(--paper); }
.hx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.hx-actions .pg-status { margin: 0; }
.hx-key { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

/* Quill's compact controls under the stage */
.pg-panel-bar { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 1rem; }
.pg-bar-controls .pg-row { display: grid; gap: 1rem; align-items: end; }
.pg-bar-controls .pg-row.row-main { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); }
.pg-bar-controls .pg-row.row-style { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 0.8fr); }
.pg-bar-controls .pg-row > [hidden] { display: none; }
.pg-bar-controls .pg-chips { flex-wrap: wrap; }
.pg-label { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pg-chips label.is-locked { color: var(--muted); border-style: dashed; cursor: not-allowed; position: relative; }
.pg-chips label.is-locked::after { content: "Key required to view"; position: absolute; bottom: calc(100% + 0.5rem); left: 0; z-index: 20; padding: 0.4rem 0.65rem; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 0.75rem; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
.pg-chips label.is-locked:hover::after { opacity: 1; visibility: visible; }

/* Booth and sealed tiles */
.booth { display: block; width: 100%; height: auto; background: var(--band); border-radius: 12px; }
.booth .aisle { fill: none; stroke: var(--rule); stroke-width: 10; stroke-linecap: round; }
.booth .booths rect { stroke: var(--ink); stroke-width: 1; }
.booth .z1 { fill: #c9d4f5; } .booth .z2 { fill: #f2d6c4; } .booth .z3 { fill: #cfe6da; } .booth .z4 { fill: #e5d3f0; } .booth .z5 { fill: #f5e7b8; }
.booth .pair { fill: none; stroke: var(--current); stroke-width: 3; stroke-dasharray: 6 4; }
.sealed-body { display: flex; flex-direction: column; gap: 0.75rem; }
.sealed-preview { height: 15rem; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--ink); }
.sealed-preview span { font-family: var(--mono); font-size: 0.875rem; color: #b9b4a8; }
.sealed-body .redact-lines { display: flex; flex-direction: column; gap: 0.5rem; }
.sealed-body .redact-lines span { display: block; height: 0.875rem; border-radius: 4px; background: var(--ink); }
.sealed-body .redact-lines span.short { width: 58%; }
.sealed-hint { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 1080px) {
  .pg-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-bar-controls .pg-row.row-main, .pg-bar-controls .pg-row.row-style { grid-template-columns: minmax(0, 1fr); }
  .hx-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hx-panels { grid-template-columns: minmax(0, 1fr); }
}

/* Dark theme (T, the command palette, or the device setting) */
:root[data-theme="dark"] {
  --paper: #121419;
  --card: #1a1d24;
  --card-tint: #1e222a;
  --band: #23272f;
  --ink: #ece8df;
  --text: #d3cfc6;
  --muted: #a3a9b4;
  --rule: #2e333d;
  --pill: #6f7686;
  --accent: #8aa1ff;
  --current: #f0884f;
  --night-text: #d3cfc6;
  --night-muted: #a3a9b4;
  --night-rule: #2e333d;
  color-scheme: dark;
}
:root[data-theme="dark"] .contact { background: #0b0c0f; color: var(--ink); }
:root[data-theme="dark"] .contact .btn-light { background: var(--ink); color: #0b0c0f; }
:root[data-theme="dark"] .contact .btn-light:hover { background: #fff; }
:root[data-theme="dark"] .contact .btn-ghost { border-color: var(--ink); color: var(--ink); }
:root[data-theme="dark"] .contact .btn-ghost:hover { background: #1d2027; color: var(--ink); }
:root[data-theme="dark"] .contact .note a { color: var(--ink); }
:root[data-theme="dark"] .btn-solid:hover,
:root[data-theme="dark"] .pg-play:hover { background: #d6d1c6; }
:root[data-theme="dark"] .sealed-preview span { color: #3a3d45; }
:root[data-theme="dark"] .sealed-art { background: var(--band); }
:root[data-theme="dark"] .booth .booths rect { stroke: #0b0c0f; }

/* Keyboard hint in the footer (hidden where there's no keyboard) */
.kbd-hint kbd { padding: 0.05rem 0.35rem; border: 1px solid currentColor; border-radius: 4px; font-family: var(--mono); font-size: 0.75rem; }
@media (hover: none) { .kbd-hint { display: none; } }

/* Command palette */
.cmdk { width: min(40rem, calc(100vw - 2rem)); max-height: min(36rem, calc(100vh - 4rem)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); overflow: hidden; }
.cmdk[open] { display: flex; flex-direction: column; }
.cmdk::backdrop { background: rgba(10, 11, 14, 0.45); }
.cmdk-search { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--rule); }
.cmdk-search input { flex: 1; min-height: 2.75rem; border: 0; background: transparent; color: var(--ink); font-family: var(--serif); font-size: 1.125rem; outline: none; }
.cmdk-search kbd, .cmdk-hint { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.cmdk-search kbd { padding: 0.15rem 0.4rem; border: 1px solid var(--rule); border-radius: 6px; }
.cmdk-list { flex: 1; overflow-y: auto; padding: 0.5rem; }
.cmdk-group-name { padding: 0.5rem 0.625rem 0.25rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cmdk-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; min-height: 2.75rem; padding: 0.25rem 0.625rem; border-radius: 10px; cursor: pointer; }
.cmdk-item[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.cmdk-item[aria-selected="true"] .cmdk-hint { color: var(--paper); opacity: 0.75; }
.cmdk-item.is-locked { opacity: 0.6; }
.cmdk-glyph { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--band); color: var(--ink); font-family: var(--mono); }
.cmdk-item[aria-selected="true"] .cmdk-glyph { background: rgba(127, 127, 127, 0.25); color: var(--paper); }
.cmdk-empty, .cmdk-help, .cmdk-status { padding: 0.625rem 1rem; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.cmdk-help { border-top: 1px solid var(--rule); }
.cmdk-status { padding-top: 0; min-height: 1.5rem; }

/* Blueprint mode */
.is-blueprint body { background-image: linear-gradient(to right, rgba(36, 71, 214, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(36, 71, 214, 0.07) 1px, transparent 1px); background-size: 24px 24px; }
.is-blueprint :is(header, nav, main, footer, section, article, aside):not(.bp-panel) { outline: 1px dashed var(--accent); outline-offset: -1px; }
.bp-layer { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; z-index: 40; pointer-events: none; }
.bp-tag { position: absolute; padding: 0.1rem 0.35rem; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 0.6875rem; white-space: nowrap; border-radius: 0 0 4px 0; }
.bp-panel { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; width: 16rem; padding: 1rem; border: 1px solid var(--accent); border-radius: 12px; background: var(--card); color: var(--ink); font-family: var(--mono); font-size: 0.8125rem; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); }
.bp-title { font-weight: 700; margin-bottom: 0.5rem; color: var(--accent); }
.bp-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 0; }
.bp-panel dd { margin: 0; }
.bp-panel dd[data-rating="good"] { color: #2a9d5c; }
.bp-panel dd[data-rating="needs-work"] { color: #c98a12; }
.bp-panel dd[data-rating="poor"] { color: #d1453b; }
.bp-note { margin-top: 0.625rem; color: var(--muted); font-size: 0.75rem; }
.bp-close { margin-top: 0.75rem; min-height: 2.25rem; padding: 0 0.75rem; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }

/* Snake */
.snake { width: min(28rem, calc(100vw - 2rem)); padding: 1.25rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); }
.snake::backdrop { background: rgba(10, 11, 14, 0.5); }
.snake[open] { display: flex; flex-direction: column; gap: 0.75rem; }
.snake-head { display: flex; align-items: baseline; gap: 1rem; font-family: var(--mono); font-size: 0.8125rem; }
.snake-title { margin-right: auto; font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.snake-board { width: 100%; height: auto; aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 8px; touch-action: none; }
.snake-note { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.snake .btn { align-self: flex-start; cursor: pointer; }

/* Cookie banner and settings */
.link-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-banner { position: fixed; left: 50%; bottom: 1rem; z-index: 45; transform: translateX(-50%); width: min(44rem, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: 0.75rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2); }
.cookie-banner h2 { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.cookie-banner p { font-size: 1rem; line-height: 1.5; color: var(--text); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.cookie-actions .btn { cursor: pointer; }
.cookie-gpc { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.cookie-settings { width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 1.5rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); }
.cookie-settings[open] { display: flex; flex-direction: column; gap: 1rem; }
.cookie-settings::backdrop { background: rgba(10, 11, 14, 0.45); }
.cookie-settings-head { display: flex; justify-content: space-between; align-items: center; }
.cookie-settings h2 { font-family: var(--display); font-size: 1.75rem; font-weight: 750; }
.cookie-x { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.cookie-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.cookie-group { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.cookie-group-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cookie-group h3 { font-family: var(--display); font-size: 1.125rem; font-weight: 700; }
.cookie-group p { font-size: 0.9375rem; color: var(--text); }
.cookie-group summary { font-family: var(--mono); font-size: 0.8125rem; cursor: pointer; min-height: 2.25rem; display: flex; align-items: center; }
.cookie-group table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.cookie-group th, .cookie-group td { padding: 0.5rem; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.cookie-group th { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.cookie-group td:first-child { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
.cookie-always { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.cookie-switch { position: relative; width: 3.25rem; height: 1.75rem; flex: none; border: 1px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer; }
.cookie-switch .knob { position: absolute; top: 3px; left: 3px; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--ink); transition: transform 0.15s ease; }
.cookie-switch[aria-checked="true"] { background: var(--ink); }
.cookie-switch[aria-checked="true"] .knob { transform: translateX(1.5rem); background: var(--paper); }
.cookie-note { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .cookie-switch .knob { transition: none; } }

/* Phone menu: a Menu button opens the links as a panel (links stay visible without JavaScript) */
.site-header { position: relative; }
.nav-toggle { display: none; }
@media (max-width: 720px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.875rem; border: 1px solid var(--ink); border-radius: 10px; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 0.875rem; cursor: pointer; }
  .js .nav-toggle svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
  .js .site-nav ul { display: none; }
  .js .site-nav.is-open ul { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; position: absolute; right: var(--pad-x); top: calc(100% - 0.75rem); z-index: 30; min-width: 14rem; padding: 0.5rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); }
  .js .site-nav.is-open a { min-height: 2.75rem; padding: 0 0.75rem; font-size: 1rem; }
  .js .site-nav.is-open .nav-cta { margin: 0.25rem 0 0; justify-content: center; }
}
.cl-more { margin-top: 1rem; cursor: pointer; }
.cl-more[hidden] { display: none; }

/* sudo make me a sandwich */
.sandwich { width: min(26rem, calc(100vw - 2rem)); padding: 1.25rem; border: 1px solid var(--rule); border-radius: 16px; background: var(--card); color: var(--ink); }
.sandwich::backdrop { background: rgba(10, 11, 14, 0.45); }
.sandwich[open] { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.sandwich svg { width: 100%; height: auto; overflow: visible; }
.sandwich-caption { font-family: var(--mono); font-size: 0.9375rem; }
.sandwich .btn { cursor: pointer; }
.cmdk-status.is-error { color: #d1453b; }
:root[data-theme="dark"] .cmdk-status.is-error { color: #ff8a80; }

/* The dock and corner bar, recreated from Josh's Bazaar design (38a/38c):
   destinations at the bottom, identity at the top. One object at every width. */
:root { --glass-bg: rgba(251, 250, 246, 0.74); --glass-border: rgba(21, 23, 28, 0.14); --glass-fill: rgba(251, 250, 246, 0.66); --brand-clearance: calc(env(safe-area-inset-top, 0px) + 64px); }
:root[data-theme="dark"] { --glass-bg: rgba(26, 29, 36, 0.74); --glass-border: rgba(236, 232, 223, 0.16); --glass-fill: rgba(26, 29, 36, 0.66); }
body { padding-top: var(--brand-clearance); padding-bottom: 104px; }

.corner-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 55; height: 0; }
.corner-brand { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: env(safe-area-inset-left, 0px); z-index: 55; display: flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; padding: 0.5rem 1.375rem 0.5rem 1.125rem; border: 1.5px solid var(--glass-border); border-left: 0; border-radius: 0 999px 999px 0; background: var(--glass-bg); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.02em; }
.corner-search { display: none; }
.js .corner-search { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 12px); z-index: 55; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1.5px solid var(--glass-border); border-radius: 50%; background: var(--glass-bg); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); color: var(--ink); cursor: pointer; }
.corner-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }

.dock { position: fixed; left: 0; right: 0; width: fit-content; margin-inline: auto; bottom: calc(20px + env(safe-area-inset-bottom, 0px) + var(--dock-lift, 0px)); z-index: 60; display: flex; align-items: center; gap: 8px; height: 58px; padding: 7px; border-radius: 29px; border: 1.5px solid var(--glass-border); box-shadow: 0 12px 34px rgba(18, 24, 32, 0.24); transition: bottom 300ms cubic-bezier(0.34, 1.2, 0.5, 1), transform 300ms cubic-bezier(0.34, 1.2, 0.5, 1), box-shadow 300ms ease; }
.dock::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--glass-bg); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); }
.dock.is-away { transform: translateY(calc(100% + 20px + env(safe-area-inset-bottom, 0px) + var(--dock-lift, 0px))); box-shadow: none; }
.dock > a { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; min-width: 44px; padding: 0 12px; border-radius: 22px; color: var(--muted); text-decoration: none; transition: background 260ms ease, color 260ms ease, transform 180ms ease; }
.dock > a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.dock > a:hover { color: var(--ink); transform: translateY(-1px); }
.dock > a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.dock > a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dock-word { position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translate(-50%, 4px); padding: 5px 11px; border-radius: 999px; background: var(--glass-bg); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); border: 1.5px solid var(--glass-border); color: var(--ink); box-shadow: 0 6px 18px rgba(18, 24, 32, 0.18); font-family: var(--mono); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 200ms ease; }
.dock-word::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.dock a:hover .dock-word, .dock a:focus-visible .dock-word { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dock.is-hushed .dock-word { opacity: 0; pointer-events: none; }
.dock-fin { position: absolute; top: calc(-26px - env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: 52px; height: 22px; border-radius: 11px 11px 7px 7px; border: 1px solid var(--glass-border); background: var(--glass-fill); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--accent); display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; }
.dock-fin svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dock.is-away .dock-fin { opacity: 1; pointer-events: auto; }
.dock-ring { position: absolute; inset: -1.5px; width: calc(100% + 3px); height: calc(100% + 3px); pointer-events: none; opacity: 0; overflow: visible; }
.dock-ring rect { x: 0.75px; y: 0.75px; width: calc(100% - 1.5px); height: calc(100% - 1.5px); rx: 29.75px; fill: none; stroke: var(--accent); stroke-width: 1.5px; stroke-linecap: round; stroke-dasharray: 12 88; stroke-dashoffset: 12; }
.dock.is-sweeping .dock-ring { opacity: 1; }
.dock.is-sweeping .dock-ring rect { animation: dock-sweep 1400ms cubic-bezier(0.32, 0, 0.1, 1) 1, dock-sweep-out 1400ms linear 1; }
@keyframes dock-sweep { from { stroke-dashoffset: 12; } to { stroke-dashoffset: -88; } }
@keyframes dock-sweep-out { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dock, .dock > a, .dock-word, .dock-fin { transition: none; }
  .dock.is-sweeping .dock-ring { opacity: 0; }
}
/* The cookie banner sits above the dock's lane; the dock lifts above it. */
.cookie-banner { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
@media print { .dock, .corner-bar, .corner-brand, .corner-search { display: none !important; } body { padding: 0; } }

/* Wave amplitude options: Animate, units, direction */
.pg-globals { align-items: flex-end; }
.pg-wave-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; }
.pg-wave-opts[hidden] { display: none; }
.pg-wave-opts .pg-tool[aria-pressed="true"] svg { animation: pg-pulse 1.6s ease-in-out infinite; }
@keyframes pg-pulse { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .pg-wave-opts .pg-tool[aria-pressed="true"] svg { animation: none; } }
.pg-seg { display: inline-flex; border: 1px solid var(--pill); border-radius: 10px; overflow: hidden; }
.pg-seg button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; border: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 0.8125rem; cursor: pointer; }
.pg-seg button + button { border-left: 1px solid var(--pill); }
.pg-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pg-seg button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* Harmonics, inside the Harmonic tile */
.hx-harmonics { flex-direction: row; align-items: center; gap: 1rem; }
.hx-harmonics .pg-global-row input { width: min(22rem, 55vw); }
.pg-global-row output { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 4.75rem; }
@media (max-width: 640px) {
  .pg-globals { align-self: stretch; }
  .pg-globals > .field { flex: 1 1 100%; }
  .pg-global-row input, .hx-harmonics .pg-global-row input { flex: 1 1 auto; width: auto; min-width: 0; }
  .hx-harmonics { flex-direction: column; align-items: stretch; gap: 0.375rem; }
}

/* Amplitude readout with its unit dropdown; one cycling wave-style button */
.pg-amp-read { display: inline-flex; align-items: center; gap: 0.25rem; min-width: 6rem; font-family: var(--mono); font-size: 0.875rem; }
.pg-amp-read output { min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pg-unit { min-height: 2.75rem; padding: 0 1.5rem 0 0.375rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--accent); font-family: var(--mono); font-size: 0.875rem; font-weight: 700; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; }
.pg-unit:hover { border-color: var(--pill); }
.pg-unit:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.pg-mode { padding: 0; width: 2.75rem; justify-content: center; }
.pg-mode svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* The unit reads as part of the number: "18 px", with px as a quiet dropdown. */
.pg-global-row .pg-amp-read { flex: none; gap: 0.125rem; min-width: 0; }
.pg-global-row .pg-amp-read output { min-width: 3.25rem; }
.field .pg-amp-read select.pg-unit { width: auto; min-height: 2.75rem; padding: 0 0.25rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--accent); font-family: var(--mono); font-size: 0.875rem; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 4px; }
.field .pg-amp-read select.pg-unit:hover { border-color: var(--pill); }
/* While morphing, the original outline and corner dots step back. */
[data-experiment="harmonic"].is-morphing .hx-ghost, [data-experiment="harmonic"].is-morphing .hx-dots { opacity: 0; }
.hx-ghost, .hx-dots { transition: opacity 0.2s ease; }
[data-hx="tour"][hidden] { display: none; }

/* The shape picker scrolls sideways */
.hx-scroller { display: flex; align-items: center; gap: 0.5rem; }
.hx-picker { flex: 1; min-width: 0; display: flex; gap: 0.5rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 0.25rem 0.125rem 0.625rem; }
.hx-picker.fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); }
.hx-picker.fade-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem); mask-image: linear-gradient(to right, transparent, #000 3rem); }
.hx-picker.fade-start.fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }
.hx-picker .hx-icon { flex: 0 0 4.25rem; scroll-snap-align: start; }
.hx-scroll { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; }
.hx-scroll[hidden] { display: none; }
.hx-scroll:disabled { opacity: 0.35; cursor: default; }
.hx-scroll svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .hx-scroll { display: none; } .hx-picker .hx-icon { flex-basis: 3.75rem; } }

/* External link in a changelog title (MachForm advisory) */
.cl-body .title-out svg { width: 0.7em; height: 0.7em; margin-left: 0.3em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: baseline; opacity: 0.65; }
.cl-body .title-out:hover svg { opacity: 1; }

/* Interactions section: my own UI craft, shown with neutral content */
.ix-sub { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.ix-sub:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.ix-sub-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: 1rem; }
.ix-sub-head h3 { margin: 0; font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.ix-note { margin: 1rem 0 0; font-size: 1rem; line-height: 1.55; color: var(--text); }

/* Proximity cards: distance from the cursor drives --near (0..1) per card */
.px-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.px-card { position: relative; border-radius: 18px; padding: 1.5rem; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--card) calc(55% + 45% * var(--near, 0)), transparent);
  border: 1px solid color-mix(in srgb, var(--ink) calc(8% + 16% * var(--near, 0)), transparent);
  box-shadow: 0 calc(2px + 24px * var(--near, 0)) calc(8px + 54px * var(--near, 0)) rgba(18, 24, 32, calc(0.03 + 0.1 * var(--near, 0)));
  transform: translateY(calc(-6px * var(--near, 0)));
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease, transform .4s cubic-bezier(.2, 0, 0, 1); }
.px-card__aura { position: absolute; inset: -40%; z-index: -1; border-radius: 50%; filter: blur(60px); pointer-events: none; opacity: calc(0.55 * var(--near, 0));
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 45%), radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 45%); }
.px-card__glow { position: absolute; top: 0; left: 24px; right: 24px; height: 3px; border-radius: 3px; overflow: hidden; opacity: var(--near, 0);
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); }
.px-card__glow::after { content: ""; position: absolute; top: 0; left: -60%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); transform: translateX(calc(260% * var(--sweep, 0))); }
.px-kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.px-num { font-family: var(--display); font-size: 2.75rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; margin: 0.5rem 0 0.25rem; color: var(--accent); }
.px-title { font-family: var(--display); font-size: 1.1875rem; font-weight: 700; margin: 0 0 0.375rem; }
.px-body { font-size: 0.9375rem; line-height: 1.55; color: var(--text); margin: 0; }

/* Marquee: duplicated track, masked edges, hover to pause */
.mq { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.mq__track { display: flex; width: max-content; gap: 0.875rem; animation: mq-scroll 28s linear infinite; will-change: transform; }
.mq:hover .mq__track { animation-play-state: paused; }
.mq__pill { display: inline-flex; align-items: center; gap: 0.5rem; flex-shrink: 0; padding: 0.625rem 1.125rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); font-family: var(--mono); font-size: 0.875rem; white-space: nowrap; }
.mq__pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes mq-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq__track { animation: none; } }

/* Icon hover: scale and brighten around the glyph's own center */
.ico-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.ico { display: flex; flex-direction: column; align-items: center; gap: 0.625rem; padding: 1.25rem 0.5rem; border-radius: 14px; border: 1px solid var(--rule); background: var(--paper); }
.ico svg { width: 40px; height: 40px; transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.2, 0, 0, 1), filter .35s ease; }
.ico path, .ico circle, .ico rect { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s ease; }
.ico span { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); }
@media (hover: hover) {
  .ico:hover svg { transform: scale(1.18) rotate(-6deg); filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--accent) 30%, transparent)); }
  .ico:hover path, .ico:hover circle, .ico:hover rect { stroke: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .ico svg { transition: filter .35s ease; } .ico:hover svg { transform: none; } }

@media (max-width: 900px) { .px-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ico-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .px-grid { grid-template-columns: minmax(0, 1fr); } }
