/* ============================================
   NAA: Ghanaian Traditional Semiotics archive (PROTOTYPE, 2026-11-16)
   Plan: 26_TRADITIONAL_SEMIOTICS_PLAN.md, "Design and build".
   - Archive pages only (linked from /semiotics/* pages, not main.css),
     so the Noto fonts load only where the African Latin letters are.
   - Noto Serif: symbol names and page titles (>= 24px). Chosen over Noto Serif Display
     (Nick, 2026-11-16) because its sturdier strokes stay readable on phones.
     Noto Sans: all other archive text. Nav and footer stay DM Sans.
   - Four site colours + tonal tokens; the symbol is always the hero.
   - Motion: opacity/transform only; static under reduced motion.
   ============================================ */

@font-face {
  font-family: "Noto Serif";
  src: url("../../assets/fonts/noto/noto-serif-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("../../assets/fonts/noto/noto-sans-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

.sem {
  --sem-display: "Noto Serif", Georgia, serif;
  --sem-text: "Noto Sans", var(--font-body);
  font-family: var(--sem-text);
  color: var(--text-on-light);
}

.sem h1,
.sem h2,
.sem h3,
.sem-name {
  font-family: var(--sem-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
}

.sem h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem); line-height: 1.02; }
.sem h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); line-height: 1.1; }
.sem h3 { font-size: 1.5rem; line-height: 1.15; }

.sem p { max-width: 62ch; }

.sem p a,
.sem nav.sem-muted a,
.sem-stats a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.sem-eyebrow {
  font-family: var(--sem-text);
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted-on-light);
}

.sem-lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-on-light);
}

.sem-muted { color: var(--text-muted-on-light); }

.sem-proto-note {
  display: inline-block;
  margin-bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--beige-shade-1);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  font-size: var(--meta);
  color: var(--text-muted-on-light);
}

/* ---------- Breadcrumbs ---------- */
.sem-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
  font-size: var(--meta);
  color: var(--text-muted-on-light);
}

.sem-crumbs li + li::before {
  content: "/";
  margin-right: var(--space-2);
  opacity: 0.5;
}

.sem-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.sem-crumbs a:hover { color: var(--text-on-light); }

/* ---------- Hub header ---------- */
.sem-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
}

.sem-hero h1 { margin: var(--space-4) 0 var(--space-6); }

.sem-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin-top: var(--space-8);
  padding: 0;
  list-style: none;
  font-size: var(--meta);
  color: var(--text-muted-on-light);
}

.sem-stats strong { color: var(--text-on-light); font-weight: 600; }

/* ---------- Pairs (launch set) ---------- */
.sem-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.sem-pair {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--beige-tint);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  border-radius: var(--radius-card);
}

.sem-pair__marks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.sem-pair__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.sem-pair__mark img {
  width: min(100%, 120px);
  aspect-ratio: 1;
  object-fit: contain;
}

.sem-pair__mark span { font-size: 0.875rem; line-height: 1.3; }
.sem-pair h3 { margin: 0; }
.sem-pair p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--text-muted-on-light); }

/* ---------- Toolbar: search + filters ---------- */
.sem-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.sem-search {
  flex: 1 1 260px;
  max-width: 360px;
}

.sem-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--beige-tint);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  font: inherit;
  font-size: 1rem;
  color: var(--text-on-light);
}

.sem-search input:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }

.sem-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.sem-filters .work-filter__pill { font-family: var(--sem-text); border: 0; cursor: pointer; }

.sem-count { font-size: var(--meta); color: var(--text-muted-on-light); margin-top: var(--space-4); }

/* ---------- Symbol grid ---------- */
.sem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}

.sem-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-6) var(--space-4) var(--space-4);
  background: var(--beige-tint);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  border-radius: var(--radius-card);
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}

a.sem-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
a.sem-card:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }

.sem-card__mark {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}

.sem-card__mark img { width: 68%; height: 68%; object-fit: contain; }

.sem-card__name {
  font-family: var(--sem-display);
  font-size: 1.125rem;
  line-height: 1.2;
}

.sem-card__people { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted-on-light); }

.sem-card--researching .sem-card__mark img { opacity: 0.32; }

/* Status: text + shape, never colour alone. */
.sem-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  line-height: 1.6;
  background: var(--beige-shade-1);
  color: var(--text-muted-on-light);
}

.sem-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.sem-tag--complete { background: var(--charcoal); color: var(--beige); }
.sem-tag--complete::before { background: var(--orange); border-color: var(--orange); }

.sem-empty { margin-top: var(--space-8); color: var(--text-muted-on-light); }

/* ---------- Entry ---------- */
.sem-entry { padding-top: var(--space-12); }

.sem-entry__layout {
  display: grid;
  gap: var(--space-12);
}

@media (min-width: 1024px) {
  .sem-entry__layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }
  .sem-entry__stage-col { position: sticky; top: var(--space-24); }
}

.sem-stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--beige-tint);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  border-radius: var(--radius-card);
}

.sem-stage__panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms var(--ease), visibility 0s linear 420ms;
}

.sem-stage__panel.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms var(--ease), visibility 0s;
}

.sem-stage__panel .construct { width: 82%; }

.sem-stage__mark {
  width: 62%;
  aspect-ratio: 1;
  background: var(--black);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}

/* In use: the mark stamped as a cloth repeat, like adinkra printing. */
.sem-stage__panel--use { background: var(--charcoal); }

.sem-stage__cloth {
  position: absolute;
  inset: 0;
  background: var(--beige);
  opacity: 0.9;
  inset: 4%;
  -webkit-mask: var(--mark) 0 0 / 23% 23% space;
  mask: var(--mark) 0 0 / 23% 23% space;
}

.sem-stage__cap {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  padding: 2px 12px;
  border-radius: var(--radius-pill);
  background: var(--beige);
  font-size: 0.75rem;
  color: var(--text-muted-on-light);
}

.sem-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.sem-steps [role="tab"] { font-family: var(--sem-text); border: 0; cursor: pointer; }
.sem-steps [role="tab"] .sem-steps__n { opacity: 0.6; margin-right: 4px; }

.sem-entry__head h1 { margin: var(--space-3) 0 var(--space-2); }

.sem-say {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  color: var(--text-muted-on-light);
}

.sem-say__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--beige-shade-1);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  font: inherit;
  font-size: 0.875rem;
  color: var(--text-on-light);
}

.sem-say__btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.sem-say__btn svg { width: 18px; height: 18px; }

.sem-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }

.sem-block { padding-top: var(--space-8); margin-top: var(--space-8); border-top: 1px solid var(--hairline-on-light); }
.sem-block:first-of-type { margin-top: 0; }
.sem-block h2 { font-size: 1.5rem; margin: var(--space-2) 0 var(--space-4); }

.sem-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); margin: 0; }
.sem-dl dt { color: var(--text-muted-on-light); }
.sem-dl dd { margin: 0; }

.sem-proverb {
  margin: 0;
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--beige-shade-1);
}

.sem-proverb p { margin: 0; }
.sem-proverb .sem-proverb__src { font-family: var(--sem-display); font-size: 1.375rem; line-height: 1.3; }
.sem-proverb .sem-proverb__en { margin-top: var(--space-2); color: var(--text-muted-on-light); }

.sem-sources { margin: 0; padding-left: 1.25em; font-size: 0.9375rem; line-height: 1.55; }
.sem-sources li + li { margin-top: var(--space-2); }
.sem-sources a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

.sem-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }

.sem-download { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

.sem-statement {
  margin-top: var(--space-16);
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--beige-shade-1);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted-on-light);
}

.sem-statement p { margin: 0; max-width: 80ch; }

@media (prefers-reduced-motion: reduce) {
  .sem-stage__panel,
  .sem-stage__panel.is-active,
  .sem-card { transition: none; }
  a.sem-card:hover { transform: none; }
}

/* ---------- Entry extras (12 launch entries) ---------- */
a.sem-pair__mark { color: inherit; text-decoration: none; border-radius: var(--radius-card); padding: var(--space-2); transition: background-color var(--dur-base) var(--ease); }
a.sem-pair__mark:hover { background: var(--beige-shade-1); }
a.sem-pair__mark:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }

.sem-nodeview .construct__guides line { stroke-width: var(--sw); }
.sem-nodeview .construct__diag line,
.sem-nodeview .construct__diag circle { stroke-width: var(--sw); stroke-dasharray: calc(var(--sw) * 4) calc(var(--sw) * 6); }
.sem-nodeview .construct__line { stroke-width: calc(var(--sw) * 1.25); }
.sem-nodeview .sem-handles line { stroke: rgba(30, 30, 30, 0.28); stroke-width: calc(var(--sw) * 0.8); }
.sem-nodeview .construct__nodes circle { stroke-width: calc(var(--sw) * 1.1); }

.sem-note {
  margin: calc(var(--space-4) * -1) 0 var(--space-8);
  font-size: 0.9375rem;
  color: var(--text-muted-on-light);
}

.sem-pairlink {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--beige-tint);
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  border-radius: var(--radius-card);
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease);
}
.sem-pairlink:hover { box-shadow: var(--shadow-card-hover); }
.sem-pairlink img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.sem-pairlink > span { display: flex; flex-direction: column; gap: 2px; }
.sem-pairlink .sem-name { font-size: 1.5rem; }
.sem-pairlink .sem-muted { font-size: 0.9375rem; }

.sem-prevnext {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid var(--hairline-on-light);
}
.sem-pn { display: flex; flex-direction: column; gap: var(--space-1); min-height: 44px; color: inherit; text-decoration: none; }
.sem-pn:last-child { text-align: right; }
.sem-pn .sem-name { font-size: 1.5rem; }
.sem-pn:hover .sem-name { text-decoration: underline; text-underline-offset: 0.15em; }

/* Footer sign-off stays GC Gatuzo on archive pages too (Nick, 2026-11-16:
   the footer carries the brand). */

/* =====================================================================
   v2 (Nick, 2026-11-16): a reading archive for everyone, not a design
   tool. Story-page ember gradient on the top band only; stronger contrast;
   the download is the one designer-facing box.
   ===================================================================== */

/* ---------- Ember top band (hub + entries) ---------- */
.sem-band.ember {
  --glow-x: 80%;
  --glow-y: 122%;
  --glow-w: 30vmax;
  --glow-h: 22vmax;
  padding: var(--space-12) 0 var(--space-16);
}

.sem-band .sem-crumbs ol { color: rgba(245, 242, 238, 0.72); }
.sem-band .sem-crumbs a:hover { color: var(--beige); }
.sem-band .sem-eyebrow { color: rgba(245, 242, 238, 0.74); }
.sem-band h1 { color: var(--beige); }
.sem-band .sem-lede { color: rgba(245, 242, 238, 0.9); }
.sem-band .sem-proto-note { background: rgba(245, 242, 238, 0.1); box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.18); color: rgba(245, 242, 238, 0.8); }
.sem-band .sem-stats { color: rgba(245, 242, 238, 0.74); }
.sem-band .sem-stats strong { color: var(--beige); }

.sem-band__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 900px) {
  .sem-band__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: var(--space-12); }
}

.sem-band__art {
  position: relative;
  width: min(100%, 520px);
  justify-self: center;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.sem-band__art .construct { width: 100%; overflow: hidden; }

.sem-band__mark {
  width: 72%;
  aspect-ratio: 1;
  background: var(--beige);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}

.sem-band__cap {
  margin-top: var(--space-4);
  text-align: center;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--beige);
}

.sem-band__text h1 { margin: var(--space-3) 0 var(--space-3); font-size: clamp(3rem, 2rem + 4vw, 5.5rem); }

.sem-band__literal {
  font-family: var(--sem-display);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  line-height: 1.25;
  color: rgba(245, 242, 238, 0.92);
  margin: 0 0 var(--space-6);
}

.sem-band .sem-say { color: rgba(245, 242, 238, 0.78); margin-bottom: var(--space-4); }
.sem-band .sem-say__btn { background: rgba(245, 242, 238, 0.12); box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.24); color: var(--beige); }

.sem-respect {
  display: inline-flex;
  gap: var(--space-2);
  align-items: baseline;
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(245, 242, 238, 0.85);
}

/* Phones: the art comes first, the glow sits behind it at the top, and
   the text runs below on the dark side. */
@media (max-width: 899px) {
  /* Text first (the answer leads); the glow sits low, behind the symbol,
     never behind the name or the reading text. */
  .sem-band.ember { --glow-x: 50%; --glow-y: 118%; --glow-w: 60vmax; --glow-h: 24vmax; padding-top: var(--space-8); }
  .sem-band__art { width: min(100%, 340px); }
}

/* Soft ember (Nick: "let the gradient be very soft"): the same palette
   mixes as .ember, with the white core and orange glow turned well down. */
.sem-band.ember {
  background:
    radial-gradient(var(--glow-w) var(--glow-h) at var(--glow-x) var(--glow-y),
      rgba(250, 248, 246, 0.2) 0%,
      rgba(245, 242, 238, 0.07) 34%,
      rgba(245, 242, 238, 0) 70%),
    radial-gradient(calc(var(--glow-w) * 2.1) calc(var(--glow-h) * 2.3) at var(--glow-x) var(--glow-y),
      rgba(224, 69, 20, 0.5) 0%,
      rgba(224, 69, 20, 0.3) 28%,
      rgba(134, 41, 12, 0.18) 55%,
      rgba(134, 41, 12, 0) 80%),
    linear-gradient(168deg,
      var(--black) 0%,
      var(--ember-1) 40%,
      var(--ember-2) 75%,
      var(--ember-2) 100%);
}

/* ---------- Reading column ---------- */
.sem-article {
  max-width: 720px;
  padding-top: var(--space-16);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
  color: var(--text-on-light);
}

.sem-article > * + * { margin-top: var(--space-12); }
.sem-article p { max-width: none; }
.sem-article h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); margin: var(--space-2) 0 var(--space-4); }

.sem-intro { font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem); line-height: 1.6; }
.sem-intro p + p { margin-top: var(--space-4); }

.sem-article .sem-dl { gap: var(--space-3) var(--space-8); }

/* Proverb: big, original language first. No box, no side border. */
.sem-saying { margin: 0; }
.sem-saying__src {
  font-family: var(--sem-display);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  line-height: 1.2;
  margin: 0;
}
.sem-saying__src::before { content: "“"; color: var(--orange); margin-right: 0.05em; }
.sem-saying__src::after { content: "”"; color: var(--orange); }
.sem-saying__en { margin: var(--space-3) 0 0; color: var(--text-muted-on-light); font-size: 1.125rem; }

/* Pair card */
.sem-article .sem-pairlink { padding: var(--space-6); background: var(--beige-tint); box-shadow: 0 1px 0 var(--hairline-on-light), inset 0 0 0 1px var(--hairline-on-light); }
.sem-article .sem-pairlink img { width: 96px; height: 96px; }
.sem-article .sem-pairlink .sem-name { font-size: 1.75rem; }

/* For designers: the one designer-facing box, dark for contrast. */
.sem-designers {
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
}
.sem-designers .sem-eyebrow { color: rgba(245, 242, 238, 0.7); }
.sem-designers h2 { color: var(--beige); }
.sem-designers p { color: rgba(245, 242, 238, 0.82); font-size: 1rem; line-height: 1.6; }
.sem-designers p a { color: var(--beige); }
.sem-designers .sem-download { margin-top: var(--space-6); }
.sem-designers .sem-download .sem-muted { color: rgba(245, 242, 238, 0.7); }

/* Sources: small, folded away for readers who want them. */
.sem-srcbox summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--meta);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted-on-light);
}
.sem-srcbox .sem-sources { margin-top: var(--space-2); font-size: 0.9375rem; }

/* ---------- Less wash on the hub ---------- */
.sem-hub-body { padding-top: var(--space-16); }
.sem-pair { background: var(--beige-tint); box-shadow: 0 1px 0 var(--hairline-on-light), inset 0 0 0 1px var(--hairline-on-light); }
.sem-pair__mark img { width: min(100%, 132px); }
.sem-pair__mark span { font-size: 0.9375rem; font-weight: 500; }
.sem-pair p { color: var(--text-on-light); opacity: 0.78; }
.sem-card { background: var(--beige-tint); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-card--researching .sem-card__mark img { opacity: 1; }
.sem-card__name { font-size: 1.1875rem; }
.sem-tag { background: transparent; padding-left: 0; }
.sem-tag--complete { background: transparent; color: var(--text-on-light); }
.sem-tag--complete::before { background: var(--orange); border-color: var(--orange); }
.sem-muted { color: var(--text-muted-on-light); }
.sem-search input { background: var(--beige-tint); }

/* ---------- Arrival: the construction draws in, then the mark ----------
   Opacity only (site motion rule), each step <= 600ms, no bounce.
   Guides, then circles, then the curve, then the nodes; the solid mark
   fades in on top and the construction settles back to a faint layer. */
@keyframes semIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes semDim { from { opacity: 1; } to { opacity: 0.22; } }

.sem-band .construct__guides { animation: semIn 600ms var(--ease) 150ms both, semDim 600ms var(--ease) 2300ms forwards; }
.sem-band .construct__diag { animation: semIn 600ms var(--ease) 500ms both, semDim 600ms var(--ease) 2300ms forwards; }
.sem-band .construct__fill,
.sem-band .construct__line { animation: semIn 600ms var(--ease) 900ms both, semDim 600ms var(--ease) 2300ms forwards; }
.sem-band .construct__nodes,
.sem-band .construct__anchors,
.sem-band .construct__handles,
.sem-band .construct__bez,
.sem-band .construct__ctrl,
.sem-band .sem-handles { animation: semIn 500ms var(--ease) 1350ms both, semDim 600ms var(--ease) 2300ms forwards; }
.sem-band .sem-solid { fill: var(--beige); animation: semIn 600ms var(--ease) 2100ms both; }

/* Node view on the dark band: beige hairlines like the Story page. */
.sem-band .sem-nodeview .construct__guides line { stroke: rgba(245, 242, 238, 0.14); }
.sem-band .sem-nodeview .construct__diag line,
.sem-band .sem-nodeview .construct__diag circle { stroke: rgba(245, 242, 238, 0.22); }
.sem-band .sem-nodeview .sem-handles line { stroke: rgba(245, 242, 238, 0.3); }
.sem-band .sem-nodeview .construct__nodes circle { fill: var(--beige); stroke: none; }

@media (prefers-reduced-motion: reduce) {
  .sem-band .construct__guides,
  .sem-band .construct__diag,
  .sem-band .construct__fill,
  .sem-band .construct__line,
  .sem-band .construct__nodes,
  .sem-band .construct__anchors,
  .sem-band .construct__handles,
  .sem-band .construct__bez,
  .sem-band .construct__ctrl,
  .sem-band .sem-handles { animation: none; opacity: 0.22; }
  .sem-band .sem-solid { animation: none; opacity: 1; }
}

/* =====================================================================
   v3 hub design pass (Nick, 2026-11-16): clear section heads, hero CTAs,
   "Symbols by Meaning", a dark filter bar, richer cards.
   ===================================================================== */

.sem-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); margin-top: var(--space-8); }
.sem-textlink { color: var(--beige); text-decoration: underline; text-underline-offset: 0.25em; min-height: 44px; display: inline-flex; align-items: center; }
.sem-textlink:hover { text-decoration-thickness: 2px; }

.sem-sechead { max-width: 720px; margin-bottom: var(--space-8); }
.sem-sechead h2 { margin: var(--space-2) 0 var(--space-3); }
.sem-sechead p:not(.sem-eyebrow) { margin: 0; font-size: 1.125rem; line-height: 1.6; color: var(--text-on-light); opacity: 0.82; }

.sem-hub-body > section + section { padding-top: var(--space-24); }
.sem-browse { padding-top: var(--space-24); padding-bottom: var(--space-8); }

/* ---------- Symbols by meaning: dark tiles ---------- */
.sem-meaning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sem-meaning {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 120px;
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.sem-meaning .sem-name { font-size: 1.5rem; line-height: 1.1; }
.sem-meaning .sem-muted { color: rgba(245, 242, 238, 0.72); font-size: 0.875rem; }
.sem-meaning:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.sem-meaning:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Filter bar: dark, sticky on wide screens ---------- */
.sem-filterbar {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
  scroll-margin-top: 110px;
}

@media (min-width: 1024px) {
  .sem-filterbar { position: sticky; top: 104px; z-index: 5; box-shadow: 0 12px 32px -18px rgba(26, 26, 27, 0.55); }
}

.sem-filterbar__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }

.sem-filterbar .sem-search { position: relative; flex: 1 1 280px; max-width: 460px; }
.sem-search__icon { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: rgba(245, 242, 238, 0.7); pointer-events: none; }
.sem-filterbar .sem-search input {
  padding-left: 46px;
  background: rgba(245, 242, 238, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.2);
  color: var(--beige);
}
.sem-filterbar .sem-search input::placeholder { color: rgba(245, 242, 238, 0.66); }
.sem-filterbar .sem-search input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.sem-filterbar .sem-count { margin: 0; color: rgba(245, 242, 238, 0.78); font-size: 0.9375rem; }

.sem-clear {
  min-height: 44px;
  margin-left: auto;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--beige);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.sem-clear:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.sem-filterbar__row { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.sem-filterbar__label {
  flex: none;
  width: 72px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 242, 238, 0.7);
}

/* Chips scroll sideways on small screens instead of wrapping into a wall. */
.sem-chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  margin: -2px;
}
.sem-chips::-webkit-scrollbar { display: none; }

.sem-chip {
  flex: none;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(245, 242, 238, 0.08);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.16);
  color: rgba(245, 242, 238, 0.88);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.sem-chip:hover { background: rgba(245, 242, 238, 0.16); }
.sem-chip.is-active { background: var(--beige); color: var(--charcoal); box-shadow: none; }
.sem-chip:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

@media (max-width: 767px) {
  .sem-filterbar { padding: var(--space-4); }
  .sem-filterbar__row { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .sem-filterbar__label { width: auto; }
  .sem-chip { min-height: 44px; }
}

/* ---------- Cards: name, people, a one-line meaning ---------- */
.sem-grid { margin-top: var(--space-8); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.sem-card { gap: var(--space-4); padding: var(--space-6); }
.sem-card__mark { background: var(--beige); border-radius: calc(var(--radius-card) * 0.6); }
.sem-card__mark img { width: 58%; height: 58%; }
.sem-card__body { display: flex; flex-direction: column; gap: 4px; }
.sem-card__name { font-size: 1.375rem; }
.sem-card__meaning { font-size: 0.9375rem; line-height: 1.45; color: var(--text-on-light); opacity: 0.8; }
.sem-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: auto; }
.sem-card__go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--text-on-light); }
.sem-card__go .icon { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease); }
a.sem-card:hover .sem-card__go .icon { transform: translateX(3px); }

.sem-empty { padding: var(--space-12) 0; text-align: left; font-size: 1.125rem; }

@media (prefers-reduced-motion: reduce) {
  .sem-meaning, .sem-meaning:hover, a.sem-card:hover .sem-card__go .icon { transition: none; transform: none; }
}
@media (min-width: 1024px) { .sem-chips { flex-wrap: wrap; overflow: visible; } }
.sem-meaning-grid { grid-auto-rows: 1fr; }
.sem-meaning { position: relative; overflow: hidden; min-height: 132px; }
.sem-meaning .sem-name, .sem-meaning .sem-muted { position: relative; z-index: 1; max-width: 70%; }
.sem-meaning__mark {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 96px;
  height: 96px;
  background: var(--beige);
  opacity: 0.16;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
  transition: opacity var(--dur-base) var(--ease);
}
.sem-meaning:hover .sem-meaning__mark { opacity: 0.32; }
.sem-meaning { height: 100%; }
.sem-meaning__mark { display: block; }

/* =====================================================================
   v4 UX pass (Nick, 2026-11-16): hero search, "Show more", share,
   "More symbols for…", tighter phone bands.
   ===================================================================== */

/* Hero search */
.sem-herosearch { position: relative; display: flex; max-width: 520px; margin-top: var(--space-8); }
.sem-herosearch .sem-search__icon { color: rgba(245, 242, 238, 0.7); }
.sem-herosearch input {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  padding: 0 120px 0 48px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(245, 242, 238, 0.1);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.26);
  color: var(--beige);
  font: inherit;
  font-size: 1.0625rem;
}
.sem-herosearch input::placeholder { color: rgba(245, 242, 238, 0.7); }
.sem-herosearch input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sem-herosearch__go {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--beige);
  color: var(--charcoal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sem-herosearch__go:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.sem-quick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: var(--space-4) 0 0; font-size: 0.9375rem; color: rgba(245, 242, 238, 0.78); }
.sem-quick a { display: inline-flex; align-items: center; min-height: 44px; color: var(--beige); text-decoration: underline; text-underline-offset: 0.25em; }
.sem-band .sem-ctas { margin-top: var(--space-6); }

/* Show more */
.sem-more { display: flex; justify-content: center; margin-top: var(--space-8); }
.sem-more [hidden] { display: none; }

/* Share */
.sem-share__row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.sem-share__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--charcoal);
  color: var(--beige);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.sem-share__btn:hover { background: var(--black); }
.sem-share__btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* More symbols for… */
.sem-related-more { padding-top: var(--space-24); }
.sem-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.sem-textlink--dark { color: var(--text-on-light); }
.sem-related-more > p:last-child { margin-top: var(--space-6); }

/* Phones: a shorter band, so reading starts on the first screen. */
@media (max-width: 899px) {
  .sem-band.ember { padding-bottom: var(--space-12); }
  .sem-band__figure { order: -1; }
  .sem-band__art { width: min(62vw, 240px); }
  .sem-band__cap { margin-top: var(--space-2); font-size: 0.875rem; }
  .sem-band__grid { gap: var(--space-4); }
  .sem-band.ember { --glow-x: 50%; --glow-y: 24%; --glow-w: 40vmax; --glow-h: 16vmax; }
  .sem-band__text h1 { font-size: clamp(2.5rem, 1.6rem + 6vw, 3.5rem); }
}

/* ---------- Floating 3D symbols (hub band only) ----------
   Scoped motion exception (Nick, 2026-11-16): continuous float + 360°
   turn, transform/opacity only, no bounce. Static under reduced motion.
   Four symbols sit in the corners of the art box, clear of all text. */
.sem-floats { position: absolute; inset: 0; pointer-events: none; perspective: 900px; }

.sem-3d {
  position: absolute;
  width: clamp(56px, 7.5vw, 104px);
  aspect-ratio: 1;
  opacity: 0;
  transform: translateY(40px);
  animation: sem3dIn 600ms var(--ease) var(--enter) forwards;
}
.sem-3d--1 { left: -6%; top: 2%; }
.sem-3d--2 { right: -6%; top: 8%; }
.sem-3d--3 { left: 0%; bottom: 10%; }
.sem-3d--4 { right: -2%; bottom: 4%; }

@keyframes sem3dIn { to { opacity: 1; transform: translateY(0); } }

.sem-3d__float { width: 100%; height: 100%; transform-style: preserve-3d; animation: sem3dFloat var(--float) ease-in-out calc(var(--enter) + 600ms) infinite alternate; }
@keyframes sem3dFloat { from { transform: translateY(0); } to { transform: translateY(-12px); } }

.sem-3d__spin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-12deg) rotateY(-24deg);
  animation: sem3dSpin var(--spin) linear calc(var(--enter) + 300ms) infinite;
  animation-direction: normal;
}
.sem-3d--2 .sem-3d__spin, .sem-3d--4 .sem-3d__spin { animation-direction: reverse; }
@keyframes sem3dSpin { from { transform: rotateX(-12deg) rotateY(0deg); } to { transform: rotateX(-12deg) rotateY(360deg); } }

.sem-3d__layer,
.sem-3d__face {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
/* Depth: thin slices pushed back, darker toward the back (the side wall). */
.sem-3d__layer { background: var(--shade); transform: translateZ(calc(var(--z) * -1.1px)); }

/* Front face: beige, lit from the upper right like a low sun. */
.sem-3d__face {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--beige-tint) 0%, var(--beige) 45%, var(--beige-shade-2) 100%);
  transform: translateZ(0.5px);
}
/* The sheen sweeps across the face once per turn, so the light seems to
   catch the surface as it faces the sun. */
.sem-3d__face span {
  position: absolute;
  inset: -40% -120%;
  background: linear-gradient(105deg, rgba(250, 248, 246, 0) 40%, rgba(250, 248, 246, 0.95) 50%, rgba(250, 248, 246, 0) 60%);
  animation: sem3dSheen var(--spin) linear calc(var(--enter) + 300ms) infinite;
  mix-blend-mode: screen;
}
@keyframes sem3dSheen { from { transform: translateX(-35%); } to { transform: translateX(35%); } }

/* Soft sun glow under each piece. */
.sem-3d::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -18%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 69, 20, 0.35), rgba(224, 69, 20, 0));
  transform: translateZ(-40px);
}

@media (max-width: 899px) {
  .sem-3d { width: clamp(44px, 13vw, 64px); }
  .sem-3d--1 { left: -22%; top: 0; }
  .sem-3d--2 { right: -22%; top: 10%; }
  .sem-3d--3 { left: -18%; bottom: 6%; }
  .sem-3d--4 { right: -18%; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sem-3d { animation: none; opacity: 1; transform: none; }
  .sem-3d__float, .sem-3d__spin, .sem-3d__face span { animation: none; }
}

/* Prototype note: darker backing so it clears AA over the glow. */
.sem-band .sem-proto-note { background: rgba(26, 26, 27, 0.6); }

/* ---------- "Read it alongside": the pair in conversation ----------
   Two extruded marks (static CSS 3D) turned toward each other on a dark
   card, the shared idea on a thread between them. Hover: they turn a
   little further toward each other (transform only). */
.sem-duo__card {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
  text-decoration: none;
  box-shadow: 0 18px 40px -24px rgba(26, 26, 27, 0.6);
}
@media (min-width: 640px) { .sem-duo__card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; } }

.sem-duo__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 150px;
  perspective: 700px;
}
/* The thread joining them. */
.sem-duo__stage::before {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  top: 50%;
  border-top: 1px dashed rgba(245, 242, 238, 0.32);
}
.sem-duo__idea {
  position: relative;
  z-index: 1;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--charcoal);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.24);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: rgba(245, 242, 238, 0.86);
  text-align: center;
}

.sem-3d--static { position: relative; width: clamp(84px, 22vw, 118px); opacity: 1; transform: none; animation: none; flex: none; }
.sem-3d--static .sem-3d__float { animation: none; }
.sem-3d--static .sem-3d__spin { animation: none; transition: transform 500ms var(--ease); }
.sem-3d--static .sem-3d__face span { animation: none; transform: translateX(-12%); }
.sem-3d--left .sem-3d__spin { transform: rotateX(-6deg) rotateY(28deg); }
.sem-3d--right .sem-3d__spin { transform: rotateX(-6deg) rotateY(-28deg); }
.sem-3d--right .sem-3d__face span { transform: translateX(12%); }
.sem-duo__card:hover .sem-3d--left .sem-3d__spin { transform: rotateX(-6deg) rotateY(36deg); }
.sem-duo__card:hover .sem-3d--right .sem-3d__spin { transform: rotateX(-6deg) rotateY(-36deg); }
.sem-3d--static::after { bottom: -14%; }

.sem-duo__text { display: flex; flex-direction: column; gap: var(--space-2); }
.sem-duo__from { font-size: var(--meta); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245, 242, 238, 0.72); }
.sem-duo__text .sem-name { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.1; color: var(--beige); }
.sem-duo__line { font-size: 1rem; line-height: 1.55; color: rgba(245, 242, 238, 0.84); }
.sem-duo__go { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--space-2); font-weight: 500; color: var(--beige); text-decoration: underline; text-underline-offset: 0.25em; }
.sem-duo__card:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .sem-3d--static .sem-3d__spin { transition: none; } }
.sem-3d--static, .sem-3d--static .sem-3d__float, .sem-3d--static .sem-3d__spin { display: block; }
.sem-3d--static .sem-3d__layer { display: block; }
.sem-duo__idea { max-width: 40%; line-height: 1.35; }

/* Phones (Nick, iPhone 440 × 956): the symbol reads big, the glow sits
   behind it rather than behind the breadcrumbs. */
@media (max-width: 899px) {
  .sem-band__art { width: min(84vw, 360px); }
  .sem-band.ember { --glow-x: 50%; --glow-y: 36%; --glow-w: 44vmax; --glow-h: 20vmax; }
  .sem-band .sem-crumbs { margin-bottom: var(--space-4); }
}

/* ---------- 3D rendering pass (Nick: soft gradients, smooth, real) ----------
   Light: a low, warm sun from the upper right. Every colour is a site
   token (beige tints/shades, a touch of --orange-tint where light lands). */

/* Side wall: 22 thin slices (0.6px apart) so the edge reads as one solid
   surface, shading from lit (front) to deep (back). */
.sem-3d__layer {
  transform: translateZ(calc(var(--z) * -0.6px));
  background: linear-gradient(135deg, var(--beige-shade-1) 0%, var(--beige-shade-2) 55%, var(--beige-shade-3) 100%);
  filter: brightness(calc(1.02 - var(--t) * 0.22));
}
.sem-3d--static .sem-3d__layer { transform: translateZ(calc(var(--z) * -0.7px)); }

/* Front face: soft gradient, warm where the sun hits, cooler in shade. */
.sem-3d__face {
  background:
    radial-gradient(120% 90% at 85% 10%, var(--orange-tint) 0%, rgba(250, 248, 246, 0) 45%),
    linear-gradient(150deg, var(--beige-tint) 0%, var(--beige) 38%, var(--beige-shade-1) 72%, var(--beige-shade-2) 100%);
  backface-visibility: hidden;
}

/* Back face: the side turned away from the sun, in deeper shade. */
.sem-3d__back {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
  background: linear-gradient(150deg, var(--beige-shade-2) 0%, var(--beige-shade-3) 100%);
  transform: translateZ(-13.6px) rotateY(180deg);
  backface-visibility: hidden;
}
.sem-3d--static .sem-3d__back { transform: translateZ(-13px) rotateY(180deg); }

/* Bevel: a soft highlight just inside the front edge, so corners read as
   rounded rather than cut. A slightly blurred, lighter copy of the face,
   pulled a hair forward. */
.sem-3d__bevel {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
  background: linear-gradient(150deg, rgba(250, 248, 246, 0.9) 0%, rgba(250, 248, 246, 0) 55%);
  opacity: 0.55;
  filter: blur(0.6px);
  transform: translateZ(0.8px) scale(0.985);
  backface-visibility: hidden;
}

/* Specular sweep: softer and warmer. */
.sem-3d__face span {
  background: linear-gradient(105deg, rgba(250, 248, 246, 0) 38%, rgba(250, 248, 246, 0.7) 50%, rgba(250, 248, 246, 0) 62%);
  mix-blend-mode: soft-light;
}

/* Contact shadow: wider and softer, warm from the band's glow. */
.sem-3d::after {
  left: 8%;
  right: 8%;
  bottom: -22%;
  height: 20%;
  background: radial-gradient(closest-side, rgba(26, 26, 27, 0.55), rgba(26, 26, 27, 0));
}
.sem-duo .sem-3d::after { background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); }

/* ---------- Downloads: SVG + 3D (GLB, STL, USDZ) ---------- */
.sem-dl3d { display: grid; gap: var(--space-6); margin: var(--space-6) 0; }
@media (min-width: 640px) { .sem-dl3d { grid-template-columns: 200px minmax(0, 1fr); align-items: center; } }
.sem-dl3d__render img { width: 100%; height: auto; border-radius: calc(var(--radius-card) * 0.6); background: radial-gradient(closest-side, rgba(224, 69, 20, 0.28), rgba(224, 69, 20, 0) 75%), var(--black); }

.sem-files { display: grid; gap: var(--space-2); margin: var(--space-6) 0; padding: 0; list-style: none; }
.sem-dl3d .sem-files { margin: 0; }
.sem-file {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  border-radius: calc(var(--radius-card) * 0.5);
  background: rgba(245, 242, 238, 0.06);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.16);
  color: var(--beige);
  text-decoration: none;
  transition: background-color var(--dur-base) var(--ease);
}
.sem-file:hover { background: rgba(245, 242, 238, 0.12); }
.sem-file:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sem-file__type { justify-self: start; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--beige); color: var(--charcoal); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; }
.sem-file__use { font-size: 0.9375rem; line-height: 1.4; color: rgba(245, 242, 238, 0.9); }
.sem-file__size { font-size: 0.8125rem; color: rgba(245, 242, 238, 0.72); white-space: nowrap; }
.sem-muted3d { font-size: 0.9375rem; color: rgba(245, 242, 238, 0.72); margin-top: 0; }

/* =====================================================================
   Spec 27 (2026-11-16): country layer, cloth wall, rail, letters,
   proverb, progress, latest, cite, print.
   ===================================================================== */

/* Letters: African Latin letters in the entry name, orange accent. */
.sem-letter { color: var(--orange); }
.sem-band .sem-letter { color: var(--mesh-orange-core, var(--orange)); }
.sem-letters-link { flex-basis: 100%; font-size: 0.9375rem; color: var(--beige); text-decoration: underline; text-underline-offset: 0.25em; min-height: 44px; display: inline-flex; align-items: center; }

/* Proverb: one large opening mark, source line. */
.sem-saying__src::after { content: none; }
.sem-saying__src::before { content: "“"; display: block; font-size: 1.6em; line-height: 0.6; margin: 0 0 0.1em -0.04em; color: var(--orange); }
.sem-saying__src-line { margin: var(--space-3) 0 0; font-size: 0.875rem; color: var(--text-muted-on-light); }
.sem-article > section.reveal:has(.sem-saying) { padding: var(--space-8) 0; }

/* Progress line: one tick per symbol. */
.sem-progress { margin-top: var(--space-4); max-width: 640px; }
.sem-progress svg { display: block; width: 100%; height: 14px; }
.sem-progress rect { fill: rgba(245, 242, 238, 0.25); }
.sem-progress rect.is-ready { fill: var(--orange); }
.sem-progress p { margin: var(--space-2) 0 0; font-size: 0.8125rem; color: rgba(245, 242, 238, 0.78); }

/* Latest symbol */
.sem-latest-wrap { padding-top: 0; }
.sem-latest {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
  text-decoration: none;
}
.sem-latest img { width: 96px; height: 96px; object-fit: contain; filter: invert(1) sepia(0.15) brightness(0.96); }
.sem-latest__body { display: flex; flex-direction: column; gap: 4px; }
.sem-latest .sem-eyebrow { color: rgba(245, 242, 238, 0.72); }
.sem-latest .sem-name { font-size: 1.75rem; }
.sem-latest__line { color: rgba(245, 242, 238, 0.84); }
.sem-latest__go { display: inline-flex; align-items: center; gap: 8px; text-decoration: underline; text-underline-offset: 0.25em; font-weight: 500; }
@media (max-width: 639px) { .sem-latest { grid-template-columns: 72px minmax(0, 1fr); } .sem-latest img { width: 72px; height: 72px; } .sem-latest__go { grid-column: 1 / -1; } }

/* Cloth wall: every mark from one sprite, ruled like stamped cloth. */
.sem-cloth { padding-top: var(--space-24); }
.sem-cloth__frame { padding: var(--space-4); border-radius: var(--radius-card); background: var(--beige-tint); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-cloth__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hairline-on-light); border-left: 1px solid var(--hairline-on-light); }
.sem-cloth__grid li { border-right: 1px solid var(--hairline-on-light); border-bottom: 1px solid var(--hairline-on-light); }
.sem-cloth__grid li[hidden] { display: none; }
.sem-cloth__cell {
  display: block;
  aspect-ratio: 1;
  background-image: var(--sprite);
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  background-position: calc(var(--x) * 100% / (var(--cols) - 1)) calc(var(--y) * 100% / (var(--rows) - 1));
  background-repeat: no-repeat;
  transition: background-color var(--dur-fast) var(--ease);
}
.sem-cloth__cell.is-research { opacity: 0.4; }
.sem-cloth__cell:hover, .sem-cloth__cell:focus-visible { background-color: var(--beige-shade-1); opacity: 1; outline: none; }
.sem-cloth__cell:focus-visible { box-shadow: inset 0 0 0 2px var(--charcoal); }
.sem-cloth__cap { margin: var(--space-4) 0 0; min-height: 1.6em; font-size: 0.9375rem; color: var(--text-on-light); }
@media (max-width: 1023px) { .sem-cloth__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 599px) { .sem-cloth__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .sem-cloth__cap { position: sticky; bottom: 0; padding: var(--space-2) 0; background: var(--beige-tint); } }
@media (max-width: 400px) { .sem-cloth__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Next on the journey */
.sem-next { margin: var(--space-4) 0 0; font-size: 0.9375rem; color: var(--text-muted-on-light); }
.sem-next a { color: var(--text-on-light); text-decoration: underline; text-underline-offset: 0.2em; }

/* Ghana page: people cards */
.sem-peoples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.sem-people { display: flex; flex-direction: column; gap: var(--space-2); height: 100%; padding: var(--space-8); border-radius: var(--radius-card); background: var(--charcoal); color: var(--beige); text-decoration: none; }
.sem-people .sem-eyebrow { color: rgba(245, 242, 238, 0.72); }
.sem-people .sem-name { font-size: 2.25rem; }
.sem-people__meta { color: rgba(245, 242, 238, 0.82); font-size: 0.9375rem; }
.sem-people__go { margin-top: auto; padding-top: var(--space-4); display: inline-flex; align-items: center; gap: 8px; text-decoration: underline; text-underline-offset: 0.25em; }
.sem-people--soon { background: var(--beige-tint); color: var(--text-on-light); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-people--soon .sem-eyebrow, .sem-people--soon .sem-people__meta { color: var(--text-muted-on-light); }
.sem-people--soon .sem-people__go { text-decoration: none; color: var(--text-muted-on-light); }

/* Entry: reading column + sticky mark rail (desktop) */
.sem-entry-grid { display: block; }
.sem-rail { display: none; }
@media (min-width: 1024px) {
  .sem-entry-grid { display: grid; grid-template-columns: minmax(0, 62ch) minmax(0, 1fr); gap: var(--space-16); align-items: start; }
  .sem-entry-grid .sem-article { max-width: none; }
  .sem-rail { display: block; position: sticky; top: calc(96px + 24px); padding-top: var(--space-16); }
  .sem-rail__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-8); border-radius: var(--radius-card); background: var(--beige-tint); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
  .sem-rail img { width: min(100%, 300px); height: auto; aspect-ratio: 1; object-fit: contain; }
  .sem-rail__name { margin: var(--space-4) 0 0; font-family: var(--sem-display); font-size: 1.75rem; }
  .sem-rail__people { margin: 0; font-size: 0.875rem; color: var(--text-muted-on-light); letter-spacing: 0.04em; }
  .sem-rail__dl { margin-top: var(--space-4); display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-6); border-radius: var(--radius-pill); background: var(--charcoal); color: var(--beige); text-decoration: none; font-weight: 500; }
}

/* Cite + tell us */
.sem-cite { margin-top: var(--space-6); padding: var(--space-4); border-radius: calc(var(--radius-card) * 0.5); background: var(--beige-tint); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-cite__text { margin: var(--space-2) 0 var(--space-3); font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.sem-tell { font-size: 0.9375rem; color: var(--text-muted-on-light); }
.sem-tell a { color: var(--text-on-light); }

/* About: letters */
.sem-letters { display: grid; gap: var(--space-2); margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.sem-letterrow { display: grid; grid-template-columns: 64px 40px minmax(0, 1fr); grid-template-areas: "big cap ex" "big cap sound"; align-items: center; gap: 0 var(--space-4); padding: var(--space-4); border-radius: calc(var(--radius-card) * 0.5); background: var(--beige-tint); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-letterrow__big { grid-area: big; font-family: var(--sem-display); font-size: 3rem; line-height: 1; color: var(--orange); }
.sem-letterrow__cap { grid-area: cap; font-family: var(--sem-display); font-size: 1.75rem; color: var(--text-muted-on-light); }
.sem-letterrow__ex { grid-area: ex; font-family: var(--sem-display); font-size: 1.375rem; }
.sem-letterrow__ex a { color: inherit; }
.sem-letterrow__sound { grid-area: sound; font-size: 0.875rem; }

/* Symbols by meaning: compact on phones (two columns, shorter tiles). */
@media (max-width: 599px) {
  .sem-meaning-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: var(--space-2); }
  .sem-meaning { min-height: 96px; padding: var(--space-4); gap: var(--space-3); }
  .sem-meaning .sem-name { font-size: 1.25rem; }
  .sem-meaning__mark { width: 64px; height: 64px; right: -8px; bottom: -8px; }
}

/* Print: an entry prints as a clean study sheet. */
@media print {
  .nav-wrap, .footer, [data-include], .sem-band, .sem-rail, .sem-share, .sem-designers, .sem-related-more, .sem-prevnext, .sem-proto-note, .sem-duo .sem-duo__stage, .sem-floats, .skip-link { display: none !important; }
  .sem-srcbox { display: block; }
  .sem-srcbox > * { display: block; }
  body, .sem { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .sem-article { max-width: none; padding-top: 0; font-size: 12pt; }
  .sem-duo__card { background: none; color: #000; box-shadow: none; }
  .sem-duo__card * { color: #000 !important; }
}
/* In the entry's reading column (desktop rail layout) the pair card stacks. */
@media (min-width: 1024px) {
  .sem-entry-grid .sem-duo__card { grid-template-columns: 1fr; }
  .sem-entry-grid .sem-duo__stage { max-width: 460px; }
}

/* ---------- Cloth detail sheet ----------
   Phones: a bottom sheet that slides up. 768 and up: a centred card.
   Opacity/transform only; reduced motion shows it at once. */
.sem-cloth__cell { border: 0; padding: 0; width: 100%; background-color: transparent; cursor: pointer; }

.sem-sheet {
  width: 100%;
  max-width: 100%;
  max-height: 92vh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-on-light);
  overflow: visible;
}
.sem-sheet::backdrop { background: rgba(26, 26, 27, 0.55); }
.sem-sheet[open] { animation: semSheetUp 320ms var(--ease) both; }
.sem-sheet[open]::backdrop { animation: semSheetFade 320ms var(--ease) both; }
@keyframes semSheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes semSheetFade { from { opacity: 0; } to { opacity: 1; } }

.sem-sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  max-height: 92vh;
  overflow-y: auto;
  padding: var(--space-8) var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--beige);
  font-family: "Noto Sans", var(--font-body);
}
.sem-sheet__grip { align-self: center; width: 44px; height: 5px; margin: -12px 0 var(--space-2); border-radius: 99px; background: var(--beige-shade-3); }
.sem-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--beige-shade-1);
  color: var(--text-on-light);
  cursor: pointer;
}
.sem-sheet__close svg { width: 18px; height: 18px; }
.sem-sheet__close:focus-visible, .sem-sheet__step:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }

.sem-sheet__mark {
  width: 132px;
  aspect-ratio: 1;
  margin-bottom: var(--space-3);
  background: var(--black);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
.sem-sheet__name { margin: 0; font-family: "Noto Serif", Georgia, serif; font-weight: 600; font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); line-height: 1.05; text-transform: none; }
.sem-sheet__literal { margin: 0; font-family: "Noto Serif", Georgia, serif; font-size: 1.25rem; color: var(--text-on-light); }
.sem-sheet__info { margin: var(--space-2) 0 0; font-size: 1.0625rem; line-height: 1.6; max-width: 52ch; }
.sem-sheet__status { display: inline-flex; align-items: center; gap: 8px; margin: var(--space-2) 0 0; font-size: 0.875rem; color: var(--text-muted-on-light); }
.sem-sheet__status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.sem-sheet__status.is-ready { color: var(--text-on-light); }
.sem-sheet__status.is-ready::before { background: var(--orange); border-color: var(--orange); }
.sem-sheet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-6); }
.sem-sheet__actions [hidden] { display: none; }
.sem-sheet__tell { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-on-light); text-decoration: underline; text-underline-offset: 0.2em; }
.sem-sheet__nav { display: flex; justify-content: space-between; width: 100%; margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--hairline-on-light); }
.sem-sheet__step { min-height: 44px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-on-light); font: inherit; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

@media (min-width: 768px) {
  .sem-sheet { width: min(560px, calc(100% - 48px)); margin: auto; }
  .sem-sheet__panel { border-radius: var(--radius-card); padding: var(--space-12) var(--space-12) var(--space-8); }
  .sem-sheet__grip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sem-sheet[open], .sem-sheet[open]::backdrop { animation: none; }
}

/* =====================================================================
   Spec 28 (2026-11-16): one browser (the cloth), one CTA system, one
   card style, two surfaces. Later rules win over earlier ones.
   ===================================================================== */

/* ---------- CTA system ---------- */
/* Secondary: text link, always with the arrow; 44px tap target. */
.sem-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: "Noto Sans", var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-on-light);
  text-decoration: none;
}
.sem-link > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sem-link .icon { width: 16px; height: 16px; flex: none; transition: transform var(--dur-fast) var(--ease); }
.sem-link:hover .icon { transform: translateX(3px); }
.sem-link--back:hover .icon { transform: scaleX(-1) translateX(3px); }
.sem-link:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; border-radius: 4px; }
.sem-link--small { font-size: 0.875rem; }
.sem-link--inline { min-height: 0; }
.sem-link--ondark, .sem-band .sem-link { color: var(--beige); }
.sem-link--ondark:focus-visible, .sem-band .sem-link:focus-visible { outline-color: var(--beige); }
.sem-flip { transform: scaleX(-1); }

/* Utility: one quiet pill for on-page actions. */
.sem-util {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--hairline-on-light);
  color: var(--text-on-light);
  font: inherit;
  font-family: "Noto Sans", var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.sem-util:hover { background: var(--beige-shade-1); }
.sem-util:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }
.sem-util .icon { width: 16px; height: 16px; }
.sem-util--ondark, .sem-designers .sem-util, .sem-band .sem-util { color: var(--beige); box-shadow: inset 0 0 0 1px rgba(245, 242, 238, 0.32); }
.sem-util--ondark:hover, .sem-designers .sem-util:hover { background: rgba(245, 242, 238, 0.1); }
.sem-herosearch__go { position: absolute; right: 6px; top: 6px; bottom: 6px; min-height: 0; background: transparent; }

/* ---------- Sections: one header pattern, one rhythm ---------- */
.sem-hub-body > .sem-section, .sem-hub-body > .sem-browser { padding-top: var(--space-24); }
@media (max-width: 767px) { .sem-hub-body > .sem-section, .sem-hub-body > .sem-browser { padding-top: var(--space-16); } }
.sem-sechead p:not(.sem-eyebrow) { max-width: 60ch; }

/* ---------- One archive card (pairs, peoples) ---------- */
.sem-pair, .sem-acard {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--beige-shade-1);
  box-shadow: none;
  color: var(--text-on-light);
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.sem-pair:hover, .sem-acard:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.sem-pair:focus-visible, .sem-acard:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }
.sem-pair__mark { padding: 0; }
.sem-pair__mark img { width: min(100%, 120px); }
.sem-pair__idea { font-family: "Noto Serif", Georgia, serif; font-size: 1.375rem; font-weight: 600; line-height: 1.15; }
.sem-pair__line { font-size: 0.9375rem; line-height: 1.5; opacity: 0.82; }
.sem-pair .sem-link { margin-top: auto; }
/* Each symbol links to its own page; the card itself is not a link, so it doesn't lift on hover. */
.sem-pair:hover { box-shadow: 0 1px 0 var(--hairline-on-light), inset 0 0 0 1px var(--hairline-on-light); transform: none; }
a.sem-pair__mark { position: relative; z-index: 1; border-radius: var(--radius-card); transition: transform var(--dur-base) var(--ease); }
a.sem-pair__mark:hover { background: none; transform: scale(1.03); }
a.sem-pair__mark:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 4px; }
.sem-history-line { margin-top: var(--space-8); max-width: 70ch; font-size: 1rem; line-height: 1.6; color: var(--text-muted-on-light); }

.sem-acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.sem-acard .sem-name { font-size: 2rem; }
.sem-acard__meta { font-size: 0.9375rem; color: var(--text-muted-on-light); }
.sem-acard .sem-link { margin-top: auto; }
.sem-acard--soon { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-acard--soon:hover { box-shadow: inset 0 0 0 1px var(--hairline-on-light); transform: none; }
.sem-acard__soon { margin-top: auto; font-size: 0.9375rem; color: var(--text-muted-on-light); }

/* ---------- Filter bar: light now ---------- */
.sem-filterbar { background: var(--beige-shade-1); color: var(--text-on-light); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
@media (min-width: 1024px) { .sem-filterbar { box-shadow: inset 0 0 0 1px var(--hairline-on-light), 0 12px 28px -22px rgba(26, 26, 27, 0.35); } }
.sem-filterbar .sem-search__icon { color: var(--text-muted-on-light); }
.sem-filterbar .sem-search input { background: var(--beige); box-shadow: inset 0 0 0 1px var(--hairline-on-light); color: var(--text-on-light); }
.sem-filterbar .sem-search input::placeholder { color: var(--text-muted-on-light); }
.sem-filterbar .sem-search input:focus-visible { outline-color: var(--charcoal); }
.sem-filterbar__label { color: var(--text-muted-on-light); }
.sem-chip { background: var(--beige); box-shadow: inset 0 0 0 1px var(--hairline-on-light); color: var(--text-on-light); }
.sem-chip:hover { background: var(--beige-tint); }
.sem-chip.is-active { background: var(--black); color: var(--beige); box-shadow: none; }
.sem-chip:focus-visible { outline-color: var(--charcoal); }
.sem-seg { display: inline-flex; gap: 0; padding: 3px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px var(--hairline-on-light); background: var(--beige); }
.sem-seg__btn { box-shadow: none; min-height: 38px; }
.sem-seg__btn.is-active { background: var(--black); color: var(--beige); }
.sem-filterbar__top .sem-util[data-sem-clear] { margin-left: auto; }
.sem-filterbar__top .sem-util[hidden] { display: none; }

/* ---------- Browser meta: count + legend ---------- */
.sem-browser__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2) var(--space-6); margin: var(--space-6) 0 var(--space-4); }
.sem-browser__meta .sem-count { margin: 0; font-size: 1rem; font-weight: 500; color: var(--text-on-light); }
.sem-browser__meta .sem-count:focus { outline: none; }
.sem-legend { margin: 0; font-size: 0.875rem; color: var(--text-muted-on-light); }
.sem-legend__full::before, .sem-legend__faded::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: var(--black); vertical-align: -1px; }
.sem-legend__faded::before { opacity: 0.4; }

/* ---------- Cloth groups ---------- */
.sem-cloth__frame { display: grid; gap: var(--space-8); }
.sem-group[hidden], .sem-listgroup[hidden] { display: none; }
.sem-group__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.sem-group__title { margin: 0; font-family: "Noto Sans", var(--font-body); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-light); }
.sem-cloth__cell.is-nameonly { display: grid; place-items: center; padding: 6px; background-image: none; box-shadow: inset 0 0 0 1px var(--hairline-on-light); font-size: 0.6875rem; line-height: 1.25; color: var(--text-on-light); text-align: center; overflow-wrap: anywhere; }
.sem-cloth__cell.is-nameonly.is-research { opacity: 0.7; }
.sem-cloth__cap { margin: 0; }

/* ---------- List view ---------- */
.sem-listview { display: grid; gap: var(--space-8); }
.sem-listview[hidden], .sem-cloth__frame[hidden] { display: none; }
.sem-list { display: grid; gap: 2px; margin: var(--space-3) 0 0; padding: 0; list-style: none; }
.sem-list li[hidden] { display: none; }
.sem-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 64px;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: calc(var(--radius-card) * 0.4);
  background: var(--beige-shade-1);
  color: var(--text-on-light);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sem-row:hover { background: var(--beige-shade-2); }
.sem-row:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }
.sem-row img, .sem-row__nomark { width: 40px; height: 40px; object-fit: contain; }
.sem-row__nomark { border-radius: 6px; box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-row__text { display: flex; flex-direction: column; min-width: 0; }
.sem-row__name { font-family: "Noto Serif", Georgia, serif; font-size: 1.25rem; line-height: 1.2; }
.sem-row__meta { font-size: 0.875rem; color: var(--text-muted-on-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sem-row__status { font-size: 0.8125rem; color: var(--text-muted-on-light); white-space: nowrap; }
.sem-row__status.is-ready { color: var(--text-on-light); font-weight: 500; }
@media (max-width: 479px) { .sem-row { grid-template-columns: 40px minmax(0, 1fr); } .sem-row__status { grid-column: 2; } }

/* ---------- Empty state ---------- */
.sem-empty { padding: var(--space-12) var(--space-8); border-radius: var(--radius-card); background: var(--beige-shade-1); text-align: left; }
.sem-empty[hidden] { display: none; }
.sem-empty__title { margin: 0 0 var(--space-2); font-family: "Noto Serif", Georgia, serif; font-size: 1.5rem; color: var(--text-on-light); }
.sem-empty p { color: var(--text-on-light); }
.sem-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }
.sem-browser .sem-next { margin-top: var(--space-8); }
.sem-next .sem-link { min-height: 0; }

/* ---------- Short statement line ---------- */
.sem-short-statement { margin-top: var(--space-24); padding-top: var(--space-8); padding-bottom: var(--space-8); border-top: 1px solid var(--hairline-on-light); font-size: 0.9375rem; line-height: 1.6; color: var(--text-muted-on-light); }
.sem-short-statement .sem-link { min-height: 0; font-size: 0.9375rem; }

/* ---------- People pages ---------- */
.sem-changes { margin-top: var(--space-6); font-size: 0.875rem; color: var(--text-muted-on-light); }

/* ---------- Entries: merges ---------- */
.sem-band .sem-say + .sem-link { margin-top: calc(var(--space-2) * -1); }
.sem-designers__primary { margin: var(--space-2) 0 var(--space-2); }
.sem-file { grid-template-columns: 64px minmax(0, 1fr) auto auto; }
.sem-file__dl { font-size: 0.875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 479px) { .sem-file { grid-template-columns: 56px minmax(0, 1fr) auto; } .sem-file__size { display: none; } }
.sem-srcbox .sem-share { margin-top: var(--space-6); }
.sem-srcbox .sem-share__row { margin-top: var(--space-2); }
.sem-srcbox .sem-tell { margin-top: var(--space-4); }
.sem-tell .sem-link { min-height: 0; }
.sem-cite .sem-util { margin-top: var(--space-2); }
.sem-prevnext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--hairline-on-light); }
.sem-related-more > p .sem-link { min-height: 0; }
.sem-duo__go.sem-link { color: var(--beige); }
.sem-rail .sem-link { margin-top: var(--space-4); }

/* Sheet: note + source + nav pills */
.sem-sheet__mark[hidden] { display: none; }
.sem-sheet__note { margin: var(--space-2) 0 0; padding: var(--space-3) var(--space-4); border-radius: calc(var(--radius-card) * 0.4); background: var(--beige-shade-1); font-size: 0.9375rem; line-height: 1.5; }
.sem-sheet__source { margin: var(--space-2) 0 0; font-size: 0.8125rem; line-height: 1.5; color: var(--text-muted-on-light); }
.sem-sheet__source a { color: inherit; }
.sem-sheet__note[hidden], .sem-sheet__source[hidden] { display: none; }
.sem-sheet__nav .sem-util { box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-article section > p + p { margin-top: var(--space-4); }
/* Keep exploring: compact rows on phones (mark left, text right). */
@media (max-width: 599px) {
  .sem-grid--three { grid-template-columns: 1fr; gap: var(--space-2); }
  .sem-grid--three .sem-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "mark body" "mark foot"; align-items: center; gap: 4px var(--space-4); padding: var(--space-4); }
  .sem-grid--three .sem-card__mark { grid-area: mark; width: 72px; }
  .sem-grid--three .sem-card__body { grid-area: body; }
  .sem-grid--three .sem-card__foot { grid-area: foot; margin-top: 0; }
  .sem-grid--three .sem-card__name { font-size: 1.25rem; }
}

/* The popup takes focus itself on open, so no ring lands on the CTA after a tap. */
.sem-sheet:focus, .sem-sheet:focus-visible { outline: none; }

/* Drawing credit under the cloth legend (ship, 2026-11-16). */
.sem-credit { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.5; color: inherit; opacity: 0.78; max-width: 62ch; }
.sem-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Tap targets (ship pass, 2026-11-16): every control reaches 44px without moving the layout. */
.sem-quick a { min-width: 44px; justify-content: center; }
.sem-seg__btn { min-height: 44px; }
.sem-link { position: relative; }
.sem-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }

/* ---------- Hub: one landscape card per people, on its page's scene (Nick, 2026-11-17) ---------- */
.sem-pcards { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .sem-pcards { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); } }
.sem-pcard {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--charcoal);
  color: var(--beige);
  text-decoration: none;
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
@media (min-width: 640px) { .sem-pcard { min-height: 0; aspect-ratio: 16 / 10; } }
.sem-pcard__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.sem-pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(26, 26, 27, 0.88) 0%, rgba(26, 26, 27, 0.6) 45%, rgba(26, 26, 27, 0.16) 100%);
}
.sem-pcard:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.sem-pcard:hover .sem-pcard__bg { transform: scale(1.03); }
.sem-pcard:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }
.sem-pcard__body { display: flex; flex-direction: column; width: 100%; padding: max(32px, calc(var(--sq-r, 70px) * 0.5)); }
/* The symbol is the card's key focus, in the same gold gradient and glow as the big symbol on the people pages' scene banners (semiotics-scene.css .scn-sym--big), so visitors recognise it when they arrive */
.sem-pcard__mark {
  display: block; width: clamp(64px, 19%, 108px); aspect-ratio: 1;
  background: linear-gradient(180deg, #ffeccc 0%, #f0b868 60%, #d8742a 100%);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(255, 170, 90, 0.55)) drop-shadow(0 0 40px rgba(224, 69, 20, 0.35));
}
.sem-pcard__name { margin-top: auto; font-family: "Noto Serif", Georgia, serif; font-weight: 600; font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: 1; }
.sem-pcard__meta { margin-top: var(--space-2); font-size: 1.0625rem; color: var(--beige); }
.sem-pcard__cta { align-self: flex-start; margin-top: var(--space-5, 20px); border-color: var(--beige); }
/* Hovering anywhere on the card plays the pill's own hover flip */
.sem-pcard:hover .sem-pcard__cta {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: var(--beige);
  border-color: var(--orange);
  flex-direction: row-reverse;
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-2);
  box-shadow: 0 8px 24px rgba(224, 69, 20, 0.28);
}
.sem-pcards__all { margin: var(--space-6) 0 0; }
@media (prefers-reduced-motion: reduce) { .sem-pcard, .sem-pcard:hover, .sem-pcard__bg, .sem-pcard:hover .sem-pcard__bg { transition: none; transform: none; } }

/* Squircle cards in the archive keep their measured squircle radius
   (this file loads after squircle.css, so card rules above were flattening it to 18px). */
.sem .squircle { border-radius: var(--sq-r, var(--radius-card-frame)); }

/* Ghana page: the coming-next people card, quiet, no image */
.sem-pcard--soon { background: transparent; color: var(--text-on-light); box-shadow: inset 0 0 0 1px var(--hairline-on-light); }
.sem-pcard--soon::before { content: none; }
.sem-pcard--soon:hover { box-shadow: inset 0 0 0 1px var(--hairline-on-light); transform: none; }
.sem-pcard--soon .sem-pcard__meta, .sem-pcard__soon { color: var(--text-muted-on-light); }
.sem-pcard__soon { margin-top: var(--space-5, 20px); font-size: 1rem; }

/* Landing: "Next on the journey" closing card on The Procession (Nick, 2026-11-17) */
.sem-journey__card {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: 520px; overflow: hidden;
  border-radius: var(--sq-r, var(--radius-card-frame));
  color: var(--beige); text-decoration: none; background: var(--charcoal);
  transition: box-shadow var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
@media (min-width: 768px) { .sem-journey__card { min-height: 0; aspect-ratio: 16 / 8; } }
.sem-journey__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transition: transform 600ms var(--ease); }
.sem-journey__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(26, 26, 27, 0.88) 0%, rgba(26, 26, 27, 0.5) 40%, rgba(26, 26, 27, 0.1) 75%); }
.sem-journey__card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.sem-journey__card:hover .sem-journey__bg { transform: scale(1.03); }
.sem-journey__card:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 3px; }
.sem-journey__body { display: flex; flex-direction: column; align-items: flex-start; padding: max(32px, calc(var(--sq-r, 70px) * 0.5)); }
.sem-journey__eyebrow { color: rgba(245, 242, 238, 0.86); }
.sem-journey__title { margin-top: var(--space-3); font-family: "Noto Serif", Georgia, serif; font-weight: 600; font-size: clamp(1.75rem, 5vw, 3rem); line-height: 1.1; }
.sem-journey__cta { margin-top: var(--space-6); border-color: var(--beige); }
.sem-journey__card:hover .sem-journey__cta {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: var(--beige); border-color: var(--orange);
  flex-direction: row-reverse; padding: var(--space-2) var(--space-6) var(--space-2) var(--space-2); box-shadow: 0 8px 24px rgba(224, 69, 20, 0.28);
}
.sem-journey__cap { position: absolute; top: max(20px, calc(var(--sq-r, 70px) * 0.35)); right: max(24px, calc(var(--sq-r, 70px) * 0.5)); font-size: 0.625rem; color: rgba(245, 242, 238, 0.55); }
@media (prefers-reduced-motion: reduce) { .sem-journey__card, .sem-journey__card:hover, .sem-journey__bg, .sem-journey__card:hover .sem-journey__bg { transition: none; transform: none; } }
@media (max-width: 767px) {
  .sem-journey__card { min-height: 600px; }
  .sem-journey__bg { height: 74%; object-position: 50% 78%; }
  .sem-journey__card::before { background: linear-gradient(to top, var(--charcoal) 0%, var(--charcoal) 30%, rgba(30, 30, 30, 0.6) 42%, rgba(30, 30, 30, 0) 62%); }
}
@media (min-width: 768px) { .sem-journey__title { max-width: 14ch; } }

/* ---------- "View in 3D" viewer (Nick, 2026-11-17; js/sem-3d.js) ---------- */
html.sem-viewer3d-open { overflow: hidden; }
.sem-viewer3d {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: radial-gradient(42% 32% at 50% 48%, rgba(224, 69, 20, 0.22) 0%, rgba(224, 69, 20, 0) 100%), radial-gradient(120% 80% at 50% 40%, #2a1d17 0%, var(--charcoal) 60%, var(--black) 100%);
  color: var(--beige);
}
.sem-viewer3d::backdrop { background: rgba(26, 26, 27, 0.6); }
.sem-viewer3d[open] { display: block; animation: semViewer3dIn 320ms var(--ease) both; }
@keyframes semViewer3dIn { from { opacity: 0; } to { opacity: 1; } }
.sem-viewer3d__stage { position: absolute; inset: 0; display: grid; place-items: center; }
.sem-viewer3d__stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.sem-viewer3d__loading { font-size: 1rem; color: rgba(245, 242, 238, 0.8); }
.sem-viewer3d__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: max(20px, env(safe-area-inset-top)) var(--space-6) 0; pointer-events: none; }
.sem-viewer3d__title { margin: 0; font-family: "Noto Serif", Georgia, serif; font-weight: 600; font-size: clamp(1.5rem, 4vw, 2.25rem); }
.sem-viewer3d__close { pointer-events: auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(245, 242, 238, 0.3); background: rgba(245, 242, 238, 0.08); color: var(--beige); cursor: pointer; transition: background-color 220ms var(--ease); }
.sem-viewer3d__close svg { width: 22px; height: 22px; }
.sem-viewer3d__close:hover { background: rgba(245, 242, 238, 0.18); }
.sem-viewer3d__close:focus-visible { outline: 2px solid var(--beige); outline-offset: 3px; }
.sem-viewer3d__bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: 0 var(--space-6) max(28px, env(safe-area-inset-bottom)); pointer-events: none; }
.sem-viewer3d__hint { margin: 0; padding: 10px 18px; border-radius: 999px; background: rgba(245, 242, 238, 0.1); border: 1px solid rgba(245, 242, 238, 0.18); font-size: 1rem; color: var(--beige); }
.sem-viewer3d__hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .sem-viewer3d__hint-touch { display: none; } .sem-viewer3d__hint-mouse { display: inline; } }
.sem-viewer3d__ar { pointer-events: auto; border-color: var(--beige); }
.sem-view3d-btn { margin-top: var(--space-4); border-color: var(--beige); }
.sem-designers .sem-view3d-btn { margin-top: var(--space-4); border-color: var(--charcoal); }
@media (prefers-reduced-motion: reduce) { .sem-viewer3d[open] { animation: none; } }

/* Proverb, more contrast (Nick, 2026-11-17): a dark card so the saying is the strongest
   moment on the page; beats the 17px reading-text rule on symbol pages. */
main.sem .sem-saying {
  padding: max(28px, calc(var(--sq-r, 70px) * 0.45));
  border-radius: var(--sq-r, var(--radius-card-frame));
  background: var(--charcoal);
  color: var(--beige);
}
main.sem article .sem-saying .sem-saying__src {
  font-family: var(--sem-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.25rem);
  line-height: 1.25;
  color: var(--beige);
}
main.sem .sem-saying .sem-saying__src::before { color: var(--orange); font-size: 2em; margin-bottom: 0.15em; }
main.sem article .sem-saying .sem-saying__en { margin-top: var(--space-4); font-size: 1.1875rem; line-height: 1.5; color: var(--beige); }
main.sem article .sem-saying .sem-saying__src-line { margin-top: var(--space-5, 20px); font-size: 0.9375rem; color: rgba(245, 242, 238, 0.78); }
/* Special letters in the proverb card: the band's lighter orange, readable on charcoal */
main.sem .sem-saying .sem-letter { color: var(--mesh-orange-core, var(--orange)); }
/* Second orange touch for every proverb, with or without special letters:
   a short orange rule between the saying and its translation (not a side border). */
main.sem article .sem-saying .sem-saying__en::before {
  content: ""; display: block; width: 40px; height: 2px; margin: 0 0 var(--space-4);
  border-radius: 2px; background: var(--mesh-orange-core, var(--orange));
}
/* Top band: one action ("View in 3D"), then the respect line on its own row */
.sem-band .sem-view3d-btn { display: inline-flex; margin: var(--space-2) 0 var(--space-5); }
main.sem .sem-band .sem-respect { display: flex; margin-top: var(--space-5, 20px); }
