/* Dashboard */

.dashboard-shell {
  display: grid;
  gap: 16px;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-hero-card,
.dashboard-story-card,
.dashboard-card,
.dashboard-doc-card {
  border: 1px solid #d5e3ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  box-shadow: 0 10px 24px rgba(16, 47, 67, 0.06);
}

.dashboard-hero-card {
  padding: 14px;
}

.dashboard-link-card {
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-link-card:hover {
  transform: translateY(-1px);
  border-color: #b8cfdb;
  box-shadow: 0 12px 26px rgba(16, 47, 67, 0.09);
}

.dashboard-hero-card strong,
.dashboard-doc-card strong,
.dashboard-gap-card strong {
  display: block;
  font-size: 1.8rem;
  color: var(--sea-900);
  margin: 6px 0;
}

.dashboard-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #58758a;
}

.dashboard-hero-card p,
.dashboard-insight-card p,
.dashboard-doc-card p,
.dashboard-story-lead,
.dashboard-anomaly-note {
  margin: 0;
  color: #4f6778;
  line-height: 1.45;
}

.dashboard-story-card {
  padding: 16px;
}

.dashboard-story-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.dashboard-story-header h3,
.dashboard-card-header h4,
.dashboard-insight-card h4 {
  margin: 4px 0 0;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.dashboard-insight-card {
  padding: 14px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: #fff;
}

.dashboard-anomaly-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e0d6bc;
  border-left: 4px solid #d9b46b;
  border-radius: 10px;
  background: #fcf8ef;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-card {
  position: relative;
  padding: 16px;
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.dashboard-geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.dashboard-geo-map {
  border: 1px solid #d9e6ee;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(0deg, transparent, transparent 23%, rgba(111, 149, 168, 0.12) 24%),
    repeating-linear-gradient(90deg, transparent, transparent 23%, rgba(111, 149, 168, 0.12) 24%);
}

.dashboard-geo-map svg {
  display: block;
  width: 100%;
  height: auto;
}

.dashboard-map-label {
  fill: #113d52;
  font-size: 2.6px;
  font-weight: 700;
  pointer-events: none;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f2f7;
  color: #31566b;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-rank-list,
.dashboard-profile-groups,
.dashboard-timeline-list {
  display: grid;
  gap: 12px;
}

.dashboard-rank-item {
  display: grid;
  gap: 6px;
}

.dashboard-rank-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: #244359;
}

.dashboard-rank-track {
  height: 10px;
  border-radius: 999px;
  background: #e8f1f5;
  overflow: hidden;
}

.dashboard-rank-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3f7f9a 0%, #164c68 100%);
}

.dashboard-rank-item small,
.dashboard-gap-card small {
  color: #658091;
}

.dashboard-profile-groups section {
  border-top: 1px solid #e2edf3;
  padding-top: 10px;
}

.dashboard-profile-groups section:first-child {
  border-top: 0;
  padding-top: 0;
}

.dashboard-profile-groups h5 {
  margin: 0 0 8px;
  color: #204055;
}

.dashboard-profile-panel {
  padding: 14px;
  border: 1px solid #dce7ee;
  border-radius: 14px;
  background: #fbfdff;
}

.dashboard-pie-card-profile {
  grid-template-columns: 96px minmax(0, 1fr);
  padding: 0 0 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.dashboard-pie-chart.dashboard-pie-chart-sm {
  width: 96px;
  height: 96px;
}

.dashboard-pie-chart.dashboard-pie-chart-sm span {
  font-size: 0.92rem;
}

.dashboard-pie-chart.dashboard-pie-chart-sm span strong {
  font-size: 0.9rem;
}

.dashboard-pie-chart.dashboard-pie-chart-sm span em {
  font-size: 0.68rem;
}

.dashboard-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8e6ee;
  border-radius: 999px;
  background: #fff;
  color: #244359;
}

.dashboard-metric-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 10px;
}

.dashboard-metric-chip em {
  font-style: normal;
  color: #58758a;
  font-weight: 700;
}

.dashboard-timeline-list {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.dashboard-toggle-group {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #edf4f8;
}

.dashboard-toggle {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #446577;
  padding: 7px 12px;
  font-weight: 700;
}

.dashboard-toggle.is-active {
  background: linear-gradient(180deg, var(--sea-700) 0%, var(--sea-800) 100%);
  color: #fff;
}

.dashboard-timeline-panel {
  display: none;
}

.dashboard-timeline-panel.is-active {
  display: block;
}

.dashboard-series-list {
  display: grid;
  gap: 10px;
}

.dashboard-series-item {
  display: grid;
  grid-template-columns: minmax(96px, 120px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: #fff;
}

.dashboard-series-label {
  color: #27475d;
  font-weight: 700;
}

.dashboard-series-bar {
  height: 10px;
  border-radius: 999px;
  background: #e8f1f5;
  overflow: hidden;
}

.dashboard-series-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d1a14d 0%, #8d6322 100%);
  border-radius: 999px;
}

.dashboard-series-item strong {
  color: #183f55;
}

.dashboard-timeline-item,
.dashboard-gap-card,
.dashboard-doc-card {
  padding: 12px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: #fff;
}

.dashboard-timeline-item span,
.dashboard-gap-card span {
  display: block;
  color: #5a7384;
}

.dashboard-timeline-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  color: #173d54;
}

.dashboard-gap-grid,
.dashboard-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dashboard-gap-focus {
  margin-bottom: 14px;
}

.dashboard-pie-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: #fff;
}

.dashboard-pie-card-compact {
  margin-bottom: 14px;
}

.dashboard-pie-chart {
  --dashboard-pie-known: 50%;
  --dashboard-pie-fill: conic-gradient(#1b5c7a 0 var(--dashboard-pie-known), #d9b46b var(--dashboard-pie-known) 100%);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 44%, transparent 45% 100%),
    var(--dashboard-pie-fill);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.dashboard-pie-chart span {
  display: inline-block;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #23475d;
}

.dashboard-pie-chart span strong {
  display: block;
  font-size: 1rem;
}

.dashboard-pie-chart span em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5b7485;
}

.dashboard-pie-legend h5 {
  margin: 0 0 6px;
  color: #204055;
}

.dashboard-pie-legend p {
  margin: 0 0 10px;
  color: #4f6778;
}

.dashboard-pie-legend ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.dashboard-pie-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #325367;
}

.dashboard-inline-link {
  color: #23475d;
  text-decoration: none;
  font-weight: 600;
  flex: 1;
}

.dashboard-inline-link:hover {
  text-decoration: underline;
}

.dashboard-pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dashboard-pie-dot.is-known {
  background: #1b5c7a;
}

.dashboard-pie-dot.is-unknown {
  background: #d9b46b;
}

.dashboard-diving-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-diving-metric {
  padding: 12px;
  border: 1px solid #dce7ee;
  border-radius: 12px;
  background: #fff;
}

.dashboard-diving-metric p {
  margin: 4px 0 0;
  color: #4f6778;
  line-height: 1.45;
}

.dashboard-diving-states {
  border-top: 1px solid #e2edf3;
  padding-top: 12px;
}

.dashboard-diving-states h5 {
  margin: 0 0 10px;
  color: #204055;
}

.dashboard-doc-card {
  box-shadow: none;
}

.dashboard-embed-section {
  margin: 18px 0;
}

.dashboard-embed-lead {
  margin: 0 0 14px;
}

.dashboard-embed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.dashboard-embed-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  padding-bottom: 48px;
  border: 1px solid #d6e5ee;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 252, 0.92)),
    #fff;
  box-shadow: 0 12px 30px rgba(12, 48, 68, 0.08);
}

.dashboard-embed-card-header {
  gap: 38px;
}

.dashboard-embed-card--horizontal {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 18px 54px;
}

.dashboard-embed-card--horizontal .dashboard-embed-card-intro {
  padding-right: 42px;
  border-right: 0;
}

.dashboard-embed-card--horizontal .dashboard-chart-description {
  margin: -2px 0 6px;
  padding-right: 42px;
  border-right: 0;
}

.dashboard-embed-card-chart {
  grid-column: 1;
  grid-row: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-embed-card-chart .dashboard-column-chart,
.dashboard-embed-card-chart .dashboard-stacked-chart {
  flex: 1;
}

.dashboard-embed-card h4 {
  margin: 0;
  color: #183f55;
  line-height: 1.15;
}

.dashboard-chart-description,
.dashboard-empty-chart {
  margin: 8px 0 12px;
  color: #526c7d;
  line-height: 1.45;
}

.dashboard-bar-chart,
.dashboard-stacked-chart {
  display: grid;
  gap: 8px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.95fr) minmax(120px, 2fr) 54px;
  gap: 10px;
  align-items: center;
  min-height: 30px;
  color: #173d54;
  text-decoration: none;
}

.dashboard-bar-chart--horizontal .dashboard-bar-row {
  grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 2fr) 58px;
}

.dashboard-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.dashboard-bar-track {
  display: block;
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eef4;
  box-shadow: inset 0 1px 2px rgba(8, 42, 61, 0.1);
}

.dashboard-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a5575, #2f8aa1);
}

.dashboard-bar-row strong {
  color: #183f55;
  text-align: right;
}

.dashboard-column-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78px, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 250px;
  overflow-x: auto;
  padding: 36px 4px 2px;
}

.dashboard-column-group {
  min-width: 78px;
  display: grid;
  grid-template-rows: 160px 42px;
  align-items: end;
  color: #173d54;
  text-align: center;
  text-decoration: none;
}

.dashboard-column-bars {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  padding: 0 3px;
  border-bottom: 1px solid #cddfe9;
}

.dashboard-column-bar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: min(34px, 70%);
  min-height: 0;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #2f8aa1, #0a5575);
  box-shadow: 0 6px 12px rgba(10, 85, 117, 0.16);
}

.dashboard-column-bar--secondary {
  background: linear-gradient(180deg, #d9b46b, #b77b35);
}

.dashboard-column-bars--stacked {
  position: relative;
  align-items: end;
  overflow: visible;
}

.dashboard-column-bar--stacked {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  overflow: hidden;
  background: #e4eef4;
}

.dashboard-column-bar-segment {
  display: block;
  width: 100%;
  min-height: 0;
}

.dashboard-column-bar-label {
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, 50%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 35, 51, 0.45);
  white-space: nowrap;
  pointer-events: none;
}

.dashboard-column-bar-segment--localized {
  background: linear-gradient(180deg, #2fa4b9, #0b6f89);
}

.dashboard-column-bar-segment--not-localized {
  background: linear-gradient(180deg, #d9b46b, #b77b35);
}

.dashboard-column-bar i {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  color: #173d54;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-column-label {
  display: block;
  margin-top: 7px;
  color: #23475d;
  font-size: 0.8rem;
  line-height: 1.15;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
  align-self: start;
}

.dashboard-stacked-row {
  display: grid;
  gap: 5px;
  padding: 8px 0;
  border-bottom: 1px solid #e7f0f5;
}

.dashboard-stacked-row:last-child {
  border-bottom: 0;
}

.dashboard-stacked-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #173d54;
  font-weight: 700;
}

.dashboard-stacked-track {
  display: flex;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4eef4;
}

.dashboard-stacked-track span {
  display: block;
  height: 100%;
}

.dashboard-stacked-localized {
  background: linear-gradient(90deg, #0b6f89, #2fa4b9);
}

.dashboard-stacked-not-localized {
  background: linear-gradient(90deg, #d9b46b, #b77b35);
}

.dashboard-stacked-row small {
  color: #5a7384;
  line-height: 1.35;
}

.dashboard-stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  color: #526c7d;
  font-weight: 700;
  font-size: 0.86rem;
}

.dashboard-stacked-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-stacked-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dashboard-embed-source {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid #e2edf3;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: right;
}

.dashboard-embed-source a {
  color: #5a7384;
  text-decoration: none;
}

.dashboard-embed-source a:hover,
.dashboard-embed-source a:focus-visible {
  color: #0b5574;
  text-decoration: underline;
}

.dashboard-embed-copy {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  border: 1px solid #b8cfdd;
  border-radius: 50%;
  background: #f3f9fc;
  color: #0b5574;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(11, 85, 116, 0.12);
}

.dashboard-embed-copy:hover,
.dashboard-embed-copy:focus-visible,
.dashboard-embed-copy.is-copied {
  background: #0b5574;
  color: #fff;
}

.dashboard-embed-copy.is-copied {
  width: auto;
  min-width: 76px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.dashboard-embed-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(217, 180, 107, 0.22), transparent 28%),
    linear-gradient(135deg, #eef8fb, #ffffff);
}

.dashboard-embed-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 16px;
}

.dashboard-embed-card--standalone {
  min-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

.dashboard-embed-card--standalone .dashboard-bar-chart,
.dashboard-embed-card--standalone .dashboard-column-chart,
.dashboard-embed-card--standalone .dashboard-stacked-chart {
  flex: 1;
}

@media (max-width: 800px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-story-header { grid-template-columns: 1fr; }
  .dashboard-geo-layout { grid-template-columns: 1fr; }
  .dashboard-series-item { grid-template-columns: 1fr; }
  .dashboard-pie-card { grid-template-columns: 1fr; justify-items: start; }
  .dashboard-embed-grid { grid-template-columns: 1fr; }
  .dashboard-embed-card--horizontal {
    grid-template-columns: 1fr;
  }
  .dashboard-embed-card--horizontal .dashboard-embed-card-intro,
  .dashboard-embed-card--horizontal .dashboard-chart-description {
    border-right: 0;
    padding-right: 0;
  }
  .dashboard-embed-card-chart {
    grid-column: 1;
    grid-row: auto;
  }
  .dashboard-bar-row,
  .dashboard-bar-chart--horizontal .dashboard-bar-row {
    grid-template-columns: minmax(0, 1fr) 54px;
  }
  .dashboard-bar-track {
    grid-column: 1 / -1;
  }
  .dashboard-column-chart {
    grid-auto-columns: minmax(72px, 1fr);
  }
}
