* { box-sizing: border-box; }
:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  /* Product color: the dark blue of the title card that opens the demo tour
     (scripts/demo-video.js). Reserved for CTAs — it lands a hair off --ink
     (#1a1a2e), so links and other accent affordances stay orange rather than
     becoming indistinguishable from body text. filter: brightness() barely
     moves a colour this dark, hence an explicit hover. */
  --cta: #14142e;
  --cta-hover: #26264f;
  --cta-ink: #ffffff;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn-bg: #fef9c3;
  --warn-ink: #854d0e;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.container { max-width: 1060px; margin: 0 auto; padding: 24px; }
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .brand { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink); }
.topbar .brand span { color: var(--accent); }
/* Site footer, on every page including the landing page. Lives here rather
   than in landing.css because the app pages load style.css alone. */
.lfooter {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.lfooter .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.lfooter .brand span { color: var(--accent); }
.lfooter a { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
button, .btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--line);
  color: var(--muted);
}
.badge.live { background: #dcfce7; color: #166534; }
.badge.closed { background: #fee2e2; color: #991b1b; }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); text-transform: none; }
/* Sentiment buckets on free-text feedback. Same 100/800 pairs as live/closed —
   --ok/--bad are text-weight and too dark to fill a pill with. */
.badge.positive { background: #dcfce7; color: #166534; }
.badge.negative { background: #fee2e2; color: #991b1b; }
.badge.neutral { background: var(--line); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 8px; border-bottom: 1px solid var(--line); }
/* Trailing action cell: keeps the buttons on one line and hard right, so the
   column stays a fixed width no matter how long the test names get. */
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 6px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 220px; }
a { color: var(--accent); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  border: none; background: none; border-radius: 0; font-weight: 600;
  padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Plan chooser (dashboard Upgrade button). Nested cards, so they drop the
   outer card's bottom margin and sit side by side. */
.plangrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plangrid .plan { margin-bottom: 0; }
.plangrid .plan h3 { font-size: 15px; margin: 0 0 6px; }
.planprice { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.planprice .muted { font-size: 13px; font-weight: 500; }
.plangrid .plan button { margin-top: 12px; }
@media (max-width: 700px) {
  .plangrid { grid-template-columns: 1fr; }
}
