
:root {
  --bg: #060918; --bg2: #0c1225; --bg3: #111d35;
  --border: #1a2840; --border2: #243552;
  --text: #eef1f8; --text2: #7d90b0; --text3: #3d5070;
  --blue: #4080e0; --blue-dim: rgba(64,128,224,.1); --blue-border: rgba(64,128,224,.25);
  --green: #22c55e; --green-dim: rgba(34,197,94,.1);
  --amber: #f59e0b; --amber-dim: rgba(245,158,11,.1);
  --red: #ef4444; --red-dim: rgba(239,68,68,.1);
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

html, body {
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
}

button { cursor: pointer; font-family: inherit; }
input, select { font-family: var(--sans); }
select { appearance: none; }

/* ─── HEADER ─────────────────────────────────────────── */
#header {
  height: 52px;
  min-height: 52px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.hd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hd-brand a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 24px;
  height: 24px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13px;
  color: var(--text2);
}

.hd-div {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

.hd-module {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 16px;
  flex-shrink: 0;
}

.hd-module-title {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  line-height: 1.2;
}

.hd-module-sub {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--mono);
  line-height: 1.2;
}

.hd-tabs {
  display: flex;
  align-items: stretch;
  height: 52px;
  gap: 0;
  margin-left: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }

.hd-spacer { flex: 1; }

.hd-live {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  flex-shrink: 0;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ─── TAB PANELS ────────────────────────────────────── */
.tab-panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.tab-panel.active { display: flex; }

/* ─── STATS BAR ─────────────────────────────────────── */
.stats-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 20px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.stat-val {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.stat-val.amber { color: var(--amber); }
.stat-val.green { color: var(--green); }

.stat-lbl {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.stat-dot {
  width: 3px;
  height: 3px;
  background: var(--border2);
  border-radius: 50%;
  margin: 0 14px;
}

/* ─── CONTROLS BAR ──────────────────────────────────── */
.controls-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 20px;
  flex-shrink: 0;
}

.ctrl-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 5px 10px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 160px;
}

.ctrl-input:focus { border-color: var(--blue); }
.ctrl-input::placeholder { color: var(--text3); }

.ctrl-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  padding: 5px 28px 5px 10px;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%233d5070'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.15s;
}

.ctrl-select:focus { border-color: var(--blue); outline: none; }

.ctrl-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
}

/* ─── BODY SPLIT (OBJECTIONS) ───────────────────────── */
.body-split {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.list-panel {
  width: 400px;
  min-width: 400px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--bg);
}

.list-panel::-webkit-scrollbar { width: 4px; }
.list-panel::-webkit-scrollbar-track { background: transparent; }
.list-panel::-webkit-scrollbar-thumb { background: var(--border2); }

.obj-card {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  border-left: 2px solid transparent;
}

.obj-card:hover { background: var(--bg3); }
.obj-card.active { background: var(--blue-dim); border-left-color: var(--blue); }

.obj-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.obj-job {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

.obj-name {
  font-size: 12px;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}

.obj-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.obj-examiner {
  font-size: 11px;
  color: var(--text3);
}

.obj-wtype {
  font-size: 10px;
  color: var(--text3);
  font-family: var(--mono);
}

.badge-disc {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid;
  flex-shrink: 0;
}

.badge-ai {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,.25);
  padding: 1px 6px;
  margin-left: auto;
}

/* STATUS BADGES */
.badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.badge-open { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(245,158,11,.25); }
.badge-resolved { color: var(--green); background: var(--green-dim); border: 1px solid rgba(34,197,94,.25); }
.badge-addressed { color: var(--blue); background: var(--blue-dim); border: 1px solid var(--blue-border); }
.badge-default { color: var(--text3); background: var(--bg3); border: 1px solid var(--border); }

/* ─── DETAIL PANEL ──────────────────────────────────── */
.detail-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  background: var(--bg);
}

.detail-panel::-webkit-scrollbar { width: 4px; }
.detail-panel::-webkit-scrollbar-track { background: transparent; }
.detail-panel::-webkit-scrollbar-thumb { background: var(--border2); }

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--text3);
}

.detail-empty-icon {
  font-size: 32px;
  opacity: 0.4;
}

.detail-empty-text {
  font-family: var(--mono);
  font-size: 12px;
}

.detail-job-ref {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  margin-bottom: 6px;
}

.detail-h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 12px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 8px;
}

.detail-pre {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sans);
}

.rec-block {
  border: 1px solid rgba(34,197,94,.3);
  background: rgba(34,197,94,.05);
  padding: 14px 16px;
}

.rec-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rec-block-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

.rec-model-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.rec-pending {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  font-style: italic;
}

.rec-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}

.rec-basis {
  font-size: 11px;
  color: var(--text2);
  font-style: italic;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.meta-item-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.meta-item-val {
  font-size: 12px;
  color: var(--text2);
}

/* ─── TAB 2: PRE-CHECK ──────────────────────────────── */
.precheck-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  background: var(--bg);
}

.precheck-body::-webkit-scrollbar { width: 4px; }
.precheck-body::-webkit-scrollbar-track { background: transparent; }
.precheck-body::-webkit-scrollbar-thumb { background: var(--border2); }

.precheck-inner {
  max-width: 720px;
  margin: 0 auto;
}

.precheck-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.precheck-h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 26px;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
}

.precheck-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 24px;
}

.upload-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

.drop-zone {
  border: 1.5px dashed var(--border2);
  background: var(--bg);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  margin-bottom: 16px;
}

.drop-zone:hover { border-color: var(--blue); }
.drop-zone.has-file { border-color: var(--blue); background: var(--blue-dim); }
.drop-zone.drag-over { border-color: var(--blue); background: var(--blue-dim); }

#pdf-input {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  font-size: 24px;
  color: var(--text3);
}

.drop-label {
  font-size: 13px;
  color: var(--text2);
}

.drop-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
}

.drop-filename {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  display: none;
}

.drop-zone.has-file .drop-filename { display: block; }
.drop-zone.has-file .drop-label { display: none; }
.drop-zone.has-file .drop-icon { display: none; }

.hint-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.hint-row .ctrl-input,
.hint-row .ctrl-select {
  width: 100%;
}

.analyze-btn {
  width: 100%;
  padding: 11px;
  background: var(--blue);
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.15s;
}

.analyze-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.analyze-btn:not(:disabled):hover { opacity: 0.85; }

/* STATUS AREA */
.status-area {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  display: none;
}

.status-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  margin-bottom: 10px;
}

.progress-bar-wrap {
  height: 2px;
  background: var(--border);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--blue);
  width: 0%;
  transition: width 0.4s ease;
}

/* ERROR */
.error-area {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,.3);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red);
  display: none;
}

/* RESULTS */
.results-area { display: none; }

.results-meta-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.examiner-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 14px;
}

.examiner-card-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 6px;
}

.examiner-card-name {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 4px;
}

.examiner-card-boro {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 12px;
}

.examiner-prob-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.examiner-prob {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--blue);
}

.confidence-badge {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
}

.conf-high { color: var(--green); background: var(--green-dim); border: 1px solid rgba(34,197,94,.3); }
.conf-medium { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(245,158,11,.3); }
.conf-low { color: var(--text3); background: var(--bg3); border: 1px solid var(--border); }

.examiner-sample {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
}

.other-candidates {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.other-candidates-toggle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.other-candidates-toggle:hover { color: var(--text2); }

.other-candidates-list {
  margin-top: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.other-candidates-list.open { display: flex; }

.cand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cand-name {
  font-size: 12px;
  color: var(--text2);
  width: 180px;
  flex-shrink: 0;
}

.cand-prob-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--border);
}

.cand-prob-bar-fill {
  height: 100%;
  background: var(--blue);
  opacity: 0.5;
}

.cand-prob-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  width: 36px;
  text-align: right;
}

/* RISK BAR */
.risk-bar {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.risk-total {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

.risk-total strong {
  font-size: 20px;
  margin-right: 4px;
}

.risk-sev-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
}

.sev-dot-high { color: var(--red); }
.sev-dot-medium { color: var(--amber); }
.sev-dot-low { color: var(--blue); }

/* FLAGS */
.flags-section { margin-bottom: 24px; }

.flags-section-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 10px;
}

.flag-card {
  border: 1px solid var(--border);
  border-left-width: 3px;
  background: var(--bg2);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.flag-card.sev-high { border-left-color: var(--red); }
.flag-card.sev-medium { border-left-color: var(--amber); }
.flag-card.sev-low { border-left-color: var(--blue); }

.flag-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.flag-sev-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 7px;
}

.flag-sev-high { color: var(--red); background: var(--red-dim); border: 1px solid rgba(239,68,68,.3); }
.flag-sev-medium { color: var(--amber); background: var(--amber-dim); border: 1px solid rgba(245,158,11,.3); }
.flag-sev-low { color: var(--blue); background: var(--blue-dim); border: 1px solid var(--blue-border); }

.flag-pattern-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.flag-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.flag-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 6px;
}

.flag-code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 4px;
}

.flag-fix {
  font-size: 12px;
  color: var(--green);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ─── TAB 3: EXAMINERS ──────────────────────────────── */
.examiner-controls {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  flex-shrink: 0;
}

.examiner-grid-wrap {
  flex: 1;
  overflow-y: auto;
  background: var(--border);
}

.examiner-grid-wrap::-webkit-scrollbar { width: 4px; }
.examiner-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.examiner-grid-wrap::-webkit-scrollbar-thumb { background: var(--border2); }

.examiner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
}

.exam-card {
  background: var(--bg2);
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.1s;
}

.exam-card:hover { background: var(--bg3); }

.exam-card-name {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
}

.exam-stat-row {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.exam-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.exam-stat-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.exam-stat-val.amber { color: var(--amber); }
.exam-stat-val.green { color: var(--green); }

.exam-stat-lbl {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
}

.exam-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.exam-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.exam-patterns {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exam-pattern-item {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}

.exam-pattern-item strong {
  color: var(--text2);
  font-family: var(--mono);
}

/* ─── LOADING ────────────────────────────────────────── */
.loading-msg {
  padding: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

/* ─── TAB 4: APPROVAL TIME ───────────────────────────── */
.at-wrap { flex: 1; overflow-y: auto; }
.at-wrap::-webkit-scrollbar { width: 3px; }
.at-inner { max-width: 800px; margin: 0 auto; padding: 32px; }
.at-header { margin-bottom: 28px; }
.at-eyebrow { font-family: var(--mono); font-size: 10px; color: var(--blue); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.at-title { font-family: var(--cond); font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.at-sub { font-size: 12px; color: var(--text2); line-height: 1.6; }

.at-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 28px; }
@media (max-width: 600px) { .at-form-row { grid-template-columns: 1fr; } }
.at-field-label { font-family: var(--mono); font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.at-optional { font-weight: 400; text-transform: none; letter-spacing: 0; }
.at-select { width: 100%; background: var(--bg2); border: 1px solid var(--border); color: var(--text); font-family: var(--sans); font-size: 13px; padding: 8px 12px; outline: none; }
.at-select:focus { border-color: var(--blue-border); }

.at-section { background: var(--bg2); border: 1px solid var(--border); padding: 20px; margin-bottom: 14px; }
.at-section-label { font-family: var(--mono); font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.at-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.at-section-sub { font-size: 11px; color: var(--text3); margin-bottom: 14px; font-family: var(--mono); }

.at-bar-wrap { position: relative; padding-top: 26px; margin-bottom: 8px; }
.at-bar { height: 8px; background: var(--border); position: relative; }
.at-bar-zone { position: absolute; height: 100%; top: 0; }
.at-zone-fast  { background: #22c55e; opacity: .65; }
.at-zone-ok    { background: #84cc16; opacity: .55; }
.at-zone-slow  { background: #f59e0b; opacity: .65; }
.at-zone-vslow { background: #ef4444; opacity: .65; }
.at-marker { position: absolute; bottom: 0; transform: translateX(-50%); }
.at-marker-tick { width: 1px; height: 16px; background: var(--border2); margin: 0 auto; }
.at-marker-label { font-family: var(--mono); font-size: 10px; color: var(--text2); white-space: nowrap; text-align: center; position: absolute; left: 50%; transform: translateX(-50%); top: -20px; }
.at-marker-label.at-lbl-median { color: var(--text); font-weight: 600; }
.at-estimate-pin { position: absolute; bottom: -2px; transform: translateX(-50%); z-index: 2; }
.at-estimate-pin-arrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 11px solid var(--blue); }
.at-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 4px; }
.at-legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.at-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text3); font-family: var(--mono); }
.at-legend-swatch { width: 10px; height: 10px; }

.at-estimate-box { border: 1px solid var(--blue-border); background: var(--blue-dim); padding: 16px 18px; margin-bottom: 14px; }
.at-estimate-range { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.at-estimate-range .at-range-unit { font-size: 13px; color: var(--text3); font-weight: 400; }
.at-estimate-note { font-size: 12px; color: var(--text2); line-height: 1.7; }
.at-driver { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 12px; color: var(--text2); border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.at-driver-icon { color: var(--text3); flex-shrink: 0; }

.at-exam-table { width: 100%; }
.at-exam-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.at-exam-row:last-child { border-bottom: none; }
.at-exam-row.at-you { background: var(--blue-dim); margin: 0 -20px; padding: 8px 20px; }
.at-exam-row-name { flex: 1; font-size: 13px; color: var(--text); }
.at-exam-row-ojpj { width: 70px; text-align: right; font-family: var(--mono); font-size: 12px; }
.at-exam-row-ojpj.fast { color: var(--green); }
.at-exam-row-ojpj.slow { color: var(--red); }
.at-exam-row-ojpj.avg  { color: var(--text2); }
.at-exam-row-bar { width: 100px; height: 3px; background: var(--border); flex-shrink: 0; }
.at-exam-row-bar-fill { height: 3px; background: var(--blue); opacity: .6; }
.at-exam-row-openrate { width: 55px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--text3); }

.at-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; gap: 12px; color: var(--text3); }
.at-empty-icon { font-size: 32px; opacity: .25; }
.at-empty-text { font-size: 13px; }
.at-empty-sub { font-size: 11px; font-family: var(--mono); color: var(--text3); max-width: 360px; text-align: center; line-height: 1.6; }
.at-controls { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--bg2); flex-wrap: wrap; }
.at-results { padding: 20px; overflow-y: auto; flex: 1; }
.at-percentile-row { display: flex; align-items: flex-end; gap: 8px; margin: 16px 0 12px; }
.at-pct-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.at-pct-col.fast .at-pct-bar { background: var(--green); }
.at-pct-col.mid .at-pct-bar { background: var(--blue); }
.at-pct-col.slow .at-pct-bar { background: var(--amber); }
.at-pct-col.very-slow .at-pct-bar { background: var(--red); }
.at-pct-bar-wrap { display: flex; align-items: flex-end; height: 90px; }
.at-pct-bar { width: 28px; opacity: .75; }
.at-pct-val { font-family: var(--mono); font-size: 11px; color: var(--text); }
.at-pct-label { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.at-interp { font-size: 12px; color: var(--text2); line-height: 1.65; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.at-adj-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-left: 3px solid var(--border2); }
.at-adj-row.adj-fast { border-left-color: var(--green); }
.at-adj-row.adj-mid { border-left-color: var(--blue); }
.at-adj-row.adj-slow { border-left-color: var(--amber); }
.at-adj-row.adj-very-slow { border-left-color: var(--red); }
.at-adj-icon { font-size: 20px; line-height: 1; }
.at-adj-row.adj-fast .at-adj-icon { color: var(--green); }
.at-adj-row.adj-mid .at-adj-icon { color: var(--blue); }
.at-adj-row.adj-slow .at-adj-icon { color: var(--amber); }
.at-adj-row.adj-very-slow .at-adj-icon { color: var(--red); }
.at-adj-label { font-size: 13px; color: var(--text); margin-bottom: 4px; }
.at-adj-stats { font-family: var(--mono); font-size: 11px; color: var(--text3); }
.at-estimate-section { background: rgba(64,128,224,.07); border-color: rgba(64,128,224,.3); }
.at-estimate-sub { font-family: var(--mono); font-size: 11px; color: var(--text3); margin-bottom: 10px; }
.at-exam-table-wrap table { width: 100%; border-collapse: collapse; }
.at-exam-table-wrap th { font-family: var(--mono); font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; text-align: left; padding: 0 10px 8px 0; border-bottom: 1px solid var(--border); }
.at-exam-table-wrap td { font-family: var(--mono); font-size: 12px; color: var(--text2); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.at-exam-table-wrap td:first-child { color: var(--text); font-family: var(--sans); }
.at-exam-table-wrap td.green { color: var(--green); }
.at-exam-table-wrap td.amber { color: var(--amber); }
.at-exam-table-wrap td.red { color: var(--red); }
@media (max-width: 768px) {
  #mobile-banner { display: flex !important; }
}
#mobile-banner {
  display: none;
  align-items: center; gap: 10px;
  padding: 10px 16px;
  background: #0c1225;
  border-bottom: 1px solid #1a2840;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #7d90b0;
  position: sticky; top: 0; z-index: 9999; flex-shrink: 0;
}
#mobile-banner strong { color: #eef1f8; }
#mobile-banner a { color: #4080e0; text-decoration: none; }
#mobile-banner-close {
  margin-left: auto; background: none; border: none;
  color: #3d5070; font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1;
}


