/* FinTechCo review portal - Stripe-inspired design system. No em dashes anywhere. */
:root {
  --bg: #ffffff;
  --surface: #f6f9fc;
  --panel: #ffffff;
  --ink: #0a2540;
  --slate: #425466;
  --accent: #635bff;
  --accent-hover: #4b45cc;
  --border: #e6ebf1;
  --border-strong: #d5dee8;
  --shadow: 0 1px 3px rgba(10,37,64,0.08), 0 1px 2px rgba(10,37,64,0.04);
  --prio-a: #df1b41;
  --prio-b: #d97706;
  --prio-c: #1a936f;
  --pass: #1a936f;
  --fail: #df1b41;
  --skip: #d97706;
  --radius: 8px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #0b1523;
  --surface: #0b1523;
  --panel: #16243a;
  --ink: #e6ebf1;
  --slate: #a7b6c9;
  --accent: #8f88ff;
  --accent-hover: #a9a4ff;
  --border: #23324b;
  --border-strong: #33465f;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 60px;
}
.brand { font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: 8px; flex: 1; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--slate); font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 6px; white-space: nowrap;
}
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.header-right { display: flex; align-items: center; gap: 8px; position: relative; }
.icon-btn {
  background: transparent; border: 1px solid var(--border-strong); color: var(--ink);
  width: 36px; height: 36px; border-radius: 6px; cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu {
  position: absolute; right: 0; top: 44px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 180px; padding: 6px; display: none;
}
.menu.open { display: block; }
.menu a, .menu button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: var(--ink); padding: 9px 12px; border-radius: 6px; font-size: 14px; cursor: pointer;
  font-family: var(--font);
}
.menu a:hover, .menu button:hover { background: var(--surface); text-decoration: none; }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* Hamburger (mobile) */
.hamburger { display: none; }
@media (max-width: 720px) {
  .brand { font-size: 18px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
}

/* Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 80px; }
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px; }
.page-sub { color: var(--slate); margin: 0 0 28px; font-size: 16px; }
h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin: 34px 0 12px; }
h3 { font-size: 18px; font-weight: 600; margin: 22px 0 8px; }
p, li { color: var(--ink); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
pre { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-x: auto; }
pre code { background: none; border: none; padding: 0; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.banner {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 24px; font-size: 14px; color: var(--slate);
}
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.badge-A { color: #fff; background: var(--prio-a); }
.badge-B { color: #fff; background: var(--prio-b); }
.badge-C { color: #fff; background: var(--prio-c); }
.badge-team { color: var(--slate); background: var(--surface); border-color: var(--border-strong); }
.pill-pass { color: var(--pass); }
.pill-fail { color: var(--fail); }
.pill-skip { color: var(--skip); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot-pass { background: var(--pass); }
.dot-fail { background: var(--fail); }
.dot-skip { background: var(--skip); }

button.btn, .btn {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font);
}
button.btn:hover, .btn:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
button.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--accent); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

input, textarea, select {
  font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 9px 11px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
label { font-size: 13px; font-weight: 600; color: var(--slate); display: block; margin-bottom: 5px; }
.field { margin-bottom: 14px; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--slate); font-weight: 600; font-size: 13px; }

.footer {
  border-top: 1px solid var(--border); padding: 24px 20px; text-align: center;
  color: var(--slate); font-size: 13px; margin-top: 40px;
}

/* Mermaid diagrams sit on panel */
.mermaid { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0; text-align: center; overflow-x: auto; }

/* Test suite */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat { flex: 1; min-width: 120px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--slate); text-transform: uppercase; letter-spacing: 0.04em; }
.bar { height: 12px; border-radius: 999px; overflow: hidden; display: flex; background: var(--border); }
.bar > span { display: block; height: 100%; }
.expandable { cursor: pointer; }
.detail { display: none; padding: 12px 0 4px; }
.detail.open { display: block; }
.rec-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.rec-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.rec-title { font-weight: 600; flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--slate); cursor: pointer; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 0; }
.msg { margin: 12px 0; display: flex; gap: 10px; }
.msg .bubble { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; max-width: 80%; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.model-chip { font-size: 11px; color: var(--slate); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-top: 6px; display: inline-block; }
.thinking span { display: inline-block; width: 8px; height: 8px; margin: 0 2px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite ease-in-out; }
.thinking span:nth-child(2) { animation-delay: 0.2s; }
.thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.bubble h1,.bubble h2,.bubble h3 { margin: 8px 0 4px; font-size: 15px; }
.bubble ul { margin: 6px 0; padding-left: 20px; }
.bubble p { margin: 6px 0; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row textarea { resize: none; height: 46px; }
.picker-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
