/*
 * BrokerCompare theme styles.
 *
 * Hand-authored, no build step: a plugin developer can clone the theme and
 * start work without running npm. The tokens mirror the Astro build of the
 * same design so the two render comparably.
 *
 * Class vocabulary is split in two:
 *   .bc-*         layout and components owned by the theme
 *   .bc-row/.bc-pill/.bc-table/.bc-generated/.bc-risk/.bc-notice/.bc-live
 *                 markup the BrokerMeta plugin emits (see wordpress/SHORTCODES.md)
 */

:root {
  --bc-ink-50: #f8f9fb;
  --bc-ink-100: #f0f2f6;
  --bc-ink-200: #e2e6ed;
  --bc-ink-300: #c9d0dc;
  --bc-ink-400: #8f99ab;
  --bc-ink-500: #6b7688;
  --bc-ink-600: #515b6d;
  --bc-ink-700: #3a4356;
  --bc-ink-800: #252d3d;
  --bc-ink-900: #151c29;
  --bc-ink-950: #0a0f18;

  --bc-accent-50: #eff6ff;
  --bc-accent-100: #dbeafe;
  --bc-accent-200: #bfdbfe;
  --bc-accent-300: #93c5fd;
  --bc-accent-600: #1d5fd4;
  --bc-accent-700: #1a4ba8;

  --bc-warn-50: #fffbeb;
  --bc-warn-100: #fef3c7;
  --bc-warn-200: #fde68a;
  --bc-warn-600: #b45309;
  --bc-warn-700: #92400e;
  --bc-warn-900: #6b3410;

  --bc-yes: #0f7b5f;
  --bc-yes-bg: #e8f6f0;
  --bc-no: #6b7688;
  --bc-no-bg: #f2f4f7;
  --bc-live: #0f7b5f;
  --bc-live-bg: #f0f9f5;

  --bc-radius: 0.75rem;
  --bc-max: 64rem;
  --bc-gutter: 1.25rem;

  --bc-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --bc-serif: 'Source Serif 4', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --bc-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--bc-ink-800);
  font-family: var(--bc-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--bc-accent-600);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Layout ------------------------------------------------------------------ */

.bc-wrap { max-width: var(--bc-max); margin: 0 auto; padding: 0 var(--bc-gutter); }
@media (min-width: 640px) { .bc-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .bc-wrap { padding: 0 2rem; } }

.bc-section { border-top: 1px solid var(--bc-ink-100); padding: 3.5rem 0; }
@media (min-width: 640px) { .bc-section { padding: 4rem 0; } }
.bc-section--surface { background: var(--bc-ink-50); }

.bc-skip { position: absolute; left: -9999px; top: 0; z-index: 100; }
.bc-skip:focus {
  left: 1rem; top: 1rem; padding: .625rem 1rem;
  background: var(--bc-ink-950); color: #fff; border-radius: .5rem;
}

.bc-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.bc-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .bc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bc-grid--cards { gap: 1rem; }
@media (min-width: 640px) { .bc-grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bc-grid--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 640px) { .bc-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Banner, header, footer --------------------------------------------------- */

.bc-demo-banner { background: var(--bc-ink-950); color: rgba(255,255,255,.75); }
.bc-demo-banner .bc-wrap { display: flex; align-items: center; gap: .625rem; padding-top: .5rem; padding-bottom: .5rem; }
.bc-demo-banner p { margin: 0; font-size: .8125rem; line-height: 1.4; }
.bc-demo-tag {
  flex: none; border-radius: .25rem; background: rgba(255,255,255,.1);
  padding: .125rem .375rem; font-family: var(--bc-mono);
  font-size: .625rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
}

.bc-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bc-ink-200);
}
.bc-header .bc-wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.bc-brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; font-size: 1.0625rem; color: var(--bc-ink-950); }
.bc-brand-tld { color: var(--bc-accent-600); }
.bc-nav { display: none; gap: 1.5rem; }
@media (min-width: 1024px) { .bc-nav { display: flex; } }
.bc-nav a { color: var(--bc-ink-600); text-decoration: none; font-size: .9375rem; }
.bc-nav a:hover { color: var(--bc-ink-950); }
.bc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .5rem; background: var(--bc-accent-600); color: #fff;
  padding: .5rem 1rem; font-size: .875rem; font-weight: 500; text-decoration: none;
  border: 0; cursor: pointer;
}
.bc-btn:hover { background: var(--bc-accent-700); }
.bc-btn--block { width: 100%; padding: .75rem 1rem; font-size: 1rem; }

.bc-footer { background: var(--bc-ink-950); color: rgba(255,255,255,.7); }
.bc-footer .bc-wrap { padding-top: 3rem; padding-bottom: 3rem; }
.bc-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.bc-footer a:hover { color: #fff; }
.bc-footer-brand { color: #fff; font-weight: 600; font-size: 1.0625rem; }
.bc-footer-nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 1rem; font-size: .9375rem; }
.bc-footer-rule { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 1.75rem 0; }
.bc-footer-fine { max-width: 48rem; font-size: .8125rem; line-height: 1.6; color: rgba(255,255,255,.5); }

/* Typography --------------------------------------------------------------- */

.bc-eyebrow {
  font-family: var(--bc-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--bc-accent-700); margin: 0;
}
.bc-h1 { font-size: 2.25rem; line-height: 1.08; letter-spacing: -.03em; font-weight: 600; color: var(--bc-ink-950); margin: .5rem 0 0; }
@media (min-width: 640px) { .bc-h1 { font-size: 2.75rem; } }
.bc-h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; color: var(--bc-ink-950); margin: .5rem 0 0; }
@media (min-width: 640px) { .bc-h2 { font-size: 2rem; } }
.bc-h3 { font-size: 1.0625rem; font-weight: 600; color: var(--bc-ink-950); margin: 0; }
.bc-lede { font-size: 1.0625rem; line-height: 1.65; color: var(--bc-ink-600); max-width: 42rem; }
.bc-prose { color: var(--bc-ink-600); max-width: 42rem; line-height: 1.65; }
.bc-muted { color: var(--bc-ink-500); font-size: .8125rem; }
.bc-mono { font-family: var(--bc-mono); font-size: .75rem; color: var(--bc-ink-500); word-break: break-all; }

.bc-breadcrumb { font-size: .8125rem; color: var(--bc-ink-500); display: flex; flex-wrap: wrap; gap: .5rem; }
.bc-breadcrumb a { text-decoration: none; }
.bc-breadcrumb a:hover { color: var(--bc-ink-800); }

/* Provenance pills --------------------------------------------------------- */

.bc-pill-source, .bc-pill-editorial {
  display: inline-flex; align-items: center; gap: .375rem;
  border-radius: 999px; padding: .25rem .625rem;
  font-size: .75rem; font-weight: 500; margin-top: .75rem;
}
.bc-pill-source { background: var(--bc-live-bg); color: var(--bc-live); }
.bc-pill-editorial { background: var(--bc-accent-50); color: var(--bc-accent-700); }
.bc-key { font-size: .75rem; color: var(--bc-ink-500); margin: .5rem 0 0; }

/* Cards -------------------------------------------------------------------- */

.bc-card { border: 1px solid var(--bc-ink-200); border-radius: var(--bc-radius); background: #fff; }
.bc-card--pad { padding: 1rem; }
@media (min-width: 640px) { .bc-card--pad { padding: 1.25rem; } }
.bc-card--feature { padding: 1.5rem; }
.bc-card--flush { overflow: hidden; }
.bc-card-head {
  border-bottom: 1px solid var(--bc-ink-200); padding: .75rem 1rem; margin: 0;
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bc-ink-500);
}

.bc-stat-label { font-size: .8125rem; font-weight: 500; color: var(--bc-ink-500); margin: 0; }
.bc-stat-value {
  font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em;
  color: var(--bc-ink-950); margin: .25rem 0 0; font-variant-numeric: tabular-nums;
}
.bc-stat-value--lg { font-size: 2.5rem; line-height: 1.05; }
.bc-stat-value--text { font-size: 1.375rem; font-variant-numeric: normal; }
.bc-stat-field { font-family: var(--bc-mono); font-size: .75rem; color: var(--bc-ink-500); margin: .75rem 0 0; word-break: break-all; }

/* Rows: the plugin emits these ---------------------------------------------- */

.bc-rows { margin: 0; }
.bc-row, .bc-datarow {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--bc-ink-100);
}
.bc-row:last-child, .bc-datarow:last-child { border-bottom: 0; }
.bc-row-label { min-width: 0; }
.bc-row-name { font-size: .9375rem; font-weight: 500; color: var(--bc-ink-900); }
.bc-row-note { font-size: .8125rem; color: var(--bc-ink-500); margin-left: .5rem; }
.bc-datarow dt, .bc-dt { font-size: .9375rem; color: var(--bc-ink-600); min-width: 0; }
.bc-datarow dd, .bc-dd {
  margin: 0; text-align: right; font-size: .9375rem; font-weight: 500;
  color: var(--bc-ink-950); font-variant-numeric: tabular-nums;
  min-width: 0; overflow-wrap: break-word;
}

.bc-pill {
  display: inline-flex; align-items: center; gap: .375rem; flex: none;
  border-radius: 999px; padding: .25rem .625rem; font-size: .75rem; font-weight: 500;
}
.bc-pill-yes { background: var(--bc-yes-bg); color: var(--bc-yes); }
.bc-pill-no { background: var(--bc-no-bg); color: var(--bc-no); }
.bc-pill-unknown { background: var(--bc-no-bg); color: var(--bc-ink-500); font-style: italic; }

.bc-chip {
  display: inline-block; border-radius: .375rem; background: var(--bc-ink-100);
  padding: .25rem .5rem; font-family: var(--bc-mono); font-size: .75rem; color: var(--bc-ink-700);
  margin: 0 .375rem .375rem 0;
}
.bc-chip--muted { color: var(--bc-ink-500); text-decoration: line-through; }

/* Live-value marking -------------------------------------------------------- */

.bc-live {
  text-decoration: underline dotted rgba(15,123,95,.35);
  text-underline-offset: 5px;
  color: var(--bc-ink-950);
  overflow-wrap: break-word;
}
.bc-unresolved { color: var(--bc-ink-500); font-style: italic; text-decoration: none; }

/* Tables -------------------------------------------------------------------- */

.bc-table { width: 100%; min-width: 22rem; border-collapse: collapse; text-align: left; }
.bc-table th, .bc-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--bc-ink-100); }
.bc-table thead th {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bc-ink-500); background: var(--bc-ink-50);
}
.bc-table td:last-child, .bc-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bc-table tbody tr:last-child td { border-bottom: 0; }

/* Risk warning — the plugin emits this ------------------------------------- */

.bc-risk {
  border: 2px solid var(--bc-warn-200); background: var(--bc-warn-50);
  border-radius: var(--bc-radius); padding: 1.25rem;
}
@media (min-width: 640px) { .bc-risk { padding: 1.5rem; } }
.bc-risk-head { display: flex; align-items: center; gap: .5rem; }
.bc-risk-title { font-size: 1.0625rem; font-weight: 600; color: var(--bc-warn-900); margin: 0; }
.bc-risk-text { font-size: 1.0625rem; line-height: 1.6; color: var(--bc-warn-900); margin: .625rem 0 0; }
.bc-risk-figure { font-size: 2.5rem; font-weight: 600; color: var(--bc-warn-900); font-variant-numeric: tabular-nums; }
.bc-risk-meta { font-size: .8125rem; color: var(--bc-warn-700); margin: .5rem 0 0; }

/* Generated descriptions ---------------------------------------------------- */

.bc-generated { border: 1px solid var(--bc-ink-200); border-radius: .5rem; background: #fff; padding: 1rem; margin: 0; }
.bc-generated-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.bc-generated-label {
  font-family: var(--bc-mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--bc-accent-700);
}
.bc-generated-status { border-radius: 999px; background: var(--bc-live-bg); color: var(--bc-live); padding: .125rem .5rem; font-size: .6875rem; font-weight: 500; }
.bc-generated-text { font-size: .9375rem; line-height: 1.6; color: var(--bc-ink-800); margin: .625rem 0 0; }
.bc-generated-meta { font-size: .75rem; color: var(--bc-ink-500); margin: .5rem 0 0; }
.bc-fact-ids { list-style: none; display: flex; flex-wrap: wrap; gap: .375rem; padding: 0; margin: .625rem 0 0; }
.bc-fact-ids li {
  border: 1px solid var(--bc-ink-200); border-radius: .25rem; background: #fff;
  padding: .125rem .375rem; font-family: var(--bc-mono); font-size: .6875rem;
  color: var(--bc-ink-600); word-break: break-all;
}

/* Failure notice ------------------------------------------------------------ */

.bc-notice { background: var(--bc-warn-50); border-bottom: 1px solid var(--bc-warn-200); }
.bc-notice .bc-wrap { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.bc-notice-title { font-size: .9375rem; font-weight: 600; color: var(--bc-warn-900); margin: 0; }
.bc-notice-body { font-size: .875rem; line-height: 1.6; color: var(--bc-warn-900); margin: .25rem 0 0; }
.bc-notice-meta { font-family: var(--bc-mono); font-size: .75rem; color: var(--bc-warn-700); margin: .5rem 0 0; word-break: break-word; }

.bc-empty {
  border: 1px dashed var(--bc-ink-300); border-radius: var(--bc-radius);
  background: var(--bc-ink-50); padding: 1.25rem; text-align: center;
  font-size: .875rem; color: var(--bc-ink-600);
}

/* Editorial ---------------------------------------------------------------- */

.bc-quote {
  font-family: var(--bc-serif); font-size: 1.1875rem; line-height: 1.65;
  color: var(--bc-ink-700); border-left: 3px solid var(--bc-accent-200);
  padding-left: 1.25rem; margin: 1.5rem 0 0;
}
.bc-score-card { border: 2px solid var(--bc-accent-200); background: rgba(239,246,255,.4); border-radius: var(--bc-radius); padding: 1.5rem; }
.bc-score { font-size: 2rem; font-weight: 600; line-height: 1; color: var(--bc-ink-950); }
.bc-score-out { font-size: 1.25rem; color: var(--bc-ink-400); }
.bc-score-note { border-top: 1px solid var(--bc-accent-200); margin-top: 1rem; padding-top: 1rem; font-size: .8125rem; line-height: 1.6; color: var(--bc-ink-600); }
.bc-list { list-style: none; padding: 0; margin: 0; }
.bc-list li { display: flex; gap: .5rem; font-size: .9375rem; color: var(--bc-ink-600); padding: .5rem 1rem; }

/* Dark technical panel ------------------------------------------------------ */

.bc-panel { background: var(--bc-ink-950); color: #fff; border-radius: var(--bc-radius); padding: 1.5rem; }
@media (min-width: 640px) { .bc-panel { padding: 2rem; } }
.bc-panel .bc-eyebrow { color: var(--bc-accent-300); }
.bc-panel h2 { color: #fff; }
.bc-panel-body { color: rgba(255,255,255,.7); max-width: 42rem; line-height: 1.65; }
.bc-terminal {
  border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.4);
  border-radius: .5rem; padding: 1rem; margin-top: 1.5rem;
  font-family: var(--bc-mono); font-size: .8125rem;
}
.bc-terminal dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.bc-terminal dt { color: rgba(255,255,255,.4); }
.bc-terminal dd { margin: 0; color: var(--bc-accent-300); }
.bc-panel-note { color: rgba(255,255,255,.45); font-size: .8125rem; line-height: 1.6; max-width: 42rem; }
.bc-btn--light { background: #fff; color: var(--bc-ink-950); }
.bc-btn--light:hover { background: rgba(255,255,255,.9); }

.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap;
}

/* Content authored in the WordPress editor ---------------------------------- */

.bc-page-content > * + * { margin-top: 1.25rem; }
.bc-page-content h2 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; color: var(--bc-ink-950); margin-top: 2.5rem; }
.bc-page-content h3 { font-size: 1.0625rem; font-weight: 600; color: var(--bc-ink-950); margin-top: 2rem; }
.bc-page-content p { color: var(--bc-ink-600); line-height: 1.7; max-width: 42rem; }
.bc-page-content ul, .bc-page-content ol { color: var(--bc-ink-600); line-height: 1.7; max-width: 42rem; padding-left: 1.25rem; }
.bc-page-content li + li { margin-top: .375rem; }
.bc-page-content > table { width: 100%; border-collapse: collapse; }
.bc-page-content a { color: var(--bc-accent-700); }
.bc-page-content .bc-card + .bc-card { margin-top: 1rem; }

.bc-stack > * + * { margin-top: 1.5rem; }
.bc-stack-sm > * + * { margin-top: .75rem; }
.bc-mt-8 { margin-top: 2rem; }
.bc-mt-6 { margin-top: 1.5rem; }
.bc-mt-4 { margin-top: 1rem; }
