:root {
  --bg: #070b14;
  --panel: rgba(14, 20, 34, 0.86);
  --panel-2: rgba(17, 25, 42, 0.9);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f7fb;
  --muted: #95a2b9;
  --dim: #6e7b92;
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --good: #86efac;
  --danger: #fca5a5;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 7%, rgba(125, 211, 252, 0.095), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(167, 139, 250, 0.095), transparent 26%),
    linear-gradient(180deg, #070b14 0%, #090e19 100%);
}
body[data-mode="pressure"] { --accent: #f9a8d4; --accent-2: #fb7185; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.62; }

.app-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 34px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, rgba(125,211,252,.2), rgba(167,139,250,.2));
  border: 1px solid var(--border); font-weight: 850;
}
.brand { font-size: 15px; font-weight: 800; }
.tagline { color: var(--dim); font-size: 11px; margin-top: 2px; }
.status { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--good); box-shadow: 0 0 16px rgba(134,239,172,.4); }

.page { padding: 48px 0; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: end; margin-bottom: 26px; }
.eyebrow-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.privacy-pill {
  border: 1px solid rgba(134,239,172,.18); color: var(--good); background: rgba(134,239,172,.05);
  padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .12em;
}
h1 { margin: 0; max-width: 820px; font-size: clamp(42px, 6.4vw, 76px); line-height: .96; letter-spacing: -.06em; }
.hero-copy { max-width: 730px; color: var(--muted); font-size: 17px; line-height: 1.65; margin: 18px 0 0; }
.proof-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.proof-row span {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--dim);
  background: rgba(255,255,255,.025); font-size: 11px;
}
.hero-card {
  width: 235px; padding: 18px; border: 1px solid var(--border); border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
}
.hero-label, .brief-label {
  display: block; color: var(--dim); font-size: 9px; letter-spacing: .15em; font-weight: 850; margin-bottom: 8px;
}
.hero-card strong { font-size: 22px; letter-spacing: -.03em; }
.hero-card p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 10px 0 13px; }
.hero-card a { color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 750; }

.friend-brief {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center;
  padding: 18px 20px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 18px;
  background: rgba(255,255,255,.025);
}
.friend-brief strong { font-size: 15px; line-height: 1.45; }
.friend-brief p { color: var(--muted); line-height: 1.55; margin: 0; font-size: 13px; }

.grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 18px; }
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); backdrop-filter: blur(14px); overflow: hidden;
}
.setup, .question-card, .feedback-panel, .history-panel { padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.025em; }
.section-kicker { color: var(--dim); font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.section-sub { display: block; color: var(--dim); font-size: 11px; margin-top: 4px; }
.mini-note { color: var(--dim); font-size: 11px; padding-top: 3px; text-align: right; }

label { display: block; margin-top: 18px; color: var(--muted); font-size: 12px; font-weight: 750; }
input, textarea {
  width: 100%; margin-top: 9px; padding: 13px 14px; color: var(--text);
  background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 14px; outline: none; resize: vertical;
}
input:focus, textarea:focus { border-color: rgba(125,211,252,.42); box-shadow: 0 0 0 3px rgba(125,211,252,.08); }
.answer-box { min-height: 240px; margin-top: 4px; }
.answer-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 10px; margin-bottom: 7px; }

.mode-row { display: flex; gap: 8px; margin-top: 18px; }
.mode { flex: 1; padding: 10px 12px; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 12px; }
.mode.active { color: var(--text); background: rgba(125,211,252,.09); border-color: rgba(125,211,252,.25); }
.setup-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.timer-live { color: var(--good) !important; border-color: rgba(134,239,172,.2) !important; background: rgba(134,239,172,.05) !important; }

.link-button { padding: 6px 0; color: var(--accent); background: transparent; border: 0; font-size: 11px; font-weight: 750; }
.link-button.danger { color: var(--danger); }

.question-kind { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.question { font-size: 28px; line-height: 1.25; letter-spacing: -.04em; margin: 14px 0 12px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.compact { padding: 9px 12px; font-size: 12px; }
.follow-up-actions { margin-top: 15px; display: flex; justify-content: flex-start; }
.ghost, .primary { border-radius: 12px; padding: 11px 15px; font-weight: 800; }
.ghost { color: var(--muted); border: 1px solid var(--border); background: transparent; }
.primary { color: #07121d; border: 0; background: linear-gradient(135deg, var(--accent), #c4b5fd); box-shadow: 0 8px 22px rgba(125,211,252,.1); }

.feedback-panel { margin-top: 18px; }
.score { color: var(--dim); font-size: 13px; }
.score span { color: var(--text); font-size: 28px; font-weight: 900; }
.empty-state { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); padding: 30px; }
.empty-state p { margin: 0; }
.empty-state span { font-size: 12px; color: var(--dim); }
.empty-icon { font-size: 30px; color: var(--accent-2); }

.feedback-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feedback-grid > div { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.feedback-grid h3 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.feedback-grid p { color: var(--muted); line-height: 1.6; margin: 0; }
.feedback-grid .wide { grid-column: 1 / -1; }
.feedback-item { margin-top: 9px !important; }
.feedback-item.positive { color: var(--good) !important; }
.rubric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.rubric-card { background: rgba(255,255,255,.025); padding: 11px; border-radius: 12px; border: 1px solid var(--border); }
.rubric-card span { display: block; color: var(--dim); font-size: 10px; margin-bottom: 6px; }
.rubric-card strong { font-size: 15px; }
.bar { height: 4px; margin-top: 8px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.next { grid-column: 1 / -1; }

.history-panel { margin-top: 18px; }
.session-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.session-stats > div { padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); }
.session-stats span { display: block; color: var(--dim); font-size: 10px; margin-bottom: 4px; }
.session-stats strong { font-size: 15px; }

.history-empty { margin: 0; color: var(--dim); font-size: 13px; }
.history-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); }
.history-index { color: var(--accent-2); font-variant-numeric: tabular-nums; font-weight: 850; }
.history-copy { flex: 1; }
.history-top { display: flex; justify-content: space-between; gap: 16px; }
.history-top strong { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.history-top span { font-size: 12px; font-weight: 850; }
.history-item p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 2px 0; color: var(--dim); font-size: 10px; line-height: 1.5; }

@media (max-width: 920px) {
  .hero, .friend-brief, .grid { grid-template-columns: 1fr; }
  .hero-card { width: 100%; }
  .rubric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .app-shell { width: min(100% - 24px, 760px); }
  .hero { gap: 22px; }
  h1 { font-size: clamp(38px, 12vw, 60px); }
  .feedback-grid, .rubric-grid, .session-stats { grid-template-columns: 1fr; }
  .feedback-grid .wide { grid-column: auto; }
  .footer { flex-direction: column; }
}
