/* =========================================================
   DASHBOARD NAVIGATION
========================================================= */

.dash-topnav {
  height: 76px;
  background: #084392;
  color: #fff;
  position: relative;
  z-index: 50;
}

.dash-nav-container {
  width: min(calc(100% - 80px), 1120px);
  height: 100%;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* ---------- Brand ---------- */

.dash-topnav-brand {
  display: flex;
  align-items: center;
  gap: 8px;

  width: max-content;

  color: #fff;
  text-decoration: none;
}

.brand-logo {
  width: 66px;
  height: 62px;
  object-fit: contain;
  flex-shrink: 0;
}

.dash-topnav-brand .brand-name {
  color: #fff;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
}

.dash-topnav-brand .accent {
  color: #ffc400;
}

/* ---------- Center Navigation ---------- */

.dash-nav-links {
  height: 100%;

  display: flex;
  align-items: stretch;

  gap: 5px;
}

.dash-nav-links a {
  position: relative;

  min-width: 135px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.95);

  font-size: 14px;
  font-weight: 500;

  text-decoration: none;
}

.dash-nav-links a.active::after {
  content: "";

  position: absolute;

  left: 17px;
  right: 17px;
  bottom: 0;

  height: 4px;

  background: #ffc400;
}

/* ---------- Right Buttons ---------- */

.dash-topnav-actions {
  justify-self: end;

  display: flex;
  align-items: center;
  gap: 13px;
}

.dash-topnav-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 38px;

  padding: 9px 18px;

  border-radius: 5px;

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;

  border: 1px solid transparent;
  transition: box-shadow 0.15s;
}

.dash-topnav-actions .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
}

.dash-topnav-actions .btn-solid-gold {
  background: #ffc400;
  color: #032b69;
}

.dash-topnav-actions .btn-outline-light.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 12px 2px rgba(255, 255, 255, 0.7);
}

.dash-topnav-actions .btn-solid-gold.active {
  box-shadow: 0 0 0 2px rgba(255, 196, 0, 0.35), 0 0 12px 2px rgba(255, 196, 0, 0.9);
}
:root {
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --page-bg: #f1f5f9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.an-hero {
  padding: 22px 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.an-hero h1 {
  margin: 0;
  font-size: 20px;
  color: var(--blue-900);
  font-weight: 800;
}
.an-hero p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: #000;
}

.an-page {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 20px;
}
.an-section {
  margin-bottom: 20px;
}
.an-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.an-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.an-section-header h2 {
  margin: 0;
  font-size: 16px;
}
.an-section-header p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.an-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.an-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.an-card h4 {
  margin: 0 0 12px;
  font-size: 13.5px;
}

/* Ranked list rows -- rank badge, name, bar, share, count.
   Graded emphasis from rank 1 downward; the fade stops at a readable grey so
   the last row still meets contrast. */
.an-rank-head,
.an-rank-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.35fr) minmax(48px, 1fr) 52px 64px;
  align-items: center;
  gap: 10px;
}
.an-rank-head {
  padding-bottom: 7px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.an-rank-head span:nth-child(4),
.an-rank-head span:nth-child(5) {
  text-align: right;
}
.an-rank-row {
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
}
.an-rank-row:last-of-type {
  border-bottom: none;
}
.an-rank-row:hover {
  background: #f8fafc;
}

.an-rank-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--blue-600);
  color: #fff;
}
.an-rank-row.t1 .an-rank-num {
  background: var(--blue-900);
}
.an-rank-row.t3 .an-rank-num {
  background: #93b4f7;
}
.an-rank-row.t4 .an-rank-num {
  background: #dbeafe;
  color: var(--blue-700);
}

.an-rank-name {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.3;
}
/* Without this the label overflows its grid cell and runs under the bar in the
   narrow three-across cards (e.g. "Netherlands", "Waiter/Waitress"). */
.an-rank-name > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.an-rank-row.t1 .an-rank-name,
.an-rank-row.t2 .an-rank-name {
  font-weight: 700;
  color: var(--blue-700);
}
.an-rank-row.t4 .an-rank-name {
  color: #64748b;
}

.an-rank-track {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #e8f0fe;
  overflow: hidden;
}
.an-rank-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--blue-600);
}
.an-rank-row.t1 .an-rank-fill {
  background: var(--blue-900);
}
.an-rank-row.t4 .an-rank-fill {
  background: #93b4f7;
}

.an-rank-share {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-600);
}
.an-rank-row.t4 .an-rank-share {
  color: #64748b;
  font-weight: 600;
}
.an-rank-count {
  text-align: right;
  font-size: 12px;
  color: #475569;
}

/* The ranked lists live in cards of different widths at the same viewport
   (two-across for land-based, three-across for sea-based), so the bar column
   is dropped on CARD width rather than screen width. */
.an-card {
  container-type: inline-size;
}
@container (max-width: 470px) {
  .an-rank-head,
  .an-rank-row {
    grid-template-columns: 22px minmax(0, 1fr) 50px 62px;
    gap: 8px;
  }
  .an-rank-head span:nth-child(3),
  .an-rank-row .an-rank-track {
    display: none;
  }
}

.section-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

@media (max-width: 800px) {
  .an-grid-3 {
    grid-template-columns: 1fr;
  }
}

.an-summary-bar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.an-summary-bar strong {
  font-size: 22px;
  color: var(--blue-700);
}
.an-summary-bar span {
  font-size: 12.5px;
  color: var(--muted);
}
.an-summary-change {
  font-size: 12.5px;
  font-weight: 700;
}
.an-summary-change.up {
  color: #15803d;
}
.an-summary-change.down {
  color: #b91c1c;
}

.an-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .an-grid-2 {
    grid-template-columns: 1fr;
  }
}

.an-agency-table {
  width: 100%;
  border-collapse: collapse;
}
.an-agency-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
.an-agency-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.an-status-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.an-status-tag.Accredited {
  background: #dcfce7;
  color: #15803d;
}
.an-status-tag.Needs-Review {
  background: #fef3c7;
  color: #b45309;
}
.an-status-tag.Suspended {
  background: #fee2e2;
  color: #b91c1c;
}
.an-status-tag.Delisted {
  background: #f1f5f9;
  color: #475569;
}
.an-btn-outline {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}
.an-risk-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .an-risk-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .an-risk-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.an-risk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px 10px;
  transition: box-shadow 0.15s ease;
}
.an-risk-card:hover {
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.09);
}

.an-risk-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 9px;
  min-height: 32px;
}
.an-risk-card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  min-width: 0;
}
.an-risk-card-name .an-flag {
  margin-right: 0;
  flex-shrink: 0;
}
.an-risk-card-rank {
  flex-shrink: 0;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--page-bg);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.an-risk-card-score {
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.an-risk-card-score span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Linear meter -- the score read against its full 0-100 range. Paired with the
   numeric value above it, never standing in for it. */
.an-risk-meter {
  height: 5px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  margin: 8px 0 9px;
}
.an-risk-meter-fill {
  height: 100%;
  border-radius: 999px;
}


@media (max-width: 1050px) {
  .home-nav-links a {
    min-width: auto;
    padding: 0 14px;
  }

  .hero-person-img {
    right: -60px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 650px;
  }

  .laptop {
    width: 440px;
  }
}
.home-nav-links {
  order: 3;

  width: 100%;
  height: 42px;
}

.home-nav-links a {
  flex: 1;
}

@media (max-width: 850px) {
  .dash-topnav {
    height: auto;
  }

  .dash-nav-container {
    width: calc(100% - 30px);

    padding: 12px 0;

    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .dash-topnav-actions {
    margin-left: auto;
  }

  .dash-nav-links {
    order: 3;

    width: 100%;
    height: 42px;
  }

  .dash-nav-links a {
    flex: 1;
    min-width: auto;
  }
}

@media (max-width: 600px) {
  .dash-topnav-brand .brand-name {
    font-size: 18px;
  }

  .brand-logo {
    width: 52px;
    height: 48px;
  }

  .dash-topnav-actions {
    gap: 6px;
  }

  .dash-topnav-actions .btn {
    padding: 8px 10px;
    font-size: 11px;
  }
}

/* =========================================================
   CHARTS  (plain SVG -- see dashboard.js for the validated palette)
========================================================= */

.an-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
/* Grid and axes stay recessive so the bars carry the reading. */
.an-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}
.an-axis-line {
  stroke: #cbd5e1;
  stroke-width: 1;
}
.an-axis {
  fill: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}
.an-bar-value {
  fill: var(--ink, #0f172a);
  font-size: 15px;
  font-weight: 800;
}
.an-bar-label {
  fill: #64748b;
  font-size: 12.5px;
}
.an-bar-label.strong {
  fill: var(--ink, #0f172a);
  font-weight: 700;
}
.an-bar-g {
  cursor: default;
}
.an-bar-g:hover path {
  opacity: 0.85;
}

.an-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: #475569;
  font-weight: 600;
}
.an-chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.an-chart-total {
  margin-top: 12px;
  background: #1e3a8a;
  color: #fff;
  border-radius: 10px;
  padding: 11px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.an-chart-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
}

/* ---------- donut ---------- */
.an-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.an-donut {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.an-donut-total {
  fill: var(--ink, #0f172a);
  font-size: 24px;
  font-weight: 800;
}
.an-donut-cap {
  fill: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.an-donut-side {
  flex: 1;
  min-width: 180px;
}
.an-donut-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
}
.an-donut-row:last-of-type {
  border-bottom: none;
}
.an-donut-row i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 3px;
}
.an-donut-row > div {
  flex: 1;
}
.an-donut-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
.an-donut-row-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}
.an-donut-compare {
  margin-top: 10px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
}
.an-donut-compare-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.an-donut-compare strong {
  display: block;
  font-size: 14px;
  margin-top: 3px;
  color: var(--blue-900, #1e3a8a);
}
.an-donut-delta {
  font-size: 12.5px;
  font-weight: 700;
}
.an-donut-delta.up {
  color: #15803d;
}
.an-donut-delta.down {
  color: #b91c1c;
}

/* ---------- shared tooltip ---------- */
.an-chart-tip {
  position: absolute;
  z-index: 200;
  display: none;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.45;
  max-width: 260px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}
.an-tip-muted {
  color: #cbd5e1;
}

/* ---------- country flags ---------- */
.an-flag {
  width: 20px;
  height: auto;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 1px solid #e2e8f0;
}
.an-risk-card-name .an-flag {
  margin-right: 6px;
}

/* ---------- Section A layout: hiring over sex, region alongside ---------- */
.an-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  /* start, not stretch: the region list is naturally shorter than the two
     stacked charts, and stretching its 8 rows to fill 780px leaves them
     floating in whitespace. It ends at its own height instead. */
  align-items: start;
}
.an-overview-col {
  display: grid;
  grid-template-rows: auto auto;
  gap: 16px;
  min-width: 0;
}
.an-card-region {
  min-width: 0;
}

@media (max-width: 1000px) {
  .an-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- By Place of Origin: ranked region table ---------- */
.an-region-head,
.an-region-row {
  display: grid;
  /* Both flexible columns get a real minimum so the bar cannot be squeezed to
     a dot when the card is narrow. */
  grid-template-columns: 26px minmax(92px, 1.1fr) minmax(64px, 1fr) 56px 70px;
  align-items: center;
  gap: 10px;
}
.an-region-head {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}
.an-region-head span:nth-child(4),
.an-region-head span:nth-child(5) {
  text-align: right;
}
.an-region-row {
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  cursor: default;
}
.an-region-row:last-of-type {
  border-bottom: none;
}
.an-region-row:hover {
  background: #f8fafc;
}

.an-region-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.an-region-rank.top {
  background: #1e3a8a;
}

.an-region-name {
  font-size: 13.5px;
  color: var(--ink, #0f172a);
  min-width: 0;
}
.an-region-name.strong {
  font-weight: 700;
}
.an-region-name em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 1px;
}

.an-region-track {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}
.an-region-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2563eb;
}
.an-region-fill.top {
  background: #1e3a8a;
}

.an-region-share {
  text-align: right;
  font-size: 13.5px;
  font-weight: 700;
  color: #2563eb;
}
.an-region-count {
  text-align: right;
  font-size: 13.5px;
  color: var(--ink, #0f172a);
}

@container (max-width: 400px) {
  .an-region-head,
  .an-region-row {
    grid-template-columns: 26px 1fr 56px 70px;
    gap: 8px;
  }
  .an-region-head span:nth-child(3),
  .an-region-row .an-region-track {
    display: none;
  }
}

/* Pointer from the public agency list to the portal's profile/comparison
   feature. The list itself stays public and unlinked. */
.an-login-hint {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.an-login-hint a {
  color: var(--blue-600, #2563eb);
  font-weight: 600;
}
