/* Job postings tables — Workforce Index embed.
   Styled to match the other custom embeds on seakingwdc.org/workforce-index
   (e.g. the Initial Unemployment Claims dashboard): Archivo / Archivo Narrow /
   IBM Plex Mono type, brand-blue header row, blue-tinted zebra rows, pill
   controls. The host page supplies the glass card, so the page stays
   transparent. */

:root {
  /* Type (WDC Typography Spec) */
  --font-headline: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;
  --font-body: "Archivo", Arial, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, Menlo, monospace;

  /* WDC brand */
  --wdc-blue: #72acd4;
  --wdc-blue-deep: #2e7bad;
  --wdc-dark: #414141;

  /* Surfaces & text (light) */
  --text: #2a2a2a;
  --muted: #6b6b6b;
  --dim: rgba(42, 42, 42, 0.4);
  --border: rgba(65, 65, 65, 0.1);
  --border-row: rgba(65, 65, 65, 0.08);
  --row-alt: rgba(114, 172, 212, 0.06);
  --row-hover: rgba(114, 172, 212, 0.14);
  --foot-bg: rgba(114, 172, 212, 0.1);
  --foot-border: rgba(114, 172, 212, 0.3);
  --field-bg: rgba(255, 255, 255, 0.65);
  --field-border: rgba(65, 65, 65, 0.2);
  --link: #2e7bad;
  --page-bg: transparent;
  --radius-sm: 10px;
}

/* Dark only when asked for (?theme=dark, ?theme=auto on a dark OS, or the
   Workforce Index page's { warnTheme: "dark" } message). */
:root[data-theme="dark"] {
  --text: #eceff2;
  --muted: #aeb6bd;
  --dim: rgba(236, 239, 242, 0.4);
  --border: rgba(255, 255, 255, 0.14);
  --border-row: rgba(255, 255, 255, 0.09);
  --row-alt: rgba(114, 172, 212, 0.08);
  --row-hover: rgba(114, 172, 212, 0.16);
  --foot-bg: rgba(114, 172, 212, 0.22);
  --foot-border: rgba(114, 172, 212, 0.45);
  --field-bg: rgba(255, 255, 255, 0.07);
  --field-border: rgba(255, 255, 255, 0.22);
  --link: #8cc8e8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* color-scheme goes on body, never the root. When an iframe's root
   color-scheme differs from the host page's (Squarespace leaves it at
   "normal"), the browser paints an opaque backdrop behind the frame: a black
   box in dark mode. On body it still themes form controls and scrollbars. */
body { color-scheme: light; }
:root[data-theme="dark"] body { color-scheme: dark; }

.dt { padding: 4px 2px 8px; }

.dt-title {
  margin: 0 0 3px;
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
}
.dt-intro { margin: 0 0 10px; color: var(--muted); font-size: 0.87rem; }

.dt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 10px;
}

.dt-search {
  flex: 1 1 220px;
  max-width: 320px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 999px;
}
.dt-search::placeholder { color: var(--muted); }
.dt-search:focus { outline: none; border-color: var(--wdc-blue-deep); }
.dt-search:focus-visible { box-shadow: 0 0 0 2px rgba(46, 123, 173, 0.25); }

.dt-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dt-pager button {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dt-pager button:hover:not(:disabled) { border-color: var(--wdc-blue); color: var(--text); }
.dt-pager button:disabled { opacity: 0.4; cursor: default; }
.dt-pager button:focus-visible { outline: 2px solid var(--wdc-blue-deep); outline-offset: 1px; }

.dt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table.dt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  font-variant-numeric: tabular-nums;
}

.dt-table th {
  padding: 0;
  background: var(--wdc-blue-deep);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  vertical-align: bottom;
}
.dt-table th.num { text-align: right; }
.dt-table th button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.dt-table th button:hover { background: rgba(255, 255, 255, 0.1); }
.dt-table th button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.dt-table th .arrow { display: inline-block; width: 1em; color: rgba(255, 255, 255, 0.55); font-size: 0.9em; }
.dt-table th[aria-sort] .arrow { color: #fff; }

.dt-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-row);
  vertical-align: baseline;
  color: var(--text);
}
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-table td:not(.num):not(.rank) { font-weight: 600; }
.dt-table td.num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}
.dt-table td.rank, .dt-table th.rank {
  width: 1%;
  padding-right: 4px;
  text-align: right;
  white-space: nowrap;
}
.dt-table td.rank { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.dt-table td.heat { font-weight: 500; }
.dt-table td.nowrap { white-space: nowrap; }

.dt.striped tbody tr:nth-child(even) td { background: var(--row-alt); }
.dt-table tbody tr:not(.dt-empty):hover td:not(.heat) { background: var(--row-hover); }

.dt-table tfoot td {
  background: var(--foot-bg);
  font-weight: 600;
  border-bottom: 1px solid var(--border-row);
}
.dt-table tfoot tr:first-child td { border-top: 1px solid var(--foot-border); }
.dt-table tfoot tr:last-child td { border-bottom: 0; }

.dt-empty td { color: var(--muted); text-align: center; padding: 18px 8px; }
.dt-table .dt-empty td { font-weight: 400; }

.dt-foot { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.dt-foot p { margin: 0 0 3px; }
.dt-foot a { color: var(--link); font-weight: 600; text-decoration: none; }
.dt-foot a:hover { text-decoration: underline; }

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

@media (max-width: 520px) {
  html, body { font-size: 14px; }
  .dt-title { font-size: 1.1rem; }
  .dt-search { max-width: none; }
  .dt-table th button { padding: 10px 8px; }
  .dt-table td { padding: 8px; }
}

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