:root {
  --paper:#EEF1F0; --surface:#FBFCFB; --raise:#FFFFFF; --ink:#15242B;
  --inksoft:#506065; --infaint:#7C8A8E; --hair:#D9DFDD;
  --them:#237E7A; --them-bg:#E0EDEC; --you:#B26E2C; --you-bg:#F6ECDF;
  --deal:#9A7220; --deal-bg:#F3ECD8; --good:#2f8f6b;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(21,36,43,.05), 0 8px 28px rgba(21,36,43,.07);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 680px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; padding: 0 20px; }

header.top { padding: 34px 0 16px; border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .dots { display: flex; gap: 5px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--them); }
.brand .dot.you { background: var(--you); }
.brand h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
header.top .sub { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--infaint); margin-top: 7px; }

main { flex: 1; padding: 26px 0 30px; }

h2.head { font-size: clamp(25px, 5vw, 33px); line-height: 1.12; letter-spacing: -.02em; font-weight: 600; margin: 6px 0 12px; text-wrap: balance; }
p.lede { font-size: 18px; color: var(--inksoft); margin: 0 0 22px; max-width: 48ch; }
label.fld { display: block; margin: 0 0 16px; }
label.fld .lab { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--infaint); margin-bottom: 7px; }

input[type=text], input[type=email], textarea {
  width: 100%; padding: 13px 16px; font-family: var(--serif); font-size: 18px; line-height: 1.5;
  color: var(--ink); background: var(--raise); border: 1px solid var(--hair); border-radius: 12px;
  box-shadow: var(--shadow); outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--them); }
input::placeholder, textarea::placeholder { color: var(--infaint); }

button.primary {
  font-family: var(--serif); font-size: 17px; font-weight: 600; color: #fff; background: var(--them);
  border: none; border-radius: 12px; padding: 13px 26px; cursor: pointer; box-shadow: var(--shadow); transition: background .15s;
}
button.primary:hover { background: #1c6b67; }
button.primary:disabled { opacity: .55; cursor: default; }
button.ghost { font-family: var(--serif); font-size: 16px; color: var(--them); background: transparent; border: 1px solid var(--them); border-radius: 11px; padding: 11px 20px; cursor: pointer; }
button.ghost:hover { background: var(--them-bg); }
button.link { background: none; border: none; color: var(--them); font-family: var(--serif); font-size: 15px; cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }

.err { color: #B4552F; font-size: 15px; margin-top: 10px; }
.muted { color: var(--infaint); font-size: 15px; }

/* ── Chat ── */
.msg { margin: 0 0 18px; display: flex; }
.msg.you { justify-content: flex-end; }
.bubble { max-width: 82%; padding: 13px 17px; border-radius: 16px; font-size: 17.5px; line-height: 1.5; }
.med .bubble { background: var(--them-bg); border-bottom-left-radius: 5px; }
.you .bubble { background: var(--you-bg); border-bottom-right-radius: 5px; }
.who { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--infaint); margin: 0 0 5px; }
.med .who { color: var(--them); }
.you .who { color: var(--you); text-align: right; }
.typing .bubble { color: var(--infaint); font-style: italic; }
.dotpulse::after { content: "…"; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

.composer { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 22%); padding: 14px 0 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.composer .row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 52px; max-height: 180px; }

/* ── Quick-reply chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 20px; }
.chip {
  font-family: var(--serif); font-size: 15.5px; color: var(--you);
  background: var(--raise); border: 1px solid var(--hair); border-radius: 100px;
  padding: 9px 15px; line-height: 1.2; cursor: pointer; box-shadow: var(--shadow);
  transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent;
}
.chip:hover { background: var(--you-bg); border-color: var(--you); }
.chip:active { transform: translateY(1px); }

/* ── Cards / options ── */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 16px; box-shadow: var(--shadow); margin: 0 0 16px; overflow: hidden; }
.card .pad { padding: 20px 22px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--them); margin: 0 0 10px; }

.option { border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); margin: 0 0 14px; overflow: hidden; }
.option.pick { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.option .otop { padding: 16px 20px 12px; }
.option .badge { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--good); background: #e2f0ea; border-radius: 100px; padding: 3px 10px; margin-bottom: 9px; }
.option h3 { margin: 0 0 6px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.option .desc { color: var(--ink); font-size: 17px; }
.option .row2 { padding: 12px 20px 16px; border-top: 1px dashed var(--hair); }
.option .lab2 { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--infaint); margin: 0 0 4px; }
.option .why { font-size: 16px; color: var(--inksoft); margin: 0 0 10px; }
.option .trade { font-size: 15px; color: var(--infaint); font-style: italic; }
.option .badge.wildcard { color: var(--you); background: var(--you-bg); margin-left: 6px; }
p.trade { font-size: 15px; color: var(--infaint); font-style: italic; margin: 0 0 12px; }

/* ── The locked-in ledger (shared "Decided so far" board) ── */
.cgledger { border: 1px solid var(--good); border-radius: 14px; background: #f2f8f5; margin: 0 0 18px; overflow: hidden; }
.cgledger .cgl-head { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer;
  padding: 12px 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--good); }
.cgl-head .cgl-title { flex: 1; text-align: left; }
.cgl-head .cgl-count { background: var(--good); color: #fff; border-radius: 100px; padding: 1px 8px; font-size: 11px; }
.cgl-head .cgl-caret { transition: transform .15s; }
.cgledger.collapsed .cgl-caret { transform: rotate(-90deg); }
.cgl-list { list-style: none; margin: 0; padding: 0 16px 12px; }
.cgl-item { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid #dcebe3; font-size: 16px; color: var(--ink); }
.cgl-item:first-child { border-top: none; }
.cgl-check { color: var(--good); font-weight: 700; flex: none; line-height: 1.5; }
.cgl-text { line-height: 1.45; }

/* The decision leads; the wildcard is a lighter, playful curveball below it. */
.option.decision { margin-bottom: 16px; }
.option.wild { border-color: var(--you); border-style: dashed; background: linear-gradient(180deg, var(--you-bg), var(--surface)); }
.option.wild h3 { font-size: 19px; }

/* "Show the rest" — collapsed by default so the page leads with one thing. */
.cg-more { margin: 4px 0 6px; border-top: 1px solid var(--hair); }
.cg-more > summary {
  list-style: none; cursor: pointer; padding: 14px 2px 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--them); display: flex; align-items: center; gap: 8px;
}
.cg-more > summary::-webkit-details-marker { display: none; }
.cg-more > summary::before { content: "▸"; font-size: 10px; transition: transform .15s; }
.cg-more[open] > summary::before { transform: rotate(90deg); }
.cg-more > summary:hover { color: var(--ink); }
.cg-more-body { padding-top: 12px; }

/* ── Participant status ── */
.people { display: flex; flex-direction: column; }
.person-block { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.person-block:last-child { border-bottom: none; }
.person { display: flex; align-items: center; gap: 12px; }
.person .nm { flex: 1; font-size: 17px; font-weight: 600; }
.person .role { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--infaint); }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; }
.plink { font-family: var(--mono); font-size: 12px; color: var(--infaint); text-decoration: none; word-break: break-all; }
.plink:hover { color: var(--them); }
.fwdnote { font-size: 13px; }
.fwd { font-weight: 600; }
.pill { font-size: 13px; padding: 4px 11px; border-radius: 100px; font-family: var(--mono); letter-spacing: .04em; }
.pill.done { color: var(--good); background: #e2f0ea; }
.pill.interviewing { color: var(--deal); background: var(--deal-bg); }
.pill.invited { color: var(--infaint); background: #eceeed; }

/* ── Invite rows ── */
.invite-row { display: flex; gap: 8px; margin-bottom: 8px; }
.invite-row input { flex: 1; }
.invite-row .nm { max-width: 38%; }

.sent-line { font-size: 15px; color: var(--inksoft); padding: 4px 0; }
.sent-line b { color: var(--good); }
.copy { font-size: 13px; }

.ackrow { display: flex; justify-content: flex-end; margin: 4px 0 18px; }
.ackrow .primary { font-size: 16px; padding: 12px 20px; }

.thanks { text-align: center; padding: 30px 0; }
.thanks .big { font-size: 44px; margin-bottom: 8px; }

/* ── Payoff reveal (shared) ── */
/* All rules prefixed .cgrev- so they don't collide with existing .stage / .glow / .pick / etc. */
.cgrev-stage { position: relative; height: 170px; }
.cgrev-hole { position: absolute; left: 50%; bottom: 18px; width: 150px; height: 34px; margin-left: -75px; border-radius: 50%;
  background: radial-gradient(ellipse at center, #3a2a21 0 55%, #5d4437 72%, transparent 74%); }
.cgrev-holewrap { position: absolute; left: 50%; bottom: 30px; width: 150px; height: 130px; margin-left: -75px; overflow: hidden; }
.cgrev-mole { position: absolute; left: 50%; bottom: -6px; width: 118px; height: 108px; margin-left: -59px;
  transform: translateY(115%); transition: transform .7s cubic-bezier(.34,1.45,.5,1); }
.cgrev-stage.found .cgrev-mole { transform: translateY(0); }
.cgrev-stage.empty .cgrev-mole { transform: translateY(28%) rotate(-4deg); }   /* surfaced, sheepish */
.cgrev-dirt { position: absolute; left: 50%; bottom: 44px; width: 0; height: 0; }
.cgrev-dirt i { position: absolute; width: 9px; height: 7px; border-radius: 45%; background: #6f5240; opacity: 0;
  animation: cgdirt 1.05s ease-out infinite; }
.cgrev-dirt i:nth-child(1) { animation-delay: 0s;   --dx: -46px; }
.cgrev-dirt i:nth-child(2) { animation-delay: .18s; --dx: 34px;  background:#8a6b52; }
.cgrev-dirt i:nth-child(3) { animation-delay: .34s; --dx: -20px; }
.cgrev-dirt i:nth-child(4) { animation-delay: .5s;  --dx: 52px;  background:#5d4437; }
.cgrev-dirt i:nth-child(5) { animation-delay: .68s; --dx: 8px; }
.cgrev-dirt i:nth-child(6) { animation-delay: .86s; --dx: -38px; background:#8a6b52; }
@keyframes cgdirt {
  0%   { opacity: 0; transform: translate(0,0) rotate(0); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -74px) rotate(200deg); }
}
.cgrev-stage.found .cgrev-dirt i, .cgrev-stage.empty .cgrev-dirt i { animation: none; opacity: 0; }
.cgrev-glow { position: absolute; left: 50%; top: 75px; width: 240px; height: 240px; margin: -120px 0 0 -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(35,126,122,.38), rgba(178,110,44,.20) 45%, transparent 70%);
  opacity: 0; transform: scale(.2); transition: opacity .7s, transform .8s ease; pointer-events: none; }
.cgrev-stage.found .cgrev-glow { opacity: 1; transform: scale(1.05); }
.cgrev-anticip { text-align: center; font-size: 17px; color: var(--inksoft); font-family: var(--mono); letter-spacing: .02em; min-height: 24px; transition: opacity .4s; }
.cgrev-cg { font-size: clamp(32px, 8vw, 46px); font-weight: 600; letter-spacing: -.025em; text-align: center; margin: 6px 0 4px;
  opacity: 0; transform: translateY(10px) scale(.95); transition: opacity .5s, transform .6s cubic-bezier(.2,1.3,.4,1); }
.cgrev-cg.show { opacity: 1; transform: none; }
.cgrev-pick { opacity: 0; transform: scale(.95) translateY(12px); transition: opacity .5s, transform .6s cubic-bezier(.2,1.2,.4,1); }
.cgrev-pick.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cgrev-mole, .cgrev-glow, .cgrev-cg, .cgrev-pick { transition: none; } .cgrev-dirt i { animation: none; } }
