:root {
  --bg: #0d0b1a;
  --bg-2: #15122a;
  --panel: #1c1838;
  --ink: #e9e6f5;
  --muted: #9a93c4;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --fire: #fb923c;
  --line: #2c2752;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 70% -10%, #2a1f55 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 110%, #102a3a 0%, transparent 55%),
    var(--bg);
  line-height: 1.6;
}

main { max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.hero h1 { font-size: 2.3rem; line-height: 1.15; margin: .2rem 0 .4rem; }
.hero-sub { font-size: 1.25rem; font-weight: 700; color: var(--accent-2); margin: 0 0 1rem; }
.lede { color: var(--muted); font-size: 1.08rem; }
.free-list { list-style: none; padding: 0; margin: .75rem 0 1rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.free-list li { font-size: 1.05rem; font-weight: 600; }
.hero-cta-line { font-family: "Creepster", system-ui, cursive; font-weight: 400;
  font-size: 1.6rem; letter-spacing: .05em; color: var(--fire);
  text-shadow: 0 0 12px rgba(251,146,60,.5); margin: 1rem 0 0; }

.start-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem; align-items: start; margin: 1.5rem 0 2.5rem;
}
.start-layout .roast-form { margin: 0; }
.brand-art { position: sticky; top: 1.5rem; }
.brand-art img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 18px 40px rgba(139,92,246,.35));
}

@media (max-width: 820px) {
  .start-layout { grid-template-columns: 1fr; }
  /* Show the logo above the form on mobile, centered and smaller. */
  .brand-art { position: static; order: -1; max-width: 220px; margin: 0 auto .5rem; }
}

.roast-form {
  display: flex; flex-direction: column; gap: 1.1rem;
  background: linear-gradient(180deg, rgba(40,32,80,.45), var(--panel));
  border: 1px solid var(--line);
  border-radius: 20px; padding: 1.75rem; margin: 1.5rem 0 2.5rem;
  box-shadow: 0 20px 60px -30px #000, inset 0 1px 0 rgba(255,255,255,.03);
}
.field { display: flex; flex-direction: column; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.roast-form label {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
.field-hint { margin: 0; font-size: .82rem; color: var(--muted); }

.roast-form input,
.roast-form textarea {
  width: 100%; padding: .9rem 1rem; border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10,8,22,.6); color: var(--ink);
  font: inherit; line-height: 1.4; resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}
.roast-form input::placeholder,
.roast-form textarea::placeholder { color: #6b6498; }
.roast-form input:hover,
.roast-form textarea:hover { border-color: #3b3570; }
.roast-form input:focus,
.roast-form textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(10,8,22,.85);
  box-shadow: 0 0 0 3px rgba(139,92,246,.28), inset 0 1px 2px rgba(0,0,0,.35);
}

.btn {
  display: inline-block; cursor: pointer; border: none; border-radius: 10px;
  padding: .8rem 1.2rem; font: inherit; font-weight: 700; text-decoration: none;
  text-align: center; transition: transform .05s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(90deg, var(--fire), #f43f5e); color: #fff; margin-top: .75rem; }
.btn-tier { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07121a; width: 100%; }

.tiers h2 { margin-bottom: 1rem; }
.tier-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tier-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.25rem;
}
.tier-card h3 { margin: 0 0 .25rem; }
.price { font-size: 1.8rem; font-weight: 800; margin: 0 0 .5rem; color: var(--accent-2); }
.tier-card ul { padding-left: 1.1rem; margin: 0 0 1rem; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Report */
.report-head { text-align: center; margin-bottom: .5rem; }
.report-head h1 {
  font-family: "Creepster", system-ui, cursive;
  font-weight: 400; font-size: 3rem; letter-spacing: .07em;
  margin: .5rem 0; color: #f1eefc;
  text-shadow: 0 0 8px rgba(139,92,246,.85), 0 0 24px rgba(34,211,238,.45),
    0 0 40px rgba(139,92,246,.35), 0 2px 0 #000;
}
.tier-badge {
  font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px;
  background: #241f47; border: 1px solid var(--line); color: var(--accent-2);
}
.ghost-img {
  width: 100%; max-width: 420px; display: block; margin: 1.25rem auto;
  border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 0 60px -15px var(--accent);
}
.roast-section {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem 1.25rem; margin: 1rem 0;
}
.roast-section h2 { margin: 0 0 .4rem; font-size: 1.15rem; color: var(--fire); }

.pending { text-align: center; padding: 3rem 0; }

.site-footer {
  border-top: 1px solid var(--line); color: var(--muted);
  text-align: center; padding: 1.5rem; font-size: .85rem;
}

@media (max-width: 560px) {
  .tier-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}

/* In-page toasts (no browser popups) */
.toasts { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 100; width: min(92vw, 460px); }
.toast { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 10px 30px -10px #000; font-size: .95rem; }
.toast-error { border-color: #f43f5e; }
.toast-success { border-color: #22c55e; }
.toast-info { border-color: var(--accent); }
.notice { padding: 1rem 1.25rem; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 1.25rem; }
.notice-error { border-color: #f43f5e; }

/* Scorecard (free preview) */
.scorecard { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.25rem; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; margin: 1.25rem 0; }
.score { display: flex; align-items: baseline; justify-content: center; gap: .25rem; position: relative; padding-bottom: 1.1rem; }
.score-num { font-size: 3rem; font-weight: 800; color: var(--accent-2); line-height: 1; }
.score-den { font-size: 1.25rem; color: var(--muted); }
.score-label { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: .8rem; color: var(--muted); }
.metrics { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.metric { display: flex; flex-direction: column; align-items: center; }
.metric .k { font-size: .8rem; color: var(--muted); }
.metric .v { font-size: 1.15rem; font-weight: 700; }
.teaser { font-size: 1.1rem; font-style: italic; color: var(--ink); margin: 1rem 0 1.5rem; text-align: center; }

/* Unlock */
.unlock { background: var(--panel); border: 1px dashed var(--accent); border-radius: 16px; padding: 1.5rem; margin: 1.5rem 0; text-align: center; }
.unlock h2 { margin-top: 0; color: var(--fire); }
.unlock-buttons { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.unlock-buttons form { flex: 1 1 200px; }
.unlocked-badge { display: inline-block; background: #14321f; border: 1px solid #22c55e; color: #4ade80;
  padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 700; margin: 1rem 0; }

/* Sources (search-grounded investor report) */
.sources { margin-top: 1.5rem; }
.sources h2 { font-size: 1.05rem; color: var(--accent-2); margin-bottom: .5rem; }
.sources ol { margin: 0; padding-left: 1.25rem; }
.sources li { margin: .3rem 0; }
.sources a { color: var(--accent-2); word-break: break-all; font-size: .9rem; }
.sources a:hover { text-decoration: underline; }

/* Captcha */
.captcha-field { gap: .6rem; }
.captcha-row { display: flex; align-items: center; gap: .6rem; }
.captcha-img {
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  max-width: 100%; height: auto;
}
.captcha-refresh {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(10,8,22,.6); color: var(--accent-2);
  font-size: 1.3rem; line-height: 1; transition: filter .15s ease, transform .2s ease;
}
.captcha-refresh:hover { filter: brightness(1.3); transform: rotate(90deg); }
.captcha-entry { display: flex; gap: .6rem; }
.captcha-entry input { flex: 1 1 auto; letter-spacing: .25em; text-transform: uppercase; font-weight: 600; }
.btn-check { flex: 0 0 auto; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07121a; }
.captcha-msg { margin: 0; font-size: .9rem; min-height: 1.2em; }
.captcha-msg.ok { color: #4ade80; }
.captcha-msg.err { color: #fb7185; }
#summon-btn:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }

/* Admin */
.admin-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.stat { flex: 1 1 140px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1rem 1.25rem; text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.stat-k { font-size: .8rem; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-weight: 700; }
.admin-table .idea { color: var(--muted); }
.admin-filter { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.admin-filter .field { gap: .3rem; }
.admin-filter input { padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(10,8,22,.6); color: var(--ink); }
.admin-filter .btn-tier { width: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-logout { width: auto; }

/* ============ Roast report — séance verdict redesign ============ */
.report { font-family: "EB Garamond", Georgia, serif; max-width: 760px; margin: 0 auto; }
.report .eyebrow {
  font-family: "Cinzel", serif; letter-spacing: .38em; text-transform: uppercase;
  font-size: .7rem; color: var(--accent-2); margin: 0 0 .3rem; opacity: .85;
}
.report-head { text-align: center; margin: 1rem 0 1.75rem; }

/* Ghost Score seal */
.verdict-panel { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; margin: 1.5rem 0 2rem; }
.seal {
  position: relative; width: 210px; height: 210px; border-radius: 50%; padding: 11px;
  display: grid; place-items: center;
  background: conic-gradient(var(--ring) var(--pct), rgba(255,255,255,.06) 0);
  filter: drop-shadow(0 0 28px rgba(139,92,246,.35));
}
.seal::before {
  content: ""; position: absolute; inset: 11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #211b40, #0c0a18 75%);
  box-shadow: inset 0 0 34px rgba(0,0,0,.85);
}
.seal-good { --ring: #34d399; } .seal-warn { --ring: #fbbf24; } .seal-bad { --ring: #fb7185; }
.seal-inner { position: relative; z-index: 2; text-align: center; }
.seal-num { display: block; font-family: "Cinzel", serif; font-weight: 900; font-size: 3.6rem; line-height: 1; color: #f3f0ff; }
.seal-den { font-family: "Cinzel", serif; color: var(--muted); font-size: 1.05rem; letter-spacing: .05em; }
.seal-ghost {
  position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 62px; height: 62px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: #0d0b1a; box-shadow: 0 6px 18px rgba(0,0,0,.7);
}
.seal-caption { font-family: "Cinzel", serif; letter-spacing: .28em; text-transform: uppercase; font-size: .72rem; color: var(--muted); margin-top: -.4rem; }

.verdict-chips { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.chip { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem 1.5rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(28,24,56,.7); min-width: 150px; }
.chip-k { font-family: "Cinzel", serif; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.chip-v { font-family: "Cinzel", serif; font-weight: 700; font-size: 1.35rem; }
.chip[data-v="Low"], .chip[data-v="Strong"] { border-color: rgba(52,211,153,.6); }
.chip[data-v="Low"] .chip-v, .chip[data-v="Strong"] .chip-v { color: #34d399; }
.chip[data-v="Medium"], .chip[data-v="Promising"] { border-color: rgba(251,191,36,.6); }
.chip[data-v="Medium"] .chip-v, .chip[data-v="Promising"] .chip-v { color: #fbbf24; }
.chip[data-v="High"], .chip[data-v="Weak"] { border-color: rgba(251,113,133,.6); }
.chip[data-v="High"] .chip-v, .chip[data-v="Weak"] .chip-v { color: #fb7185; }

.report .teaser {
  font-family: "EB Garamond", serif; font-style: italic; font-size: 1.5rem; line-height: 1.5;
  text-align: center; color: #ded7f2; max-width: 44ch; margin: 1.5rem auto 2.5rem; padding: 0 1rem; border: 0;
}
.report .teaser::before { content: "\201C"; font-family: "Cinzel", serif; font-size: 3.2rem; color: var(--accent); line-height: .4; display: block; opacity: .55; }

.unlocked-badge {
  font-family: "Cinzel", serif; letter-spacing: .04em; text-align: center; display: block;
  background: #102a1d; border: 1px solid rgba(52,211,153,.5); color: #6ee7b7;
  padding: .6rem 1rem; border-radius: 999px; font-size: .82rem; margin: 1.5rem auto; max-width: max-content;
}

/* Dossier / case files */
.dossier { margin-top: 1.5rem; }
.case { display: flex; gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.case:last-child { border-bottom: 0; }
.case-no { flex: 0 0 2.4rem; text-align: right; font-family: "Cinzel", serif; font-weight: 900; font-size: 1rem; color: var(--accent-2); opacity: .6; padding-top: .35rem; }
.case-body h2 { font-family: "Cinzel", serif; font-weight: 700; font-size: 1.18rem; color: var(--fire); margin: 0 0 .5rem; letter-spacing: .01em; }
.case-body p { font-family: "EB Garamond", serif; font-size: 1.18rem; line-height: 1.7; color: #e6e1f5; margin: 0; white-space: pre-line; }

/* Unlock CTA */
.report .unlock { background: none; border: 0; text-align: center; padding: 1.5rem 0 0; margin-top: 1rem; }
.report .unlock h2 { font-family: "Cinzel", serif; color: #f3f0ff; font-size: 1.5rem; margin: 0 0 .3rem; }
.unlock-sub { color: var(--muted); margin: 0 auto 1.5rem; max-width: 40ch; }
.report .unlock-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.report .unlock-buttons form { flex: 1 1 240px; max-width: 300px; margin: 0; }
.btn-unlock {
  display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 100%; padding: 1.4rem 1rem;
  background: linear-gradient(165deg, rgba(139,92,246,.22), rgba(28,24,56,.9)); border: 1px solid var(--accent);
  border-radius: 18px; color: var(--ink); transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-unlock:hover { transform: translateY(-3px); border-color: var(--accent-2); box-shadow: 0 18px 50px -18px var(--accent); filter: none; }
.btn-unlock .u-title { font-family: "Cinzel", serif; font-weight: 700; font-size: 1.1rem; }
.btn-unlock .u-price { font-size: 2.1rem; font-weight: 800; color: var(--accent-2); line-height: 1; }
.btn-unlock .u-desc { font-size: .8rem; color: var(--muted); font-weight: 400; }
.btn-unlock-pro { background: linear-gradient(165deg, rgba(34,211,238,.16), rgba(28,24,56,.9)); border-color: var(--accent-2); }
.btn-unlock-pro .u-price { color: #5eead4; }

.sources h2 { font-family: "Cinzel", serif; }
.btn.is-loading { opacity: .7; cursor: wait; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; right: .85rem; top: 50%; width: 14px; height: 14px;
  margin-top: -7px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: sg-spin .7s linear infinite;
}
@keyframes sg-spin { to { transform: rotate(360deg); } }
.disclaimer { text-align: center; font-size: .8rem; color: var(--muted); font-style: italic;
  max-width: 46ch; margin: -.5rem auto 1.25rem; opacity: .85; }
.purchase-note { text-align: center; font-size: .78rem; color: var(--muted); margin: 1.25rem auto 0; max-width: 46ch; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; font-family: "EB Garamond", Georgia, serif; font-size: 1.08rem; line-height: 1.7; }
.legal h1 { font-family: "Cinzel", serif; font-size: 2rem; color: #f1eefc; margin-bottom: .2rem; }
.legal h2 { font-family: "Cinzel", serif; font-size: 1.25rem; color: var(--accent-2); margin: 2rem 0 .5rem; }
.legal h3 { font-family: "Cinzel", serif; font-size: 1rem; color: var(--fire); margin: 1.25rem 0 .3rem; }
.legal p, .legal li { color: #d7d2ec; }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .25rem 0; }
.legal a { color: var(--accent-2); }
.legal-updated { color: var(--muted); font-style: italic; margin-top: 0; }
.footer-links a { color: var(--muted); text-decoration: underline; }
.footer-links a:hover { color: var(--accent-2); }

/* Terms agreement gate */
.terms-agree { display: flex; flex-direction: column; gap: .55rem; max-width: 30rem; margin: 0 auto 1.5rem; text-align: left; }
.terms-agree label { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--muted); cursor: pointer; }
.terms-agree input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--accent-2); flex: 0 0 auto; }
.terms-agree a { color: var(--accent-2); }
.btn-unlock:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); transform: none; box-shadow: none; }

/* Idea / landing-page toggle */
.mode-toggle { display: inline-flex; gap: .25rem; background: rgba(10,8,22,.5); border: 1px solid var(--line); border-radius: 12px; padding: .25rem; }
.mode-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: .45rem .9rem; border-radius: 9px; transition: background .15s, color .15s; }
.mode-btn.is-active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #07121a; }
