/* RadarBD "Signal in the Noise".
   Near-black ground, graphite cards, warm white and cool gray type.
   Signal green is reserved for things that mean something: the one action
   that matters on a screen, an active state, a real opportunity. */

@font-face {
  font-family: "Geist";
  src: url("/public/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/public/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0B0F12;
  --card: #151B20;
  --raise: #1B2228;
  --line: #242D34;
  --line-strong: #34404A;
  --text: #F2F4F3;
  --muted: #9BA4AA;
  --faint: #6C767D;
  --signal: #7CF2A0;
  --signal-dim: rgba(124, 242, 160, 0.12);
  --warn: #E5C07B;
  --danger: #F0857A;
  --radius: 3px;
  --sans: "Geist", "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 550; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
::selection { background: rgba(124, 242, 160, 0.3); }

/* Small uppercase technical label. Used sparingly. */
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.signal { color: var(--signal); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
.small { font-size: 13px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side {
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--signal-dim); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .label { padding: 0 8px 8px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px; border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-size: 14px;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.on { color: var(--text); background: var(--card); box-shadow: inset 2px 0 0 var(--signal); }
.nav .count { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.side .who { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .who .name { color: var(--text); font-weight: 500; }
.side .who form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

.main { padding: 40px 48px 96px; max-width: 1240px; width: 100%; }
.main.narrow { max-width: 820px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.head .label { display: block; margin-bottom: 8px; }
.head .sub { color: var(--muted); margin-top: 6px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.section { margin-top: 40px; }
.section > .label, .section-head { margin-bottom: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.grid.half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.tile .value { font-size: 32px; font-weight: 550; letter-spacing: -0.02em; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.tile .value.key { color: var(--signal); }
.tile .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
a.tile { display: block; text-decoration: none; }
a.tile:hover { border-color: var(--line-strong); }

/* ---------- Tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--raise); }
td.right, th.right { text-align: right; }
table.fixed { table-layout: fixed; min-width: 820px; }
table.fixed td { overflow-wrap: break-word; }
td .primary { font-weight: 500; text-decoration: none; }
td .primary:hover { text-decoration: underline; text-decoration-color: var(--muted); }
td .secondary { color: var(--muted); font-size: 13px; }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }

/* ---------- Definition rows ---------- */
.facts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 20px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .src { color: var(--faint); font-size: 12px; display: block; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=url], input[type=search], select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 9px 12px; font: inherit; font-size: 14px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); }
input[type=file] { color: var(--muted); font: inherit; font-size: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--signal); width: 16px; height: 16px; margin: 0; }
.field { margin-bottom: 18px; }
.field .help { color: var(--faint); font-size: 12px; margin-top: 6px; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pickrow { display: flex; gap: 10px; flex-wrap: wrap; }
.pickrow select { flex: 1 1 260px; min-width: 0; }
.row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; margin: 0; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 10px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .grow { flex: 1 1 220px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: #06130B; }
.btn.primary:hover { background: #93F5B1; border-color: #93F5B1; }
.btn.danger { color: var(--danger); border-color: rgba(240, 133, 122, 0.45); }
.btn.danger:hover { border-color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.big { padding: 12px 20px; font-size: 15px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Status ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 2px; padding: 2px 7px; white-space: nowrap;
}
.tag.on { color: var(--signal); border-color: rgba(124, 242, 160, 0.4); }
.tag.warn { color: var(--warn); border-color: rgba(229, 192, 123, 0.4); }
.tag.danger { color: var(--danger); border-color: rgba(240, 133, 122, 0.4); }
.tag.quiet { color: var(--faint); border-color: var(--line); }

.score { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.score .bar { width: 44px; height: 3px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.score .bar i { display: block; height: 100%; background: var(--muted); }
.score.hot { color: var(--signal); }
.score.hot .bar i { background: var(--signal); }

.flash { border: 1px solid var(--line-strong); border-left: 2px solid var(--signal); background: var(--card); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 24px; font-size: 14px; }
.flash.error { border-left-color: var(--danger); }
.note { border: 1px solid var(--line); border-left: 2px solid var(--warn); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; color: var(--muted); }
.note strong { color: var(--text); font-weight: 500; }
.note.danger { border-left-color: var(--danger); }
.note ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Lead page ---------- */
.modline { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.modline .big { font-size: 44px; font-weight: 550; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.modline .big.hot { color: var(--signal); }
.breakdown { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; font-size: 13px; }
.breakdown .pts { font-family: var(--mono); color: var(--muted); }
.breakdown .why { grid-column: 1 / -1; color: var(--faint); margin-top: -6px; font-size: 12px; }

.contact { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact:first-child { padding-top: 0; }
.contact:last-child { border-bottom: 0; padding-bottom: 0; }
.contact .name { font-weight: 500; }
.tel { font-family: var(--mono); font-size: 14px; white-space: nowrap; }

.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.outcomes .opt { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text); font-size: 14px; margin: 0; cursor: pointer; }
.outcomes .opt.off { color: var(--faint); cursor: not-allowed; }
.reveal { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.reveal.show { display: block; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline .meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.timeline .what { color: var(--text); font-weight: 500; }

.script { font-size: 14px; }
.script li { margin-bottom: 8px; }
.script ul { margin: 0; padding-left: 18px; color: var(--muted); }
.script ul strong { color: var(--text); font-weight: 500; }

/* ---------- Steps (hand-off) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.steps div { padding: 14px 16px; border-right: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.steps div:last-child { border-right: 0; }
.steps div .label { display: block; margin-bottom: 4px; color: var(--faint); }
.steps div.done { color: var(--muted); }
.steps div.now { color: var(--text); box-shadow: inset 0 2px 0 var(--signal); }
.steps div.now .label { color: var(--signal); }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 13px; }
.bulk { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bulk select { width: auto; min-width: 180px; }
details > summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details > summary:hover { color: var(--text); }
details[open] > summary { margin-bottom: 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
pre.plain { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- Radar ---------- */
.radar-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.radar-side > * + * { margin-top: 16px; }
.radar-main { min-width: 0; }
.radar { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; margin: 0 auto; }
.radar svg { position: relative; display: block; width: 100%; height: 100%; overflow: visible; }
/* The sweep turns inside a fixed, clipped circle so it never widens the page. */
.radar .sweep { position: absolute; inset: 2.667%; border-radius: 50%; overflow: hidden; }
.radar .sweep::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(124, 242, 160, 0) 0deg, rgba(124, 242, 160, 0) 290deg, rgba(124, 242, 160, 0.13) 360deg);
  animation: sweep 8s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar .ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.radar .ring.core { fill: rgba(124, 242, 160, 0.06); stroke: rgba(124, 242, 160, 0.4); }
.radar .grid line { stroke: var(--line); stroke-width: 1; }
.radar .ringname { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; fill: var(--muted); text-anchor: middle; }
.radar .plate { fill: var(--bg); }
.blip { transition: transform 1.8s cubic-bezier(0.2, 0.7, 0.2, 1); cursor: pointer; }
.blip circle { fill: #5E6A72; }
.blip.great circle { fill: var(--muted); }
.blip.due circle { fill: var(--text); }
.blip.won circle { fill: var(--signal); }
.blip .halo { fill: none !important; stroke: rgba(242, 244, 243, 0.3); stroke-width: 1; }
.blip.won .halo { stroke: rgba(124, 242, 160, 0.35); }
.blip.due .halo { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.2; } }
.blip:hover circle:first-child, .blip:focus circle:first-child { stroke: var(--text); stroke-width: 2; }
.blip:focus { outline: none; }
.blip.still { cursor: default; }
.blip.arrived circle:first-child { stroke: var(--signal); stroke-width: 2; }
.radar-tip {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  background: var(--raise); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 6px 10px; font-size: 13px; transform: translate(-50%, calc(-100% - 12px));
}
.radar-key { margin-top: 8px; }
.keyrow { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
a.keyrow:hover strong { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.keytext strong { display: block; font-weight: 550; font-size: 14px; }
.keytext span { display: block; color: var(--muted); font-size: 13px; }
.keycount { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.keydot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #5E6A72; vertical-align: middle; }
.keydot.won { background: var(--signal); }
.keydot.due { background: var(--text); }
.keydot.great { background: var(--muted); width: 12px; height: 12px; }
.keydot.off { background: none; border: 1px solid var(--faint); }
.keynote { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.nextcall h2 { font-size: 24px; margin: 10px 0 4px; }
.nextcall h2 a { text-decoration: none; }
.nextcall .why { margin: 14px 0 18px; font-size: 14px; color: var(--muted); }
.nextcall .why strong { color: var(--text); font-weight: 550; }
.bigphone { margin: 12px 0 0; }
.bigphone .tel { font-size: 20px; }
.tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.two .tile { padding: 16px 18px; }
.tiles.two .tile .value { font-size: 28px; }
table.todo td { vertical-align: middle; }
.score > span:not(.n):not(.bar) { font-family: var(--sans); font-size: 14px; }
.score .n { color: var(--faint); font-size: 12px; }

/* ---------- Numbered steps and big choice buttons ---------- */
.stephead { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.stephead h2 { font-size: 19px; margin-right: auto; }
.stepnum {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 14px; color: var(--text);
}
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick {
  position: relative; display: block; margin: 0; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px;
}
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .t { display: block; font-size: 16px; font-weight: 550; color: var(--text); }
.pick .h { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.pick:hover { border-color: var(--muted); }
.pick:has(input:checked) { border-color: var(--signal); background: var(--signal-dim); }
.pick:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.pick.win .t { color: var(--signal); }
.pick.danger .t { color: var(--danger); }
.pick.danger:has(input:checked) { border-color: var(--danger); background: rgba(240, 133, 122, 0.1); }
.pick.off { opacity: 0.45; cursor: not-allowed; }
.morepicks { margin-top: 14px; }
.sayfirst { margin-top: 20px; padding: 14px 18px; border-left: 2px solid var(--signal); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; }
.sayfirst p { margin: 8px 0 0; }
.modnum { font-size: 30px; font-weight: 550; letter-spacing: -0.02em; margin-right: 10px; font-variant-numeric: tabular-nums; vertical-align: -3px; }
.modnum.hot { color: var(--signal); }
.helpsteps .card { display: flex; gap: 20px; align-items: flex-start; }
.helpsteps .card p { margin: 8px 0 0; }
.helpsteps .stepnum { width: 38px; height: 38px; font-size: 17px; }
ul.script { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
ul.script li { margin-bottom: 8px; }
ul.script strong { color: var(--text); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .radar .sweep::before, .blip.due .halo { animation: none; }
  .blip { transition: none; }
}
@media (max-width: 1100px) {
  .radar-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .picks { grid-template-columns: 1fr; }
}

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth .field-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.auth .panel { position: relative; width: 100%; max-width: 400px; }
.auth .brand { padding: 0; margin-bottom: 28px; font-size: 18px; }
.auth h1 { font-size: 22px; margin-bottom: 6px; }
.auth .card { margin-top: 24px; }
.auth .foot { margin-top: 16px; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 16px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .nav { flex-direction: row; gap: 4px; }
  .nav .label { display: none; }
  .nav a { white-space: nowrap; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--signal); }
  .side .who { margin: 0 0 0 auto; padding: 0 0 0 8px; border: 0; white-space: nowrap; }
  .side .who .role, .side .who .name { display: none; }
  .side .who > div { margin-top: 0 !important; }
  .main { padding: 24px 16px 72px; }
  .grid.two, .grid.half, .row, .row.three, .row.four, .outcomes { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 110px minmax(0, 1fr); }
}
