/* flex.wick.pics — the page around the cards.
   Near-black ground so the cards are the only saturated things on it, with the
   brand ramp used for one accent at a time. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: #eceaf6;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
/* One wide bloom behind the fold, so the page is not a flat black rectangle. */
body::before {
  content: ''; position: fixed; inset: -20% -10% auto -10%; height: 90vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46% 60% at 16% 24%, rgba(255,46,136,.20) 0%, transparent 66%),
    radial-gradient(42% 54% at 82% 8%, rgba(0,224,255,.16) 0%, transparent 64%),
    radial-gradient(50% 56% at 62% 72%, rgba(122,92,255,.18) 0%, transparent 66%);
  filter: blur(6px);
}
h1, h2, h3, p, ul, dl { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

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

/* ── chrome ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 20px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.topbar-mark { font-family: var(--display); font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.topbar-mark em { font-style: normal; color: var(--brand-1); }
.topbar-chain {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(236,234,246,.5);
}

main { padding: 0 clamp(18px, 5vw, 56px); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  gap: clamp(32px, 6vw, 76px); align-items: start;
  padding: clamp(46px, 9vw, 100px) 0 clamp(40px, 7vw, 84px);
  max-width: 1180px; margin: 0 auto;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-3);
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(42px, 7.4vw, 88px); line-height: .93; letter-spacing: -.035em;
  margin: 18px 0 22px; text-wrap: balance;
  background: linear-gradient(102deg, #fff 12%, #ffc9e6 46%, #b9e8ff 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 46ch; color: rgba(236,234,246,.72); font-size: clamp(15px, 1.6vw, 17px); }
.hero-points { margin-top: 34px; display: grid; max-width: 46ch; }
.hero-points li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 13px 0; border-top: 1px solid rgba(255,255,255,.09);
  font-size: 14px;
}
.hero-points li:last-child { border-bottom: 1px solid rgba(255,255,255,.09); }
.hero-points span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; }
.hero-points li:nth-child(1) span { color: var(--brand-1); }
.hero-points li:nth-child(2) span { color: var(--brand-3); }
.hero-points li:nth-child(3) span { color: #9cff2e; }

.hero-form { position: sticky; top: 24px; }
/* The blank card previews the real one's layout, so the shout is present but
   dialled right down — it is a placeholder, not a claim. No candle here: it would
   collide with the field, and it has nothing to measure yet. */
.fcard-blank { min-height: 400px; }
.fcard-blank .fcard-inner { gap: 22px; }
.fcard-blank .fcard-shout { font-size: clamp(56px, 22cqi, 96px); }
.fcard-blank .is-ghost { opacity: .26; }
.fcard-blank .fcard-hero { margin-block: 6px auto; }

/* The field, sitting where the answer will be. Glass on the card's own wash. */
.fcard-input { margin-top: auto; }
.fcard-input label {
  display: block; font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72);
  margin-bottom: 8px;
}
.fcard-inputrow { display: flex; gap: 8px; }
.fcard-input input {
  flex: 1; min-width: 0; padding: 13px 14px;
  background: rgba(6,4,16,.42); color: #fff;
  border: 1px solid rgba(255,255,255,.32); border-radius: 12px;
  font-family: var(--mono); font-size: 14px; letter-spacing: -.01em;
  backdrop-filter: blur(8px);
}
.fcard-input input::placeholder { color: rgba(255,255,255,.5); }
.fcard-input input:focus-visible { outline-color: #fff; border-color: rgba(255,255,255,.7); }
.fcard-input button {
  padding: 13px 24px; border: none; border-radius: 12px; cursor: pointer;
  background: #fff; color: #0a0a12;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.fcard-input button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(0,0,0,.7); }
.fcard-input button[disabled] { opacity: .6; cursor: progress; transform: none; }
.fcard-hint { margin-top: 10px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.72); }

/* ── presets ────────────────────────────────────────────────────────────── */
.presets { margin-top: 20px; display: grid; gap: 16px; }
.preset-group { display: grid; gap: 9px; }
.preset-title {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(236,234,246,.42);
}
.preset-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-chips button {
  display: inline-flex; align-items: baseline; gap: 7px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; color: rgba(236,234,246,.88); font-size: 13px; font-weight: 500;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}
.preset-chips button em {
  font-style: normal; font-family: var(--mono); font-size: 11px; color: rgba(236,234,246,.5);
}
.preset-chips button:hover {
  border-color: var(--brand-3); color: #fff; background: rgba(0,224,255,.1); transform: translateY(-1px);
}
.preset-chips button:hover em { color: var(--brand-3); }

/* ── status ─────────────────────────────────────────────────────────────── */
.status { max-width: 1180px; margin: 0 auto; padding: 0 0 clamp(40px, 7vw, 72px); }
.status-box {
  border: 1px solid rgba(255,255,255,.11); border-radius: 18px; padding: 24px;
  background: rgba(255,255,255,.03);
}
.status-line {
  display: flex; align-items: center; gap: 12px; padding: 7px 0;
  font-size: 14px; color: rgba(236,234,246,.44);
}
.status-line[data-on="1"] { color: #fff; }
.status-tick { width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; flex: none; }
.status-line[data-on="1"] .status-tick { background: var(--brand-3); border-color: var(--brand-3); box-shadow: 0 0 12px var(--brand-3); }
.status-err { color: #ffb4a8; font-size: 14px; }
.status-err strong { display: block; color: #fff; font-size: 15px; margin-bottom: 6px; }

/* ── results ────────────────────────────────────────────────────────────── */
.results { max-width: 1180px; margin: 0 auto; padding-bottom: clamp(48px, 8vw, 96px); }
.results-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.results-who { font-family: var(--display); font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.03em; }
.results-sub {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(236,234,246,.5); margin-top: 8px;
}
.results-tally { display: flex; gap: clamp(18px, 3vw, 38px); flex-wrap: wrap; }
.results-tally div { text-align: right; }
.results-tally dt {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(236,234,246,.5);
}
.results-tally dd { margin: 5px 0 0; font-family: var(--display); font-size: 21px; letter-spacing: -.02em; }
.results-tally dd.pos { color: #6ff2a8; }
.results-tally dd.neg { color: #ff8fa0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(18px, 2.4vw, 26px); }
.card-slot { display: flex; flex-direction: column; gap: 12px; }
.card-slot .fcard { flex: 1; min-height: 430px; }

/* Actions centre under their card — Chef, 2026-07-29. */
.card-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: rgba(236,234,246,.85);
  font-size: 12px; letter-spacing: .04em;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}
.btn:hover { border-color: rgba(255,255,255,.5); color: #fff; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(96deg, var(--brand-1), var(--brand-2));
  border-color: transparent; color: #fff; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.12); }
.btn[data-done="1"] { border-color: #6ff2a8; color: #6ff2a8; }

.empty {
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 34px;
  background: rgba(255,255,255,.03);
  color: rgba(236,234,246,.72); max-width: 62ch;
}
.empty h3 { font-family: var(--display); font-size: 24px; margin-bottom: 10px; color: #fff; letter-spacing: -.02em; }
.note { margin-top: 18px; font-size: 12px; color: rgba(236,234,246,.5); display: flex; gap: 8px; flex-wrap: wrap; }
.note b { color: rgba(236,234,246,.85); font-weight: 700; }

/* ── ledger table ───────────────────────────────────────────────────────── */
.ledger { margin-top: 40px; border-top: 1px solid rgba(255,255,255,.1); }
.ledger summary {
  padding: 18px 0; cursor: pointer; font-family: var(--mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(236,234,246,.5);
}
.ledger summary:hover { color: var(--brand-3); }
.ledger-body { overflow-x: auto; padding-bottom: 12px; }
.ledger table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 13px; }
.ledger th {
  text-align: left; font-family: var(--mono);
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(236,234,246,.5);
  padding: 8px 14px 8px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-weight: 500;
}
.ledger td {
  padding: 10px 14px 10px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.ledger .r, .ledger th.r { text-align: right; padding-right: 0; }
.ledger .pos { color: #6ff2a8; }
.ledger .neg { color: #ff8fa0; }
.ledger .sym { font-weight: 700; }
.ledger a { color: rgba(236,234,246,.85); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.3); }
.ledger a:hover { color: var(--brand-3); border-color: var(--brand-3); }

/* ── method + foot ──────────────────────────────────────────────────────── */
.method {
  max-width: 1180px; margin: 0 auto; padding: clamp(40px, 7vw, 78px) 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.method h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.method-grid {
  margin-top: 30px; display: grid; gap: clamp(22px, 3vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
}
.method h3 { font-size: 14px; letter-spacing: -.005em; margin-bottom: 9px; color: #fff; }
.method p { color: rgba(236,234,246,.55); font-size: 13.5px; line-height: 1.65; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px clamp(18px, 5vw, 56px);
  border-top: 1px solid rgba(255,255,255,.09);
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(236,234,246,.35);
}

/* ── permalink page ─────────────────────────────────────────────────────── */
.permalink .wrap {
  max-width: 500px; margin: 0 auto; padding: clamp(36px, 8vw, 80px) 20px;
  display: flex; flex-direction: column; gap: 22px;
}
.permalink-back { font-family: var(--display); font-size: 16px; text-decoration: none; letter-spacing: -.02em; align-self: flex-start; }
.permalink-card .fcard { min-height: 430px; }
.permalink-line { color: rgba(236,234,246,.72); font-size: 15px; }
.permalink .btn-primary { align-self: flex-start; }

/* ── motion ─────────────────────────────────────────────────────────────── */
@keyframes feed { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.card-slot { animation: feed .55s cubic-bezier(.2,.7,.3,1) both; }
.card-slot:nth-child(2) { animation-delay: .09s; }
.card-slot:nth-child(3) { animation-delay: .18s; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-form { position: static; }
  .results-head { align-items: flex-start; }
  .results-tally div { text-align: left; }
}
