/* AIF System Overview — dark-host / transparent embed */
.aif-so {
  --aif-so-ink: #f1f5f9;
  --aif-so-muted: #94a3b8;
  --aif-so-border: rgba(226, 232, 240, 0.18);
  --aif-so-accent: #a5b4fc;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--aif-so-ink);
  box-sizing: border-box;
  position: relative;
}

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

.aif-so__canvas {
  position: relative;
  width: 100%;
}

.aif-so__head {
  margin-bottom: 0.75rem;
}

.aif-so__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--aif-so-ink);
}

.aif-so__sub {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--aif-so-muted);
}

.aif-so__scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1120 / 420;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.aif-so__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.aif-so__hit {
  position: absolute;
  z-index: 10;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  cursor: pointer;
}

.aif-so__hit[data-inert="true"] {
  cursor: default;
}

.aif-so__hit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(165, 180, 252, 0.55);
}

.aif-so__tip {
  position: absolute;
  z-index: 20;
  width: min(230px, 40%);
  padding: 0.75rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.aif-so__tip-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
}

.aif-so__tip-title {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
}

.aif-so__tip-blurb {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.aif-so__tip-foot {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.aif-so__tip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--aif-so-accent);
  text-decoration: none;
}

.aif-so__tip-link:hover {
  text-decoration: underline;
}

.aif-so__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--aif-so-muted);
}

.aif-so__nav a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(148, 163, 184, 0.45);
}

.aif-so__nav a:hover {
  color: var(--aif-so-ink);
}

/* Agentisation Index — top-right overlay on desktop */
.aif-so__index {
  position: absolute;
  top: 2.5%;
  right: 1.5%;
  z-index: 15;
  width: min(320px, 36%);
  padding: 0.7rem 0.85rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  pointer-events: auto;
}

.aif-so__index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.aif-so__index-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.aif-so__index-detail {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  white-space: nowrap;
}

a.aif-so__index-detail:hover {
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aif-so__index-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.65rem;
}

.aif-so__index-metric {
  min-width: 0;
}

.aif-so__index-label {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: #94a3b8;
}

.aif-so__index-value {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #f8fafc;
}

/* Light-host / export: white paper card like the original diagram */
.aif-so--light .aif-so__index {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #0f172a;
}

.aif-so--light .aif-so__index-title {
  color: #0f172a;
}

.aif-so--light .aif-so__index-detail {
  color: #94a3b8;
}

.aif-so--light a.aif-so__index-detail:hover {
  color: #64748b;
}

.aif-so--light .aif-so__index-label {
  color: #94a3b8;
}

.aif-so--light .aif-so__index-value {
  color: #0f172a;
}

@media (max-width: 720px) {
  .aif-so__index {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 0.75rem;
    padding: 0.7rem 0.85rem 0.8rem;
  }

  .aif-so__index-title {
    font-size: 0.68rem;
  }

  .aif-so__index-value {
    font-size: 1.25rem;
  }

  .aif-so__index-label {
    font-size: 0.62rem;
  }
}
