/* CIMC — Californiaish Institute for Meat Consciousness
   Rev 2: styling matched to cimc.ai's measured spec so the two sites can be
   held side by side — same form, different substrate. One wrong color. */

@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --meat: #A8202C;
  --fat: #F3EEE6;
  --muted: rgba(24, 29, 39, 0.6);
  --grey: #4B5563;
  --grey-light: #9CA3AF;
  --line: #E5E7EB;
  --col: 860px;     /* cimc.ai content column */
  --wide: 1400px;   /* nav + full-bleed rows */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Questrial', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { max-width: 100%; }

/* Content column — narrow and centered, as on cimc.ai */
.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
}

.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
  height: 88px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 16px;
}

.logo-word {
  font-size: 40px;
  letter-spacing: -0.05em;
  line-height: 1;
  display: block;
}

/* The final C carries fat marbling — the one visual tell. */
.logo-word .marbled {
  background-image: repeating-linear-gradient(
    -22deg,
    var(--ink) 0 2px,
    var(--paper) 2px 3px,
    var(--ink) 3px 4.5px,
    var(--paper) 4.5px 6px
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.nav-links a {
  text-decoration: none;
  font-size: 18px;
  letter-spacing: -0.02em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { border-bottom-color: var(--ink); }

.nav-badge {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 20px;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-badge .mark { color: var(--meat); font-size: 18px; }

/* cimc.ai buttons: black, single rounded corner (top-right), wide padding */
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 10px 56px;
  border-radius: 0 10px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-cta:hover { background: var(--meat); }

.burger {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 8px 0;
}

/* ---------- Hero ---------- */

.hero { padding: 144px 0 0; text-align: center; }

.sunburst { width: min(700px, 80vw); height: auto; margin: 0 auto; display: block; }

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 44px auto 0;
  max-width: 900px;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 680px;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--muted);
}

/* Big tracked-out section labels — cimc.ai's WHITEPAPER / SUBSTACK treatment */
.label {
  display: block;
  font-size: clamp(24px, 4vw, 44px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 22px;
}

.label-sm,
.eyebrow {
  display: block;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-light);
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 10px 56px;
  font-size: 18px;
  letter-spacing: -0.02em;
  border-radius: 0 10px 0 0;
  margin-top: 30px;
  transition: background .15s;
}

.btn:hover { background: var(--meat); }

/* cimc.ai's whitepaper CTA is a light outlined button, not a solid one */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  padding: 12px 34px;
  font-size: 16px;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Thin centred rule under the hero title, as on cimc.ai */
.hero-rule {
  width: 190px;
  height: 1px;
  background: var(--ink);
  margin: 40px auto 0;
  border: 0;
}

/* Full-width black conference band */
.conf-band {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 0;
}

.conf-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.conf-mark {
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.conf-mark .mark { color: var(--meat); font-size: 20px; }

.conf-text { text-align: center; flex: 1; min-width: 260px; }
.conf-text h2 { font-size: clamp(24px, 3vw, 36px); margin: 0 0 6px; letter-spacing: -0.02em; }
.conf-text p { margin: 0; font-size: 16px; color: rgba(255,255,255,0.7); }

.conf-band .btn {
  margin-top: 0;
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
  font-size: 16px;
  padding: 12px 30px;
}

.conf-band .btn:hover { background: var(--paper); color: var(--ink); box-shadow: none; }

/* ---------- Sections ---------- */

section { padding: 100px 0; }
.section-tight { padding: 55px 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 30px;
}

h3 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.lead {
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.18;
  max-width: var(--col);
}

.prose { max-width: var(--col); }

.prose p {
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.prose p.small { font-size: 15px; color: var(--grey); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

.pull {
  border-left: 3px solid var(--meat);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.28;
}

.pull cite { display: block; font-size: 15px; font-style: normal; color: var(--grey); margin-top: 12px; letter-spacing: -0.01em; }

/* ---------- Sister institute (top of home) ---------- */

.sister-top {
  background: var(--fat);
  padding: 64px 0 56px;
}

.sister-top h2 { margin-bottom: 22px; }

/* Teaser sits at lead size — enough to entice before the dropdown */
.sister-teaser {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.42;
  letter-spacing: -0.02em;
  margin: 0 0 34px;
  max-width: var(--col);
}

.sister-teaser a { text-decoration: none; border-bottom: 1px solid var(--meat); }
.sister-teaser a:hover { color: var(--meat); }
.sister-teaser strong { font-weight: 400; border-bottom: 2px solid var(--meat); }

/* Accordion tuned for the cream band — the default rules vanish on #F3EEE6.
   Doubled class beats the later-declared plain `.acc` rules on specificity. */
.acc.acc-sister { border-top-color: rgba(0, 0, 0, 0.55); }
.acc.acc-sister details { border-bottom-color: rgba(0, 0, 0, 0.16); }
.acc.acc-sister summary { font-size: clamp(19px, 2.2vw, 24px); padding: 22px 44px 22px 0; }
.acc.acc-sister summary::after { color: rgba(0, 0, 0, 0.45); }
.acc.acc-sister .body { color: #262626; padding-bottom: 26px; }
.acc.acc-sister .body p.small { color: rgba(0, 0, 0, 0.55); }

.inspired { background: var(--fat); }

.inspired .prose p { font-size: 19px; line-height: 1.62; }

.inspired strong { font-weight: 400; border-bottom: 2px solid var(--meat); }

/* ---------- Feature cards ---------- */

/* cimc.ai's feature cards are stacked rows: square art left, copy right */
.cards {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: start;
}

.card .art { display: block; width: 100%; height: auto; }

.card .meta { font-size: 12px; color: var(--grey-light); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.card h3 { font-size: 32px; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 16px; }
.card p { font-size: 16px; line-height: 1.55; color: var(--grey); letter-spacing: -0.01em; margin: 0 0 22px; }

/* cimc.ai's "Learn more" is a solid black button under the card copy */
.card .more {
  display: inline-block;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: -0.02em;
  padding: 11px 40px;
  border-radius: 0 10px 0 0;
}

.card .more:hover { background: var(--meat); }

/* ---------- Accordion ---------- */

.acc { border-top: 1px solid var(--ink); }
.acc details { border-bottom: 1px solid var(--line); }

.acc summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 44px 28px 0;
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  position: relative;
}

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

.acc summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  color: var(--grey-light);
}

.acc details[open] summary::after { content: "–"; }
.acc summary:hover { color: var(--meat); }

.acc .body {
  padding: 0 60px 30px 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--grey);
  letter-spacing: -0.01em;
}

.acc .body p { margin: 0 0 16px; }

.acc .status {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px var(--meat);
  color: var(--meat);
  padding: 5px 10px;
  margin-top: 4px;
}

/* ---------- Team ---------- */

.team-wide { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }

.team-group { margin-bottom: 72px; }

.team-group > h3 {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-light);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 34px;
}

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 30px; }

.member .avatar {
  aspect-ratio: 1;
  background: var(--fat);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.member .avatar svg { width: 100%; height: 100%; }

.member .name { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 4px; }
.member .role { font-size: 15px; color: var(--grey-light); line-height: 1.4; }
.member .note { font-size: 14.5px; color: var(--grey); margin-top: 10px; line-height: 1.5; letter-spacing: -0.01em; }
.member .aff { font-size: 14px; color: var(--meat); margin-top: 6px; }

/* ---------- Library ---------- */

.paper-row {
  display: grid;
  grid-template-columns: 120px 1fr 170px;
  gap: 26px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.paper-row:first-child { border-top: 1px solid var(--ink); }
.paper-row .date { font-size: 15px; color: var(--grey-light); padding-top: 4px; }
.paper-row h3 { font-size: 24px; margin-bottom: 8px; }
.paper-row p { margin: 0; font-size: 16px; color: var(--grey); line-height: 1.55; letter-spacing: -0.01em; }
.paper-row .tag { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-light); padding-top: 6px; }

/* ---------- Signup ---------- */

.signup { background: var(--paper); padding: 80px 0; text-align: center; }

.signup form { display: flex; gap: 10px; max-width: 460px; margin: 28px auto 0; }

.signup input {
  flex: 1;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 14px 18px;
  font: inherit;
  font-size: 16px;
}

.signup button {
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 14px 34px;
  font: inherit;
  font-size: 16px;
  border-radius: 0 10px 0 0;
  cursor: pointer;
}

.signup button:hover { background: var(--meat); }

/* ---------- Footer — black, as on cimc.ai ---------- */

footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 44px;
  font-size: 16px;
}

footer a { color: var(--paper); }

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  margin-bottom: 50px;
}

.foot-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--meat); }

.foot-addr { color: rgba(255, 255, 255, 0.6); line-height: 1.6; font-size: 15px; }

.foot-bot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 24px;
}

.foot-bot a { color: #E8797F; }

.disclaimer {
  max-width: 760px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin-top: 18px;
}

/* ---------- Page head ---------- */

.page-head { padding: 80px 0 30px; }

.page-head h1 {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.page-head .lead { margin-top: 26px; }

.meat { color: var(--meat); }
.center { text-align: center; }

@media (max-width: 1180px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 16px; }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .nav-inner { height: 72px; gap: 14px; padding: 0 20px; }
  .burger { display: block; margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 18px; width: 100%; }
  .nav-badge, .nav-cta { display: none; }
  .hero { padding-top: 70px; }
  .cards { gap: 40px; }
  .card { grid-template-columns: 1fr; gap: 20px; }
  .card .art { max-width: 300px; }
  .conf-inner { flex-direction: column; text-align: center; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .paper-row { grid-template-columns: 1fr; gap: 8px; }
  .acc .body { padding-right: 0; }
  section { padding: 60px 0; }
  .btn, .nav-cta { padding-left: 34px; padding-right: 34px; }
}

@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
  .signup form { flex-direction: column; }
  .label { letter-spacing: 0.16em; }
}

/* ================================================================
   Rev 4 — the visitor is the specimen
   ================================================================ */

/* ---------- Substrate declaration gate ---------- */

html.gated, html.gated body { overflow: hidden; }

/* Nothing but the door. Catches the sticky nav, the exit invitation, and the
   externally-injected feedback chip, all of which sat above the old overlay. */
html.gated body > *:not(.gate) { visibility: hidden !important; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
  animation: gate-in .35s ease both;
}

/* ---------- The institute's own front door ---------- */

.gate-brand {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 38px;
}

.gate-mark { width: 104px; height: 104px; flex-shrink: 0; }

.gate-legend {
  font-size: clamp(19px, 2.4vw, 27px);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }

.gate-out { opacity: 0; transition: opacity .4s ease; pointer-events: none; }

.gate-inner { max-width: 900px; width: 100%; }

.gate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 30px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gate-form { color: var(--ink); }
.gate-req { color: var(--meat); }

.gate-title {
  font-size: clamp(36px, 6.4vw, 64px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0 0 20px;
}

.gate-lede {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--grey);
  max-width: 640px;
  margin: 0 0 34px;
}

.gate-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
  margin-bottom: 26px;
}

.gate-door {
  background: var(--paper);
  border: 0;
  font: inherit;
  text-align: left;
  padding: 28px 28px 26px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .15s, color .15s;
}

.gate-door:hover, .gate-door:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.gate-door-lead { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; opacity: .55; }

.gate-door-word {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 8px;
}

.gate-door[data-sub="meat"]:hover .gate-door-word,
.gate-door[data-sub="meat"]:focus-visible .gate-door-word { color: var(--meat); }

.gate-door-note { font-size: 14.5px; line-height: 1.45; opacity: .7; }

.gate-skip {
  background: none;
  border: 0;
  font: inherit;
  font-size: 15px;
  color: var(--grey);
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.gate-skip:hover { color: var(--meat); border-bottom-color: var(--meat); }

.gate-fine { font-size: 13px; color: var(--grey-light); line-height: 1.55; margin: 26px 0 0; max-width: 560px; }

/* ---------- Scroll cue (§18) ---------- */

.scroll-cue {
  display: block;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-light);
  padding: 34px 0 0;
  transition: opacity .3s;
}

.scroll-cue::after {
  content: "↓";
  display: block;
  font-size: 18px;
  margin-top: 8px;
  animation: cue-bob 2.1s ease-in-out infinite;
}

@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.cue-gone { opacity: 0; pointer-events: none; }

/* ---------- Exit invitation ---------- */

.invite {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  max-width: 330px;
  background: var(--ink);
  color: var(--paper);
  padding: 22px 24px 24px;
  border-radius: 0 14px 0 0;
  transform: translateY(150%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}

.invite-in { transform: translateY(0); }

.invite .label-sm { color: rgba(255,255,255,.5); margin-bottom: 10px; }
.invite p { font-size: 15.5px; line-height: 1.5; margin: 0 0 16px; color: rgba(255,255,255,.85); }
.invite .btn { margin-top: 0; background: var(--paper); color: var(--ink); padding: 11px 26px; font-size: 15px; }
.invite .btn:hover { background: var(--meat); color: var(--paper); }

.invite-close {
  position: absolute;
  top: 10px; right: 12px;
  background: none; border: 0;
  color: rgba(255,255,255,.5);
  font: inherit; font-size: 20px;
  cursor: pointer; line-height: 1;
}

.invite-close:hover { color: var(--paper); }

/* ---------- Survey ---------- */

.q { border-top: 1px solid var(--line); padding: 38px 0; }
.q:first-of-type { border-top: 1px solid var(--ink); }

.q-num { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey-light); margin-bottom: 12px; display: block; }
.q h3 { font-size: clamp(20px, 2.6vw, 27px); letter-spacing: -0.025em; line-height: 1.18; margin-bottom: 10px; }
.q .hint { font-size: 15px; color: var(--grey); margin: 0 0 26px; line-height: 1.5; }

.slider-row { display: flex; align-items: center; gap: 20px; }

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--ink);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--meat);
  border: 2px solid var(--ink);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--meat);
  border: 2px solid var(--ink);
  cursor: grab;
}

.slider-val {
  min-width: 74px;
  text-align: right;
  font-size: 27px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--grey-light);
  margin-top: 10px;
  padding-right: 94px;
}

.q textarea {
  width: 100%;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}

/* ---------- Result ---------- */

.result { display: none; }
.result.on { display: block; }
.survey-form.off { display: none; }

.specimen-card {
  background: var(--ink);
  color: var(--paper);
  padding: 54px 44px;
  border-radius: 0 22px 0 0;
  text-align: center;
  margin-bottom: 48px;
}

.specimen-card .label-sm { color: rgba(255,255,255,.5); }
.specimen-no { font-size: clamp(56px, 12vw, 116px); letter-spacing: -0.05em; line-height: 1; margin: 6px 0 18px; }
.specimen-card p { max-width: 520px; margin: 0 auto; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.55; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--paper); padding: 26px 22px; }
.stat .k { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-light); margin-bottom: 10px; }
.stat .v { font-size: 40px; letter-spacing: -0.04em; line-height: 1; }
.stat .v small { font-size: 17px; color: var(--grey-light); letter-spacing: 0; }
.stat .sub { font-size: 13.5px; color: var(--grey); margin-top: 8px; line-height: 1.45; }

.bar { height: 6px; background: var(--line); margin-top: 12px; position: relative; overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; background: var(--meat); }

/* ---------- AI door (§19) ---------- */

.aidoor { background: var(--fat); }
.aidoor .prose p { font-size: 17px; }

.prompt-box {
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.18);
  padding: 22px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
  margin: 24px 0 18px;
}

.copy-ok { color: var(--meat); font-size: 15px; margin-left: 14px; opacity: 0; transition: opacity .2s; }
.copy-ok.on { opacity: 1; }

/* ---------- SOMA credit ---------- */

.soma-credit {
  border-top: 1px solid rgba(255,255,255,.18);
  margin-top: 26px;
  padding-top: 24px;
  font-size: 14px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
}

.soma-credit a { color: #E8797F; }
.soma-credit strong { color: var(--paper); font-weight: 400; }

@media (max-width: 700px) {
  .gate-doors { grid-template-columns: 1fr; }
  .gate-title { font-size: 38px; }
  .gate-brand { gap: 16px; margin-bottom: 26px; }
  .gate-mark { width: 68px; height: 68px; }
  .gate { padding: 26px 18px; align-items: flex-start; }
  .invite { left: 16px; right: 16px; max-width: none; }
  .scale-ends { padding-right: 0; }
  .slider-val { min-width: 58px; font-size: 22px; }
  .specimen-card { padding: 40px 24px; }
}
