/* ============================================================================
   AI-vs-AI dialogue engine — app styles
   Design thesis: the product is bilateral. Everything is built around a SEAM —
   a vertical split with two opposed voices: Side A (cool blue) / Side B (coral).
   The seam glows toward whichever side is speaking.
   Type: Space Grotesk (mechanical chrome) over Newsreader (literary transcript).
   ============================================================================ */

:root {
  --ink:        #0B0E14;   /* base */
  --panel:      #12161F;   /* raised surface */
  --panel-2:    #171C28;
  --line:       #232A38;   /* hairlines */
  --paper:      #EDEFF3;   /* primary text */
  --muted:      #8A90A0;   /* secondary text */
  --faint:      #5A6070;

  --side-a:     #5B8CFF;   /* voice A */
  --side-a-dim: #2C4272;
  --side-b:     #FF7A59;   /* voice B */
  --side-b-dim: #7A3C2C;
  --credit:     #7DF9C7;   /* money / success signal */
  --warn:       #FFC24B;
  --danger:     #FF6470;

  --seam:       #EDEFF3;

  --r:          14px;
  --r-sm:       9px;
  --wrap:       1180px;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 18px 44px -24px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* subtle vertical seam of light behind everything, dead-center */
  background-image:
    linear-gradient(180deg, rgba(91,140,255,.05), transparent 45%),
    radial-gradient(120% 60% at 50% -8%, rgba(255,122,89,.05), transparent 60%);
  background-attachment: fixed;
}

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

a { color: var(--paper); text-decoration: none; }
a:hover { color: #fff; }

h1,h2,h3,h4 { font-family: var(--sans); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.eyebrow {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .2em;
  color: var(--muted); font-weight: 500; margin-bottom: 1rem;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--side-a); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .7em 1.3em; border-radius: 10px; border: 1px solid transparent;
  background: var(--paper); color: var(--ink); cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -14px rgba(237,239,243,.5); color: var(--ink); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .5em 1em; font-size: .88rem; min-height: 38px; }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-2); color: #fff; box-shadow: none; }
.btn-a { background: linear-gradient(135deg, var(--side-a), #7BA4FF); color: #06122e; }
.btn-b { background: linear-gradient(135deg, var(--side-b), #FF9B80); color: #2a0d05; }
.btn-credit { background: var(--credit); color: #04231a; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { color: var(--paper); }
.inline-form { display: inline; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,14,20,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: .6em; font-weight: 700; letter-spacing: -.02em; font-size: 1.15rem; }
.brand-name { color: var(--paper); }
/* the mark: two bars split by a seam */
.brand-seam {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  background:
    linear-gradient(90deg, var(--side-a) 0 42%, transparent 42% 58%, var(--side-b) 58% 100%);
  position: relative;
}
.brand-seam::after { content:""; position:absolute; left:50%; top:2px; bottom:2px; width:2px; transform:translateX(-50%); background: var(--seam); }
.brand-seam.small { width: 18px; height: 18px; }

.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--muted); font-size: .92rem; font-weight: 500; }
.site-nav a:hover, .site-nav a.btn { color: var(--paper); }
.site-nav a.btn { color: var(--ink); }
.site-nav a.btn:hover { color: var(--ink); }
.nav-muted { opacity: .8; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--paper); border-radius: 2px; transition: .2s; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 5rem; padding: 3rem 0 2.4rem; background: var(--panel); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.footer-brand p { flex-basis: 100%; color: var(--muted); font-size: .9rem; max-width: 42ch; margin: .4rem 0 0; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--muted); font-size: .92rem; }
.footer-legal { grid-column: 1 / -1; color: var(--faint); font-size: .82rem; border-top: 1px solid var(--line); padding-top: 1.4rem; margin: .6rem 0 0; }

/* ============================================================ LANDING */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 .a-word { color: var(--side-a); }
.hero h1 .b-word { color: var(--side-b); }
.hero-lede { font-family: var(--serif); font-size: 1.28rem; line-height: 1.5; color: #C9CEDA; max-width: 42ch; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.hero-note { color: var(--muted); font-size: .85rem; margin: 1.2rem 0 0; }

/* the live hero demo — a self-running dual pane, the "thesis" */
.demo {
  position: relative; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); box-shadow: var(--shadow); overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo-dot.a { background: var(--side-a); }
.demo-dot.b { background: var(--side-b); }
.demo-topic { margin-left: auto; font-style: italic; font-family: var(--serif); }
.demo-body { position: relative; display: grid; grid-template-columns: 1fr 2px 1fr; min-height: 300px; }
.demo-side { padding: 1rem 1.1rem; }
.demo-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: .7rem; font-weight: 600; }
.demo-side.a .demo-label { color: var(--side-a); }
.demo-side.b .demo-label { color: var(--side-b); }
.demo-msg { font-family: var(--serif); font-size: .96rem; line-height: 1.5; color: #D6DAE4; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; margin-bottom: .8rem; }
.demo-msg.show { opacity: 1; transform: none; }
/* the seam — the signature element. Glows toward the active speaker. */
.demo-seam { background: var(--line); position: relative; }
.demo-seam::before {
  content: ""; position: absolute; inset: 0;
  background: var(--seam); opacity: 0; transition: opacity .5s, box-shadow .5s;
}
.demo-body[data-active="a"] .demo-seam::before { opacity: 1; background: var(--side-a); box-shadow: 0 0 22px 2px var(--side-a); }
.demo-body[data-active="b"] .demo-seam::before { opacity: 1; background: var(--side-b); box-shadow: 0 0 22px 2px var(--side-b); }
.demo-typing { display: inline-flex; gap: 3px; vertical-align: middle; }
.demo-typing span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; animation: blink 1.1s infinite; }
.demo-typing span:nth-child(2){ animation-delay: .2s; } .demo-typing span:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%,60%,100%{opacity:.25} 30%{opacity:1} }
@media (prefers-reduced-motion: reduce){ .demo-msg{opacity:1;transform:none;} .demo-typing span{animation:none;} }

/* answer block (AEO direct-answer) */
.answer-block {
  border: 1px solid var(--line); border-left: 3px solid var(--side-a);
  background: var(--panel); border-radius: var(--r-sm); padding: 1.3rem 1.5rem; margin: 0 0 2.5rem;
  max-width: 62ch;
}
.answer-block p { font-family: var(--serif); font-size: 1.06rem; margin: 0; color: #D6DAE4; }

section.band { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.section-head { max-width: 60ch; margin-bottom: 2.2rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* how-it-works steps — a real sequence, so numbering is earned */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; background: var(--panel); position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--sans); font-weight: 700; font-size: .8rem; color: var(--faint);
  letter-spacing: .1em; display: block; margin-bottom: .8rem;
}
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* persona gallery cards — each split down the middle */
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.persona-card {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .12s;
}
.persona-card:hover { border-color: #33405a; transform: translateY(-2px); }
.persona-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.persona-vs .pv { padding: .9rem 1rem; font-weight: 600; font-size: .95rem; }
.persona-vs .pv.a { color: var(--side-a); border-bottom: 2px solid var(--side-a-dim); }
.persona-vs .pv.b { color: var(--side-b); text-align: right; border-bottom: 2px solid var(--side-b-dim); }
.persona-vs .vs { align-self: center; padding: 0 .3rem; color: var(--faint); font-size: .7rem; letter-spacing: .1em; }
.persona-card .pc-body { padding: 1rem; flex: 1; }
.persona-card h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.persona-card p { color: var(--muted); font-size: .88rem; margin: 0; }
.persona-card .pc-foot { padding: .8rem 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.persona-card .pc-foot a { font-size: .85rem; color: var(--side-a); font-weight: 600; }
.tag-fiction { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--warn); border: 1px solid var(--warn); border-radius: 20px; padding: .1em .6em; }

/* FAQ / PAA */
.faq { display: grid; gap: .6rem; max-width: 760px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); overflow: hidden; }
.faq summary { padding: 1rem 1.2rem; cursor: pointer; font-weight: 600; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 1.2rem 1.2rem; margin: 0; color: #C4CAD6; font-family: var(--serif); }

/* recently-debated strip */
.debate-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.debate-chip { border:1px solid var(--line); border-radius: var(--r-sm); padding: 1rem; background: var(--panel); }
.debate-chip .dc-sides { font-size: .74rem; letter-spacing:.06em; color: var(--muted); margin-bottom:.4rem; }
.debate-chip .dc-sides b:first-child { color: var(--side-a); } .debate-chip .dc-sides b:last-child { color: var(--side-b); }
.debate-chip a { font-family: var(--serif); font-size: 1rem; color: var(--paper); }

/* pricing */
.price-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; max-width: 820px; }
.price-card { border:1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 1.6rem; text-align:center; }
.price-card.feature { border-color: var(--side-a-dim); box-shadow: 0 0 0 1px var(--side-a-dim); }
.price-amount { font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; }
.price-card p { color: var(--muted); font-size: .9rem; }
.trial-callout { display:inline-flex; align-items:center; gap:.5rem; background: rgba(125,249,199,.08); border:1px solid var(--side-a-dim); color: var(--credit); padding:.5em 1em; border-radius: 30px; font-size:.9rem; font-weight:500; }

/* ============================================================ FORMS / AUTH */
.auth-page main { display: flex; align-items: flex-start; justify-content: center; padding: 4rem 0; }
.card {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--panel);
  padding: 2rem; box-shadow: var(--shadow);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.8rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .4rem; color: #C4CAD6; }
.field input, .field textarea, .field select {
  width: 100%; padding: .75em .9em; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink); color: var(--paper); font: inherit; font-size: .95rem;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--side-a); outline: none; }
.field .hint { font-size: .8rem; color: var(--faint); margin-top: .35rem; }
.form-actions { margin-top: 1.4rem; }
.form-actions .btn { width: 100%; }
.auth-alt { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .9rem; }
/* honeypot: off-screen, not display:none */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Sign in with Google (Google branding guidelines: white bg, #dadce0 border,
   official mark, Roboto/system font, 40px min height) --- */
.gsi-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 14px;
  background: #fff; color: #1f1f1f;
  border: 1px solid #dadce0; border-radius: 10px;
  font-family: "Roboto", var(--sans); font-size: .95rem; font-weight: 500;
  letter-spacing: .1px; cursor: pointer; transition: background .15s, box-shadow .15s;
}
.gsi-btn:hover { background: #f7f8f8; box-shadow: 0 1px 3px rgba(60,64,67,.3); color: #1f1f1f; }
.gsi-btn:active { background: #f1f3f4; }
.gsi-btn:focus-visible { outline: 2px solid var(--side-a); outline-offset: 2px; }
.gsi-icon { display: inline-flex; width: 18px; height: 18px; }
.gsi-label { line-height: 1; }

.auth-divider {
  display: flex; align-items: center; text-align: center;
  color: var(--faint); font-size: .82rem; margin: 1.1rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-divider span { padding: 0 .8rem; }

/* account: connected sign-in methods */
.signin-methods { display: grid; gap: .7rem; }
.method-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--panel-2); flex-wrap: wrap;
}
.method-row .badge { margin-left: .5rem; }
.method-row form { margin: 0; }

.alert { border-radius: 10px; padding: .8em 1em; font-size: .9rem; margin-bottom: 1.2rem; border: 1px solid; }
.alert-error { background: rgba(255,100,112,.08); border-color: rgba(255,100,112,.4); color: #FFB3BA; }
.alert-ok { background: rgba(125,249,199,.08); border-color: var(--side-a-dim); color: var(--credit); }
.alert-info { background: rgba(91,140,255,.08); border-color: var(--side-a-dim); color: #A9C2FF; }
.alert-warn { background: rgba(255,194,75,.08); border-color: rgba(255,194,75,.4); color: var(--warn); }

/* ============================================================ DASHBOARD */
.dash main { padding: 2.4rem 0 3rem; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.dash-head h1 { font-size: 2rem; margin: 0; }
.wallet-chip { display:inline-flex; align-items:center; gap:.6rem; border:1px solid var(--line); border-radius: 30px; padding:.5rem 1rem; background: var(--panel); }
.wallet-chip .bal { font-weight: 700; color: var(--credit); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.tile { border:1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 1.3rem; }
.tile .t-label { font-size: .78rem; text-transform: uppercase; letter-spacing:.12em; color: var(--muted); }
.tile .t-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin-top: .3rem; }
.tile .t-value.credit { color: var(--credit); }

.panel { border:1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 1.5rem; margin-bottom: 1.5rem; }
.panel h2 { font-size: 1.2rem; }

/* list of dialogues */
.dlist { display: grid; gap: .7rem; }
.dlist-row { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; border:1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1.1rem; background: var(--panel-2); }
.dlist-row .title { font-weight: 600; }
.dlist-row .meta { font-size: .82rem; color: var(--muted); }
.badge { font-size: .72rem; padding: .2em .7em; border-radius: 20px; font-weight: 600; text-transform: capitalize; }
.badge.running { background: rgba(91,140,255,.14); color: #A9C2FF; }
.badge.completed { background: rgba(125,249,199,.12); color: var(--credit); }
.badge.paused { background: rgba(255,194,75,.14); color: var(--warn); }
.badge.stopped, .badge.error { background: rgba(255,100,112,.12); color: #FFB3BA; }

/* quick-start persona picker */
.quickstart { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: .9rem; }

/* ============================================================ NEW DIALOGUE FORM */
.new-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 1.8rem; align-items: start; }
.pair-select { display: grid; gap: .6rem; max-height: 340px; overflow-y: auto; padding-right: .4rem; }
.pair-opt { border:1px solid var(--line); border-radius: var(--r-sm); padding: .8rem 1rem; cursor: pointer; display:block; background: var(--panel-2); transition: border-color .15s; }
.pair-opt:hover { border-color: #33405a; }
.pair-opt.selected { border-color: var(--side-a); box-shadow: 0 0 0 1px var(--side-a-dim); }
.pair-opt input { position: absolute; opacity: 0; }
.pair-opt .po-name { font-weight: 600; }
.pair-opt .po-sides { font-size: .8rem; margin-top: .2rem; }
.pair-opt .po-sides .a { color: var(--side-a); } .pair-opt .po-sides .b { color: var(--side-b); }
.summary-side { position: sticky; top: 88px; }
.custom-toggle { margin: .8rem 0; }

/* ============================================================ LIVE DIALOGUE VIEW */
.dialogue-view main { padding: 1.4rem 0 3rem; }
.dv-head { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; flex-wrap:wrap; margin-bottom: 1rem; }
.dv-head h1 { font-size: 1.5rem; margin: 0 0 .3rem; }
.dv-topic { font-family: var(--serif); color: var(--muted); max-width: 70ch; }
.dv-controls { display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; }
.dv-status { display:inline-flex; align-items:center; gap:.5rem; font-size:.85rem; color: var(--muted); }
.dv-status .dot { width:8px; height:8px; border-radius:50%; background: var(--faint); }
.dv-status.running .dot { background: var(--side-a); box-shadow:0 0 8px var(--side-a); animation: pulse 1.4s infinite; }
.dv-status.completed .dot { background: var(--credit); }
.dv-status.paused .dot, .dv-status.stopped .dot { background: var(--warn); }
.dv-status.error .dot { background: var(--danger); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.panes {
  display: grid; grid-template-columns: 1fr 3px 1fr;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--panel); min-height: 60vh; box-shadow: var(--shadow);
}
.pane { padding: 1.2rem 1.3rem; overflow-y: auto; max-height: 74vh; }
.pane-head { position: sticky; top: -1.2rem; margin: -1.2rem -1.3rem 1rem; padding: .8rem 1.3rem;
  background: var(--panel); border-bottom: 1px solid var(--line); z-index: 2;
  font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; }
.pane.a .pane-head { color: var(--side-a); }
.pane.b .pane-head { color: var(--side-b); }
/* the live seam */
.pane-seam { background: var(--line); position: relative; }
.pane-seam::before { content:""; position:absolute; inset:0; opacity:0; transition:opacity .4s, box-shadow .4s; }
.panes[data-active="a"] .pane-seam::before { opacity:1; background: var(--side-a); box-shadow: 0 0 20px 2px var(--side-a); }
.panes[data-active="b"] .pane-seam::before { opacity:1; background: var(--side-b); box-shadow: 0 0 20px 2px var(--side-b); }

.msg { font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; color: #DDE1EA; margin-bottom: 1.3rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom: 0; }
.msg .turn-tag { font-family: var(--sans); font-size: .68rem; text-transform: uppercase; letter-spacing:.14em; color: var(--faint); display:block; margin-bottom:.5rem; }
.msg.streaming::after { content:"\2588"; color: currentColor; animation: caret .9s step-end infinite; }
@keyframes caret { 50%{opacity:0} }
.msg-inject { font-family: var(--sans); font-size: .9rem; color: var(--warn); border-left: 2px solid var(--warn); padding-left: .8rem; margin-bottom: 1.3rem; }

.mobile-tabs { display: none; }

/* inject box */
.inject-box { margin-top: 1rem; }
dialog.modal { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--paper); max-width: 480px; width: 92%; padding: 1.6rem; box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(4,6,10,.7); backdrop-filter: blur(3px); }

/* ============================================================ PUBLIC TRANSCRIPT */
.public-dialogue main { padding: 2.4rem 0 3rem; }
.pd-header { max-width: 800px; margin: 0 auto 2rem; text-align: center; }
.pd-header .eyebrow .a { color: var(--side-a); } .pd-header .eyebrow .b { color: var(--side-b); }
.pd-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.pd-topic { font-family: var(--serif); font-size: 1.2rem; color: #C4CAD6; font-style: italic; }
.transcript { max-width: 820px; margin: 0 auto; }
.t-turn { margin-bottom: 2rem; padding-left: 1.2rem; border-left: 3px solid var(--line); }
.t-turn.a { border-color: var(--side-a-dim); } .t-turn.b { border-color: var(--side-b-dim); }
.t-turn .t-who { font-family: var(--sans); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing:.12em; margin-bottom:.6rem; }
.t-turn.a .t-who { color: var(--side-a); } .t-turn.b .t-who { color: var(--side-b); }
.t-turn p { font-family: var(--serif); font-size: 1.1rem; line-height: 1.65; color: #DDE1EA; }
.t-inject { border-left-color: var(--warn); }
.t-inject .t-who { color: var(--warn); }
.pd-cta { max-width: 820px; margin: 2.5rem auto 0; text-align: center; border-top: 1px solid var(--line); padding-top: 2rem; }
.pd-report { text-align:center; margin-top: 1.5rem; }
.pd-report button { color: var(--faint); font-size: .82rem; background:none; border:0; cursor:pointer; }
.pd-report button:hover { color: var(--muted); }

/* ============================================================ TABLES / ADMIN */
.table-wrap { overflow-x: auto; border:1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing:.1em; color: var(--muted); font-weight: 600; background: var(--panel-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.amt-pos { color: var(--credit); } .amt-neg { color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1rem; margin-bottom: 2rem; }

.chip-row { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1.2rem; }
.chip-row a { font-size:.85rem; padding:.4em .9em; border:1px solid var(--line); border-radius:20px; color:var(--muted); }
.chip-row a.active { border-color: var(--side-a); color: var(--paper); }

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid, .new-grid, .footer-inner { grid-template-columns: 1fr; }
  .steps, .persona-grid, .price-cards, .debate-strip { grid-template-columns: 1fr 1fr; }
  .summary-side { position: static; }
}
@media (max-width: 768px) {
  .site-nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--panel); border-bottom: 1px solid var(--line); padding: 1rem 24px 1.4rem; gap: .3rem;
    transform: translateY(-120%); transition: transform .22s ease; z-index: 30; }
  .site-nav.open { transform: none; }
  .site-nav a, .site-nav .inline-form { padding: .7rem 0; }
  .nav-toggle { display: flex; }
  .steps, .persona-grid, .price-cards, .debate-strip { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }

  /* dual-pane stacks vertically with sticky tab switcher */
  .panes { grid-template-columns: 1fr; min-height: auto; }
  .pane-seam { display: none; }
  .pane { max-height: none; display: none; }
  .pane.active-tab { display: block; }
  .mobile-tabs { display: grid; grid-template-columns: 1fr 1fr; position: sticky; top: 66px; z-index: 10;
    border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; background: var(--panel); }
  .mobile-tabs button { padding: .7rem; background: var(--panel); border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
  .mobile-tabs button.active[data-side="a"] { color: var(--side-a); border-color: var(--side-a); }
  .mobile-tabs button.active[data-side="b"] { color: var(--side-b); border-color: var(--side-b); }
  .dlist-row { grid-template-columns: 1fr; gap: .5rem; }
  .dash-head { align-items: flex-start; }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
}

/* print (PDF export of transcript) */
@media print {
  .site-header, .site-footer, .pd-cta, .pd-report, .dv-controls, .mobile-tabs { display: none !important; }
  body { background: #fff; color: #111; }
  .t-turn p, .pd-topic { color: #111; }
}
