/* Jobs & Wages stat tiles and the Who's Hiring pill, matching the Workforce
   Index's .stat-block / .stat-pill. Brand fills keep dark text in both themes,
   as on the page. The page stays transparent: the host's card is the background. */

:root {
  --font-headline: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;
  --font-body: "Archivo", Arial, "Helvetica Neue", sans-serif;

  /* Same fills as the page's .wi-theme--* helpers */
  --fill-blue: rgba(114, 172, 212, 0.98);
  --fill-orange: rgba(255, 197, 12, 0.95);
  --fill-green: rgba(225, 228, 39, 0.95);

  --ink: #2a2a2a;
  --note: #333;
}

[data-theme="dark"] {
  --ink: #eceff2;
  --note: #d6d9dc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent; /* embed contract: the host card is the background */
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* color-scheme goes on body, never the root: a root color-scheme that differs
   from the host page's paints an opaque (black) backdrop behind the iframe. */
body { color-scheme: light; }
[data-theme="dark"] body { color-scheme: dark; }

html.is-standalone body { background: #f4f7fa; padding: 24px 16px; }
html.is-standalone[data-theme="dark"] body { background: #1e3a50; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cards { padding: 4px 2px 6px; }

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

.tile {
  flex: 1 1 200px;
  padding: 22px 20px 18px;
  border-radius: 8px;
  color: #111;
  background: var(--fill, #f3f3f3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tile--blue { --fill: var(--fill-blue); }
.tile--orange { --fill: var(--fill-orange); }
.tile--green { --fill: var(--fill-green); }

.tile__label {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.tile__value {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.tile__sub {
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-style: italic;
}

.footnote {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--note);
}
.footnote a { color: inherit; }

/* ── Who's Hiring pill (?layout=pill) ── */
.pill {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 9999px;
  color: #111;
  background: var(--fill-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pill__icon {
  flex-shrink: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.pill__main { min-width: 0; }
.pill__label { margin: 0; font-family: var(--font-headline); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.pill__sub { margin: 2px 0 0; font-size: 0.95rem; }
.pill__note { margin: 4px 0 0; font-size: 0.8rem; font-style: italic; }

.pill__value {
  margin-left: auto;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: right;
}

.error { color: #c0392b; padding: 12px; }

@media (max-width: 600px) {
  .pill { border-radius: 24px; padding: 16px 20px; gap: 12px; flex-wrap: wrap; }
  .pill__icon { font-size: 1.6rem; }
  .pill__label { font-size: 1.15rem; }
  .pill__sub { font-size: 0.85rem; }
  .pill__value { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
