/* Cardona CT Lab :: Proof Header
 * A reusable "proof header" that sits above a live tool and reframes the page
 * as a case study: title + kind pill, three labeled blocks (friction removed /
 * what shipped / role signal), and a right-hand metrics rail.
 *
 * Re-themed for the dark terminal / lab aesthetic. All color comes from the
 * shared ctlab-theme tokens (--c-*), so Day / Night / HC all resolve correctly.
 * Accent edge squared per the portfolio accent-edge rule (left accent -> 0 r r 0).
 */

.proof-header {
  /* Self-supply the ctlab --c-* + type tokens so the two standalone tool pages
     (ai-tester, pattern-auditor) that link this file resolve Day/Night/HC without
     each duplicating the token block. Only page-specific width/margin stays inline. */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 4px;
  --c-surface: #FFFFFF; --c-surface2: #F0F0F8; --c-border: #DDDDE8;
  --c-indigo: #533AFD; --c-indigodim: #EEEEFF;
  --c-text: #1A1A2E; --c-body: #3A3A52; --c-muted: #4E4E72;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: stretch;
  padding: 16px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 2px solid var(--c-indigo);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 14px 20px 12px;
}
html[data-theme="night"] .proof-header {
  --c-surface: #15151F; --c-surface2: #1E1E2C; --c-border: #2C2C40;
  --c-indigo: #8E82FF; --c-indigodim: #23203A;
  --c-text: #EDEDF5; --c-body: #BDBDD2; --c-muted: #ABABC4;
}
html[data-theme="hc"] .proof-header {
  --c-surface: #FFFFFF; --c-surface2: #FFFFFF; --c-border: #000000;
  --c-indigo: #2E1C8C; --c-indigodim: #E6E2FA;
  --c-text: #000000; --c-body: #161620; --c-muted: #33334C;
}

.proof-header-main { min-width: 0; }

.proof-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.proof-header-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text);
  min-width: 0;
}

.proof-header-kind {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-indigo);
  background: var(--c-indigodim);
  border: 1px solid var(--c-indigo);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.proof-header-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.proof-block { min-width: 0; }

.proof-block-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 5px;
}

.proof-block-text {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-body);
}

/* Metrics rail: 3 chips, divider on the left */
.proof-header-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--c-border);
}

.proof-metric {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 9px 11px;
}

.proof-metric-value {
  display: block;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: 3px;
}

.proof-metric-label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
  color: var(--c-muted);
}

/* Tablet: rail drops below the copy */
@media (max-width: 900px) {
  .proof-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .proof-header-rail {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--c-border);
  }
  .proof-metric { flex: 1 1 150px; }
}

/* Narrow: blocks stack, title and pill wrap */
@media (max-width: 600px) {
  .proof-header {
    margin: 12px 14px 0;
    padding: 14px;
  }
  .proof-header-blocks { grid-template-columns: 1fr; gap: 12px; }
  .proof-header-top { flex-wrap: wrap; }
}
