/* Shared stylesheet for the public pages and the buy page.
   Rules and tokens are copied from cybersapien.xyz's styles.css (the live site), so a buyer moving
   between the two sites sees one brand. Where a rule here has no counterpart on the site (the
   product card, legal pages, buy card), it is built from the site's own vocabulary: ink rules,
   Manrope 900 headings, mono labels, teal slabs and the lime signal.
   Fonts are self-hosted next to this file; the page CSP allows fonts and styles from self only. */

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens (cybersapien.xyz) ---------- */
:root {
  color-scheme: light;
  --paper: #f7f7f3;
  --paper-deep: #ededdf;
  --ink: #101514;
  --ink-soft: #3f4946;
  --rule: #c6cbc4;
  --rule-strong: #89968f;
  --teal: #255f57;
  --teal-dark: #123f39;
  --teal-soft: #dce8e4;
  --signal: #c7ff2e;
  --white: #ffffff;
  --max: 1440px;
  --gutter: clamp(16px, 3vw, 32px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --display: "Manrope", "Avenir Next", sans-serif;
  --body: "IBM Plex Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --header-h: 75px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.45;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* The site draws a 2px lime outline. Lime alone is near-invisible on paper, so it sits on an ink ring. */
a:focus-visible, button:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--signal);
}

button, input, select, textarea { font: inherit; }

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

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

.page-shell { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.page-shell > main { flex: 1 0 auto; min-height: 70vh; }

.container, .wrap, .header-inner, .footer-inner {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin: 0 auto;
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  background: var(--paper); border: 1px solid var(--ink); padding: 10px 14px; font-weight: 600;
}
.skip:focus { top: 12px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em; }
.fine { color: var(--ink-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  anchor-name: --site-header;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.brand {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 900; letter-spacing: -0.045em;
}

.brand-mark {
  width: 24px; height: 24px;
  border: 3px solid var(--teal); border-right-color: transparent; border-radius: 50%;
  position: relative; flex: 0 0 auto;
}
.brand-mark::after {
  content: ""; position: absolute; width: 7px; height: 7px; right: -3px; top: 5px;
  background: var(--signal);
}

.brand-text { display: flex; flex-direction: column; line-height: 0.88; }
.brand-text span:last-child { font-size: 0.78rem; letter-spacing: 0; color: var(--ink-soft); }

.nav-index { justify-self: center; color: var(--ink-soft); }

.site-nav { justify-self: end; }

.site-menu, .footer-nav {
  display: flex; align-items: center; justify-content: flex-end;
  gap: clamp(12px, 2vw, 22px);
}

/* The menu list is a popover so the phone menu opens and light-dismisses with no script.
   Above the phone breakpoint it is reset to an ordinary inline list. */
.site-menu {
  list-style: none; margin: 0; padding: 0;
  position: static; inset: auto; width: auto; height: auto; overflow: visible;
  border: 0; background: transparent; color: inherit;
}

.site-menu a, .footer-nav a { position: relative; display: inline-block; padding: 8px 0; color: var(--ink); }

.site-menu a::after, .footer-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform 180ms var(--ease);
}
.site-menu a:hover::after, .site-menu a:focus-visible::after, .site-menu a[aria-current="page"]::after,
.footer-nav a:hover::after, .footer-nav a:focus-visible::after, .footer-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
/* Current page also gets weight, so it is not signalled by the lime bar alone. */
.site-menu a[aria-current="page"], .footer-nav a[aria-current="page"] { font-weight: 600; }

.menu-toggle {
  display: none;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer;
}

/* ---------- Buttons (".cta" and ".text-link" on the site) ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 800; cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--signal); color: var(--ink); }
.button--quiet { min-height: 38px; padding: 0 12px; }
.button--signal { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.button--signal:hover, .button--signal:focus-visible { background: var(--white); border-color: var(--white); }

.inline-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.inline-link:hover { text-decoration-color: var(--teal); text-decoration-thickness: 2px; }

.chip {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--rule-strong); background: var(--white);
  padding: 5px 9px;
}

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-soft); }
.ticks li { position: relative; padding-left: 20px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; background: var(--teal);
}

/* ---------- Sections ---------- */
.section, .page-hero, .legal { border-bottom: 1px solid var(--rule); }
.section, .page-hero, .ledger, .legal { padding: clamp(58px, 8vw, 112px) 0; }

.artifact-hero, .contact-grid, .ledger-head {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 6vw, 92px);
  align-items: center;
}
.artifact-hero { align-items: start; }

.section-heading { display: grid; gap: 28px; align-content: center; }

.page-title, .section-heading h2, .section-title, .writing-title {
  margin: 0;
  font-family: var(--display); font-weight: 900;
  line-height: 0.84; letter-spacing: -0.085em;
  text-wrap: balance;
}
.page-title, .section-title { font-size: clamp(36px, 10vw, 72px); }
.page-title { max-width: 10.5ch; }
.section-heading h2 { font-size: clamp(42px, 6vw, 104px); }

.section-heading p, .copy, .footer-note {
  max-width: 64ch; color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 19px);
}
.section-heading > .mono { font-size: 12px; }

.hero-actions, .contact-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Hero artifact: the site's slab stage */
.artifact-stage {
  position: relative;
  min-height: clamp(440px, 46vw, 620px);
  border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  padding: clamp(20px, 3vw, 34px);
  isolation: isolate;
}
.stage-lines { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.stage-lines i {
  position: absolute; display: block; height: 1px; width: 45%;
  background: var(--ink); transform-origin: left;
  animation: line-route 5.2s var(--ease) infinite;
}
.stage-lines i:nth-child(1) { top: 30%; left: 0; transform: rotate(14deg); }
.stage-lines i:nth-child(2) { top: 56%; left: 18%; transform: rotate(-18deg); animation-delay: 900ms; }
.stage-lines i:nth-child(3) { top: 72%; left: 36%; transform: rotate(8deg); animation-delay: 1.7s; }

.slab {
  position: absolute; z-index: 1;
  border: 1px solid var(--ink); background: var(--teal); color: var(--white);
  padding: clamp(18px, 3vw, 30px);
}
.slab-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 4vw, 68px); line-height: 0.88; letter-spacing: -0.06em;
  text-wrap: balance;
}
.slab p + .slab-title, .slab .slab-title + p { margin-top: 14px; }
.slab-primary {
  top: clamp(28px, 5vw, 58px); left: 16%; width: min(470px, 74%); min-height: 250px;
  animation: float-slab 5s var(--ease) infinite;
}
.slab-signal {
  right: 0; bottom: clamp(52px, 8vw, 92px); width: min(360px, 60%); min-height: 170px;
  background: var(--signal); color: var(--ink);
  animation: float-slab 5.6s var(--ease) infinite reverse;
}
.artifact-note {
  position: absolute; left: clamp(20px, 3vw, 34px); bottom: clamp(20px, 3vw, 34px); z-index: 2;
  max-width: 290px; border-top: 1px solid var(--ink); padding-top: 12px;
}
.artifact-note p { margin: 0.35rem 0 0; }

/* Four-up strip ("summary-strip--4" on the about page) */
.summary-strip {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.summary-strip--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-strip > * {
  min-height: 220px; padding: clamp(18px, 3vw, 28px);
  border-right: 1px solid var(--ink);
  display: flex; flex-direction: column;
}
.summary-strip > :last-child { border-right: 0; }
.summary-strip > * > * + * { margin-top: 18px; }
.summary-strip > * > :last-child { margin-top: auto; padding-top: 18px; }
.summary-strip h3 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(26px, 2.6vw, 40px); line-height: 0.88; letter-spacing: -0.045em;
  text-wrap: balance;
}
.summary-strip p:last-child { color: var(--ink-soft); }

/* ---------- Product ledger ---------- */
.ledger-head { align-items: start; padding-bottom: clamp(26px, 4vw, 48px); }

.card-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: clamp(16px, 3vw, 34px);
  align-items: start;
  padding: clamp(18px, 2.5vw, 30px) 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 180ms var(--ease);
}
.card:hover { background: color-mix(in srgb, var(--teal-soft) 55%, transparent); }
.card-kind { padding-top: 0.6em; }
.card-main { display: grid; gap: 14px; }
.card-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(30px, 4vw, 64px); line-height: 0.9; letter-spacing: -0.045em;
}
.card-summary { font-size: clamp(16px, 1.25vw, 19px); }
.card-buy { display: grid; gap: 12px; justify-items: start; }
.card-price {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.card-price span, .buy-card .price span {
  font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0.01em; color: var(--ink-soft);
}

.more { margin-top: clamp(22px, 3vw, 34px); }

/* ---------- Teal section (".section--teal" on the site) ---------- */
.section--teal { background: var(--teal); color: var(--white); border-bottom: 0; }
.section--teal .section-heading p, .section--teal .fine { color: var(--teal-soft); }
.section--teal .contact-links { align-self: end; }
.contact-grid { align-items: stretch; }
/* The site fills the right column with a contact form; here only the button sits there. */
.section--teal .contact-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.section--teal .contact-grid .section-heading h2 { max-width: 16ch; }
.contact-grid .section-heading h2 { font-size: clamp(38px, 5.4vw, 82px); overflow-wrap: normal; }

/* ---------- Legal pages (the site's writing article) ---------- */
.legal-grid { display: grid; gap: clamp(28px, 4vw, 48px); }
.writing-header { display: grid; gap: 16px; max-width: 780px; }
.writing-title {
  max-width: 18ch;
  font-size: clamp(2.35rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.04em;
}
.legal-date { margin-top: -4px; }

.toc { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 0 6px; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: 1px solid var(--rule); }
.toc a {
  display: grid; grid-template-columns: 2.25rem 1fr; align-items: baseline;
  padding: 10px 0; transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
}
.toc a:hover { background: var(--teal-soft); transform: translateX(6px); }

.prose {
  max-width: 68ch; color: var(--ink-soft);
  font-size: 1.0625rem; line-height: 1.72; text-wrap: pretty;
}
.prose section { padding-block: 28px; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 16px); }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose h2 {
  margin: 0 0 0.75rem;
  color: var(--ink); font-family: var(--display); font-weight: 700;
  font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.03em; text-wrap: balance;
}
.prose p + p, .prose p + ul, .prose p + ol { margin-top: 1em; }
.prose ul, .prose ol { margin: 0; padding-left: 1.35em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--teal); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.prose a:hover { text-decoration-color: var(--teal); text-decoration-thickness: 2px; }

.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts div {
  display: grid; grid-template-columns: minmax(8rem, 0.4fr) 1fr; gap: 4px 24px;
  padding: 14px 0; border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--ink); font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
.facts dd { margin: 0; }

.refund-rule .rule {
  margin-bottom: 1.25rem; padding: 18px 20px;
  border: 1px solid var(--ink); background: var(--signal); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.1; letter-spacing: -0.04em;
}
.note { margin-top: 1.5rem; font-family: var(--mono); font-size: 13px; line-height: 1.5; }

/* ---------- Buy page (markup in buy.html; styled here only) ---------- */
.buy { padding: clamp(40px, 7vw, 96px) 0; border-bottom: 1px solid var(--rule); }
.buy-wrap { display: grid; justify-items: center; }
.buy-card {
  width: min(100%, 36rem);
  display: grid; gap: 18px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 84%, white);
}
.buy-card h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(40px, 7vw, 64px); line-height: 0.9; letter-spacing: -0.06em; text-wrap: balance;
}
.buy-card .price {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(28px, 4vw, 40px); line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.buy-card form { display: grid; gap: 18px; }
.buy-card form p { display: grid; gap: 8px; }
.buy-card label { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.buy-card select {
  width: 100%; min-height: 48px; padding: 12px 40px 12px 14px;
  border: 1px solid var(--ink); border-radius: 0; background-color: var(--paper); color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.buy-card button {
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
  font-weight: 800; cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}
.buy-card button:hover, .buy-card button:focus-visible { transform: translateY(-2px); background: var(--signal); color: var(--ink); }
.buy-card button:disabled { opacity: 0.55; cursor: default; transform: none; background: transparent; }
.buy-card #pay { width: 100%; min-height: 56px; background: var(--teal); border-color: var(--ink); color: var(--white); font-size: 1.05rem; }
.buy-card #pay:hover, .buy-card #pay:focus-visible { background: var(--signal); color: var(--ink); }
.buy-card #pay:disabled { background: var(--teal); color: var(--white); }
.buy-card ol { margin: 0; padding-left: 1.35em; display: grid; gap: 6px; color: var(--ink-soft); }
.buy-card ol li::marker { color: var(--teal); }
.buy-card a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; font-weight: 600; }
/* Fake test-mode payment panel (FAKE_PAYMENTS, test mode only). */
.fake-pay { display: grid; gap: 0.75rem; padding: 1rem; border: 2px dashed var(--rule-strong); background: var(--paper-deep); }
.fake-pay h2 { font: 800 1.1rem/1.2 var(--display); color: var(--ink); }
.fake-pay p { margin: 0; color: var(--ink-soft); }
.fake-pay .fake-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.buy-card .fake-pay .button-ghost { background: var(--white); color: var(--ink); border-color: var(--rule-strong); }
.buy-card .fake-pay .button-ghost:hover, .buy-card .fake-pay .button-ghost:focus-visible { background: var(--signal); color: var(--ink); }
.buy-card code {
  display: inline-block; padding: 8px 10px;
  font-family: var(--mono); font-size: 1rem; line-height: 1.4; word-break: break-all;
  background: var(--teal-soft); border: 1px solid var(--teal);
}
.buy-card p:has(> #key) { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
#copy { min-height: 44px; padding: 0 14px; }
#msg { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
#msg:empty { display: none; }
.seller { margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { padding: 30px 0 48px; border-top: 1px solid var(--rule); }
.page-shell > main + .site-footer { border-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.footer-note { margin: 8px 0 0; }
.footer-mail { margin-top: 10px; }
.footer-mail a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.footer-mail a:hover { text-decoration-color: var(--teal); }

/* ---------- Motion (the site's keyframes) ---------- */
@keyframes float-slab { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes line-route {
  0% { opacity: 0.25; clip-path: inset(0 100% 0 0); }
  45%, 80% { opacity: 1; clip-path: inset(0 0 0 0); }
  100% { opacity: 0.3; clip-path: inset(0 0 0 100%); }
}

/* ---------- Breakpoints (the site's: 1080, 760, 430) ---------- */
@media (min-width: 1081px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr) 18rem; column-gap: clamp(48px, 6vw, 92px); align-items: start; }
  .legal-head { grid-column: 1 / -1; }
  .toc { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--header-h) + 24px); }
  .prose { grid-column: 1; grid-row: 2; }
}

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav-index { display: none; }
  .artifact-hero, .contact-grid, .ledger-head, .section--teal .contact-grid { grid-template-columns: 1fr; }
  .section--teal .contact-grid { align-items: start; }
  .artifact-stage { min-height: 560px; }
  .summary-strip--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip--4 > * { border-right: 0; border-bottom: 1px solid var(--ink); }
  .summary-strip--4 > :nth-child(odd) { border-right: 1px solid var(--ink); }
  .summary-strip--4 > :nth-last-child(-n + 2) { border-bottom: 0; }
  .card { grid-template-columns: 120px minmax(0, 1fr); }
  .card-buy { grid-column: 2; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  :root { --header-h: 73px; }
  .header-inner { min-height: auto; padding: 14px 0; }
  .menu-toggle { display: inline-flex; align-items: center; }

  .site-menu {
    position: fixed;
    inset: auto var(--gutter) auto var(--gutter);
    top: var(--header-h);
    top: anchor(--site-header bottom);
    width: auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border: 1px solid var(--ink);
    max-height: calc(100dvh - var(--header-h) - 16px); overflow: auto;
  }
  .site-menu:not(:popover-open) { display: none; }
  .site-menu::backdrop { background: transparent; }
  .site-menu li { border-bottom: 1px solid var(--rule); }
  .site-menu li:last-child { border-bottom: 0; }
  .site-menu a { display: flex; align-items: center; min-height: 50px; padding: 0 14px; }
  .site-menu a::after { left: 14px; right: auto; width: 2.5rem; bottom: 10px; }

  .section, .page-hero, .ledger, .legal, .buy { padding: 48px 0; }
  .section-heading { gap: 22px; }
  .page-title, .section-title { font-size: clamp(54px, 18vw, 84px); letter-spacing: -0.075em; }
  .section-heading h2 { font-size: clamp(36px, 11.5vw, 58px); line-height: 0.9; letter-spacing: -0.055em; }
  .writing-title { font-size: clamp(2.25rem, 10vw, 3.5rem); line-height: 1.04; letter-spacing: -0.04em; }
  .contact-grid .section-heading h2 { font-size: clamp(34px, 10vw, 52px); }

  .artifact-stage {
    min-height: auto; display: grid; gap: 16px; padding: 20px;
    border-left: 0; border-top: 1px solid var(--ink);
  }
  .stage-lines { display: none; }
  .slab, .slab-primary, .slab-signal, .artifact-note {
    position: relative; inset: auto; width: 100%; min-height: 0; animation: none;
  }
  .artifact-note { max-width: none; }

  .card { grid-template-columns: 1fr; gap: 14px; }
  .card-buy { grid-column: auto; }
  .card-kind { padding-top: 0; }
  .facts div { grid-template-columns: 1fr; }
}

/* Without popover support the phone menu stays an always-visible list instead of a dead button. */
@supports not selector(:popover-open) {
  @media (max-width: 760px) {
    .menu-toggle { display: none; }
    .site-menu { position: static; display: flex; flex-direction: row; border: 0; background: transparent; }
    .site-menu li { border: 0; }
    .site-menu a { min-height: 44px; padding: 0; }
  }
}

@media (max-width: 600px) {
  .summary-strip--4 { grid-template-columns: 1fr; }
  .summary-strip--4 > * { min-height: 0; }
  .summary-strip--4 > :nth-child(odd) { border-right: 0; }
  .summary-strip--4 > :nth-last-child(2) { border-bottom: 1px solid var(--ink); }
}

@media (max-width: 430px) {
  .brand-text span:last-child { display: none; }
  .page-title, .section-title { font-size: clamp(48px, 16vw, 68px); }
  .footer-nav, .contact-links, .hero-actions { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
