/* =========================================================
   WEBDOCS ASG DIRECTORY ANALYTICS
   Version: 2.2.1-readiness-meter-clean
   Page: /directory/analytics

   Purpose:
   - Dedicated public analytics presentation layer.
   - Full-width control-panel layout.
   - Compact visual sections.
   - No legacy analytics overrides.
   - Global header/footer remain owned by asg-directory.css.
   ========================================================= */

.directory-analytics-page {
  --analytics-bg: #e9eef4;
  --analytics-surface: #ffffff;
  --analytics-surface-soft: #f5f8fb;
  --analytics-surface-muted: #eef3f7;
  --analytics-ink: #17283b;
  --analytics-ink-strong: #071423;
  --analytics-muted: #6b7d90;
  --analytics-muted-strong: #40566d;
  --analytics-line: #ccd7e3;
  --analytics-line-strong: #b8c7d6;
  --analytics-blue: #2563eb;
  --analytics-blue-soft: #eaf1ff;
  --analytics-cyan: #0787a4;
  --analytics-cyan-soft: #e6f7fb;
  --analytics-green: #148b60;
  --analytics-green-soft: #e7f7ef;
  --analytics-gold: #b17a12;
  --analytics-gold-soft: #fff4db;
  --analytics-orange: #c76518;
  --analytics-orange-soft: #fff0e4;
  --analytics-red: #c93636;
  --analytics-red-soft: #fff0f0;
  --analytics-indigo: #4f46e5;
  --analytics-indigo-soft: #efefff;
  --analytics-violet: #7c3aed;
  --analytics-violet-soft: #f3edff;
  --analytics-slate: #65788d;
  --analytics-dark: #071423;
  --analytics-dark-2: #0b1c2f;
  --analytics-dark-3: #10243a;
  --analytics-radius-sm: 8px;
  --analytics-radius-md: 12px;
  --analytics-radius-lg: 16px;
  --analytics-shadow: 0 1px 2px rgba(7, 20, 35, 0.04), 0 10px 28px rgba(7, 20, 35, 0.045);
  --analytics-gutter: clamp(18px, 1.5vw, 112px);
  --analytics-gap: clamp(12px, 0.85vw, 24px);
  --analytics-section-space: clamp(28px, 2vw, 60px);
  width: 100%;
  margin: 0;
  background: var(--analytics-bg);
  color: var(--analytics-ink);
}

.directory-analytics-page *,
.directory-analytics-page *::before,
.directory-analytics-page *::after {
  box-sizing: border-box;
}

.directory-analytics-page .analytics-console {
  width: 100%;
  max-width: none;
  overflow: clip;
  background: var(--analytics-bg);
}

.directory-analytics-page .analytics-console > section {
  width: 100%;
  max-width: none;
}

.directory-analytics-page .analytics-console :where(h1, h2, h3, p) {
  margin-top: 0;
}

.directory-analytics-page .analytics-console :where(a, button) {
  -webkit-tap-highlight-color: transparent;
}

.directory-analytics-page .analytics-console :where(a, button):focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

/* =========================================================
   INTRO
   ========================================================= */

.analytics-console-head {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, 0.55fr);
  gap: clamp(28px, 2.4vw, 84px);
  align-items: center;
  padding: clamp(34px, 3vw, 88px) var(--analytics-gutter);
  overflow: hidden;
  border-bottom: 1px solid #20384f;
  color: #eaf2fb;
  background:
    linear-gradient(rgba(110, 145, 181, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 145, 181, 0.08) 1px, transparent 1px),
    linear-gradient(112deg, #071423 0%, #0a1b2e 55%, #10243a 100%);
  background-size: 40px 40px, 40px 40px, auto;
}

.analytics-console-intro {
  min-width: 0;
}

.analytics-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.76rem;
  color: #8299af;
}

.analytics-breadcrumbs a {
  color: #b8cadb;
  text-decoration: none;
}

.analytics-breadcrumbs a:hover {
  color: #ffffff;
}

.analytics-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 10px;
  border: 1px solid #294760;
  border-radius: 999px;
  background: #0b1c2f;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #91b9ff;
}

.analytics-kicker i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6fd2a5;
  box-shadow: 0 0 0 5px rgba(111, 210, 165, 0.1);
}

.analytics-console-head h1 {
  max-width: 1480px;
  margin-bottom: 16px;
  font-size: clamp(2.45rem, 2.9vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
  color: #ffffff;
}

.analytics-console-head p {
  max-width: 1160px;
  margin-bottom: 22px;
  font-size: clamp(0.96rem, 0.9vw, 1.25rem);
  line-height: 1.58;
  color: #a9bed1;
}

.analytics-intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.analytics-primary-link,
.analytics-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.analytics-primary-link {
  border: 1px solid #5b91ee;
  background: #2563eb;
  color: #ffffff;
}

.analytics-primary-link:hover {
  background: #1e55ca;
  border-color: #77a5f6;
}

.analytics-secondary-link {
  border: 1px solid #31506d;
  background: #0c2034;
  color: #d7e4f0;
}

.analytics-secondary-link:hover {
  border-color: #4f7090;
  background: #112a44;
  color: #ffffff;
}

.analytics-support-link {
  gap: 7px;
  border-color: #3a5b78;
}

.analytics-support-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.analytics-header-help {
  border-color: rgba(126, 165, 204, 0.5);
}

/* =========================================================
   LIVE SUMMARY
   ========================================================= */

.analytics-live-summary {
  min-width: 0;
  padding: clamp(18px, 1.25vw, 30px);
  border: 1px solid #2b465f;
  border-radius: 12px;
  background: rgba(11, 29, 48, 0.88);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.analytics-live-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.analytics-live-summary-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8fd9b7;
}

.analytics-live-summary-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fd2a5;
  box-shadow: 0 0 0 5px rgba(111, 210, 165, 0.1);
}

.analytics-live-summary-head small {
  font-size: 0.62rem;
  color: #8098ae;
}

.analytics-live-summary > strong {
  display: block;
  margin-bottom: 5px;
  font-size: clamp(2.8rem, 3vw, 5.3rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  color: #ffffff;
}

.analytics-live-summary > p {
  margin: 0 0 18px;
  font-size: 0.72rem;
  color: #96abc0;
}

.analytics-hero-spectrum {
  position: relative;
  margin: 4px 0 14px;
  overflow: hidden;
  border: 1px solid #26435d;
  border-radius: 9px;
  background:
    linear-gradient(rgba(76, 124, 163, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 124, 163, 0.09) 1px, transparent 1px),
    linear-gradient(180deg, rgba(9, 29, 48, 0.96), rgba(7, 22, 38, 0.96));
  background-size: 100% 25%, 12.5% 100%, auto;
}

.analytics-hero-spectrum svg {
  display: block;
  width: 100%;
  height: clamp(92px, 7vw, 142px);
  overflow: visible;
}

.analytics-spectrum-area {
  fill: url(#analyticsSpectrumAreaGradient);
}

.analytics-spectrum-line,
.analytics-spectrum-signal {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-spectrum-line {
  stroke: url(#analyticsSpectrumLineGradient);
  stroke-width: 4;
}

.analytics-spectrum-signal {
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2;
  stroke-dasharray: 3 18;
  opacity: 0;
}

.analytics-spectrum-point {
  fill: #ffffff;
  stroke: #46d9b6;
  stroke-width: 4;
}

.analytics-hero-spectrum.is-rising .analytics-spectrum-signal {
  opacity: 0.82;
  animation: analytics-spectrum-flow 2.4s linear infinite;
}

.analytics-hero-spectrum.is-rising .analytics-spectrum-point {
  animation: analytics-spectrum-pulse 1.8s ease-out infinite;
}

.analytics-hero-spectrum.is-falling .analytics-spectrum-line {
  filter: saturate(0.72);
}

.analytics-spectrum-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-top: 1px solid #26435d;
  font-size: 0.59rem;
  line-height: 1.35;
  color: #91a8bc;
}

.analytics-spectrum-meta > span:first-child {
  color: #c4d5e5;
}

.analytics-hero-spectrum.is-rising .analytics-spectrum-meta > span:first-child {
  color: #7ce1b6;
}

.analytics-hero-spectrum.is-falling .analytics-spectrum-meta > span:first-child {
  color: #f0b687;
}

.analytics-spectrum-meta strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

@keyframes analytics-spectrum-flow {
  to { stroke-dashoffset: -84; }
}

@keyframes analytics-spectrum-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(70, 217, 182, 0)); }
  45% { filter: drop-shadow(0 0 9px rgba(70, 217, 182, 0.9)); }
}

.analytics-live-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.analytics-live-summary-metrics > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid #29435d;
  border-radius: 7px;
  background: #0a192a;
}

.analytics-live-summary-metrics span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: #71889f;
}

.analytics-live-summary-metrics strong {
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #dce7f1;
  overflow-wrap: anywhere;
}

/* =========================================================
   KPI STRIP
   ========================================================= */

.analytics-kpi-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  padding: 1px 0;
  border-bottom: 1px solid var(--analytics-line-strong);
  background: var(--analytics-line-strong);
}

.analytics-kpi-strip article {
  position: relative;
  min-width: 0;
  min-height: 124px;
  padding: 17px 16px;
  background: #ffffff;
}

.analytics-kpi-strip article:first-child {
  padding-left: var(--analytics-gutter);
}

.analytics-kpi-strip article:last-child {
  padding-right: var(--analytics-gutter);
}

.analytics-kpi-strip article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--analytics-blue);
}

.analytics-kpi-strip article:nth-child(2)::before { background: var(--analytics-cyan); }
.analytics-kpi-strip article:nth-child(3)::before { background: var(--analytics-green); }
.analytics-kpi-strip article:nth-child(4)::before { background: var(--analytics-indigo); }
.analytics-kpi-strip article:nth-child(5)::before { background: var(--analytics-gold); }
.analytics-kpi-strip article:nth-child(6)::before { background: var(--analytics-violet); }
.analytics-kpi-strip article:nth-child(7)::before { background: var(--analytics-green); }
.analytics-kpi-strip article:nth-child(8)::before { background: var(--analytics-cyan); }

.analytics-kpi-strip span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--analytics-muted);
}

.analytics-kpi-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 1.4vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--analytics-ink-strong);
}

.analytics-kpi-strip small {
  display: block;
  max-width: 220px;
  font-size: 0.62rem;
  line-height: 1.38;
  color: var(--analytics-muted);
}

/* =========================================================
   SHARED ANALYTICS TYPOGRAPHY
   ========================================================= */

.analytics-console .panel-kicker {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--analytics-blue);
}

.analytics-panel-head {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.analytics-panel-head > div:first-child {
  max-width: 1260px;
}

.analytics-panel-head h2 {
  margin-bottom: 6px;
  font-size: clamp(1.55rem, 1.55vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--analytics-ink-strong);
}

.analytics-panel-head p {
  max-width: 960px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.52;
  color: var(--analytics-muted);
}

.analytics-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.analytics-card-head > div {
  min-width: 0;
}

.analytics-card-head h2,
.analytics-card-head h3 {
  margin: 0 0 5px;
  font-size: clamp(1rem, 1vw, 1.45rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--analytics-ink-strong);
}

.analytics-card-head p {
  max-width: 620px;
  margin: 0;
  font-size: 0.69rem;
  line-height: 1.45;
  color: var(--analytics-muted);
}

.analytics-card-score {
  flex: 0 0 auto;
  font-size: clamp(1.5rem, 1.55vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--analytics-green);
}

/* =========================================================
   FIRST VISUAL ROW
   ========================================================= */

.analytics-visual-section {
  width: 100%;
  padding: var(--analytics-section-space) var(--analytics-gutter);
  border-bottom: 1px solid var(--analytics-line-strong);
  background: #f7f9fb;
}

.analytics-insight-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr) minmax(0, 1.08fr);
  gap: var(--analytics-gap);
  align-items: stretch;
}

.analytics-visual-card,
.analytics-panel {
  min-width: 0;
  border: 1px solid var(--analytics-line);
  border-radius: var(--analytics-radius-md);
  background: var(--analytics-surface);
  box-shadow: var(--analytics-shadow);
}

.analytics-visual-card {
  padding: clamp(17px, 1.15vw, 26px);
}

.analytics-verification-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.analytics-verification-card .analytics-donut-layout {
  align-self: center;
  width: 100%;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 2vw, 42px);
}


.analytics-verification-card .analytics-donut-shell {
  align-self: center;
}

.analytics-verification-card .analytics-donut-copy {
  align-self: center;
}

.analytics-readiness-card {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
}

.analytics-readiness-card .analytics-meter-grid {
  align-self: center;
}

/* =========================================================
   DONUTS
   ========================================================= */

.analytics-donut-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(160px, 1.2fr);
  gap: 18px;
  align-items: center;
}

.analytics-donut-layout-compact {
  grid-template-columns: minmax(150px, 0.82fr) minmax(150px, 1.18fr);
  gap: 14px;
}

.analytics-donut-shell {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.analytics-donut-shell-small {
  width: min(100%, 225px);
}

.analytics-donut-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-donut-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 48%;
  text-align: center;
  pointer-events: none;
}

.analytics-donut-center strong {
  font-size: clamp(1.15rem, 1.15vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--analytics-ink-strong);
}

.analytics-donut-center span {
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--analytics-muted);
}

.analytics-donut-copy {
  min-width: 0;
}

.analytics-donut-copy > small {
  display: block;
  margin-top: 8px;
  font-size: 0.61rem;
  line-height: 1.4;
  color: var(--analytics-muted);
}

.analytics-donut-legend {
  display: grid;
  gap: 8px;
}

.analytics-donut-legend .distribution-row {
  min-width: 0;
}

.analytics-donut-legend .distribution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.analytics-donut-legend .distribution-head strong {
  min-width: 0;
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--analytics-muted-strong);
  overflow-wrap: anywhere;
}

.analytics-donut-legend .distribution-head span {
  flex: 0 0 96px;
  font-size: 0.59rem;
  font-weight: 800;
  color: var(--analytics-muted);
  min-width: 96px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.analytics-donut-legend .distribution-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e9f0;
}

.analytics-donut-legend .distribution-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--analytics-blue);
  transition: width 500ms ease;
}

/* =========================================================
   READINESS METERS
   ========================================================= */

.analytics-meter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1vw, 22px);
  align-items: center;
}

.analytics-meter {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px 5px;
  text-align: center;
}

.analytics-meter-shell {
  position: relative;
  width: min(100%, clamp(160px, 9vw, 215px));
  aspect-ratio: 1;
  margin: 0 auto 4px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.analytics-meter-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-meter-shell strong {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--analytics-ink-strong);
  font-size: clamp(1.3rem, 1.35vw, 2rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
  white-space: nowrap;
}

.analytics-meter > span {
  max-width: 180px;
  color: var(--analytics-ink-strong);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
}

.analytics-meter > small {
  max-width: 180px;
  color: var(--analytics-muted);
  font-size: 0.62rem;
  line-height: 1.42;
}

/* =========================================================
   LIVE ACTIVITY
   ========================================================= */

.analytics-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #b9dfcf;
  border-radius: 999px;
  background: var(--analytics-green-soft);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--analytics-green);
}

.analytics-live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(20, 139, 96, 0.09);
}

.analytics-live-number-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 12px;
}

.analytics-live-number-row strong {
  font-size: clamp(2rem, 2.2vw, 3.7rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--analytics-ink-strong);
}

.analytics-live-number-row span {
  font-size: 0.66rem;
  color: var(--analytics-muted);
}

.analytics-mini-chart {
  position: relative;
  width: 100%;
  height: clamp(170px, 12vw, 220px);
  overflow: hidden;
  border: 1px solid var(--analytics-line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(91, 116, 145, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 116, 145, 0.06) 1px, transparent 1px),
    #f8fafc;
  background-size: 100% 25%, 12.5% 100%, auto;
}

.analytics-mini-chart canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-live-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--analytics-line);
  font-size: 0.62rem;
  color: var(--analytics-muted);
}

.analytics-live-foot strong {
  color: var(--analytics-ink-strong);
}

/* =========================================================
   WORKSPACES
   ========================================================= */

.analytics-workspace {
  width: 100%;
  padding: var(--analytics-section-space) var(--analytics-gutter);
  border-bottom: 1px solid var(--analytics-line-strong);
  background: var(--analytics-surface-muted);
}

.analytics-market-section {
  background: #f8fafc;
}

.analytics-intelligence-section {
  background: #eef3f7;
}

.analytics-panel {
  padding: clamp(16px, 1.1vw, 26px);
}

.panel-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--analytics-ink-strong);
}

.panel-link {
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--analytics-blue);
  text-decoration: none;
}

.panel-link:hover {
  text-decoration: underline;
}

/* =========================================================
   PERIOD CONTROLS
   ========================================================= */

.analytics-period-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.analytics-period-tools > span {
  font-size: 0.65rem;
  color: var(--analytics-muted);
}

.analytics-period-tools > span strong {
  color: var(--analytics-ink-strong);
}

.analytics-client-window {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--analytics-line);
  border-radius: 8px;
  background: #ffffff;
}

.analytics-client-window button {
  min-width: 42px;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: 0.63rem;
  font-weight: 800;
  color: var(--analytics-muted-strong);
  cursor: pointer;
}

.analytics-client-window button:hover {
  background: #edf3fa;
  color: var(--analytics-ink-strong);
}

.analytics-client-window button.active {
  background: var(--analytics-dark);
  color: #ffffff;
}

.analytics-client-window button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* =========================================================
   GROWTH
   ========================================================= */

.analytics-growth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.3fr);
  gap: var(--analytics-gap);
  align-items: stretch;
}

.analytics-growth-panel {
  display: grid;
  gap: 11px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.64rem;
  color: var(--analytics-muted-strong);
}

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

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.legend-listings { background: var(--analytics-blue); }
.legend-discovered { background: var(--analytics-cyan); }
.legend-crawl { background: var(--analytics-green); }

.analytics-chart-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--analytics-line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(91, 116, 145, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 116, 145, 0.055) 1px, transparent 1px),
    #f8fafc;
  background-size: 100% 20%, 10% 100%, auto;
}

.analytics-chart-shell-growth {
  height: clamp(280px, 22vw, 360px);
}

.analytics-chart-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--analytics-muted);
  background: #f8fafc;
}

.directory-analytics-page .chart-empty[hidden] {
  display: none !important;
}

.analytics-growth-summary {
  min-width: 0;
  padding: clamp(16px, 1.1vw, 24px);
  border: 1px solid var(--analytics-line);
  border-radius: var(--analytics-radius-md);
  background: #ffffff;
  box-shadow: var(--analytics-shadow);
}

.analytics-window-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.analytics-window-kpis article {
  
  display: grid;
  align-content: start;
  min-height: 88px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--analytics-line);
  border-radius: 7px;
  background: var(--analytics-surface-soft);
}

.analytics-window-kpis span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--analytics-muted);
}

.analytics-window-kpis strong {
  display: block;
  font-size: clamp(1.25rem, 1.25vw, 1.95rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--analytics-ink-strong);
   margin-top: auto;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   MATERIALIZED NETWORK OPERATIONS
   ========================================================= */

.analytics-operations-section {
  background: #edf2f7;
}

.analytics-source-health {
  flex: 0 0 auto;
  min-width: 230px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--analytics-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--analytics-shadow);
}

.analytics-source-health > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--analytics-green);
}

.analytics-source-health > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(20, 139, 96, 0.09);
}

.analytics-source-health > strong {
  justify-self: end;
  font-size: 0.76rem;
  color: var(--analytics-ink-strong);
}

.analytics-source-health > small {
  grid-column: 1 / -1;
  font-size: 0.59rem;
  color: var(--analytics-muted);
}

.analytics-operations-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--analytics-gap);
  align-items: stretch;
}

.analytics-operation-card {
  display: grid;
  grid-template-rows: auto auto minmax(150px, 1fr) auto;
  gap: 14px;
  min-height: 410px;
}

.operation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.operation-card-head h3 {
  margin: 0;
  font-size: clamp(0.98rem, 0.9vw, 1.35rem);
  line-height: 1.18;
  color: var(--analytics-ink-strong);
}

.operation-card-head > strong {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid #c9dfd5;
  border-radius: 999px;
  background: var(--analytics-green-soft);
  font-size: 0.68rem;
  color: var(--analytics-green);
  font-variant-numeric: tabular-nums;
}

.operation-primary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--analytics-line);
}

.operation-primary strong {
  font-size: clamp(1.75rem, 1.75vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  color: var(--analytics-ink-strong);
  font-variant-numeric: tabular-nums;
}

.operation-primary span {
  font-size: 0.62rem;
  color: var(--analytics-muted);
}

.operation-bars {
  display: grid;
  align-content: center;
  gap: 11px;
}

.operation-bar {
  min-width: 0;
}

.operation-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.61rem;
}

.operation-bar-head span {
  min-width: 0;
  color: var(--analytics-muted-strong);
  overflow-wrap: anywhere;
}

.operation-bar-head strong {
  color: var(--analytics-ink-strong);
  font-variant-numeric: tabular-nums;
}

.operation-bar-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border: 1px solid #d8e1eb;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(91, 116, 145, 0.08) 0,
      rgba(91, 116, 145, 0.08) 1px,
      transparent 1px,
      transparent 10%
    ),
    #e7edf3;
}

.operation-bar-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--analytics-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: width 500ms ease;
}

.operation-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.operation-kpis > div {
  min-width: 0;
  min-height: 66px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--analytics-line);
  border-radius: 7px;
  background: var(--analytics-surface-soft);
}

.operation-kpis span {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--analytics-muted);
}

.operation-kpis strong {
  font-size: clamp(0.8rem, 0.78vw, 1.2rem);
  line-height: 1;
  color: var(--analytics-ink-strong);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   COUNTRIES + CATEGORIES
   ========================================================= */

.analytics-market-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: var(--analytics-gap);
  align-items: stretch;
}

.ranking-list {
  display: grid;
  gap: 6px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--analytics-line);
  border-radius: 7px;
  background: var(--analytics-surface-soft);
}

.ranking-index {
  font-size: 0.59rem;
  font-weight: 850;
  color: #8b9bad;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  color: var(--analytics-ink-strong);
}

.ranking-copy small {
  display: block;
  font-size: 0.59rem;
  line-height: 1.35;
  color: var(--analytics-muted);
  overflow-wrap: anywhere;
}

.ranking-value {
  min-width: 68px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 850;
  color: var(--analytics-blue);
}

.analytics-category-visual {
  display: grid;
  grid-template-columns: minmax(160px, 0.78fr) minmax(170px, 1.22fr);
  gap: 18px;
  align-items: center;
  min-height: 300px;
}

/* =========================================================
   DIRECTORY INTELLIGENCE
   ========================================================= */

.analytics-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--analytics-gap);
  align-items: stretch;
}

.analytics-intelligence-grid .analytics-visual-card {
  min-height: 330px;
}

/* =========================================================
   NEXT ACTIONS
   ========================================================= */

.analytics-next-section {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(520px, 1.3fr);
  gap: clamp(24px, 2vw, 70px);
  align-items: center;
  padding: clamp(30px, 2.5vw, 72px) var(--analytics-gutter);
  border-bottom: 1px solid #20384f;
  background: var(--analytics-dark);
  color: #dbe7f2;
}

.analytics-next-section .panel-kicker {
  color: #8cb5ff;
}

.analytics-next-section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #ffffff;
}

.analytics-next-section p {
  max-width: 780px;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #9fb5c9;
}

.analytics-next-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.analytics-next-links a {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #29435c;
  border-radius: 8px;
  background: #0b1c2f;
  color: inherit;
  text-decoration: none;
}

.analytics-next-links a:hover {
  border-color: #4f7193;
  background: #10263e;
}

.analytics-next-links .analytics-next-support {
  border-color: #3d6d66;
  background: linear-gradient(135deg, #0b2c33, #0b1c2f);
}

.analytics-next-links .analytics-next-support:hover {
  border-color: #64a99a;
  background: linear-gradient(135deg, #103b42, #10263e);
}

.analytics-next-links svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 7px;
  background: #102b46;
  fill: none;
  stroke: #8cb5ff;
  stroke-width: 1.8;
}

.analytics-next-links strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.72rem;
  color: #ffffff;
}

.analytics-next-links small {
  display: block;
  font-size: 0.59rem;
  line-height: 1.35;
  color: #8fa6bb;
}

/* =========================================================
   EMPTY STATES
   ========================================================= */

.analytics-console .empty-state {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed var(--analytics-line-strong);
  border-radius: 7px;
  background: var(--analytics-surface-soft);
  text-align: center;
  font-size: 0.7rem;
  color: var(--analytics-muted);
}

.analytics-console .empty-state strong {
  color: var(--analytics-muted-strong);
}

/* =========================================================
   TRUE WIDE-SCREEN / 8K
   ========================================================= */

@media (min-width: 2200px) {
  .directory-analytics-page {
    --analytics-gutter: clamp(48px, 1.45vw, 112px);
    --analytics-gap: clamp(14px, 0.7vw, 28px);
  }

  .analytics-console-head {
    grid-template-columns: minmax(0, 1.58fr) minmax(620px, 0.42fr);
    gap: 92px;
  }

  .analytics-verification-card,
  .analytics-readiness-card,
  .analytics-live-card {
    min-height: 420px;
  }

  .analytics-readiness-card .analytics-meter-grid {
    align-self: center;
  }

  .analytics-chart-shell-growth {
    height: 390px;
  }

  .analytics-operation-card {
    min-height: 450px;
  }
}

@media (min-width: 3600px) {
  .directory-analytics-page {
    --analytics-gutter: 96px;
    --analytics-gap: 24px;
    --analytics-section-space: 56px;
  }

  .analytics-console-head {
    grid-template-columns: minmax(0, 1.64fr) minmax(760px, 0.36fr);
    gap: 112px;
  }

  .analytics-kpi-strip article {
    min-height: 142px;
  }

  .analytics-insight-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
  }

  .analytics-growth-layout {
    grid-template-columns: minmax(0, 1.78fr) minmax(520px, 0.22fr);
  }

  .analytics-market-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(640px, 0.62fr);
  }

  .analytics-chart-shell-growth {
    height: 430px;
  }

  .analytics-mini-chart {
    height: 250px;
  }

  .analytics-donut-shell {
    width: min(100%, 320px);
  }

  .analytics-donut-shell-small {
    width: min(100%, 260px);
  }

  .analytics-meter-shell {
    width: min(100%, 240px);
  }

  .analytics-operation-card {
    min-height: 500px;
  }

  .operation-bars {
    gap: 15px;
  }

  .operation-bar-track {
    height: 13px;
  }
}

@media (min-width: 5600px) {
  .directory-analytics-page {
    --analytics-gutter: 112px;
    --analytics-gap: 28px;
    --analytics-section-space: 64px;
  }

  .analytics-console-head {
    grid-template-columns: minmax(0, 1.7fr) minmax(900px, 0.3fr);
    gap: 128px;
  }

  .analytics-chart-shell-growth {
    height: 470px;
  }

  .analytics-mini-chart {
    height: 270px;
  }

  .analytics-verification-card,
  .analytics-readiness-card,
  .analytics-live-card {
    min-height: 460px;
  }

  .analytics-meter-shell {
    width: min(100%, 290px);
  }

  .analytics-operation-card {
    min-height: 560px;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1500px) {
  .analytics-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .analytics-kpi-strip article:first-child,
  .analytics-kpi-strip article:last-child {
    padding-left: 16px;
    padding-right: 16px;
  }

  .analytics-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-live-card {
    grid-column: 1 / -1;
    min-height: 340px;
  }

  .analytics-growth-layout {
    grid-template-columns: minmax(0, 1.48fr) minmax(280px, 0.52fr);
  }

  .analytics-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .analytics-console-head,
  .analytics-growth-layout,
  .analytics-market-grid,
  .analytics-next-section {
    grid-template-columns: 1fr;
  }

  .analytics-live-summary {
    max-width: none;
  }

  .analytics-insight-grid,
  .analytics-intelligence-grid {
    grid-template-columns: 1fr;
  }

  .analytics-live-card {
    grid-column: auto;
  }

  .analytics-verification-card,
  .analytics-readiness-card,
  .analytics-live-card,
  .analytics-intelligence-grid .analytics-visual-card {
    min-height: 0;
  }

  .analytics-donut-layout,
  .analytics-donut-layout-compact,
  .analytics-category-visual {
    grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.35fr);
  }

  .analytics-next-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-source-health {
    width: 100%;
  }

  .analytics-readiness-card .analytics-meter-shell {
    width: min(100%, 190px);
  }
}

@media (max-width: 900px) {
  .directory-analytics-page {
    --analytics-gutter: 16px;
    --analytics-section-space: 28px;
  }

  .analytics-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .analytics-period-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .analytics-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-meter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .analytics-meter-shell {
    width: min(100%, 178px);
  }

  .analytics-next-links {
    grid-template-columns: 1fr;
  }

  .analytics-chart-shell-growth {
    height: 300px;
  }

  .analytics-operations-grid {
    grid-template-columns: 1fr;
  }

  .analytics-operation-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .directory-analytics-page {
    --analytics-gutter: 11px;
    --analytics-gap: 9px;
    --analytics-section-space: 22px;
  }

  .analytics-console-head {
    grid-template-columns: 1fr;
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .analytics-console-head h1 {
    font-size: clamp(2.1rem, 11vw, 3.4rem);
  }

  .analytics-live-summary-metrics,
  .analytics-window-kpis,
  .analytics-meter-grid,
  .analytics-donut-layout,
  .analytics-donut-layout-compact,
  .analytics-category-visual {
    grid-template-columns: 1fr;
  }

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

  .analytics-kpi-strip article {
    min-height: 112px;
  }

  .analytics-client-window {
    width: 100%;
  }

  .analytics-client-window button {
    flex: 1 1 42px;
  }

  .panel-heading-row {
    flex-direction: column;
  }

  .analytics-live-number-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .analytics-spectrum-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-live-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .analytics-donut-shell,
  .analytics-donut-shell-small {
    width: min(100%, 230px);
  }

  .analytics-meter-shell {
    width: min(100%, 185px);
  }

  .analytics-chart-shell-growth {
    height: 260px;
  }

  .analytics-mini-chart {
    height: 180px;
  }

  .analytics-next-section {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .operation-kpis {
    grid-template-columns: 1fr;
  }

  .operation-kpis > div {
    min-height: 54px;
  }
}

@media (max-width: 390px) {
  .analytics-kpi-strip {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .directory-analytics-page .analytics-console *,
  .directory-analytics-page .analytics-console *::before,
  .directory-analytics-page .analytics-console *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-hero-spectrum .analytics-spectrum-signal,
  .analytics-hero-spectrum .analytics-spectrum-point {
    animation: none !important;
  }
}

/* Optional */
.asg-activity-status { display:block; margin-top:.25rem; font-size:.75rem; line-height:1.5; }
.asg-activity-status[data-updating="true"] { color:#b45309; }
.asg-activity-breakdown-note { display:block; margin:.5rem 0 .75rem; font-size:.75rem; line-height:1.5; color:inherit; opacity:.8; }
