/* Jobs & Wages stat tiles and the Who's Hiring pill, in the WWA Brand Standard
   Guide colours and type used by the tables (Montserrat headings, Lato body).
   Fills are the same in both themes. The page stays transparent: the host's
   card is the background. */

:root {
  --font-headline: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --font-body: Lato, "Helvetica Neue", Arial, sans-serif;

  /* WWA brand: Steady Blue, Renewal Green, Accent Lime */
  --fill-blue: #3675ba;
  --fill-green: #8fc440;
  --fill-lime: #c8e563;
  --on-blue: #fff;

  --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: var(--on, #111);
  background: var(--fill, #f3f3f3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

.tile__label {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: 1.25rem;
  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: var(--on-blue);
  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.2rem; 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; }
}
