/* ─────────────────────────────────────────────────────────────────────────
   TCPA IQ — Apple 2026 Design System
   ───────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Neutrals */
  --ink:          #1C1C1E;
  --ink-2:        #3A3A3C;
  --ink-3:        #636366;
  --ink-4:        #8E8E93;
  --ink-5:        #C7C7CC;
  --fill-1:       #F2F2F7;
  --fill-2:       #FFFFFF;
  --stroke:       rgba(0,0,0,0.07);
  --stroke-med:   rgba(0,0,0,0.11);

  /* Semantic score colours */
  --c-reject:     #FF3B30;
  --c-reject-bg:  #FFF1F0;
  --c-reject-bd:  #FECACA;
  --c-warn:       #FF9500;
  --c-warn-bg:    #FFF8ED;
  --c-warn-bd:    #FED7AA;
  --c-review:     #FFCC00;
  --c-review-bg:  #FFFDE7;
  --c-review-bd:  #FEF08A;
  --c-proceed:    #34C759;
  --c-proceed-bg: #F0FDF4;
  --c-proceed-bd: #BBF7D0;
  --c-priority:   #007AFF;
  --c-priority-bg:#EFF6FF;
  --c-priority-bd:#BFDBFE;

  --blue:         #007AFF;
  --blue-dark:    #0062CC;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

/* ── Base ── */
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  background: var(--fill-1);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Layout ── */
.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 24px 60px;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke-light, #E5E7EB);
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-firm {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-sep {
  color: var(--ink-5);
  font-weight: 300;
  font-size: 1rem;
}
.brand-product {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}

/* ⌘K trigger — bigger, search-bar style */
.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 320px;
  padding: 9px 10px 9px 14px;
  background: #fff;
  border: 1px solid var(--stroke-med);
  border-radius: 10px;
  color: var(--ink-4);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: left;
}
.cmd-trigger:hover {
  border-color: var(--ink-5);
  background: var(--fill-1);
}
.cmd-trigger:focus-visible {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.cmd-trigger svg { color: var(--ink-4); flex-shrink: 0; }
.cmd-trigger-label {
  flex: 1;
  font-weight: 400;
  color: var(--ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-trigger-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  background: var(--fill-1);
  border: 1px solid var(--stroke-med);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--ink-3);
  flex-shrink: 0;
}

/* Hide legacy site-title/badge if anything references them */
.site-title, .site-badge { display: none; }

/* ── Hero ── */
.hero {
  margin-bottom: 36px;
}

.hero-headline {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--ink-3);
  line-height: 1.65;
  max-width: 560px;
}

/* ── Input Card ── */
.input-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 16px;
}

.input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.main-textarea {
  width: 100%;
  min-height: 270px;
  resize: vertical;
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-md);
  background: #EDF5FF;
  padding: 16px 18px;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.65;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.main-textarea::placeholder {
  color: var(--ink-4);
  font-size: 0.75rem;
  line-height: 1.7;
}

.main-textarea:focus {
  border-color: var(--blue);
  background: #E2EFFE;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.10);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  margin-bottom: 0;
  gap: 12px;
}

.input-hint {
  font-size: 0.8rem;
  color: var(--ink-4);
  line-height: 1.5;
}

.char-count {
  font-size: 0.75rem;
  color: var(--ink-5);
  white-space: nowrap;
  flex-shrink: 0;
}

.validation-msg {
  display: none;
  font-size: 0.8375rem;
  color: #B91C1C;
  background: var(--c-reject-bg);
  border: 1px solid var(--c-reject-bd);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  margin-bottom: 12px;
}

/* ── Run button ── */
.run-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 16px;
  background: #0D823D;
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(13,130,61,0.35);
}

.run-btn:hover:not(:disabled) {
  background: #0a6b32;
  box-shadow: 0 4px 14px rgba(13,130,61,0.42);
}

.run-btn:active:not(:disabled) { transform: scale(0.985); }

.run-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.run-btn-icon { line-height: 0; }
.run-btn-spinner { line-height: 0; }

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Loading ── */
.loading-section { margin-bottom: 16px; }

.loading-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 32px 24px;
  text-align: center;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: dot-bounce 1.3s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.30s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

.loading-step {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 4px;
  min-height: 1.4em;
  transition: opacity 0.3s;
}

.loading-sub {
  font-size: 0.8125rem;
  color: var(--ink-4);
}

/* ── Verdict Card ── */
.verdict-card {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.verdict-score-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px 22px;
  background: var(--fill-2);
}

.verdict-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  justify-content: center;
  background: var(--c-proceed);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.score-num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-den {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.75;
}

/* score colour classes */
.verdict-score.reject   { background: var(--c-reject);   box-shadow: 0 4px 16px rgba(255,59,48,0.30); }
.verdict-score.warn     { background: var(--c-warn);     box-shadow: 0 4px 16px rgba(255,149,0,0.30); }
.verdict-score.review   { background: #C09200;           box-shadow: 0 4px 16px rgba(192,146,0,0.28); }
.verdict-score.proceed  { background: var(--c-proceed);  box-shadow: 0 4px 16px rgba(52,199,89,0.30); }
.verdict-score.priority { background: var(--blue);       box-shadow: 0 4px 16px rgba(0,122,255,0.35); }

.verdict-tier {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.verdict-divider {
  height: 1px;
  background: var(--stroke);
  margin: 0 28px;
}

.verdict-rec {
  padding: 18px 28px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.55;
  background: var(--fill-2);
}

.verdict-flags {
  padding: 0 28px 20px;
  background: var(--fill-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flag-pill {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}

.flag-pill.flag-danger {
  background: var(--c-reject-bg);
  border: 1px solid var(--c-reject-bd);
  color: #991B1B;
}

.flag-pill.flag-warn {
  background: var(--c-warn-bg);
  border: 1px solid var(--c-warn-bd);
  color: #92400E;
}

.flag-pill.flag-ok {
  background: var(--c-proceed-bg);
  border: 1px solid var(--c-proceed-bd);
  color: #166534;
}

.flag-icon { flex-shrink: 0; margin-top: 1px; }

/* ── Threshold gate (red, blocking) ── */
.threshold-gate {
  display: flex;
  gap: 14px;
  background: #FEF2F2;
  border: 2px solid #FCA5A5;
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.threshold-gate-icon {
  font-size: 1.5rem;
  color: #DC2626;
  flex-shrink: 0;
  line-height: 1.1;
}
.threshold-gate-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #991B1B;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.threshold-gate-detail {
  font-size: 0.85rem;
  color: #7F1D1D;
  line-height: 1.55;
  margin-bottom: 6px;
}
.threshold-gate-remediation {
  font-size: 0.8rem;
  color: #991B1B;
  font-style: italic;
  line-height: 1.5;
}

/* ── SOL banner with countdown ── */
.sol-banner {
  background: var(--fill-2);
  border: 1px solid var(--stroke-med);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
}
.sol-banner.urgent { border-color: #FCA5A5; background: #FEF2F2; }
.sol-banner.warning { border-color: #FCD34D; background: #FFFBEB; }
.sol-banner-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sol-banner-label {
  width: 70px;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sol-banner strong {
  color: var(--ink);
  font-weight: 600;
}
.sol-days {
  color: var(--ink-3);
  font-size: 0.78rem;
  margin-left: auto;
}
.sol-banner.urgent .sol-days { color: #DC2626; font-weight: 600; }
.sol-banner.warning .sol-days { color: #B45309; font-weight: 600; }

/* ── Risk flags (Dilanyan, Andersen, etc.) ── */
.risk-flags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.risk-flag {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  background: var(--c-warn-bg);
  border: 1px solid var(--c-warn-bd);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  color: #92400E;
  line-height: 1.5;
}
.risk-flag.severity-high {
  background: var(--c-reject-bg);
  border-color: var(--c-reject-bd);
  color: #991B1B;
}
.risk-flag-icon { flex-shrink: 0; font-size: 1.05rem; line-height: 1.1; }
.risk-flag-title { font-weight: 700; }

/* ── Defendant Research Report card ── */
.research-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.research-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.research-card-sub {
  font-size: 0.72rem;
  color: var(--ink-4);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.research-card-body { padding: 6px 0; }

.research-section {
  padding: 14px 20px;
  border-bottom: 1px solid var(--stroke);
}
.research-section:last-child { border-bottom: none; }
.research-section-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.research-section-body {
  font-size: 0.86rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.research-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 100px;
  margin-right: 6px;
  vertical-align: middle;
}
.research-pill-ok      { background: #DCFCE7; color: #166534; }
.research-pill-warn    { background: #FEF3C7; color: #92400E; }
.research-pill-danger  { background: #FEE2E2; color: #991B1B; }
.research-pill-info    { background: #DBEAFE; color: #1E40AF; }
.research-case-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.research-case {
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.45;
  padding: 7px 10px;
  background: var(--fill-1);
  border-radius: var(--r-xs);
}
.research-case strong { color: var(--ink); }
.research-case-meta { color: var(--ink-4); font-size: 0.74rem; margin-top: 2px; }
.research-case a { color: var(--blue); text-decoration: none; }
.research-case a:hover { text-decoration: underline; }
.research-empty { color: var(--ink-4); font-size: 0.83rem; font-style: italic; }
.research-narrative {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--fill-1);
  border-left: 3px solid var(--ink-5);
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.5;
  font-style: italic;
}
.research-signal {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--c-priority-bg);
  border-radius: var(--r-xs);
  font-size: 0.78rem;
  color: #1E40AF;
  font-weight: 500;
  line-height: 1.5;
}

/* ── Damages table ── */
.damages-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.damages-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
}
.damages-table-wrap { overflow-x: auto; }
.damages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.damages-table th, .damages-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}
.damages-table th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
  background: var(--fill-1);
}
.damages-table td.num,
.damages-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.damages-table td.amount-strong {
  font-weight: 600;
  color: var(--ink);
}
.damages-totals {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.damages-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.damages-total-row strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.damages-total-row.damages-total-light {
  font-size: 0.8rem;
  color: var(--ink-3);
}
.damages-total-row.damages-total-light strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
}
.damages-fee-flag {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--c-proceed-bg);
  border: 1px solid var(--c-proceed-bd);
  border-radius: var(--r-xs);
  font-size: 0.8rem;
  color: #166534;
  display: none;
}
.damages-fee-flag.visible { display: block; }

/* ── Reasoning Card ── */
.reasoning-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reasoning-section { display: flex; flex-direction: column; gap: 10px; }

.reasoning-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.reasoning-header.reasoning-green { color: #15803D; }
.reasoning-header.reasoning-red   { color: #B91C1C; }

.reasoning-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reasoning-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.55;
  padding-left: 2px;
}

.reasoning-list li::before {
  content: '·';
  color: var(--ink-4);
  font-size: 1.2em;
  flex-shrink: 0;
  margin-top: -1px;
}

/* ── Summary Card ── */
.summary-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke);
}

.summary-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}

.summary-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--stroke-med);
  border-radius: var(--r-xs);
  background: transparent;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.icon-btn:hover {
  background: var(--fill-1);
  color: var(--ink);
}

.summary-body {
  padding: 20px;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  max-height: 520px;
  overflow-y: auto;
  background: #FAFAFA;
}

.copy-toast {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: var(--ink);
  color: white;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Structured case-details grid ── */
.case-details {
  margin-bottom: 16px;
  padding: 14px 14px 4px;
  background: #F8FBFF;
  border: 1px solid rgba(0,122,255,0.15);
  border-radius: var(--r-md);
}
.case-details-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.field-input {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--ink);
  background: #EDF5FF;
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-xs);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field-input-sm { font-size: 0.78rem; padding: 8px; }
.field-input:focus {
  border-color: var(--blue);
  background: #E2EFFE;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.10);
}
select.field-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238E8E93' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
/* Segmented yes/no/maybe control */
.seg-control {
  display: inline-flex;
  background: var(--fill-1);
  border: 1px solid var(--stroke-med);
  border-radius: var(--r-xs);
  padding: 2px;
  height: 36px;
}
.seg-btn {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 5px;
  padding: 0 12px;
  transition: background 0.12s, color 0.12s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--fill-2);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── Lead email field ── */
.email-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.email-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
}

.email-field {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-sm);
  background: #EDF5FF;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.email-field::placeholder { color: var(--ink-5); }

.email-field:focus {
  border-color: var(--blue);
  background: #E2EFFE;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.10);
}

/* ── File upload zone ── */
.upload-zone {
  margin-top: 2px;
  border: 1.5px dashed var(--stroke-med);
  border-radius: var(--r-md);
  background: #EDF5FF;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--blue);
  background: var(--c-priority-bg);
}

.upload-zone-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  flex-wrap: wrap;
  min-width: 0;
}

.upload-icon {
  color: var(--ink-4);
  flex-shrink: 0;
  transition: color 0.15s;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
  color: var(--blue);
}

.upload-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.upload-sub {
  font-size: 0.72rem;
  color: var(--ink-4);
  margin-left: auto;
  white-space: normal;
  flex: 1 1 100%;
  margin-top: -2px;
  padding-left: 30px; /* aligns under the label, past the icon */
}

/* In wider layouts (single column), allow inline display */
@media (min-width: 900px) {
  .upload-sub {
    flex: 0 1 auto;
    margin-left: auto;
    margin-top: 0;
    padding-left: 0;
    white-space: nowrap;
  }
}

/* File chips */
.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  background: var(--fill-2);
  border: 1px solid var(--stroke-med);
  border-radius: var(--r-pill, 100px);
  font-size: 0.8rem;
  color: var(--ink-2);
  font-weight: 500;
  max-width: 220px;
}

.file-chip-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-remove {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink-5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.65rem;
  line-height: 1;
  transition: background 0.12s;
  padding: 0;
  margin-left: 2px;
}

.file-chip-remove:hover { background: var(--c-reject); }

/* ── Continue case row ── */
.continue-row {
  margin-top: 8px;
  margin-bottom: 12px;
}

.continue-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.12s;
}
.continue-toggle:hover { opacity: 0.75; }

.continue-panel {
  margin-top: 10px;
  padding: 14px;
  background: var(--fill-1);
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke-med);
}

.continue-fields {
  display: flex;
  gap: 8px;
}

.case-key-field {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-xs);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--fill-2);
  outline: none;
  transition: border-color 0.15s;
  text-transform: uppercase;
}
.case-key-field:focus { border-color: var(--blue); }
.case-key-field::placeholder { font-weight: 400; letter-spacing: 0; color: var(--ink-4); }

.lookup-btn {
  padding: 9px 16px;
  background: var(--fill-2);
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-xs);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.lookup-btn:hover { background: var(--fill-1); border-color: var(--ink-5); }

.case-preview {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--fill-2);
  border-radius: var(--r-xs);
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.case-preview strong { color: var(--ink); }
.case-preview .preview-hint { color: var(--ink-4); margin-top: 2px; font-size: 0.775rem; }

/* ── Case banner ── */
.case-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--fill-2);
  border-radius: var(--r-md);
  border: 1px solid var(--stroke-med);
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.case-banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-banner strong {
  color: var(--ink);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.case-turns {
  color: var(--ink-4);
  font-size: 0.75rem;
}

.copy-case-key-btn {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.12s;
}
.copy-case-key-btn:hover { opacity: 0.7; }

/* ── Bottom actions ── */
.bottom-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 4px;
}

.add-info-btn,
.run-another-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: transparent;
  border: 1.5px solid var(--stroke-med);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.add-info-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  font-weight: 600;
}

.add-info-btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.run-another-btn:hover {
  background: var(--fill-2);
  color: var(--ink);
  border-color: var(--ink-5);
}

/* ── Error ── */
.error-card {
  background: var(--fill-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 40px 28px;
  text-align: center;
}

.error-icon-wrap { margin-bottom: 14px; line-height: 0; display: flex; justify-content: center; }
.error-title { font-size: 1.0625rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.error-msg { font-size: 0.9rem; color: var(--ink-3); margin-bottom: 22px; line-height: 1.55; }

.error-retry-btn {
  padding: 10px 24px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
}

.error-retry-btn:hover { background: var(--ink-2); }

/* ── Footer ── */
.site-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-5);
  margin-top: 48px;
  letter-spacing: 0.01em;
}

/* ── Print ── */
@media print {
  body { background: white; }
  .app { max-width: 100%; padding: 0; }
  .site-header, .hero, .input-section, .loading-section,
  .run-another-row, .error-section, .site-footer,
  .summary-card-header, .summary-actions, .icon-btn { display: none !important; }
  .verdict-card, .reasoning-card, .summary-card {
    box-shadow: none;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 16px;
  }
  .summary-body {
    max-height: none;
    background: white;
    font-size: 0.8rem;
  }
}

/* ── Mobile ── */
@media (max-width: 540px) {
  .app { padding: 36px 14px 60px; }
  .hero-headline { font-size: 1.75rem; }
  .verdict-score { width: 78px; height: 78px; }
  .score-num { font-size: 2rem; }
  .verdict-tier { font-size: 1.25rem; }
  .verdict-score-wrap { padding: 20px 20px 16px; gap: 16px; }
  .verdict-divider { margin: 0 20px; }
  .verdict-rec { padding: 14px 20px; }
  .verdict-flags { padding: 0 20px 16px; }
  .input-card { padding: 18px; }
  .summary-body { font-size: 0.8rem; }
  .br-desktop { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════════
   ASK TCPA IQ — Intake Q&A panel
   ═══════════════════════════════════════════════════════════════════════════ */
.ask-section {
  width: 100%;
  margin: 0 0 18px;
}
.ask-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}
.ask-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
  color: #111827;
}
.ask-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ask-icon { color: #0D823D; flex-shrink: 0; }
.ask-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111827;
}
.ask-subtitle {
  font-size: 0.78rem;
  color: #6B7280;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ask-body { padding: 14px 18px 18px; border-top: 1px solid #F3F4F6; }

/* ── Investigate a Defendant header ── */
.investigate-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid #E5E7EB;
  color: #111827;
}
.investigate-header svg { color: #0D823D; flex-shrink: 0; }
.investigate-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111827;
}
.investigate-subtitle {
  font-size: 0.78rem;
  color: #6B7280;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Case attachment */
.ask-case-attach { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask-case-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: #4B5563; cursor: pointer;
}
.ask-case-label input[type="checkbox"] { cursor: pointer; }
.ask-case-input {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  width: 130px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ask-case-input:focus { outline: none; border-color: #0EA5E9; }

/* Question input row */
.ask-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ask-textarea {
  flex: 1;
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.86rem;
  color: #111827;
  resize: vertical;
  min-height: 44px;
  max-height: 200px;
  line-height: 1.4;
  font-family: inherit;
}
.ask-textarea:focus {
  outline: none;
  border-color: #0EA5E9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.ask-textarea::placeholder { color: #9CA3AF; }

.ask-send-btn {
  background: #0D823D;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  font-family: inherit;
}
.ask-send-btn:hover:not(:disabled) { background: #0A6B31; transform: translateY(-1px); }
.ask-send-btn:disabled { background: #9CA3AF; cursor: not-allowed; transform: none; }
.ask-send-spinner svg { animation: askspin 0.8s linear infinite; }
@keyframes askspin { to { transform: rotate(360deg); } }

/* Thread */
.ask-thread {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ask-turn {
  background: #FAFBFC;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  animation: askFadeIn 0.25s ease-out;
}
@keyframes askFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ask-turn-question {
  font-size: 0.78rem;
  color: #6B7280;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #E5E7EB;
}
.ask-turn-question::before {
  content: "Q: ";
  font-weight: 600;
  color: #374151;
}

.ask-verdict-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ask-verdict-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ask-verdict-pill.verdict-sign_up      { background: #DCFCE7; color: #166534; }
.ask-verdict-pill.verdict-manual_review { background: #FEF3C7; color: #92400E; }
.ask-verdict-pill.verdict-reject        { background: #FEE2E2; color: #991B1B; }
.ask-verdict-pill.verdict-off_topic     { background: #F3F4F6; color: #4B5563; }

.ask-short-answer {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #111827;
  margin-bottom: 8px;
}
.ask-turn-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ask-expand-btn,
.ask-escalate-btn {
  background: transparent;
  border: 1px solid #E5E7EB;
  color: #4B5563;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.ask-expand-btn:hover { background: #F9FAFB; border-color: #D1D5DB; }
.ask-escalate-btn {
  background: #FFFBEB;
  border-color: #FCD34D;
  color: #92400E;
  font-weight: 600;
}
.ask-escalate-btn:hover:not(:disabled) { background: #FEF3C7; border-color: #F59E0B; }
.ask-escalate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ask-escalate-btn.escalated {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: #166534;
  cursor: default;
}

.ask-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #E5E7EB;
  display: none;
}
.ask-details.open { display: block; }
.ask-reasoning {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #374151;
  margin-bottom: 8px;
}
.ask-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.ask-citation {
  background: #EFF6FF;
  color: #1E40AF;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ask-followup-hint {
  background: #F0F9FF;
  border-left: 3px solid #0EA5E9;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #075985;
  border-radius: 4px;
  margin-top: 6px;
}
.ask-followup-hint::before {
  content: "💡 ";
}

@media (max-width: 480px) {
  .ask-subtitle { display: none; }
  .ask-chips { gap: 4px; }
  .ask-chip { font-size: 0.7rem; padding: 3px 8px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   DESIGN REFRESH — 2026
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Two-column Investigate layout ─────────────────────────────────────────── */
.invest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: start;
}
.invest-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
}
.invest-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 780px) {
  .invest-grid { grid-template-columns: 1fr; gap: 16px; }
  .invest-left { position: static; }
}

/* ── Refined input treatment (keeps blue identity, adds polish) ──────────── */
.field-input,
.email-field,
.main-textarea,
.case-key-field {
  background: #F3F8FF !important;
  border: 1px solid #C7DDF5 !important;
  border-radius: 8px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field-input:hover:not(:focus),
.email-field:hover:not(:focus),
.main-textarea:hover:not(:focus) {
  border-color: #93C5FD !important;
}
.field-input:focus,
.email-field:focus,
.main-textarea:focus,
.case-key-field:focus {
  background: #FFFFFF !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
}
/* Filled state (has value): tonally darker bg, no border accent */
.field-input:not(:placeholder-shown):not(:focus),
.email-field:not(:placeholder-shown):not(:focus),
.case-key-field:not(:placeholder-shown):not(:focus) {
  background: #E8F1FE !important;
  border-color: #BBD6F2 !important;
}
.field-input:not([value=""]):not(:focus) {
  /* selects don't trigger placeholder-shown */
}
/* Date/select filled feel */
select.field-input { color: #1F2937; }
select.field-input:invalid { color: #9CA3AF; }

/* Tighter labels */
.field-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

/* Refined input-card */
.input-card {
  background: #FFFFFF;
  border: 1px solid var(--stroke-light, #E5E7EB);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  padding: 22px;
}

/* Tighter case-details */
.case-details {
  background: #FAFBFC;
  border: 1px solid #E8EEF5;
  border-radius: 10px;
  padding: 12px 12px 14px;
}
.case-details-header {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Refined run button */
.run-btn {
  background: #0D823D;
  background-image: linear-gradient(180deg, #0F9647 0%, #0D823D 100%);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(13,130,61,0.2), 0 4px 12px rgba(13,130,61,0.15);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.run-btn:hover:not(:disabled) {
  background-image: linear-gradient(180deg, #11A24F 0%, #0E8E42 100%);
  box-shadow: 0 1px 2px rgba(13,130,61,0.25), 0 6px 16px rgba(13,130,61,0.22);
  transform: translateY(-1px);
}

/* Refined upload zone */
.upload-zone {
  background: #F3F8FF;
  border: 1.5px dashed #BBD6F2;
  border-radius: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.upload-zone:hover, .upload-zone.drag-over {
  background: #E8F1FE;
  border-color: #3B82F6;
}

/* ── Refined footer ──────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke-light, #E5E7EB);
  text-align: center;
}
.footer-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--ink-5);
}
.footer-firm { color: var(--ink-3); font-weight: 500; }
.footer-firm strong { font-weight: 700; color: var(--ink-2); }
.footer-meta { color: var(--ink-5); }

/* ── Command Palette (⌘K) ────────────────────────────────────────────────── */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: cmdkFadeIn 0.15s ease-out;
}
@keyframes cmdkFadeIn { from { opacity: 0; } to { opacity: 1; } }

.cmdk-modal {
  width: 92%;
  max-width: 580px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  animation: cmdkSlideIn 0.18s ease-out;
}
@keyframes cmdkSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cmdk-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #E5E7EB;
}
.cmdk-search-icon { color: var(--ink-4); flex-shrink: 0; }
.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.cmdk-input::placeholder { color: var(--ink-5); }
.cmdk-esc {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  background: var(--fill-1);
  border: 1px solid var(--stroke-med);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--ink-4);
}

.cmdk-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
}
.cmdk-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-5);
  padding: 10px 12px 4px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--ink-2);
  transition: background 0.08s;
}
.cmdk-item:hover, .cmdk-item.active {
  background: #EFF6FF;
  color: #1E40AF;
}
.cmdk-item-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fill-1);
  border-radius: 6px;
  color: var(--ink-4);
  flex-shrink: 0;
}
.cmdk-item.active .cmdk-item-icon { background: #DBEAFE; color: #1E40AF; }
.cmdk-item-main { flex: 1; min-width: 0; }
.cmdk-item-title { font-weight: 500; }
.cmdk-item-sub {
  font-size: 0.72rem;
  color: var(--ink-5);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmdk-item-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  color: var(--ink-4);
  background: var(--fill-1);
  border: 1px solid var(--stroke-med);
  border-radius: 4px;
  padding: 1px 5px;
}
.cmdk-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--ink-5);
  font-size: 0.85rem;
}

.cmdk-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border-top: 1px solid #E5E7EB;
  font-size: 0.72rem;
  color: var(--ink-5);
  background: var(--fill-1);
}
.cmdk-footer kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #fff;
  border: 1px solid var(--stroke-med);
  border-radius: 3px;
  padding: 0 5px;
  font-size: 0.68rem;
  margin-right: 3px;
}

/* Mobile tweaks for header */
@media (max-width: 480px) {
  .cmd-trigger-label { display: none; }
  .header-brand { gap: 6px; }
  .brand-firm, .brand-product { font-size: 0.88rem; }
  .trust-strip { font-size: 0.68rem; gap: 6px; }
}

/* ── Gray placeholder for selects + date inputs when empty ───────────────── */
select.field-input:invalid,
select.field-input option[value=""] {
  color: var(--ink-4);
}
select.field-input:valid {
  color: var(--ink);
}
/* Empty date input: gray its inner edit segments */
input[type="date"]:invalid::-webkit-datetime-edit-text,
input[type="date"]:invalid::-webkit-datetime-edit-month-field,
input[type="date"]:invalid::-webkit-datetime-edit-day-field,
input[type="date"]:invalid::-webkit-datetime-edit-year-field {
  color: var(--ink-4);
}
input[type="date"]:valid::-webkit-datetime-edit-text,
input[type="date"]:valid::-webkit-datetime-edit-month-field,
input[type="date"]:valid::-webkit-datetime-edit-day-field,
input[type="date"]:valid::-webkit-datetime-edit-year-field {
  color: var(--ink);
}

/* Mobile header tweaks for the bigger search bar */
@media (max-width: 720px) {
  .cmd-trigger { min-width: 0; }
  .cmd-trigger-label { display: none; }
}
@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; }
}
