/* GENERATED FILE — do not edit by hand.
   Source: styles/*.css, concatenated in filename order by
   scripts/build-chrome.py. Edit the source file and re-run the script;
   anything written here directly is overwritten on the next build. */

/* >>> styles/00-base.css */
/* TABZOID — site stylesheet
   Dark aesthetic. */

@font-face {
  font-family: "TOOM";
  src: url("files/fonts/TOOM-Regular.woff2") format("woff2"),
       url("files/fonts/TOOM-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TOOM";
  src: url("files/fonts/TOOM-Italic.woff2") format("woff2"),
       url("files/fonts/TOOM-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "TOOM";
  src: url("files/fonts/TOOM-Bold-Italic.woff2") format("woff2"),
       url("files/fonts/TOOM-Bold-Italic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Opsilon";
  src: url("files/fonts/Opsilon-Regular.woff2") format("woff2"),
       url("files/fonts/Opsilon-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Opsilon";
  src: url("files/fonts/Opsilon-Italic.woff2") format("woff2"),
       url("files/fonts/Opsilon-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Metric-matched local fallbacks — sized so text set in the fallback occupies
   the same space as TOOM/Opsilon. Keeps layout stable during the swap window,
   which also prevents scroll-anchoring drift on refresh (see CLAUDE.md → Fonts).
   Overrides are computed against Arial metrics from the real font files —
   re-derive them if the font files ever change. */
@font-face {
  font-family: "TOOM-fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 103.31%;
  ascent-override: 96.79%;
  descent-override: 19.36%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Opsilon-fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 85.47%;
  ascent-override: 109.29%;
  descent-override: 23.94%;
  line-gap-override: 1.37%;
}

:root {
  --bg: #0e0e12;
  --bg-elev: #16161c;
  --ink: #ececf2;
  --muted: #9a9aaa;
  --accent: #8a66ff;
  --accent-dark: #6b3fe4;
  --border: #25252e;
  --lab: #6ee7a0;    /* Lab section colour (rail --sec-color) */
  --shop: #ffc866;   /* Shop section colour (rail --sec-color) */
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* ---- chrome geometry — the nav rail + content shell ---------------------
     Every size in styles/60-chrome-rail.css derives from these. To resize or
     restyle the rail, change a value HERE; do not hunt through the rail rules.
     The content margin is calc()'d from --rail-* + --rail-gutter, so the shell
     can never drift out of sync with the rail again.
     NOTE: the mobile breakpoint (max-width: 899px) cannot be a custom property
     — @media does not accept var(). It is hardcoded in 60-chrome-rail.css. */
  --rail-min: 58px;        /* icon-only width at rest */
  --rail-open: 225px;      /* width on hover / keyboard focus (and the drawer) */
  --rail-inset: 14px;      /* float gap from the viewport edges */
  --rail-pad: 11px;        /* inner padding */
  --rail-radius: 14px;
  --rail-gutter: 6px;      /* gap between the rail's right edge and the content */
  --rail-icon: 34px;       /* icon hit-box — also the collapsed pill diameter */
  --rail-icon-svg: 17px;
  --rail-chev-svg: 14px;
  --rail-row-pad: 5px 6px; /* row padding once the rail is expanded */
  --rail-row-radius: 10px;
  --rail-row-gap: 4px;     /* icon-to-label gap */
  --rail-row-font: 0.92rem;
  --rail-hover-bg: rgba(255,255,255,.04);
  --sub-indent: 30px;      /* how far sub-links nest under their section title */
  --mobile-tap: 40px;      /* mobile topbar button size */

  /* derived — do not hardcode these anywhere */
  --content-min: calc(var(--rail-min) + var(--rail-gutter));
  --content-open: calc(var(--rail-open) + var(--rail-gutter));
}

html {
  color-scheme: dark;
  /* Always reserve the scrollbar gutter so pages with and without a
     vertical scrollbar don't shift centered content sideways. */
  scrollbar-gutter: stable;
  /* No scroll anchoring: late layout changes (font swap, toolbar injection)
     must not nudge the restored scroll position — with anchoring on, each
     refresh banks the adjustment and the page creeps upward. */
  overflow-anchor: none;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* >>> styles/05-legacy-header.css */
/* ── header (sticky, two-tier nav) ───────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 18, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.brand img {
  display: block;
  width: auto;
  height: clamp(22px, 4vw, 28px);
  user-select: none;
  -webkit-user-drag: none;
}

.brand:hover,
.brand:focus-visible {
  opacity: 0.78;
  outline: none;
}


/* >>> styles/06-page-header.css */
/* ── page header (centered) ─────────────────────────────── */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 24px 64px;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

main h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  main { animation: none; }
}


/* >>> styles/07-footer.css */
/* ── footer ─────────────────────────────────────────────── */

/* ── site footer (mega) ─────────────────────────────────── */
footer.site {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  margin-top: 44px;
  padding: 30px 0 22px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}
/* side inset mirrors the browse-page toolbar (.controlbar padding) so footer
   content lines up with the toolbar content, not flush to the shell edge */
.ft-inner { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 14px; }

/* top region: action cards + subscribe (left) | brand + sitemap (right).
   source order is brand-first, panels-second; `order` flips them so the panels
   sit on the left and the brand/link list on the right (and, when stacked, the
   panels come first / brand below). */
.ft-top { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; align-items: stretch; }
.ft-left { display: flex; flex-direction: column; gap: 12px; order: 2; }
.ft-right { display: flex; flex-direction: column; gap: 16px; justify-content: space-between; order: 1; }
.ft-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ft-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32); display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ft-h { font-family: "TOOM", "TOOM-fallback", var(--body); font-weight: 400; font-size: 1.45rem; line-height: 1.08; margin: 0 0 8px; color: var(--ink); }
.ft-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin: 0 0 18px; max-width: 44ch; }
.ft-action { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; width: 100%; margin-top: auto; }
.ft-account .ft-action, .ft-shop .ft-action { justify-content: flex-end; width: auto; margin-top: 0; flex: 0 0 auto; }
/* crushed action panels: text left, button right, one row */
.ft-account, .ft-shop { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.ft-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ft-text .ft-h { margin: 0; font-size: 1.2rem; white-space: nowrap; }
.ft-text .ft-sub { margin: 0; }
.ft-inp { flex: 1 1 200px; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.ft-inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 102, 255, 0.18); }
.ft-inp svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.ft-inp input { flex: 1; min-width: 0; height: 100%; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: 0.9rem; }
.ft-inp input::placeholder { color: var(--muted); }
.ft-btn { height: 44px; padding: 0 22px; border-radius: 10px; background: var(--accent-dark); color: #fff; font: inherit; font-family: "Opsilon", "Opsilon-fallback", var(--body); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.09em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px rgba(107, 63, 228, 0.45); transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.ft-btn:hover { background: #5a2fd0; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 22px rgba(107, 63, 228, 0.55); transform: translateY(-1px); }
.ft-btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.ft-btn.ghost:hover { background: rgba(138, 102, 255, 0.14); }
.ft-btn svg { width: 15px; height: 15px; }


/* brand lockup: wordmark with the slogan below (top-left) */
.ft-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ft-logo-lock { display: inline-flex; align-items: center; text-decoration: none; }
.ft-logo { height: 46px; width: auto; display: block; }
.ft-tagline { font-size: 1.2rem; color: var(--muted); margin: 0; }

/* sitemap columns (under the brand, left half) — always 4 columns, never collapses.
   margin-top:auto drops the list to the bottom of the (stretched) left column so its
   last row lines up with the bottom of the subscribe panel; the compact spacing above
   pulls the divider up level with the gap between the action cards and subscribe. */
.ft-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 28px; margin-top: auto; border-top: 1px solid var(--border); padding-top: 18px; }
.ft-col h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); margin: 0 0 10px; font-weight: 700; }
.ft-col a { display: block; color: var(--muted); text-decoration: none; font-size: 0.82rem; padding: 2px 0; transition: color 0.15s ease; }
.ft-col a:hover, .ft-col a:focus-visible { color: var(--accent); }
.ft-col a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* centered social row below a full-width divider */
.ft-socials { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; width: 100%; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.ft-socials .social { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: color 0.15s ease, transform 0.15s ease; }
.ft-socials .social svg { width: 22px; height: 22px; display: block; }
.ft-socials .social:hover, .ft-socials .social:focus-visible { color: var(--accent); transform: translateY(-2px); outline: none; }

/* legal bar */
.ft-legal { display: flex; align-items: center; justify-content: center; gap: 10px 18px; flex-wrap: wrap; padding: 18px 0 0; font-size: 0.77rem; text-align: center; }
.ft-legal p { margin: 0; }
.ft-legal a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.ft-legal a:hover { color: var(--accent); }

/* footer reflow is keyed to the real content width via the `shell` container
   query (set on .content), so it accounts for the rail being expanded or
   collapsed — not just the viewport width. */
@container shell (max-width: 1100px) {
  /* not enough room for 4 link columns beside the cards — stack:
     action cards on top, brand + full-width link list below */
  .ft-top { grid-template-columns: 1fr; gap: 30px; }
  .ft-right { order: 1; }
  .ft-left { order: 2; }
}
@container shell (max-width: 640px) {
  .ft-inner { padding-inline: 10px; }
  .ft-actions { grid-template-columns: 1fr; }
  /* keep 4 columns — tighten so links fit without wrapping or collapsing */
  .ft-cols { gap: 16px 12px; }
  .ft-col h3 { font-size: 0.62rem; letter-spacing: 0.06em; margin-bottom: 10px; }
  .ft-col a { font-size: 0.74rem; }
  .ft-socials { gap: 16px 18px; }
}
@container shell (max-width: 430px) {
  .ft-cols { gap: 14px 8px; }
  .ft-col h3 { font-size: 0.56rem; }
  .ft-col a { font-size: 0.68rem; }
}

/* fallback for browsers without container-query support: key off viewport */
@supports not (container-type: inline-size) {
  @media (max-width: 1100px) {
    .ft-top { grid-template-columns: 1fr; gap: 30px; }
    .ft-right { order: 1; }
    .ft-left { order: 2; }
  }
  @media (max-width: 640px) {
    .ft-actions { grid-template-columns: 1fr; }
    .ft-cols { gap: 16px 12px; }
    .ft-col h3 { font-size: 0.62rem; letter-spacing: 0.06em; margin-bottom: 10px; }
    .ft-col a { font-size: 0.74rem; }
    .ft-socials { gap: 16px 18px; }
  }
}


/* >>> styles/10-sitemap.css */
/* ── sitemap page ───────────────────────────────────────── */

main.sitemap {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

main.sitemap h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 32px;
  text-align: left;
}

.sitemap-group {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.sitemap-group:last-child {
  border-bottom: none;
}

.sitemap-group .section {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.sitemap-group a.section:hover,
.sitemap-group a.section:focus-visible {
  color: var(--accent);
  outline: none;
}

.sitemap-group ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.sitemap-group li a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.sitemap-group li a:hover,
.sitemap-group li a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* Collapsible accordion (Tabs section) */
.sitemap-acc {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sitemap-acc details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  overflow: hidden;
}

.sitemap-acc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 22px;
}

.sitemap-acc summary::-webkit-details-marker { display: none; }

/* chevron */
.sitemap-acc summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.sitemap-acc details[open] summary::after {
  transform: rotate(-135deg);
}

.sitemap-acc summary:hover,
.sitemap-acc summary:focus-visible {
  color: var(--accent);
  outline: none;
}

.sitemap-acc summary:hover::after,
.sitemap-acc summary:focus-visible::after {
  border-color: var(--accent);
}

.sitemap-acc .count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 20px;
  text-align: center;
}

.sitemap-acc details[open] summary {
  border-bottom: 1px solid var(--border);
}

.sitemap-acc ul {
  margin: 0;
  padding: 14px 16px 16px;
}

/* "All <category>" lead link */
.sitemap-acc li.all a {
  color: var(--accent);
  border-color: var(--accent-dark);
  font-weight: 600;
}

.sitemap-acc li.all a:hover,
.sitemap-acc li.all a:focus-visible {
  background: var(--accent-dark);
  color: #fff;
}

/* Larger tap targets on touch devices */
@media (hover: none) {
  .sitemap-acc summary { padding: 16px; }
  .sitemap-group li a { padding: 8px 14px; }
}

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

.tab-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
  background: #000;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 1100px;
}

.tab-gallery a {
  display: block;
  border-radius: 4px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tab-gallery a:hover,
.tab-gallery a:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.tab-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 600px)  { .tab-gallery { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 800px)  { .tab-gallery { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 1000px) { .tab-gallery { grid-template-columns: repeat(10, 1fr); } }
@media (min-width: 1200px) { .tab-gallery { grid-template-columns: repeat(12, 1fr); } }


/* >>> styles/15-galleries.css */


.color-set-head .swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dot, #ccc);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.color-set-head .go {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.color-set-head:hover h2,
.color-set-head:hover .go,
.color-set-head:focus-visible h2,
.color-set-head:focus-visible .go {
  color: var(--dot, var(--accent));
}

/* ── Pinterest-style masonry gallery (archive galleries) ── */
.gallery-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  transition: color 0.18s ease;
}

.gallery-back:hover,
.gallery-back:focus-visible { color: var(--accent); outline: none; }

.pin-gallery {
  column-count: 2;
  column-gap: 0.9rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px)  { .pin-gallery { column-count: 3; } }
@media (min-width: 900px)  { .pin-gallery { column-count: 4; } }
@media (min-width: 1200px) { .pin-gallery { column-count: 5; } }

.pin-gallery .pin {
  display: block;
  break-inside: avoid;
  margin: 0 0 0.9rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: zoom-in;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.pin-gallery .pin:hover,
.pin-gallery .pin:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  transform: translateY(-2px);
  outline: none;
}

.pin-gallery .pin img {
  width: 100%;
  height: auto;
  display: block;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox-close:hover { opacity: 1; }

/* ── patent gallery (uniform square grid, Squarespace Gallery-2 style) ── */

.patent-intro {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}


/* >>> styles/20-submit-form.css */
/* ── submit form ─────────────────────────────────────────── */

.submit-intro {
  max-width: 620px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.submit-form {
  max-width: 620px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.submit-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.submit-form label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.submit-form input[type="text"],
.submit-form input[type="email"],
.submit-form input[type="file"],
.submit-form textarea {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.7rem 0.85rem;
  font-family: var(--body);
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.submit-form input[type="text"]:focus,
.submit-form input[type="email"]:focus,
.submit-form textarea:focus,
.submit-form input[type="file"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 102, 255, 0.18);
}

.submit-form textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-form input::placeholder,
.submit-form textarea::placeholder {
  color: var(--muted);
}

.submit-form input[type="file"] {
  cursor: pointer;
  padding: 0.55rem 0.7rem;
}

.submit-form input[type="file"]::file-selector-button {
  background: var(--bg-elev);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  margin-right: 0.75rem;
  font-family: var(--body);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.submit-form input[type="file"]::file-selector-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.char-counter {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.char-counter.is-over { color: #ff6b6b; }

.submit-btn {
  appearance: none;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 0.85rem 1.25rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.submit-btn:hover,
.submit-btn:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  outline: none;
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-back {
  display: block;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.submit-back:hover { color: var(--accent); }


/* >>> styles/21-galleries-meme-lid.css */
/* ── meme gallery (3-col square grid) ────────────────────── */

.meme-gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.75rem;
  margin: 1.5rem auto 3rem;
  max-width: 1100px;
  padding: 0 1rem;
}

.meme-gallery a,
.meme-gallery .meme-cell {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.meme-gallery a:hover,
.meme-gallery a:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.meme-gallery img,
.meme-gallery video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 600px)  { .meme-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .meme-gallery { grid-template-columns: repeat(3, 1fr); } }

/* ── lid gallery (3 → 5 col dense grid) ──────────────────── */

.lid-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin: 1.5rem -24px 3rem;
  width: calc(100% + 48px);
  max-width: none;
  padding: 0;
}

.lid-gallery .meme-cell {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lid-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 800px)  { .lid-gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .lid-gallery { grid-template-columns: repeat(5, 1fr); } }


/* >>> styles/25-inventors.css */
/* ── inventors page ──────────────────────────────────────── */

.inventor-intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.inventor-hero {
  max-width: 1000px;
  margin: 0 auto 3rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 2rem 2.25rem;
}

.inventor-portrait {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 3px solid var(--accent);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  background: #1a1a1a;
  flex-shrink: 0;
}

.inventor-hero-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.inventor-hero-meta {
  flex: 1;
  min-width: 0;
}

.inventor-hero-meta .eyebrow {
  margin-bottom: 0.6rem;
}

.inventor-hero-meta h2 {
  margin: 0 0 0.4rem;
}

.inventor-hero-meta .lifespan {
  margin: 0 0 0.85rem;
}

.inventor-hero-meta .tagline {
  margin: 0;
}

.inventor-hero-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
  .inventor-hero-head {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.75rem;
  }
}

.inventor-hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.inventor-hero h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.inventor-hero .lifespan {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.inventor-hero .tagline {
  color: var(--ink);
  font-size: 1.05rem;
  font-style: italic;
  margin: 0 0 1.25rem;
  opacity: 0.92;
}

.inventor-hero .bio {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

.inventor-hero .patents {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  word-break: break-word;
}

.inventor-hero .count-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-left: 0.6rem;
  vertical-align: middle;
}

.inventor-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto 3.5rem;
}

.inventor-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.inventor-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inventor-card .count-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.inventor-card .bio {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.92;
}

.inventor-card .patents {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
  margin-top: 0.2rem;
}

.inventor-card .patents-label {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.35rem;
}

@media (min-width: 700px) { .inventor-grid { grid-template-columns: repeat(2, 1fr); } }

.inventor-index {
  max-width: 1100px;
  margin: 0 auto 3rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.inventor-index h2 {
  margin: 0;
  padding: 1.1rem 1.4rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.inventor-index-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.inventor-index-table thead th {
  text-align: left;
  padding: 0.7rem 1.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.inventor-index-table tbody td {
  padding: 0.65rem 1.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: top;
  line-height: 1.5;
}

.inventor-index-table tbody tr:last-child td { border-bottom: none; }
.inventor-index-table tbody tr:hover { background: rgba(138, 102, 255, 0.05); }

.inventor-index-table .col-name { font-weight: 600; white-space: nowrap; }
.inventor-index-table .col-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 4rem;
}
.inventor-index-table .col-patents {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-word;
}

/*/* ── tabists page ─────────────────────────────────────── */

.tabist-intro {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  text-align: left;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.tabist-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto 3.5rem;
}

@media (min-width: 760px) { .tabist-grid { grid-template-columns: repeat(2, 1fr); } }

.tabist-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.6rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.tabist-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-2px);
}

.tabist-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.tabist-avatar {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}

.tabist-id h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.tabist-id .alias a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tabist-id .alias a:hover,
.tabist-id .alias a:focus-visible {
  border-bottom-color: currentColor;
  outline: none;
}

.tabist-id .alias {
  display: block;
  margin-top: 0.2rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tabist-id .location {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tabist-bio {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
  opacity: 0.92;
}

.tabist-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tabist-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tabist-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tabist-socials a:hover,
.tabist-socials a:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-1px);
  outline: none;
}

.tabist-socials svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tabist-destinations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tabist-destinations a {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tabist-destinations a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}


/* >>> styles/26-tab-id.css */
/* ── tab id page ─────────────────────────────────────────── */

main.tab-id {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

main.tab-id h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 1rem;
  text-align: left;
}

.tab-id-intro {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 2.25rem;
  max-width: 720px;
}

.standards-figure {
  margin: 0 auto 3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 560px;
  text-align: center;
}

.standards-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 500px;
  margin: 0 auto;
}

.standards-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: #555;
  font-style: italic;
  line-height: 1.5;
}

.standards-figure figcaption a {
  color: #555;
  text-decoration: underline;
}

.systems-section h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  margin: 2rem 0 0.5rem;
  letter-spacing: -0.005em;
}

.systems-section > p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
  max-width: 720px;
}

.system-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--accent);
}

.system-card::after {
  display: block;
  clear: both;
  content: "";
}

.system-logo {
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  margin: 0 1rem 0.85rem 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.system-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.system-logo-placeholder {
  border-style: dashed;
  opacity: 0.65;
}

.system-card.wip {
  border-left-color: #f0a040;
  background:
    linear-gradient(180deg, rgba(240, 160, 64, 0.06), transparent 40%),
    var(--bg-elev);
}

.system-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.55rem;
}

.system-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.system-by {
  font-size: 0.85rem;
  color: var(--muted);
}

.system-by a {
  color: var(--accent);
  text-decoration: none;
}

.system-by a:hover { text-decoration: underline; }

.system-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(138, 102, 255, 0.18);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.system-card.wip .system-tag {
  background: rgba(240, 160, 64, 0.15);
  color: #f0a040;
  border-color: rgba(240, 160, 64, 0.4);
}

.system-card p {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0 0 0.75rem;
  opacity: 0.92;
}

.system-card p:last-child { margin-bottom: 0; }

.code-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0.9rem;
}

.system-card code,
.code-chip {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--accent);
  background: rgba(138, 102, 255, 0.1);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.system-card.wip code,
.system-card.wip .code-chip {
  color: #f0a040;
  background: rgba(240, 160, 64, 0.1);
  border-color: rgba(240, 160, 64, 0.3);
}

.system-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.system-link:hover {
  background: var(--accent);
  color: #fff;
}

.system-refs {
  list-style: none;
  margin: 0.4rem 0 0.9rem;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.system-refs li {
  margin: 0;
  padding-left: 0.85rem;
  position: relative;
}

.system-refs li + li { margin-top: 0.35rem; }

.system-refs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
}

.system-refs cite { font-style: italic; color: var(--ink); opacity: 0.85; }

.system-footnote {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 720px;
}

@media (max-width: 480px) {
  .system-logo {
    width: 76px;
    height: 76px;
  }
}


/* >>> styles/27-glossary.css */
/* ── glossary page ───────────────────────────────────────── */

main.glossary {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

main.glossary h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 1rem;
  text-align: left;
}

.glossary-intro {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 720px;
}

.glossary-section {
  margin-bottom: 2.75rem;
  scroll-margin-top: 5.5rem;
}

.glossary-section h2 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.005em;
  color: var(--ink);
}

.glossary-list {
  margin: 0;
  padding: 0;
}

.glossary-list dt {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.15rem 0 0.3rem;
  letter-spacing: -0.005em;
  scroll-margin-top: 5.5rem;
}

.glossary-list dt:first-of-type { margin-top: 0; }

.glossary-list dt .aliases {
  display: inline;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  font-style: italic;
  margin-left: 0.5rem;
}

.glossary-list dt .anchor {
  margin-left: 0.45rem;
  color: var(--muted);
  opacity: 0;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.glossary-list dt:hover .anchor,
.glossary-list dt:focus-within .anchor {
  opacity: 0.55;
}

.glossary-list dt .anchor:hover,
.glossary-list dt .anchor:focus-visible {
  color: var(--accent);
  opacity: 1;
  outline: none;
}

.glossary-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.92;
}

.glossary-list dd strong {
  color: var(--ink);
  opacity: 1;
}

.glossary-list dt:target {
  background: rgba(138, 102, 255, 0.08);
  border-left: 3px solid var(--accent);
  padding-left: 0.6rem;
  margin-left: -0.6rem;
}

@media (hover: none) {
  .glossary-list dt .anchor { opacity: 0.5; }
}


/* >>> styles/28-grading.css */
/* ── grading page ───────────────────────────────────────── */

main.grading {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  width: 100%;
}

main.grading h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 12px;
}

main.grading h2 {
  font-size: 1.3rem;
  margin: 0 0 12px;
}

main.grading h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

main.grading section {
  margin-top: 48px;
}

.grading-intro {
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.55;
}

.grading-intro em {
  color: var(--ink);
  font-style: normal;
  border-bottom: 1px dotted var(--border);
}

.rarity-callout {
  margin-top: 28px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: rgba(138, 102, 255, 0.06);
  border-radius: 10px;
}

.rarity-callout h2 {
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}

.rarity-callout p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.rarity-callout em {
  color: var(--accent);
  font-style: italic;
}

/* grade scale ladder (8 tiers) */
.grade-scale {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  counter-reset: tier;
}

.grade-tier {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.grade-tier::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  opacity: 0.7;
}

.grade-tier[data-tier="1"]::before { background: #66e0a3; }
.grade-tier[data-tier="2"]::before { background: #6fcf97; }
.grade-tier[data-tier="3"]::before { background: #8fdf66; }
.grade-tier[data-tier="4"]::before { background: #f2c94c; }
.grade-tier[data-tier="5"]::before { background: #f2994a; }
.grade-tier[data-tier="6"]::before { background: #eb8a3f; }
.grade-tier[data-tier="7"]::before { background: #e26a4a; }
.grade-tier[data-tier="8"]::before { background: #c0392b; }

.grade-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.grade-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.grade-blurb {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* axes list */
.axes-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.axes-list li {
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.axes-list strong {
  color: var(--ink);
}

/* rivet slider */
.rivet-slider {
  margin: 18px 0 0;
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.rivet-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
}

.rivet-stage-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 auto;
}

.rivet-stage-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rivet-stage-tier {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.rivet-stage-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.rivet-stage-grade {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(138, 102, 255, 0.1);
  color: var(--accent);
}

.rivet-stage-desc {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.rivet-slider-label {
  display: block;
  margin-top: 22px;
}

.rivet-slider-hint {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.rivet-slider input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #66e0a3 0%, #8fdf66 25%, #f2c94c 50%, #eb8a3f 75%, #c0392b 100%);
  outline: none;
  cursor: pointer;
}

.rivet-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  cursor: grab;
  transition: transform 0.12s ease;
}

.rivet-slider input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.rivet-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  cursor: grab;
}

.rivet-slider-ticks {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

/* rivet ladder (static grid of all 8) */
.rivet-ladder-heading {
  margin-top: 36px !important;
  margin-bottom: 12px !important;
  color: var(--muted);
  font-size: 0.85rem !important;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.rivet-ladder {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.rivet-step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rivet-step img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.rivet-step > div {
  padding: 10px 12px 14px;
}

.rivet-step-tier {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 4px;
}

.rivet-step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.rivet-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* other-axes preview */
.axes-preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.axis-card {
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.axis-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--ink);
}

.axis-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* grade-string shorthand */
.grade-string-example {
  display: inline-block;
  padding: 10px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  margin: 12px 0;
}

.grade-string-key {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.grade-string-key strong {
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  margin-right: 4px;
}

@media (max-width: 640px) {
  .rivet-stage {
    grid-template-columns: 1fr;
  }
  .rivet-stage-img {
    max-width: 260px;
  }
}


/* >>> styles/30-subpage-intro.css */
/* ── unified subpage h1 + intro blurb (centered, consistent) ── */

main h1,
main.tab-id h1,
main.glossary h1,
main.grading h1,
main.history h1,
main.books h1,
main.about h1,
main.forums h1 {
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: var(--ink);
  text-align: center;
  width: 100%;
}

.patent-intro,
.submit-intro,
.inventor-intro,
.tabist-intro,
.tab-id-intro,
.glossary-intro,
.grading-intro,
.history-intro,
.books-intro,
.about-lead,
.forums-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
  font-family: "TOOM", "TOOM-fallback", var(--body);
  font-size: 1rem;
  line-height: 1.6;
}


/* >>> styles/31-books.css */
/* ── books page ──────────────────────────────────────────── */

main.books {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.books-section {
  margin-top: 1rem;
}

.book-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem 1.5rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid var(--accent);
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
}

.book-cover {
  flex: 0 0 auto;
  display: block;
  width: 140px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}

.book-cover:hover { transform: translateY(-2px); }

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.book-body { flex: 1 1 auto; min-width: 0; }

.book-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
  margin-bottom: 0.55rem;
}

.book-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.book-by {
  font-size: 0.9rem;
  color: var(--muted);
}

.book-card p {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.65;
  margin: 0 0 0.75rem;
  opacity: 0.92;
}

.book-link {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

.book-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .book-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .book-cover { width: 160px; }
  .book-head { justify-content: center; }
}


/* >>> styles/32-about.css */
/* ── about / mission / contact / faq ─────────────────────── */

main.about {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.about-section {
  margin: 2rem 0;
}

.about-section h2 {
  font-size: 1.4rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.about-section p {
  color: var(--ink);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.about-section ul {
  color: var(--ink);
  line-height: 1.7;
  padding-left: 1.2rem;
}

.about-section ul li { margin-bottom: 0.4rem; }

.about-section em { color: var(--muted); }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.6rem;
}

.contact-list li {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-list .channel { color: var(--muted); font-size: 0.9rem; }

.contact-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.contact-list a:hover { color: var(--accent); }

.faq-tools {
  display: flex;
  justify-content: flex-end;
  margin: 1.5rem 0 0.6rem;
}

.faq-toggle-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.faq-toggle-all:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.faq-list { margin: 0 0 1.5rem; }

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.18s ease;
  cursor: pointer;
}

.faq-list details[open] { background: rgba(138, 102, 255, 0.04); }

.faq-list summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}

.faq-list details:hover summary,
.faq-list details[open] summary { color: var(--accent); }

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--muted);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.faq-list details[open] summary::after {
  content: "\2013";
}

.faq-list details > p {
  margin: 0.7rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  color: #c2c2cf;
  font-size: 0.96rem;
  line-height: 1.7;
}

.faq-list details > p:last-child { margin-bottom: 0.25rem; }

/* ── submit-a-question CTA ───────────────────────────── */

.faq-ask {
  margin: 2rem 0 0.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(138, 102, 255, 0.05);
  text-align: center;
  color: var(--muted);
}

.faq-ask a {
  color: var(--accent);
  font-weight: 600;
}

.mission-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.mission-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
  text-align: center;
}

.mission-stat .num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.mission-stat .lbl {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}


/* >>> styles/33-forums.css */
/* ── forums ──────────────────────────────────────────── */

main.forums {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.forums-section {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.forum-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.forum-card.platform-tumblr   { border-left-color: #36465D; }
.forum-card.platform-discord  { border-left-color: #5865F2; }
.forum-card.platform-facebook { border-left-color: #1877F2; }
.forum-card.platform-reddit   { border-left-color: #FF4500; }

.forum-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: flex-start;
  justify-content: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.forum-logo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

a.forum-logo:hover,
a.forum-logo:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  outline: none;
}

.forum-card.platform-tumblr   .forum-logo { background: #36465D; }
.forum-card.platform-discord  .forum-logo { background: #5865F2; }
.forum-card.platform-facebook .forum-logo { background: #1877F2; }
.forum-card.platform-reddit   .forum-logo { background: #FF4500; }

.forum-logo svg { width: 30px; height: 30px; }

.forum-info { flex: 1; min-width: 0; }

.forum-platform {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.forum-card h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.2;
}

.forum-card h2 strong {
  display: block;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--ink);
}

.forum-name-sub {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.78;
  line-height: 1.35;
  margin-top: 0.12rem;
}

.forum-date {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.forum-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.forum-desc {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.92;
  flex-grow: 1;
}

.forum-desc + .forum-desc { margin-top: 0; }

.forum-desc-more {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.forum-desc-more > .forum-mods {
  margin: 0.3rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.forum-body > .forum-join {
  align-self: stretch;
  width: 100%;
  justify-content: center;
  margin-top: 0.1rem;
}

.forum-body > .forum-mods {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  margin-top: 0.15rem;
}

.forum-desc-more > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  list-style: none;
  margin: 0;
  order: 99;
  align-self: center;
  -webkit-tap-highlight-color: transparent;
}

.forum-desc-more > summary::-webkit-details-marker { display: none; }
.forum-desc-more > summary::marker { content: ""; }

.forum-desc-more > summary:hover { text-decoration: underline; }

.forum-desc-more > summary::after {
  content: "\25BE";
  font-size: 0.8rem;
  line-height: 1;
  transition: transform 0.18s ease;
  display: inline-block;
}

.forum-desc-more[open] > summary::after { transform: rotate(180deg); }

.forum-desc-more .less { display: none; }
.forum-desc-more[open] .more { display: none; }
.forum-desc-more[open] .less { display: inline; }

.forum-desc-more > p {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.92;
}

.forum-desc-stub {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin: 0;
}

.forum-mods {
  font-size: 0.88rem;
  color: var(--ink);
  text-align: center;
}

.forum-mods-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.forum-mods-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.45rem;
}

.forum-mods-list li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.85rem;
  line-height: 1.3;
}

.forum-mods-list a {
  color: var(--ink);
  text-decoration: none;
}

.forum-mods-list a:hover { color: var(--accent); }

/* bottom meta row: Founder (left) / Founded (right) */
.forum-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.forum-meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.forum-meta-col-right {
  text-align: right;
  align-items: flex-end;
}

.forum-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.forum-meta-value,
.forum-meta a {
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}

.forum-meta a:hover { color: var(--accent); }

.forum-actions {
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
}

.forum-join {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.forum-card.platform-tumblr   .forum-join { background: #36465D; }
.forum-card.platform-discord  .forum-join { background: #5865F2; }
.forum-card.platform-facebook .forum-join { background: #1877F2; }
.forum-card.platform-reddit   .forum-join { background: #FF4500; }

.forum-join:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.forum-join svg { width: 14px; height: 14px; }

.forum-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.forum-url:hover { color: var(--accent); }

.forums-footnote {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.forums-footnote a { color: var(--accent); }

@media (max-width: 600px) {
  .forum-card { padding: 1.3rem 1.2rem; }
}


/* >>> styles/34-history.css */
/* ── history timeline ─────────────────────────────────── */

main.history {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.history-intro a { color: var(--accent); }

.history-era {
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--border), var(--accent-dark), var(--border));
  border-radius: 2px;
}

.timeline-event {
  position: relative;
  margin: 0 0 1.4rem;
  padding: 1rem 1.15rem 1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.timeline-event:hover {
  border-color: var(--accent-dark);
  transform: translateX(2px);
}

.timeline-event::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: -1.59rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.timeline-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.35rem;
  font-variant-numeric: tabular-nums;
}

.timeline-event h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.timeline-event p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-top: 0.65rem;
  align-items: center;
}

.timeline-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(138, 102, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(138, 102, 255, 0.28);
}

.timeline-conf {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.timeline-conf.confirmed         { color: #7ee2a8; border-color: rgba(126, 226, 168, 0.35); }
.timeline-conf.needs-verification{ color: #f0c674; border-color: rgba(240, 198, 116, 0.35); }
.timeline-conf.regional          { color: #6cb6ff; border-color: rgba(108, 182, 255, 0.35); }
.timeline-conf.collector-dating  { color: #cba6f7; border-color: rgba(203, 166, 247, 0.35); }

.timeline-source {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

.history-footnote {
  margin: 3rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.history-footnote a { color: var(--accent); }

@media (max-width: 600px) {
  main.history { padding: 16px 16px 48px; }
  .timeline { padding-left: 1rem; }
  .timeline-event { padding: 0.9rem 1rem; }
  .timeline-event::before { left: -1.35rem; }
}


/* >>> styles/36-guides-section.css */
/* ── guides landing page ─────────────────────────────────── */

main.guides-home {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  text-align: left;
}

.guides-section-label {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 2.5rem 0 1.25rem;
}

/* start-here: 3 numbered step cards */
.guides-start { margin-top: 0.5rem; }

.guides-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.guides-step {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.guides-step:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-2px);
}

.guides-step-num {
  position: absolute;
  top: -14px;
  left: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(138, 102, 255, 0.35);
}

.guides-step h3 {
  margin: 0.4rem 0 0;
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.guides-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

.guides-step-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.guides-step-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.guides-step:hover .guides-step-link svg {
  transform: translateX(3px);
}

/* connector arrows between steps (desktop) */
.guides-step + .guides-step::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.8rem;
  width: 0.6rem;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

/* all-guides 3-col grid */
.guides-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.guides-grid li { margin: 0; }

.guides-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.guides-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-elev));
  transform: translateY(-2px);
}

.guides-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(138, 102, 255, 0.12);
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.guides-card-icon svg { width: 22px; height: 22px; }

.guides-card h3 {
  margin: 0;
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.guides-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* featured guide callout */
.guides-feature {
  margin-top: 2.5rem;
  position: relative;
  background:
    linear-gradient(135deg, rgba(138, 102, 255, 0.12), rgba(138, 102, 255, 0.02) 60%),
    var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.6rem 1.75rem 1.5rem;
}

.guides-feature-tag {
  display: inline-block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.guides-feature h3 {
  margin: 0 0 0.55rem;
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.guides-feature p {
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.65;
  opacity: 0.92;
  max-width: 62ch;
}

.guides-feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.guides-feature-link svg { width: 14px; height: 14px; }

.guides-feature-link:hover svg {
  transform: translateX(3px);
  transition: transform 0.18s ease;
}

/* responsive */
@media (max-width: 820px) {
  .guides-steps { grid-template-columns: 1fr; gap: 1.8rem 1rem; }
  .guides-step + .guides-step::before { display: none; }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .guides-grid { grid-template-columns: 1fr; }
  .guides-feature { padding: 1.3rem 1.3rem 1.2rem; }
  .guides-feature h3 { font-size: 1.3rem; }
}


/* >>> styles/37-research-section.css */
/* ── research landing page ───────────────────────────────── */

main.research-home {
  display: block;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  text-align: left;
}

/* feature grid: 5 cards with thumbnails */
.research-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.research-grid li { margin: 0; }

.research-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.research-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  transform: translateY(-2px);
}

.research-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.research-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.research-card:hover .research-card-thumb img {
  transform: scale(1.04);
}

/* light bg for patent thumbnails (white-on-white scans) */
.research-card-thumb.thumb-light {
  background: #f4f4ee;
}

.research-card-thumb.thumb-light img {
  object-fit: contain;
  padding: 0.5rem;
}

.research-card-body {
  padding: 1.1rem 1.3rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.research-card h3 {
  margin: 0;
  font-family: "Opsilon", "Opsilon-fallback", var(--body);
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.research-card-count {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.research-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

/* responsive */
@media (max-width: 920px) {
  
  
  
  .research-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  
  
  
  
  .research-grid { grid-template-columns: 1fr; }
}


/* >>> styles/40-records.css */
/* ── records page ─────────────────────────────────────────── */

.record-card { padding-top: 1.1rem; }

.record-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.record-badge {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* category badges — solid fill */
.record-badge.cat-guinness   { background: #d4a017; color: #1a1208; border-color: #d4a017; }
.record-badge.cat-other-body { background: #2bb673; color: #04140c; border-color: #2bb673; }
.record-badge.cat-media      { background: #e57b2a; color: #1f1106; border-color: #e57b2a; }
.record-badge.cat-community  { background: var(--accent); color: #fff; border-color: var(--accent); }
.record-badge.cat-adjacent   { background: #5a5a68; color: #ececf2; border-color: #5a5a68; }

/* scope badges — outlined */
.record-badge.scope {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.record-stat-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.5rem 0 0.2rem;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  margin-top: 0.1rem;
}

.record-quantity {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.record-quantity .unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.25rem;
  letter-spacing: 0;
}

.record-date {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-left: auto;
}

.record-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  opacity: 0.95;
}

.record-title .material {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

.record-verification {
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
}

.record-verification strong {
  font-style: normal;
  font-weight: 600;
  color: color-mix(in srgb, var(--ink) 70%, var(--muted));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  margin-right: 0.35rem;
}

/* ── records: research leads strip ───────────────────────── */

.record-leads-wrap {
  max-width: 1100px;
  margin: 1rem auto 3.5rem;
}

.record-leads-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
}

.record-leads-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.record-leads-head .lede {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.record-leads {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.7rem;
}

@media (min-width: 720px) { .record-leads { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .record-leads { grid-template-columns: repeat(3, 1fr); } }

.record-lead {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid color-mix(in srgb, var(--accent) 50%, var(--border));
  border-radius: 6px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.record-lead h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}

.record-lead .lead-status {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: var(--muted);
}

.record-lead p {
  margin: 0;
  color: var(--ink);
  opacity: 0.85;
  font-size: 0.83rem;
}

.record-lead .lead-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.record-lead .lead-sources a {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: color 0.15s ease, background 0.15s ease;
}

.record-lead .lead-sources a:hover {
  color: #fff;
  background: var(--accent);
}

@media (max-width: 600px) {
  .record-stat-row { gap: 0.4rem; }
  .record-date { margin-left: 0; }
  .record-quantity { font-size: 1.15rem; }
}

/* ── records: section headers ─────────────────────────────── */

.records-section-head {
  max-width: 1100px;
  margin: 0.5rem auto 1.2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.records-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.records-section-head .section-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.records-section-head .section-sub .pill {
  display: inline-block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  margin-right: 0.5rem;
  vertical-align: 1px;
}

/* ── records: variety collectors leaderboard ──────────────── */

.leaderboard {
  max-width: 1100px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 48px 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.leaderboard-row:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}

.leaderboard-rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.leaderboard-row.rank-1 .leaderboard-rank { color: #d4a017; }
.leaderboard-row.rank-2 .leaderboard-rank { color: #c9c9d4; }
.leaderboard-row.rank-3 .leaderboard-rank { color: #c08a5a; }

.leaderboard-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.leaderboard-id {
  min-width: 0;
}

.leaderboard-id h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

.leaderboard-id h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.leaderboard-id h3 a:hover { border-bottom-color: var(--accent); }

.leaderboard-id .focus {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.leaderboard-id .location {
  display: inline;
  font-size: 0.78rem;
  color: var(--muted);
}

.leaderboard-id .focus .sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}

.leaderboard-stat {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 90px;
}

.leaderboard-stat .count {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.leaderboard-stat .unit {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

.leaderboard-placeholder {
  opacity: 0.55;
  border-style: dashed;
}

.leaderboard-placeholder .leaderboard-id h3 {
  font-style: italic;
  color: var(--muted);
  font-weight: 600;
}

.leaderboard-foot {
  max-width: 1100px;
  margin: 0.5rem auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.leaderboard-foot a { color: var(--accent); text-decoration: none; }
.leaderboard-foot a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .leaderboard-row {
    grid-template-columns: 36px 44px 1fr;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
  }
  .leaderboard-rank { font-size: 1.2rem; }
  .leaderboard-avatar { width: 44px; height: 44px; min-width: 44px; font-size: 0.95rem; }
  .leaderboard-stat {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.5rem;
    text-align: right;
    border-top: 1px dashed var(--border);
    padding-top: 0.55rem;
    margin-top: 0.2rem;
  }
  .leaderboard-stat .count { font-size: 1.2rem; }
}


/* >>> styles/45-bubly-catalog.css */
/* ============================================================
   BUBLY CATALOG — brand gallery (filterable) + per-tab spec
   ============================================================ */

/* shared color swatch dot */
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  vertical-align: middle;
}
.swatch-red    { background: #e23b3b; }
.swatch-orange { background: #f0852e; }
.swatch-yellow { background: #f2c23e; }
.swatch-green  { background: #3fb950; }
.swatch-blue   { background: #3b82e2; }
.swatch-purple { background: #8a66ff; }
.swatch-pink   { background: #e64c9e; }
.swatch-gold   { background: #d8a51d; }
.swatch-black  { background: #2a2a30; }
.word-search {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-size: 0.9rem;
  min-width: 180px;
}
.word-search:focus-visible {
  outline: none;
  border-color: var(--accent);
}
.word-search::placeholder { color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--accent); }
.chip.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.chip.is-on .swatch { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }

/* ---- the grid ---- */
.btab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 600px)  { .btab-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 800px)  { .btab-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1000px) { .btab-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1200px) { .btab-grid { grid-template-columns: repeat(7, 1fr); } }

.btab[hidden] { display: none; }
.btab > a {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.btab > a:hover,
.btab > a:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  outline: none;
}
.btab-thumb {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  background: var(--bg-elev);
  perspective: 900px;
}
/* the flipping element — only the tab image flips, not the tile */
.flip {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btab-link.is-flipped .flip { transform: rotateY(180deg); }
.flip .face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14%;
  box-sizing: border-box;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip .face.back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
  .flip { transition: none; }
}

.btab-empty {
  text-align: center;
  color: var(--muted);
  margin: 2rem auto;
}
.linklike {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}


/* >>> styles/50-tab-gallery.css */
/* ============================================================
   TAB GALLERY — V6 control bar + facet rails (shared)
   Powers the browse-page tool panel; engine in /gallery.js.
   Chrome (rail / top strip / .content shell) lives in the
   SHARED SITE CHROME block below.
   ============================================================ */

/* extra swatch colors not defined with the base set */
.swatch-cyan   { background: #2bb6c4; }
.swatch-silver { background: linear-gradient(135deg, #d9dde3, #aab0ba); }
.swatch-brown  { background: #7a4a26; }

/* full-bleed gallery + left-aligned empty state under the tool panel */
.btab-grid { max-width: none; margin: 0; }
.btab-empty { text-align: left; margin: 2rem 0; }

/* ----- unified sticky tool panel (control row + facet rails) ----- */
.toolpanel {
  position: sticky; top: 14px; z-index: 40;
  width: 100%; margin: 0 0 20px;
  background: rgba(20, 20, 26, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
}
.controlbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px 14px; margin: 0; padding: 11px 14px; }
/* section switcher (icon dropdown) injected by gallery.js — sits at the far
   left of the browse toolbar with a divider, mirroring pagehead's .ph-sec-dd */
.controlbar > .ph-sec-dd { align-self: center; margin-right: 2px; padding-right: 14px; border-right: 1px solid var(--border); }
.controlbar > .ph-sec-dd .ph-sec-btn { height: 40px; }
.cl { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; flex: 0 0 auto; min-width: 0; }
.cl-row2 { display: contents; }
.cl-scope { flex: 0 0 auto; min-width: 0; }
.cl-find { flex: 1 1 auto; min-width: 240px; }
.cl-find .cb-search { width: 100%; min-width: 0; }

/* search box */
.cb-search { display: flex; align-items: center; gap: 8px; height: 40px; box-sizing: border-box; padding: 0 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; min-width: 210px; transition: border-color .15s ease, box-shadow .15s ease; }
.cb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 102, 255, .18); }
.cb-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.cb-search .word-search { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: none; border-radius: 0; outline: none; color: var(--ink); font: inherit; font-size: .92rem; }

/* facet rails toggle (mobile "Browse" / desktop grouping button) */

/* brand dropdown (brand pages only) */
.brand-select { position: relative; }
.brand-btn { height: 40px; min-width: 150px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font: inherit; font-size: .92rem; cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.brand-select.is-active .brand-btn { color: var(--ink); }   /* only a real selection shows in white */
.brand-btn > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-btn:hover { border-color: var(--accent); }
.brand-btn .bcaret { display: inline-flex; color: var(--muted); transition: transform .2s ease; }
.brand-btn .bcaret svg { width: 16px; height: 16px; }
.brand-select.open .brand-btn .bcaret { transform: rotate(180deg); }
.brand-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 340px; display: none; z-index: 50; grid-template-columns: 1fr 1fr; gap: 2px; padding: 8px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); transform-origin: top left; }
.brand-select.open .brand-menu { display: grid; animation: brandPop .14s ease-out; }
@keyframes brandPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.brand-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.brand-menu a:hover { background: rgba(255, 255, 255, .05); }
.brand-menu a.current { color: var(--accent); background: rgba(138, 102, 255, .12); }
.brand-menu a .bcheck { margin-left: auto; }
/* compact scope dropdowns (Mark / Era) sit beside the wider Brand switcher */
.brand-select.mini .brand-btn { min-width: 92px; }
.brand-select.mini .brand-menu { min-width: 150px; grid-template-columns: 1fr; }

/* color swatch rail — expanding dots, neutral selected ring */
.cb-colors { display: flex; align-items: center; gap: 7px; }
.cb-colors .chip { width: 28px; height: 28px; min-width: 0; padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cb-colors .chip .swatch { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: width .15s ease, height .15s ease, box-shadow .15s ease; }
.cb-colors .chip:hover .swatch { width: 16px; height: 16px; }
.cb-colors .chip.is-on { border-color: rgba(255, 255, 255, .7); }
.cb-colors .chip.is-on .swatch { width: 20px; height: 20px; }

/* ----- facet rails row ----- */
.facetbar { display: flex; align-items: center; gap: 8px 18px; flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; }
.facetbar:empty { display: none; }
.facetbar .facet-label { display: none; }   /* dots are self-evident inline beside the dropdowns */
.facet { display: flex; align-items: center; gap: 9px; min-width: 0; }
.facet-label { flex: 0 0 auto; min-width: 46px; font-size: .62rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); white-space: nowrap; }
.pillrow { display: flex; gap: 6px; flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-padding: 2px; }
.pillrow::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.is-on { background: rgba(138, 102, 255, .16); border-color: var(--accent); color: var(--accent); }
.pill .ct { color: var(--muted); font-size: .82em; }
.pill:hover .ct, .pill.is-on .ct { color: var(--accent); }
.facetbar .cb-colors { height: auto; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-padding: 2px; }
.facetbar .cb-colors::-webkit-scrollbar { display: none; }
.facetbar .cb-colors .chip { flex: 0 0 auto; }

/* ----- in-grid group headers (ROAM organize/jump) ----- */
.group-head { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 14px 2px 2px; padding-bottom: 8px; border-bottom: 1px solid var(--border); scroll-margin-top: var(--jump-offset, 96px); }
.group-head:first-child { margin-top: 0; }
.group-head .gh-dot { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.group-head .gh-name { font-family: "Opsilon", "Opsilon-fallback", var(--body); font-size: 1.18rem; color: var(--ink); text-transform: capitalize; }
.group-head .gh-ct { font-size: .8rem; color: var(--muted); }
.group-head.is-active { border-bottom-color: var(--accent); }
.group-head.is-active .gh-name { color: var(--accent); }

/* ----- page intro (title + facts + blurb) ----- */
.page-intro { width: 100%; margin: 0 0 22px; padding: 16px 20px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); text-align: left; }
.pi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-intro h1 { font-family: "Opsilon", "Opsilon-fallback", var(--body); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; margin: 0 0 .5rem; color: var(--ink); text-align: left; }
.page-intro-desc { color: var(--muted); line-height: 1.6; max-width: 680px; margin: 0; text-align: left; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 0 0 12px; }
.page-meta > div { display: flex; align-items: baseline; gap: 8px; }
.page-meta dt { margin: 0; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.page-meta dd { margin: 0; font-size: .9rem; color: var(--ink); }
.page-meta dd a { color: var(--ink); text-decoration: none; }
.page-meta dd a:hover { color: var(--accent); text-decoration: underline; }
.pi-min { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.pi-min:hover { color: var(--accent); border-color: var(--accent); }
.pi-min svg { width: 16px; height: 16px; transition: transform .2s ease; }
.page-intro.minimized .pi-min svg { transform: rotate(180deg); }
.page-intro.minimized h1 { margin-bottom: 0; }
.page-intro.minimized .page-meta, .page-intro.minimized .page-intro-desc { display: none; }

/* ----- responsive tiers (control bar re-flows on the .content container) ----- */
@container shell (max-width: 1040px) {
  .controlbar { flex-wrap: wrap; }
  .cl-row2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; flex: 1 1 100%; }
  .cl-find { flex: 1 1 auto; }
}
@container shell (max-width: 700px) {
  .facetbar .facet { flex: 1 1 100%; }
}
@media (max-width: 899px) {
  .toolpanel { top: 74px; }
  .cl-scope { flex: 0 0 auto; min-width: 0; }
  .brand-btn { min-width: 120px; }
  .cl-find { flex: 1 1 auto; min-width: 0; }
  .brand-menu { min-width: 280px; }
  .group-head { scroll-margin-top: var(--jump-offset, 188px); }
}


/* >>> styles/55-pagehead.css */
/* ============================================================
   SHARED CONTENT HEADER (.pagehead) — single toolbar
   Injected at the top of <main> on research / community / guides /
   about pages by pagehead.js. One bar holds:
     • section dropdown (switch top-level category) + breadcrumb leaf
     • adaptive jump (on-page sections, else sibling pages)
     • find-on-page + shop + login (right cluster)
   At mobile widths the right cluster moves up into the mobile top bar
   (search injected left of shop); tapping it drops a find row in here.
   See pagehead.js for the populate logic.
   ============================================================ */
.pagehead {
  position: sticky; top: 14px; z-index: 40;
  box-sizing: border-box;
  /* lives in .content above <main>; 24px sides match main's padding so the bar
     lines up with full-width content and stays a uniform width on every page */
  margin: 0 24px 20px;
  background: rgba(20, 20, 26, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
}
.ph-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 11px 14px; }

/* breadcrumb + section dropdown */
.ph-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; font-size: .9rem; }
.ph-sec-dd { position: relative; display: inline-flex; flex: 0 0 auto; }
.ph-sec-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 6px 0 7px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); font: inherit; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.ph-sec-btn:hover { color: var(--accent); background: rgba(255, 255, 255, .04); }
.ph-sec-btn .ph-sec-ic { display: inline-flex; }
.ph-sec-btn .ph-sec-ic svg { width: 18px; height: 18px; display: block; }
.ph-sec-btn .ph-chev { display: inline-flex; transition: transform .15s ease; }
.ph-sec-btn .ph-chev svg { width: 13px; height: 13px; display: block; }
.ph-sec-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--border); }
.ph-sec-btn[aria-expanded="true"] .ph-chev { transform: rotate(180deg); }
.ph-sec-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px; padding: 6px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); display: none; flex-direction: column; gap: 2px; }
.ph-sec-menu.open { display: flex; }
.ph-sec-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .88rem; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.ph-sec-menu a .ph-mic { display: inline-flex; color: var(--muted); transition: color .15s ease; }
.ph-sec-menu a .ph-mic svg { width: 17px; height: 17px; display: block; }
.ph-sec-menu a:hover { background: rgba(255, 255, 255, .05); color: var(--accent); }
.ph-sec-menu a:hover .ph-mic { color: var(--accent); }
.ph-sec-menu a[aria-current="true"] { color: var(--accent); background: rgba(138, 102, 255, .12); }
.ph-sec-menu a[aria-current="true"] .ph-mic { color: var(--accent); }
.ph-sep { display: inline-flex; color: var(--muted); }
.ph-sep svg { width: 13px; height: 13px; display: block; }
.ph-leaf { color: var(--ink); font-family: "TOOM", "TOOM-fallback", var(--body); font-size: 1.02rem; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* adaptive jump (on-page anchors or sibling pages) */
.ph-jump { display: flex; align-items: center; gap: 20px; flex: 1 1 0; min-width: 0; padding: 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ph-jump::-webkit-scrollbar { display: none; }
.ph-link { flex: 0 0 auto; position: relative; padding: 6px 0; background: none; border: none; color: var(--muted); font: inherit; font-family: "TOOM", "TOOM-fallback", var(--body); font-size: 1.02rem; letter-spacing: .02em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color .15s ease; }
.ph-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .18s ease; }
.ph-link:hover { color: var(--ink); }
.ph-link.current { color: var(--ink); }
.ph-link.current::after { transform: scaleX(1); }

/* right cluster: find + shop + login (find gets margin-left:auto to push right).
   The find is an icon by default and expands into a field when clicked/focused
   (or while it holds a query). */
.ph-find { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; height: 40px; width: 40px; box-sizing: border-box; padding: 0; justify-content: center; margin-left: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: width .18s ease, border-color .15s ease, box-shadow .15s ease; }
.ph-find:focus-within, .ph-find.open { width: 220px; padding: 0 10px 0 12px; justify-content: flex-start; cursor: text; }
.ph-find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 102, 255, .18); }
.ph-find > svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.ph-find input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: .92rem; }
.ph-count { font-size: .72rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.ph-clear { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; flex-shrink: 0; }
.ph-clear svg { width: 15px; height: 15px; }
.ph-clear:hover { color: var(--ink); }
/* collapsed (icon only): hide the field innards so just the magnifier shows,
   centered — otherwise overflow+centering clips the icon and reveals the input */
.ph-find:not(.open):not(:focus-within) { gap: 0; }
.ph-find:not(.open):not(:focus-within) > .ph-input { width: 0; flex: 0 0 0; }
.ph-find:not(.open):not(:focus-within) > .ph-count,
.ph-find:not(.open):not(:focus-within) > .ph-clear { display: none; }
.ph-find .ph-clear[hidden] { display: none; }
.util-link { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--ink); text-decoration: none; cursor: pointer; flex: 0 0 auto; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.util-link:hover { border-color: var(--accent); color: var(--accent); }
.util-link svg { width: 19px; height: 19px; }

/* find highlights */
mark.ph-hit { background: rgba(138, 102, 255, .30); color: var(--ink); border-radius: 3px; padding: 0 1px; }
mark.ph-hit.ph-active { background: var(--accent); color: #fff; }

@media (max-width: 899px) {
  /* The mobile top bar is visible here, so the right cluster moves up into it
     (search injected left of shop; shop + login already there). Find stays
     hidden until the top-bar search is tapped, then drops in as a full-width
     row under the breadcrumb/jump line. */
  .pagehead { top: 74px; margin-left: 0; margin-right: 0; }
  .ph-find, .ph-bar > .util-link { display: none; }
  .pagehead.find-active .ph-find { display: flex; order: 9; flex: 1 1 100%; width: 100%; gap: 8px; margin-left: 0; padding: 0 10px 0 12px; justify-content: flex-start; }
  .pagehead.find-active .ph-find > .ph-input { width: auto; flex: 1; }
}



/* >>> styles/56-bubly-spec.css */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}
.back-link { color: var(--accent); text-decoration: none; font-size: 0.88rem; }
.back-link:hover { text-decoration: underline; }


/* >>> styles/60-chrome-rail.css */
/* =========================================================================
   SHARED SITE CHROME — floating nav rail + mobile top strip + content shell
   Single source for the header/sidebar/footer system. The body markup is
   injected by scripts/build-chrome.py between the CHROME:* marker comments;
   edit partials/ for markup and this file for styling.

   GEOMETRY LIVES IN styles/00-base.css :root (--rail-*). Change a size there,
   not here — the content shell is calc()'d from the same tokens so the two can
   never drift apart. See CHROME.md for the couplings this file participates in.
   ========================================================================= */

/* ----- the rail: rests collapsed (icon-only), expands on hover/focus -----
   NEVER use :focus-within here — a mouse click on a chevron leaves that button
   focused and pins the rail open. :focus-visible is keyboard-only. */
.rail { position: fixed; top: var(--rail-inset); left: var(--rail-inset); bottom: var(--rail-inset); width: var(--rail-min); z-index: 80; display: flex; flex-direction: column; gap: 5px; padding: var(--rail-pad); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--rail-radius); box-shadow: 0 12px 34px rgba(0,0,0,.4); transition: width .2s ease; overflow: hidden; }
.rail:hover, .rail:has(:focus-visible) { width: var(--rail-open); overflow: visible; }
.rail .ic { width: var(--rail-icon); min-width: var(--rail-icon); height: var(--rail-icon); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.rail .ic svg { width: var(--rail-icon-svg); height: var(--rail-icon-svg); }
.lbl, .chev { display: none; }
.rail:hover .lbl, .rail:has(:focus-visible) .lbl { display: inline; }
.rail:hover .chev, .rail:has(:focus-visible) .chev { display: inline-flex; }

/* ----- the nav list -----
   ONE flat list. Home, Collection, the four content sections, Shop and Lab are
   all the same component: a .group whose .grp-link title discloses its .sub.
   (Shop and Lab used to be a separate .acc accordion pinned below this list;
   that component is gone — see docs/design/2026-08-06-rail-unify.md.) The list
   owns the rail's remaining height and scrolls if it outgrows it. */
.rail-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding: 2px 0 4px; display: flex; flex-direction: column; gap: 1px; }
.group { position: relative; }
.grp-head { display: flex; align-items: center; }
/* .grp-link is a disclosure control, not a destination: build-chrome.py's
   CHROME_JS intercepts the click so section titles open their list instead of
   navigating to the (retired) landing page. The href stays as a no-JS fallback. */
.grp-link { flex: none; display: flex; align-items: center; justify-content: center; gap: 0; width: var(--rail-icon); height: var(--rail-icon); padding: 0; margin: 0 auto; border-radius: 50%; color: var(--ink); text-decoration: none; min-width: 0; }
.rail:hover .grp-link, .rail:has(:focus-visible) .grp-link { flex: 1; justify-content: flex-start; gap: var(--rail-row-gap); width: auto; height: auto; padding: var(--rail-row-pad); margin: 0; border-radius: var(--rail-row-radius); }
.grp-link:hover { background: var(--rail-hover-bg); color: var(--sec-color, var(--accent)); }
.grp-link:hover .ic { color: inherit; }
.grp-link .lbl { font-family: "TOOM", "TOOM-fallback", var(--body); font-size: var(--rail-row-font); white-space: nowrap; overflow: hidden; }
.grp-link.current, .grp-link.current .ic { color: var(--sec-color, var(--accent)); }
/* Shop and Lab keep their brand colour through the same --sec-color mechanism
   the old .sec-* accordion sections used; every other group falls back to the
   purple accent. --sec-tint is the matching low-alpha background for .sub rows. */
.group-shop { --sec-color: var(--shop); --sec-tint: rgba(255,200,102,.12); }
.group-lab  { --sec-color: var(--lab);  --sec-tint: rgba(110,231,160,.12); }
.group-lab > .grp-head > .grp-link { position: relative; }   /* anchors the beta dot */
.grp-chev { display: none; background: none; border: none; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; line-height: 0; }
.rail:hover .grp-chev, .rail:has(:focus-visible) .grp-chev { display: inline-block; }
.grp-chev:hover { color: var(--accent); }
.grp-chev .chev { transition: transform .2s ease; }
.grp-chev .chev svg { width: var(--rail-chev-svg); height: var(--rail-chev-svg); }
.group.open > .grp-head .grp-chev .chev { transform: rotate(180deg); }
.sub { display: none; padding: 2px 0 6px 16px; margin-left: var(--sub-indent); }
.rail:hover .group.open > .sub, .rail:has(:focus-visible) .group.open > .sub { display: block; }
.sub a { display: block; color: var(--muted); text-decoration: none; font-size: .81rem; padding: 6px 9px; border-radius: 8px; white-space: nowrap; }
.sub a:hover { color: var(--sec-color, var(--accent)); background: var(--sec-tint, rgba(138,102,255,.1)); }
.sub a.current { color: var(--sec-color, var(--accent)); background: var(--sec-tint, rgba(138,102,255,.12)); }
.sub-title { display: none; }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 1px; }
.rail-link { display: flex; align-items: center; gap: var(--rail-row-gap); color: var(--ink); text-decoration: none; padding: var(--rail-row-pad); border-radius: var(--rail-row-radius); }
.rail-link:hover { background: var(--rail-hover-bg); color: var(--accent); }
.rail-link .lbl { font-size: .86rem; white-space: nowrap; }
/* cute purple BETA tag on the Lab title — shrinks to a dot at rest, full pill on
   hover. Anchored by .group-lab > .grp-head > .grp-link, NOT by .group (which is
   also position: relative but spans the whole group including its open .sub). */
.beta-badge { position: absolute; top: 3px; right: 3px; margin: 0; padding: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-elev); color: transparent; font-size: 0; letter-spacing: 0; overflow: hidden; }
.rail:hover .beta-badge, .rail:has(:focus-visible) .beta-badge { position: static; margin-left: auto; padding: 1px 7px; width: auto; height: auto; border: 1px solid transparent; border-radius: 999px; background: rgba(138,102,255,.16); color: var(--accent); font-size: .5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.5; overflow: visible; }
.grp-link .beta-badge { margin-left: 6px; }
.group-lab .grp-link:hover .beta-badge, .group-lab .grp-link.current .beta-badge { background: rgba(110,231,160,.18); color: var(--lab); }

/* ----- content area + mobile drawer ----- */
.content { margin-left: var(--content-min); padding: 14px 24px 90px; transition: margin-left .2s ease; text-align: left; container-type: inline-size; container-name: shell; }
.content > main { padding-top: 0; }
.app:has(.rail:hover) .content, .app:has(.rail :focus-visible) .content { margin-left: var(--content-open); }
.m-topbar { display: none; }
.m-fab { display: none; flex: 0 0 auto; width: var(--mobile-tap); height: var(--mobile-tap); align-items: center; justify-content: center; background: none; color: var(--muted); border: none; border-radius: var(--rail-row-radius); cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.m-fab:hover { color: var(--accent); background: rgba(255,255,255,.05); }
.m-fab svg { width: 20px; height: 20px; }
.m-logo { display: inline-flex; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); }
.m-logo img { height: 22px; width: auto; display: block; }
.m-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; }
.m-actions a { display: inline-flex; align-items: center; justify-content: center; width: var(--mobile-tap); height: var(--mobile-tap); border-radius: var(--rail-row-radius); color: var(--muted); text-decoration: none; transition: color .15s ease, background-color .15s ease; }
.m-actions a:hover { color: var(--accent); background: rgba(255,255,255,.05); }
.m-actions a svg { width: 19px; height: 19px; }
/* find-on-page trigger injected into the mobile top bar by pagehead.js */
.m-actions .m-search { display: inline-flex; align-items: center; justify-content: center; width: var(--mobile-tap); height: var(--mobile-tap); padding: 0; border: none; background: none; border-radius: var(--rail-row-radius); color: var(--muted); cursor: pointer; transition: color .15s ease, background-color .15s ease; }
.m-actions .m-search:hover, .m-actions .m-search.active { color: var(--accent); background: rgba(255,255,255,.05); }
.m-actions .m-search svg { width: 19px; height: 19px; }
.backdrop { display: none; position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.app.nav-open .backdrop { opacity: 1; visibility: visible; }

/* ----- mobile: rail becomes a slide-in drawer + sticky top strip -----
   MIRROR RULE: the icon-only look lives in the BASE rules above, and :hover
   never fires on touch — so every base rule that shrinks a row to an icon must
   be undone here. If you add one above, add its reset below. */
@media (max-width: 899px) {
  .rail { transform: translateX(-115%); width: var(--rail-open) !important; transition: transform .25s ease; }
  .app.nav-open .rail { transform: none; }
  .app .lbl, .app .chev { display: inline !important; }
  .app .grp-link { flex: 1; justify-content: flex-start; gap: var(--rail-row-gap); width: auto; height: auto; padding: var(--rail-row-pad); margin: 0; border-radius: var(--rail-row-radius); }
  .app .grp-chev { display: inline-block; }
  .app .beta-badge { position: static; margin: 0 0 0 auto; padding: 1px 7px; width: auto; height: auto; border: 1px solid transparent; border-radius: 999px; background: rgba(138,102,255,.16); color: var(--accent); font-size: .5rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.5; overflow: visible; }
  .app .sub { position: static !important; display: none; border-left: none; box-shadow: none; min-width: 0; background: none; margin-left: var(--sub-indent); padding: 2px 0 6px 16px; }
  .app .group.open > .sub { display: block !important; }
  .content { margin-left: 0 !important; padding: 12px 14px 80px; }
  .content > main { padding: 0 0 24px; }
  .content > footer.site { margin-top: 4px; }
  .m-topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 12px; z-index: 60; margin: 0 0 12px; padding: 7px 10px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--rail-radius); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
  .m-fab { display: inline-flex; }
  .backdrop { display: block; }
}


/* >>> styles/65-login.css */
/* ── login (shared: /login/ page + site-wide modal overlay) ───────── */
.login-main { display: flex; align-items: center; justify-content: center; min-height: 76vh; padding: 56px 24px; }
.login-overlay { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; }
.login-overlay.open { display: flex; }
.login-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 10, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: loginFade 0.18s ease; }
.login-panel { position: relative; width: 100%; max-width: 400px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 34px 32px 28px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4); }
.login-overlay .login-panel { animation: loginPop 0.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.login-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: none; border-radius: 8px; color: var(--muted); cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease; }
.login-close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.login-close svg { width: 18px; height: 18px; }
.login-mark { display: block; width: 50px; height: auto; margin: 0 auto 16px; }
.login-title { font-family: "TOOM", "TOOM-fallback", var(--body); font-weight: 400; font-size: 1.85rem; line-height: 1.05; text-align: center; margin: 0 0 6px; color: var(--ink); }
.login-lead { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0 0 26px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-size: 0.76rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.login-inp { height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.login-inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 102, 255, 0.18); }
.login-inp svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.login-inp input { flex: 1; min-width: 0; height: 100%; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: 0.92rem; }
.login-inp input::placeholder { color: var(--muted); }
.login-meta { display: flex; justify-content: flex-end; margin: -4px 0 2px; }
.login-meta a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.login-meta a:hover { color: var(--accent); }
.login-btn { height: 48px; margin-top: 4px; border: none; border-radius: 10px; background: var(--accent-dark); color: #fff; font-family: "Opsilon", "Opsilon-fallback", var(--body); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.09em; text-transform: uppercase; cursor: pointer; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px rgba(107, 63, 228, 0.45); transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.login-btn:hover { background: #5a2fd0; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 22px rgba(107, 63, 228, 0.55); }
.login-msg { min-height: 1.1em; margin: 12px 0 0; text-align: center; font-size: 0.84rem; color: var(--accent); }
.login-div { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.login-div::before, .login-div::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-alt { width: 100%; height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: transparent; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease; }
.login-alt:hover { border-color: var(--accent); background: rgba(138, 102, 255, 0.08); }
.login-alt svg { width: 18px; height: 18px; flex: 0 0 auto; }
.login-foot { text-align: center; margin: 22px 0 0; font-size: 0.86rem; color: var(--muted); }
.login-foot a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-foot a:hover { text-decoration: underline; }
.login-note { margin: 16px 0 0; text-align: center; font-size: 0.7rem; line-height: 1.5; color: var(--muted); opacity: 0.85; }
@keyframes loginFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes loginPop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .login-backdrop, .login-overlay .login-panel { animation: none; } }


/* >>> styles/70-shop.css */
/* ============================================================
   SHOP (shop.tabzoid.com) — uses the shared site chrome (rail + footer).
   In <main>: a .toolpanel toolbar (search + cart) and
   a responsive product grid. Showcase only — Add/cart show a toast.
   ============================================================ */
.shop-main { width: 100%; max-width: 1200px; margin: 0 auto; text-align: left; }

/* toolbar: search + cart, inside a .toolpanel bubble */
.stbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 11px 14px; }
.st-search { display: flex; align-items: center; gap: 8px; height: 40px; flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 0 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.st-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 102, 255, .18); }
.st-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.st-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: .9rem; }
.st-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 10px; background: none; color: var(--ink); cursor: pointer; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.st-cart:hover { border-color: var(--accent); color: var(--accent); }
.st-cart svg { width: 19px; height: 19px; }
.st-cart-count { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: .62rem; border-radius: 999px; }

/* intro + grid */
.shop-intro { margin: 4px 2px 18px; }
.shop-intro h1 { font-family: "TOOM", "TOOM-fallback", var(--body); font-weight: 400; font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; margin: 0 0 8px; color: var(--ink); }
.shop-intro p { margin: 0; color: var(--muted); font-size: .98rem; max-width: 60ch; }
.shop-grid { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.shop-empty { grid-column: 1 / -1; color: var(--muted); padding: 40px 0; text-align: center; }

/* product card */
.shop-card { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.shop-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.sc-cover { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sc-cover > svg { width: 46px; height: 46px; opacity: .9; }
.sc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.sc-tag { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; }
.sc-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--border); background: rgba(14, 14, 18, .6); color: var(--ink); cursor: pointer; }
.sc-fav svg { width: 15px; height: 15px; }
.sc-fav:hover, .sc-fav.on { color: var(--accent); border-color: var(--accent-dark); }
.sc-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 13px; flex: 1; }
.sc-title { font-size: .9rem; line-height: 1.35; margin: 0; color: var(--ink); font-weight: 500; }
.sc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-price { font-size: .92rem; color: var(--ink); }
.sc-add { height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid var(--accent-dark); border-radius: 8px; background: rgba(138, 102, 255, .16); color: var(--accent); font: inherit; font-size: .8rem; cursor: pointer; transition: background-color .15s ease; }
.sc-add:hover { background: rgba(138, 102, 255, .26); }
.sc-add svg { width: 14px; height: 14px; }

/* category families (cover tint + chip) */
.fam-purple .sc-cover { background: linear-gradient(150deg, #1c1830, #141018); }
.fam-purple .sc-cover > svg { color: var(--accent); }
.fam-purple .sc-tag { color: #cbb8ff; background: rgba(138, 102, 255, .18); border: 1px solid var(--accent-dark); }
.fam-teal .sc-cover { background: linear-gradient(150deg, #101a20, #0f1418); }
.fam-teal .sc-cover > svg { color: #5dcaa5; }
.fam-teal .sc-tag { color: #9fe1cb; background: rgba(29, 158, 117, .18); border: 1px solid #0f6e56; }
.fam-coral .sc-cover { background: linear-gradient(150deg, #20141a, #181014); }
.fam-coral .sc-cover > svg { color: #f0997b; }
.fam-coral .sc-tag { color: #f5c4b3; background: rgba(216, 90, 48, .18); border: 1px solid #993c1d; }
.fam-amber .sc-cover { background: linear-gradient(150deg, #201a10, #181410); }
.fam-amber .sc-cover > svg { color: #ef9f27; }
.fam-amber .sc-tag { color: #fac775; background: rgba(186, 117, 23, .2); border: 1px solid #854f0b; }

/* coming-soon toast */
.shop-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px); z-index: 100; padding: 10px 16px; background: var(--bg-elev); border: 1px solid var(--accent-dark); border-radius: 999px; color: var(--ink); font-size: .86rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.shop-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 700px) {
  .st-search { flex: 1 1 auto; }
}


/* >>> styles/75-legal.css */
/* ============================================================
   LEGAL PAGES (privacy/ + terms/) — readable prose column
   Moved from identical inline <style> blocks in both pages.
   ============================================================ */
main.legal { max-width: 760px; margin: 0 auto; padding: 2rem 1.1rem 4rem; }
main.legal h1 { font-family: "TOOM", "TOOM-fallback", var(--body); margin-bottom: 0.3rem; }
main.legal .updated { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
main.legal .lead { color: var(--muted); margin: 1.2rem 0 1.8rem; }
main.legal h2 {
  font-family: "TOOM", "TOOM-fallback", var(--body);
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
main.legal h2:first-of-type { border-top: 0; padding-top: 0; }
main.legal p, main.legal li { line-height: 1.65; }
main.legal ul { padding-left: 1.2rem; }
main.legal li { margin: 0.35rem 0; }
main.legal a { color: var(--accent); }
main.legal .tldr {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.8rem;
}
main.legal .tldr strong { font-family: "TOOM", "TOOM-fallback", var(--body); }


/* >>> styles/80-field-guide.css */
/* ============================================================
   FIELD GUIDE SHARE CARD — shareable poster + download links
   used on guides/ pages (morphology has its own figure layout)
   ============================================================ */
.fg-share {
  display: flex; align-items: center; gap: 18px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; margin: 1.6rem 0 2rem;
}
.fg-share img { width: 92px; height: auto; border-radius: 8px; border: 1px solid var(--border); flex: none; }
.fg-share .fg-txt { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.fg-share .fg-txt strong { color: var(--ink); display: block; font-family: "TOOM", "TOOM-fallback", var(--body); font-weight: 400; letter-spacing: .3px; }
.fg-share a { color: var(--accent); }
.see-also { color: var(--muted); font-size: .92rem; margin: -0.4rem 0 1.6rem; }
.see-also a { color: var(--accent); }
