@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/inter-700.woff2") format("woff2");
}

:root {
  --ink: #161616;
  --ink-soft: #3a3a3a;
  --muted: #707070;
  --faint: #a3a3a3;
  --line: #e4e4e7;
  --line-strong: #c8c8ce;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --chip: #f2f3f5;
  --accent: #1f9d6a;
  --accent-soft: rgba(31, 157, 106, 0.11);
  --ok: #147a50;
  --ok-bg: #edf8f3;
  --ok-line: #bce5d2;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --bad-line: #f6c4be;
  --warn: #8a5a10;
  --warn-bg: #fef9ec;
  --warn-line: #f0dba6;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-line: #bfdbfe;
  --feel: #6d28d9;
  --feel-bg: #f5f3ff;
  --feel-line: #ddd6fe;
  --theory: #0f766e;
  --theory-bg: #f0fdfa;
  --theory-line: #99f6e4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-focus: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 28px rgba(0, 0, 0, 0.08);
  --radius-pill: 40px;
  --max: 980px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background-color: #ecebe9;
  background-image: radial-gradient(ellipse 90% 80% at 50% 38%,
    #f7f6f5 0%,
    #f1f0ee 42%,
    #e9e8e6 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

/* Landing: lock to one viewport, no page scroll. Workspace: the document can grow and scroll. */
html.is-home-screen,
html.is-home-screen body {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
html:not(.is-home-screen),
html:not(.is-home-screen) body {
  height: auto;
  max-height: none;
  min-height: 100%;
  overflow: auto;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0 72px;
  display: flex;
  flex-direction: column;
  transition: padding 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.has-results { padding-top: 22px; }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: none;
  flex: 0 0 auto;
}

.brand.has-mark .brand-mark { display: block; }

.brand-wordmark {
  border: 0;
  background: transparent;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #2c2c32;
  line-height: 1.2;
  cursor: default;
}

.brand-wordmark-row {
  display: inline-flex;
  align-items: flex-start;
  position: relative;
  padding-right: 0;
  overflow: visible;
}
.brand-wordmark-row .tm {
  font-size: 8px;
  top: 1px;
  margin-left: 1px;
  font-weight: 700;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.tm {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.42em;
  font-weight: 600;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: super;
  position: relative;
  top: -0.12em;
  margin-left: 0.08em;
  color: inherit;
}

.hero-name .tm,
.brand-wordmark-row .tm {
  color: #2c2c32;
  font-weight: 700;
}

.brand-full-name .tm,
.hero-tagline .tm {
  color: #111111;
  font-size: 0.55em;
  top: -0.2em;
}

.brand-full-name {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: #111111;
  white-space: nowrap;
  max-width: 100%;
}

/* Landing already has the hero tagline; keep the header compact. Hide when the topbar is tight. */
.page.is-home .brand-full-name { display: none; }

/* Bookstore under the header wordmark: PerfectMATH.si only. Hidden on every other brand. */
.brand-bookstore {
  display: none;
  margin: 1px 0 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: var(--muted);
  text-decoration: none;
}
.brand-bookstore:hover,
.brand-bookstore:focus-visible {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
html[data-brand="perfectmath"] .brand-bookstore {
  display: inline-block;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.spec-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.engine-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  flex: 0 0 auto;
}

.beta-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #6d28d9;
  white-space: nowrap;
  text-align: right;
  animation: beta-lab-pulse 2.4s ease-in-out infinite;
}

@keyframes beta-lab-pulse {
  0%, 100% {
    opacity: 0.78;
    text-shadow: 0 0 0 rgba(109, 40, 217, 0);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 6px rgba(109, 40, 217, 0.65), 0 0 14px rgba(167, 139, 250, 0.5);
  }
}

.contact-link {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: right;
  white-space: nowrap;
}
.contact-link:hover,
.contact-link:focus-visible {
  color: var(--ink);
}

.v1-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--line-strong);
  font-size: 12px;
}
.v1-link:hover { color: var(--ink); }

/* Ask Pill */
.ask-box {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  min-height: 76px;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    min-height 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.ask-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-focus);
}

.attach { flex: 0 0 auto; position: relative; }
.attach input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover, .icon-btn:focus-visible { background: #f3f4f6; outline: none; }
.icon-btn svg { width: 20px; height: 20px; }

.ask-submit {
  background: var(--ink);
  color: #ffffff;
}
.ask-submit:hover, .ask-submit:focus-visible { background: var(--accent); color: #ffffff; }

.ask-fields {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 4px;
}

.ask-fields textarea {
  width: 100%;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  min-height: 24px;
  max-height: 140px;
  transition: font-size 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    line-height 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    min-height 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 12px;
  color: var(--ink-soft);
}
.clear-file {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
}

/* Demo bar */
.demos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 4px 0;
}

.demos-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.demo-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.demo-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-alt);
  color: var(--ink);
}

.demo-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 500;
}

/* Kicker */
.results-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 2px 10px;
}

.kicker-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--chip);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.kicker-note {
  font-size: 12px;
  color: var(--muted);
}

/* Flowchart Cascade */
.cascade {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 4px;
}

.cascade-item {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.cascade-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Block-diagram connector between dropdown boxes */
.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 30px;
  margin: 0;
}

.flow-connector::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 6px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--line-strong);
}

.flow-connector::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--line-strong);
}

.flow-connector.is-halted::before { background: var(--bad); }
.flow-connector.is-halted::after { border-top-color: var(--bad); }

.flow-tag {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.flow-connector.is-halted .flow-tag {
  color: var(--bad);
  border-color: var(--bad-line);
  background: var(--bad-bg);
}

/* Shared card / block-diagram node styling */
.block-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.block-card.is-breakdown {
  border-left: 4px solid var(--accent);
}

.block-card.is-pass {
  border-left: 4px solid var(--ink-soft);
}

.block-card.is-pass.status-closed { border-left-color: var(--ok); }
.block-card.is-pass.status-rotating { border-left-color: var(--warn); }
.block-card.is-pass.status-killed { border-left-color: var(--bad); }

.block-card.is-terminal {
  border-left: 4px solid var(--ink);
}
.block-card.is-terminal.verdict-ACCEPT { border-left-color: var(--ok); }
.block-card.is-terminal.verdict-CONDITIONAL { border-left-color: var(--warn); }
.block-card.is-terminal.verdict-REJECT { border-left-color: var(--bad); }

/* Breakdown Box */
.breakdown-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.block-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.breakdown-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.neutral-restatement {
  font-size: 14px;
  line-height: 1.48;
  color: var(--ink);
}

.segments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: 12px;
  line-height: 1.35;
}

.ontology-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.ontology-path {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* Badges / Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-kind-fact { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-kind-theory { background: var(--theory-bg); color: var(--theory); border-color: var(--theory-line); }
.badge-kind-feeling { background: var(--feel-bg); color: var(--feel); border-color: var(--feel-line); }
.badge-kind-mixed { background: var(--chip); color: var(--ink-soft); border-color: var(--line); }
.badge-kind-question { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }

.badge-val-valid { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-val-invalid { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge-val-unresolved { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }

.badge-status-closed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-status-rotating { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-status-killed { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }

/* Dropdown Pass Box */
details.pass-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-bottom: 1px solid transparent;
  user-select: none;
}

details.pass-details[open] > summary {
  border-bottom-color: var(--line);
}

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

.pass-summary-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.pass-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
}

.pass-ring {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.pass-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
}

.pass-summary-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chevron {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

details.pass-details[open] .chevron { transform: rotate(90deg); }

.pass-body {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}

@media (max-width: 780px) {
  .pass-body { grid-template-columns: 1fr; }
}

.sub-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.glyph-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.glyph-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
}

.glyph-sym {
  font-family: "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 16px;
  text-align: center;
}

.glyph-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.glyph-name { font-weight: 600; font-size: 11.5px; color: var(--ink); }
.glyph-role { font-size: 10.5px; color: var(--muted); }

.axioms-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.axiom-line {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  padding: 4px 8px;
  border-left: 2px solid var(--line-strong);
  background: #fcfcfd;
}

.axiom-id {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink);
  margin-right: 4px;
}

.axiom-page {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-left: 4px;
}

/* Syllogism chain */
.syllogism-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fcfcfd;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.syl-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 5px;
}

.syl-form {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.premise-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.38;
  padding: 3px 0;
}

.premise-row.is-conclusion {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  margin-top: 2px;
  font-weight: 600;
}

.premise-text {
  flex: 1 1 auto;
  min-width: 0;
}

.premise-slot {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 5px;
}

.premise-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.cites-row {
  font-size: 11px;
  color: var(--muted);
  padding-top: 4px;
  border-top: 1px dotted var(--line);
}

/* Terminal Box: Domains + 12-Check Verdict + Σ₆₀ Footprint */
.terminal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.verdict-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.verdict-banner.verdict-ACCEPT { background: var(--ok-bg); border-color: var(--ok-line); }
.verdict-banner.verdict-CONDITIONAL { background: var(--warn-bg); border-color: var(--warn-line); }
.verdict-banner.verdict-REJECT { background: var(--bad-bg); border-color: var(--bad-line); }

.verdict-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.verdict-word {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.verdict-ACCEPT .verdict-word { color: var(--ok); }
.verdict-CONDITIONAL .verdict-word { color: var(--warn); }
.verdict-REJECT .verdict-word { color: var(--bad); }

.verdict-stats {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.terminal-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
}

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

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.domain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.domain-state {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.state-supported { color: var(--ok); }
.state-partial { color: var(--warn); }
.state-unsupported { color: var(--bad); }
.state-missing, .state-pending { color: var(--muted); }
.state-derived, .state-by_inference { color: var(--warn); }
.syltrap-domain-status { margin-left: 8px; font-size: 10px; letter-spacing: 0.04em; }


.checks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

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

.check-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11.5px;
}

.check-mark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
}
.check-cell.is-pass .check-mark { color: var(--ok); }
.check-cell.is-fail .check-mark { color: var(--bad); }

/* Σ₆₀ 5x12 Footprint Matrix */
.sigma-matrix {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ring-strip {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .brand-full-name { display: none; }
  .ring-strip { grid-template-columns: 1fr; }
}

.ring-strip-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.ring-cells {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}

.sigma-cell {
  text-align: center;
  padding: 3px 2px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  font-size: 12px;
  color: var(--faint);
}

.sigma-cell.is-fired {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ink);
  font-weight: 700;
}

.sigma-cell.is-failed {
  border-color: var(--bad-line);
  background: var(--bad-bg);
  color: var(--bad);
  font-weight: 700;
}

.reason-box {
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink-soft);
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .cascade-item { transition: none; opacity: 1; transform: none; }
  .beta-tag {
    animation: none !important;
    opacity: 1;
    text-shadow: none;
  }
  .logo-core-pulse {
    animation: none !important;
    filter: none;
    opacity: 0.45;
  }
  .tagline-si {
    animation: none !important;
    opacity: 1;
    filter: none;
    color: var(--si-pulse, #62d987);
  }
  .home-hero,
  .hero-name,
  .hero-tagline,
  .hero-lockup,
  .brand-full-name,
  .brand-mark-wrap,
  .ask-box,
  .ask-fields textarea,
  .icon-btn,
  .page,
  .stage {
    transition: none !important;
  }
}

/* Live brand pill mark (Cookie Tush SI) */
.brand-pill-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}

.ask-submit.is-busy {
  opacity: 0.65;
  cursor: progress;
}

.error-card {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--bad-line);
  background: var(--bad-bg);
  font-size: 13.5px;
  color: var(--bad);
}

/* Small thinking indicator (upgrades the previous loading-card copy).
   Blue clock + "Thinking" with cycling dots, shown while /v1/ask is in flight. */
.loading-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #1D4ED8;
}
html[data-theme="dark"] .loading-card,
html[data-theme="space"] .loading-card,
html[data-brand="cookietush"] .loading-card {
  color: #5BA8FF;
}
.thinking-clock {
  display: inline-flex;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: inherit;
}
.thinking-clock-svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}
.thinking-clock-hand {
  transform-origin: 12px 12px;
  transform-box: view-box;
  animation: thinking-hand-spin 1.5s linear infinite;
}
@keyframes thinking-hand-spin {
  to { transform: rotate(360deg); }
}
.thinking-label {
  color: inherit;
}
.thinking-dots {
  display: inline-block;
  min-width: 1.15em;
  text-align: left;
}
.thinking-dots span {
  opacity: 0;
  animation: thinking-dot-cycle 1.2s linear infinite;
}
.thinking-dots span:nth-child(1) { animation-name: thinking-dot-1; }
.thinking-dots span:nth-child(2) { animation-name: thinking-dot-2; }
.thinking-dots span:nth-child(3) { animation-name: thinking-dot-3; }
@keyframes thinking-dot-1 {
  0%, 100% { opacity: 1; }
}
@keyframes thinking-dot-2 {
  0%, 32.9% { opacity: 0; }
  33%, 100% { opacity: 1; }
}
@keyframes thinking-dot-3 {
  0%, 65.9% { opacity: 0; }
  66%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .thinking-clock-hand {
    animation: none;
  }
  .thinking-dots span {
    animation-duration: 2.4s;
  }
}

/* Context & Kernel Layer Cards */
.block-card.is-kernel { border-left: 4px solid #0284c7; }
.block-card.is-religious { border-left: 4px solid #7c3aed; }
.block-card.is-race { border-left: 4px solid #0f766e; }
.block-card.is-slavery { border-left: 4px solid #b45309; }
.block-card.is-policy-reject { border-left: 4px solid var(--bad); }

.context-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kernel-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.visual-grid {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 12px;
  align-items: start;
}

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

.visual-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.visual-frame img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.visual-caption {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.step-card {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
  line-height: 1.35;
}

.step-card strong {
  display: block;
  font-size: 11.5px;
  color: var(--ink);
  margin-bottom: 2px;
}

.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fcfcfd;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-box.is-fact {
  border-color: var(--ok-line);
  background: var(--ok-bg);
}

.layer-box.is-interp {
  border-color: var(--warn-line);
  background: var(--warn-bg);
}

.layer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.layer-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.layer-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.quote-box {
  padding: 6px 9px;
  border-left: 3px solid var(--line-strong);
  background: #ffffff;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.amn-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-alt);
  font-size: 12px;
}

.amn-axis {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.amn-axis.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.axiom-status {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
}
.axiom-status.is-pass { background: var(--ok-bg); color: var(--ok); }
.axiom-status.is-fail { background: var(--bad-bg); color: var(--bad); }
.axiom-status.is-policy { background: var(--chip); color: var(--muted); }

/* Retrieved Corpus Evidence */
.evidence-panel {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evidence-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fcfcfd;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.evidence-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.evidence-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.evidence-snippet {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.writer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

/* Direct answer first, reasoning collapsed */
.answer-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 30px 26px;
  box-shadow: var(--shadow);
}

.answer-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.answer-copy-btn {
  appearance: none;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
}
.answer-copy-btn:hover,
.answer-copy-btn:focus-visible {
  background: #f3f4f6;
  color: var(--ink);
  outline: none;
}

.direct-answer {
  font-size: 1.45rem;
  line-height: 1.4;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--ink);
  white-space: pre-wrap;
}

.direct-answer .katex { font-size: 1.05em; font-weight: 500; }
.direct-answer .katex-display { margin: 0.55em 0; overflow-x: auto; overflow-y: hidden; }

.reasoning-fold {
  border: none;
  background: transparent;
  overflow: visible;
  border-radius: 0;
}

.syltrap-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.syltrap-cue {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 38rem;
  margin: 4px 2px 0 18px;
  pointer-events: none;
}

.syltrap-caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 500;
}

.syltrap-prompt {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px 0;
  overflow: visible;
  filter:
    drop-shadow(0 0 3px rgba(212, 168, 32, 0.95))
    drop-shadow(0 0 8px rgba(234, 179, 8, 0.75))
    drop-shadow(0 0 16px rgba(250, 204, 21, 0.45));
  animation: syltrap-arrow-pulse 1.8s ease-in-out infinite;
}

.syltrap-arrow {
  display: block;
  width: 48px;
  height: 52px;
  margin: 0;
  flex: 0 0 auto;
  overflow: visible;
}

.syltrap-arrow-body {
  fill: #f0c419;
  stroke: #c99510;
  stroke-width: 1;
  stroke-linejoin: miter;
}

.syltrap-press {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #f0c419;
  white-space: nowrap;
}

@keyframes syltrap-arrow-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 3px rgba(212, 168, 32, 0.95))
      drop-shadow(0 0 8px rgba(234, 179, 8, 0.7))
      drop-shadow(0 0 14px rgba(250, 204, 21, 0.35));
  }
  50% {
    filter:
      drop-shadow(0 0 6px rgba(250, 204, 21, 1))
      drop-shadow(0 0 12px rgba(234, 179, 8, 0.9))
      drop-shadow(0 0 20px rgba(250, 204, 21, 0.55));
  }
}

@media (prefers-reduced-motion: reduce) {
  .syltrap-prompt {
    animation: none;
    filter:
      drop-shadow(0 0 4px rgba(212, 168, 32, 0.95))
      drop-shadow(0 0 10px rgba(234, 179, 8, 0.7));
  }
}

@media (max-height: 700px) {
  .syltrap-cue { margin-top: 0; gap: 0; }
  .syltrap-caption { font-size: 12px; line-height: 1.35; }
  .syltrap-prompt { gap: 8px; margin: 0 0 2px 0; }
  .syltrap-arrow { width: 40px; height: 44px; }
  .syltrap-press { font-size: 18px; }
}

.reasoning-fold > summary {
  /* Illuminated rectangular arcade push button: royal-blue lens, glossy black bezel. */
  appearance: none;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 68px;
  padding: 16px 22px 18px;
  margin: 0 0 12px;
  border-radius: 12px;
  border: 6px solid #111214;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.14) 16%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #5aa6ff 0%, #1e6fff 38%, #0b3fd6 72%, #072fa8 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: normal;
  user-select: none;
  text-shadow: 0 1px 0 rgba(0, 20, 60, 0.5), 0 0 12px rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    inset 0 -10px 16px rgba(0, 20, 90, 0.42),
    inset 0 0 28px rgba(120, 190, 255, 0.42),
    0 1px 0 #5a5a5a,
    0 0 0 1px #000,
    0 7px 0 #0a0a0a,
    0 12px 20px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(30, 110, 255, 0.6),
    0 0 36px rgba(30, 110, 255, 0.32);
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.reasoning-fold > summary .syltrap-label {
  flex: 1 1 auto;
  min-width: 0;
  color: #ffffff;
  font-weight: 800;
}

.reasoning-fold > summary::-webkit-details-marker { display: none; }
.reasoning-fold > summary::marker { content: none; display: none; }
.reasoning-fold > summary::after {
  content: none !important;
  display: none !important;
}

.reasoning-fold > summary:hover {
  filter: brightness(1.1);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    inset 0 -10px 16px rgba(0, 20, 90, 0.35),
    inset 0 0 32px rgba(150, 210, 255, 0.55),
    0 1px 0 #5a5a5a,
    0 0 0 1px #000,
    0 7px 0 #0a0a0a,
    0 12px 20px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(60, 150, 255, 0.85),
    0 0 48px rgba(30, 110, 255, 0.5);
}

.reasoning-fold > summary:active,
.reasoning-fold[open] > summary {
  transform: translateY(5px);
  filter: brightness(0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 14%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #2f7ef0 0%, #124fd0 45%, #082f9a 100%);
  box-shadow:
    inset 0 3px 8px rgba(0, 10, 50, 0.45),
    inset 0 -6px 12px rgba(0, 15, 70, 0.4),
    0 1px 0 #2a2a2a,
    0 0 0 1px #000,
    0 2px 0 #0a0a0a,
    0 6px 12px rgba(0, 0, 0, 0.32),
    0 0 12px rgba(30, 110, 255, 0.4);
}

.reasoning-fold > summary:focus { outline: none; }
.reasoning-fold > summary:focus-visible {
  outline: 3px solid #f5d76e;
  outline-offset: 3px;
}

.reasoning-fold > summary .syltrap-label-short { display: none; }

/* Only if the full name would still clip after wrapping — very narrow phones. */
@media (max-width: 300px) {
  .reasoning-fold > summary .syltrap-label { display: none; }
  .reasoning-fold > summary .syltrap-label-short { display: inline; }
  .reasoning-fold > summary { white-space: nowrap; }
}

.reasoning-body {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  padding: 4px 14px 18px;
}

.syltrap-proof {
  padding: 14px 6px 8px;
}

.syltrap-proof-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.syltrap-domain {
  margin: 0 0 14px;
}

.syltrap-domain-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.syltrap-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.syltrap-step {
  margin: 0 0 6px;
  padding: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.syltrap-n {
  font-weight: 700;
  color: var(--ink-soft);
}

.syltrap-kind {
  font-weight: 700;
}

.syltrap-therefore .syltrap-kind {
  font-style: italic;
}

.syltrap-conclusion {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.engine-audit {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.engine-audit-title {
  margin: 0 0 12px;
  padding: 0 6px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.engine-audit-body {
  padding: 0 0 8px;
}

/* When the Booby Trap is opened, the proof and the engine audit (which
   follows the Conclusion, already expanded) reveal smoothly. */
.reasoning-fold[open] .reasoning-body {
  animation: syltrap-reveal 0.4s ease-out;
}
.reasoning-fold[open] .engine-audit {
  animation: syltrap-audit-reveal 0.5s ease-out 0.12s both;
}
@keyframes syltrap-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes syltrap-audit-reveal {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reasoning-fold[open] .reasoning-body,
  .reasoning-fold[open] .engine-audit {
    animation: none;
  }
}

.reasoning-body .cascade-item {
  opacity: 1;
  transform: none;
}


/* -------------------------------------------------------------------------
   Landing (search-home) layout, studio sweep, and inner-core pulse
   ------------------------------------------------------------------------- */

.stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page.is-home {
  /* Fill the visible viewport and never scroll; children size to this height. */
  --home-vh: 100vh;
  --home-vh: 100svh;
  --home-vh: 100dvh;
  --home-reserve: 27.5rem;
  height: var(--home-vh);
  max-height: var(--home-vh);
  min-height: 0;
  overflow: hidden;
  padding-top: clamp(8px, 1.6vh, 20px);
  padding-bottom: clamp(8px, 1.8vh, 24px);
}

.page.is-home .stage {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.home-hero,
.hero-lockup,
.logo-core-wrap,
.logo-core-wrap-hero,
.hero-video,
.hero-logo {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 28px;
  max-height: 580px;
  opacity: 1;
  transform: scale(1);
  transform-origin: center top;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.is-home .home-hero {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-bottom: clamp(8px, 2vh, 28px);
  gap: clamp(6px, 1.2vh, 12px);
}

.page:not(.is-home) .home-hero {
  max-height: 0;
  opacity: 0;
  margin: 0;
  transform: scale(0.42);
  pointer-events: none;
  overflow: hidden;
}

.logo-core-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.hero-logo {
  width: 400px;
  height: auto;
  aspect-ratio: var(--logo-aspect, 0.9746);
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  /* The cube itself never scales or moves (no pulse translation). */
  transform: none;
}

.page.is-home .logo-core-wrap-hero {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  width: min(calc(400px * var(--logo-scale, 1)), var(--logo-vw, 86vw), calc((var(--home-vh) - var(--home-reserve)) * var(--logo-aspect, 0.9746)));
  height: auto;
  aspect-ratio: var(--logo-aspect, 0.9746);
  max-height: calc(var(--home-vh) - var(--home-reserve));
}

.page.is-home .hero-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.home-hero,
.hero-lockup {
  --wordmark-size: clamp(28px, 5.8vw, 50px);
}

.hero-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.24em;
  width: 100%;
  flex: 0 0 auto;
  font-size: var(--wordmark-size);
}

/* IKnowItAll and other brands can place the spelled-out line above the mark.
   TOTALintellect stays at the default (below) and is visually unchanged. */
.home-hero[data-tagline-position="above"] .hero-lockup {
  display: contents;
}
.home-hero[data-tagline-position="above"] .hero-tagline {
  order: -1;
  flex: 0 0 auto;
  font-size: calc(var(--wordmark-size) * 0.48);
}
.home-hero[data-tagline-position="above"] .logo-core-wrap-hero {
  order: 1;
}
.home-hero[data-tagline-position="above"] .hero-name {
  order: 2;
  flex: 0 0 auto;
  font-size: var(--wordmark-size);
}

.page[data-tagline-position="above"] .brand-full-name {
  order: -1;
}

.hero-name {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #2c2c32;
  line-height: 1;
  text-align: center;
  width: 100%;
  margin: 0;
  transition: opacity 0.4s ease;
}

.hero-tagline {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.48em;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: #111111;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  transition: opacity 0.4s ease;
}

.tagline-name {
  color: #111111;
  font-weight: 600;
}

.tagline-si {
  color: var(--si-pulse, #62d987);
  font-weight: 600;
  /* thin black outline; the fill pulses, the outline never does */
  -webkit-text-stroke: max(0.9px, 0.05em) #111111;
  paint-order: stroke fill;
  animation: si-tagline-pulse 5s ease-in-out infinite;
}

/* browsers without paint-order on HTML text: tight 1px outline via shadows instead */
@supports not (paint-order: stroke fill) {
  .tagline-si {
    -webkit-text-stroke: 0;
    text-shadow:
      -1px 0 #111, 1px 0 #111, 0 -1px #111, 0 1px #111,
      -0.7px -0.7px #111, 0.7px -0.7px #111, -0.7px 0.7px #111, 0.7px 0.7px #111;
  }
}

/* Pulse fill colour + soft glow. Opacity stays 1 so the black outline is never dimmed;
   the glow sits behind the stroke (paint-order: stroke fill) and cannot wash it out. */
@keyframes si-tagline-pulse {
  0%, 100% {
    color: var(--si-pulse-dim, color-mix(in srgb, var(--si-pulse, #62d987) 74%, #4a4a4a));
    filter: none;
  }
  50% {
    color: var(--si-pulse, #62d987);
    filter: drop-shadow(0 0 5px color-mix(in srgb, var(--si-pulse, #62d987) 70%, white))
            drop-shadow(0 0 12px var(--si-pulse, #62d987));
  }
}

.page:not(.is-home) .hero-name,
.page:not(.is-home) .hero-tagline { opacity: 0; }

/* Inner-core pulse only: clipped to the glass interior, no outer halo, no plate. */
.logo-core-pulse {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  border-radius: 48%;
  background: radial-gradient(circle at 50% 46%,
    rgba(210, 255, 220, 0.95) 0%,
    rgba(90, 230, 150, 0.55) 32%,
    rgba(40, 190, 110, 0.18) 58%,
    rgba(40, 190, 110, 0) 74%);
  mix-blend-mode: screen;
  filter: blur(1.5px);
}

.logo-core-pulse-hero {
  /* Fractions measured from the studio cube crop's green core, slightly inset. */
  left: 25.5%;
  top: 28%;
  width: 47%;
  height: 46%;
  animation: si-core-pulse 5s ease-in-out infinite;
}

.logo-core-pulse-sm {
  left: 24.5%;
  top: 26%;
  width: 51%;
  height: 48%;
}

.brand-mark-wrap {
  display: none;
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.45s ease, width 0.45s ease;
}

.brand.has-mark .brand-mark-wrap { display: inline-flex; }

.brand-mark-wrap .brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  transform: none;
}

.page.is-home .brand-mark-wrap {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.page:not(.is-home) .logo-core-pulse-sm {
  animation: si-core-pulse-soft 5s ease-in-out infinite;
}

@keyframes si-core-pulse {
  0%, 100% { opacity: 0.0; filter: blur(1.5px) brightness(1); }
  50% { opacity: 1; filter: blur(2px) brightness(1.45); }
}

@keyframes si-core-pulse-soft {
  0%, 100% { opacity: 0.18; filter: blur(0.6px) brightness(0.95); }
  50% { opacity: 0.55; filter: blur(0.8px) brightness(1.2); }
}

.page.is-home .ask-box {
  flex: 0 0 auto;
  min-height: clamp(120px, 18vh, 168px);
  padding: 22px 18px 22px 22px;
  border-radius: 28px;
  align-items: center;
}

.page.is-home .ask-fields {
  padding: 10px 8px;
}

.page.is-home .ask-fields textarea {
  font-size: 28px;
  line-height: 1.35;
  min-height: 88px;
  max-height: 240px;
  letter-spacing: -0.02em;
}

/* Placeholder must stay a single unclipped line on the home ask box.
   JS swaps in "Ask anything…" when the brand phrase is too wide. */
.page.is-home .ask-fields textarea::placeholder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page.is-home .icon-btn {
  width: 56px;
  height: 56px;
}

.page.is-home .icon-btn svg {
  width: 24px;
  height: 24px;
}

.page.is-home .demos {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  margin-top: clamp(8px, 1.6vh, 18px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.page.is-home .demos::-webkit-scrollbar { display: none; }
.page.is-home .demo-btn,
.page.is-home .demos-label {
  flex: 0 0 auto;
}

@media (max-width: 780px) {
  .page {
    width: min(var(--max), calc(100% - 24px));
  }
  .hero-logo {
    width: 280px;
  }
  .page.is-home .logo-core-wrap-hero {
    width: min(calc(280px * var(--logo-scale, 1)), var(--logo-vw, 86vw), calc((var(--home-vh) - var(--home-reserve)) * var(--logo-aspect, 0.9746)));
  }
  .home-hero,
  .hero-lockup {
    --wordmark-size: clamp(24px, 7vw, 36px);
  }
  .page.is-home .ask-fields textarea {
    font-size: 24px;
  }
  .page.is-home .ask-box {
    min-height: clamp(112px, 18vh, 148px);
  }
}

@media (max-width: 520px) {
  .topbar {
    margin-bottom: 8px;
  }
  .topbar-meta .v1-link {
    display: none;
  }
  .spec-tag {
    font-size: 10px;
    padding: 1px 6px;
  }
  .hero-logo {
    width: 220px;
  }
  .page.is-home {
    --home-reserve: 26.25rem;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .page.is-home .logo-core-wrap-hero {
    width: min(calc(220px * var(--logo-scale, 1)), var(--logo-vw, 86vw), calc((var(--home-vh) - var(--home-reserve)) * var(--logo-aspect, 0.9746)));
  }
  .home-hero,
  .hero-lockup {
    --wordmark-size: clamp(22px, 7.4vw, 28px);
  }
  .page.is-home .home-hero {
    margin-bottom: clamp(8px, 1.8vh, 20px);
  }
  .page.is-home .ask-box {
    min-height: clamp(108px, 18vh, 132px);
    padding: 14px 12px 14px 14px;
    border-radius: 24px;
  }
  .page.is-home .ask-fields textarea {
    font-size: 22px;
    min-height: 48px;
  }
  .page.is-home .icon-btn {
    width: 48px;
    height: 48px;
  }
}

/* Short viewports: shrink reserved chrome so the ask box stays fully on screen. */
@media (max-height: 780px) {
  .page.is-home {
    --home-reserve: 25.25rem;
  }
  .page.is-home .home-hero,
  .page.is-home .hero-lockup {
    --wordmark-size: clamp(24px, 4.6vh, 40px);
  }
}

@media (max-height: 680px) {
  .page.is-home {
    --home-reserve: 22.25rem;
  }
  .page.is-home .demos-label { display: none; }
  .page.is-home .demo-btn { padding: 4px 9px; font-size: 12px; }
  .page.is-home .ask-box { padding: 14px 14px 14px 16px; }
  .page.is-home .ask-fields textarea {
    font-size: 20px;
    min-height: 44px;
  }
}

@media (max-height: 580px) {
  .page.is-home {
    --home-reserve: 18.25rem;
  }
  .page.is-home .demos-label { display: none; }
}

@media (max-height: 500px) {
  .page.is-home {
    --home-reserve: 17.85rem;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .page.is-home .home-hero,
  .page.is-home .hero-lockup {
    --wordmark-size: clamp(22px, 4.4vh, 32px);
  }
  .page.is-home .home-hero {
    margin-bottom: 6px;
    gap: 4px;
  }
  .page.is-home .ask-box {
    min-height: 108px;
    padding: 12px 12px 12px 14px;
  }
  .page.is-home .ask-fields textarea {
    font-size: 18px;
    min-height: 40px;
  }
}



/* ---------------------------------------------------------------------------
   Multi-brand landing.  One layout for all eight SI brands; only the logo layers,
   accent colour and (for SEXAMATH / PerfectMATH) the dark backdrop change.
   Logo kinds on .logo-core-wrap-hero[data-kind]:
     cube  - TOTALintellect studio cube + radial core pulse (default)
     art   - dim base logo + lit glow layer faded 0 -> 1 -> 0 on a 5s cycle (inner light only)
     space - PerfectMATH: emblem + glow layer (screen blend) 30% -> 100% -> 30% on a 5s sine
     video - SEXAMATH / PerfectMATH / IKnowItAll: the approved animated lockup plays as-is (no extra pulse)
   --------------------------------------------------------------------------- */
.hero-glow,
.hero-video { display: none; }

.logo-core-wrap-hero[data-kind="art"] .logo-core-pulse-hero,
.logo-core-wrap-hero[data-kind="space"] .logo-core-pulse-hero,
.logo-core-wrap-hero[data-kind="video"] .logo-core-pulse-hero,
.logo-core-wrap-hero[data-kind="video"] .hero-logo { display: none; }

.logo-core-wrap-hero[data-kind="art"] .hero-glow,
/* PerfectMATH glow.webp is cropped from perfectmath-9cube-v1-emblem-inner-glow-only.png
   on the same 2048 canvas as the emblem (not the cube inside clean-logo-tm.png). */
.logo-core-wrap-hero[data-kind="space"] .hero-glow {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  animation: si-art-pulse 5s ease-in-out infinite;
}

.logo-core-wrap-hero[data-kind="space"] .hero-glow {
  mix-blend-mode: screen;
  opacity: 0.3;
  animation-name: si-space-pulse;
}

.logo-core-wrap-hero[data-kind="video"] .hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Art brands with no glow layer (PerfectMATH's static lockup): an img without src must not draw a broken-image frame. */
.logo-core-wrap-hero .hero-glow:not([src]) { display: none !important; }

@keyframes si-art-pulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes si-space-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* SEXAMATH: wordmark is already part of the animated art. IKnowItAll: wordmark is in the mascot sticker. */
.hero-name.is-in-art {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Dark brands (SEXAMATH on a flat navy, PerfectMATH on the space plate). Brand-name text goes light
   so it stays legible; "Super Intelligence" keeps its accent fill + thin black outline. */
html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #070a15;
  background-image: radial-gradient(ellipse 90% 80% at 50% 38%, #0e1428 0%, #080b17 50%, #05070f 100%);
}

html[data-theme="space"],
html[data-theme="space"] body {
  background-color: #03050c;
  background-image: url("assets/brands/perfectmath/space-plate.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

html[data-theme="dark"],
html[data-theme="space"] {
  color-scheme: dark;
  --ink: #eef0f8;
  --ink-soft: #cfd3e4;
  --muted: #a3a9c0;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.32);
  --surface: rgba(12, 16, 32, 0.78);
  --surface-alt: rgba(24, 30, 54, 0.82);
  --chip: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-focus: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 32px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .hero-name,
html[data-theme="space"] .hero-name,
html[data-theme="dark"] .hero-name .tm,
html[data-theme="space"] .hero-name .tm,
html[data-theme="dark"] .tagline-name,
html[data-theme="space"] .tagline-name,
html[data-theme="dark"] .hero-tagline .tm,
html[data-theme="space"] .hero-tagline .tm,
html[data-theme="dark"] .brand-full-name,
html[data-theme="space"] .brand-full-name,
html[data-theme="dark"] .brand-full-name .tm,
html[data-theme="space"] .brand-full-name .tm,
html[data-theme="dark"] .brand-wordmark,
html[data-theme="space"] .brand-wordmark,
html[data-theme="dark"] .brand-wordmark-row .tm,
html[data-theme="space"] .brand-wordmark-row .tm {
  color: #f4f5fb;
}

html[data-theme="dark"] .ask-fields textarea,
html[data-theme="space"] .ask-fields textarea { color: #f4f5fb; caret-color: #f4f5fb; }
html[data-theme="dark"] .ask-fields textarea::placeholder,
html[data-theme="space"] .ask-fields textarea::placeholder { color: #b9bed3; opacity: 1; }
html[data-theme="dark"] .ask-box,
html[data-theme="space"] .ask-box { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html[data-theme="dark"] .ask-submit,
html[data-theme="space"] .ask-submit { background: #f4f5fb; color: #0b0f1e; }
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="space"] .icon-btn:hover,
html[data-theme="dark"] .icon-btn:focus-visible,
html[data-theme="space"] .icon-btn:focus-visible { background: rgba(255, 255, 255, 0.12); }
html[data-theme="dark"] .answer-copy-btn:hover,
html[data-theme="space"] .answer-copy-btn:hover,
html[data-theme="dark"] .answer-copy-btn:focus-visible,
html[data-theme="space"] .answer-copy-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #f4f5fb;
}

/* White answer / proof / audit cards keep light-theme ink on dark and space
   pages, so body, headings and audit text stay high-contrast (WCAG AA+).
   The caption, gold arrow and blue button sit outside these cards and are
   unchanged. */
html[data-theme="dark"] .answer-card,
html[data-theme="space"] .answer-card,
html[data-theme="dark"] .reasoning-body,
html[data-theme="space"] .reasoning-body {
  color-scheme: light;
  --ink: #111111;
  --ink-soft: #1a1a1a;
  --muted: #4a4a4a;
  --faint: #6b6b6b;
  --line: #e4e4e7;
  --line-strong: #c8c8ce;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --chip: #f2f3f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  color: var(--ink);
}
html[data-theme="dark"] .answer-card .answer-copy-btn:hover,
html[data-theme="space"] .answer-card .answer-copy-btn:hover,
html[data-theme="dark"] .answer-card .answer-copy-btn:focus-visible,
html[data-theme="space"] .answer-card .answer-copy-btn:focus-visible {
  background: #f3f4f6;
  color: var(--ink);
}
html[data-theme="dark"] .reasoning-body .hexad-pill,
html[data-theme="space"] .reasoning-body .hexad-pill {
  border-color: var(--line);
  background: var(--chip);
  color: var(--ink-soft);
}
html[data-theme="dark"] .demo-btn,
html[data-theme="space"] .demo-btn { color: #dfe2f0; }
html[data-theme="dark"] .demo-btn:hover,
html[data-theme="space"] .demo-btn:hover { color: #fff; }
html[data-theme="dark"] .spec-tag,
html[data-theme="space"] .spec-tag { color: #cfd3e4; }
html[data-theme="dark"] .beta-tag,
html[data-theme="space"] .beta-tag { color: #c4b5fd; }

@media (prefers-reduced-motion: reduce) {
  .logo-core-wrap-hero[data-kind="art"] .hero-glow { animation: none !important; opacity: 0.6; }
  .logo-core-wrap-hero[data-kind="space"] .hero-glow { animation: none !important; opacity: 0.65; }
  .logo-core-wrap-hero[data-kind="video"] .hero-video { display: none !important; }
  .logo-core-wrap-hero[data-kind="video"] .hero-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}


/* Spelled-out name is ALWAYS one line: "<Name> Super Intelligence™". Never wraps; shrinks with the viewport. */
.hero-tagline,
.home-hero[data-tagline-position="above"] .hero-tagline {
  white-space: nowrap;
  max-width: 100%;
  font-size: min(calc(var(--wordmark-size) * 0.48), 4.3vw);
}
.hero-tagline .tagline-name,
.hero-tagline .tagline-si,
.brand-full-name .tagline-name,
.brand-full-name .tagline-si { white-space: nowrap; }
@media (max-width: 380px) {
  .hero-tagline { letter-spacing: 0.06em; }
}


/* SEXAMATH: the v6 animated lockup already contains SEXAMATH.si(TM) + SUPER INTELLIGENCE, so nothing is
   added around it (no spelled-out line, no extra wordmark). The page uses the lockup's own flat navy so the
   video sits seamlessly with no panel or band. */
.hero-tagline.is-in-art {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
html[data-brand="sexamath"][data-theme="dark"],
html[data-brand="sexamath"][data-theme="dark"] body {
  /* Sampled visible lockup-video edge is ~#080b16; match the field to it. */
  background-color: #080b16;
  background-image: none;
}

/* CookieTush black theme, intro video, and #2D7BFF button: see the brand-scoped block at the end. */

/* FreeIntellect: cyan #7FE2F0 Super Intelligence with a 2px black outline. */
html[data-brand="freeintellect"] .tagline-si {
  -webkit-text-stroke: 2px #000000;
  paint-order: stroke fill;
}
html[data-brand="freeintellect"] .hero-tagline .tm,
html[data-brand="freeintellect"] .brand-full-name .tm { color: #000000; }

/* MadIntellect: violet #C67CEB Super Intelligence, 2px black outline, pulse 70% → 100%. */
html[data-brand="madintellect"] .tagline-si {
  -webkit-text-stroke: 2px #000000;
  paint-order: stroke fill;
}
html[data-brand="madintellect"] .hero-tagline .tm,
html[data-brand="madintellect"] .brand-full-name .tm { color: #000000; }

/* Header wordmark: the name and ™ sit tight, with no switcher caret. */
.brand-wordmark {
  width: auto;
  max-width: 100%;
  margin: 0;
  flex: 0 0 auto;
}
.brand-wordmark-row {
  width: max-content;
  max-width: 100%;
  align-items: flex-start;
  padding-right: 0;
  gap: 0;
}
.brand-wordmark-row .tm {
  flex: 0 0 auto;
  margin-left: 1px;
  position: relative;
  top: 1px;
}

/* PerfectMATH: master header lockup (PERFECT MATH(tm), PERFECT MATH Super Intelligence(tm),
   PerfectMath.Si(tm) and the E_total equation) on the light page. The lockup already carries
   the Super Intelligence line, so no extra tagline is added under it. */
html[data-brand="perfectmath"] .page.is-home {
  --home-reserve: 19.5rem;
}
@media (max-width: 520px) {
  html[data-brand="perfectmath"] .page.is-home { --home-reserve: 18.5rem; }
}
@media (max-height: 680px) {
  html[data-brand="perfectmath"] .page.is-home { --home-reserve: 17.25rem; }
}
@media (max-height: 580px) {
  html[data-brand="perfectmath"] .page.is-home { --home-reserve: 15.5rem; }
}

/* Dark video lockup (SEXAMATH): feather the baked-in field into the page so the
   16:9 frame does not read as a rectangular block. IKnowItAll keeps its
   own tighter 1.5% mask (the mascot is already cropped to the box). */
html[data-brand="sexamath"] .logo-core-wrap-hero[data-kind="video"] .hero-video,
html[data-brand="sexamath"] .logo-core-wrap-hero[data-kind="video"] .hero-logo {
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 3.5%, #000 96.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 3.5%, #000 96.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-composite: intersect;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

/* HEXAD state indicator (M24): subtle, inside the verdict banner only (landing stays no-scroll). */
.hexad-pill{display:inline-flex;align-items:center;gap:6px;margin-top:4px;padding:2px 8px;border-radius:999px;
  font-size:11px;letter-spacing:.02em;opacity:.82;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.18);width:max-content}
.hexad-dots{display:inline-flex;gap:3px}
.hexad-dot{width:6px;height:6px;border-radius:50%;background:#888;display:inline-block}
.hexad-dot.hexad-stable{background:#62d987}.hexad-dot.hexad-rotating{background:#fcd208}
.hexad-dot.hexad-conflicting{background:#ff6b6b}.hexad-dot.hexad-unresolved{background:#9aa4b2}
.hexad-pill.hexad-stable{border-color:rgba(98,217,135,.5)}.hexad-pill.hexad-rotating{border-color:rgba(252,210,8,.5)}
.hexad-pill.hexad-conflicting{border-color:rgba(255,107,107,.5)}

/* Live writer status */
.writer-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
}
.writer-chip.is-warn, .spec-tag.is-warn { color: #8a4b00; border-color: #e0b36a; background: #fff6e5; }
.writer-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e0b36a;
  background: #fff6e5;
  color: #6b3b00;
  font-size: 13px;
  line-height: 1.4;
}
.direct-answer.is-long { font-size: 1.1rem; line-height: 1.55; font-weight: 500; letter-spacing: -0.01em; }

/* Hide the default cube if a non-cube brand still has that src (first-paint safety). */
html[data-brand]:not([data-brand="totalintellect"]) img.hero-logo[src*="logo-cube-studio"],
html[data-brand]:not([data-brand="totalintellect"]) img.brand-mark[src*="logo-cube-studio"] {
  visibility: hidden;
}


/* IKnowItAll.si only: enlarge the mascot lockup and erase the video square.
   After the 1.20 crop, the visible video edge is a flat #ededed (raw-file
   corners are darker #e6e6e6 and no longer reach the box). The page is the
   same flat color so the lighter rectangular block disappears, including
   when the bubble sits beside Ashyo. Edges stay feathered for encoder drift. */
html[data-brand="iknowitall"],
html[data-brand="iknowitall"] body {
  background-color: #ededed;
  background-image: none;
}

/* IKnowItAll home is locked to one viewport like every other brand.
   The mascot scales with leftover height (no fixed 700px) so the speech
   bubble, ask box and test chips stay on screen. --home-reserve includes
   the bubble. The lockup can still go edge-to-edge on wide, short pages. */
html[data-brand="iknowitall"] .page.is-home {
  /* Includes the speech bubble sitting under the mascot, with one-row chips. */
  --home-reserve: 29.75rem;
}
@media (max-width: 780px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 28.25rem; }
}
@media (max-width: 520px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 24.5rem; }
}
@media (max-height: 850px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 26.75rem; }
}
@media (max-height: 780px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 26.25rem; }
}
@media (max-height: 680px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 22rem; }
}
@media (max-height: 580px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 20.5rem; }
}
@media (max-height: 500px) {
  html[data-brand="iknowitall"] .page.is-home { --home-reserve: 19.5rem; }
}

html[data-brand="iknowitall"] .page.is-home .home-hero {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  flex: 1 1 auto;
  min-height: 0;
}
html[data-brand="iknowitall"] .page.is-home .logo-core-wrap-hero {
  --iki-hero: min(700px, 100%, max(140px, calc(var(--home-vh) - var(--home-reserve))));
  width: var(--iki-hero);
  max-width: 100%;
  max-height: var(--iki-hero);
  height: auto;
  aspect-ratio: 1;
  overflow: hidden;
}

html[data-brand="iknowitall"] .logo-core-wrap-hero[data-kind="video"] .hero-video,
html[data-brand="iknowitall"] .logo-core-wrap-hero[data-kind="video"] .hero-logo {
  /* The lockup is authored with ~10% side pad and ~16–19% top/bottom pad.
     Zoom so Ashyo and the wordmark fill the box; a tight 1.5% feather still
     hides the encoder seam without eating the lockup line. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48.5%;
  transform: scale(1.20);
  transform-origin: 50% 48.5%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 1.5%, #000 98.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 1.5%, #000 98.5%, transparent 100%);
  -webkit-mask-composite: source-in;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 1.5%, #000 98.5%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 1.5%, #000 98.5%, transparent 100%);
  mask-composite: intersect;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

/* Wide, short desktops: put the bubble beside Ashyo (tail pointing left)
   so the mascot can use leftover height instead of shrinking under the bubble. */
@media (min-width: 860px) and (max-height: 700px) {
  html[data-brand="iknowitall"] .page.is-home {
    --home-reserve: 15.5rem;
  }
  html[data-brand="iknowitall"] .page.is-home .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 26rem);
    grid-template-rows: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "hero greet"
      "ask ask"
      "demos demos";
    align-items: center;
    column-gap: 4px;
    row-gap: 6px;
  }
  html[data-brand="iknowitall"] .page.is-home .home-hero {
    grid-area: hero;
    width: auto;
    max-width: 100%;
    margin: 0;
    justify-self: end;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  html[data-brand="iknowitall"] .page.is-home .logo-core-wrap-hero {
    --iki-hero: min(700px, 100%, max(140px, calc(var(--home-vh) - var(--home-reserve))));
    width: var(--iki-hero);
    height: var(--iki-hero);
    max-width: 100%;
    max-height: 100%;
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting {
    grid-area: greet;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 8px 0 18px;
    justify-content: flex-start;
    align-self: center;
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting-bubble {
    transform-origin: 0 50%;
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting-bubble::before,
  html[data-brand="iknowitall"] .page.is-home .hero-greeting-bubble::after {
    left: auto;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting-bubble::before {
    top: 50%;
    left: -14px;
    width: 14px;
    height: 22px;
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting-bubble::after {
    top: 50%;
    left: -11px;
    width: 12px;
    height: 16px;
  }
  html[data-brand="iknowitall"] .page.is-home .ask-box { grid-area: ask; }
  html[data-brand="iknowitall"] .page.is-home .demos { grid-area: demos; }
}

/* IKnowItAll.si only: mascot greeting between the lockup and the ask box.
   Hidden on every other brand and once the page leaves the home screen.
   The bubble reserves its final size up front so word-by-word typing cannot
   shift the ask box. It pops in with a springy overshoot, types the greeting,
   then idles on a gentle float. prefers-reduced-motion shows the finished state. */
.hero-greeting {
  display: none;
}

html[data-brand="iknowitall"] .page.is-home .hero-greeting {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto clamp(16px, 2.4vh, 28px);
  padding: 16px 24px 0;
}

html[data-brand="iknowitall"] .hero-greeting-bubble {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: 16px 22px 18px;
  background: #ffffff;
  border: 2px solid #111111;
  border-radius: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
  transform-origin: 50% 0%;
}

/* Comic tail pointing up toward the mascot: dark outline, then white fill. */
html[data-brand="iknowitall"] .hero-greeting-bubble::before,
html[data-brand="iknowitall"] .hero-greeting-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 22px;
  height: 14px;
  transform: translateX(-50%);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  pointer-events: none;
}
html[data-brand="iknowitall"] .hero-greeting-bubble::before {
  top: -14px;
  background: #111111;
  z-index: 0;
}
html[data-brand="iknowitall"] .hero-greeting-bubble::after {
  top: -11px;
  width: 16px;
  height: 12px;
  background: #ffffff;
  z-index: 1;
}

html[data-brand="iknowitall"] .hero-greeting-text {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 1.65vw, 20px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #161616;
  text-align: center;
  text-wrap: pretty;
}

html[data-brand="iknowitall"] .hero-greeting-name {
  font-weight: 700;
  color: #111111;
}

html[data-brand="iknowitall"] .hero-greeting-brand {
  color: var(--si-pulse, #fcd208);
  font-weight: 700;
  -webkit-text-stroke: max(0.7px, 0.04em) #111111;
  paint-order: stroke fill;
}

/* Reserve the finished typography while words are still unspoken. */
html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-awaiting .hero-greeting-text,
html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-typing .hero-greeting-word:not(.is-spoken) {
  visibility: hidden;
}

html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-awaiting .hero-greeting-bubble {
  opacity: 0;
}

html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-popping .hero-greeting-bubble {
  animation: hero-greeting-pop 0.72s cubic-bezier(0.22, 1.45, 0.32, 1) both;
}

html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-idle .hero-greeting-bubble {
  animation: hero-greeting-float 3.8s ease-in-out infinite;
}

@keyframes hero-greeting-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.45);
  }
  52% {
    opacity: 1;
    transform: translateY(-10px) scale(1.14);
  }
  72% {
    transform: translateY(4px) scale(0.94);
  }
  86% {
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-greeting-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 520px) {
  html[data-brand="iknowitall"] .page.is-home .hero-greeting {
    margin-bottom: clamp(10px, 1.6vh, 16px);
    padding: 12px 16px 0;
  }
  html[data-brand="iknowitall"] .hero-greeting-bubble {
    padding: 12px 16px 14px;
    border-radius: 24px;
  }
  html[data-brand="iknowitall"] .hero-greeting-text {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-height: 800px) {
  html[data-brand="iknowitall"] .page.is-home .hero-greeting {
    margin-bottom: 12px;
    padding-top: 10px;
  }
  html[data-brand="iknowitall"] .hero-greeting-bubble {
    padding: 12px 18px 14px;
  }
}
@media (max-height: 680px) {
  html[data-brand="iknowitall"] .page.is-home .hero-greeting {
    margin-bottom: 8px;
    padding-top: 8px;
    max-width: 34rem;
  }
  html[data-brand="iknowitall"] .hero-greeting-bubble {
    padding: 10px 14px 12px;
  }
  html[data-brand="iknowitall"] .hero-greeting-text {
    font-size: 15px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-brand="iknowitall"] .page.is-home .hero-greeting .hero-greeting-bubble,
  html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-popping .hero-greeting-bubble,
  html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-idle .hero-greeting-bubble,
  html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-awaiting .hero-greeting-bubble {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-awaiting .hero-greeting-text,
  html[data-brand="iknowitall"] .page.is-home .hero-greeting.is-typing .hero-greeting-word:not(.is-spoken),
  html[data-brand="iknowitall"] .page.is-home .hero-greeting .hero-greeting-word {
    visibility: visible !important;
  }
}



/* IKnowItAll only: full-width chrome-bezel Booby Trap bar, yellow outlined cue. */
html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary {
  position: relative;
  overflow: visible;
  padding: 16px 22px 18px;
  border: 7px solid transparent;
  border-radius: 14px;
  background:
    linear-gradient(
      180deg,
      #9ed0ff 0%,
      #4a9aff 45%,
      #6aa8ff 48.5%,
      rgba(255, 255, 255, 0.92) 49.6%,
      rgba(255, 255, 255, 0.92) 50.5%,
      #0a38b8 51.4%,
      #062a90 78%,
      #041e6a 100%
    ) padding-box,
    linear-gradient(
      155deg,
      #f3f3f6 0%,
      #d0d0d6 12%,
      #9a9aa4 32%,
      #5a5a64 50%,
      #8a8a94 62%,
      #c8c8d0 82%,
      #f0f0f4 100%
    ) border-box;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.85),
    inset -1px -1px 0 rgba(30, 30, 38, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 10px 18px rgba(0, 0, 0, 0.18);
  text-shadow:
    0 1px 1px rgba(0, 10, 40, 0.9),
    0 -1px 1px rgba(0, 10, 40, 0.55),
    1px 0 1px rgba(0, 10, 40, 0.45),
    -1px 0 1px rgba(0, 10, 40, 0.45);
}


html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary .syltrap-label,
html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary .syltrap-label-short {
  position: relative;
  z-index: 1;
}

html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(30, 30, 38, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 8px rgba(0, 0, 0, 0.28),
    0 10px 18px rgba(0, 0, 0, 0.18),
    0 0 18px rgba(80, 160, 255, 0.45);
}

html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary:active,
html[data-brand="iknowitall"] .reasoning-fold[open] > summary.syltrap-summary {
  transform: translateY(3px);
  filter: brightness(0.9);
  background:
    linear-gradient(
      180deg,
      #6eb4ff 0%,
      #2a78e8 45%,
      #3d7ee0 48.5%,
      rgba(255, 255, 255, 0.7) 49.6%,
      rgba(255, 255, 255, 0.7) 50.5%,
      #072c96 51.4%,
      #051e70 78%,
      #03144c 100%
    ) padding-box,
    linear-gradient(
      155deg,
      #ececf0 0%,
      #c8c8d0 18%,
      #8a8a94 42%,
      #4e4e56 50%,
      #7a7a84 60%,
      #bcbcc4 80%,
      #e8e8ee 100%
    ) border-box;
  box-shadow:
    inset 0 3px 6px rgba(0, 10, 50, 0.4),
    inset 1px 1px 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 rgba(20, 20, 28, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.28);
}

html[data-brand="iknowitall"] .syltrap-press {
  color: #FFD400;
  -webkit-text-stroke: 1.5px #000000;
  paint-order: stroke fill;
  text-shadow:
    -1.5px -1.5px 0 #000000,
     1.5px -1.5px 0 #000000,
    -1.5px  1.5px 0 #000000,
     1.5px  1.5px 0 #000000,
     0 0 0 #000000;
}

html[data-brand="iknowitall"] .syltrap-arrow-body {
  fill: #FFD400;
  stroke: #000000;
  stroke-width: 3;
  stroke-linejoin: miter;
  paint-order: stroke fill;
}

html[data-brand="iknowitall"] .syltrap-arrow {
  filter:
    drop-shadow(1.5px 0 0 #000000)
    drop-shadow(-1.5px 0 0 #000000)
    drop-shadow(0 1.5px 0 #000000)
    drop-shadow(0 -1.5px 0 #000000);
}

html[data-brand="iknowitall"] .syltrap-prompt {
  filter:
    drop-shadow(0 0 3px rgba(255, 212, 0, 0.95))
    drop-shadow(0 0 8px rgba(255, 212, 0, 0.75))
    drop-shadow(0 0 16px rgba(255, 212, 0, 0.45));
  animation: syltrap-iki-arrow-pulse 1.8s ease-in-out infinite;
}

@keyframes syltrap-iki-arrow-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 3px rgba(255, 212, 0, 0.95))
      drop-shadow(0 0 8px rgba(255, 212, 0, 0.7))
      drop-shadow(0 0 14px rgba(255, 212, 0, 0.35));
  }
  50% {
    filter:
      drop-shadow(0 0 6px rgba(255, 212, 0, 1))
      drop-shadow(0 0 12px rgba(255, 212, 0, 0.9))
      drop-shadow(0 0 20px rgba(255, 212, 0, 0.55));
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-brand="iknowitall"] .syltrap-prompt {
    animation: none;
    filter:
      drop-shadow(0 0 4px rgba(255, 212, 0, 0.95))
      drop-shadow(0 0 10px rgba(255, 212, 0, 0.7));
  }
}

@media (max-width: 390px) {
  html[data-brand="iknowitall"] .reasoning-fold > summary.syltrap-summary {
    padding: 14px 16px 16px;
    border-width: 7px;
    min-height: 64px;
  }
}

/* ========================================================================
   CookieTush only: black page, white + violet-pink chrome, 16:9 intro
   video on the no-scroll home, and a #2D7BFF Booby Trap button.
   ======================================================================== */
html[data-brand="cookietush"][data-theme="dark"],
html[data-brand="cookietush"][data-theme="dark"] body,
html[data-brand="cookietush"],
html[data-brand="cookietush"] body {
  background-color: #000000;
  background-image: none;
}

html[data-brand="cookietush"] {
  --ink: #f5f5f7;
  --ink-soft: #e8e0f0;
  --muted: #c4b8d0;
  --faint: #9a8aa8;
  --line: rgba(232, 124, 255, 0.38);
  --line-strong: #E87CFF;
  --surface: #141116;
  --surface-alt: #1c161f;
  --chip: rgba(232, 124, 255, 0.14);
  --accent: #E87CFF;
  --accent-soft: rgba(232, 124, 255, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 8px 28px rgba(0, 0, 0, 0.55);
  --shadow-focus: 0 0 0 2px rgba(232, 124, 255, 0.4), 0 10px 32px rgba(0, 0, 0, 0.6);
}

html[data-brand="cookietush"] .hero-name,
html[data-brand="cookietush"] .hero-name .tm,
html[data-brand="cookietush"] .tagline-name,
html[data-brand="cookietush"] .hero-tagline .tm,
html[data-brand="cookietush"] .brand-full-name,
html[data-brand="cookietush"] .brand-full-name .tm,
html[data-brand="cookietush"] .brand-wordmark,
html[data-brand="cookietush"] .brand-wordmark-row .tm,
html[data-brand="cookietush"] .v1-link {
  color: #ffffff;
}
html[data-brand="cookietush"] .contact-link {
  color: #E87CFF;
}
html[data-brand="cookietush"] .contact-link:hover,
html[data-brand="cookietush"] .contact-link:focus-visible {
  color: #ffffff;
}
html[data-brand="cookietush"] .tagline-si {
  color: #E87CFF;
  -webkit-text-stroke: max(0.9px, 0.05em) #000000;
}
@media (prefers-reduced-motion: reduce) {
  html[data-brand="cookietush"] .tagline-si { color: #E16BFA; }
}

html[data-brand="cookietush"] .ask-box {
  background: #141116;
  border-color: rgba(232, 124, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(232, 124, 255, 0.16), 0 8px 28px rgba(0, 0, 0, 0.55);
}
html[data-brand="cookietush"] .ask-box:focus-within {
  border-color: #E87CFF;
  box-shadow: var(--shadow-focus);
}
html[data-brand="cookietush"] .ask-fields textarea {
  color: #ffffff;
  caret-color: #E87CFF;
}
html[data-brand="cookietush"] .ask-fields textarea::placeholder {
  color: #c4b8d0;
  opacity: 1;
}
html[data-brand="cookietush"] .ask-submit {
  background: #E87CFF;
  color: #000000;
}
html[data-brand="cookietush"] .ask-submit:hover,
html[data-brand="cookietush"] .ask-submit:focus-visible {
  background: #f3a6ff;
  color: #000000;
}
html[data-brand="cookietush"] .icon-btn { color: #ffffff; }
html[data-brand="cookietush"] .icon-btn:hover,
html[data-brand="cookietush"] .icon-btn:focus-visible {
  background: rgba(232, 124, 255, 0.18);
}
html[data-brand="cookietush"] .demo-btn { color: #e8e0f0; }
html[data-brand="cookietush"] .demo-btn:hover { color: #ffffff; border-color: #E87CFF; }
html[data-brand="cookietush"] .kicker-badge,
html[data-brand="cookietush"] .kicker-note,
html[data-brand="cookietush"] .syltrap-caption {
  color: #e8e0f0;
}

/* White answer/proof cards keep dark ink (shared dark-theme card reset). */

/* CookieTush Booby Trap button: readable as #2D7BFF, other brands unchanged. */
html[data-brand="cookietush"] .reasoning-fold > summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.14) 16%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #7EB6FF 0%, #2D7BFF 42%, #1A5AD6 74%, #0E3FA8 100%);
}
html[data-brand="cookietush"] .reasoning-fold > summary:active,
html[data-brand="cookietush"] .reasoning-fold[open] > summary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 14%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(180deg, #4A94FF 0%, #246EE8 45%, #1548B0 100%);
}

/* The intro loop IS the SI screen, laid out like IKnowItAll's hero:
   leftover-viewport box, no separate wordmark/tagline lockup under the
   video, ask box and chips pinned below. object-fit: contain keeps the
   baked-in speech bubble visible.
   Size the hero to the video (do not flex-grow). A growing hero plus
   flex-start left a black gap between the 16:9 frame and the ask box
   on large desktops, because the page column was capped at 980px so the
   video could not grow with leftover height. The stage already centers
   the video + ask + chips as one group. */
html[data-brand="cookietush"] .page.is-home .home-hero {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: clamp(6px, 1.2vh, 16px);
  flex: 0 1 auto;
  min-height: 0;
  gap: 0;
  justify-content: flex-start;
  align-items: center;
}
@media (max-height: 500px) {
  html[data-brand="cookietush"] .page.is-home .home-hero {
    justify-content: center;
  }
}
html[data-brand="cookietush"] .page.is-home .hero-lockup {
  display: contents;
}
html[data-brand="cookietush"] .page.is-home .hero-name {
  display: none;
}

/* Centered headline in the black band above the intro video. */
html[data-brand="cookietush"] .page.is-home .hero-tagline,
html[data-brand="cookietush"] .page.is-home .hero-tagline.is-in-art {
  position: static;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  order: -1;
  flex: 0 0 auto;
  box-sizing: border-box;
  margin: 0 0 clamp(6px, 1vh, 12px);
  padding: 0 10px;
  font-size: clamp(15px, 4.6vw, 26px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  color: #ffffff;
}
html[data-brand="cookietush"] .page.is-home .hero-tagline .tagline-name,
html[data-brand="cookietush"] .page.is-home .hero-tagline .tagline-si {
  white-space: nowrap;
}
html[data-brand="cookietush"] .page.is-home .hero-tagline .tagline-name {
  color: #ffffff;
  -webkit-text-stroke: 0;
  text-shadow: none;
  animation: none;
  filter: none;
}
html[data-brand="cookietush"] .page.is-home .hero-tagline .tagline-si {
  color: #E16BFA;
  -webkit-text-stroke: 1px #ffffff;
  paint-order: stroke fill;
  text-shadow:
    0 0 8px rgba(225, 107, 250, 0.85),
    0 0 18px rgba(200, 107, 250, 0.55);
  animation: none;
  filter: none;
}
@supports not (paint-order: stroke fill) {
  html[data-brand="cookietush"] .page.is-home .hero-tagline .tagline-si {
    -webkit-text-stroke: 0;
    text-shadow:
      -1px 0 #fff, 1px 0 #fff, 0 -1px #fff, 0 1px #fff,
      -0.7px -0.7px #fff, 0.7px -0.7px #fff, -0.7px 0.7px #fff, 0.7px 0.7px #fff,
      0 0 8px rgba(225, 107, 250, 0.85),
      0 0 18px rgba(200, 107, 250, 0.55);
  }
}
html[data-brand="cookietush"] .page.is-home .hero-tagline .tm {
  color: #ffffff;
  -webkit-text-stroke: 0;
  text-shadow: none;
  animation: none;
  filter: none;
}
@media (max-width: 390px) {
  html[data-brand="cookietush"] .page.is-home .hero-tagline,
  html[data-brand="cookietush"] .page.is-home .hero-tagline.is-in-art {
    letter-spacing: 0.02em;
  }
}
html[data-brand="cookietush"] .page.is-home .logo-core-wrap-hero {
  /* Height budget is leftover viewport; width follows 16:9, capped by the
     (now full-viewport) page. Avoid percentage inside --ct-hero: it
     resolved as width or height depending on the property. */
  --ct-hero: max(140px, calc(var(--home-vh) - var(--home-reserve)));
  width: min(100%, calc(var(--ct-hero) * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: var(--ct-hero);
  overflow: hidden;
}
html[data-brand="cookietush"] .logo-core-wrap-hero[data-kind="video"] .hero-video,
html[data-brand="cookietush"] .logo-core-wrap-hero[data-kind="video"] .hero-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0;
}

/* Reserve is only topbar + headline + ask + one-row chips (the speech bubble is in the video).
   The home page uses the full viewport so the 16:9 SI screen can grow;
   the ask box and demo chips stay at the readable --max column. */
html[data-brand="cookietush"] .page.is-home {
  --home-reserve: 18.75rem;
  width: calc(100% - 36px);
  max-width: none;
}
html[data-brand="cookietush"] .page.is-home .ask-box,
html[data-brand="cookietush"] .page.is-home .demos {
  width: min(var(--max), 100%);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 780px) {
  html[data-brand="cookietush"] .page.is-home {
    --home-reserve: 19.25rem;
    width: calc(100% - 24px);
  }
}
@media (max-width: 520px) {
  html[data-brand="cookietush"] .page.is-home { --home-reserve: 20rem; }
  /* Phone: the 16:9 screen is already as large as the width allows.
     Don't stretch the hero (that leaves a dead black band above the ask).
     Size the hero to the video and vertically center the video+ask+chips group. */
  html[data-brand="cookietush"] .page.is-home .home-hero {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}
@media (max-height: 780px) {
  html[data-brand="cookietush"] .page.is-home { --home-reserve: 18.25rem; }
}
@media (max-height: 680px) {
  html[data-brand="cookietush"] .page.is-home { --home-reserve: 17.5rem; }
}
@media (max-height: 580px) {
  html[data-brand="cookietush"] .page.is-home { --home-reserve: 17rem; }
}
@media (max-height: 500px) {
  html[data-brand="cookietush"] .page.is-home { --home-reserve: 16.75rem; }
}

/* Live answer while the SI writer is still streaming */
.direct-answer.is-streaming::after {
  content: "\258D";
  margin-left: 2px;
  opacity: 0.45;
  animation: stream-caret 1s steps(2, start) infinite;
}
@keyframes stream-caret { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .direct-answer.is-streaming::after { animation: none; }
}

/* ---------------------------------------------------------------------------
   Host-served brand pitch (grocerys / fixyourcar / fixmycar / fastsign / fastsigns /
   rapidsigns / makemeasign). Headline + one short line + (optional) three steps under
   the lockup. It lives inside the home hero, so the home screen still fits one screen
   with no scroll: --pitch-h is added to --home-reserve and the logo shrinks to fit.
   --------------------------------------------------------------------------- */
.brand-pitch { display: none; }
html[data-pitch] .page.is-home .brand-pitch:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 0.9vh, 8px);
  flex: 0 0 auto;
  width: min(36rem, 94vw);
  margin: 0 auto;
  text-align: center;
}
.brand-headline {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: clamp(1.15rem, 4.4vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #1b1b20;
  text-wrap: balance;
}
.brand-subhead {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: clamp(0.82rem, 2.9vw, 0.98rem);
  font-weight: 500;
  line-height: 1.35;
  color: #4a4a54;
  text-wrap: balance;
}
.brand-steps {
  list-style: none;
  counter-reset: pitch-step;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 2px 0 0;
  padding: 0;
}
.brand-steps:empty { display: none; }
.brand-steps li {
  counter-increment: pitch-step;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent, #1f9d6a) 35%, #d8d8de);
  background: color-mix(in srgb, var(--accent, #1f9d6a) 7%, #ffffff);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: #2c2c32;
  white-space: nowrap;
}
.brand-steps li::before {
  content: counter(pitch-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #1f9d6a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Reserve = the base home reserve at each height breakpoint + the pitch block. */
html[data-pitch] .page.is-home { --pitch-h: 8.4rem; --home-reserve: calc(27.5rem + var(--pitch-h)); }
@media (max-width: 520px) {
  html[data-pitch] .page.is-home { --pitch-h: 8.6rem; }
  .brand-steps li { font-size: 0.7rem; padding-right: 8px; }
}
@media (max-height: 780px) {
  html[data-pitch] .page.is-home { --pitch-h: 7.6rem; --home-reserve: calc(25.25rem + var(--pitch-h)); }
}
@media (max-height: 700px) {
  html[data-pitch] .page.is-home .brand-steps { display: none; }
  html[data-pitch] .page.is-home { --pitch-h: 5.6rem; --home-reserve: calc(22.25rem + var(--pitch-h)); }
}
@media (max-height: 620px) {
  html[data-pitch] .page.is-home .brand-subhead { display: none; }
  html[data-pitch] .page.is-home { --pitch-h: 2.8rem; --home-reserve: calc(18.25rem + var(--pitch-h)); }
}
@media (max-height: 500px) {
  html[data-pitch] .page.is-home { --pitch-h: 2.6rem; --home-reserve: calc(17.85rem + var(--pitch-h)); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-pitch { transition: none; }
}
