:root {
  /* Canonical Killgate tokens (Play Store midnight system). */
  --bg: #030713;
  --surface: #091323;
  --surface-2: #0d1a2c;
  --border: #20314b;
  --text: #f8f9ff;
  --muted: #aab6ca;
  --purple: #a35cff;
  --purple-strong: #7446ed;
  --blue: #7a54f5;
  --studio-accent: #4f8cff;
  --focus: #7a54f5;
  --green: #52db76;
  --amber: #ffc042;
  --red: #ff5267;
  --radius: 15px;
  --shadow: 0 18px 48px rgb(0 0 0 / 0.42);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/*
  Product surfaces (use these names for new UI):
  .page-header, .panel / .operational-panel, .selectable-row,
  .status-callout, .report-card, .form-section / .evidence-form,
  .studio-step-actions / action bar.
  Violet (--purple) is for action/selection. Red/amber/green are decision states only.
*/

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgb(124 58 237 / 0.24), transparent 34rem),
    radial-gradient(circle at 95% 4%, rgb(37 99 235 / 0.17), transparent 29rem),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: #b9c6ff;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

button,
textarea,
input {
  font: inherit;
}

button,
.button-link {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--purple-strong), var(--blue));
  color: #fff;
  cursor: pointer;
  font-weight: 760;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

button:hover,
.button-link:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(139 92 246 / 0.45);
  outline-offset: 3px;
}

button.danger {
  border: 1px solid rgb(251 113 133 / 0.45);
  background: rgb(159 18 57 / 0.24);
  color: #fecdd3;
}

[hidden] {
  display: none !important;
}

/* Install stays invisible until beforeinstallprompt sets data-install-ready. */
.install-button:not([data-install-ready]) {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: max(10px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  background: rgb(9 11 17 / 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand img {
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.28);
}

.brand span {
  display: grid;
  line-height: 1.05;
}

.brand strong {
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgb(139 92 246 / 0.5);
  background: rgb(124 58 237 / 0.18);
  font-size: 0.86rem;
}

.connection-banner {
  position: sticky;
  z-index: 19;
  top: 68px;
  padding: 9px 18px;
  border-bottom: 1px solid rgb(251 191 36 / 0.35);
  background: #3b2d08;
  color: #fde68a;
  text-align: center;
  font-size: 0.84rem;
}

main,
footer {
  width: min(100% - 32px, 900px);
  margin-inline: auto;
}

main {
  padding: 58px 0 42px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 max(30px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 7vw, 5rem);
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.hero {
  max-width: 780px;
  padding: 42px 0 58px;
}

.hero.compact {
  max-width: 620px;
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero p,
.venture-hero > p {
  max-width: 690px;
  margin-bottom: 0;
  color: #b5bfd1;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 15px;
  color: #a78bfa;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.panel {
  margin-bottom: 50px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(23 28 40 / 0.94), rgb(13 17 26 / 0.97));
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(139 92 246 / 0.42);
  border-radius: 12px;
  background: rgb(124 58 237 / 0.14);
  color: #c4b5fd;
  font-size: 0.8rem;
  font-weight: 800;
}

.intake-panel form {
  margin-top: 26px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #d8deea;
  font-size: 0.86rem;
  font-weight: 680;
}

textarea {
  display: block;
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 16px;
  border: 1px solid #333c50;
  border-radius: 14px;
  background: #0b0e15;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

textarea::placeholder {
  color: #667085;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.form-footer button,
.action-stack button {
  padding: 0 20px;
}

.intake-note,
.callout {
  margin: 22px 0 -4px;
  padding: 12px 14px;
  border: 1px solid rgb(52 211 153 / 0.3);
  border-radius: 10px;
  background: rgb(6 78 59 / 0.18);
  color: #a7f3d0;
  font-size: 0.88rem;
}

.list-heading {
  margin: 4px 0 22px;
}

.venture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 54px;
}

.venture-card,
.empty-state {
  min-height: 165px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgb(17 21 31 / 0.82);
}

.venture-card {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.venture-card-link {
  display: block;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.venture-card-link:focus-visible {
  outline: 3px solid rgb(181 128 255 / 0.82);
  outline-offset: 3px;
}

.venture-card:hover {
  transform: translateY(-2px);
  border-color: #495672;
  background: var(--surface-2);
}

.venture-card p {
  margin: 18px 0 15px;
  color: #d6dce8;
  font-size: 0.92rem;
}

.venture-card-action {
  display: inline-flex;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.venture-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
}

.venture-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 780;
  white-space: nowrap;
}

.status-kill {
  border-color: rgb(251 113 133 / 0.35);
  background: rgb(159 18 57 / 0.2);
  color: #fda4af;
}

.status-pass {
  border-color: rgb(52 211 153 / 0.35);
  background: rgb(6 78 59 / 0.2);
  color: #6ee7b7;
}

.status-checking {
  border-color: rgb(251 191 36 / 0.3);
  background: rgb(120 53 15 / 0.18);
  color: #fde68a;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-content: center;
  gap: 5px;
  min-height: 185px;
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: #e3e7ef;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.78rem;
}

.back-nav {
  margin-bottom: 28px;
}

.venture-hero {
  padding: 12px 0 40px;
}

.venture-hero h1 {
  max-width: 850px;
  font-size: clamp(1.8rem, 5.5vw, 3.4rem);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.metrics div {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(17 21 31 / 0.76);
}

.metrics span {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics strong {
  font-size: 1rem;
}

.research-result h2 {
  margin-bottom: 20px;
}

.verdict-kill {
  color: var(--red);
}

.verdict-pass {
  color: var(--green);
}

.research-copy {
  color: #d6dce8;
  white-space: pre-wrap;
}

.validation-report {
  width: min(100%, 920px);
  margin: 0 auto 34px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  box-shadow: 0 24px 70px rgb(2 8 23 / 0.28);
  font-family: Georgia, "Times New Roman", serif;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.validation-report a {
  color: #1f5d91;
  overflow-wrap: anywhere;
}

.report-header,
.report-titleblock,
.report-verdict,
.report-section,
.report-footer {
  padding-inline: clamp(22px, 5vw, 62px);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-block: 24px 20px;
  border-bottom: 1px solid #d8e0e9;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.report-header > div:first-child > span,
.report-label,
.report-verdict span,
.report-contract {
  color: #526579;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.report-header p {
  margin: 3px 0 0;
  color: #6b7787;
  font-size: 0.78rem;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-actions .button-link,
.report-actions button {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 5px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.report-actions .secondary-button {
  border: 1px solid #8da1b6;
  background: #f8fafc;
  color: #173b67;
}

.report-titleblock {
  padding-block: 34px 24px;
}

.report-titleblock h1 {
  max-width: none;
  margin: 8px 0 0;
  color: #173b67;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  line-height: 1.08;
}

.report-contract {
  margin: 0;
}

.report-verdict {
  display: grid;
  grid-template-columns: 1fr minmax(145px, 0.24fr);
  margin-inline: clamp(22px, 5vw, 62px);
  padding: 0;
  border: 1px solid #89a0b8;
  background: #eaf2f8;
}

.report-tone-caution .report-verdict {
  border-color: #c98f8f;
  background: #fbecec;
}

.report-verdict > div {
  display: grid;
  gap: 5px;
  padding: 17px 19px;
}

.report-verdict > div + div {
  border-left: 1px solid #89a0b8;
}

.report-verdict strong {
  color: #173b67;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.15rem;
  line-height: 1.25;
}

.report-section {
  padding-block: 25px;
  border-bottom: 1px solid #e0e6ed;
}

.report-section h2 {
  margin: 0 0 12px;
  color: #173b67;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
}

.report-section h3 {
  margin: 20px 0 9px;
  color: #2b425d;
  font-size: 1rem;
}

.report-section p,
.report-section li,
.report-decision-copy {
  color: #263548;
  font-size: 1rem;
  line-height: 1.62;
}

.report-decision-copy {
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.report-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 5vw, 54px);
}

.report-print .report-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-scoreboard {
  border: 1px solid #8d9cac;
}

.report-scoreboard > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
}

.report-scoreboard > div + div {
  border-top: 1px solid #c4ced8;
}

.report-scoreboard strong,
.report-scoreboard span {
  padding: 11px 13px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.report-scoreboard span {
  border-left: 1px solid #c4ced8;
}

.score-pass {
  background: #e5f3df;
  color: #276020;
  font-weight: 800;
}

.score-next {
  background: #fff6dc;
  color: #785d08;
  font-weight: 800;
}

.report-source-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.report-source {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 18px;
  padding: 13px 15px;
  border: 1px solid #d3dce5;
  background: #f8fafc;
}

.report-source div {
  display: grid;
  gap: 3px;
}

.report-source div span,
.source-status {
  color: #607084;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.report-source p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.88rem;
}

.report-empty {
  padding: 12px 14px;
  background: #f3f6f9;
  color: #566477 !important;
}

.report-mech-intro {
  margin: 0 0 16px;
}

.report-mechanism-list {
  display: grid;
  gap: 14px;
}

.report-mech-card {
  padding: 16px 16px 14px;
  border: 1px solid #8d9cac;
  background: #fff;
}

.report-mech-card h3 {
  margin: 0 0 14px;
  color: #173b67;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.4;
}

.report-mech-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.report-mech-meta div {
  display: grid;
  gap: 3px;
}

.report-mech-meta dt,
.report-mech-rationale span,
.report-mech-source {
  color: #607084;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-mech-meta dd {
  margin: 0;
  color: #263548;
  font-size: 0.95rem;
  line-height: 1.45;
}

.report-mech-rationale {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  color: #263548;
  font-size: 0.95rem;
  line-height: 1.55;
}

.report-mech-rationale span {
  display: block;
  margin-bottom: 4px;
}

.report-mech-source {
  margin: 12px 0 0;
}

.report-next {
  background: #f3f7fb;
}

.report-proof-boundary {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 3px solid #b68022;
  background: #fff9e9;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 18px;
  color: #6c7786;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
}

@media (max-width: 680px) {
  .report-header,
  .report-actions {
    display: grid;
  }

  .report-actions {
    grid-template-columns: 1fr;
  }

  .report-verdict,
  .report-scoreboard > div {
    grid-template-columns: 1fr;
  }

  .report-verdict > div + div,
  .report-scoreboard span {
    border-top: 1px solid #c4ced8;
    border-left: 0;
  }
}

.report-print-page {
  background: #1b202b;
}

.report-print-page main {
  background: #3d4554;
  padding-bottom: 56px;
}

.report-print-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: rgb(17 21 31 / 0.94);
  backdrop-filter: blur(12px);
}

.report-print-toolbar a.text-link {
  color: #d6dce8;
  font-weight: 700;
}

.report-print-toolbar a.text-link:hover {
  color: #fff;
}

.report-print-size {
  margin: 0;
  color: #9ca6b8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-print-toolbar .button-link,
.report-print-toolbar button {
  min-height: 40px;
  padding: 10px 14px;
}

.report-print-toolbar .secondary-button {
  border: 1px solid #8da1b6;
  background: #f8fafc;
  color: #173b67;
}

.report-screen {
  overflow: visible;
}

@media (max-width: 680px) {
  .report-print-toolbar,
  .report-print-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.report-print-stage {
  display: flex;
  justify-content: center;
  overflow: hidden;
  height: auto;
  padding: 20px 12px 36px;
}

.report-print-page .report-sheet {
  flex: 0 0 8.5in;
  width: 8.5in;
  min-width: 8.5in;
  max-width: 8.5in;
  min-height: 11in;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 22px 60px rgb(0 0 0 / 0.38);
  color-scheme: light;
  transform-origin: top center;
}

.report-sheet .validation-report {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media print {
  @page {
    size: letter;
    margin: 0.55in;
  }

  body,
  main {
    background: #fff !important;
  }

  .app-header,
  .connection-banner,
  .back-nav,
  .venture-hero,
  .research-complete-notice,
  .journey-next,
  .contract-panel,
  .research-screening-outcome,
  .reality-panel,
  .audit-panel,
  .action-stack,
  body > footer,
  .report-actions,
  .report-print-toolbar,
  .report-print-page .app-header,
  .report-print-page footer,
  .report-print-page .skip-link {
    display: none !important;
  }

  .report-print-page main {
    padding: 0;
    background: #fff !important;
  }

  .report-print-stage {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .report-print-page .report-sheet {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: none;
    min-height: 0;
    box-shadow: none;
    zoom: 1 !important;
    transform: none !important;
  }

  .validation-report {
    width: 100%;
    margin: 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
    print-color-adjust: exact;
  }

  .report-section,
  .report-source,
  .report-verdict,
  .report-scoreboard > div,
  .report-mech-card {
    break-inside: avoid;
  }
}

.screening-ledger {
  margin-top: 24px;
}

.screening-ledger-summary {
  margin: 14px 0 6px;
  color: #d8dee9;
}

.screened-source-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.screened-source {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0c1018;
}

.screened-source-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.source-status,
.source-theme {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-status {
  color: #c4b5fd;
}

.screened-source-accepted .source-status {
  color: var(--green);
}

.screened-source-relevant_unverified .source-status {
  color: var(--amber);
}

.source-theme {
  color: var(--muted);
}

.screened-source-title,
.screened-source p,
.screened-source small {
  overflow-wrap: anywhere;
}

.screened-source-title {
  font-weight: 760;
}

.screened-source p {
  margin: 8px 0;
  color: #cbd3e1;
  font-size: 0.86rem;
}

.screened-source small {
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.question {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0c1018;
}

.question > span {
  color: #a78bfa;
  font-size: 0.73rem;
  font-weight: 800;
}

.question p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.action-stack {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin: 0 0 52px;
}

.action-stack form,
.action-stack button {
  width: 100%;
}

.killed-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 52px;
  padding: 18px;
  border: 1px solid rgb(251 113 133 / 0.34);
  border-radius: 13px;
  background: rgb(159 18 57 / 0.16);
  color: #fecdd3;
}

.killed-notice span {
  color: #fda4af;
  font-size: 0.88rem;
}

.button-link {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  padding: 0 20px;
  color: #fff;
}

@media (max-width: 640px) {
  main {
    padding-top: 28px;
  }

  .hero {
    padding: 32px 0 42px;
  }

  .panel {
    margin-bottom: 38px;
  }

  .venture-grid {
    grid-template-columns: 1fr;
  }

  .form-footer,
  .action-stack {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-footer button {
    width: 100%;
  }

  .form-footer .small {
    order: 2;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  footer {
    display: grid;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .reaction-carousel-viewport .reaction-card {
    animation: none;
  }
}

@media (display-mode: window-controls-overlay) {
  body {
    padding-top: env(titlebar-area-height, 0);
  }

  .app-header {
    position: fixed;
    top: env(titlebar-area-y, 0);
    left: env(titlebar-area-x, 0);
    width: env(titlebar-area-width, 100%);
    height: env(titlebar-area-height, 56px);
    min-height: 0;
    padding: 6px 12px;
    -webkit-app-region: drag;
  }

  .app-header a,
  .app-header button {
    -webkit-app-region: no-drag;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand small {
    display: none;
  }
}

/* v1.0 — single-user account + locked validation contract + direct-evidence gate */
select,
input[type="text"],
input[type="number"],
.evidence-form input:not([type]) {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #333c50;
  border-radius: 11px;
  background: #0b0e15;
  color: var(--text);
}

select:focus-visible {
  outline: 3px solid rgb(139 92 246 / 0.45);
  outline-offset: 3px;
}

.verdict-caution {
  color: var(--amber);
}

.callout.caution {
  border-color: rgb(251 191 36 / 0.34);
  background: rgb(120 53 15 / 0.16);
  color: #fde68a;
}

.contract-titleline,
.gate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.lock-badge {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgb(52 211 153 / 0.4);
  border-radius: 999px;
  background: rgb(6 78 59 / 0.22);
  color: #86efac;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.contract-thresholds,
.gate-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0;
}

.contract-thresholds > div,
.gate-metrics > div {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #0c1018;
}

.contract-thresholds span,
.gate-metrics span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contract-thresholds strong,
.gate-metrics strong {
  font-size: 0.88rem;
}

details {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgb(9 12 18 / 0.58);
}

summary {
  cursor: pointer;
  color: #dce3ee;
  font-weight: 760;
}

details h3 {
  margin: 20px 0 8px;
}

details li {
  margin-bottom: 6px;
  color: #cbd3e1;
}

.gate-progress {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid #3a455b;
  border-radius: 14px;
  background: rgb(9 12 18 / 0.68);
}

.decision-feedback {
  margin: 28px 0;
  border-color: rgb(34 211 238 / 0.3);
  background:
    radial-gradient(circle at 95% 0%, rgb(34 211 238 / 0.08), transparent 22rem),
    rgb(9 12 18 / 0.78);
}

.feedback-header,
.feedback-node-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.feedback-outcome,
.feedback-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgb(34 211 238 / 0.32);
  border-radius: 999px;
  background: rgb(8 47 73 / 0.28);
  color: #a5f3fc;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.feedback-boundary,
.feedback-loop-next {
  padding: 14px 16px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 10px 10px 0;
  background: rgb(8 47 73 / 0.22);
  color: #d8f7fb;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.feedback-node {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #0c1018;
}

.feedback-node h3,
.feedback-loop-next h3 {
  margin: 0;
}

.feedback-node p:last-of-type {
  margin-bottom: 0;
}

.feedback-node-pass { border-color: rgb(52 211 153 / 0.32); }
.feedback-node-pass .feedback-status { border-color: rgb(52 211 153 / 0.36); background: rgb(6 78 59 / 0.22); color: #a7f3d0; }
.feedback-node-caution { border-color: rgb(251 191 36 / 0.34); }
.feedback-node-caution .feedback-status { border-color: rgb(251 191 36 / 0.38); background: rgb(120 53 15 / 0.2); color: #fde68a; }
.feedback-node-stop { border-color: rgb(251 113 133 / 0.38); }
.feedback-node-stop .feedback-status { border-color: rgb(251 113 133 / 0.42); background: rgb(127 29 29 / 0.2); color: #fecdd3; }
.feedback-node-review { border-color: rgb(167 139 250 / 0.38); }
.feedback-node-review .feedback-status { border-color: rgb(167 139 250 / 0.42); background: rgb(76 29 149 / 0.2); color: #ddd6fe; }

.feedback-measure {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.feedback-measure > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgb(71 85 105 / 0.48);
  border-radius: 9px;
  background: rgb(2 6 23 / 0.34);
}

.feedback-measure dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.feedback-measure dd {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
}

.feedback-action {
  color: #dbeafe;
}

.feedback-loop-next {
  margin-bottom: 14px;
}

@media (max-width: 760px) {
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .feedback-header,
  .feedback-node-heading {
    display: grid;
  }

  .feedback-outcome,
  .feedback-status {
    justify-self: start;
  }
}

.gate-header > span {
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.evidence-form {
  display: grid;
  gap: 14px;
  margin: 18px 0 30px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0c1018;
}

.evidence-form textarea {
  min-height: 90px;
}

.evidence-form button {
  justify-self: start;
  padding: 0 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.void-form {
  display: grid;
  min-width: 220px;
  gap: 7px;
}

.void-form label,
.correction-reason {
  color: var(--muted);
  font-size: 0.72rem;
}

.void-form input {
  min-height: 38px;
}

.void-form button {
  min-height: 38px;
  padding: 0 10px;
}

.correction-status {
  display: block;
  color: #fda4af;
  font-weight: 800;
}

.correction-reason {
  display: block;
  max-width: 260px;
  margin-top: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.go-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 52px;
  padding: 18px;
  border: 1px solid rgb(52 211 153 / 0.35);
  border-radius: 13px;
  background: rgb(6 78 59 / 0.16);
  color: #a7f3d0;
}

@media (max-width: 760px) {
  .contract-thresholds,
  .gate-metrics,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contract-titleline,
  .gate-header {
    display: grid;
  }
}

.header-actions,.account-nav{display:flex;align-items:center;gap:.75rem}.account-nav form{margin:0}.text-button{background:transparent;border:0;padding:.35rem;color:inherit;text-decoration:underline;cursor:pointer}.auth-panel{max-width:620px;margin-inline:auto}.auth-panel form,.account-page form{display:grid;gap:.75rem}.billing-panel [data-play-subscribe]{margin-top:.5rem}
.auth-signup-cta{display:flex;align-items:center;justify-content:center;gap:.55rem;width:100%;margin-top:1rem;font-size:1.05rem;font-weight:750;text-decoration:none}
.research-run-status{margin:12px 0 0}.research-complete-notice{margin:0 0 20px}
.offer-grid{display:grid;gap:1rem;margin-top:1rem}
@media (min-width: 900px){.offer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.offer-card .price-label{font-size:1.4rem;font-weight:700;margin:.2rem 0}
.offer-card[data-offer-kind="venture_pass"]{border-color:var(--purple)}
.brief-page .research-copy{white-space:pre-wrap}


/* Brand surfaces */
body {
  background:
    radial-gradient(circle at 12% -8%, rgb(124 58 237 / 0.24), transparent 34rem),
    radial-gradient(circle at 95% 4%, rgb(37 99 235 / 0.17), transparent 29rem),
    linear-gradient(180deg, rgb(9 11 17 / 0.55), rgb(9 11 17 / 0.92)),
    url("/static/brand/hero-atmosphere.jpg") center top / cover no-repeat fixed,
    var(--bg);
}

.home-page .hero,
.brief-page .hero,
.auth-page .hero,
.offline-page .hero {
  position: relative;
}

.visual-panel {
  overflow: hidden;
  padding: 0;
}

.visual-panel img,
.spot-art {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.spot-art.tall { height: 280px; }

.empty-state {
  display: grid;
  align-content: end;
  background:
    linear-gradient(180deg, rgb(9 11 17 / 0.08), rgb(9 11 17 / 0.82)),
    url("/static/brand/empty-arena.jpg") center / cover no-repeat;
  min-height: 240px;
}

.offer-card {
  position: relative;
  overflow: hidden;
}

.offer-card::before {
  content: "";
  display: block;
  height: 118px;
  margin: -34px -34px 18px;
  background: url("/static/brand/pass-card.jpg") center / cover no-repeat;
  opacity: 0.88;
}

.offer-card[data-offer-kind="evidence_run"]::before,
.offer-card[data-offer-kind="subscription"]::before,
.offer-card[data-offer-kind="founder_topup"]::before {
  background-image: url("/static/brand/pass-card.jpg");
  filter: saturate(0.7);
}

.offer-card[data-offer-kind="subscription"]::before {
  filter: hue-rotate(-12deg);
}

.brief-art,
.offline-art,
.auth-art,
.verdict-art {
  width: min(100%, 420px);
  height: 220px;
  margin: 0 0 22px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.offline-page main,
.login-page main {
  background:
    linear-gradient(180deg, rgb(9 11 17 / 0.35), rgb(9 11 17 / 0.88));
}

.brand img {
  background: #0b1020;
}

/* Launch UI refinements — component layout only.
   Token values stay on the canonical midnight :root above; do not reintroduce a light theme here. */
:root {
  /* Intentionally empty of color overrides — canonical tokens live at file start. */
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 50% -14%, rgb(164 93 255 / 0.3), transparent 31rem),
    radial-gradient(circle at 100% 35%, rgb(46 90 184 / 0.22), transparent 39rem),
    linear-gradient(180deg, rgb(3 7 19 / 0.75), rgb(3 7 19 / 0.97) 42rem),
    url("/static/brand/hero-atmosphere.jpg") center top / cover fixed,
    var(--bg);
  color: var(--text);
}

h1,
h2,
button,
.brand strong {
  letter-spacing: 0;
}

a {
  color: #214f9f;
}

a:hover {
  color: #102f66;
}

.app-header {
  border-bottom-color: rgb(31 42 68 / 0.1);
  background: rgb(255 255 255 / 0.9);
}

.brand,
.brand:hover {
  color: var(--text);
}

.brand img {
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 42 68 / 0.16);
}

.brand small,
.muted,
.section-heading p,
.hero p,
.venture-hero > p,
.reaction-card figcaption,
.report-card p {
  color: var(--muted);
}

footer {
  border-top-color: var(--border);
}

button,
.button-link {
  border-radius: 8px;
  background: linear-gradient(120deg, #0f766e, #1d4ed8);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline-color: rgb(29 78 216 / 0.28);
}

.install-button {
  border-color: rgb(15 118 110 / 0.38);
  background: rgb(240 253 250 / 0.94);
  color: #115e59;
}

.panel,
.venture-card,
.empty-state,
.metrics div,
.contract-thresholds > div,
.gate-metrics > div,
.question,
.gate-progress,
.evidence-form,
details,
.billing-panel,
.offer-card {
  border-color: var(--border);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--shadow);
}

.panel {
  background: rgb(255 255 255 / 0.92);
}

.venture-card:hover {
  border-color: #95a7bd;
  background: #f8fbfd;
}

textarea,
select,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input:not([type]) {
  display: block;
  width: 100%;
  border-color: #b8c5d6;
  background: #fff;
  color: var(--text);
}

textarea::placeholder,
input::placeholder {
  color: #8291a6;
}

.eyebrow {
  color: #9f1239;
}

.step-number {
  border-color: rgb(15 118 110 / 0.28);
  border-radius: 8px;
  background: #e6f5f2;
  color: #0f766e;
}

.status-kill {
  border-color: rgb(190 18 60 / 0.25);
  background: #fff1f2;
  color: #be123c;
}

.status-pass {
  border-color: rgb(4 120 87 / 0.25);
  background: #ecfdf5;
  color: #047857;
}

.status-checking {
  border-color: rgb(161 98 7 / 0.28);
  background: #fffbeb;
  color: #92400e;
}

.callout,
.intake-note,
.go-notice {
  border-color: rgb(4 120 87 / 0.24);
  background: #ecfdf5;
  color: #065f46;
}

.callout.caution {
  border-color: rgb(161 98 7 / 0.28);
  background: #fffbeb;
  color: #92400e;
}

.problem-hero {
  max-width: 700px;
}

.problem-hero .callout {
  max-width: 640px;
  margin-top: 20px;
  margin-bottom: 0;
}

.problem-actions {
  margin-top: 22px;
}

button.danger {
  border-color: rgb(190 18 60 / 0.32);
  background: #fff1f2;
  color: #be123c;
}

.empty-state {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.58), rgb(255 255 255 / 0.94)),
    url("/static/brand/empty-arena.jpg") center / cover no-repeat;
}

.empty-state strong {
  color: var(--text);
}

.question p,
.venture-card p,
.research-copy,
details li {
  color: #2e3a4f;
}

.lock-badge {
  border-color: rgb(4 120 87 / 0.32);
  background: #ecfdf5;
  color: #047857;
}

.password-field {
  position: relative;
}

.password-field input {
  min-height: 46px;
  padding: 11px 56px 11px 13px;
  border-radius: 8px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #617086;
  box-shadow: none;
}

.password-toggle:hover {
  border-color: #cdd7e4;
  background: #f4f7fb;
  color: #172033;
  filter: none;
  transform: none;
}

.password-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.section-kicker {
  margin-bottom: 18px;
}

.product-explainer {
  margin-bottom: 50px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(145deg, #f8fbfd, #fff);
  box-shadow: var(--shadow);
}

.product-explainer .section-kicker {
  max-width: 760px;
}

.product-explainer .section-kicker p {
  margin-bottom: 0;
  color: #42516a;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.journey-card {
  padding: 18px;
  border: 1px solid #cdd7e4;
  border-radius: 8px;
  background: #fff;
}

.journey-card > span {
  display: inline-block;
  margin-bottom: 12px;
  color: #9f1239;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.journey-card h3 {
  margin: 0 0 8px;
}

.journey-card p {
  margin: 0;
  color: #42516a;
  font-size: 0.88rem;
  line-height: 1.5;
}

.scope-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #0f766e;
  background: #eff8f7;
  color: #29415a;
}

.user-reactions,
.sample-reports {
  margin-bottom: 50px;
}

.report-grid {
  display: grid;
  gap: 12px;
}

.report-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reaction-card,
.report-card {
  min-height: 164px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow);
}

.reaction-carousel {
  max-width: 760px;
  margin-inline: auto;
}

.reaction-carousel-viewport {
  display: grid;
}

.reaction-carousel-viewport .reaction-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 36px);
  animation: review-arrive 260ms ease-out;
}

.reaction-carousel-viewport .reaction-rating {
  margin-bottom: 18px;
}

.reaction-carousel-viewport blockquote {
  max-width: 44rem;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.58;
}

.review-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.review-arrow,
.review-toggle {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: none;
  color: var(--text);
}

.review-arrow {
  width: 44px;
  padding: 0;
  font-size: 1.1rem;
}

.review-toggle {
  min-width: 74px;
}

.review-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.review-dot[aria-current="true"] {
  width: 26px;
  background: var(--purple);
  border-color: var(--purple);
}

.review-counter {
  min-width: 3.25rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.studio-live-cta form {
  margin-top: 20px;
}

@keyframes review-arrive {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 420px) {
  .review-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .review-controls [data-review-previous] {
    grid-column: 1;
    grid-row: 1;
  }

  .review-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  .review-controls [data-review-next] {
    grid-column: 3;
    grid-row: 1;
  }

  .review-dots {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .review-counter {
    display: none;
  }
}

.reaction-card blockquote {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.45;
}

.reaction-rating {
  margin-bottom: 12px;
  color: #b45309;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.reaction-card figcaption {
  display: grid;
  gap: 4px;
}

.reaction-role {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.reaction-card figcaption,
.report-card span {
  font-size: 0.7rem;
  font-weight: 780;
  text-transform: uppercase;
}

.report-card {
  display: grid;
  gap: 9px;
  color: var(--text);
}

.report-card:hover {
  border-color: #95a7bd;
  background: #f8fbfd;
}

.report-card span {
  color: #9f1239;
}

.report-card strong {
  font-size: 1rem;
  line-height: 1.25;
}

.report-card p {
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-page .hero.compact {
  min-height: auto;
  padding: 26px 0 30px;
}

.auth-panel {
  margin-inline: 0;
}

.auth-panel form,
.account-page form {
  gap: 0.85rem;
}

@media (max-width: 880px) {
  .journey-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reaction-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .reaction-card,
  .report-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .product-explainer {
    padding: 20px;
  }

  .journey-grid {
    grid-template-columns: 1fr;
  }
}

/* Final accessibility and small-screen product polish. */
.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #172033;
  color: #fff;
  font-weight: 760;
  transform: translateY(-180%);
}

.skip-link:focus-visible {
  color: #fff;
  outline: 3px solid rgb(29 78 216 / 0.35);
  outline-offset: 3px;
  transform: translateY(0);
}

main:focus {
  outline: none;
}

.header-actions,
.account-nav {
  min-width: 0;
}

.account-nav form {
  flex: 0 0 auto;
}

.account-nav a {
  display: block;
  min-width: 0;
  max-width: min(34vw, 21rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  white-space: nowrap;
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  filter: none;
  opacity: 0.56;
  transform: none;
}

.idea-meta {
  display: grid;
  gap: 2px;
}

.idea-meta [data-file-status]:empty {
  display: none;
}

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-button {
  border: 1px solid #95a7bd;
  background: #fff;
  color: #214f9f;
}

.secondary-button:hover {
  border-color: #54739e;
  background: #f8fbfd;
  color: #102f66;
  filter: none;
}

.idea-preflight {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #b8c5d6;
  border-radius: 8px;
  background: #f8fbfd;
}

.idea-preflight-heading h3,
.idea-preflight-summary,
.preflight-next {
  margin: 0;
}

.idea-preflight-heading .eyebrow {
  margin-bottom: 8px;
}

.idea-preflight-summary {
  color: #172033;
  font-weight: 720;
}

.preflight-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.preflight-checks li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #cdd7e4;
  border-radius: 8px;
  background: #fff;
}

.preflight-checks li.is-present {
  border-color: rgb(4 120 87 / 0.32);
  background: #ecfdf5;
}

.preflight-marker {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #95a7bd;
  border-radius: 999px;
  color: #617086;
  font-size: 0.82rem;
  font-weight: 900;
}

.is-present .preflight-marker {
  border-color: #047857;
  background: #047857;
  color: #fff;
}

.preflight-checks strong {
  display: block;
  color: #172033;
  font-size: 0.86rem;
}

.preflight-checks p,
.preflight-next {
  color: #617086;
  font-size: 0.82rem;
  line-height: 1.45;
}

.preflight-checks p {
  margin: 3px 0 0;
}

.preflight-next {
  padding: 10px 12px;
  border-left: 3px solid #0f766e;
  background: #eff8f7;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.footer-nav a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .app-header {
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 0.94rem;
  }

  .header-actions,
  .account-nav {
    gap: 0.45rem;
    font-size: 0.85rem;
  }

  .account-nav a {
    max-width: 35vw;
  }

  .text-button {
    padding: 0.25rem;
  }

  .idea-meta {
    gap: 4px;
  }

  .idea-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .idea-actions button {
    width: 100%;
  }

  .preflight-checks {
    grid-template-columns: 1fr;
  }

  footer {
    gap: 10px;
  }
}

/* Play Store visual system — component skins.
   Tokens are canonical at file start; this block keeps artwork-derived component rules. */
:root {
  /* Mirror only if a future patch needs temporary local overrides. Prefer editing the top :root. */
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 50% -14%, rgb(164 93 255 / 0.3), transparent 31rem),
    radial-gradient(circle at 100% 35%, rgb(46 90 184 / 0.22), transparent 39rem),
    linear-gradient(180deg, rgb(3 7 19 / 0.75), rgb(3 7 19 / 0.97) 42rem),
    url("/static/brand/hero-atmosphere.jpg") center top / cover fixed,
    var(--bg);
  color: var(--text);
}

h1,
h2,
h3,
button,
.brand strong {
  letter-spacing: -0.025em;
}

a,
.footer-nav a {
  color: #c6b3ff;
}

a:hover,
.footer-nav a:hover {
  color: #fff;
}

.app-header {
  min-height: 74px;
  border-bottom-color: rgb(170 138 255 / 0.16);
  background: rgb(3 7 19 / 0.86);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.03), 0 14px 36px rgb(0 0 0 / 0.2);
}

.brand,
.brand:hover {
  color: var(--text);
}

.brand img {
  border: 1px solid rgb(203 179 255 / 0.45);
  border-radius: 12px;
  background: #030713;
  box-shadow: 0 8px 22px rgb(119 70 237 / 0.3);
}

.brand strong {
  font-size: 1.04rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.brand small {
  color: #a98aff;
}

.install-button {
  border-color: rgb(163 92 255 / 0.65);
  background: rgb(116 70 237 / 0.22);
  color: #efeaff;
}

footer {
  border-top-color: rgb(170 138 255 / 0.18);
  color: var(--muted);
}

.hero p,
.venture-hero > p,
.brand small,
.muted,
.section-heading p,
.reaction-card figcaption,
.report-card p {
  color: var(--muted);
}

.home-page .hero {
  min-height: min(57vh, 570px);
  max-width: 820px;
  overflow: hidden;
  padding: clamp(58px, 10vw, 112px) 0 clamp(52px, 8vw, 86px);
}

.home-page .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -38px -15vw -48px 28%;
  background:
    radial-gradient(circle at 50% 72%, rgb(167 92 255 / 0.36), transparent 14rem),
    linear-gradient(90deg, var(--bg), transparent 36%),
    url("/static/brand/killgate-play-store-feature.png") right center / auto 100% no-repeat;
  opacity: 0.44;
  pointer-events: none;
}

.eyebrow,
.journey-card > span,
.report-card span {
  color: #ae7aff;
}

.brand-accent {
  color: #a35cff;
  text-shadow: 0 0 24px rgb(163 92 255 / 0.22);
}

.home-page .hero h1 {
  max-width: 780px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.98;
}

.home-page .hero > p:not(.muted) {
  max-width: 580px;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  color: #e3ddf8;
}

.promo-gate-art {
  display: none;
}

button,
.button-link {
  border: 1px solid rgb(204 180 255 / 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, #9f5cff, #7042e8);
  box-shadow: 0 10px 25px rgb(102 58 220 / 0.32), inset 0 1px rgb(255 255 255 / 0.2);
  color: #fff;
}

button:hover,
.button-link:hover {
  border-color: rgb(224 213 255 / 0.7);
  color: #fff;
  filter: brightness(1.1);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: rgb(181 128 255 / 0.72);
}

.panel,
.venture-card,
.empty-state,
.metrics div,
.contract-thresholds > div,
.gate-metrics > div,
.question,
.gate-progress,
.evidence-form,
details,
.billing-panel,
.offer-card,
.product-explainer,
.journey-card,
.reaction-card,
.report-card {
  border-color: var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(13 27 47 / 0.95), rgb(6 14 28 / 0.96));
  box-shadow: var(--shadow);
}

.panel,
.product-explainer {
  background: linear-gradient(145deg, rgb(13 27 47 / 0.97), rgb(6 14 28 / 0.97));
}

.venture-card:hover,
.report-card:hover {
  border-color: rgb(165 111 255 / 0.67);
  background: linear-gradient(145deg, #132542, #0a1427);
}

.empty-state {
  background:
    linear-gradient(180deg, rgb(5 12 25 / 0.26), rgb(5 12 25 / 0.93)),
    url("/static/brand/empty-arena.jpg") center / cover no-repeat;
}

.empty-state strong,
.idea-preflight-summary,
.preflight-checks strong,
.reaction-card blockquote,
.report-card,
.question p,
.venture-card p,
.research-copy,
details li,
.journey-card p,
.product-explainer .section-kicker p {
  color: var(--text);
}

.step-number {
  border-color: rgb(163 92 255 / 0.46);
  border-radius: 11px;
  background: rgb(116 70 237 / 0.18);
  color: #d5c0ff;
}

textarea,
select,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input:not([type]) {
  border-color: #2a405e;
  border-radius: 12px;
  background: #07111f;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.025);
}

textarea::placeholder,
input::placeholder {
  color: #8392aa;
}

.secondary-button {
  border-color: #4d3c91;
  background: #101b32;
  box-shadow: none;
  color: #d5c0ff;
}

.secondary-button:hover {
  border-color: #a35cff;
  background: #192a49;
  color: #fff;
}

.idea-preflight {
  border-color: #334a6a;
  border-radius: var(--radius);
  background: #0a1627;
}

.preflight-checks li {
  border-color: #263b58;
  border-radius: 12px;
  background: #0c182a;
}

.preflight-checks li.is-present {
  border-color: rgb(82 219 118 / 0.48);
  background: rgb(18 89 66 / 0.28);
}

.preflight-marker {
  border-color: #4b5f7d;
  color: #aab6ca;
}

.is-present .preflight-marker {
  border-color: #52db76;
  background: #249451;
}

.preflight-checks p,
.preflight-next {
  color: var(--muted);
}

.preflight-next {
  border-left-color: #a35cff;
  background: rgb(116 70 237 / 0.13);
}

.status-pass,
.go-notice,
.callout,
.intake-note {
  border-color: rgb(82 219 118 / 0.38);
  background: rgb(20 104 73 / 0.24);
  color: #baf7c9;
}

.status-checking,
.callout.caution {
  border-color: rgb(255 192 66 / 0.4);
  background: rgb(114 73 8 / 0.25);
  color: #ffe09a;
}

.status-kill,
button.danger,
.killed-notice {
  border-color: rgb(255 82 103 / 0.42);
  background: rgb(117 24 45 / 0.28);
  color: #ffbdc7;
}

.lock-badge {
  border-color: rgb(82 219 118 / 0.43);
  background: rgb(20 104 73 / 0.24);
  color: #a7f5b9;
}

.scope-note {
  border-left-color: #a35cff;
  background: rgb(116 70 237 / 0.14);
  color: #e5dcff;
}

.password-toggle {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.password-toggle:hover {
  border-color: #3d5474;
  background: #111f36;
  color: #fff;
}

.skip-link {
  background: #a35cff;
}

@media (max-width: 640px) {
  .app-header {
    min-height: 66px;
  }

  .home-page .hero {
    min-height: auto;
    padding-top: 50px;
    text-align: center;
  }

  .home-page .hero h1,
  .home-page .hero > p:not(.muted) {
    margin-right: auto;
    margin-left: auto;
  }

  .home-page .hero::after {
    inset: 13% -16px auto 25%;
    height: 300px;
    opacity: 0.34;
  }

  .home-page .intake-panel .section-heading {
    display: block;
    text-align: center;
  }

  .home-page .intake-panel .step-number {
    display: none;
  }

  .home-page .intake-panel h2 {
    font-size: 2rem;
  }

  .home-page .intake-panel .section-heading p {
    margin-inline: auto;
    max-width: 20rem;
  }

  .home-page .intake-panel .idea-actions button:last-child {
    min-height: 56px;
    font-size: 1.08rem;
  }

  .promo-gate-art {
    display: block;
    height: 148px;
    margin: -22px -8px 20px;
    border: 1px solid rgb(130 91 231 / 0.35);
    border-radius: 20px;
    background:
      linear-gradient(90deg, #030713 0%, #030713 24%, rgb(3 7 19 / 0.76) 38%, transparent 62%),
      url("/static/brand/killgate-play-store-feature.png") right center / auto 290px no-repeat;
    box-shadow: 0 18px 34px rgb(0 0 0 / 0.36), inset 0 0 32px rgb(126 72 235 / 0.17);
  }
}
.plain-language-term{display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:.25rem}
.plain-language-explanation{font-size:.82em;font-weight:400;opacity:.82}
@media (max-width:640px){.plain-language-explanation{display:block;width:100%;margin-top:.15rem}}
.research-progress{margin:0 0 20px}.research-progress p{margin:0 0 8px}.research-progress p:last-child{margin-bottom:0}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 72px;
  }

  body.app-shell {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  body.app-shell .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    max-height: 64px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
    gap: 8px;
  }

  body.app-shell .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  body.app-shell .desktop-workspace-nav {
    display: none;
  }

  body.app-shell .app-bottom-nav {
    display: grid;
  }

  body.public-shell .app-header {
    display: grid;
    grid-template-areas:
      "brand account"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: 10px;
  }

  body.public-shell .brand { grid-area: brand; }
  body.public-shell .header-actions {
    display: contents;
  }
  body.public-shell .header-nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body.public-shell .header-nav a {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgb(170 138 255 / 0.22);
    border-radius: 10px;
    background: rgb(14 25 46 / 0.72);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
  }

  .account-nav {
    grid-area: account;
    justify-content: end;
  }

  .account-nav .account-email { display: none; }
  .account-nav .account-label { display: inline; }
  .account-nav .header-cta {
    display: none;
  }
  .text-button { min-height: 40px; padding: 0.25rem 0.5rem; }
  .header-actions > .install-button { display: none; }

  .venture-page .venture-hero { padding-top: 0; }
  .venture-page .venture-hero h1 {
    font-size: clamp(1.85rem, 8.3vw, 2.45rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .venture-page .verdict-art {
    max-height: 230px;
    object-fit: cover;
  }
}

.account-label { display: none; }

.developer-cost {
  border: 1px solid rgb(251 191 36 / 0.35);
  box-shadow: inset 0 0 0 1px rgb(251 191 36 / 0.08);
}

.developer-cost .eyebrow {
  color: var(--amber);
}

.developer-cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 4px;
  font-size: 0.82rem;
}

.developer-cost-table th,
.developer-cost-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.developer-cost-table th {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .developer-cost-table {
    display: block;
    overflow-x: auto;
  }
}

.home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.home-cta-row .button-link.secondary-button,
a.button-link.secondary-button {
  background: transparent;
  border: 1px solid rgb(170 138 255 / 0.28);
  color: var(--text);
}

.ideas-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 14px;
  align-items: end;
}

.ideas-filter-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ideas-filter-form select,
.ideas-filter-form input[type="search"] {
  width: 100%;
}

.ideas-filter-form button {
  align-self: end;
}

.ideas-pagination {
  margin-top: 16px;
}

/* Phase 1: public funnel vs private workspace */
.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.header-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: #fff;
}

.account-nav .header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.sample-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border: 1px solid rgb(170 138 255 / 0.35);
  border-radius: 999px;
  color: #d7c7ff;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.product-choice {
  margin: 28px 0 42px;
}

.product-choice-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 18px;
}

.product-choice-card {
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid rgb(170 138 255 / 0.22);
  border-radius: var(--radius);
  background: rgb(10 18 36 / 0.72);
}

.product-choice-card h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.2;
}

.product-choice-card ul {
  margin: 0 0 16px;
  padding-left: 1.1rem;
}

.product-choice-card li {
  margin-bottom: 0.4rem;
}

.public-home-hero h1 {
  max-width: 14ch;
}

.pricing-compare .price-label {
  font-size: 1.35rem;
  font-weight: 750;
}

.workspace-help {
  margin: 8px 0 28px;
}

.capacity-note {
  text-align: left;
}

body.public-shell .app-header {
  min-height: 72px;
}

/* Phase 2: action-first app chrome */
body.app-shell .app-header {
  min-height: 56px;
  max-height: 64px;
}

body.app-shell .brand img {
  width: 34px;
  height: 34px;
}

.app-bottom-nav {
  display: none;
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(170 138 255 / 0.18);
  background: rgb(5 9 20 / 0.94);
  backdrop-filter: blur(16px);
}

.app-bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 4px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.app-bottom-nav a:hover,
.app-bottom-nav a:focus-visible {
  background: rgb(124 58 237 / 0.18);
}

.account-menu {
  position: relative;
}

.account-menu-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgb(170 138 255 / 0.22);
  border-radius: 10px;
  background: rgb(14 25 46 / 0.72);
  color: var(--text);
  font-weight: 700;
}

.account-menu-summary::-webkit-details-marker {
  display: none;
}

.account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px;
  border: 1px solid rgb(170 138 255 / 0.22);
  border-radius: 12px;
  background: rgb(8 14 28 / 0.98);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.35);
}

.account-menu-panel a,
.account-menu-panel .text-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}

.account-menu-panel a:hover,
.account-menu-panel .text-button:hover {
  background: rgb(124 58 237 / 0.16);
}

.page-header.compact-header {
  max-width: 760px;
  margin: 0 0 14px;
  padding: 12px 0 4px;
  text-align: left;
}

.page-header.compact-header h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  line-height: 1.15;
}

.page-header.compact-header p {
  margin: 0;
  max-width: 42rem;
}

body.app-shell .hero,
body.app-shell .hero.compact {
  min-height: 0;
  padding: 16px 0 12px;
}

body.app-shell .home-next-panel {
  margin-top: 8px;
  margin-bottom: 12px;
}

body.app-shell .capacity-note,
body.app-shell .next-action-copy {
  text-align: left;
}

body.app-shell .studio-brief-surface {
  margin-bottom: 28px;
}

body.app-shell .studio-brief-form {
  margin-top: 0;
}

body.app-shell .ideas-filter-panel {
  margin-bottom: 16px;
}

@media (min-width: 901px) {
  .app-bottom-nav {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu-panel,
  .app-bottom-nav a {
    transition: none;
  }
}

/* Phase 3: staged Studio brief + surface helpers */
.research-studio-page {
  --studio-accent: #4f8cff;
}

.studio-brief-surface {
  max-width: 760px;
}

.studio-brief-form {
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.studio-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.studio-stepper span {
  padding: 6px 10px;
  border: 1px solid rgb(79 140 255 / 0.28);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.studio-stepper span[aria-current="step"] {
  border-color: rgb(163 92 255 / 0.55);
  background: rgb(116 70 237 / 0.18);
  color: var(--text);
}

.studio-step h2 {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.studio-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.studio-step-actions .secondary-button {
  background: transparent;
  border: 1px solid rgb(170 138 255 / 0.28);
  color: var(--text);
}

.deliverable-group {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgb(79 140 255 / 0.22);
  border-radius: var(--radius);
  background: rgb(9 19 35 / 0.72);
}

.deliverable-group legend {
  padding: 0 6px;
  color: #cfe0ff;
  font-weight: 750;
}

.deliverable-options {
  display: grid;
  gap: 8px;
}

.selectable-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
}

.selectable-row:hover,
.selectable-row:focus-within {
  background: rgb(124 58 237 / 0.12);
}

.selectable-row input {
  margin-top: 3px;
}

.status-callout {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid rgb(170 138 255 / 0.22);
  border-radius: var(--radius);
  background: rgb(9 19 35 / 0.8);
  text-align: left;
}

.status-callout.caution {
  border-color: rgb(255 192 66 / 0.35);
}

.status-callout ul {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

.studio-review-summary p {
  margin: 0 0 8px;
}

.operational-panel {
  margin-bottom: 28px;
  padding: clamp(16px, 2.5vw, 22px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(9 19 35 / 0.72);
}

/* Multi-device surfaces: phone, tablet, foldable, Chromebook */
main {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  overflow-x: clip;
}

.app-header,
.app-bottom-nav,
footer {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

img,
video,
iframe,
.report-card,
.product-choice-card,
.venture-card {
  max-width: 100%;
}

.product-choice-grid,
.report-grid,
.venture-grid,
.form-grid,
.ideas-filter-form {
  min-width: 0;
}

/* Foldable cover / very narrow phones */
@media (max-width: 360px) {
  .brand small {
    display: none;
  }

  .page-header.compact-header h1,
  .home-next-panel h1 {
    font-size: 1.35rem;
  }

  .home-cta-row .button-link,
  .studio-step-actions button,
  .studio-step-actions .secondary-button {
    width: 100%;
  }

  .app-bottom-nav a {
    font-size: 0.72rem;
    padding-inline: 2px;
  }
}

/* Landscape phones and short Chromebook windows */
@media (max-height: 500px) and (orientation: landscape) {
  body.app-shell .app-header {
    min-height: 48px;
    max-height: 52px;
  }

  body.app-shell {
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }

  .app-bottom-nav {
    padding-top: 4px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }

  .app-bottom-nav a {
    min-height: 40px;
  }

  .hero.compact,
  body.public-shell .hero {
    min-height: 0;
    padding-block: 12px;
  }
}

/* Tablets, unfolded foldables, and Chromebook windows */
@media (min-width: 700px) and (max-width: 1100px) {
  .product-choice-grid,
  .pricing-compare .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.app-shell .home-next-panel,
  body.app-shell .studio-brief-surface,
  body.app-shell .ideas-filter-panel {
    max-width: 860px;
  }
}

/* Chromebook / laptop short height with wide width */
@media (min-width: 901px) and (max-height: 800px) {
  body.public-shell .hero.compact,
  body.public-shell .public-home-hero {
    min-height: 0;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  body.public-shell .public-home-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
  }
}

/* Dual-screen / hinge-aware foldables when supported */
@supports (width: env(viewport-segment-width 0 0)) {
  @media (horizontal-viewport-segments: 2) {
    .product-choice-grid {
      display: grid;
      grid-template-columns:
        env(viewport-segment-width 0 0)
        env(viewport-segment-width 1 0);
      column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
      justify-content: space-between;
    }

    .product-choice-card {
      width: 100%;
    }
  }
}

/* Prefer denser touch targets on coarse pointers (phones/tablets/touch Chromebooks) */
@media (pointer: coarse) {
  .header-nav a,
  .app-bottom-nav a,
  .account-menu-summary,
  .ideas-filter-form button,
  .selectable-row {
    min-height: 44px;
  }
}

/* Large Chromebook / desktop: keep bottom nav hidden, use top workspace nav */
@media (min-width: 901px) {
  body.app-shell .desktop-workspace-nav {
    display: flex;
  }
}

/* Evidence Pipeline: operational density over cinematic chrome */
.hero.compact {
  min-height: 0;
  justify-content: flex-start;
}

.workspace-toolbar,
.page-header.compact-header.workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: none;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.workspace-toolbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

@media (min-width: 700px) {
  .workspace-toolbar-actions {
    align-items: flex-end;
  }
}

.pipeline-panel {
  margin-bottom: 24px;
}

.pipeline-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.pipeline-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.pipeline-table {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(13 27 47 / 0.97), rgb(6 14 28 / 0.97));
}

.pipeline-head {
  display: none;
}

.pipeline-row {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid rgb(32 49 75 / 0.85);
}

.pipeline-row:first-of-type {
  border-top: 0;
}

.pipeline-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.pipeline-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pipeline-action .button-link {
  min-height: 44px;
  width: 100%;
}

.pipeline-empty {
  min-height: 160px;
  margin: 0;
}

.workspace-resources {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(9 19 35 / 0.72);
}

.workspace-resources h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.workspace-help {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
}

.workspace-help a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.ideas-filter-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ideas-filter-field label {
  margin-bottom: 6px;
}

.ideas-filter-submit {
  display: flex;
  align-items: end;
}

.ideas-filter-submit button {
  width: 100%;
  min-height: 44px;
}

.venture-ops {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.venture-ops h1 {
  max-width: 850px;
  margin: 6px 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.25;
}

.venture-ops .metrics {
  margin-top: 14px;
}

.venture-admin {
  margin: 24px 0 48px;
  padding: 12px 16px;
  border: 1px dashed rgb(170 138 255 / 0.28);
  border-radius: var(--radius);
  color: var(--muted);
}

.venture-admin summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.venture-admin form,
.venture-admin .verdict-art {
  margin-top: 12px;
}

.venture-admin .verdict-art {
  width: min(100%, 280px);
  height: 96px;
}

body.app-shell .action-stack .danger,
body.app-shell .venture-admin button {
  background: transparent;
  border-color: rgb(251 113 133 / 0.35);
}

body.app-shell .journey-next {
  margin-top: 0;
  margin-bottom: 22px;
}

@media (min-width: 901px) {
  .pipeline-head {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(120px, 0.7fr) minmax(220px, 1.3fr) 132px;
    gap: 16px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    background: rgb(13 26 44 / 0.92);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .pipeline-row {
    grid-template-columns: minmax(0, 2fr) minmax(120px, 0.7fr) minmax(220px, 1.3fr) 132px;
    align-items: center;
  }

  .pipeline-row .pipeline-label {
    display: none;
  }

  .pipeline-action {
    text-align: right;
  }

  .pipeline-action .button-link {
    width: auto;
  }

  .venture-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .venture-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    gap: 8px 18px;
    min-height: 0;
    padding: 16px 18px;
    align-items: center;
  }

  .venture-card .venture-topline {
    grid-column: 1;
  }

  .venture-card .venture-hypothesis {
    grid-column: 1;
    margin: 4px 0 0;
  }

  .venture-card .venture-next {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .venture-card-action {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 700px) {
  .workspace-toolbar-actions,
  .pipeline-action .button-link,
  .ideas-filter-submit button {
    width: 100%;
  }

  .venture-ops h1 {
    font-size: clamp(1.12rem, 5.5vw, 1.35rem);
  }
}

@media print {
  .venture-admin {
    display: none !important;
  }
}

/* Evidence Pipeline Task 1: cross-surface workspace refinement */
body.app-shell .desktop-workspace-nav a[aria-current="page"],
body.app-shell .app-bottom-nav a[aria-current="page"],
body.app-shell .account-menu-summary[aria-current="page"] {
  border-color: rgb(117 168 255 / 0.72);
  background: rgb(79 140 255 / 0.16);
  color: #f7faff;
  box-shadow: inset 0 -2px 0 var(--studio-accent, #4f8cff);
}

.workspace-layout,
.research-studio-page [data-studio-workspace],
.account-page [data-account-grid],
.pricing-page [data-pricing-grid] {
  min-width: 0;
}

.research-studio-page .studio-brief-surface {
  max-width: none;
}

.research-studio-page .studio-workspace-grid {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.research-studio-page .studio-stage-column,
.research-studio-page .studio-step,
.research-studio-page .studio-summary-panel {
  min-width: 0;
}

.research-studio-page .studio-summary-panel {
  align-self: start;
  margin: 0;
  overflow-wrap: anywhere;
}

.research-studio-page .studio-summary-panel h2 {
  margin: 6px 0 12px;
  font-size: 1.05rem;
}

.research-studio-page .studio-step-title:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.account-page [data-account-grid],
.pricing-page [data-pricing-grid] {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.account-page [data-account-grid] > .panel,
.pricing-page [data-pricing-grid] > .panel {
  min-width: 0;
  margin: 0;
}

.venture-page .venture-ops,
.venture-page .journey-next,
.ideas-page .venture-card,
.home-page .pipeline-row {
  overflow-wrap: anywhere;
}

.account-page [data-account-grid] a,
.account-page [data-account-grid] button,
.pricing-page [data-pricing-grid] a,
.pricing-page [data-pricing-grid] button,
.research-studio-page .studio-step-actions button {
  min-height: 44px;
}

@media (min-width: 901px) {
  .research-studio-page .studio-workspace-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
    align-items: start;
  }

  .research-studio-page .studio-summary-panel {
    position: sticky;
    top: 86px;
  }

  .account-page [data-account-grid],
  .pricing-page [data-pricing-grid] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-page [data-account-grid] > .panel:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .research-studio-page .studio-workspace-grid,
  .account-page [data-account-grid],
  .pricing-page [data-pricing-grid] {
    grid-template-columns: minmax(0, 1fr);
  }

  .research-studio-page .studio-summary-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .research-studio-page .studio-step-actions > *,
  .account-page [data-account-grid] .button-link,
  .pricing-page [data-pricing-grid] .button-link {
    width: 100%;
  }
}

/* Structured idea intake (Task 6) */
[data-structured-intake] {
  min-width: 0;
}

[data-structured-intake] button,
[data-structured-intake] input,
[data-structured-intake] select,
[data-structured-intake] textarea,
[data-structured-intake] .intake-choice {
  min-height: 44px;
}

[data-structured-intake] :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.structured-intake-layout {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.intake-progress {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intake-progress-nav {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  position: sticky;
  top: 1rem;
}

.intake-progress-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.45rem 0.2rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.intake-progress-jump:disabled {
  cursor: default;
  opacity: 0.55;
}

.intake-progress li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.intake-progress li[aria-current="step"] {
  color: var(--text);
  font-weight: 700;
}

.intake-progress li.is-complete .intake-complete-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.intake-req,
.intake-opt {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.intake-req {
  background: rgb(15 118 110 / 0.12);
  color: #0f766e;
}

.intake-opt {
  background: rgb(100 116 139 / 0.14);
  color: #64748b;
}

.intake-char-count {
  margin: 0;
  justify-self: end;
}

.intake-char-count.is-near-limit {
  color: var(--amber);
  font-weight: 650;
}

.intake-price-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.intake-choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.intake-field {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
  min-width: 0;
}

.intake-field input::placeholder,
.intake-field textarea::placeholder {
  color: #8291a6;
  opacity: 1;
}

.repeatable-row,
.intake-review-grid {
  min-width: 0;
  overflow-wrap: anywhere;
}

.repeatable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  margin: 0.45rem 0;
}

.repeatable-row.competitor-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
}

.field-error {
  margin: 0;
  color: var(--amber);
  font-size: 0.86rem;
  font-weight: 650;
}

.intake-review-grid {
  display: grid;
  gap: 0.55rem 1rem;
}

.intake-review-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.intake-review-grid dd {
  margin: 0 0 0.65rem;
}

.intake-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.intake-import-review {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.intake-import-review[hidden] {
  display: none !important;
}

[data-intake-step][hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .structured-intake-layout {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .intake-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  [data-intake-step] {
    transition: opacity 140ms ease;
  }
}
