:root {
  --ink:           oklch(0.22 0.008 260);
  --ink-soft:      oklch(0.42 0.012 260);
  --ink-mute:      oklch(0.58 0.010 260);
  --ink-faint:     oklch(0.74 0.008 260);
  --line:          oklch(0.915 0.004 90);
  --line-soft:     oklch(0.945 0.004 90);
  --canvas:        oklch(0.982 0.004 90);
  --surface:       #ffffff;
  --surface-sunk:  oklch(0.975 0.004 90);
  --brand:         oklch(0.52 0.15 258);
  --brand-ink:     oklch(0.36 0.15 258);
  --brand-wash:    oklch(0.965 0.025 258);
  --brand-edge:    oklch(0.88 0.06 258);
  --amber:         oklch(0.68 0.13 68);
  --amber-wash:    oklch(0.97 0.035 78);
  --green:         oklch(0.62 0.13 150);
  --green-wash:    oklch(0.96 0.04 150);
  --danger-wash:   oklch(0.96 0.02 25);
}

html, body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  background: var(--canvas);
  color: var(--ink);
}

.appbar {
  background: oklch(0.18 0.012 260);
  color: oklch(0.88 0.005 260);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.label-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1;
}

.hairline      { border-color: var(--line); }
.hairline-soft { border-color: var(--line-soft); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.font-tabular { font-variant-numeric: tabular-nums; }

.thin-scroll::-webkit-scrollbar { width: 8px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb {
  background: oklch(0.88 0.005 260);
  border-radius: 999px;
}

.chev { transition: transform 0.18s ease; }

.kbd {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  background: white;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  color: var(--ink-soft);
  border-radius: 4px;
  padding: 1px 4px;
  display: inline-block;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pill[data-state="on"],
.pill[data-state="included"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pill[data-state="excluded"] {
  background: var(--surface-sunk);
  border-color: var(--line);
  color: var(--ink-mute);
}
.pill[data-state="blocked"] {
  background: var(--surface-sunk);
  border-color: var(--line);
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  opacity: 0.5;
  cursor: not-allowed;
}
.pill:not([data-state="on"]):not([data-state="included"]):not([data-state="excluded"]):not([data-state="blocked"]):hover {
  border-color: oklch(0.82 0.01 260);
}

.pill-lg {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-new    { background: oklch(0.96 0.04 258); color: oklch(0.28 0.12 258); }
.badge-new .dot  { background: oklch(0.55 0.18 258); }
.badge-disc   { background: oklch(0.96 0.04 198); color: oklch(0.28 0.10 198); }
.badge-disc .dot { background: oklch(0.55 0.14 198); }
.badge-prop   { background: var(--amber-wash); color: oklch(0.36 0.10 68); }
.badge-prop .dot { background: var(--amber); }
.badge-follow { background: oklch(0.96 0.03 310); color: oklch(0.32 0.12 310); }
.badge-follow .dot { background: oklch(0.55 0.16 310); }
.badge-won    { background: var(--green-wash); color: oklch(0.30 0.10 150); }
.badge-won .dot  { background: var(--green); }
.badge-lost   { background: var(--danger-wash); color: oklch(0.36 0.12 25); }
.badge-lost .dot { background: oklch(0.58 0.15 25); }
.badge-ice    { background: oklch(0.96 0.01 260); color: oklch(0.40 0.01 260); }
.badge-ice .dot  { background: oklch(0.6 0.01 260); }
.badge-qual   { background: var(--green-wash); color: oklch(0.30 0.10 150); }
.badge-qual .dot { background: var(--green); }
.badge-mute   { background: var(--surface-sunk); color: var(--ink-mute); }
.badge-mute .dot { background: var(--ink-faint); }

.tab {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-mute);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: oklch(0.88 0.04 258);
  color: oklch(0.36 0.15 258);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.vbar {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  flex-shrink: 0;
}
.vbar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  min-width: 2px;
}

.f-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.f-chip button {
  color: var(--ink-faint);
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.f-chip button:hover { color: var(--ink); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.scrim {
  position: fixed;
  inset: 0;
  background: oklch(0.18 0.012 260 / 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(.4,0,.2,1);
  z-index: 40;
}
.scrim.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 520px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 32px oklch(0.18 0.012 260 / 0.12);
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(.4,0,.2,1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.building-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.building-card.qualifying {
  background: linear-gradient(90deg, oklch(0.98 0.02 150) 0%, #ffffff 70%);
  border-color: oklch(0.88 0.05 150);
}
.building-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--ink-mute);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.building-card.qualifying .building-num {
  background: var(--green-wash);
  color: oklch(0.30 0.10 150);
}

.radio-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.radio-card[data-checked="true"] {
  border-color: var(--brand);
  background: var(--brand-wash);
}
.radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.12s ease;
  position: relative;
}
.radio-card[data-checked="true"] .radio-dot {
  border-color: var(--brand);
  border-width: 5px;
}

.accent-rail {
  width: 3px;
  border-radius: 999px;
  background: var(--brand-edge);
  flex-shrink: 0;
}

.num-input {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.12s ease;
}
.num-input:focus { border-color: var(--brand); }

.sel {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.sel:focus { border-color: var(--brand); }

.inp {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  width: 100%;
  outline: none;
  transition: border-color 0.12s ease;
}
.inp:focus { border-color: var(--brand); }

.cb {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  accent-color: var(--brand);
  cursor: pointer;
}

.dt {
  font-size: 11.5px;
  color: var(--ink-mute);
  font-weight: 500;
}
.dd {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.count-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.count-num.xxl { font-size: 48px; }

@keyframes nudge {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}
.count-nudge { animation: nudge 0.35s ease; }

.delta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
}
.delta-down { color: oklch(0.58 0.15 25); }
.delta-up   { color: var(--green); }

.sat-placeholder {
  background: oklch(0.42 0.01 200);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.parcel-placeholder {
  background: oklch(0.96 0.008 258);
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
