@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@500;600&display=swap');

:root {
  --dm-ink: #14212b;
  --dm-ink-soft: #3a4a57;
  --dm-paper: #f4efe6;
  --dm-paper-2: #ebe4d8;
  --dm-card: #fffdf8;
  --dm-line: #d7cfbf;
  --dm-teal: #0f6e6a;
  --dm-teal-deep: #0a4f4c;
  --dm-amber: #c47a1a;
  --dm-danger: #9b2c2c;
  --dm-shadow: 0 18px 40px rgba(20, 33, 43, 0.08);
  --dm-radius: 18px;
  --dm-font: "IBM Plex Sans", system-ui, sans-serif;
  --dm-serif: "IBM Plex Serif", Georgia, serif;
}

html {
  font-size: 15px;
  height: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin: 0;
  font-family: var(--dm-font);
  color: var(--dm-ink);
  background:
    radial-gradient(circle at top left, rgba(15, 110, 106, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f3eb 0%, var(--dm-paper) 40%, #efe8db 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--dm-teal-deep); text-decoration: none; }
a:hover { color: var(--dm-amber); }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(15, 110, 106, 0.35);
}

.navbar {
  background: rgba(255, 253, 248, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dm-line) !important;
  box-shadow: none !important;
}

.navbar-brand, .nav-link { font-weight: 500; }
.navbar-brand { letter-spacing: -0.02em; }

.container-fluid.dm-shell {
  width: 100%;
  max-width: none;
  padding-left: clamp(1rem, 2.5vw, 2.5rem);
  padding-right: clamp(1rem, 2.5vw, 2.5rem);
}

body > .container-fluid.dm-shell {
  flex: 1 0 auto;
}

.footer {
  position: static;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
  white-space: normal;
  line-height: 1.5;
  padding: 1.25rem 0;
  background: transparent;
  border-top-color: var(--dm-line) !important;
}

/* Hero home */
.dm-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dm-line);
  border-radius: 28px;
  background: linear-gradient(135deg, #12363a 0%, #0f6e6a 48%, #1f4d3d 100%);
  color: #f7f3eb;
  padding: 3.5rem 2rem;
  margin: 1rem 0 2rem;
  box-shadow: var(--dm-shadow);
}

.dm-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 30% 40%, black, transparent 70%);
  opacity: 0.5;
}

.dm-hero-content { position: relative; max-width: 720px; }
.dm-hero h1 {
  font-family: var(--dm-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin: 0.2rem 0 1rem;
  letter-spacing: -0.03em;
}

.dm-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.dm-lead {
  font-size: 1.1rem;
  line-height: 1.65;
  color: inherit;
  opacity: 0.92;
  max-width: 62ch;
}

.dm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.dm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.dm-btn:hover { transform: translateY(-1px); }
.dm-btn-primary {
  background: #f4c56d;
  color: #14212b !important;
}
.dm-btn-primary:hover { background: #ffd789; color: #14212b !important; }
.dm-btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff !important;
}
.dm-btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff !important; }
.dm-btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.dm-section .dm-btn-ghost,
.dm-family-side .dm-btn-ghost {
  border-color: var(--dm-line);
  color: var(--dm-ink) !important;
}
.dm-section .dm-btn-ghost:hover,
.dm-family-side .dm-btn-ghost:hover {
  background: var(--dm-paper-2);
  color: var(--dm-ink) !important;
}
.dm-section .dm-btn-primary { color: #14212b !important; }

.dm-section { margin: 2.5rem 0; }
.dm-section-alt {
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.75rem;
}

.dm-section-head { margin-bottom: 1.25rem; }
.dm-section-head h2 {
  font-family: var(--dm-serif);
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}
.dm-section-head p { color: var(--dm-ink-soft); margin: 0; }

.dm-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 992px) {
  .dm-flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .dm-flow { grid-template-columns: 1fr; }
}

.dm-flow-step {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.25rem;
  box-shadow: var(--dm-shadow);
}
.dm-flow-num {
  display: inline-block;
  font-weight: 700;
  color: var(--dm-teal);
  margin-bottom: 0.6rem;
  letter-spacing: 0.08em;
}
.dm-flow-step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.dm-flow-step p { color: var(--dm-ink-soft); margin: 0; font-size: 0.95rem; }

.dm-depth-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .dm-depth-grid { grid-template-columns: 1fr; }
}

.dm-depth-card {
  display: block;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.5rem;
  color: inherit !important;
  box-shadow: var(--dm-shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.dm-depth-card:hover {
  transform: translateY(-2px);
  border-color: var(--dm-teal);
  color: inherit !important;
}
.dm-depth-card-deep {
  background: linear-gradient(160deg, #12363a, #0f6e6a);
  color: #f7f3eb !important;
  border-color: transparent;
}
.dm-depth-card-deep:hover { color: #fff !important; }
.dm-depth-card-deep .dm-link { color: #f4c56d; }
.dm-depth-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  opacity: 0.75;
}
.dm-depth-card h3 {
  font-family: var(--dm-serif);
  margin-bottom: 0.6rem;
}
.dm-link { font-weight: 600; }

.dm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .dm-stats { grid-template-columns: repeat(2, 1fr); }
}
.dm-stat {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.25rem;
  text-align: center;
}
.dm-stat strong {
  display: block;
  font-family: var(--dm-serif);
  font-size: 2rem;
  color: var(--dm-teal-deep);
}
.dm-stat span { color: var(--dm-ink-soft); font-size: 0.9rem; }
.dm-note { color: var(--dm-ink-soft); margin-top: 1rem; }

/* Catalog pages */
.dm-page-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}
.dm-page-hero h1 {
  font-family: var(--dm-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.6rem;
}
.dm-page-hero .dm-lead { color: var(--dm-ink-soft); }
.dm-page-hero-deep .dm-id-chip {
  display: inline-block;
  background: #12363a;
  color: #f4c56d;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-family: var(--dm-font);
  font-size: 0.9rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.dm-search {
  display: flex;
  gap: 0.5rem;
  min-width: min(100%, 360px);
}
.dm-search input {
  flex: 1;
  border: 1px solid var(--dm-line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--dm-card);
}
.dm-search button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  background: var(--dm-teal);
  color: white;
  font-weight: 600;
}

.dm-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--dm-ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.dm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--dm-ink-soft);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.dm-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 992px) {
  .dm-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .dm-cat-grid { grid-template-columns: 1fr; }
}
.dm-cat-card {
  display: block;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.2rem;
  color: inherit !important;
  box-shadow: var(--dm-shadow);
}
.dm-cat-card:hover {
  border-color: var(--dm-teal);
  color: inherit !important;
}
.dm-cat-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  font-family: var(--dm-serif);
}
.dm-cat-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--dm-ink-soft);
  font-size: 0.9rem;
}

.dm-table-wrap {
  overflow: auto;
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  background: var(--dm-card);
}
.dm-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}
.dm-table th, .dm-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--dm-line);
  vertical-align: top;
}
.dm-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dm-ink-soft);
  background: #f7f1e6;
}
.dm-table tr:last-child td { border-bottom: 0; }
.dm-table-compact th, .dm-table-compact td { padding: 0.55rem 0.75rem; font-size: 0.92rem; }
.dm-cell-title { font-weight: 700; }
.dm-cell-sub { color: var(--dm-ink-soft); font-size: 0.92rem; }
.is-disabled-row { opacity: 0.55; }

.dm-family-list { display: flex; flex-direction: column; gap: 0.9rem; }
.dm-family-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.2rem;
  box-shadow: var(--dm-shadow);
}
@media (max-width: 768px) {
  .dm-family-row { grid-template-columns: 1fr; }
}
.dm-family-id {
  display: inline-block;
  font-weight: 700;
  color: var(--dm-teal-deep);
  margin-bottom: 0.25rem;
}
.dm-family-main h2, .dm-family-main h3 {
  font-family: var(--dm-serif);
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}
.dm-family-main p { color: var(--dm-ink-soft); margin-bottom: 0.75rem; }
.dm-family-side {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  color: var(--dm-ink-soft);
  min-width: 140px;
}

.dm-skeleton-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dm-skeleton-mini span {
  background: #e8f3f2;
  color: var(--dm-teal-deep);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.dm-skeleton-lg span { font-size: 0.85rem; padding: 0.35rem 0.7rem; }

.dm-kpi-row, .dm-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 992px) {
  .dm-kpi-row, .dm-info-grid { grid-template-columns: repeat(2, 1fr); }
}
.dm-kpi, .dm-info-grid > div {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  padding: 1rem;
}
.dm-kpi strong {
  display: block;
  font-family: var(--dm-serif);
  font-size: 1.6rem;
  color: var(--dm-teal-deep);
}
.dm-kpi span, .dm-info-grid p { color: var(--dm-ink-soft); margin: 0; }
.dm-info-grid h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dm-ink-soft);
  margin-bottom: 0.35rem;
}

.dm-panel {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.4rem;
  margin: 1.25rem 0;
  box-shadow: var(--dm-shadow);
}
.dm-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 768px) {
  .dm-panel-grid { grid-template-columns: 1fr; }
}

/* Pipeline */
.dm-pipeline {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  align-items: stretch;
}
.dm-pipe-step {
  min-width: 180px;
  max-width: 220px;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  gap: 0.7rem;
}
.dm-pipe-step.is-off { opacity: 0.5; }
.dm-pipe-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #12363a;
  color: #f4c56d;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex: 0 0 auto;
}
.dm-pipe-type {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--dm-teal-deep);
}
.dm-pipe-name { font-weight: 600; font-size: 0.92rem; margin: 0.15rem 0; }
.dm-pipe-io {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--dm-ink-soft);
  word-break: break-all;
}
.dm-pipe-connector {
  width: 18px;
  align-self: center;
  height: 2px;
  background: var(--dm-line);
  flex: 0 0 auto;
}

.dm-badge {
  display: inline-block;
  background: #e8f3f2;
  color: var(--dm-teal-deep);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}
.dm-badge-alt { background: #f8e8c8; color: #7a4a0d; }
.dm-badge-muted { background: #ece7de; color: #6b6256; }
.dm-step-badge {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #12363a;
  color: #f4c56d;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.6rem;
}
.dm-muted { color: var(--dm-ink-soft); }
.dm-io-line {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--dm-ink-soft);
  font-size: 0.92rem;
}
.dm-xpath {
  word-break: break-all;
  white-space: pre-wrap;
}

.dm-pct {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 110px;
}
.dm-pct span {
  display: inline-block;
  height: 8px;
  width: 72px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--dm-teal), var(--dm-amber)) 0 / var(--pct) 100% no-repeat,
    #ece7de;
}

.dm-variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.dm-variant-card {
  display: block;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  padding: 0.9rem;
  color: inherit !important;
}
.dm-variant-card:hover,
.dm-variant-card.is-active {
  border-color: var(--dm-teal);
  color: inherit !important;
}
.dm-variant-card.is-ref { box-shadow: inset 0 0 0 1px rgba(15, 110, 106, 0.25); }
.dm-variant-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.dm-variant-meta {
  display: flex;
  gap: 0.7rem;
  color: var(--dm-ink-soft);
  font-size: 0.85rem;
}

.dm-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.dm-tag-cloud span {
  background: #efe8db;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
}

.dm-diff-list { display: flex; flex-direction: column; gap: 0.75rem; }
.dm-json {
  background: #14212b;
  color: #e8f3f2;
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.82rem;
  overflow: auto;
  margin: 0;
}

.dm-type-list { display: flex; flex-direction: column; gap: 0.75rem; }
.dm-type-card {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
}
.dm-type-card.is-active { border-color: var(--dm-teal); box-shadow: var(--dm-shadow); }
.dm-type-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.dm-type-head span { color: var(--dm-ink-soft); }
.dm-type-card p { margin: 0; color: var(--dm-ink-soft); }

.dm-accordion .accordion-item {
  background: var(--dm-card);
  border-color: var(--dm-line);
}
.dm-accordion .accordion-button {
  background: #f7f1e6;
  color: var(--dm-ink);
  font-weight: 500;
}
.dm-accordion .accordion-button:not(.collapsed) {
  background: #e8f3f2;
  color: var(--dm-teal-deep);
  box-shadow: none;
}
.dm-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 110, 106, 0.2);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

.dm-usage-bars {
  display: grid;
  gap: 1rem;
  max-width: 720px;
}
.dm-usage-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--dm-ink-soft);
  margin-bottom: 0.35rem;
}
.dm-usage-track {
  height: 12px;
  border-radius: 999px;
  background: #ece7de;
  overflow: hidden;
}
.dm-usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dm-teal), #1f8f88);
}

/* —— Agentización —— */
.ag-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dm-line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(244, 197, 109, 0.22), transparent 45%),
    linear-gradient(145deg, #0d2e32 0%, #0f6e6a 55%, #1a4338 100%);
  color: #f7f3eb;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  margin: 1rem 0 2rem;
  box-shadow: var(--dm-shadow);
}

.ag-hero-orbit {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 0 0 40px rgba(255, 255, 255, 0.03),
    inset 0 0 0 80px rgba(255, 255, 255, 0.02);
  animation: ag-spin 48s linear infinite;
}

.ag-hero-orbit::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f4c56d;
  top: 50%;
  right: -7px;
  box-shadow: 0 0 18px rgba(244, 197, 109, 0.8);
}

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

.ag-hero-content { position: relative; max-width: 740px; }
.ag-hero h1 {
  font-family: var(--dm-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin: 0.2rem 0 1rem;
  letter-spacing: -0.03em;
}

.ag-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  justify-content: space-between;
}

.ag-pipe-stage {
  flex: 1 1 140px;
  min-width: 140px;
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.15rem 1rem;
  box-shadow: var(--dm-shadow);
  animation: ag-rise 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 0.08s);
}

.ag-pipe-stage-accent {
  background: linear-gradient(180deg, #e8f3f2, var(--dm-card));
  border-color: rgba(15, 110, 106, 0.35);
}

.ag-pipe-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e8f3f2;
  color: var(--dm-teal-deep);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.ag-pipe-stage-accent .ag-pipe-icon {
  background: var(--dm-teal);
  color: #f7f3eb;
}

.ag-pipe-stage h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.ag-pipe-stage p {
  margin: 0;
  color: var(--dm-ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.ag-pipe-arrow {
  width: 18px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, var(--dm-line), var(--dm-teal));
  position: relative;
  flex: 0 0 18px;
}

.ag-pipe-arrow::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--dm-teal);
}

@keyframes ag-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .ag-pipe-arrow { display: none; }
}

.ag-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 992px) {
  .ag-channel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .ag-channel-grid { grid-template-columns: 1fr; }
}

.ag-channel {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.25rem;
  box-shadow: var(--dm-shadow);
  border-top: 4px solid var(--dm-teal);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ag-channel:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(20, 33, 43, 0.12);
}

.ag-channel[data-tone="mail"] { border-top-color: #0f6e6a; }
.ag-channel[data-tone="phone"] { border-top-color: #c47a1a; }
.ag-channel[data-tone="inbox"] { border-top-color: #2f5d8c; }
.ag-channel[data-tone="web"] { border-top-color: #3d6b4f; }
.ag-channel[data-tone="api"] { border-top-color: #6b4c7a; }
.ag-channel[data-tone="chat"] { border-top-color: #8a5a2b; }

.ag-channel header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.ag-channel h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ag-channel-glyph {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f0ebe1;
  color: var(--dm-ink);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ag-channel > p {
  color: var(--dm-ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.ag-channel ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--dm-ink);
  font-size: 0.88rem;
}

.ag-channel li { margin-bottom: 0.25rem; }

.ag-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .ag-bridge {
    grid-template-columns: 1fr;
  }
  .ag-bridge-join { display: none; }
}

.ag-bridge-col {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.25rem;
  box-shadow: var(--dm-shadow);
}

.ag-bridge-col-mid {
  background: linear-gradient(165deg, #12363a, #0f6e6a);
  color: #f7f3eb;
  border-color: transparent;
}

.ag-bridge-col-mid .ag-bridge-example,
.ag-bridge-col-mid .ag-checklist {
  color: rgba(247, 243, 235, 0.9);
}

.ag-bridge-col h3 {
  font-family: var(--dm-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.ag-bridge-col h3 span {
  font-family: var(--dm-font);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--dm-teal);
}

.ag-bridge-col-mid h3 span { color: #f4c56d; }

.ag-bridge-example {
  font-size: 0.92rem;
  color: var(--dm-ink-soft);
  font-style: italic;
  margin-bottom: 0.85rem;
}

.ag-checklist {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.ag-bridge-join {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 0.15rem;
}

.ag-bridge-join span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dm-teal);
  opacity: 0.35;
  animation: ag-pulse 1.4s ease-in-out infinite;
}

.ag-bridge-join span:nth-child(2) { animation-delay: 0.2s; opacity: 0.55; }
.ag-bridge-join span:nth-child(3) { animation-delay: 0.4s; opacity: 0.85; }

@keyframes ag-pulse {
  0%, 100% { transform: scale(0.85); }
  50% { transform: scale(1.15); }
}

.ag-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .ag-why-grid { grid-template-columns: 1fr; }
}

.ag-why-card {
  background: var(--dm-card);
  border: 1px solid var(--dm-line);
  border-radius: var(--dm-radius);
  padding: 1.35rem;
  box-shadow: var(--dm-shadow);
}

.ag-why-num {
  font-family: var(--dm-serif);
  font-size: 2.4rem;
  color: var(--dm-teal-deep);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.ag-why-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.ag-why-card p { color: var(--dm-ink-soft); font-size: 0.92rem; margin-bottom: 0.85rem; }

.ag-story {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--dm-line);
  margin-left: 4.5rem;
}

.ag-story li {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}

.ag-story li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dm-teal);
  box-shadow: 0 0 0 4px rgba(15, 110, 106, 0.15);
}

.ag-story-time {
  position: absolute;
  left: -5.5rem;
  top: 0.15rem;
  width: 3.8rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dm-teal-deep);
  font-variant-numeric: tabular-nums;
}

.ag-story-body strong {
  display: block;
  margin-bottom: 0.2rem;
}

.ag-story-body p {
  margin: 0;
  color: var(--dm-ink-soft);
  font-size: 0.95rem;
}

.ag-story-body code {
  background: #efe8db;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  font-size: 0.85em;
}

.ag-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2.5rem 0 1rem;
  padding: 1.75rem 2rem;
  border-radius: 24px;
  border: 1px solid var(--dm-line);
  background:
    linear-gradient(120deg, rgba(15, 110, 106, 0.08), transparent 40%),
    var(--dm-card);
  box-shadow: var(--dm-shadow);
}

.ag-cta h2 {
  font-family: var(--dm-serif);
  font-size: 1.45rem;
  margin: 0 0 0.4rem;
}

.ag-cta p {
  margin: 0;
  max-width: 62ch;
  color: var(--dm-ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .ag-hero-orbit,
  .ag-pipe-stage,
  .ag-bridge-join span {
    animation: none;
  }
}
