* { box-sizing: border-box; }

:root {
  --navy: #071a33;
  --ink: #0b1b31;
  --muted: #5d6b7e;
  --line: rgba(7, 26, 51, 0.12);
  --panel: rgba(255, 255, 255, 0.72);
  --keep-bg: #dbeafe;
  --keep-text: #173b79;
  --scrap-bg: #ffdfb0;
  --scrap-text: #7c310d;
  --unclear-bg: #e5e7eb;
  --unclear-text: #374151;
}

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #eef1f5 url('/background.png') center top / cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(245,247,250,0.72), rgba(245,247,250,0.54) 44%, rgba(245,247,250,0.36));
  pointer-events: none;
  z-index: -1;
}

main {
  width: min(1420px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  margin: 12px 0 18px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.46));
  box-shadow: 0 16px 45px rgba(6, 20, 40, 0.12);
  backdrop-filter: blur(3px);
}

.eyebrow {
  color: #37506f;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 13px;
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  color: var(--navy);
}

.lead {
  max-width: 880px;
  margin: 0;
  color: #233958;
  font-size: 18px;
}

.note {
  max-width: 980px;
  margin: 16px 0 0;
  color: #41536b;
  font-size: 14px;
}

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.64);
  border: 1px solid var(--line);
  font-size: 13px;
}

.legend-item span:last-child { color: var(--muted); }
.legend-dot { width: 11px; height: 11px; border-radius: 999px; display: inline-block; }
.legend-dot.keep { background: #3b82f6; }
.legend-dot.scrap { background: #f59e0b; }
.legend-dot.unclear { background: #9ca3af; }

.panel, .card, .table-wrap {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.56);
  box-shadow: 0 8px 22px rgba(6, 20, 40, 0.08);
  backdrop-filter: blur(3px);
}

.controls-panel {
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

label { display: grid; gap: 5px; font-weight: 800; color: #233958; }

input {
  width: 120px;
  padding: 10px 11px;
  border: 1px solid #c9d2df;
  border-radius: 10px;
  font-size: 16px;
  background: white;
}

button {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: #102848; }
#status { color: var(--muted); font-size: 14px; padding-bottom: 11px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.card { border-radius: 16px; padding: 19px 20px; }
.label { color: #526276; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.value { margin-top: 9px; font-size: 29px; font-weight: 900; color: var(--navy); }

.table-wrap { border-radius: 16px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.58); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: rgba(255,255,255,0.95); color: #233958; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 900; position: sticky; top: 0; z-index: 10; }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 12px; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }

.group-row td {
  background: linear-gradient(90deg, #071a33, #17375f);
  color: white;
  border-bottom: 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  padding: 11px 16px;
}

.candidate-row:hover { background: rgba(255,255,255,0.78); }

.status-badge, .confidence {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-badge { background: #edf2f7; color: #233958; border: 1px solid #d9e0ea; }
.empty-status { color: #9aa4b2; }

.lean-pill {
  display: inline-grid;
  gap: 2px;
  min-width: 178px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
}
.lean-title { font-weight: 900; font-size: 13px; }
.lean-subtitle { font-weight: 700; font-size: 12px; opacity: 0.86; }
.lean-keep { background: var(--keep-bg); color: var(--keep-text); }
.lean-scrap { background: var(--scrap-bg); color: var(--scrap-text); }
.lean-unclear { background: var(--unclear-bg); color: var(--unclear-text); }

.confidence-high { background: #d1fae5; color: #065f46; }
.confidence-medium { background: #fef3c7; color: #7c4a03; }
.confidence-low { background: #e5e7eb; color: #4b5563; }

footer { margin-top: 16px; color: #526276; font-size: 13px; }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap { overflow-x: auto; }
  table { min-width: 900px; }
}

@media (max-width: 560px) {
  main { width: min(100% - 20px, 1420px); padding-top: 10px; }
  .hero { padding: 20px; }
  .summary-grid { grid-template-columns: 1fr; }
}
