:root {
  --brand: #2563EB;
  --brand2: #7C3AED;
  --bg: #1a1f27;
  --bg2: #252c36;
  --bg3: #2f3742;
  --line: rgba(255,255,255,0.12);
  --text: #f1f4f8;
  --muted: #aeb7c4;
  --ok: #22c55e;
  --warm: #f97316;
  --warm2: #fdba74;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  background: radial-gradient(900px 500px at 80% -10%, rgba(37,99,235,.16), transparent 60%),
              linear-gradient(180deg,#2c333e 0%,var(--bg) 45%,#171c23 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 14px; font-weight: 700; padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg3); color: var(--text);
  cursor: pointer; transition: all .15s; font-family: inherit; text-decoration: none;
}
.btn:hover { background: rgba(255,255,255,0.08); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: var(--brand); color: #fff; }
.btn.primary:hover { opacity: .92; }
.btn.warm { background: var(--warm); border-color: var(--warm); color: #1a1100; }
.btn.ghost { background: transparent; }
.btn.sm { font-size: 12px; padding: 7px 12px; }
input, select, textarea {
  width: 100%; font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.field { margin-bottom: 16px; }

/* App shell */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: rgba(28,33,41,.72); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.brand-badge { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.brand-dot { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--brand), var(--brand2)); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; overflow: hidden; }
.brand-tagline { font-weight: 500; font-size: 12px; color: #9da6b3; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line); }
.topbar .spacer { margin-left: auto; }
.topbar .powered { font-size: 11px; color: #717b89; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px; }

/* Cards */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; }

/* Lead list */
.lead { display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; margin-bottom: 10px; transition: all .15s; }
.lead:hover { border-color: rgba(37,99,235,.4); background: var(--bg3); }
.lead-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lead-name { font-size: 15px; font-weight: 700; color: #fff; }
.lead-quote { font-size: 14px; font-weight: 800; color: var(--brand); }
.lead-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.lead-meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 11px; color: #919aa7; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 100px; }
.pill.warm { background: rgba(249,115,22,.16); color: var(--warm2); }
.pill.ok { background: rgba(34,197,94,.15); color: #86efac; }
.pill.gray { background: rgba(255,255,255,.06); color: var(--muted); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* Mobile: stop the topbar from overflowing — brand on row 1, actions wrap below */
@media (max-width: 680px) {
  .topbar { flex-wrap: wrap; padding: 12px 16px; column-gap: 8px; row-gap: 10px; }
  #brandName { white-space: nowrap; }
  .brand-tagline { display: none; }            /* declutter on small screens */
  .topbar .spacer { flex-basis: 100%; order: 2; height: 0; margin: 0; }
  #poweredBy { order: 1; margin-left: auto; }  /* keep on the brand row, right-aligned */
  .topbar .btn { order: 3; }                   /* action buttons drop to the next row */
  .wrap { padding: 20px 16px; }
}
.tag { display: inline-block; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: #cfe0ff; padding: 3px 10px; border-radius: 100px; margin: 0 6px 6px 0; }
.tag.green { background: rgba(34,197,94,.12); color: #86efac; }
pre.sow { background: #12161c; border: 1px solid var(--line); border-radius: 12px; padding: 22px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; line-height: 1.7; color: #d7dfe9; overflow-x: auto; white-space: pre; }
