:root {
  color-scheme: dark;
  --tb-black: #0d0d0d;
  --tb-gunmetal: #20262d;
  --tb-steel: #6b717a;
  --tb-copper: #c46a1f;
  --tb-copper-hover: #a95517;
  --tb-copper-pressed: #914811;
  --tb-concrete: #f2f2f0;
  --tb-white: #ffffff;
  --tb-blue: #3b82f6;
  --tb-blue-dark: #1d4ed8;
  --tb-green: #22c55e;
  --tb-green-dark: #168a45;
  --tb-teal: #2fae83;
  --tb-amber: #f59e0b;
  --tb-amber-dark: #c77a00;
  --tb-red: #ef4444;
  --tb-red-dark: #c93c37;
  --tb-copper-text: #ee9b53;
  --status-confirmed-text: var(--tb-green);
  --status-highly-likely-text: var(--tb-teal);
  --status-strong-evidence-text: #60a5fa;
  --status-emerging-text: var(--tb-amber);
  --status-error-text: #f87171;

  --page-bg: #151a1f;
  --surface-1: #1c232a;
  --surface-2: #242c34;
  --surface-3: #2b343d;
  --text-primary: #f2f2f0;
  --text-secondary: #b7bec6;
  --text-muted: #98a1aa;
  --border-subtle: #37414b;
  --border-default: #46515c;
  --border-strong: #7b8793;
  --input-bg: #1c232a;
  --card-bg: #242c34;
  --nav-bg: #11171c;
  --shadow-color: rgba(0, 0, 0, 0.22);
  --company-logo-plate-light: #ffffff;
  --company-logo-plate-dark: #111820;

  /* Legacy component aliases resolve only to the shared system above. */
  --brand-primary: var(--tb-black);
  --brand-secondary: var(--tb-gunmetal);
  --brand-accent: var(--tb-copper);
  --brand-information: var(--tb-blue);
  --ink: var(--text-primary);
  --ink-soft: var(--text-secondary);
  --steel: var(--tb-gunmetal);
  --paper: var(--page-bg);
  --surface: var(--card-bg);
  --line: var(--border-subtle);
  --line-dark: var(--border-strong);
  --signal: var(--tb-copper);
  --signal-hover: var(--tb-copper-hover);
  --signal-pressed: var(--tb-copper-pressed);
  --signal-soft: color-mix(in srgb, var(--tb-copper) 15%, transparent);
  --intelligence-blue: var(--tb-blue);
  --intelligence-blue-text: #93c5fd;
  --intelligence-blue-surface: var(--tb-blue);
  --intelligence-blue-soft: color-mix(in srgb, var(--tb-blue) 14%, transparent);
  --green: var(--tb-green);
  --green-soft: color-mix(in srgb, var(--tb-green) 14%, transparent);
  --blue-text: #93c5fd;
  --blue-soft: color-mix(in srgb, var(--tb-blue) 14%, transparent);
  --orange: var(--tb-amber);
  --orange-soft: color-mix(in srgb, var(--tb-amber) 14%, transparent);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --shadow: var(--shadow-0);
  --radius-micro: 2px;
  --radius-small: 4px;
  --radius-control: 6px;
  --radius-card: 8px;
  --radius-large: 12px;
  --radius-marketing: 16px;
  --radius: var(--radius-card);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --shell-max: 1440px;
  --content-max: 1280px;
  --grid-columns: 12;
  --grid-gap: 24px;
  --page-gutter: 32px;
  --tap-target: 44px;
  --focus-color: #93c5fd;
  --focus-width: 3px;
  --focus-offset: 3px;
  --motion-fast: 140ms;
  --motion-normal: 190ms;
  --motion-panel: 230ms;
  --layer-base: 0;
  --layer-sticky: 10;
  --layer-popover: 20;
  --layer-header: 30;
  --layer-overlay: 40;
  --layer-drawer: 50;
  --layer-modal: 60;
  --layer-toast: 70;
  --shadow-0: none;
  --shadow-1: 0 6px 20px var(--shadow-color);
  --shadow-2: 0 14px 36px var(--shadow-color);
  --surface-page: var(--page-bg);
  --surface-card: var(--card-bg);
  --surface-raised: var(--surface-3);
  --status-confirmed: var(--tb-green);
  --status-highly-likely: var(--tb-teal);
  --status-strong-evidence: var(--tb-blue);
  --status-probable: var(--tb-amber);
  --status-possible: var(--tb-blue);
  --status-rumor: var(--tb-steel);
  --status-error: var(--tb-red);
  --status-success: var(--tb-green);
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  --focus-color: #174a8b;
  --page-bg: #f2f2f0;
  --surface-1: #e9ebe8;
  --surface-2: #ffffff;
  --surface-3: #f7f8f8;
  --text-primary: #161a1d;
  --text-secondary: #4f5963;
  --text-muted: #59626c;
  --border-subtle: #d7dadd;
  --border-default: #c2c7cc;
  --border-strong: #737d87;
  --input-bg: #ffffff;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --shadow-color: rgba(13, 13, 13, 0.08);
  --tb-copper-text: #914811;
  --status-confirmed-text: #116c37;
  --status-highly-likely-text: #16755b;
  --status-strong-evidence-text: var(--tb-blue-dark);
  --status-emerging-text: #8a5a00;
  --status-error-text: var(--tb-red-dark);
  --intelligence-blue-text: var(--tb-blue-dark);
  --intelligence-blue-surface: var(--tb-blue-dark);
  --blue-text: var(--tb-blue-dark);
}

html[data-theme="dark"] .badge {
  color: var(--text);
}

html[data-theme="dark"] .badge-live {
  color: #b9f2d2;
}

html[data-theme="dark"] .badge-permit {
  color: #c9e6ff;
}

html[data-theme="dark"] .badge-field {
  color: #ffd1ad;
}

html[data-theme="dark"] .confidence i {
  border-color: var(--surface);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-block: 100px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  transition: color var(--motion-normal) ease, background-color var(--motion-normal) ease;
}

.page-view[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--intelligence-blue-text);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
}

img, picture, video, canvas, svg { max-width: 100%; }

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 0.75rem;
  z-index: var(--layer-toast);
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--signal);
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--layer-header);
  color: #fff;
  background: var(--ink);
  border-bottom: 4px solid var(--signal);
}

.header-inner {
  width: min(1480px, calc(100% - 2rem));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.header-actions,
.preference-switches {
  display: flex;
  align-items: center;
}

.header-actions {
  justify-content: flex-end;
  gap: 0.7rem;
}

.preference-switches {
  gap: 0.35rem;
}

.preference-switch {
  min-height: 42px;
  padding: 0.3rem 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #e9eef2;
  background: #172431;
  border: 1px solid #506273;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.preference-switch:hover {
  border-color: var(--signal);
}

.switch-symbol {
  min-width: 1.15rem;
  text-align: center;
  font-size: 0.72rem;
}

.switch-track {
  position: relative;
  width: 27px;
  height: 16px;
  flex: 0 0 auto;
  background: #647583;
  border-radius: 999px;
}

.switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--motion-fast) ease;
}

.preference-switch[aria-checked="true"] .switch-track {
  background: var(--signal);
}

.preference-switch[aria-checked="true"] .switch-track span {
  background: var(--ink);
  transform: translateX(11px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.23rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.brand > span > span,
.footer-brand > span {
  color: var(--signal);
}

.brand-mark {
  width: 31px;
  height: 35px;
  fill: var(--signal);
}

.brand-mark-cut {
  fill: var(--ink);
}

.primary-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
}

.primary-nav a {
  min-height: 72px;
  padding: 0 1rem;
  display: inline-flex;
  align-items: center;
  color: #d8e0e7;
  border-bottom: 3px solid transparent;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: #fff;
  border-bottom-color: var(--signal);
}

.report-button,
.primary-button,
.search button {
  min-height: 46px;
  padding: 0.68rem 1rem;
  color: var(--ink);
  background: var(--signal);
  border: 2px solid var(--signal);
  border-radius: 7px;
  font-weight: 850;
  cursor: pointer;
}

.report-button:hover,
.primary-button:hover,
.search button:hover {
  background: #ffd13a;
  border-color: #ffd13a;
}

.command-bar {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(246, 185, 0, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(246, 185, 0, 0.06) 1px, transparent 1px),
    var(--steel);
  background-size: 36px 36px;
  border-bottom: 1px solid #3e4c59;
  padding: 2.5rem max(1rem, calc((100% - 1480px) / 2));
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.command-copy h1 {
  max-width: 720px;
  margin: 0.15rem 0 0.45rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.command-copy > p:last-child {
  max-width: 650px;
  margin: 0;
  color: #d6dfe6;
  font-size: 1.05rem;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--signal);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.search label {
  display: block;
  margin-bottom: 0.5rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
}

.search-row {
  min-height: 60px;
  padding: 0.35rem;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.search-row:focus-within {
  border-color: var(--intelligence-blue);
  outline: 2px solid var(--intelligence-blue);
}

.search svg {
  width: 22px;
  margin-left: 0.4rem;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 2;
}

.search input {
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.demo-notice {
  padding: 0.7rem max(1rem, calc((100% - 1480px) / 2));
  color: #493700;
  background: var(--signal-soft);
  border-bottom: 1px solid #e5c34f;
  font-size: 0.9rem;
}

.signal-strip {
  width: min(1480px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signal-strip div {
  min-height: 86px;
  padding: 1rem 1.3rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip strong {
  font-size: 1.65rem;
  line-height: 1;
}

.signal-strip span {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
}

.preference-bar {
  width: min(1480px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(420px, 1.35fr);
  align-items: center;
  gap: 1.5rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--intelligence-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.preference-copy h2 {
  margin: 0.12rem 0 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.preference-copy > p:last-child {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.preference-bar .section-kicker {
  color: var(--intelligence-blue-text);
}

.preference-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.preference-tag {
  min-height: 38px;
  padding: 0.42rem 0.7rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.preference-tag:hover {
  border-color: var(--intelligence-blue);
}

.preference-tag[aria-pressed="true"] {
  color: #fff;
  background: var(--intelligence-blue-surface);
  border-color: var(--intelligence-blue-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.workspace {
  width: min(1480px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 340px;
  gap: 1.25rem;
  align-items: start;
}

.jobs-workspace {
  grid-template-columns: 240px minmax(0, 1fr);
}

.jobs-view .right-rail {
  display: none;
}

.filters,
.rail-panel,
.trust-panel,
.companies-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.directory-view > .companies-strip {
  margin-top: 1.5rem;
}

.directory-view {
  min-height: 68vh;
  padding-bottom: 3rem;
}

.subpage-hero {
  padding: 2.4rem max(1rem, calc((100% - 1180px) / 2));
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 6rem);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(244, 185, 66, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(244, 185, 66, 0.06) 1px, transparent 1px),
    var(--steel);
  background-size: 36px 36px;
  border-bottom: 1px solid var(--line-dark);
}

.subpage-hero.compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.subpage-hero h1 {
  max-width: 680px;
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.subpage-hero p:last-child {
  max-width: 720px;
  margin: 0;
  color: #e2e9ee;
}

.directory-search label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.directory-search > div {
  padding: 0.35rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.directory-search > div:focus-within {
  border-color: var(--intelligence-blue);
}

.directory-search input {
  min-width: 0;
  min-height: 48px;
  padding: 0 0.75rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.directory-search button {
  min-height: 48px;
  padding: 0.6rem 1rem;
  color: var(--ink);
  background: var(--signal);
  border: 0;
  border-radius: 7px;
  font-weight: 850;
  cursor: pointer;
}

.directory-shell,
.project-profile,
.report-feed,
.company-grid {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
}

.directory-heading,
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.directory-heading {
  margin-bottom: 1rem;
}

.directory-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 1.55rem;
}

.directory-heading > p {
  color: var(--muted);
  font-weight: 750;
}

.project-directory-grid,
.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-directory-card,
.scope-panel,
.project-fact-panel,
.report-feed article,
.company-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.project-directory-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
}

.project-directory-card h3 {
  margin: 0.85rem 0 0.15rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

.scope-summary {
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-directory-card dl,
.project-fact-panel dl {
  margin: auto 0 1rem;
}

.project-directory-card dl div,
.project-fact-panel dl div {
  padding: 0.55rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.project-directory-card dt,
.project-fact-panel dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.project-directory-card dd,
.project-fact-panel dd {
  margin: 0;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 800;
}

.project-directory-card .secondary-button {
  width: 100%;
}

.back-button {
  min-height: 44px;
  padding: 0.4rem 0;
  color: var(--intelligence-blue-text);
  background: transparent;
  border: 0;
  font-weight: 850;
  cursor: pointer;
}

.profile-header {
  margin: 0.5rem 0 1rem;
  padding: 1.4rem;
  color: #fff;
  background: var(--steel);
  border-left: 5px solid var(--signal);
  border-radius: var(--radius);
}

.profile-header h1 {
  margin: 0.7rem 0 0.15rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.profile-header p {
  margin: 0;
  color: #e2e9ee;
}

.profile-header .watch-button {
  color: #fff;
  background: transparent;
  border-color: #b8c5cf;
}

.profile-header .watch-button[aria-pressed="true"] {
  background: var(--intelligence-blue-surface);
  border-color: var(--intelligence-blue);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 1rem;
}

.scope-panel,
.project-fact-panel {
  padding: 1.3rem;
}

.scope-panel h2,
.project-fact-panel h2 {
  margin: 0.15rem 0 0.7rem;
}

.scope-panel h3 {
  margin: 1.3rem 0 0.6rem;
}

.scope-panel > p:not(.section-kicker) {
  color: var(--muted);
}

.scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.scope-tags span {
  padding: 0.35rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}

.report-feed {
  display: grid;
  gap: 0.9rem;
}

.report-feed article {
  padding: 1.2rem 1.3rem;
  border-left: 5px solid var(--signal);
}

.report-feed article > span {
  color: var(--intelligence-blue-text);
  font-size: 0.78rem;
  font-weight: 850;
}

.report-feed h2 {
  margin: 0.25rem 0;
  font-size: 1.2rem;
}

.report-feed p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.company-grid article {
  padding: 1.2rem;
}

.company-grid h2 {
  margin: 0.25rem 0;
  font-size: 1.15rem;
}

.company-grid article > p:last-child {
  color: var(--muted);
}

.filters {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 112px);
  overflow-x: hidden;
  overflow-y: auto;
}

.panel-heading,
.feed-header,
.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2,
.feed-header h2,
.rail-heading h2,
.companies-strip h2,
.trust-panel h2 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.text-button {
  min-height: 40px;
  padding: 0 0.25rem;
  color: var(--intelligence-blue-text);
  background: transparent;
  border: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.filters fieldset {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.filters fieldset:last-child {
  border-bottom: 0;
}

.select-filter {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.select-filter label,
.sort-control > span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.select-filter select,
.sort-control select {
  width: 100%;
  min-height: 42px;
  padding: 0.45rem 2rem 0.45rem 0.65rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  font-weight: 700;
}

.filters legend {
  padding: 0;
  margin-bottom: 0.55rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filters label {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.93rem;
  cursor: pointer;
}

.filters input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--intelligence-blue-text);
}

.feed-header {
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.15rem;
  align-items: flex-end;
}

.feed-header .section-kicker,
.rail-heading .section-kicker,
.companies-strip .section-kicker {
  color: var(--intelligence-blue-text);
}

.feed-header h2 {
  margin-top: 0.15rem;
  font-size: 1.5rem;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.feed-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.65rem;
}

.sort-control {
  min-width: 150px;
}

.view-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.view-toggle button {
  min-height: 36px;
  padding: 0.35rem 0.6rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.view-toggle button[aria-pressed="true"] {
  color: #fff;
  background: var(--intelligence-blue-surface);
}

.feed-controls .result-count {
  width: 100%;
  text-align: right;
}

.project-list {
  display: grid;
  gap: 0.9rem;
}

.project-list.grid-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-list.grid-view .project-facts {
  grid-template-columns: repeat(2, 1fr);
}

.project-list.grid-view .confidence-row {
  align-items: flex-start;
  flex-direction: column;
  gap: 0.55rem;
}

.project-card {
  position: relative;
  padding: 1.15rem 1.2rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 5px 18px rgba(17, 24, 32, 0.045);
}

.project-card.featured {
  border-color: #90a2b1;
  box-shadow: var(--shadow);
}

.card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--signal);
  border-radius: var(--radius) 0 0 var(--radius);
}

.card-topline,
.confidence-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.16rem 0.5rem;
  color: var(--ink-soft);
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 850;
}

.badge-live {
  color: #054f2e;
  background: var(--green-soft);
}

.badge-permit {
  color: #163f75;
  background: var(--blue-soft);
  border: 1px solid var(--intelligence-blue);
}

.badge-field {
  color: #6a2f00;
  background: var(--orange-soft);
}

.watch-button,
.save-job-button {
  min-height: 40px;
  padding: 0.3rem 0.65rem;
  color: var(--intelligence-blue-text);
  background: var(--surface);
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.watch-button[aria-pressed="true"] {
  color: #fff;
  background: var(--intelligence-blue-surface);
  border-color: var(--intelligence-blue-surface);
}

.save-job-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.save-job-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.save-job-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--signal-soft);
  border-color: var(--signal);
}

.save-job-button[aria-pressed="true"] svg {
  fill: var(--signal);
  stroke: var(--signal);
}

.badge-removed {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-dark);
}

.project-card.recently-removed {
  color: var(--muted);
  background: var(--surface-2);
  filter: saturate(0.12);
}

.project-card.recently-removed h3,
.project-card.recently-removed .location,
.project-card.recently-removed .project-facts dd {
  color: var(--muted);
}

.removed-note,
.removed-timer {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.removed-timer {
  text-align: right;
}

.data-schedule {
  border-top: 3px solid var(--signal);
}

.schedule-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-list li {
  padding: 0.75rem 0;
  display: grid;
  gap: 0.15rem;
  border-top: 1px solid var(--line);
}

.schedule-list strong {
  color: var(--text);
  font-size: 0.82rem;
}

.schedule-list span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.project-card h3 {
  margin: 0.85rem 0 0.1rem;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.location {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-facts {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.project-facts div {
  padding: 0.75rem 0.8rem 0.75rem 0;
}

.project-facts dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.project-facts dd {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.confidence-row {
  font-size: 0.82rem;
}

.confidence-row a {
  font-weight: 850;
}

.confidence {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--green);
  font-weight: 800;
}

.confidence i {
  width: 10px;
  height: 10px;
  background: currentColor;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px currentColor;
}

.confidence-medium {
  color: var(--blue-text);
}

.confidence-review {
  color: var(--orange);
}

.right-rail {
  display: grid;
  gap: 1rem;
}

.rail-panel {
  padding: 1.05rem;
}

.rail-heading {
  margin-bottom: 0.7rem;
}

.rail-heading h2 {
  margin-top: 0.1rem;
}

.rail-heading > a {
  font-size: 0.82rem;
  font-weight: 850;
}

.job-item {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.job-item:last-child {
  padding-bottom: 0.2rem;
}

.job-item h3,
.dispatch-list h3 {
  margin: 0.12rem 0;
  font-size: 0.97rem;
  line-height: 1.35;
}

.job-item p,
.dispatch-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.job-item .job-meta {
  color: var(--intelligence-blue-text);
  font-size: 0.74rem;
  font-weight: 850;
}

.job-item > span,
.dispatch-time {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.dispatch-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dispatch-list li {
  position: relative;
  padding: 0.8rem 0 0.8rem 1.1rem;
  border-top: 1px solid var(--line);
}

.dispatch-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 7px;
  height: 7px;
  background: var(--signal);
  border: 2px solid var(--steel);
  border-radius: 50%;
}

.trust-panel {
  padding: 1rem;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 0.8rem;
  color: #fff;
  background: var(--intelligence-blue-surface);
  border-color: var(--intelligence-blue-surface);
}

.trust-panel svg {
  width: 34px;
  fill: none;
  stroke: var(--signal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.trust-panel h2 {
  color: #fff;
}

.trust-panel p {
  margin: 0.3rem 0 0;
  color: #e3f1fd;
  font-size: 0.86rem;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
}

.empty-state h3,
.empty-state p {
  margin: 0.2rem 0;
}

.secondary-button {
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: 7px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button:hover {
  background: var(--surface-2);
}

.empty-state .secondary-button {
  margin-top: 1rem;
}

.companies-strip {
  width: min(1480px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  padding: 1.3rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(340px, 1.4fr) auto;
  align-items: center;
  gap: 2rem;
  border-left: 5px solid var(--signal);
}

.companies-strip h2 {
  margin-top: 0.15rem;
  font-size: 1.3rem;
}

.companies-strip > p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  color: #d4dce3;
  background: var(--ink);
  border-top: 4px solid var(--signal);
}

.footer-inner {
  width: min(1480px, calc(100% - 2rem));
  min-height: 160px;
  margin: 0 auto;
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 3rem;
  align-items: start;
}

.footer-brand {
  font-size: 1.1rem;
}

.footer-inner p {
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.footer-inner nav a {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 750;
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid #364452;
  color: #9eabb6;
}

dialog {
  width: min(620px, calc(100% - 2rem));
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

dialog::backdrop {
  background: rgba(8, 13, 18, 0.72);
}

.dialog-card {
  padding: 1.5rem;
}

.dialog-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-card h2 {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
}

.dialog-card > p {
  color: var(--muted);
}

.dialog-card label {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 800;
}

.dialog-card input,
.dialog-card textarea {
  width: 100%;
  padding: 0.72rem 0.8rem;
  color: var(--text);
  background: var(--surface-2);
  border: 2px solid var(--line-dark);
  border-radius: 7px;
}

.dialog-card textarea {
  resize: vertical;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--text);
  background: var(--surface-2);
  border: 0;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.dialog-actions {
  margin-top: 1.4rem;
  display: flex;
  justify-content: end;
  gap: 0.7rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--layer-toast);
  max-width: min(420px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  color: #fff;
  background: var(--intelligence-blue-surface);
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  font-weight: 750;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .jobs-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-panel {
    align-self: stretch;
  }

  .project-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
    border-top: 1px solid #344250;
  }

  .primary-nav a {
    min-height: 48px;
  }

  .report-button {
    justify-self: end;
  }

  .header-actions {
    justify-self: end;
  }

  .command-bar {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .subpage-hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .subpage-hero.compact {
    grid-template-columns: 1fr auto;
  }

  .signal-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-strip div:nth-child(2) {
    border-right: 0;
  }

  .signal-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .panel-heading {
    grid-column: 1 / -1;
  }

  .filters fieldset {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .filters fieldset:last-child {
    border-right: 0;
  }

  .select-filter {
    border-right: 1px solid var(--line);
  }

  .right-rail {
    grid-template-columns: 1fr 1fr;
  }

  .trust-panel {
    grid-column: 1 / -1;
  }

  .companies-strip {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .project-directory-grid,
  .company-grid {
    grid-template-columns: 1fr 1fr;
  }

  .companies-strip .secondary-button {
    justify-self: start;
  }
}

/* Map experience */
.project-results-stage.map-active {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.4fr);
  gap: var(--space-4);
  align-items: start;
}

.project-results-stage.map-active .project-directory-grid {
  grid-template-columns: 1fr;
  max-height: 680px;
  overflow-y: auto;
}

.project-results-stage.map-active .context-map-view {
  width: 100%;
  min-height: 680px;
  margin: 0;
  position: sticky;
  top: 96px;
}

.map-discovery-header {
  padding-bottom: var(--space-6);
}

.map-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.map-title-row > div:first-child {
  max-width: 760px;
}

.map-search-form {
  align-items: center;
}

#map-search-form {
  grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 0.8fr) auto auto;
}

.map-location-button {
  min-height: 48px;
  white-space: nowrap;
}

.map-workspace {
  max-width: 1440px;
  width: min(1440px, calc(100% - 2 * var(--page-gutter)));
  margin-top: var(--space-6);
}

.map-toolbar {
  align-items: end;
}

.map-toolbar h2,
.map-toolbar p {
  margin-bottom: 0;
}

.map-results-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.45fr);
  gap: var(--space-4);
  align-items: start;
}

.map-results-layout[data-view="list"] {
  grid-template-columns: 1fr;
}

.map-results-layout[data-view="list"] .map-canvas-panel {
  display: none;
}

.map-result-panel {
  min-width: 0;
  max-height: 720px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.map-result-list {
  display: grid;
  gap: var(--space-3);
}

.map-result-card {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-card);
}

.map-result-card.selected {
  border-color: var(--brand-accent);
  border-left-color: var(--brand-accent);
  box-shadow: var(--shadow-1);
}

.map-result-card h3 {
  margin: var(--space-2) 0 var(--space-1);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
}

.map-result-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.map-result-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.map-result-card dl div {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

.map-result-card dt,
.map-result-card dd {
  margin: 0;
  font-size: 0.8125rem;
}

.map-result-card dt {
  color: var(--text-muted);
}

.map-result-card dd {
  margin-top: 2px;
  font-weight: 700;
}

.map-canvas-panel {
  min-width: 0;
  position: sticky;
  top: 92px;
}

.map-context-bar {
  min-height: 44px;
  padding: 0 var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.map-context-bar .active-filter-chip {
  color: var(--text);
}

.map-page .primary-map-view {
  min-height: 660px;
  margin: 0;
}

.map-page .primary-map-view picture,
.map-page .primary-map-view picture img {
  min-height: 660px;
}

.map-control-stack {
  position: absolute;
  z-index: 6;
  top: 58px;
  right: var(--space-3);
  display: grid;
  gap: var(--space-2);
}

.map-control-stack .icon-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-1);
}

.map-control-stack svg,
.map-preview-close svg,
.map-preview-actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-legend {
  position: absolute;
  z-index: 6;
  right: var(--space-3);
  bottom: var(--space-3);
  width: min(230px, calc(100% - 2 * var(--space-3)));
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}

.map-legend summary {
  min-height: 44px;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.map-legend > div {
  padding: 0 var(--space-3) var(--space-3);
}

.map-legend h3 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: 1rem;
}

.map-legend p {
  margin: var(--space-1) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
}

.legend-dot,
.activity-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: 0 0 auto;
  background: var(--text-muted);
  border: 1px solid var(--surface);
  border-radius: 50%;
}

.legend-dot.reliability-5 { background: var(--status-confirmed); }
.legend-dot.reliability-4 { background: #4e9f68; }
.legend-dot.reliability-3 { background: var(--status-probable); }
.legend-dot.reliability-2 { background: #db752c; }
.legend-dot.reliability-1 { background: var(--status-error); }
.activity-dot.hiring { background: var(--brand-accent); }
.activity-dot.active { background: var(--brand-information); }
.activity-dot.upcoming { background: var(--status-probable); }

.job-map-pin.reliability-3 { background: var(--status-probable); }
.job-map-pin.reliability-2 { background: #db752c; }
.job-map-pin.reliability-1 { background: var(--status-error); }

.job-map-pin.approximate {
  width: 32px;
  height: 32px;
  background: color-mix(in srgb, #db752c 45%, transparent);
  border-style: dashed;
}

.job-map-pin.selected {
  width: 28px;
  height: 28px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand-accent) 42%, transparent);
}

.job-map-pin .activity-dot {
  position: absolute;
  right: -6px;
  bottom: -5px;
  border: 2px solid #fff;
}

.map-cluster {
  position: absolute;
  z-index: 2;
  left: var(--pin-x);
  top: var(--pin-y);
  min-width: 88px;
  min-height: 68px;
  padding: var(--space-2);
  display: grid;
  place-items: center;
  color: #fff;
  background: #172431;
  border: 2px solid var(--brand-accent);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-accent) 25%, transparent);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.map-cluster strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.35rem;
}

.map-cluster span,
.map-cluster small {
  font-size: 0.6875rem;
}

.map-cluster small {
  color: #f4b942;
}

.map-error-state {
  min-height: 180px;
  padding: var(--space-6);
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--status-error);
  border-radius: var(--radius-card);
}

.map-error-state[hidden] {
  display: none;
}

.map-project-preview {
  position: fixed;
  z-index: var(--layer-drawer);
  right: var(--space-6);
  bottom: var(--space-6);
  width: min(520px, calc(100% - 2 * var(--space-6)));
  padding: var(--space-6);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 5px solid var(--brand-accent);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-2);
}

.map-project-preview[hidden] {
  display: none;
}

.map-project-preview h2 {
  margin: var(--space-1) 48px var(--space-1) 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
}

.map-project-preview > p:not(.section-kicker) {
  margin: 0;
  color: var(--text-muted);
}

.map-preview-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  border-radius: var(--radius-control);
}

.map-preview-facts {
  margin: var(--space-4) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.map-preview-facts span {
  padding-top: var(--space-2);
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--border-subtle);
}

.map-preview-facts small,
.map-verified-line {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.map-preview-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.map-preview-actions .saved {
  color: #fff;
  background: var(--brand-accent);
}

@media (max-width: 1023px) {
  .map-results-layout,
  .project-results-stage.map-active {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  }

  #map-search-form {
    grid-template-columns: 1fr 1fr;
  }

  #map-search-form .primary-button,
  #map-search-form .map-location-button {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .map-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  #map-search-form {
    grid-template-columns: 1fr;
  }

  .map-workspace {
    width: calc(100% - 1rem);
  }

  .map-results-layout {
    display: block;
  }

  .map-results-layout[data-view="map"] .map-result-panel,
  .map-results-layout[data-view="list"] .map-canvas-panel {
    display: none;
  }

  .map-results-layout.is-empty .map-result-panel {
    display: block;
  }

  .map-result-panel {
    max-height: none;
  }

  .map-canvas-panel {
    position: relative;
    top: auto;
  }

  .map-page .primary-map-view,
  .map-page .primary-map-view picture,
  .map-page .primary-map-view picture img {
    min-height: 560px;
  }

  .map-legend {
    width: 190px;
  }

  .map-project-preview {
    right: 0;
    bottom: 68px;
    left: 0;
    width: 100%;
    max-height: 72dvh;
    overflow-y: auto;
    padding: var(--space-4);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-top: 5px solid var(--brand-accent);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
  }

  .map-preview-facts {
    grid-template-columns: 1fr 1fr;
  }

  .project-results-stage.map-active {
    display: block;
  }

  .project-results-stage.map-active .project-directory-grid {
    display: none;
  }

  .project-results-stage.map-active .context-map-view {
    position: relative;
    top: auto;
    min-height: 520px;
  }
}

@media (max-width: 600px) {
  .header-inner,
  .signal-strip,
  .preference-bar,
  .workspace,
  .companies-strip,
  .footer-inner {
    width: min(100% - 1rem, 1480px);
  }

  .directory-shell,
  .project-profile,
  .report-feed,
  .company-grid {
    width: min(100% - 1rem, 1180px);
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand-mark {
    width: 27px;
  }

  .report-button {
    min-height: 42px;
    padding-inline: 0.65rem;
    font-size: 0.82rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .preference-switch {
    padding-inline: 0.38rem;
  }

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

  .command-bar {
    padding: 1.7rem 0.75rem;
  }

  .subpage-hero,
  .subpage-hero.compact {
    padding: 1.7rem 0.75rem;
    grid-template-columns: 1fr;
  }

  .subpage-hero.compact .report-button {
    justify-self: start;
  }

  .directory-search > div {
    grid-template-columns: 1fr;
  }

  .directory-search button {
    width: 100%;
  }

  .search-row {
    grid-template-columns: 24px 1fr;
  }

  .search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .demo-notice {
    padding-inline: 0.75rem;
  }

  .signal-strip {
    grid-template-columns: 1fr 1fr;
  }

  .signal-strip div {
    min-height: 82px;
    padding: 0.8rem;
    flex-direction: column;
    gap: 0.2rem;
  }

  .preference-bar {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .preference-tags {
    justify-content: flex-start;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filters fieldset {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .select-filter {
    border-right: 0;
  }

  .feed-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .sort-control {
    flex: 1 1 150px;
  }

  .feed-controls .result-count {
    text-align: left;
  }

  .project-list.grid-view {
    grid-template-columns: 1fr;
  }

  .project-directory-grid,
  .company-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .directory-heading,
  .profile-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-card {
    padding-inline: 0.9rem;
  }

  .card-topline,
  .confidence-row {
    align-items: flex-start;
  }

  .project-facts {
    grid-template-columns: 1fr 1fr;
  }

  .confidence-row {
    flex-direction: column;
    gap: 0.55rem;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .trust-panel {
    grid-column: auto;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-note {
    grid-column: auto;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-actions button {
    width: 100%;
  }
}

/* Job search and filtering system v1 */
.active-filter-bar {
  width: min(1540px, calc(100% - 2rem));
  margin: var(--space-3) auto 0;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-card);
}

.active-filter-bar[hidden] {
  display: none;
}

.active-filter-chips,
.active-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.active-filter-chip {
  min-height: 32px;
  padding: 6px 8px 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-badge);
  font: 500 0.8125rem/1 var(--font-body);
  cursor: pointer;
}

.active-filter-chip:hover {
  border-color: var(--brand-accent);
}

.active-filter-chip span {
  color: var(--brand-accent);
  font-size: 1rem;
}

.mobile-filter-button,
.mobile-filter-close,
.filter-drawer-actions,
.filter-scrim {
  display: none;
}

.jobs-workspace {
  grid-template-columns: 300px minmax(0, 1fr);
}

.jobs-view .filters {
  max-height: calc(100dvh - 108px);
  padding: 0;
  align-self: start;
  overflow: auto;
  overscroll-behavior: contain;
}

.jobs-view .filters .panel-heading {
  position: sticky;
  z-index: 2;
  top: 0;
  margin: 0;
  padding: var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.jobs-view .filters .panel-heading > div {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-group {
  border-bottom: 1px solid var(--border-subtle);
}

.filter-group:last-of-type {
  border-bottom: 0;
}

.filter-group > summary {
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font: 600 0.875rem/1.2 var(--font-body);
  cursor: pointer;
  list-style: none;
}

.filter-group > summary::-webkit-details-marker {
  display: none;
}

.filter-group > summary::after {
  content: "+";
  color: var(--brand-accent);
  font-size: 1.125rem;
}

.filter-group[open] > summary::after {
  content: "−";
}

.filter-group > summary:hover {
  background: var(--surface-2);
}

.filter-group-body {
  padding: 0 var(--space-4) var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.filter-group-body > label:not(:has(input[type="checkbox"])) {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.filter-group-body fieldset {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  border: 0;
}

.filter-group-body fieldset legend {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.filter-group-body label:has(input[type="checkbox"]) {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}

.filter-group-body label:has(input[type="checkbox"]) span {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.filter-checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--space-3);
}

.filter-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-two-column > label:has(select) {
  grid-column: 1 / -1;
}

.filter-zero {
  color: var(--text-muted) !important;
  opacity: 0.55;
}

.reliability-badge {
  border-width: 1px;
  border-style: solid;
}

.reliability-5 {
  color: var(--status-confirmed);
  border-color: var(--status-confirmed);
}

.reliability-4 {
  color: var(--intelligence-blue-text);
  border-color: var(--intelligence-blue);
}

.reliability-3 {
  color: var(--status-probable);
  border-color: var(--status-probable);
}

.reliability-2 {
  color: var(--brand-accent);
  border-color: var(--brand-accent);
}

.reliability-1 {
  color: var(--status-error);
  border-color: var(--status-error);
}

.reliability-summary,
.low-result-suggestion {
  margin: var(--space-3);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  font-size: 0.8125rem;
}

.reliability-summary[hidden],
.low-result-suggestion[hidden] {
  display: none;
}

.reliability-summary strong {
  color: var(--text);
}

.reliability-summary span {
  color: var(--text-secondary);
}

.low-result-suggestion {
  border-left: 4px solid var(--intelligence-blue);
}

.detail-status-pair {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.claim-reliability {
  margin-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.claim-reliability summary {
  padding: var(--space-3) 0;
  color: var(--intelligence-blue-text);
  font-weight: 600;
  cursor: pointer;
}

.claim-reliability > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--space-3);
}

.claim-reliability span {
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--surface-2);
  border-radius: var(--radius-badge);
  font-size: 0.8125rem;
  text-transform: capitalize;
}

.claim-reliability b {
  color: var(--brand-accent);
}

.job-map-view {
  position: relative;
  min-height: 580px;
  margin: var(--space-3);
  overflow: hidden;
  background: var(--brand-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
}

.job-map-view[hidden] {
  display: none;
}

.job-map-view picture,
.job-map-view picture img {
  width: 100%;
  height: 100%;
  min-height: 580px;
  display: block;
  object-fit: contain;
}

.job-map-pins {
  position: absolute;
  inset: 0;
}

.job-map-pin {
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  width: 20px;
  height: 20px;
  padding: 0;
  color: #fff;
  background: var(--brand-accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 40%, transparent);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.job-map-pin.reliability-5 {
  background: var(--status-confirmed);
}

.job-map-pin.reliability-4 {
  background: var(--intelligence-blue);
}

.job-map-pin span,
.job-map-pin small {
  position: absolute;
  left: 50%;
  width: max-content;
  max-width: 190px;
  padding: 5px 7px;
  display: none;
  color: #fff;
  background: #172431;
  border: 1px solid var(--brand-accent);
  transform: translateX(-50%);
}

.job-map-pin span {
  bottom: 27px;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
}

.job-map-pin small {
  bottom: 8px;
  color: #d8e0e7;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  font-size: 0.6875rem;
}

.job-map-pin:hover span,
.job-map-pin:hover small,
.job-map-pin:focus-visible span,
.job-map-pin:focus-visible small {
  display: block;
}

.map-disclaimer {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  left: var(--space-3);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  color: #d8e0e7;
  background: rgba(9, 19, 29, 0.86);
  border-radius: var(--radius-badge);
  font-size: 0.75rem;
}

@media (max-width: 1180px) {
  .jobs-workspace {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 1023px) {
  .mobile-filter-button {
    width: min(1540px, calc(100% - 2rem));
    margin: var(--space-3) auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
  }

  .mobile-filter-button strong {
    min-width: 24px;
    padding: 4px 6px;
    color: #0d0d0d;
    background: var(--brand-accent);
    border-radius: 999px;
    font-size: 0.75rem;
  }

  .jobs-view .filters {
    position: fixed;
    z-index: var(--layer-drawer);
    top: 0;
    left: 0;
    width: min(430px, 92vw);
    height: 100dvh;
    max-height: none;
    display: block;
    border: 0;
    border-right: 1px solid var(--border-strong);
    border-radius: 0;
    box-shadow: var(--shadow-2);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform var(--motion-panel) ease;
  }

  .filters-open .jobs-view .filters {
    transform: translateX(0);
    visibility: visible;
  }

  .mobile-filter-close {
    display: grid;
  }

  .filter-scrim {
    position: fixed;
    z-index: var(--layer-overlay);
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: rgba(9, 19, 29, 0.72);
    border: 0;
  }

  .filter-scrim[hidden] {
    display: none;
  }

  .filter-drawer-actions {
    position: sticky;
    bottom: 0;
    padding: var(--space-4);
    display: block;
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
  }

  .filter-drawer-actions button {
    width: 100%;
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .active-filter-bar,
  .mobile-filter-button {
    width: calc(100% - 1rem);
  }

  .active-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .active-filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .active-filter-chip {
    min-height: 44px;
    flex: 0 0 auto;
  }

  .active-filter-actions > * {
    flex: 1;
  }

  .filter-group > summary,
  .filter-group-body label:has(input[type="checkbox"]) {
    min-height: 44px;
  }

  .filter-checkbox-grid,
  .filter-two-column,
  .claim-reliability > div {
    grid-template-columns: 1fr;
  }

  .jobs-view .view-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .job-map-view,
  .job-map-view picture,
  .job-map-view picture img {
    min-height: 430px;
  }

  .reliability-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Official TradeBastion brand lockup */
.brand {
  min-width: 0;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: clamp(205px, 16vw, 250px);
  height: auto;
  object-fit: contain;
}

.footer-brand .brand-logo {
  width: min(280px, 72vw);
}

@media (max-width: 1180px) {
  .brand-logo {
    width: 210px;
  }
}

@media (max-width: 860px) {
  .brand-logo {
    width: 220px;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 180px;
    height: auto;
  }

  .footer-brand .brand-logo {
    width: min(250px, 78vw);
    height: auto;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding-top: 0.5rem;
  }

  .header-actions {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
  }

  .primary-nav {
    grid-row: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Approved TradeBastion copper intelligence system */
.site-header {
  background: #07111b;
  border-bottom: 1px solid rgba(196, 106, 31, 0.78);
}

.header-inner {
  width: min(1540px, calc(100% - 2rem));
  min-height: 78px;
}

.brand {
  font-size: 1.45rem;
}

.brand > span > span {
  color: #fff;
}

.brand-mark {
  width: 38px;
  height: 42px;
  fill: var(--signal);
}

.primary-nav a {
  min-height: 77px;
  padding-inline: 1.35rem;
}

.primary-nav a:hover,
.primary-nav a.active {
  border-bottom-color: var(--intelligence-blue);
}

.preference-switches {
  gap: 0.65rem;
}

.preference-switch {
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  gap: 0.55rem;
  color: #f2f4f5;
  background: rgba(9, 19, 29, 0.72);
  border-color: #516271;
  border-radius: 6px;
  font-size: 0.88rem;
}

.switch-symbol {
  font-size: 1rem;
}

.switch-track {
  display: none;
}

.report-button {
  display: none;
}

.jobs-view {
  min-height: calc(100vh - 78px);
  padding-bottom: 1rem;
  background: var(--paper);
}

.jobs-view .command-bar {
  position: relative;
  width: min(1540px, calc(100% - 2rem));
  min-height: 230px;
  margin: 0 auto;
  padding: 2.4rem 3.25rem;
  grid-template-columns: minmax(390px, 0.78fr) minmax(480px, 1.22fr);
  align-items: center;
  gap: 2.5rem;
  color: #0b2340;
  background:
    radial-gradient(circle at 74% 38%, rgba(30, 136, 229, 0.75) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 66%, rgba(30, 136, 229, 0.65) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(30, 136, 229, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(30, 136, 229, 0.08) 1px, transparent 1px),
    #f8fafc;
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

html[data-theme="dark"] .jobs-view .command-bar {
  color: #f2f4f5;
  background:
    radial-gradient(circle at 74% 38%, rgba(30, 136, 229, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 66%, rgba(30, 136, 229, 0.8) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(30, 136, 229, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(30, 136, 229, 0.12) 1px, transparent 1px),
    linear-gradient(105deg, #07111b 0%, #07131f 60%, #081d30 100%);
  background-size: auto, auto, 38px 38px, 38px 38px, auto;
  border-color: #294052;
}

.jobs-view .command-copy h1 {
  margin: 0;
  max-width: none;
  color: inherit;
  font-size: clamp(2.8rem, 4.25vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.jobs-view .search {
  align-self: center;
}

.jobs-view .search > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.jobs-view .search-row {
  min-height: 62px;
  padding: 0;
  border: 1px solid #aebdca;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(8, 25, 40, 0.12);
  overflow: hidden;
}

.jobs-view .search input {
  padding-inline: 0.4rem;
  font-size: 1rem;
}

.jobs-view .search button {
  align-self: stretch;
  min-width: 190px;
  color: #fff;
  background: var(--intelligence-blue);
  border: 0;
  border-radius: 0;
}

.jobs-view .search button:hover {
  background: #0874d3;
}

.jobs-view .preference-bar {
  width: min(1540px, calc(100% - 2rem));
  min-height: 70px;
  margin: 0.75rem auto 0;
  padding: 0.7rem 1.25rem;
  grid-template-columns: 175px 1fr;
  gap: 1rem;
  border-left: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
}

.jobs-view .preference-copy h2 {
  font-size: 1rem;
}

.jobs-view .preference-tags {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.jobs-view .preference-tag {
  min-height: 40px;
  padding-inline: 0.85rem;
  flex: 0 0 auto;
  background: transparent;
  border-color: var(--line);
  border-radius: 6px;
}

.jobs-view .preference-tag[aria-pressed="true"] {
  background: var(--intelligence-blue-surface);
  border-color: var(--intelligence-blue-surface);
}

.jobs-workspace {
  width: min(1540px, calc(100% - 2rem));
  margin: 0.75rem auto 2rem;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0.75rem;
}

.jobs-view .filters,
.jobs-view .project-feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.jobs-view .filters {
  top: 90px;
}

.jobs-view .filters legend {
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.jobs-view .project-feed {
  min-width: 0;
  overflow: hidden;
}

.jobs-view .feed-header {
  min-height: 64px;
  margin: 0;
  padding: 0.65rem 1.1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.jobs-view .feed-header h2 {
  font-size: 1.35rem;
}

.jobs-view .feed-controls {
  align-items: center;
  flex-wrap: nowrap;
}

.jobs-view .sort-control > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.jobs-view .sort-control select {
  min-height: 40px;
}

.jobs-view .feed-controls .result-count {
  order: -1;
  width: auto;
  color: var(--intelligence-blue-text);
  white-space: nowrap;
}

.jobs-view .view-toggle {
  min-height: 40px;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
}

.jobs-view .view-toggle button {
  min-height: 38px;
  padding-inline: 0.85rem;
  border-radius: 0;
}

.jobs-view .project-list {
  gap: 0;
}

.jobs-view .project-card {
  min-height: 150px;
  padding: 1rem 1.15rem;
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(430px, 2.25fr) minmax(185px, 0.9fr);
  grid-template-areas:
    "top facts confidence"
    "title facts confidence"
    "location facts confidence";
  column-gap: 1.2rem;
  align-items: center;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.jobs-view .project-card:last-child {
  border-bottom: 0;
}

.jobs-view .project-card.featured {
  border-color: var(--line);
  box-shadow: inset 3px 0 0 var(--signal);
}

.jobs-view .card-accent {
  display: none;
}

.jobs-view .card-topline {
  grid-area: top;
  align-self: end;
}

.jobs-view .card-topline .watch-button,
.jobs-view .card-topline .save-job-button {
  width: 38px;
  min-height: 36px;
  padding: 0;
  overflow: hidden;
  color: var(--intelligence-blue-text);
  font-size: 0;
}

.jobs-view .card-topline .watch-button span,
.jobs-view .card-topline .save-job-button svg {
  font-size: 1rem;
}

.jobs-view .project-card.recently-removed {
  box-shadow: inset 3px 0 0 var(--line-dark);
}

.jobs-view .project-card h3 {
  grid-area: title;
  margin: 0.25rem 0 0;
  font-size: 1.18rem;
}

.jobs-view .project-card .location {
  grid-area: location;
  align-self: start;
  color: var(--intelligence-blue-text);
}

.jobs-view .project-facts {
  grid-area: facts;
  align-self: stretch;
  margin: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 0;
}

.jobs-view .project-facts div {
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
}

.jobs-view .project-facts dd {
  font-size: 0.98rem;
}

.jobs-view .project-facts div:nth-child(2) dd,
.jobs-view .project-facts div:nth-child(3) dd {
  color: var(--signal);
  font-size: 1.08rem;
}

.jobs-view .confidence-row {
  grid-area: confidence;
  height: 100%;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border-left: 1px solid var(--line);
}

.jobs-view .confidence-row a {
  margin-top: 0.75rem;
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: var(--intelligence-blue);
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
}

.jobs-view .confidence {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  color: #0a9f5c;
  font-size: 0.92rem;
}

html[data-theme="dark"] .jobs-view .confidence {
  color: #39d990;
}

.jobs-view .confidence-review {
  color: var(--signal);
}

.jobs-view .confidence-meter {
  height: 22px;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}

.jobs-view .confidence-meter b {
  width: 15px;
  height: 7px;
  display: block;
  background: currentColor;
  border-radius: 1px 1px 0 0;
}

.jobs-view .confidence-meter b:nth-child(2) { height: 10px; }
.jobs-view .confidence-meter b:nth-child(3) { height: 13px; }
.jobs-view .confidence-meter b:nth-child(4) { height: 16px; }
.jobs-view .confidence-meter b:nth-child(5) { height: 20px; }
.jobs-view .confidence-meter b.unfilled { opacity: 0.14; }

.jobs-view .project-list.grid-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
}

.jobs-view .project-list.grid-view .project-card {
  min-height: 320px;
  grid-template-columns: 1fr;
  grid-template-areas: "top" "title" "location" "facts" "confidence";
  border: 1px solid var(--line);
  border-radius: 7px;
}

.jobs-view .project-list.grid-view .project-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jobs-view .project-list.grid-view .confidence-row {
  padding: 0.75rem 0 0;
  border-left: 0;
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] {
  --paper: #07111b;
  --surface: #0b1925;
  --surface-2: #102536;
  --line: #294052;
  --line-dark: #4d6577;
}

@media (max-width: 1180px) {
  .jobs-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .jobs-view .project-card {
    grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.55fr);
    grid-template-areas:
      "top confidence"
      "title confidence"
      "location confidence"
      "facts facts";
  }

  .jobs-view .confidence-row {
    min-height: 100px;
  }
}

@media (max-width: 860px) {
  .jobs-view .command-bar {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 2rem;
  }

  .jobs-view .preference-bar {
    grid-template-columns: 145px 1fr;
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }

  .jobs-view .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .header-inner {
    width: calc(100% - 1rem);
  }

  .jobs-view .command-bar,
  .jobs-view .preference-bar,
  .jobs-workspace {
    width: calc(100% - 1rem);
  }

  .jobs-view .command-bar {
    padding: 1.5rem 1rem;
  }

  .jobs-view .command-copy h1 {
    font-size: clamp(2.35rem, 12vw, 3.3rem);
  }

  .jobs-view .search-row {
    grid-template-columns: 24px 1fr;
    padding: 0.3rem;
  }

  .jobs-view .search button {
    width: 100%;
    min-width: 0;
    border-radius: 4px;
  }

  .jobs-view .preference-bar {
    grid-template-columns: 1fr;
  }

  .jobs-view .filters {
    grid-template-columns: 1fr;
  }

  .jobs-view .feed-header {
    align-items: flex-start;
  }

  .jobs-view .feed-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .jobs-view .feed-controls .result-count {
    width: 100%;
    text-align: left;
  }

  .jobs-view .project-card {
    padding: 1rem;
    grid-template-columns: 1fr;
    grid-template-areas: "top" "title" "location" "facts" "confidence";
  }

  .jobs-view .project-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.75rem;
  }

  .jobs-view .project-facts div:nth-child(odd) {
    border-left: 0;
  }

  .jobs-view .confidence-row {
    min-height: 0;
    margin-top: 0.75rem;
    padding: 0.85rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .jobs-view .project-list.grid-view {
    grid-template-columns: 1fr;
  }
}

/* Map-led search hero and compact utility controls */
.preference-switch {
  position: relative;
  justify-content: center;
  padding: 0;
  width: 46px;
  min-width: 46px;
  height: 44px;
  border-color: rgba(143, 166, 184, 0.55);
  background: rgba(7, 17, 27, 0.78);
}

#language-toggle {
  width: 68px;
  min-width: 68px;
  gap: 0.2rem;
}

.preference-switch:hover {
  color: #fff;
  background: #122235;
  border-color: var(--intelligence-blue);
}

.preference-switch:active {
  transform: translateY(1px);
}

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

.switch-symbol {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-grid;
  place-items: center;
}

.switch-symbol svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-code {
  min-width: 25px;
  padding: 0.08rem 0.22rem;
  color: #07111b;
  background: var(--signal);
  border-radius: 3px;
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-align: center;
}

.jobs-view .command-bar > .hero-map {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 1.5%;
  width: min(59%, 900px);
  height: 108%;
  object-fit: contain;
  object-position: right center;
  opacity: 0.58;
  pointer-events: none;
  user-select: none;
  filter: saturate(1.05) contrast(1.12);
  mix-blend-mode: normal;
  transform: translateY(-50%);
}

.jobs-view .command-bar > .hero-map-dark {
  display: none;
}

html[data-theme="dark"] .jobs-view .command-bar > .hero-map-light {
  display: none;
}

html[data-theme="dark"] .jobs-view .command-bar > .hero-map-dark {
  display: block;
  opacity: 0.68;
  filter: saturate(1.2) contrast(1.12);
  mix-blend-mode: screen;
}

.jobs-view .command-copy,
.jobs-view .search {
  position: relative;
  z-index: 1;
}

.jobs-view .command-copy {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="dark"] .jobs-view .command-copy {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

@media (max-width: 860px) {
  .jobs-view .command-bar > .hero-map {
    right: -10%;
    width: 88%;
    height: 90%;
    opacity: 0.22;
  }

  html[data-theme="dark"] .jobs-view .command-bar > .hero-map-dark {
    opacity: 0.3;
  }
}

@media (max-width: 600px) {
  .preference-switches {
    gap: 0.4rem;
  }

  .preference-switch {
    width: 44px;
    min-width: 44px;
  }

  #language-toggle {
    width: 64px;
    min-width: 64px;
  }

  .jobs-view .command-bar > .hero-map {
    top: 30%;
    right: -23%;
    width: 115%;
    height: 66%;
    opacity: 0.32;
  }

  html[data-theme="dark"] .jobs-view .command-bar > .hero-map-dark {
    opacity: 0.24;
  }
}

/* Structured job cards and full job intelligence */
.jobs-view .project-card {
  min-height: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr) 230px;
  grid-template-areas: "jobmain jobside";
  column-gap: 0;
  align-items: stretch;
}

.jobs-view .job-card-main {
  grid-area: jobmain;
  min-width: 0;
  padding: 1.15rem 1.25rem;
}

.jobs-view .job-card-side {
  grid-area: jobside;
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  border-left: 1px solid var(--line);
}

.job-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.company-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #34495e, #172431);
  border: 2px solid var(--signal);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.jobs-view .project-card h3 {
  margin: 0.35rem 0 0.08rem;
  font-size: 1.35rem;
  line-height: 1.15;
}

.company-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.jobs-view .project-card .location {
  margin: 0.85rem 0 0;
  color: var(--text);
  font-size: 0.93rem;
}

.jobs-view .project-card .location strong {
  color: var(--intelligence-blue-text);
}

.pay-stack {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pay-stack p {
  min-width: 145px;
  margin: 0;
  padding: 0.55rem 0.7rem;
  display: grid;
  gap: 0.08rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pay-stack span,
.weekly-estimate span,
.weekly-estimate small,
.freshness span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.pay-stack strong {
  color: var(--signal);
  font-size: 1rem;
}

.job-card-meta {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.job-card-meta strong {
  padding: 0.22rem 0.45rem;
  color: var(--ink);
  background: var(--signal);
  border-radius: 4px;
}

.job-card-meta span {
  color: var(--muted);
  font-weight: 650;
}

.weekly-estimate,
.freshness {
  margin: 0;
  display: grid;
  gap: 0.08rem;
}

.weekly-estimate strong {
  color: var(--signal);
  font-size: 1.28rem;
  line-height: 1.1;
}

.freshness strong {
  color: var(--intelligence-blue-text);
  font-size: 0.82rem;
}

.jobs-view .job-card-side .confidence {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
}

.jobs-view .confidence-possible {
  color: var(--intelligence-blue-text);
}

.job-card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
}

.job-card-actions button {
  min-height: 42px;
  border-radius: 5px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.job-card-actions .save-job-button {
  width: auto;
  padding: 0.5rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-dark);
}

.job-card-actions .view-job-button {
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: var(--intelligence-blue-surface);
  border: 1px solid var(--intelligence-blue-surface);
}

.jobs-view .project-list.grid-view .project-card {
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-areas: "jobmain" "jobside";
}

.jobs-view .project-list.grid-view .job-card-side {
  border-top: 1px solid var(--line);
  border-left: 0;
}

.jobs-view .project-card.recently-removed .job-card-meta strong {
  color: var(--text);
  background: var(--line-dark);
}

.job-detail-dialog {
  width: min(1040px, calc(100% - 1.25rem));
  max-height: calc(100dvh - 1.25rem);
  overflow: hidden;
  border-radius: 10px;
}

.job-detail-shell {
  max-height: calc(100dvh - 1.25rem);
  overflow-y: auto;
}

.job-detail-header {
  position: sticky;
  z-index: var(--layer-sticky);
  top: 0;
  padding: 1.2rem 1.35rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
  background: #172431;
  border-bottom: 4px solid var(--signal);
}

.job-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.job-detail-heading h2 {
  margin: 0.35rem 0 0.1rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
}

.job-detail-heading p {
  margin: 0.12rem 0;
  color: #d8e0e7;
}

.job-detail-heading .location {
  font-size: 0.9rem;
}

.job-detail-close {
  color: #fff;
  background: #263a4d;
}

.job-detail-actions {
  padding: 0.85rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.job-detail-content {
  padding: 1.25rem 1.35rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.job-detail-section {
  grid-column: span 6;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.job-detail-section.wide,
.compensation-panel {
  grid-column: 1 / -1;
}

.job-detail-section.wide {
  overflow-x: auto;
}

.job-detail-section h3 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.job-detail-section h4 {
  margin: 0.8rem 0 0.35rem;
  font-size: 0.85rem;
}

.job-detail-section p,
.job-detail-section li,
.job-detail-section td,
.job-detail-section th {
  font-size: 0.86rem;
}

.job-detail-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.detail-facts,
.compensation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.detail-facts div,
.compensation-grid div {
  padding: 0.7rem;
  background: var(--surface-2);
  border-radius: 6px;
}

.detail-facts dt,
.compensation-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.detail-facts dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
}

.compensation-grid strong {
  display: block;
  color: var(--signal);
  font-size: 1.25rem;
}

.estimate-total {
  border: 2px solid var(--signal);
}

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.detail-chips span {
  padding: 0.3rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.verification-panel {
  border-top: 4px solid var(--green);
}

.evidence-panel {
  border-left: 3px solid var(--copper);
}

.source-presentation-note {
  max-width: 68ch;
}

.conflict-panel {
  border-left: 4px solid #c99300;
}

.worker-report-panel {
  border-left: 4px solid var(--intelligence-blue);
}

.source-history {
  width: 100%;
  border-collapse: collapse;
}

.source-history th,
.source-history td {
  padding: 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.job-detail-footer {
  padding: 1rem 1.35rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.job-detail-dialog button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
}

@media (max-width: 860px) {
  .jobs-view .project-card {
    grid-template-columns: 1fr;
    grid-template-areas: "jobmain" "jobside";
  }

  .jobs-view .job-card-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .detail-facts,
  .compensation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .jobs-view .job-card-main,
  .jobs-view .job-card-side {
    padding: 1rem;
  }

  .company-mark {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .pay-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pay-stack p {
    min-width: 0;
  }

  .job-detail-content {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .job-detail-section,
  .job-detail-section.wide,
  .compensation-panel {
    grid-column: 1;
  }

  .job-detail-header,
  .job-detail-actions,
  .job-detail-footer {
    padding-inline: 0.9rem;
  }

  .job-detail-heading .company-mark {
    display: none;
  }

  .job-detail-actions > button {
    flex: 1 1 42%;
  }

  .detail-facts,
  .compensation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .job-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* TradeBastion locked two-font system: Barlow Condensed + Inter */
:root {
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select,
textarea,
.primary-nav,
.badge,
.company-name,
.location,
.job-card-meta,
.freshness,
.project-meta,
.result-count,
.detail-facts dt,
.source-history {
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.pay-stack strong,
.weekly-estimate strong,
.compensation-grid strong {
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.075;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.jobs-view .command-copy h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.subpage-hero h1,
.profile-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.075;
  letter-spacing: -0.01em;
}

.jobs-view .project-card h3,
.project-directory-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

.job-detail-heading h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.job-detail-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}

.job-detail-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.15;
}

.panel-heading h2,
.feed-header h2,
.rail-heading h2,
.companies-strip h2,
.trust-panel h2,
.preference-copy h2,
.directory-heading h2,
.report-feed h2,
.company-grid h2 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.jobs-view .feed-header h2,
.directory-heading h2 {
  font-size: 1.5rem;
}

.jobs-view .preference-copy h2,
.jobs-view .panel-heading h2,
.rail-heading h2,
.trust-panel h2 {
  font-size: 1.25rem;
}

.pay-stack strong {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.05;
}

.weekly-estimate strong,
.compensation-grid strong {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}

.primary-nav a,
button,
.secondary-button {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.15;
}

.filters legend,
.select-filter label,
.directory-search label,
.search label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge,
.signal-label,
.confidence-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-meta,
.result-count,
.freshness,
.detail-facts dt,
.pay-stack span,
.weekly-estimate span,
.weekly-estimate small {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}

.job-detail-section p,
.job-detail-section li,
.job-detail-section td,
.job-detail-section th {
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .jobs-view .command-copy h1 {
    font-size: 2.5rem;
    line-height: 0.98;
  }

  .subpage-hero h1,
  .profile-header h1 {
    font-size: 2.125rem;
    line-height: 1.08;
  }

  h2,
  .job-detail-heading h2 {
    font-size: 1.75rem;
  }

  h3,
  .job-detail-section h3 {
    font-size: 1.375rem;
  }

  h4,
  .job-detail-section h4 {
    font-size: 1.125rem;
  }

  .jobs-view .project-card h3,
  .project-directory-card h3 {
    font-size: 1.25rem;
  }

  .weekly-estimate strong,
  .compensation-grid strong {
    font-size: 1.5rem;
  }

  .pay-stack strong {
    font-size: 1.25rem;
  }
}

/* Locked TradeBastion logo, icon, shape, border, and elevation system */
.brand-logo {
  min-width: 180px;
}

.footer-brand .brand-logo {
  width: clamp(180px, 72vw, 280px);
}

.button-icon,
.icon-button svg,
.watch-button svg,
.view-job-button svg,
.back-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view-job-button,
.back-button,
.watch-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.preference-switch,
.report-button,
.primary-button,
.secondary-button,
.search button,
.directory-search button,
.back-button,
.watch-button,
.save-job-button,
.view-job-button,
.view-toggle,
.view-toggle button,
input,
select,
textarea {
  border-radius: var(--radius-control);
}

.badge,
.job-card-meta strong,
.detail-chips span {
  border-radius: var(--radius-small);
}

.preference-tag {
  border-radius: 999px;
}

.command-bar,
.search-row,
dialog,
.job-detail-dialog {
  border-radius: var(--radius-large);
}

.project-card,
.project-directory-card,
.company-grid article,
.report-feed article,
.rail-panel,
.trust-panel,
.scope-panel,
.project-fact-panel,
.job-detail-section,
.empty-state,
.toast {
  border-radius: var(--radius-card);
}

.project-card,
.project-directory-card,
.company-grid article,
.report-feed article,
.rail-panel,
.trust-panel,
.scope-panel,
.project-fact-panel,
.job-detail-section {
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-0);
}

.project-directory-card,
.company-grid article,
.report-feed article,
.rail-panel,
.trust-panel,
.scope-panel,
.project-fact-panel,
.job-detail-section {
  padding: var(--space-6);
}

.project-card,
.project-directory-card,
.company-grid article,
.report-feed article {
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.project-card:hover,
.project-directory-card:hover,
.company-grid article:hover,
.report-feed article:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.jobs-view .project-list {
  gap: 0.625rem;
  padding: 0.75rem;
}

.jobs-view .project-card,
.jobs-view .project-list.grid-view .project-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-0);
}

.jobs-view .project-card:hover,
.jobs-view .project-list.grid-view .project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.jobs-view .project-card.featured,
.jobs-view .project-card.featured:hover {
  border-color: var(--border-subtle);
  box-shadow: inset 4px 0 0 var(--signal);
}

.jobs-view .project-card.recently-removed,
.jobs-view .project-card.recently-removed:hover {
  border-color: var(--line-dark);
  box-shadow: var(--shadow-0);
  transform: none;
}

.card-featured {
  box-shadow: inset 4px 0 0 var(--brand-accent);
}

.card-selected,
[aria-selected="true"].project-card,
[aria-selected="true"].project-directory-card {
  border-color: var(--brand-accent);
  box-shadow: inset 4px 0 0 var(--brand-accent);
}

.card-saved {
  border-color: var(--border-strong);
}

.card-disabled,
[aria-disabled="true"].project-card,
[aria-disabled="true"].project-directory-card {
  color: var(--text-muted);
  background: var(--surface-raised);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-0);
  filter: grayscale(0.35);
  opacity: 0.65;
}

.card-recently-removed {
  color: var(--text-muted);
  background: var(--surface-raised);
  border-color: var(--status-rumor);
  box-shadow: var(--shadow-0);
  filter: saturate(0.12);
}

.verification-panel {
  border-top: 4px solid var(--green);
}

.conflict-panel {
  border-left: 4px solid #c99300;
}

.worker-report-panel {
  border-left: 4px solid var(--intelligence-blue);
}

.site-header {
  box-shadow: var(--shadow-1);
}

.search-row {
  box-shadow: var(--shadow-2);
}

dialog,
.job-detail-dialog {
  box-shadow: var(--shadow-2);
}

.report-button,
.primary-button,
.jobs-view .search button,
.directory-search button,
.job-card-actions .view-job-button {
  color: #0d0d0d;
  background: var(--signal);
  border: 1px solid var(--signal);
  box-shadow: var(--shadow-0);
}

.report-button:hover,
.primary-button:hover,
.jobs-view .search button:hover,
.directory-search button:hover,
.job-card-actions .view-job-button:hover {
  color: #0d0d0d;
  background: #d67a2d;
  border-color: #d67a2d;
  box-shadow: var(--shadow-0);
}

.secondary-button,
.back-button,
.watch-button,
.save-job-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-0);
}

.secondary-button:hover,
.back-button:hover,
.watch-button:hover,
.save-job-button:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--text);
  box-shadow: var(--shadow-0);
}

.jobs-view .card-topline .save-job-button,
.save-job-button,
.watch-button .button-icon {
  color: var(--signal);
}

.watch-button[aria-pressed="true"] {
  color: #0d0d0d;
  background: var(--signal);
  border-color: var(--signal);
}

.watch-button[aria-pressed="true"] .button-icon {
  color: #0d0d0d;
}

.save-job-button[aria-pressed="true"],
.jobs-view .card-topline .save-job-button[aria-pressed="true"] {
  color: #0d0d0d;
  background: var(--signal);
  border-color: var(--signal);
}

.save-job-button[aria-pressed="true"] svg {
  fill: #0d0d0d;
  stroke: #0d0d0d;
}

.icon-button {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-0);
}

.icon-button:hover {
  border-color: var(--border-strong);
}

.dialog-card input,
.dialog-card textarea,
.sort-control select,
.select-filter select {
  border-width: 1px;
}

@media (max-width: 520px) {
  .brand-logo,
  .footer-brand .brand-logo {
    min-width: 180px;
    width: 180px;
  }
}

/* TradeBastion global layout, control, motion, and accessibility tokens */
.tb-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gap);
}

.header-inner,
.signal-strip,
.site-footer .footer-inner {
  width: min(var(--shell-max), calc(100% - var(--page-gutter) - var(--page-gutter)));
}

.jobs-view .command-bar {
  width: min(var(--shell-max), calc(100% - var(--page-gutter) - var(--page-gutter)));
}

.jobs-view .preference-bar,
.workspace,
.jobs-workspace,
.directory-shell,
.project-profile,
.report-feed,
.company-grid,
.companies-strip {
  width: min(var(--content-max), calc(100% - var(--page-gutter) - var(--page-gutter)));
}

.subpage-hero,
.demo-notice {
  padding-inline: max(var(--page-gutter), calc((100% - var(--content-max)) / 2));
}

.directory-view {
  padding-bottom: var(--space-16);
}

.directory-shell,
.project-profile,
.report-feed,
.company-grid {
  margin-top: var(--space-6);
}

:focus-visible {
  outline: 2px solid var(--brand-information);
  outline-offset: 2px;
}

button,
a,
input,
select,
textarea,
.project-card,
.project-directory-card,
.company-grid article,
.report-feed article {
  transition-duration: var(--motion-fast);
  transition-timing-function: ease;
}

.project-card,
.project-directory-card,
.company-grid article,
.report-feed article,
dialog,
.job-detail-dialog {
  transition-duration: var(--motion-normal);
}

.primary-button,
.secondary-button,
.back-button,
.watch-button,
.job-card-actions button,
.directory-search button,
.search button {
  min-height: 44px;
  padding-inline: 20px;
}

.icon-button,
.save-job-button,
.jobs-view .card-topline .save-job-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
}

button:active:not(:disabled),
.secondary-button:active,
.back-button:active {
  filter: brightness(0.9);
  transform: translateY(1px);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.5;
  box-shadow: none;
}

button:disabled:hover,
[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

button[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: progress;
}

button[aria-busy="true"]::before {
  width: 16px;
  height: 16px;
  content: "";
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tb-spin 750ms linear infinite;
}

@keyframes tb-spin {
  to { transform: rotate(360deg); }
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  min-height: 44px;
  padding-inline: 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
}

select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B717A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:not([type="checkbox"]):not([type="radio"]):disabled,
select:disabled,
textarea:disabled {
  color: var(--text-muted);
  background: var(--surface-raised);
  cursor: not-allowed;
  opacity: 0.65;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.field-error {
  border-color: var(--status-error);
}

input[data-valid="true"],
select[data-valid="true"],
textarea[data-valid="true"],
.field-success {
  border-color: var(--status-success);
}

.field-message {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.field-message.error {
  color: var(--status-error);
}

.field-message.success {
  color: var(--status-success);
}

.search input,
.directory-search input {
  padding-inline: 12px;
  background: transparent;
  border: 0;
}

.preference-tag {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.primary-nav a {
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  position: absolute;
  z-index: var(--layer-toast);
  left: 50%;
  bottom: calc(100% + var(--space-2));
  width: max-content;
  max-width: 260px;
  padding: var(--space-2) var(--space-3);
  content: attr(data-tooltip);
  color: #fff;
  background: var(--brand-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
  font-size: 0.8125rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
[data-tooltip][aria-expanded="true"]::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.filters,
.rail-panel {
  z-index: var(--layer-sticky);
}

.site-header {
  z-index: var(--layer-header);
}

dialog,
.job-detail-dialog {
  z-index: var(--layer-modal);
}

.toast {
  z-index: var(--layer-toast);
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --grid-columns: 8;
    --grid-gap: 20px;
    --page-gutter: 24px;
  }

  .directory-view {
    padding-bottom: var(--space-12);
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }

  .jobs-view .filters {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --grid-columns: 4;
    --grid-gap: 16px;
    --page-gutter: 16px;
  }

  .directory-view {
    padding-bottom: var(--space-8);
  }

  .primary-button,
  .secondary-button,
  .back-button,
  .watch-button,
  .job-card-actions button,
  .directory-search button,
  .search button,
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: 48px;
  }

  .icon-button,
  .save-job-button,
  .jobs-view .card-topline .save-job-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .preference-tag {
    min-height: 44px;
  }

  .project-card,
  .project-directory-card,
  .company-grid article,
  .report-feed article,
  .scope-panel,
  .project-fact-panel,
  .job-detail-section {
    padding: var(--space-4);
  }
}

/* Jobs experience v2: compact decision cards, compare, reporting, and detail hierarchy */
.jobs-view .project-card {
  overflow: visible;
}

.jobs-view .job-card-main {
  padding: var(--space-5) var(--space-6);
}

.jobs-view .job-card-side {
  width: 240px;
  padding: var(--space-5);
  gap: var(--space-3);
}

.jobs-view .project-card h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.05;
}

.jobs-view .job-card-side .confidence {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label help" "meter meter";
  gap: 3px var(--space-2);
  align-items: center;
}

.confidence-copy {
  grid-area: label;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.confidence-help {
  grid-area: help;
  width: 26px;
  height: 26px;
  padding: 4px;
  color: currentColor;
  background: transparent;
  border: 0;
  border-radius: var(--radius-badge);
  cursor: help;
}

.confidence-help svg,
.job-more summary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jobs-view .confidence-meter {
  grid-area: meter;
}

.badge-status {
  color: var(--intelligence-blue-text);
  border-color: var(--intelligence-blue);
}

.badge-confirmed {
  color: var(--status-confirmed);
  border-color: var(--status-confirmed);
}

.badge-probable {
  color: var(--status-probable);
  border-color: var(--status-probable);
}

.badge-possible {
  color: var(--status-possible);
  border-color: var(--status-possible);
}

.badge-rumor {
  color: var(--status-rumor);
  border-color: var(--status-rumor);
}

.job-card-actions {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
}

.job-card-actions .icon-only-job-action {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.job-card-actions .view-job-button {
  font-family: var(--font-body);
  font-weight: 600;
}

.job-more {
  position: relative;
  min-width: 42px;
}

.job-more summary {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
  list-style: none;
}

.job-more summary::-webkit-details-marker {
  display: none;
}

.job-more[open] summary,
.job-more summary:hover {
  background: var(--surface-2);
  border-color: var(--text);
}

.job-more-menu {
  position: absolute;
  z-index: var(--layer-popover);
  right: 0;
  bottom: calc(100% + var(--space-2));
  width: 210px;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-1);
}

.job-more-menu button {
  width: 100%;
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  text-align: left;
}

.job-more-menu button:hover {
  background: var(--surface-2);
}

.job-compare-tray {
  position: sticky;
  z-index: var(--layer-sticky);
  bottom: var(--space-4);
  margin: var(--space-4);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: #fff;
  background: #172431;
  border: 1px solid var(--brand-accent);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-2);
}

.job-compare-tray[hidden] {
  display: none;
}

.job-compare-tray > div:first-child {
  display: grid;
  gap: 2px;
}

.job-compare-tray span {
  color: #d8e0e7;
  font-size: 0.8125rem;
}

.job-compare-tray-actions,
.empty-state-actions,
.job-detail-footer > div {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.job-compare-tray .text-button {
  color: #fff;
}

.job-compare-dialog {
  width: min(1120px, calc(100% - 1.25rem));
  max-height: calc(100dvh - 1.25rem);
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-panel);
}

.compare-shell {
  max-height: calc(100dvh - 1.25rem);
  overflow: auto;
}

.compare-header {
  position: sticky;
  z-index: var(--layer-sticky);
  top: 0;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: #172431;
  border-bottom: 4px solid var(--brand-accent);
}

.compare-header h2 {
  margin: 2px 0 0;
}

.job-compare-content {
  padding: var(--space-6);
}

.compare-table-wrap {
  overflow: auto;
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  min-width: 155px;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--surface-2);
}

.compare-table tbody th {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.compare-table thead button {
  float: right;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.detail-section-heading .section-kicker {
  margin: 0 0 2px;
}

.estimate-label {
  padding: 4px 6px;
  color: var(--status-probable);
  border: 1px solid var(--status-probable);
  border-radius: var(--radius-badge);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.compensation-grid .estimate-total {
  grid-column: 1 / -1;
}

.compensation-grid div:nth-child(4) strong {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.35;
}

.compensation-grid .estimate-total strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
}

.estimate-explanation {
  margin: var(--space-4) 0 var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

.estimate-explanation summary {
  padding-top: var(--space-3);
  color: var(--intelligence-blue-text);
  font-weight: 600;
  cursor: pointer;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.tools-grid > div {
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.verification-types {
  margin-top: var(--space-4);
}

.related-job-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.related-job-list button {
  padding: var(--space-4);
  display: grid;
  gap: 4px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  text-align: left;
  cursor: pointer;
}

.related-job-list button:hover {
  border-color: var(--brand-accent);
}

.related-job-list span {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.job-report-dialog {
  width: min(620px, calc(100% - 1.25rem));
}

.job-report-options {
  display: grid;
  gap: var(--space-2);
}

.job-report-options label {
  min-height: 44px;
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.job-loading-state {
  padding: var(--space-3);
  display: grid;
  gap: var(--space-3);
}

.job-loading-state[hidden] {
  display: none;
}

.job-card-skeleton {
  min-height: 180px;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.job-card-skeleton span {
  height: 18px;
  display: block;
  background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 55%, var(--surface)), var(--surface-2));
  background-size: 200% 100%;
  border-radius: var(--radius-badge);
  animation: job-skeleton 1.2s linear infinite;
}

.job-card-skeleton span:nth-child(2) { width: 70%; }
.job-card-skeleton span:nth-child(3) { width: 55%; }
.job-card-skeleton span:nth-child(4) { width: 85%; }

@keyframes job-skeleton {
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .job-card-skeleton span { animation: none; }
}

.job-error-state {
  margin: var(--space-4);
  border-left: 4px solid var(--status-error);
}

@media (max-width: 860px) {
  .jobs-view .job-card-side {
    width: auto;
  }

  .job-compare-tray {
    align-items: stretch;
    flex-direction: column;
  }

  .job-compare-tray-actions > * {
    flex: 1;
  }

  .related-job-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .jobs-view .job-card-main,
  .jobs-view .job-card-side {
    padding: var(--space-4);
  }

  .jobs-view .job-card-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .jobs-view .job-card-side .job-card-actions,
  .jobs-view .job-card-side .removed-note {
    grid-column: 1 / -1;
  }

  .job-card-actions {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .job-more-menu {
    right: 0;
    bottom: calc(100% + var(--space-2));
  }

  .pay-stack {
    grid-template-columns: 1fr;
  }

  .compensation-grid,
  .detail-facts,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .compensation-grid .estimate-total {
    grid-column: 1;
  }

  .job-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .job-detail-footer > div {
    align-items: stretch;
    flex-direction: column;
  }

  .job-detail-footer button {
    width: 100%;
  }
}

/* Final cascade: responsive filter workspace */
@media (min-width: 1024px) {
  .jobs-workspace {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .jobs-view .filters {
    position: sticky;
    top: 90px;
    max-height: calc(100dvh - 108px);
    padding: 0;
    display: block;
    overflow: auto;
  }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .jobs-workspace {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 1023px) {
  body.filters-open {
    overflow: hidden;
  }

  .jobs-workspace {
    grid-template-columns: 1fr;
  }

  .jobs-view .filters {
    position: fixed;
    z-index: var(--layer-drawer);
    top: 0;
    left: 0;
    width: min(430px, 92vw);
    height: 100dvh;
    max-height: none;
    padding: 0;
    display: block;
    overflow: auto;
    border: 0;
    border-right: 1px solid var(--border-strong);
    border-radius: 0;
    transform: translateX(-105%);
  }

  .filters-open .jobs-view .filters {
    transform: translateX(0);
  }
}

/* Navigation and shared discovery system v1 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.header-inner {
  grid-template-columns: minmax(180px, 280px) minmax(480px, 1fr) auto;
  gap: var(--space-4);
}

.header-inner .brand-logo {
  width: min(270px, 100%);
}

.primary-nav {
  overflow: visible;
}

.primary-nav > a,
.nav-menu > summary {
  min-height: 77px;
  padding-inline: 0.85rem;
  display: inline-flex;
  align-items: center;
  color: #d8e0e7;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font: 600 0.9rem/1 Inter, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.nav-menu {
  position: relative;
}

.nav-menu > summary::-webkit-details-marker,
.profile-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu > summary svg {
  width: 16px;
  margin-left: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.nav-menu.active > summary,
.nav-menu[open] > summary,
.nav-menu > summary:hover {
  color: #fff;
  border-bottom-color: var(--intelligence-blue);
}

.nav-menu-panel,
.profile-menu > div {
  position: absolute;
  z-index: var(--layer-popover);
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  padding: var(--space-2);
  display: grid;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
}

.nav-menu-panel a,
.nav-menu-panel button,
.profile-menu > div a {
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-menu-panel a:hover,
.nav-menu-panel button:hover,
.profile-menu > div a:hover {
  background: var(--surface-2);
}

.header-icon-button {
  color: #f2f4f5;
  background: rgba(9, 19, 29, 0.72);
  border-color: #516271;
}

.profile-menu {
  position: relative;
}

.profile-menu > summary {
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
}

.profile-menu > div {
  gap: var(--space-2);
  padding: var(--space-4);
}

.profile-menu > div span {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.home-view {
  min-height: calc(100dvh - 78px);
  padding: clamp(48px, 9vw, 112px) var(--page-gutter);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--brand-accent) 8%, transparent) 1px, transparent 1px),
    var(--surface-page);
  background-size: 42px 42px;
}

.home-search-shell {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  display: grid;
  gap: var(--space-8);
}

.home-search-shell > div:first-child {
  max-width: 780px;
}

.home-search-shell h1,
.discovery-header h1 {
  margin: var(--space-2) 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.home-search-shell > div:first-child > p:last-child,
.discovery-header > div:first-child > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.shared-search-form {
  width: 100%;
  padding: var(--space-2);
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(200px, 0.8fr) auto;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-1);
}

.shared-search-form > label:not(.visually-hidden) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.shared-search-form input,
.shared-search-form select {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.home-entity-search {
  grid-template-columns: 150px minmax(240px, 1.5fr) minmax(200px, 0.8fr) auto;
}

.home-discovery-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.home-discovery-links button {
  min-height: 120px;
  padding: var(--space-6);
  display: grid;
  align-content: center;
  gap: var(--space-1);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-card);
  text-align: left;
  cursor: pointer;
}

.home-discovery-links button:hover {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.home-discovery-links strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
}

.home-discovery-links span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.jobs-view .search-row {
  grid-template-columns: 28px minmax(180px, 1.2fr) minmax(160px, 0.8fr) auto;
}

.jobs-view .search-row input + input {
  border-left: 1px solid #c4cdd4;
}

.discovery-header {
  padding: var(--space-12) max(var(--page-gutter), calc((100% - var(--content-max)) / 2));
  display: grid;
  gap: var(--space-6);
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
}

.discovery-header.compact {
  padding-block: var(--space-8);
}

.context-quick-filters,
.secondary-tabs,
.dataset-switcher {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.compact-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.compact-filter-row label {
  display: grid;
  gap: var(--space-1);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.compact-filter-row select {
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.context-quick-filters button,
.dataset-switcher button {
  min-height: 38px;
  padding: 8px 12px;
  flex: 0 0 auto;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-small);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.context-quick-filters button[aria-pressed="true"],
.dataset-switcher button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.secondary-tabs {
  border-bottom: 1px solid var(--border-subtle);
}

.secondary-tabs button {
  min-height: 44px;
  padding: 0 4px;
  flex: 0 0 auto;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.secondary-tabs button + button {
  margin-left: var(--space-4);
}

.secondary-tabs button[aria-pressed="true"] {
  color: var(--text);
  border-bottom-color: var(--brand-accent);
}

.directory-controls,
.directory-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.directory-controls > p {
  margin: 0;
}

.directory-controls label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.directory-controls select {
  min-height: 40px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.directory-card-actions .secondary-button {
  flex: 1;
}

.save-project-button.saved,
.save-company-button.saved {
  color: #fff;
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.company-directory .company-grid article {
  position: relative;
  min-height: 300px;
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

.company-directory .company-grid article > p,
.company-directory .company-grid article > h2 {
  margin: 0;
}

.company-directory .save-company-button {
  position: static;
  flex: 0 0 44px;
}

.preview-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.company-card-header,
.company-profile-identity,
.company-profile-actions,
.company-parent-line,
.company-family-parent button {
  display: flex;
  align-items: center;
}

.company-card-header {
  gap: var(--space-3);
  padding-right: 0;
}

.company-card-header .section-kicker,
.company-card-header h2 {
  margin: 0;
}

.company-mark,
.company-profile-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--brand-primary);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-control);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Canonical company marks use one fixed-footprint component. The explicit
   plates preserve official logo colors in both themes without CSS recoloring. */
.company-logo {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  box-sizing: border-box;
  color: var(--text-secondary);
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  line-height: 1;
}

.company-logo--xs { width: 28px; height: 28px; }
.company-logo--sm { width: 36px; height: 36px; }
.company-logo--md { width: 48px; height: 48px; }
.company-logo--lg { width: 64px; height: 64px; }
.company-logo--xl { width: 96px; height: 96px; }

.company-logo__image {
  position: relative;
  z-index: 1;
  display: none;
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 82%;
  object-fit: contain;
}

.company-logo__fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.company-logo--lg .company-logo__fallback { font-size: 1.15rem; }
.company-logo--xl .company-logo__fallback { font-size: 1.55rem; }

.company-logo[data-dark-choice="primary"] .company-logo__image--primary,
.company-logo[data-dark-choice="light"] .company-logo__image--light,
.company-logo[data-dark-choice="dark"] .company-logo__image--dark {
  display: block;
}

.company-logo[data-dark-choice="fallback"] .company-logo__fallback {
  display: grid;
}

.company-logo[data-dark-choice-background="light"] { background: var(--company-logo-plate-light); }
.company-logo[data-dark-choice-background="dark"] { background: var(--company-logo-plate-dark); }

html[data-theme="light"] .company-logo__image { display: none; }
html[data-theme="light"] .company-logo__fallback { display: none; }
html[data-theme="light"] .company-logo[data-light-choice="primary"] .company-logo__image--primary,
html[data-theme="light"] .company-logo[data-light-choice="light"] .company-logo__image--light,
html[data-theme="light"] .company-logo[data-light-choice="dark"] .company-logo__image--dark {
  display: block;
}

html[data-theme="light"] .company-logo[data-light-choice="fallback"] .company-logo__fallback {
  display: grid;
}

html[data-theme="light"] .company-logo[data-light-choice-background="light"] { background: var(--company-logo-plate-light); }
html[data-theme="light"] .company-logo[data-light-choice-background="dark"] { background: var(--company-logo-plate-dark); }

.company-logo.is-broken .company-logo__image,
html[data-theme="light"] .company-logo.is-broken .company-logo__image {
  display: none;
}

.company-logo.is-broken .company-logo__fallback,
html[data-theme="light"] .company-logo.is-broken .company-logo__fallback {
  display: grid;
}

.company-mark {
  width: 46px;
  height: 46px;
  font-size: 1.1rem;
}

.company-card-relation {
  padding-left: var(--space-3);
  color: var(--text);
  border-left: 3px solid var(--brand-accent);
  font-size: 0.8125rem;
  font-weight: 700;
}

.company-card-relation.possible {
  border-left-color: var(--status-probable);
}

.company-directory .directory-card-actions {
  margin-top: auto;
}

.company-profile {
  width: min(var(--content-max), calc(100% - var(--page-gutter) - var(--page-gutter)));
  margin: var(--space-6) auto 0;
}

.company-profile > .back-button {
  margin-bottom: var(--space-5);
}

.company-profile-header {
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-accent);
  border-radius: var(--radius-large);
}

.company-profile-identity {
  align-items: flex-start;
  gap: var(--space-4);
}

.company-profile-mark {
  width: 68px;
  height: 76px;
  font-size: 1.65rem;
}

.company-profile-header h1 {
  margin: var(--space-2) 0 0;
  font: 700 2.75rem/1.05 "Barlow Condensed", "Arial Narrow", sans-serif;
}

.company-profile-header p,
.company-profile-header small {
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
}

.company-parent-line {
  gap: var(--space-2);
  flex-wrap: wrap;
}

.company-parent-line button,
.company-family-parent button,
.text-action,
.company-inline-link {
  color: var(--brand-accent);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.company-inline-link {
  padding: 0;
  text-align: left;
}

.company-profile-actions {
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.company-profile-actions .secondary-button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.company-profile-grid {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4);
}

.company-profile-panel {
  grid-column: span 6;
  padding: var(--space-6);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.company-profile-panel.wide {
  grid-column: 1 / -1;
}

.company-overview-panel {
  grid-column: span 8;
}

.company-snapshot {
  grid-column: span 4;
}

.company-profile-panel > h2,
.company-profile-panel .section-kicker + h2,
.company-knowledge-grid h3 {
  margin-top: 0;
}

.company-profile-panel > h2 {
  font-size: 1.45rem;
}

.company-snapshot dl {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.company-snapshot dl div {
  padding: var(--space-3);
  background: var(--surface-2);
  border-radius: var(--radius-control);
}

.company-snapshot dt,
.company-detail-list small,
.company-knowledge-grid small,
.company-family-parent > span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.company-snapshot dd {
  margin: var(--space-1) 0 0;
  font-weight: 700;
}

.company-detail-list,
.company-knowledge-grid {
  display: grid;
  gap: var(--space-2);
}

.company-detail-list article {
  padding: var(--space-3);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.company-detail-list article:has(> .company-logo) {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.company-detail-list article:has(> .company-logo) > small {
  grid-column: 2;
}

.company-detail-list article > div {
  display: grid;
}

.company-detail-list article > div span,
.company-empty-copy {
  color: var(--text-muted);
}

.company-detail-list article > b {
  color: var(--brand-accent);
}

.company-family-parent {
  margin-bottom: var(--space-3);
  display: grid;
  gap: var(--space-1);
}

.company-family-parent button {
  min-height: 44px;
  padding: var(--space-3);
  justify-content: space-between;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.company-family-parent button .company-logo {
  margin-right: var(--space-2);
}

.project-company-list {
  display: grid;
  gap: var(--space-2);
}

.project-company-list > div {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.project-company-list > div > span:last-child {
  display: grid;
  gap: 2px;
}

.project-company-list small {
  color: var(--text-muted);
}

.job-detail-company-logo {
  display: block;
  flex: 0 0 auto;
}

.company-relationship-details {
  margin-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.company-relationship-details summary {
  min-height: 44px;
  padding-top: var(--space-3);
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.company-tag-groups,
.company-knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.company-knowledge-grid article {
  padding: var(--space-4);
  background: var(--surface-2);
  border-left: 3px solid var(--brand-information);
  border-radius: var(--radius-control);
}

.text-action {
  min-height: 44px;
  padding: var(--space-3) 0 0;
}

.context-map-view,
.primary-map-view {
  max-width: var(--content-max);
  margin: 0 auto;
}

.primary-map-view {
  min-height: 620px;
}

.resource-grid,
.saved-content {
  width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
  margin: var(--space-8) auto;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.resource-grid article,
.saved-empty {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.resource-grid article h2,
.resource-grid article p:last-child,
.saved-empty h2,
.saved-empty p {
  margin-bottom: 0;
}

.saved-list {
  display: grid;
  gap: var(--space-3);
}

.saved-list > button {
  min-height: 86px;
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  text-align: left;
  cursor: pointer;
}

.saved-list > button:hover {
  border-color: var(--brand-accent);
}

.saved-list > button > span:nth-last-child(1) {
  margin-left: auto;
  color: var(--brand-accent);
  font-weight: 600;
}

.saved-list small {
  display: block;
  color: var(--text-muted);
}

.global-search-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: min(760px, calc(100dvh - 2rem));
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-2);
}

.global-search-dialog::backdrop {
  background: rgba(3, 9, 14, 0.74);
}

.global-search-shell {
  padding: var(--space-6);
  display: grid;
  gap: var(--space-4);
}

.global-search-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.global-search-shell h2 {
  margin: 2px 0 0;
}

.global-search-input {
  min-height: 52px;
  padding: 0 var(--space-3);
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
}

.global-search-input svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.global-search-input input {
  min-height: 48px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.global-search-results {
  display: grid;
  gap: var(--space-4);
  overflow: auto;
}

.global-search-results section {
  display: grid;
  gap: var(--space-1);
}

.global-search-results h3 {
  margin: 0;
  color: var(--text-muted);
  font: 600 0.75rem/1 Inter, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.global-search-results button {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  cursor: pointer;
}

.global-search-results button:hover {
  background: var(--surface-2);
}

.global-search-results button span {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.global-search-results .global-company-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.global-company-result-copy {
  display: grid;
  gap: 2px;
}

.global-company-result-copy strong {
  color: var(--text-primary);
  font-size: 0.875rem;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-menu-actions {
  display: none;
}

@media (max-width: 1220px) {
  .header-inner {
    grid-template-columns: 200px 1fr auto;
  }

  .header-inner .brand-logo {
    width: 200px;
  }

  .primary-nav > a,
  .nav-menu > summary {
    padding-inline: 0.55rem;
  }

  .preference-switch .switch-label,
  .preference-switch .switch-track {
    display: none;
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: 72px;
  }

  .header-inner {
    min-height: 68px;
    grid-template-columns: minmax(150px, 1fr) auto;
  }

  .header-inner .brand-logo {
    width: 190px;
  }

  .primary-nav {
    display: none;
  }

  .header-actions {
    width: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .preference-switch {
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    justify-content: center;
  }

  .preference-switch .switch-label,
  .preference-switch .switch-track {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: var(--layer-header);
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 68px;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #07111b;
    border-top: 1px solid rgba(196, 106, 31, 0.78);
  }

  .mobile-menu-actions {
    width: min(var(--content-max), calc(100% - 2 * var(--page-gutter)));
    margin: var(--space-6) auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .mobile-menu-actions a,
  .mobile-menu-actions button {
    min-height: 48px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-control);
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-bottom-nav a {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: #cbd5dc;
    border-radius: var(--radius-control);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-bottom-nav a.active {
    color: #fff;
    background: rgba(196, 106, 31, 0.18);
  }

  .mobile-bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .shared-search-form,
  .home-entity-search {
    grid-template-columns: 1fr;
  }

  .compact-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-discovery-links,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .directory-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-controls {
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .directory-controls label {
    flex: 1;
  }

  .primary-map-view {
    min-height: 480px;
  }
}

/* Account navigation and persistent dark header — approved September 2026. */
:root {
  --header-bg: #11171c;
  --header-surface: #1c232a;
  --header-text: #f2f2f0;
  --header-muted: #b7bec6;
  --header-border: #37414b;
}

.site-header,
html[data-theme="light"] .site-header {
  color: var(--header-text);
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
}

.site-header .primary-nav a,
.site-header .nav-menu > summary,
html[data-theme="light"] .site-header .primary-nav a,
html[data-theme="light"] .site-header .nav-menu > summary {
  color: var(--header-muted);
}

.site-header .primary-nav a:hover,
.site-header .nav-menu > summary:hover,
html[data-theme="light"] .site-header .primary-nav a:hover,
html[data-theme="light"] .site-header .nav-menu > summary:hover {
  color: var(--header-text);
}

.site-header .primary-nav a.active,
html[data-theme="light"] .site-header .primary-nav a.active {
  color: #dc7a2a;
  border-bottom-color: var(--tb-copper);
}

.site-header .preference-switch,
.site-header .header-icon-button,
html[data-theme="light"] .site-header .preference-switch,
html[data-theme="light"] .site-header .header-icon-button {
  color: var(--header-text);
  background: var(--header-surface);
  border-color: var(--header-border);
}

/* Protected research console: reuses the approved account/card language. */
.research-admin-app {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 96px;
}

.research-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.research-admin-heading .secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.research-admin-heading svg,
.account-side-nav [data-operations-console-link] svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-heading-actions,
.admin-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-standalone { min-height: 100vh; background: var(--page-bg); }
.admin-site-header .header-inner { justify-content: space-between; }

.admin-utility-actions .header-icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--header-text);
  background: var(--header-surface);
  border: 1px solid var(--header-border);
  border-radius: 6px;
  font-weight: 700;
}

.admin-utility-actions .secondary-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--header-text);
  border-color: var(--header-border);
  text-decoration: none;
}

.admin-section-nav {
  display: flex;
  gap: 6px;
  margin: 24px 0;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-section-nav button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 14px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-section-nav button:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-strong); }
.admin-section-nav button.active { color: #fff; background: var(--tb-blue-dark); border-color: var(--blue-text); }
.admin-section-nav button:disabled { opacity: 0.48; cursor: not-allowed; }

.admin-panel > section,
.admin-panel > .research-admin-grid > section {
  min-width: 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.admin-panel h2 {
  margin: 0 0 12px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
}

.admin-panel section > p { color: var(--text-secondary); }

.admin-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-state.is-healthy,
.admin-state.is-enabled,
.admin-state.is-completed {
  color: var(--tb-green);
  border-color: color-mix(in srgb, var(--tb-green) 45%, var(--border-subtle));
}

.admin-state.is-degraded,
.admin-state.is-retry_wait,
.admin-state.is-review_required,
.admin-state.is-medium,
.admin-state.is-warning {
  color: var(--tb-amber);
  border-color: color-mix(in srgb, var(--tb-amber) 45%, var(--border-subtle));
}

.admin-state.is-failing,
.admin-state.is-failed,
.admin-state.is-disabled,
.admin-state.is-critical,
.admin-state.is-high,
.admin-state.is-error {
  color: var(--status-error-text);
  border-color: color-mix(in srgb, var(--tb-red) 45%, var(--border-subtle));
}

.admin-state.is-queued,
.admin-state.is-processing,
.admin-state.is-open,
.admin-state.is-reviewing {
  color: var(--blue-text);
  border-color: color-mix(in srgb, var(--tb-blue) 45%, var(--border-subtle));
}

.research-admin-stat.is-error { border-color: color-mix(in srgb, var(--tb-red) 45%, var(--border-subtle)); }
.research-admin-stat.is-warning { border-color: color-mix(in srgb, var(--tb-amber) 45%, var(--border-subtle)); }

.admin-health-list,
.research-admin-list dl { display: grid; gap: 8px; }

.admin-health-list > div,
.research-admin-list dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.research-admin-list dl { margin: 0; }
.research-admin-list dt,
.research-admin-list dd { margin: 0; color: var(--text-secondary); font-size: 12px; }
.research-admin-list article > p { margin: 0; color: var(--status-error-text); font-size: 12px; }

.research-admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.research-admin-stat {
  min-width: 0;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.research-admin-stat strong {
  display: block;
  color: var(--tb-copper);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 1;
}

.research-admin-stat span,
.research-admin-list small,
.research-admin-footnote {
  color: var(--text-secondary);
  font-size: 13px;
}

.research-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.research-admin-grid > section {
  min-width: 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.research-admin-grid h2 {
  margin: 0 0 16px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
}

.research-admin-list {
  display: grid;
  gap: 8px;
}

.research-admin-list article {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.research-admin-list article > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.research-admin-list article > div span {
  color: var(--text-muted);
  font-size: 12px;
}

.research-admin-list footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.research-admin-list footer button {
  min-height: 36px;
  padding: 6px 10px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
}

.research-admin-empty {
  margin: 0;
  color: var(--text-muted);
}

.research-admin-footnote {
  margin-top: 16px;
}

@media (max-width: 980px) {
  .research-admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .research-admin-app { width: calc(100% - 32px); padding: 28px 0 112px; }
  .research-admin-heading { display: grid; }
  .admin-heading-actions { justify-content: space-between; }
  .admin-utility-actions .secondary-button { padding-inline: 10px; }
  .admin-site-header .brand-logo { max-width: 180px; }
  .research-admin-grid { grid-template-columns: 1fr; }
  .research-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Jobs and Projects page artwork — decorative only; functional maps stay isolated. */
.jobs-view .command-bar {
  isolation: isolate;
  grid-template-columns: minmax(500px, 0.92fr) minmax(360px, 1.08fr);
  grid-template-areas:
    "command-title command-map"
    "command-search command-map";
  gap: var(--space-4) var(--space-8);
  background: var(--surface-1);
}

html[data-theme="dark"] .jobs-view .command-bar {
  background: var(--surface-1);
}

.jobs-view .command-copy {
  z-index: 2;
  grid-area: command-title;
  align-self: end;
}

.jobs-view .search {
  z-index: 2;
  grid-area: command-search;
  align-self: start;
}

.jobs-view .command-map-visual {
  position: relative;
  z-index: 1;
  grid-area: command-map;
  min-width: 0;
  min-height: 260px;
  margin: -2.4rem -3.25rem -2.4rem 0;
  overflow: hidden;
  background-color: var(--surface-3);
  background-image:
    linear-gradient(color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  border-left: 1px solid var(--border-subtle);
  pointer-events: none;
  user-select: none;
}

.jobs-view .command-map-visual::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 18%;
  background: linear-gradient(90deg, var(--surface-1), transparent);
}

.jobs-view .command-map-visual .hero-map {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 92%;
  max-height: 88%;
  display: block;
  object-fit: contain;
  object-position: center;
  opacity: 0.82;
  filter: saturate(0.92) contrast(1.04);
  transform: translate(-50%, -50%);
}

.jobs-view .command-map-visual .hero-map-dark {
  display: none;
}

html[data-theme="dark"] .jobs-view .command-map-visual .hero-map-light {
  display: none;
}

html[data-theme="dark"] .jobs-view .command-map-visual .hero-map-dark {
  display: block;
  opacity: 0.78;
  filter: saturate(1.05) contrast(1.08);
}

.projects-view .discovery-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--surface-1);
  background-image:
    linear-gradient(color-mix(in srgb, var(--tb-copper) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--tb-copper) 4%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
}

.projects-view .discovery-header > :not(.project-hero-art) {
  position: relative;
  z-index: 2;
}

.project-hero-art {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: min(48%, 760px);
  overflow: hidden;
  color: var(--tb-copper);
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--tb-copper) 34%, transparent) 0 2px, transparent 3px),
    radial-gradient(circle at 38% 74%, color-mix(in srgb, var(--tb-blue) 28%, transparent) 0 2px, transparent 3px),
    repeating-linear-gradient(150deg, transparent 0 46px, color-mix(in srgb, var(--text-primary) 4%, transparent) 47px 48px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 100%);
}

.project-blueprint-building {
  position: absolute;
  bottom: 12%;
  border: 2px solid currentColor;
  border-bottom-width: 4px;
  background:
    linear-gradient(90deg, transparent 48%, currentColor 49% 51%, transparent 52%),
    repeating-linear-gradient(0deg, transparent 0 26px, currentColor 27px 28px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tb-white) 18%, transparent);
}

.project-blueprint-building::before,
.project-blueprint-building::after {
  content: "";
  position: absolute;
  bottom: -9px;
  width: 16px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
}

.project-blueprint-building::before { left: 18%; }
.project-blueprint-building::after { right: 18%; }

.project-blueprint-building-a {
  right: 10%;
  width: 42%;
  height: 48%;
}

.project-blueprint-building-b {
  right: 48%;
  width: 27%;
  height: 32%;
  color: color-mix(in srgb, var(--tb-blue) 68%, var(--text-primary));
}

.project-blueprint-crane {
  position: absolute;
  top: 18%;
  right: 9%;
  width: 72%;
  height: 2px;
  background: currentColor;
  box-shadow: -3px 6px 0 -1px color-mix(in srgb, var(--tb-copper) 55%, transparent);
}

.project-blueprint-crane::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 24%;
  width: 3px;
  height: 190px;
  background: repeating-linear-gradient(0deg, currentColor 0 6px, transparent 6px 12px);
  border-inline: 1px solid currentColor;
}

.project-blueprint-crane::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 17%;
  width: 1px;
  height: 74px;
  background: currentColor;
  box-shadow: -5px 72px 0 2px currentColor;
}

.project-blueprint-utility {
  position: absolute;
  right: 7%;
  bottom: 7%;
  width: 78%;
  height: 16%;
  border-top: 2px dashed color-mix(in srgb, var(--tb-blue) 68%, var(--text-primary));
  border-bottom: 1px solid color-mix(in srgb, var(--tb-copper) 70%, transparent);
  transform: skewX(-18deg);
}

.projects-view .discovery-header > div:nth-child(2) {
  max-width: 720px;
}

.projects-view .shared-search-form,
.projects-view .context-quick-filters,
.projects-view .secondary-tabs,
.projects-view .active-filter-chips {
  width: min(920px, 100%);
}

/* A true three-column desktop grid with predictable tablet and phone fallbacks. */
.jobs-view .project-list.grid-view {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
}

.jobs-view .project-list.grid-view .job-card-main,
.jobs-view .project-list.grid-view .job-card-side {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Keep the real Leaflet maps in their own fully interactive stacking context. */
.jobs-view .job-map-view,
.projects-view .job-map-view {
  isolation: isolate;
  z-index: 3;
}

.jobs-view .interactive-geographic-map,
.projects-view .interactive-geographic-map {
  pointer-events: auto;
}

@media (max-width: 1280px) {
  .jobs-view .command-bar {
    grid-template-columns: minmax(460px, 1fr) minmax(320px, 0.8fr);
  }

  .jobs-view .project-list.grid-view {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 860px) {
  .jobs-view .command-bar {
    padding: 0 var(--space-6) var(--space-6);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "command-map"
      "command-title"
      "command-search";
    gap: var(--space-5);
  }

  .jobs-view .command-map-visual {
    width: auto;
    min-height: 180px;
    margin: 0 calc(-1 * var(--space-6));
    border-bottom: 1px solid var(--border-subtle);
    border-left: 0;
  }

  .jobs-view .command-map-visual::before {
    inset: auto 0 0;
    width: auto;
    height: 22%;
    background: linear-gradient(0deg, var(--surface-1), transparent);
  }

  .project-hero-art {
    width: 68%;
    opacity: 0.46;
  }
}

@media (max-width: 600px) {
  .jobs-view .command-bar {
    padding: 0 var(--space-4) var(--space-5);
  }

  .jobs-view .command-map-visual {
    min-height: 145px;
    margin-inline: calc(-1 * var(--space-4));
  }

  .jobs-view .project-list.grid-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-hero-art {
    width: 88%;
    opacity: 0.3;
  }
}

.site-header .preference-switch:hover,
.site-header .header-icon-button:hover,
html[data-theme="light"] .site-header .preference-switch:hover,
html[data-theme="light"] .site-header .header-icon-button:hover {
  color: #fff;
  background: #2b343d;
  border-color: #56616d;
}

.header-actions .preference-switches { order: 1; }
.header-actions #global-search-open { order: 2; }

.account-header {
  gap: var(--space-8);
}

.account-heading {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.account-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  color: var(--tb-copper-text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
}

.account-avatar svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.account-preferences {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.account-preferences > span {
  min-width: 0;
  margin-right: auto;
  display: grid;
  gap: 2px;
}

.account-preferences small,
.account-saves-heading p {
  color: var(--text-muted);
}

.account-saves-heading h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
}

@media (max-width: 640px) {
  .account-heading {
    align-items: flex-start;
  }

  .account-preferences {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .account-preferences > span {
    flex-basis: 100%;
  }

  .account-preferences .secondary-button {
    flex: 1 1 120px;
  }

  .mobile-bottom-nav a[data-page-link="account"] span {
    white-space: nowrap;
    font-size: 0.68rem;
  }
}

/* Homepage company activity and platform explanation */
.home-company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.home-company-card {
  min-width: 0;
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: transform var(--motion-normal) ease, border-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}

/* Account, authentication, saves, and alerts */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.account-view {
  min-height: 70vh;
}

.account-app {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 48px 0 96px;
}

.account-loading,
.account-service-error {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.account-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.account-layout > .account-navigation {
  position: sticky;
  top: 104px;
}

.account-side-nav {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.account-side-nav button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font: 600 0.88rem/1.2 Inter, sans-serif;
  text-align: left;
  cursor: pointer;
}

.account-side-nav button:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}

.account-side-nav button[aria-current="page"] {
  color: var(--text-primary);
  background: var(--surface-3);
  border-color: var(--border-strong);
  box-shadow: inset 3px 0 var(--tb-copper);
}

.account-side-nav svg,
.account-section-card svg,
.account-stat svg,
.account-benefit-grid svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-panel {
  min-width: 0;
}

.account-panel-heading {
  margin-bottom: 28px;
}

.account-panel-heading h1,
.account-signed-out h1 {
  max-width: 780px;
  margin: 4px 0 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.2rem, 4vw, 2.75rem);
  line-height: 1.05;
}

.account-panel-heading > p:last-child,
.account-signed-out-copy > p:last-of-type {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
}

.profile-completion {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.profile-completion div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.profile-completion progress {
  width: 100%;
  height: 7px;
  accent-color: var(--tb-copper);
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 28px;
}

.account-stat {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.account-stat svg {
  grid-row: 1 / span 2;
  color: var(--tb-copper-text);
}

.account-stat strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.75rem;
  line-height: 1;
}

.account-stat span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-section-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.account-section-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 20px var(--shadow-color);
  transform: translateY(-1px);
}

.account-section-card > svg {
  width: 22px;
  height: 22px;
  color: var(--tb-copper-text);
}

.account-section-card > span {
  display: grid;
  gap: 4px;
}

.account-section-card strong {
  font: 700 1.1rem/1.15 "Barlow Condensed", sans-serif;
}

.account-section-card small {
  color: var(--text-secondary);
  font: 400 0.82rem/1.45 Inter, sans-serif;
}

.account-section-card b {
  color: var(--tb-copper-text);
}

.account-form {
  display: grid;
  gap: 20px;
}

.account-form fieldset {
  margin: 0;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.account-form legend {
  padding: 0 8px;
  font: 700 1.25rem/1 "Barlow Condensed", sans-serif;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-form label,
.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font: 600 0.82rem/1.3 Inter, sans-serif;
}

.account-form input,
.account-form select,
.auth-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font: 400 0.95rem/1 Inter, sans-serif;
}

.account-form-status,
.auth-form-message {
  min-height: 20px;
  color: var(--tb-green);
  font-size: 0.84rem;
}

.account-form-status.is-error,
.auth-form-message.is-error {
  color: var(--status-error-text);
}

.account-form > .primary-button {
  justify-self: start;
}

.compact-account-form {
  margin-top: 24px;
}

.account-save-tabs {
  margin-bottom: 16px;
}

.application-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.application-filter button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 6px 12px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font: 600 0.82rem/1 Inter, sans-serif;
  cursor: pointer;
}

.application-filter button[aria-pressed="true"] {
  color: #fff;
  background: var(--tb-blue-dark);
  border-color: var(--blue-text);
}

.saved-application-list {
  display: grid;
  gap: 12px;
}

.saved-application-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.saved-application-row > button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.saved-application-row > button > span:first-child {
  display: grid;
  gap: 4px;
}

.saved-application-row > button > .company-logo + span {
  display: grid;
  gap: 4px;
  flex: 1;
}

.saved-application-row > button > span:last-child {
  color: var(--tb-copper);
  font-weight: 600;
}

.saved-application-row small {
  color: var(--text-muted);
}

.saved-application-row label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.saved-application-row select {
  width: 100%;
}

.alert-list {
  display: grid;
  gap: 12px;
}

.account-service-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 16px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--tb-amber) 8%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--tb-amber) 38%, var(--border-subtle));
  border-radius: 8px;
  font-size: 0.84rem;
}

.account-service-notice strong {
  color: var(--text-primary);
}

.alert-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.alert-card h2 {
  margin: 0 0 4px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.3rem;
}

.alert-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.alert-card footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.text-button {
  padding: 4px;
  color: var(--blue-text);
  background: transparent;
  border: 0;
  font: 600 0.84rem/1.2 Inter, sans-serif;
  cursor: pointer;
}

.destructive-text {
  color: var(--status-error-text);
}

.security-list {
  display: grid;
  gap: 12px;
}

.security-list article {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.security-list article > span:first-child {
  display: grid;
  gap: 3px;
}

.security-list small {
  color: var(--text-muted);
}

.account-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.account-danger-zone {
  margin-top: 28px;
  padding: 20px;
  background: color-mix(in srgb, var(--tb-red) 5%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--tb-red) 42%, var(--border-subtle));
  border-radius: 8px;
}

.account-danger-zone h2 {
  margin: 0 0 6px;
  font: 700 1.5rem/1.1 "Barlow Condensed", sans-serif;
}

.account-danger-zone > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--text-secondary);
}

.account-danger-zone label {
  max-width: 360px;
  display: grid;
  gap: 6px;
  margin: 18px 0 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.account-danger-zone input {
  min-height: 44px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0 12px;
}

.destructive-button:not(:disabled) {
  color: #fff;
  background: var(--tb-red-dark);
  border-color: var(--tb-red-dark);
}

.tb-live-data-only .preview-note,
.tb-live-data-only .demo-notice,
.tb-live-data-only .signal-strip {
  display: none !important;
}

.language-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.language-choice button {
  min-height: 112px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 20px;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.language-choice button[aria-pressed="true"] {
  border-color: var(--blue-text);
  box-shadow: inset 3px 0 var(--tb-blue);
}

.language-choice span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.account-signed-out {
  display: grid;
  gap: 32px;
}

.account-signed-out-copy {
  max-width: 860px;
  padding: 32px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tb-copper);
  border-radius: 8px;
}

.account-signed-out-copy > div {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

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

.account-benefit-grid article {
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.account-benefit-grid svg {
  width: 24px;
  height: 24px;
  color: var(--tb-copper-text);
}

.account-benefit-grid h2 {
  margin: 12px 0 5px;
  font-family: "Barlow Condensed", sans-serif;
}

.account-benefit-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-dialog {
  width: min(520px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
}

.auth-dialog::backdrop {
  background: rgb(8 12 16 / 76%);
  backdrop-filter: blur(3px);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 18px 52px rgb(0 0 0 / 35%);
}

.auth-card h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
}

.auth-card > p:not(.eyebrow) {
  margin: 0 0 4px;
  color: var(--text-secondary);
}

.auth-card form {
  display: grid;
  gap: 14px;
}

.auth-card form > .primary-button {
  width: 100%;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1.5rem;
}

.auth-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
}

.auth-switcher button {
  min-height: 40px;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

.auth-switcher button:hover {
  color: var(--text-primary);
  background: var(--surface-3);
}

@media (max-width: 900px) {
  .account-app {
    width: min(100% - 32px, 720px);
    padding-top: 32px;
  }

  .account-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .account-layout > .account-navigation {
    position: static;
    overflow-x: auto;
  }

  .account-side-nav {
    display: flex;
    width: max-content;
    min-width: 100%;
  }

  .account-side-nav button span {
    white-space: nowrap;
  }

  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-app {
    width: calc(100% - 32px);
    padding: 24px 0 88px;
  }

  .account-side-nav button {
    min-width: 48px;
    justify-content: center;
  }

  .account-side-nav button span {
    display: none;
  }

  .account-panel-heading h1,
  .account-signed-out h1 {
    font-size: 2.1rem;
  }

  .account-stats,
  .account-section-grid,
  .account-form-grid,
  .language-choice,
  .account-benefit-grid {
    grid-template-columns: 1fr;
  }

  .account-section-card {
    min-height: 92px;
  }

  .account-signed-out-copy {
    padding: 22px;
  }

  .account-signed-out-copy > div {
    align-items: stretch;
    flex-direction: column;
  }

  .security-list article {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-application-row {
    grid-template-columns: 1fr;
  }

  .alert-card {
    grid-template-columns: 1fr;
  }

  .alert-card footer {
    grid-column: 1;
    flex-wrap: wrap;
  }

  .auth-card {
    padding: 24px 20px;
  }
}

.home-company-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.home-company-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.home-company-identity .company-mark {
  width: 44px;
  height: 48px;
  font-size: 0.75rem;
}

.home-company-identity p,
.home-company-identity h3,
.home-company-identity > div > span {
  margin: 0;
}

.home-company-identity p {
  color: var(--tb-copper-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.home-company-identity h3 {
  margin-top: 2px;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.05;
}

.home-company-identity > div > span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.home-company-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
}

.home-company-card dl > div {
  padding: var(--space-3) var(--space-3) 0 0;
}

.home-company-card dl > div + div {
  padding-left: var(--space-3);
  border-left: 1px solid var(--border-subtle);
}

.home-company-card dt {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.home-company-card dd {
  margin: 2px 0 0;
  color: var(--text-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.home-company-card > button {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  color: var(--tb-copper-text);
  background: transparent;
  border: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.home-company-card > button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--motion-fast) ease;
}

.home-company-card > button:hover svg,
.home-company-card > button:focus-visible svg {
  transform: translateX(2px);
}

.home-platform {
  padding: clamp(24px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 5vw, 64px);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-large);
}

.home-platform-intro h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
}

.home-platform-intro > p:last-child {
  max-width: 460px;
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.home-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.home-platform-grid article {
  min-width: 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-strong);
}

.home-platform-grid article > span {
  color: var(--tb-copper-text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
}

.home-platform-grid h3 {
  margin: 2px 0 var(--space-1);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.home-platform-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
}

.detail-breadcrumb {
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.detail-breadcrumb a,
.detail-breadcrumb button {
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.detail-breadcrumb a:hover,
.detail-breadcrumb a:focus-visible,
.detail-breadcrumb button:hover,
.detail-breadcrumb button:focus-visible {
  color: var(--tb-copper-text);
}

.detail-breadcrumb [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* Complete footer information architecture */
.site-footer {
  border-top: 2px solid var(--tb-copper);
}

.site-footer .footer-inner {
  min-height: 0;
  padding: var(--space-10) 0 var(--space-6);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.8fr);
  gap: var(--space-8);
}

.footer-identity .brand-logo {
  width: 220px;
}

.footer-identity > p {
  margin: var(--space-3) 0 0;
  color: var(--text-primary);
  font-weight: 600;
}

.footer-identity > span {
  max-width: 340px;
  display: block;
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}

.site-footer .footer-links nav {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

.footer-links h2 {
  margin: 0 0 var(--space-1);
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer .footer-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
  color: var(--tb-copper-text);
}

.footer-meta {
  grid-column: 1 / -1;
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.site-footer .footer-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (max-width: 1080px) {
  .home-company-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .home-company-grid,
  .home-platform,
  .home-platform-grid {
    grid-template-columns: 1fr;
  }

  .home-platform {
    gap: var(--space-6);
  }

  .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-meta {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .home-company-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-inner {
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-company-card,
  .home-company-card > button svg {
    transition: none;
  }
}

/* =========================================================
   HOMEPAGE INTELLIGENCE DASHBOARD
   ========================================================= */

.home-view {
  min-height: calc(100dvh - 78px);
  padding: 0 0 var(--space-16);
  background: var(--page-bg);
}

.home-dashboard {
  width: 100%;
  display: grid;
  gap: var(--space-8);
}

.home-dashboard > :not(.home-hero) {
  width: min(var(--content-max), calc(100% - (2 * var(--page-gutter))));
  margin-inline: auto;
}

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: 390px;
  overflow: hidden;
  padding: clamp(48px, 5vw, 64px) max(var(--page-gutter), calc((100% - var(--content-max)) / 2));
  display: grid;
  align-content: center;
  gap: var(--space-6);
  background-color: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}

.home-hero-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: url("./images/hero/tradebastion-hero-night.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

html[data-theme="light"] .home-hero-media {
  background-image: url("./images/hero/tradebastion-hero-day.webp");
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10, 16, 21, 0.94) 0%,
      rgba(10, 16, 21, 0.78) 48%,
      rgba(10, 16, 21, 0.38) 100%
    );
  pointer-events: none;
}

html[data-theme="light"] .home-hero::before {
  background:
    linear-gradient(
      90deg,
      rgba(242, 242, 240, 0.97) 0%,
      rgba(242, 242, 240, 0.82) 48%,
      rgba(242, 242, 240, 0.42) 100%
    );
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tb-copper), transparent);
  opacity: 0.72;
  pointer-events: none;
}

.home-map-image-dark {
  display: block;
}

.home-map-image-light {
  display: none;
}

html[data-theme="light"] .home-map-image-dark {
  display: none;
}

html[data-theme="light"] .home-map-image-light {
  display: block;
}

.home-hero-copy {
  position: relative;
  z-index: 3;
  max-width: 770px;
}

.home-hero-copy .eyebrow {
  margin: 0 0 var(--space-1);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.home-hero-copy .home-hero-lead {
  margin: var(--space-3) 0 0;
  max-width: 680px;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
}

.home-entity-search {
  position: relative;
  z-index: 3;
  max-width: 980px;
  grid-template-columns: 150px minmax(260px, 1.5fr) minmax(210px, 0.8fr) auto;
  background: rgba(21, 26, 31, 0.76);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .home-entity-search {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(13, 13, 13, 0.12);
}

.home-entity-search select {
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

.home-entity-search .primary-button {
  min-width: 112px;
}

.home-quick-discovery {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: thin;
}

.home-quick-discovery > span {
  flex: 0 0 auto;
  margin-right: var(--space-1);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.home-quick-discovery button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 11px;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.home-quick-discovery button:hover,
.home-quick-discovery button:focus-visible {
  color: var(--text-primary);
  background: var(--surface-3);
  border-color: var(--blue-text);
}

.home-feature-grid,
.home-job-grid,
.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.home-feature-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: var(--space-3);
  row-gap: var(--space-3);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  text-align: left;
  cursor: pointer;
  transition: transform var(--motion-normal) ease, border-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}

.home-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--tb-copper);
}

.home-feature-card:hover,
.home-feature-card:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
}

.home-feature-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--tb-copper-text);
  background: color-mix(in srgb, var(--tb-copper) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--tb-copper) 28%, var(--border-subtle));
  border-radius: var(--radius-control);
}

.home-feature-icon svg,
.home-feature-cta svg,
.home-section-link svg,
.home-card-footer button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-feature-copy {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
}

.home-feature-copy strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.05;
}

.home-feature-copy > span {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.45;
}

.home-feature-metric {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-feature-metric b {
  color: var(--text-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
}

.home-feature-cta {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--tb-copper-text);
  font-size: 0.875rem;
  font-weight: 700;
}

.home-feature-cta svg {
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.home-feature-card:hover .home-feature-cta svg,
.home-feature-card:focus-visible .home-feature-cta svg {
  opacity: 1;
  transform: translateX(0);
}

.home-activity-strip,
.home-content-section {
  display: grid;
  gap: var(--space-4);
}

.home-activity-strip {
  padding: var(--space-6);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.home-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.home-section-heading.compact {
  align-items: center;
}

.home-section-heading .section-kicker,
.home-map-copy .section-kicker {
  margin: 0 0 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-section-heading h2,
.home-map-copy h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.home-section-heading > span {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.home-section-link {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--tb-copper-text);
  background: transparent;
  border: 0;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.home-section-link:hover svg,
.home-section-link:focus-visible svg {
  transform: translateX(2px);
}

.home-activity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-subtle);
}

.home-activity-grid article {
  min-width: 0;
  padding: var(--space-4) var(--space-4) 0;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--border-subtle);
}

.home-activity-grid article:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-activity-grid strong {
  color: var(--text-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}

.home-activity-grid span {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-job-card,
.home-project-card {
  min-width: 0;
  padding: var(--space-4);
  display: grid;
  align-content: start;
  gap: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: transform var(--motion-normal) ease, border-color var(--motion-normal) ease, box-shadow var(--motion-normal) ease;
}

.home-job-card:hover,
.home-project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.home-card-top,
.home-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.home-card-top .company-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  font-size: 0.75rem;
}

.home-job-card h3,
.home-project-card h3 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.08;
}

.home-card-company,
.home-card-location {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.home-pay-row {
  padding: var(--space-3);
  display: grid;
  gap: 2px;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.home-pay-row strong {
  color: var(--tb-copper-text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.375rem;
  line-height: 1;
}

.home-pay-row span,
.home-card-facts span {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.home-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.home-card-facts span {
  padding: 4px 7px;
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-small);
  font-weight: 600;
}

.home-card-footer {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.home-card-footer button {
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--tb-copper-text);
  background: transparent;
  border: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.home-reliability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.home-reliability i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
}

.home-reliability.verified { color: var(--status-confirmed-text); }
.home-reliability.probable { color: var(--status-highly-likely-text); }
.home-reliability.emerging { color: var(--status-emerging-text); }

.home-project-card {
  border-top: 3px solid var(--tb-copper);
}

.home-project-card .badges {
  min-height: 25px;
}

.home-project-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.home-project-card dl > div {
  padding: var(--space-2);
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
}

.home-project-card dt {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.home-project-card dd {
  margin: 2px 0 0;
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.home-map-preview {
  min-height: 300px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-large);
}

.home-map-copy {
  z-index: 1;
  padding: clamp(24px, 4vw, 48px);
  align-self: center;
}

.home-map-copy p:not(.section-kicker) {
  max-width: 480px;
  margin: var(--space-3) 0 var(--space-6);
  color: var(--text-secondary);
}

.home-map-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background-color: var(--surface-3);
  background-image:
    linear-gradient(color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.home-map-image {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 92%;
  max-height: 88%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.home-map-summary {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  padding: 8px 10px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--surface-2) 94%, transparent);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-1);
  font-size: 0.75rem;
  font-weight: 600;
}

.home-map-summary strong {
  margin-right: 3px;
  color: var(--text-primary);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.25rem;
}

@media (max-width: 1080px) {
  .home-entity-search {
    grid-template-columns: 140px minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
  }

  .home-job-grid,
  .home-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-job-card:last-child,
  .home-project-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .home-dashboard > :not(.home-hero) {
    width: min(var(--content-max), calc(100% - (2 * var(--space-6))));
  }

  .home-entity-search {
    grid-template-columns: 1fr;
  }

  .home-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-feature-card {
    padding: var(--space-4);
    grid-template-columns: 1fr;
  }

  .home-feature-icon {
    width: 36px;
    height: 36px;
  }

  .home-feature-metric,
  .home-feature-cta {
    grid-column: 1;
  }

  .home-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-activity-grid article:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .home-activity-grid article:nth-child(n + 3) {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 767px) {
  .home-view {
    padding: 0 0 var(--space-12);
  }

  .home-dashboard {
    gap: var(--space-6);
  }

  .home-dashboard > :not(.home-hero) {
    width: calc(100% - (2 * var(--space-4)));
  }

  .home-hero {
    min-height: auto;
    padding: 40px var(--space-4) var(--space-8);
  }

  .home-hero-media {
    background-position: 62% center;
  }

  .home-hero::before {
    background: linear-gradient(180deg, rgba(10, 16, 21, 0.92) 0%, rgba(10, 16, 21, 0.76) 100%);
  }

  html[data-theme="light"] .home-hero::before {
    background: linear-gradient(180deg, rgba(242, 242, 240, 0.94) 0%, rgba(242, 242, 240, 0.78) 100%);
  }

  .home-hero-copy h1 {
    font-size: 2.5rem;
  }

  .home-hero-copy .home-hero-lead {
    font-size: 1rem;
  }

  .home-feature-grid,
  .home-job-grid,
  .home-project-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card {
    min-height: 0;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .home-feature-metric {
    grid-column: 2;
  }

  .home-feature-cta {
    grid-column: 1 / -1;
  }

  .home-feature-cta svg {
    opacity: 1;
    transform: none;
  }

  .home-job-card:last-child,
  .home-project-card:last-child {
    grid-column: auto;
  }

  .home-section-heading {
    align-items: flex-start;
  }

  .home-section-heading h2,
  .home-map-copy h2 {
    font-size: 1.75rem;
  }

  .home-section-link {
    flex: 0 0 auto;
  }

  .home-map-preview {
    grid-template-columns: 1fr;
  }

  .home-map-visual {
    min-height: 250px;
  }
}

@media (max-width: 480px) {
  .home-activity-strip {
    padding: var(--space-4);
  }

  .home-section-heading.compact > span {
    display: none;
  }

  .home-activity-grid strong {
    font-size: 1.875rem;
  }

  .home-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-card-footer button {
    align-self: stretch;
    justify-content: space-between;
  }
}

@media (hover: none) {
  .home-feature-cta svg {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-feature-card,
  .home-job-card,
  .home-project-card,
  .home-feature-cta svg {
    transition: none;
  }
}

@media (max-width: 600px) {
  .site-header {
    position: sticky;
  }

  .header-inner {
    width: calc(100% - 1rem);
    padding: 0;
  }

  .header-inner .brand-logo {
    width: 165px;
  }

  .header-actions {
    gap: 4px;
  }

  .preference-switches {
    gap: 4px;
  }

  .profile-menu {
    display: none;
  }

  .jobs-view .search-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .jobs-view .search-row input + input,
  .jobs-view .search-row button {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #c4cdd4;
  }

  .jobs-view .search-row button {
    width: 100%;
  }

  .home-view {
    padding-block: var(--space-8);
  }

  .home-search-shell h1,
  .discovery-header h1 {
    font-size: 2.5rem;
  }

  .compact-filter-row {
    grid-template-columns: 1fr;
  }

  .discovery-header {
    padding-block: var(--space-8);
  }

  .directory-card-actions {
    align-items: stretch;
  }

  .context-map-view,
  .primary-map-view {
    min-height: 400px;
  }

  .saved-list > button {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .saved-list > button > span:nth-last-child(1) {
    width: 100%;
    margin-left: 0;
  }

  .site-footer {
    margin-bottom: 0;
  }
}

@media (max-width: 860px) {
  .company-profile-header {
    padding: var(--space-4);
    flex-direction: column;
  }

  .company-profile-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .company-profile-actions .secondary-button {
    flex: 1;
  }

  .company-profile-grid {
    grid-template-columns: 1fr;
  }

  .company-profile-panel,
  .company-profile-panel.wide,
  .company-overview-panel,
  .company-snapshot {
    grid-column: 1;
  }

  .company-tag-groups,
  .company-knowledge-grid {
    grid-template-columns: 1fr;
  }

  .company-profile-mark {
    width: 56px;
    height: 64px;
  }

  .company-profile-identity > .company-logo--xl {
    width: 64px;
    height: 64px;
  }

  .company-profile-header h1 {
    font-size: 2.125rem;
  }
}

.map-page .job-map-pin.reliability-4,
.map-page .legend-dot.reliability-4 {
  background: #4e9f68;
}

/* MAP-00: the functional ProjectMap never uses DecorativeUSMap artwork. */
.interactive-geographic-map {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  min-height: inherit;
  background: #dfe5e8;
}

[data-theme="dark"] .interactive-geographic-map {
  background: #111820;
}

.interactive-geographic-map .leaflet-tile-pane {
  filter: saturate(0.45) contrast(1.06);
  transition: filter var(--motion-normal) ease;
}

[data-theme="dark"] .interactive-geographic-map .leaflet-tile-pane {
  filter: grayscale(0.55) saturate(0.5) brightness(0.48) contrast(1.35);
}

.interactive-geographic-map .leaflet-control-attribution {
  max-width: calc(100% - 8px);
  color: #1c2933;
  background: rgba(255, 255, 255, 0.9);
  font: 500 0.6875rem/1.3 Inter, sans-serif;
}

.interactive-geographic-map .leaflet-control-attribution a {
  color: #075f9e;
}

.interactive-geographic-map .leaflet-control-zoom a {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.interactive-geographic-map .leaflet-control-zoom a:hover,
.interactive-geographic-map .leaflet-control-zoom a:focus-visible {
  color: #fff;
  background: var(--brand-accent);
}

.tb-leaflet-icon {
  background: transparent !important;
  border: 0 !important;
}

.tb-project-marker,
.tb-project-cluster {
  --marker-fill: #334155;
  --marker-fg: #fff;
  box-sizing: border-box;
  color: var(--marker-fg) !important;
  font-family: Inter, sans-serif;
}

.tb-project-marker.is-active,
.tb-project-cluster.is-active {
  --marker-fill: #047857;
}

.tb-project-marker.is-emerging,
.tb-project-cluster.is-emerging {
  --marker-fill: #c2410c;
}

.tb-project-marker.is-mixed,
.tb-project-cluster.is-mixed {
  --marker-fill: #334155;
}

.tb-project-marker {
  position: relative;
  width: 38px;
  height: 44px;
  filter: drop-shadow(0 3px 4px rgb(15 23 42 / 42%));
}

.tb-project-marker__shape {
  display: block;
  width: 38px;
  height: 44px;
  overflow: visible;
}

.tb-project-marker__body {
  fill: var(--marker-fill);
  stroke: #fff;
  stroke-width: 2px;
}

.tb-project-marker__building {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tb-project-marker.is-selected {
  filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 5px var(--tb-copper))
    drop-shadow(0 4px 5px rgb(15 23 42 / 52%));
}

.tb-project-marker.is-approximate::after {
  content: "";
  position: absolute;
  inset: -4px -3px -2px;
  border: 2px dashed #f59e0b;
  border-radius: 50%;
  pointer-events: none;
}

.tb-project-cluster {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--marker-fill);
  box-shadow:
    0 0 0 1px rgb(15 23 42 / 35%),
    0 3px 9px rgb(15 23 42 / 38%);
  outline: 4px solid color-mix(in srgb, var(--marker-fill) 24%, transparent);
}

.tb-project-cluster__count {
  color: #fff !important;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 1px 1px rgb(0 0 0 / 25%);
}

.dark .tb-project-marker,
.dark .tb-project-cluster,
[data-theme="dark"] .tb-project-marker,
[data-theme="dark"] .tb-project-cluster {
  color: #fff !important;
}

.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane,
.leaflet-control-container {
  filter: none !important;
}

.tb-project-marker:focus-visible,
.tb-project-cluster:focus-visible,
.leaflet-marker-icon:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .tb-project-marker,
  .tb-project-cluster {
    color: ButtonText !important;
    background: ButtonFace;
    border-color: ButtonText;
    forced-color-adjust: auto;
  }
}

.interactive-geographic-map .leaflet-tooltip {
  padding: 8px 10px;
  color: #fff;
  background: #172431;
  border: 1px solid var(--brand-accent);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-1);
  font: 500 0.75rem/1.4 Inter, sans-serif;
}

.interactive-geographic-map .leaflet-tooltip-top::before {
  border-top-color: var(--brand-accent);
}

.interactive-map-unavailable {
  position: absolute;
  z-index: 8;
  inset: var(--space-4);
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--status-error);
  border-radius: var(--radius-card);
  text-align: center;
}

.interactive-map-unavailable[hidden] {
  display: none;
}

.job-map-view .map-disclaimer {
  z-index: 6;
  top: var(--space-3);
  right: auto;
  bottom: auto;
  left: 56px;
  width: min(470px, calc(100% - 140px));
}

.map-page .map-legend {
  right: auto;
  bottom: 34px;
  left: var(--space-3);
}

.map-page .map-control-stack {
  z-index: 650;
}

.map-page .map-legend {
  z-index: 650;
}

@media (max-width: 767px) {
  .job-map-view .map-disclaimer {
    top: 54px;
    right: var(--space-3);
    left: var(--space-3);
    width: auto;
  }

  .interactive-geographic-map .leaflet-control-attribution {
    font-size: 0.625rem;
  }
}

/* =========================================================
   TRADEBASTION TOKEN-BASED COLOR SYSTEM — LOCKED
   Component colors below resolve only through shared tokens.
   ========================================================= */

html,
body,
main,
.page-view {
  color: var(--text-primary);
  background: var(--page-bg);
}

body {
  transition: background-color 180ms ease, color 180ms ease;
}

.site-header {
  color: var(--text-primary);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;
}

.primary-nav a,
.nav-menu > summary {
  color: var(--text-secondary);
  border-bottom-color: transparent;
}

.primary-nav a:hover,
.nav-menu > summary:hover {
  color: var(--text-primary);
}

.primary-nav a.active {
  color: var(--tb-copper-text);
  border-bottom-color: var(--tb-copper);
}

.preference-switch,
.header-icon-button {
  color: var(--text-secondary);
  background: var(--surface-1);
  border-color: var(--border-subtle);
}

.preference-switch:hover,
.header-icon-button:hover {
  color: var(--text-primary);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.jobs-view,
.directory-view {
  background: var(--page-bg);
}

.jobs-view .command-bar,
.subpage-hero,
.discovery-header {
  color: var(--text-primary);
  background-color: var(--surface-1);
  background-image:
    linear-gradient(color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  border-color: var(--border-subtle);
}

html[data-theme="dark"] .jobs-view .command-bar {
  color: var(--text-primary);
  background-color: var(--surface-1);
  background-image:
    linear-gradient(color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text-primary) 3.5%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  border-color: var(--border-subtle);
}

.jobs-view .command-copy,
html[data-theme="dark"] .jobs-view .command-copy {
  text-shadow: none;
}

.jobs-view .command-copy h1,
.hero-title,
.discovery-header h1,
.subpage-hero h1 {
  color: var(--text-primary);
}

.hero-subtitle,
.command-copy > p:last-child,
.subpage-hero p:last-child,
.discovery-header p {
  color: var(--text-secondary);
}

input,
select,
textarea,
.search-input,
.filter-input,
.compact-filter-row select {
  min-height: 44px;
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  outline: none;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

input::placeholder,
textarea::placeholder,
.search-input::placeholder,
.filter-input::placeholder {
  color: var(--text-muted);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tb-blue) 20%, transparent);
}

.search-row,
.directory-search > div,
.shared-search-form {
  color: var(--text-primary);
  background: var(--input-bg);
  border-color: var(--border-subtle);
  box-shadow: none;
}

.search-row:focus-within,
.directory-search > div:focus-within,
.shared-search-form:focus-within {
  border-color: var(--blue-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tb-blue) 20%, transparent);
}

.search svg {
  stroke: var(--text-muted);
}

.jobs-view .search input,
.directory-search input,
.shared-search-form input {
  color: var(--text-primary);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.report-button,
.primary-button,
.search button,
.jobs-view .search button,
.directory-search button,
.job-card-actions .view-job-button {
  min-height: 44px;
  color: var(--tb-black);
  background: var(--tb-copper);
  border: 1px solid var(--tb-copper);
  border-radius: var(--radius-control);
  box-shadow: none;
}

.report-button:hover,
.primary-button:hover,
.search button:hover,
.jobs-view .search button:hover,
.directory-search button:hover,
.job-card-actions .view-job-button:hover {
  color: var(--tb-white);
  background: var(--tb-copper-hover);
  border-color: var(--tb-copper-hover);
  box-shadow: none;
}

.report-button:active,
.primary-button:active,
.search button:active,
.directory-search button:active,
.job-card-actions .view-job-button:active {
  background: var(--tb-copper-pressed);
  border-color: var(--tb-copper-pressed);
  transform: translateY(1px);
}

.secondary-button,
.back-button,
.watch-button,
.save-job-button {
  color: var(--text-primary);
  background: transparent;
  border-color: var(--border-strong);
}

.secondary-button:hover,
.back-button:hover,
.watch-button:hover,
.save-job-button:hover {
  color: var(--text-primary);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.preference-bar,
.jobs-view .preference-bar,
.filters,
.jobs-view .filters,
.project-feed,
.jobs-view .project-feed,
.rail-panel,
.trust-panel,
.scope-panel,
.project-fact-panel,
.job-detail-section {
  color: var(--text-primary);
  background: var(--surface-2);
  border-color: var(--border-subtle);
}

.preference-tag,
.context-quick-filters button,
.dataset-switcher button,
.quick-filter {
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  box-shadow: none;
}

.preference-tag:hover,
.context-quick-filters button:hover,
.dataset-switcher button:hover,
.quick-filter:hover {
  color: var(--text-primary);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.preference-tag[aria-pressed="true"],
.context-quick-filters button[aria-pressed="true"],
.dataset-switcher button[aria-pressed="true"],
.quick-filter.active {
  color: var(--tb-white);
  background: var(--tb-blue-dark);
  border-color: var(--blue-text);
  box-shadow: none;
}

html[data-theme="light"] .preference-tag[aria-pressed="true"],
html[data-theme="light"] .context-quick-filters button[aria-pressed="true"],
html[data-theme="light"] .dataset-switcher button[aria-pressed="true"],
html[data-theme="light"] .quick-filter.active {
  color: var(--tb-blue-dark);
  background: color-mix(in srgb, var(--tb-blue-dark) 10%, transparent);
}

.view-toggle {
  background: transparent;
  border-color: var(--border-subtle);
}

.view-toggle button {
  color: var(--text-secondary);
  background: transparent;
  border-color: var(--border-subtle);
}

.view-toggle button[aria-pressed="true"],
.view-toggle button.active {
  color: var(--tb-white);
  background: var(--tb-blue-dark);
  border-color: var(--blue-text);
}

.project-card,
.jobs-view .project-card,
.jobs-view .project-list.grid-view .project-card,
.project-directory-card,
.company-directory-card,
.company-grid article,
.report-feed article,
.map-result-card {
  color: var(--text-primary);
  background: var(--card-bg);
  border-color: var(--border-subtle);
  box-shadow: none;
}

.project-card:hover,
.jobs-view .project-card:hover,
.jobs-view .project-list.grid-view .project-card:hover,
.project-directory-card:hover,
.company-directory-card:hover,
.company-grid article:hover,
.report-feed article:hover,
.map-result-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
  transform: translateY(-1px);
}

.project-card.featured,
.jobs-view .project-card.featured,
.jobs-view .project-card.featured:hover {
  border-color: var(--border-subtle);
  box-shadow: inset 4px 0 0 var(--tb-copper);
}

.project-card.selected,
.map-result-card.selected,
[aria-selected="true"].project-card,
[aria-selected="true"].project-directory-card {
  border-color: var(--tb-copper);
}

.jobs-view .job-card-side {
  background: var(--surface-3);
  border-color: var(--border-subtle);
}

.company-mark {
  color: var(--tb-white);
  background: var(--tb-gunmetal);
  border-color: var(--tb-copper);
}

.company-name,
.jobs-view .project-card .location,
.job-card-meta span,
.pay-stack span,
.weekly-estimate span,
.weekly-estimate small,
.freshness span {
  color: var(--text-secondary);
}

.jobs-view .project-card .location strong,
.freshness strong {
  color: var(--text-primary);
}

.pay-stack p,
.compensation-grid div,
.compensation-item {
  background: var(--surface-3);
  border-color: var(--border-subtle);
}

.pay-stack strong,
.weekly-estimate strong,
.weekly-estimate-value,
.compensation-grid strong,
.compensation-value {
  color: var(--tb-copper-text);
}

.job-card-meta strong,
.job-tag,
.detail-chips span {
  color: var(--text-secondary);
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-small);
}

.badge {
  color: var(--text-secondary);
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-small);
}

.badge-live,
.badge-hiring {
  color: var(--status-confirmed-text);
  background: color-mix(in srgb, var(--tb-green) 14%, transparent);
  border-color: color-mix(in srgb, var(--tb-green) 35%, transparent);
}

.badge-permit,
.badge-new,
.badge-status {
  color: var(--status-strong-evidence-text);
  background: color-mix(in srgb, var(--tb-blue) 14%, transparent);
  border-color: color-mix(in srgb, var(--tb-blue) 35%, transparent);
}

.badge-field,
.badge-warning,
.badge-probable {
  color: var(--status-emerging-text);
  background: color-mix(in srgb, var(--tb-amber) 14%, transparent);
  border-color: color-mix(in srgb, var(--tb-amber) 35%, transparent);
}

.badge-confirmed {
  color: var(--status-confirmed-text);
  background: color-mix(in srgb, var(--tb-green) 14%, transparent);
  border-color: color-mix(in srgb, var(--tb-green) 35%, transparent);
}

.badge-possible {
  color: var(--status-strong-evidence-text);
  background: color-mix(in srgb, var(--tb-blue) 14%, transparent);
  border-color: color-mix(in srgb, var(--tb-blue) 35%, transparent);
}

.badge-removed {
  color: var(--text-muted);
  background: var(--surface-1);
  border-color: var(--border-subtle);
}

.activity-dot.hiring {
  background: var(--tb-green);
}

.activity-dot.active {
  background: var(--tb-blue);
}

.activity-dot.upcoming {
  background: var(--tb-amber);
}

.reliability-5,
.confidence:not(.confidence-review):not(.confidence-possible) {
  color: var(--status-confirmed-text);
  border-color: var(--tb-green);
}

.reliability-4 {
  color: var(--status-highly-likely-text);
  border-color: var(--tb-teal);
}

.reliability-3,
.confidence-possible {
  color: var(--status-strong-evidence-text);
  border-color: var(--blue-text);
}

.reliability-2,
.confidence-review {
  color: var(--status-emerging-text);
  border-color: var(--tb-amber);
}

.reliability-1 {
  color: var(--status-error-text);
  border-color: var(--status-error-text);
}

.legend-dot.reliability-5,
.job-map-pin.reliability-5,
.tb-leaflet-marker.reliability-5,
.tb-state-cluster.reliability-5 {
  background: var(--tb-green);
}

.legend-dot.reliability-4,
.job-map-pin.reliability-4,
.tb-leaflet-marker.reliability-4,
.tb-state-cluster.reliability-4 {
  background: var(--tb-teal);
}

.legend-dot.reliability-3,
.job-map-pin.reliability-3,
.tb-leaflet-marker.reliability-3,
.tb-state-cluster.reliability-3 {
  background: var(--tb-blue);
}

.legend-dot.reliability-2,
.job-map-pin.reliability-2,
.tb-leaflet-marker.reliability-2,
.tb-state-cluster.reliability-2 {
  background: var(--tb-amber);
}

.legend-dot.reliability-1,
.job-map-pin.reliability-1,
.tb-leaflet-marker.reliability-1,
.tb-state-cluster.reliability-1 {
  background: var(--tb-red);
}

.project-card.recently-removed,
.jobs-view .project-card.recently-removed,
.card-recently-removed {
  color: var(--text-muted);
  background: var(--surface-1);
  border-color: var(--border-subtle);
  box-shadow: none;
  filter: saturate(0.12);
  opacity: 0.68;
}

.project-card.recently-removed .pay-stack strong,
.project-card.recently-removed .weekly-estimate strong,
.project-card.recently-removed .compensation-value {
  color: var(--text-muted);
}

.interactive-geographic-map {
  background: var(--surface-1);
}

.interactive-geographic-map .leaflet-control-zoom a,
.map-control-stack .icon-button,
.map-legend,
.map-project-preview {
  color: var(--text-primary);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.interactive-geographic-map .leaflet-control-zoom a:hover,
.interactive-geographic-map .leaflet-control-zoom a:focus-visible,
.map-control-stack .icon-button:hover {
  color: var(--tb-white);
  background: var(--tb-blue-dark);
  border-color: var(--blue-text);
}

.site-footer,
.mobile-bottom-nav {
  color: var(--text-primary);
  background: var(--nav-bg);
  border-color: var(--border-subtle);
}

.eyebrow,
.section-kicker {
  color: var(--tb-copper-text);
}

.map-result-card.reliability-5,
.map-result-card.reliability-4,
.map-result-card.reliability-3,
.map-result-card.reliability-2,
.map-result-card.reliability-1 {
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.map-result-card.reliability-5 { border-left-color: var(--tb-green); }
.map-result-card.reliability-4 { border-left-color: var(--tb-teal); }
.map-result-card.reliability-3 { border-left-color: var(--blue-text); }
.map-result-card.reliability-2 { border-left-color: var(--tb-amber); }
.map-result-card.reliability-1 { border-left-color: var(--status-error-text); }

@media (max-width: 900px) {
  .mobile-bottom-nav {
    background: var(--nav-bg);
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-bottom-nav a {
    position: relative;
    color: var(--text-secondary);
    background: transparent;
  }

  .mobile-bottom-nav a.active {
    color: var(--tb-copper-text);
    background: transparent;
  }

  .mobile-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--tb-copper);
    border-radius: var(--radius-micro);
  }
}

/* Keep the global header dark in both themes so the approved logo remains legible. */
.site-header,
html[data-theme="light"] .site-header {
  color: var(--header-text);
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
}

.site-header .primary-nav a,
.site-header .nav-menu > summary,
html[data-theme="light"] .site-header .primary-nav a,
html[data-theme="light"] .site-header .nav-menu > summary {
  color: var(--header-muted);
}

.site-header .primary-nav a:hover,
.site-header .nav-menu > summary:hover,
.site-header .primary-nav a.active,
html[data-theme="light"] .site-header .primary-nav a:hover,
html[data-theme="light"] .site-header .nav-menu > summary:hover,
html[data-theme="light"] .site-header .primary-nav a.active {
  color: var(--header-text);
}

.site-header .primary-nav a.active,
html[data-theme="light"] .site-header .primary-nav a.active {
  color: #dc7a2a;
  border-bottom-color: var(--tb-copper);
}

.site-header .preference-switch,
.site-header .header-icon-button,
html[data-theme="light"] .site-header .preference-switch,
html[data-theme="light"] .site-header .header-icon-button {
  color: var(--header-text);
  background: var(--header-surface);
  border-color: var(--header-border);
}

/* Page hero artwork v2: Jobs mirrors Home; Projects and Account are distinct. */
.jobs-view .command-bar {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  overflow: hidden;
  padding: clamp(42px, 5vw, 64px) max(var(--page-gutter), calc((100% - var(--content-max)) / 2));
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(460px, 1.28fr);
  grid-template-areas: "command-title command-search";
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  color: var(--text-primary);
  background-color: var(--surface-1);
  background-image: none;
  border-radius: 0;
}

html[data-theme="dark"] .jobs-view .command-bar {
  color: var(--text-primary);
  background-color: var(--surface-1);
  background-image: none;
}

.jobs-hero-media,
.project-hero-media,
.account-hero-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
  user-select: none;
}

.projects-view .discovery-header > .project-hero-media,
.account-view .account-header > .account-hero-media {
  position: absolute;
  z-index: 0;
}

.jobs-hero-media {
  background-image: url("./images/hero/tradebastion-hero-night.webp");
}

html[data-theme="light"] .jobs-hero-media {
  background-image: url("./images/hero/tradebastion-hero-day.webp");
}

.jobs-view .command-bar::before,
.projects-view .discovery-header::before,
.account-view .account-header::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.jobs-view .command-bar::before {
  background: linear-gradient(90deg, rgba(10, 16, 21, 0.94) 0%, rgba(10, 16, 21, 0.78) 52%, rgba(10, 16, 21, 0.46) 100%);
}

html[data-theme="light"] .jobs-view .command-bar::before {
  background: linear-gradient(90deg, rgba(242, 242, 240, 0.97) 0%, rgba(242, 242, 240, 0.84) 52%, rgba(242, 242, 240, 0.58) 100%);
}

.jobs-view .command-bar::after,
.projects-view .discovery-header::after,
.account-view .account-header::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tb-copper), transparent);
  opacity: 0.78;
  pointer-events: none;
}

.jobs-view .command-copy {
  position: relative;
  z-index: 3;
  grid-area: command-title;
}

.jobs-view .search {
  position: relative;
  z-index: 3;
  grid-area: command-search;
}

.jobs-view .search > label {
  color: var(--text-primary);
}

.projects-view .discovery-header,
.account-view .account-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--text-primary);
  background-color: var(--surface-1);
  background-image: none;
}

.project-hero-media {
  background-image: url("./images/hero/tradebastion-projects-hero-v2.webp");
  background-position: center right;
}

.projects-view .discovery-header::before {
  background: linear-gradient(90deg, rgba(7, 13, 19, 0.97) 0%, rgba(7, 13, 19, 0.89) 48%, rgba(7, 13, 19, 0.48) 100%);
}

html[data-theme="light"] .projects-view .discovery-header::before {
  background: linear-gradient(90deg, rgba(242, 242, 240, 0.98) 0%, rgba(242, 242, 240, 0.93) 48%, rgba(242, 242, 240, 0.62) 100%);
}

.projects-view .discovery-header > :not(.project-hero-media),
.account-view .account-header > :not(.account-hero-media) {
  position: relative;
  z-index: 3;
}

.projects-view .discovery-header > div:nth-child(2) {
  max-width: 720px;
}

.projects-view .shared-search-form,
.projects-view .context-quick-filters,
.projects-view .secondary-tabs,
.projects-view .active-filter-chips {
  width: min(920px, 100%);
}

.account-view .account-header {
  min-height: 470px;
  align-content: center;
}

.account-hero-media {
  background-image: url("./images/hero/tradebastion-account-hero-v1.webp");
  background-position: center right;
}

.account-view .account-header::before {
  background: linear-gradient(90deg, rgba(7, 12, 17, 0.98) 0%, rgba(7, 12, 17, 0.9) 52%, rgba(7, 12, 17, 0.45) 100%);
}

html[data-theme="light"] .account-view .account-header::before {
  background: linear-gradient(90deg, rgba(242, 242, 240, 0.98) 0%, rgba(242, 242, 240, 0.94) 52%, rgba(242, 242, 240, 0.64) 100%);
}

.account-view .account-heading,
.account-view .account-preferences,
.account-view .account-saves-heading,
.account-view .secondary-tabs {
  width: min(760px, 68%);
}

.account-view .account-preferences {
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
  .jobs-view .command-bar {
    min-height: 420px;
    padding: var(--space-10) var(--page-gutter);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "command-title"
      "command-search";
    gap: var(--space-6);
  }

  .jobs-hero-media {
    background-position: 64% center;
  }

  .jobs-view .command-bar::before {
    background: rgba(10, 16, 21, 0.8);
  }

  html[data-theme="light"] .jobs-view .command-bar::before {
    background: rgba(242, 242, 240, 0.86);
  }

  .project-hero-media,
  .account-hero-media {
    background-position: 66% center;
  }

  .projects-view .discovery-header::before,
  .account-view .account-header::before {
    background: rgba(7, 12, 17, 0.82);
  }

  html[data-theme="light"] .projects-view .discovery-header::before,
  html[data-theme="light"] .account-view .account-header::before {
    background: rgba(242, 242, 240, 0.88);
  }

  .account-view .account-heading,
  .account-view .account-preferences,
  .account-view .account-saves-heading,
  .account-view .secondary-tabs {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .jobs-view .command-bar {
    width: calc(100% - 1rem);
    min-height: 440px;
    padding: var(--space-8) var(--space-4);
  }

  .jobs-view .command-copy h1 {
    font-size: clamp(2.35rem, 12vw, 3.3rem);
  }

  .projects-view .discovery-header,
  .account-view .account-header {
    padding-inline: var(--space-4);
  }

  .account-view .account-header {
    min-height: 520px;
  }
}

/* Interactive map repair: compact pins, readable labels, and mobile-safe controls. */
.interactive-geographic-map .tb-leaflet-icon-shell {
  overflow: visible;
  background: transparent;
  border: 0;
}

.interactive-geographic-map .tb-leaflet-marker {
  --marker-fill: var(--tb-blue);
  position: relative;
  width: 40px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 4px 5px rgba(5, 12, 18, 0.38));
  font: 800 0.75rem/1 Inter, sans-serif;
}

.interactive-geographic-map .tb-leaflet-marker::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 2px;
  left: 4px;
  width: 30px;
  height: 30px;
  background: var(--marker-fill);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 14%;
  transform: rotate(-45deg);
}

.interactive-geographic-map .tb-leaflet-marker b {
  position: relative;
  top: -5px;
  color: #fff !important;
  font-size: 0.75rem;
}

.interactive-geographic-map .tb-leaflet-marker.reliability-5,
.interactive-geographic-map .tb-state-cluster.reliability-5 { --marker-fill: var(--tb-green); }

.interactive-geographic-map .tb-leaflet-marker.reliability-4,
.interactive-geographic-map .tb-state-cluster.reliability-4 { --marker-fill: var(--tb-teal); }

.interactive-geographic-map .tb-leaflet-marker.reliability-3,
.interactive-geographic-map .tb-state-cluster.reliability-3 { --marker-fill: var(--tb-blue); }

.interactive-geographic-map .tb-leaflet-marker.reliability-2,
.interactive-geographic-map .tb-state-cluster.reliability-2 { --marker-fill: var(--tb-amber); }

.interactive-geographic-map .tb-leaflet-marker.reliability-1,
.interactive-geographic-map .tb-state-cluster.reliability-1 { --marker-fill: var(--tb-red); }

.interactive-geographic-map .tb-leaflet-marker.approximate {
  width: 40px;
  height: 48px;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  opacity: 0.9;
}

.interactive-geographic-map .tb-leaflet-marker.approximate::before {
  border-style: dashed;
}

.interactive-geographic-map .tb-leaflet-marker.selected {
  background: transparent !important;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 5px var(--tb-copper)) drop-shadow(0 5px 6px rgba(5, 12, 18, 0.45));
  transform: translateY(-2px) scale(1.08);
}

.interactive-geographic-map .tb-leaflet-marker .activity-dot {
  z-index: 2;
  right: 0;
  bottom: 8px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
}

.interactive-geographic-map .tb-state-cluster {
  --marker-fill: var(--tb-blue);
  position: relative;
  width: 54px;
  height: 54px;
  min-height: 0;
  padding: 6px;
  display: grid;
  grid-template-rows: auto auto;
  place-content: center;
  place-items: center;
  gap: 1px;
  color: #fff !important;
  background: var(--marker-fill) !important;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--tb-copper), 0 6px 14px rgba(5, 12, 18, 0.4);
  font-family: Inter, sans-serif;
}

.interactive-geographic-map .tb-state-cluster::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  background: var(--marker-fill);
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}

.interactive-geographic-map .tb-state-cluster strong,
.interactive-geographic-map .tb-state-cluster b {
  position: relative;
  z-index: 1;
  color: #fff !important;
  line-height: 1;
}

.interactive-geographic-map .tb-state-cluster strong {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

.interactive-geographic-map .tb-state-cluster b {
  font-size: 1rem;
}

.interactive-geographic-map .tb-state-cluster .activity-dot {
  position: absolute;
  z-index: 2;
  right: -2px;
  top: -2px;
  width: 11px;
  height: 11px;
  background: var(--tb-green);
  border: 2px solid #fff;
}

@media (max-width: 767px) {
  .map-page {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .map-page .map-canvas-panel {
    position: relative;
    padding-bottom: 0;
  }

  .map-page .primary-map-view {
    height: clamp(360px, 58dvh, 440px);
    min-height: 0;
  }

  .map-page .interactive-geographic-map {
    min-height: 0;
  }

  .map-page .map-control-stack {
    top: 56px;
    right: 10px;
    gap: 7px;
  }

  .map-page .map-control-stack .icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 9px;
  }

  .map-page .map-control-stack svg {
    width: 18px;
    height: 18px;
  }

  .map-page .map-legend {
    right: auto;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-width: calc(100% - 76px);
    border-radius: var(--radius-control);
  }

  .map-page .map-legend summary {
    min-height: 42px;
    padding: 0 13px;
    font-size: 0.875rem;
  }

  .map-page .map-legend[open] {
    width: min(210px, calc(100% - 76px));
  }

  .map-page .map-legend > div {
    max-height: 245px;
    overflow-y: auto;
  }

  .map-project-preview {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

/* Gate 1 data states keep the approved cards and controls. */
.discovery-pagination { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding-block:16px; color:var(--text-secondary); }
.discovery-pagination p { margin:0; flex:1 1 240px; }
.discovery-pagination [hidden] { display:none; }
[data-worker-reports="disabled"] :is([data-dialog-open],[data-card-action="report"],[data-job-action="report"],[data-company-action="report"],[data-company-profile-action="report"]) { display:none !important; }
[data-tooltip]::after { visibility:hidden; }
[data-tooltip]:is(:hover,:focus-visible,[aria-expanded="true"])::after { visibility:visible; }
.approximate-map-area { fill:var(--tb-blue); fill-opacity:.10; stroke:var(--tb-blue); stroke-dasharray:4 4; }
.company-grid article, .project-card, .project-directory-card, .map-result-card { min-width:0; overflow-wrap:anywhere; }

/* Decorative disclosure glyphs must not become stray screen-reader text. */
.filter-group > summary::after { content:"+" / ""; }
.filter-group[open] > summary::after { content:"−" / ""; }
/* Protected operations console; public layouts unchanged. */
#research-admin-app .admin-operation-form { display:grid; gap:16px; max-width:760px; margin:20px 0; }
#research-admin-app .admin-control { display:grid; gap:8px; min-width:0; }
#research-admin-app .admin-control input,
#research-admin-app .admin-control select,
#research-admin-app .admin-control textarea { width:100%; min-width:0; min-height:44px; padding:12px; color:inherit; background:var(--surface, #202a32); border:1px solid #67727b; border-radius:6px; font:inherit; box-sizing:border-box; }
#research-admin-app button { min-height:44px; }
#research-admin-app .admin-record-preview { max-width:100%; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
#research-admin-app .admin-queue-row p { overflow-wrap:anywhere; }
#research-admin-app .admin-section-nav { overflow-x:auto; flex-wrap:nowrap; max-width:100%; }
#research-admin-app .admin-section-nav button { flex-shrink:0; padding:10px 14px; }
#research-admin-app .admin-toggle { display:flex; align-items:center; gap:12px; min-height:44px; }
#research-admin-app .admin-toggle input { width:24px; height:24px; }
#research-admin-app summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
#research-admin-app :is(input,textarea,select,button):focus-visible { outline:3px solid #4fa3db; outline-offset:3px; }
@media(max-width:768px) {
 #research-admin-app .research-admin-grid { grid-template-columns:minmax(0,1fr); }
 #research-admin-app .research-admin-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #research-admin-app .admin-operation-form { width:100%; }
 #research-admin-app .admin-control :is(input,textarea,select) { font-size:16px; }
 #research-admin-app .admin-queue-row { min-width:0; }
}

/* Menu-only theme settings; native selection supports touch and keyboard. */
.theme-picker { display:grid; gap:8px; min-width:0; padding:12px; color:var(--text-primary); font-size:14px; line-height:1.4; }
.theme-picker > span:first-child { font-weight:600; }
.theme-picker select { width:100%; min-width:0; min-height:44px; padding:10px; border:1px solid var(--border-subtle); border-radius:8px; background:var(--surface-1); color:var(--text-primary); font:inherit; font-size:16px; cursor:pointer; }
.theme-picker select:focus-visible { outline:3px solid var(--tb-copper); outline-offset:2px; }
.theme-picker .theme-help { font-size:14px; color:var(--text-secondary); white-space:normal; }
.mobile-menu-actions .theme-picker { grid-column:1 / -1; border:1px solid var(--border-subtle); border-radius:var(--radius-control); background:var(--surface); }

/* Shared authenticated report / inquiry intake. */
#report-dialog { max-height: 90dvh; overflow-y: auto; }
#website-inquiry-form select, #website-inquiry-form input[type="text"], #website-inquiry-form textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; font: inherit; }
#website-inquiry-form button { min-height: 44px; }
#website-inquiry-form .inquiry-consent { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem 0; }
#inquiry-consent { flex-shrink: 0; width: 24px; height: 24px; }
#inquiry-status { overflow-wrap: anywhere; }

.project-inquiry-panel { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; }
.project-inquiry-panel p { max-width: 72ch; }
.project-inquiry-panel button { min-height: 44px; white-space: normal; }

/* Reviewed project imagery: reserve space, preserve the whole image and its caption. */
.project-site-image { margin: 0 0 24px; min-width: 0; }
.project-site-image img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; aspect-ratio: 16 / 9; background: var(--surface, #18212a); border-radius: 10px; }
.project-site-image figcaption, .project-image-credit, .project-source small { display: block; font-size: .875rem; line-height: 1.5; margin-top: 6px; overflow-wrap: anywhere; }
.project-site-image-compact { margin: 12px 0 16px; }
.project-site-image-compact img { max-height: 210px; }
.project-source a, .project-image-credit { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.project-description { line-height: 1.7; overflow-wrap: anywhere; }
.project-image-unavailable { font-size: .875rem; }

/* Reviewed company locations wrap on narrow screens and link to their source. */
.company-location-list { display:flex; flex-wrap:wrap; gap:8px; }
.company-location-list a, .company-location-list > span { display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px; min-height:44px; max-width:100%; padding:8px 12px; overflow-wrap:anywhere; border:1px solid var(--border); border-radius:6px; }
.company-location-list small { font:inherit; }

/* Section 12: shared responsive and accessible interaction rules. */
body :is(button,summary,input:not([type="checkbox"]):not([type="radio"]),select) { min-height:var(--tap-target) !important; }
body :is(button,summary,.icon-button) { min-width:var(--tap-target) !important; }
body .map-control-stack .icon-button { min-width:44px; min-height:44px; }
body :is(.eyebrow,.section-kicker,.home-feature-cta,.home-card-footer button,.home-company-identity p) { color:var(--tb-copper-text); }
body :is(.eyebrow,.section-kicker) { font-size:.875rem; }
body :is(input,select,textarea):focus-visible { outline:3px solid var(--focus-color); outline-offset:3px; }
.field-validation-error { display:block; color:var(--status-error-text); font-size:1rem; margin-top:6px; }
.directory-filter-dialog { position:fixed; width:min(520px,calc(100vw - 32px)); padding:24px; color:var(--text-primary); background:var(--surface-2); border:1px solid var(--border-strong); border-radius:12px; }
.directory-filter-dialog h2 { padding-right:48px; margin-top:0; }
.directory-filter-close { position:absolute; right:12px; top:12px; }
.directory-filter-content { display:grid; gap:16px; margin-bottom:20px; }
.directory-filter-content .compact-filter-row { display:grid; grid-template-columns:minmax(0,1fr); }
.directory-filter-content .context-quick-filters { flex-wrap:wrap; overflow:visible; }
.directory-filter-content .context-quick-filters button { white-space:normal; }
.directory-filter-dialog > .primary-button { margin:8px; }
.directory-filter-trigger { margin-top:12px; }
:is(button, input, select, textarea, summary, a, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
}
:is(button, summary, .icon-button, .preference-switch, .secondary-tabs > *, .account-side-nav button) {
  min-height: var(--tap-target);
}
:is(.icon-button, .header-icon-button, .map-control-stack .icon-button, .save-button) {
  min-width: var(--tap-target);
  min-height: var(--tap-target);
}
:is(.job-card, .project-card, .company-card, .account-panel, .directory-heading, .home-section-heading, .job-detail-heading, .card-header, .job-compensation) > * { min-width: 0; }
:is(h1,h2,h3,h4,p,dd,.badges,.detail-chips,.location,.source-meta,.job-source,.account-panel,.job-detail-content,.company-profile-panel) { overflow-wrap: anywhere; }
:is(.badges,.detail-chips,.job-detail-actions,.directory-controls,.account-save-tabs) { flex-wrap: wrap; }
:is(.badge,.status-badge,.reliability-badge,.pay-value,.compensation-value) { max-width:100%; white-space:normal; }
dialog { max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); overflow-y:auto; overscroll-behavior:contain; }
dialog :is(input,select,textarea) { width:100%; min-width:0; }
.filter-checkbox-grid label:has(input[type="checkbox"]), .filter-group-body label:has(input[type="checkbox"]) { min-height:44px; align-items:center; }
.table-scroll { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
:is(input,textarea,select) { border-color:var(--border-strong); }
@media(max-width:767px) {
  .home-section-heading { flex-wrap:wrap; gap:12px; }
  .account-side-nav { overflow-x:auto; padding:6px; }
  .account-side-nav button { flex-shrink:0; }
  .account-save-tabs { overflow:visible; }
  .job-detail-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  :is(.job-detail-footer,.account-section-heading,.profile-form-actions) { flex-wrap:wrap; }
  .leaflet-control-zoom a { min-width:44px; min-height:44px; line-height:44px; }
  .jobs-view .search-row #job-search-location-top { grid-column:1 / -1; width:100%; }
  .account-side-nav { width:100%; min-width:0; }
  .account-side-nav button span { display:inline; white-space:normal; }
  .account-side-nav { flex-wrap:wrap; }
}
@media(max-width:430px) {
  .header-inner { width:calc(100% - 32px); gap:8px; flex-wrap:wrap; }
  .header-inner .brand { min-width:0; flex:1 1 128px; }
  .header-inner .brand-logo { width:100%; max-width:180px; height:auto; }
  .header-actions { flex:0 0 auto; }
  .preference-switch { padding-inline:8px; }
}
@media(max-height:500px) {
  .site-header { position:relative; }
  .mobile-bottom-nav { position:static; }
  body { padding-bottom:0; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; }
}
@media(forced-colors:active) {
  :is(button,input,select,textarea) { border:1px solid ButtonText; }
  :focus-visible { outline-color:Highlight; }
}

/* Clear destination language; readable at every header breakpoint. */
#language-toggle { width:auto; min-width:76px; min-height:44px; padding:8px 10px; flex-shrink:0; }
#language-toggle .language-name { font-size:14px; font-weight:700; line-height:1.25; white-space:nowrap; }

.skip-link { color:#0d0d0d; }

/* The location field must fill the sidebar as well as the mobile sheet. */
#location-query { width:100%; min-width:0; }

.directory-controls label { min-width:0; max-width:100%; flex-wrap:wrap; }
.directory-controls select { min-width:0; max-width:100%; }

/* Semantic status tokens retain readable contrast on light surfaces. */
html[data-theme="light"] { --tb-blue:#1d4ed8; --tb-green:#116c37; --tb-teal:#16755b; --tb-amber:#8a5a00; --tb-red:#b52b27; }
.job-detail-header { --blue-text:#93c5fd; --status-confirmed-text:#b9f2d2; --status-highly-likely-text:#72dcb8; --status-strong-evidence-text:#93c5fd; --status-emerging-text:#fbbf24; }
.company-inline-link,.company-detail-list article > b,.saved-application-row > button > span:last-child { color:var(--tb-copper-text); }

.text-action { color:var(--tb-copper-text); }
.jobs-view .filters { scroll-padding-bottom:100px; }
.jobs-view .filters :is(input,select,summary,button) { scroll-margin-block:90px; }

@media(max-height:600px) { .job-detail-header { position:static; } }

/* Visible checkbox glyphs sit inside the larger padded label target. */
input[type="checkbox"],input[type="radio"] { width:24px; min-width:24px; height:24px; min-height:24px !important; flex:0 0 24px; }
label:has(> input[type="checkbox"]),label:has(> input[type="radio"]) { min-height:44px; }

.site-header .primary-nav .nav-menu > summary { min-height:77px !important; }

@media(min-width:1024px) { .jobs-view .mobile-filter-close { display:none; } }

.compare-header,.job-detail-header { --tb-copper-text:#ee9b53; }
.site-footer .footer-links a { transition:none; }
