/* Dark, restrained workspace. The records are the content, the chrome is not.
   System fonts only: this page loads nothing from the network. */
:root {
  --bg: #14161a;
  --panel: #1a1d23;
  --panel-2: #20242b;
  --line: #2c313a;
  --line-soft: #242830;
  --text: #e7e9ee;
  --muted: #98a1af;
  --dim: #6f7885;
  --accent: #8ab6d6;
  --observed: #8fbf8a;
  --inferred: #d8a951;
  --bad: #db8b8b;
  --focus: #b9d7ee;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
       font-size: 15px; line-height: 1.45; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }
h1 { font-size: 1.2rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0; white-space: nowrap; }
h3 { font-size: 0.95rem; margin: 0 0 0.55rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line-soft); }
.thin { font-family: var(--sans); font-weight: 400; color: var(--muted); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.85em; }

.topbar { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between;
          padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.strap { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.82rem; }
.topbar-controls { display: flex; gap: 0.9rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.72rem; color: var(--muted);
         text-transform: uppercase; letter-spacing: 0.05em; }
select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
         border-radius: 3px; padding: 0.3rem 0.5rem; font: inherit; font-size: 0.85rem;
         text-transform: none; letter-spacing: 0; }
.chip { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--observed);
        border: 1px solid #2f4a2d; background: #172117; padding: 0.2rem 0.5rem; border-radius: 3px; }

/* ---- funnel ---- */
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0.7rem 1.25rem;
          border-bottom: 1px solid var(--line); background: var(--panel-2); }
.step { position: relative; display: block; text-align: left; font: inherit; color: inherit;
        background: transparent; border: 1px solid transparent; border-radius: 4px;
        padding: 0.45rem 0.8rem 0.45rem 0.9rem; cursor: pointer; margin-right: 1.4rem; }
.step:not(:last-child)::after { content: "\2192"; position: absolute; right: -1.15rem; top: 0.9rem;
        color: var(--dim); font-size: 1.1rem; }
.step .n { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; line-height: 1.1;
           font-variant-numeric: tabular-nums; }
.step .l { font-size: 0.82rem; font-weight: 600; }
.step .s { font-size: 0.72rem; color: var(--muted); }
.step:hover { border-color: var(--line); }
.step.on { border-color: #3d5a72; background: #1d2733; }
.step.on .n { color: var(--accent); }

main { padding: 0.9rem 1.25rem 2rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1rem; }
.panel-head { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 0.6rem; }
.panel-head .thin { font-size: 0.82rem; }
.tabs { display: flex; gap: 0.4rem; margin-left: auto; }
.tab { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
       padding: 0.1rem 0.6rem; white-space: nowrap; }
.tab.on { color: var(--text); border-color: #3d5a72; background: #1d2733; }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.72rem; text-transform: uppercase;
     letter-spacing: 0.05em; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.sorted { color: var(--accent); }
td { padding: 0.32rem 0.5rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover, tbody tr.hot { background: #1f2630; }
.owner { font-weight: 600; }
.bar { display: inline-block; height: 7px; border-radius: 2px; background: var(--accent);
       opacity: 0.75; vertical-align: middle; margin-left: 0.5rem; }
.badge { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.08rem 0.4rem;
         border-radius: 3px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.lead { color: var(--accent); border-color: #3d5a72; background: #1a2430; }
.badge.trust { color: var(--inferred); border-color: #4a3d22; background: #251f13; }
.badge.ok { color: var(--observed); border-color: #2f4a2d; background: #172117; }

/* ---- profile ---- */
.crumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; }
.crumb a { cursor: pointer; }
.profile-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.profile-head h2 { font-size: 1.35rem; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-bottom: 0.9rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.55rem 0.8rem; }
.tile .n { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 0.75rem; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0.9rem; align-items: start; }
.towns { display: grid; grid-template-columns: 8.5rem 1fr 3rem; gap: 0.25rem 0.6rem; font-size: 0.85rem;
         margin-bottom: 0.9rem; align-items: center; }
.towns .bar { margin-left: 0; height: 9px; }
dl.record { display: grid; grid-template-columns: 9rem 1fr; gap: 0.2rem 0.8rem; margin: 0 0 0.4rem; font-size: 0.86rem; }
dl.record dt { color: var(--muted); }
dl.record dd { margin: 0; }
.src { font-size: 0.76rem; color: var(--muted); }
.src a { font-family: var(--mono); font-size: 0.95em; }
.person { border: 1px solid var(--line); border-left: 3px solid var(--observed); border-radius: 4px;
          padding: 0.5rem 0.75rem; margin-top: 0.6rem; background: var(--panel-2); }
.person .who { font-weight: 600; font-size: 0.98rem; }
.person .role { color: var(--observed); font-size: 0.82rem; margin-left: 0.4rem; }
.person .also { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }

/* site export */
.back-link { display: inline-block; margin-bottom: 6px; font-size: 0.85rem; color: inherit; opacity: 0.8; }
.back-link:hover { opacity: 1; }
@media (max-width: 760px) {
  .topbar, .panel-head, .profile-head, .tabs { flex-wrap: wrap; }
  .tabs { margin-left: 0; }
  h2 { white-space: normal; }
  .funnel, .tiles { grid-template-columns: repeat(2, 1fr); row-gap: 0.5rem; }
  .step:not(:last-child)::after { display: none; }
  .cols { grid-template-columns: 1fr; }
  .panel { overflow-x: auto; }
  .towns { grid-template-columns: 6.5rem 1fr 2.5rem; }
}
