/*
Theme Name: Specimen
Theme URI: https://schemarkup.com/
Author: schemarkup.com
Description: A laboratory theme for structured-data specimens. Each specimen page renders the content, the exact JSON-LD that ships in the head, and a dated evidence record of what search and AI engines did with it. The head markup and the on-page markup are generated from one source, so they cannot drift apart. Type marks and the collection graph are both computed from the data rather than drawn.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: specimen
*/

/* ============================================================
   1. TOKENS
   One vocabulary. A state's colour means the same thing in a
   plate, a rail, a matrix cell and a timeline. Status hues come
   from a palette already validated for normal, deutan, protan
   and tritan vision at delta-E 10 or better between every pair.
   ============================================================ */

:root {
  --ink:          #0e0e15;
  --ink-2:        #12121b;
  --surface:      #17171f;
  --surface-2:    #1d1d28;
  --surface-3:    #262633;
  --line:         #2e2e44;
  --line-soft:    #212130;
  --line-hair:    rgba(255,255,255,.055);

  --text:         #f0f0f7;
  --text-dim:     #a3a3bd;
  --text-faint:   #6b6b88;
  --text-ghost:   #3f3f58;

  --accent:       #7b68ee;
  --accent-2:     #9370db;
  --accent-3:     #b9a6ff;
  --accent-ink:   #ffffff;
  --accent-wash:  rgba(123, 104, 238, 0.12);
  --accent-line:  rgba(123, 104, 238, 0.40);
  --accent-glow:  rgba(123, 104, 238, 0.55);

  --pass:         #3fa97c;
  --pending:      #bf8c1e;
  --fail:         #8f2440;
  --absent:       #585870;
  --observed:     #8b7bf0;
  --stripped:     #a8459c;

  --radius-xs:    3px;
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    18px;
  --radius-xl:    26px;
  --pill:         999px;

  --gutter:       18px;
  --page:         1400px;
  --rail:         440px;

  /* Type scale, major third at the top end so headings actually land. */
  --step--2:      clamp(0.70rem, 0.68rem + 0.08vw, 0.75rem);
  --step--1:      clamp(0.80rem, 0.78rem + 0.10vw, 0.86rem);
  --step-0:       clamp(1.00rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1:       clamp(1.22rem, 1.13rem + 0.42vw, 1.48rem);
  --step-2:       clamp(1.54rem, 1.36rem + 0.88vw, 2.16rem);
  --step-3:       clamp(1.95rem, 1.60rem + 1.72vw, 3.20rem);
  --step-4:       clamp(2.55rem, 1.80rem + 3.70vw, 5.40rem);
  --step-5:       clamp(3.20rem, 1.90rem + 6.20vw, 8.00rem);

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.34);
  --shadow: 0 2px 4px rgba(0,0,0,.28), 0 18px 46px -20px rgba(0,0,0,.80);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.30), 0 30px 70px -26px rgba(0,0,0,.90);
  --ring: 0 0 0 2px var(--ink), 0 0 0 4px var(--accent);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --ink:          #f7f7fb;
  --ink-2:        #f1f1f7;
  --surface:      #ffffff;
  --surface-2:    #f2f2f8;
  --surface-3:    #e7e7f1;
  --line:         #dadae8;
  --line-soft:    #e9e9f2;
  --line-hair:    rgba(16,16,32,.07);

  --text:         #15151f;
  --text-dim:     #52526a;
  --text-faint:   #7e7e9a;
  --text-ghost:   #b6b6cb;

  --accent:       #5b45d6;
  --accent-2:     #7a5fc4;
  --accent-3:     #4a35bd;
  --accent-wash:  rgba(91, 69, 214, 0.08);
  --accent-line:  rgba(91, 69, 214, 0.28);
  --accent-glow:  rgba(91, 69, 214, 0.32);

  --pass:         #227a53;
  --pending:      #8a6210;
  --fail:         #8f2440;
  --absent:       #6b6b84;
  --observed:     #5a46c4;
  --stripped:     #8c3583;

  --shadow-sm: 0 1px 2px rgba(20,20,40,.05);
  --shadow: 0 1px 3px rgba(20,20,40,.06), 0 16px 40px -22px rgba(20,20,40,.30);
  --shadow-lift: 0 2px 6px rgba(20,20,40,.08), 0 28px 64px -28px rgba(20,20,40,.36);
  color-scheme: light;
}

/* ============================================================
   2. RESET AND BASE
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss03" 1;
  overflow-x: hidden;
}

/* A single low-opacity grain layer over the whole page. It stops the large
   dark fields from banding on cheap panels and gives the surfaces some tooth. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::after { opacity: .30; mix-blend-mode: multiply; }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 .5em; font-weight: 640; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); letter-spacing: 0; }
p { margin: 0 0 1.05em; }

/* The display face carries the big statements only. Its job is contrast
   against the mono used for every piece of data on the site. */
.display {
  font-family: var(--display); font-weight: 400;
  letter-spacing: -0.012em; line-height: 0.98;
}

a { color: var(--accent-3); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); text-decoration-color: currentColor; }
:root[data-theme="light"] a { color: var(--accent); }

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: var(--radius-xs);
}

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

code, kbd, pre, samp { font-family: var(--mono); font-size: 0.86em; font-variant-ligatures: none; }
:not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  padding: .1em .38em; border-radius: var(--radius-xs); color: var(--accent-3);
}

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

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--pill); border: 3px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* ============================================================
   3. LAYOUT
   ============================================================ */

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 48px; } }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }
.section--hair { border-top: 1px solid var(--line-hair); }

/* Numbered section heads. The number is part of the instrument look and is
   written out in the markup, not generated, so it can never say 04 twice. */
.section-head { display: flex; align-items: baseline; gap: 1.1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.section-head__n {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .2em;
  color: var(--accent-2); padding-top: .4rem;
}
.section-head__text { flex: 1 1 340px; }
.section-head h2 { margin-bottom: .35rem; }
.section-head p { margin: 0; color: var(--text-dim); font-size: var(--step-0); }

.rule { height: 1px; border: 0; margin: 0; background: var(--line-hair); }
.rule--fade {
  background: linear-gradient(90deg, var(--line) 0%, var(--line) 48%, transparent 100%);
}

/* ============================================================
   4. HEADER
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line-hair);
}
.site-header__inner { display: flex; align-items: center; gap: 1.4rem; min-height: 70px; }

.brand { display: inline-flex; align-items: center; gap: .68rem; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }

.brand__mark {
  position: relative; width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  box-shadow: 0 0 0 1px var(--accent-line), 0 6px 20px -8px var(--accent-glow);
}
.brand__mark::before, .brand__mark::after {
  content: ""; position: absolute; top: 7px; width: 5px; height: 14px;
  border: 2px solid var(--accent-ink); opacity: .95;
}
.brand__mark::before { left: 6px; border-right: 0; border-radius: 2px 0 0 2px; }
.brand__mark::after  { right: 6px; border-left: 0;  border-radius: 0 2px 2px 0; }

.brand__word { font-weight: 640; letter-spacing: -0.03em; font-size: 1.08rem; }
.brand__word span { color: var(--text-ghost); font-weight: 500; }

.tag-pill {
  display: inline-flex; align-items: center; gap: .38rem;
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .15em; text-transform: uppercase;
  padding: .24rem .6rem; border-radius: var(--pill);
  border: 1px solid var(--accent-line); color: var(--accent-3); background: var(--accent-wash);
  white-space: nowrap;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  display: inline-block; padding: .46rem .8rem; border-radius: var(--pill);
  color: var(--text-dim); text-decoration: none; font-size: .93rem; font-weight: 520;
  transition: color .16s ease, background-color .16s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--text); background: var(--surface-2); }

.theme-toggle {
  margin-left: .4rem; width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-grid; place-items: center; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--pill); padding: 0;
  transition: border-color .16s ease;
}
.theme-toggle:hover { border-color: var(--accent-line); }
.theme-toggle__dot {
  width: 13px; height: 13px; border-radius: var(--pill);
  background: var(--text-dim); box-shadow: inset -4px -1px 0 0 var(--surface-2);
  transition: background-color .2s ease, box-shadow .2s ease;
}
:root[data-theme="light"] .theme-toggle__dot { box-shadow: none; background: var(--accent); }

@media (max-width: 860px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: .4rem .5rem; font-size: .87rem; }
  .brand__word span { display: none; }
}

@media (max-width: 620px) {
  .site-header__inner { gap: .7rem; min-height: 58px; }
  .tag-pill { display: none; }
  .brand__word { font-size: .97rem; }
  .brand__mark { width: 23px; height: 23px; flex-basis: 23px; border-radius: 6px; }
  .brand__mark::before, .brand__mark::after { top: 6px; height: 11px; width: 4px; }
  .brand__mark::before { left: 5px; }
  .brand__mark::after { right: 5px; }
  .site-nav a { padding: .34rem .4rem; font-size: .82rem; }
  .theme-toggle { width: 30px; height: 30px; flex-basis: 30px; margin-left: .15rem; }
}

/* ============================================================
   5. DISCLOSURE BAND
   ============================================================ */

.disclosure {
  background: var(--ink-2); border-bottom: 1px solid var(--line-hair);
  font-size: var(--step--1); color: var(--text-dim);
}
.disclosure__inner { display: flex; gap: .75rem; align-items: baseline; padding-block: .68rem; }
.disclosure p { margin: 0; }
.disclosure b { color: var(--text); font-weight: 620; }

/* ============================================================
   6. HERO
   ============================================================ */

.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem); }

/* Mesh: three soft lobes in the brand family, no stock gradient. */
.hero::before {
  content: ""; position: absolute; inset: -40% -20% -10% -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 42% at 14% 26%, rgba(123,104,238,.26) 0%, transparent 68%),
    radial-gradient(34% 38% at 78% 12%, rgba(147,112,219,.20) 0%, transparent 70%),
    radial-gradient(46% 40% at 52% 88%, rgba(185,166,255,.12) 0%, transparent 72%);
}
:root[data-theme="light"] .hero::before { opacity: .55; }

.hero__inner { position: relative; z-index: 1; display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); }
}

.hero__eyebrow {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 1.3rem; display: flex; align-items: center; gap: .7rem;
}
.hero__eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent-2); flex: 0 0 26px;
}

.hero__title {
  font-family: var(--display); font-weight: 400;
  font-size: var(--step-5); line-height: 0.96; letter-spacing: -0.015em;
  margin: 0 0 1.1rem;
}
.hero__title em { font-style: italic; color: var(--accent-3); }

.hero__lede { font-size: var(--step-1); color: var(--text-dim); font-weight: 400; margin-bottom: 2rem; max-width: 46em; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ============================================================
   7. THE COLLECTION GRAPH
   ============================================================ */

/* The graph is a figure, not a backdrop: capped so it never dominates the
   column it lands in, and centred once the layout stacks. */
.graph-frame { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
@media (min-width: 1080px) { .graph-frame { max-width: 620px; } }
.graph { width: 100%; height: auto; overflow: visible; display: block; }

.graph__ring { fill: none; stroke: var(--line-hair); stroke-width: 1; }
.graph__ring--outer { stroke-dasharray: 2 7; stroke: var(--line); opacity: .5; }

.graph__edge {
  fill: none; stroke: var(--accent); stroke-width: 1.1; opacity: .30;
  stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: graph-draw 1.5s cubic-bezier(.22,.7,.3,1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes graph-draw { to { stroke-dashoffset: 0; } }

.graph-frame:hover .graph__edge { opacity: .46; }
.graph__node { transition: r .2s ease, opacity .2s ease; }
.graph__node--type { fill: var(--accent-2); opacity: .85; filter: hue-rotate(var(--h, 0deg)); }
.graph__node--specimen { fill: var(--accent-3); }
.graph__node--bare { fill: none; stroke: var(--absent); stroke-width: 2; stroke-dasharray: 3 3; }
.graph__core { fill: var(--text-faint); }

.graph-frame:hover .graph__node--specimen { r: 11; }

.graph-readout {
  display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: center;
  font-family: var(--mono); font-size: var(--step--2); color: var(--text-faint);
  margin-top: .6rem; letter-spacing: .04em;
}
.graph-readout b { color: var(--text-dim); font-weight: 500; }

/* ============================================================
   8. COUNTERS
   ============================================================ */

.counters {
  display: grid; gap: 1px; background: var(--line-hair);
  border: 1px solid var(--line-hair); border-radius: var(--radius-lg); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.counter { background: var(--surface); padding: 1.5rem 1.5rem 1.35rem; position: relative; }
.counter::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent-line), transparent 70%); opacity: 0;
  transition: opacity .2s ease;
}
.counter:hover::before { opacity: 1; }
.counter__n {
  font-family: var(--mono); font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 500;
  letter-spacing: -0.04em; line-height: 1; color: var(--text); display: block; margin-bottom: .55rem;
  font-variant-numeric: tabular-nums;
}
.counter__n[data-tone="accent"] { color: var(--accent-3); }
.counter__label { font-size: var(--step--1); color: var(--text-dim); display: block; }
.counter__sub {
  font-size: var(--step--2); color: var(--text-faint); font-family: var(--mono);
  display: block; margin-top: .35rem; letter-spacing: .03em;
}

/* ============================================================
   9. STATUS VOCABULARY AND SIGILS
   ============================================================ */

.marker {
  display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-xs);
  flex: 0 0 10px; background: var(--absent); vertical-align: -1px;
}
.marker[data-state="pass"]     { background: var(--pass); }
.marker[data-state="pending"]  { background: var(--pending); }
.marker[data-state="fail"]     { background: var(--fail); }
.marker[data-state="absent"]   { background: var(--absent); }
.marker[data-state="observed"] { background: var(--observed); }
.marker[data-state="stripped"] { background: var(--stripped); }

.status { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--step--1); white-space: nowrap; }
.status__label { color: var(--text-faint); }
.status__value { color: var(--text); font-weight: 520; }
.status-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

.legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  font-size: var(--step--2); color: var(--text-faint); font-family: var(--mono); letter-spacing: .03em;
}
.legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* The computed type mark. Same shape for the same type, everywhere. */
.sigil { display: block; fill: var(--accent-2); flex: none; }
.sigil--dim { fill: var(--text-ghost); }
.sigil--lg { fill: var(--accent-3); }

.type-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .05em;
  color: var(--accent-3); background: var(--accent-wash);
  border: 1px solid var(--accent-line); border-radius: var(--pill); padding: .22rem .6rem .22rem .4rem;
}
.type-tag--bare { color: var(--text-faint); background: transparent; border-color: var(--line); }
.type-tag--bare .sigil { fill: var(--text-ghost); }

/* ============================================================
   10. SPECIMEN PLATES
   ============================================================ */

.grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.plate {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-hair);
  border-radius: var(--radius-lg);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.plate:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-lift); }

/* A large, very faint sigil bled into the corner: the plate's own type,
   readable as texture at a glance rather than as another label to read. */
.plate__watermark {
  position: absolute; right: -46px; top: -40px; width: 178px; height: 178px;
  opacity: .035; pointer-events: none; fill: var(--text);
  transition: opacity .25s ease, transform .25s ease;
}
.plate:hover .plate__watermark { opacity: .07; transform: translate(-6px, 4px); }
:root[data-theme="light"] .plate__watermark { opacity: .05; }
:root[data-theme="light"] .plate:hover .plate__watermark { opacity: .09; }

.plate__head {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.1rem 1.35rem .9rem; border-bottom: 1px solid var(--line-hair);
}
.plate__n {
  margin-left: auto; font-family: var(--mono); font-size: var(--step--2);
  color: var(--text-faint); letter-spacing: .12em;
  position: relative; z-index: 1; /* clear of the watermark behind it */
}
.plate__body { padding: 1.2rem 1.35rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.plate__title { font-size: var(--step-1); margin: 0 0 .5rem; letter-spacing: -0.02em; line-height: 1.22; }
.plate__title a { color: var(--text); text-decoration: none; }
.plate__title a:hover { color: var(--accent-3); }
.plate__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.plate__dek { color: var(--text-dim); font-size: var(--step--1); margin: 0 0 1.2rem; }
.plate__foot { margin-top: auto; padding-top: .95rem; border-top: 1px solid var(--line-hair); }

/* ============================================================
   11. THE MATRIX
   Every specimen against every check, dense enough to scan in
   one pass without reading a single word.
   ============================================================ */

.matrix-scroll { overflow-x: auto; border: 1px solid var(--line-hair); border-radius: var(--radius-lg); background: var(--surface); }
.matrix { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 640px; }
.matrix th, .matrix td { text-align: left; padding: .72rem .9rem; border-bottom: 1px solid var(--line-hair); }
.matrix thead th {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 500; background: var(--surface-2); position: sticky; top: 0; z-index: 2;
}
.matrix tbody tr { transition: background-color .14s ease; }
.matrix tbody tr:hover { background: var(--surface-2); }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix__name { display: flex; align-items: center; gap: .6rem; }
.matrix__name a { color: var(--text); text-decoration: none; font-weight: 520; }
.matrix__name a:hover { color: var(--accent-3); }
.matrix__n { font-family: var(--mono); color: var(--text-ghost); font-size: var(--step--2); width: 1%; white-space: nowrap; }
.matrix__type { font-family: var(--mono); font-size: var(--step--2); color: var(--text-dim); }
.matrix__cell { white-space: nowrap; }
.matrix__cell span.status__value { font-size: var(--step--2); font-family: var(--mono); color: var(--text-dim); }

/* ============================================================
   12. SPECIMEN DETAIL
   ============================================================ */

.specimen-layout { display: grid; gap: clamp(1.8rem, 3vw, 3rem); align-items: start; }
@media (min-width: 1080px) { .specimen-layout { grid-template-columns: minmax(0, 1fr) var(--rail); } }

.specimen-head { padding-block: clamp(2.4rem, 5vw, 3.8rem) 1.6rem; }
.specimen-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.15rem; }
.specimen-head__title { font-family: var(--display); font-weight: 400; font-size: var(--step-4); line-height: .98; letter-spacing: -0.012em; margin-bottom: .55rem; }
.specimen-head__dek { font-size: var(--step-1); color: var(--text-dim); margin: 0; font-weight: 400; max-width: 54em; }

.specimen-body { font-size: 1.06rem; }
.specimen-body > h2 { margin-top: 2.6rem; font-size: var(--step-2); }
.specimen-body > h3 { margin-top: 2rem; }
.specimen-body ul, .specimen-body ol { padding-left: 1.3rem; }
.specimen-body li + li { margin-top: .38rem; }
.specimen-body li::marker { color: var(--accent-2); }
.specimen-body blockquote {
  margin: 1.8rem 0; padding: .4rem 0 .4rem 1.3rem;
  border-left: 2px solid var(--accent-line); color: var(--text-dim);
}
.specimen-body em { color: var(--text-dim); }
.specimen-body table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: var(--step--1); }
.specimen-body th, .specimen-body td { text-align: left; padding: .62rem .85rem; border-bottom: 1px solid var(--line-hair); }
.specimen-body th {
  color: var(--text-faint); font-family: var(--mono); font-weight: 500;
  font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase;
}

.rail { position: sticky; top: 90px; display: grid; gap: 1.15rem; }
@media (max-width: 1079px) { .rail { position: static; } }

.panel { background: var(--surface); border: 1px solid var(--line-hair); border-radius: var(--radius-lg); overflow: hidden; }
.panel__head {
  display: flex; align-items: center; gap: .6rem;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-hair); background: var(--surface-2);
}
.panel__title {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-dim); margin: 0; font-weight: 500;
}
.panel__aside { margin-left: auto; font-family: var(--mono); font-size: var(--step--2); color: var(--text-ghost); }
.panel__body { padding: 1.1rem; }

/* ============================================================
   13. MARKUP VIEWER
   ============================================================ */

.viewer__tabs {
  display: flex; gap: .28rem; padding: .55rem .6rem;
  border-bottom: 1px solid var(--line-hair); background: var(--surface-2);
}
.viewer__tab {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .06em;
  padding: .34rem .72rem; border-radius: var(--pill); cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-faint);
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.viewer__tab:hover { color: var(--text-dim); }
.viewer__tab[aria-selected="true"] { background: var(--surface-3); border-color: var(--line); color: var(--text); }

.viewer__pane { display: none; }
.viewer__pane[data-active="true"] { display: block; }

.code {
  margin: 0; padding: 1rem 1.05rem 1rem 0; overflow-y: auto; max-height: 62vh;
  font-family: var(--mono); font-size: .775rem; line-height: 1.78;
  color: var(--text-dim); background: var(--ink-2); tab-size: 2;
  white-space: pre-wrap; overflow-wrap: anywhere;
  counter-reset: line;
}
/* Line numbers without a second column of markup to keep in sync: each line
   is its own element and numbers itself. */
.code .ln { display: block; padding-left: 3.4rem; position: relative; }
.code .ln::before {
  counter-increment: line; content: counter(line);
  position: absolute; left: 0; width: 2.5rem; text-align: right;
  color: var(--text-ghost); font-size: .72rem; user-select: none;
}
.code .ln:hover { background: var(--surface); }
.code .ln--cut { opacity: .5; }
.code .ln--cut .tok-key, .code .ln--cut .tok-str, .code .ln--cut .tok-num { color: var(--stripped); }
.code .ln--cut::after {
  content: ""; position: absolute; left: 3.4rem; right: .6rem; top: 50%;
  height: 1px; background: var(--stripped); opacity: .55;
}

.tok-key { color: var(--accent-3); }
.tok-str { color: var(--pass); }
.tok-num { color: var(--pending); }
.tok-bool { color: var(--observed); }
.tok-punc { color: var(--text-ghost); }

.props { margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: var(--step--2); }
.props li { display: flex; gap: .7rem; padding: .5rem 1.05rem; border-bottom: 1px solid var(--line-hair); }
.props li:last-child { border-bottom: 0; }
.props__k { color: var(--accent-3); flex: 1 1 auto; overflow-wrap: anywhere; }
.props__v { color: var(--text-faint); flex: 0 0 auto; }

.copy-btn {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase;
  padding: .32rem .7rem; border-radius: var(--pill); cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text-dim);
  transition: color .15s ease, border-color .15s ease;
}
.copy-btn:hover { border-color: var(--accent-line); color: var(--text); }
.copy-btn[data-done="true"] { color: var(--pass); border-color: var(--pass); }

.notice {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .85rem 1.1rem; font-size: var(--step--1); color: var(--text-dim);
  border-top: 1px solid var(--line-hair); background: var(--surface-2);
}
.notice .marker { margin-top: .45rem; }
.notice b { color: var(--text); font-weight: 620; }

/* ============================================================
   14. EVIDENCE
   ============================================================ */

.evidence { list-style: none; margin: 0; padding: 0; }
.evidence li { position: relative; padding: .85rem 1.1rem .85rem 2.4rem; border-bottom: 1px solid var(--line-hair); font-size: var(--step--1); }
.evidence li:last-child { border-bottom: 0; }
.evidence li::before {
  content: ""; position: absolute; left: 1.1rem; top: 1.22rem;
  width: 10px; height: 10px; border-radius: var(--radius-xs); background: var(--absent);
}
.evidence li[data-state="pass"]::before     { background: var(--pass); }
.evidence li[data-state="pending"]::before  { background: var(--pending); }
.evidence li[data-state="fail"]::before     { background: var(--fail); }
.evidence li[data-state="observed"]::before { background: var(--observed); }
.evidence__when { font-family: var(--mono); font-size: var(--step--2); color: var(--text-ghost); display: block; margin-bottom: .18rem; letter-spacing: .05em; }
.evidence__what { color: var(--text); }
.evidence__who { color: var(--text-dim); }
.evidence__empty { padding: 1.1rem; color: var(--text-faint); font-size: var(--step--1); margin: 0; }

/* ============================================================
   15. PROSE PAGES
   ============================================================ */

.page-head { padding-block: clamp(2.6rem, 6vw, 4.5rem) 1.3rem; }
.page-head__title { font-family: var(--display); font-weight: 400; font-size: var(--step-4); line-height: .98; letter-spacing: -0.012em; margin-bottom: .45rem; }
.page-head__dek { color: var(--text-dim); font-size: var(--step-1); margin: 0; max-width: 54em; }

.prose { font-size: 1.06rem; }
.prose > h2 { margin-top: 2.6rem; font-size: var(--step-2); }
.prose > h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .38rem; }
.prose li::marker { color: var(--accent-2); }

/* ============================================================
   16. FOOTER  (one line, a credit, nothing else)
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--line-hair); margin-top: clamp(3.5rem, 7vw, 6.5rem);
  padding-block: 1.6rem; font-size: var(--step--1); color: var(--text-faint);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-dim); text-decoration-color: var(--line); }
.site-footer a:hover { color: var(--accent-3); }

/* ============================================================
   17. UTILITIES
   ============================================================ */

.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .9rem; display: block;
}

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .68rem 1.25rem; border-radius: var(--pill); font-weight: 560; font-size: .95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 26px -12px var(--accent-glow); }
.btn--primary:hover { background: var(--accent-2); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line); color: var(--text-dim); background: transparent; }
.btn--ghost:hover { border-color: var(--accent-line); color: var(--text); }
.btn--primary::after {
  content: ""; width: 6px; height: 6px; flex: 0 0 6px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); margin-left: .1rem;
}

.pagination { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: 2.8rem; }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .85rem;
  border-radius: var(--pill); border: 1px solid var(--line); color: var(--text-dim); text-decoration: none;
  font-family: var(--mono); font-size: var(--step--2); letter-spacing: .06em;
  transition: border-color .15s ease, color .15s ease;
}
.pagination .page-numbers:hover { border-color: var(--accent-line); color: var(--text); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
  flex: 1; padding: .62rem .95rem; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .94rem;
}
.search-form input[type="search"]::placeholder { color: var(--text-faint); }

/* Entrance. Subtle, once, and switched off entirely for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.22,.7,.3,1) both; }
  .rise--1 { animation-delay: .05s; }
  .rise--2 { animation-delay: .12s; }
  .rise--3 { animation-delay: .19s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
