:root {
  --ink-950: #07101f;
  --ink-900: #0b1730;
  --ink-850: #122445;
  --ink-800: #18325c;
  --ink-700: #23467f;
  --paper-100: #f8f4e8;
  --paper-200: #efe7d6;
  --paper-300: #dfd0b3;
  --text-900: #182133;
  --text-700: #51607b;
  --text-600: #67748f;
  --line-dark: rgba(255, 255, 255, 0.12);
  --line-light: rgba(14, 24, 43, 0.12);
  --sunbeam: #feff2c;
  --sunbeam-soft: rgba(254, 255, 44, 0.16);
  --mist: #d7ebff;
  --mint: #cfe8d0;
  --warning: #ffd879;
  --danger: #ffb3a7;
  --shadow-hero: 0 34px 88px rgba(8, 17, 35, 0.22);
  --shadow-card: 0 18px 36px rgba(15, 28, 51, 0.12);
  --shadow-lift: 0 22px 42px rgba(15, 28, 51, 0.16);
  --max-width: 1320px;
  --clip-card: polygon(0 14px, 14px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  --clip-button: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --clip-tab: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text-900);
  background:
    radial-gradient(circle at top left, rgba(35, 70, 127, 0.1), transparent 26%),
    radial-gradient(circle at 90% 10%, rgba(254, 255, 44, 0.12), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, var(--paper-100) 48%, #ffffff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background:
    linear-gradient(rgba(10, 18, 33, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 18, 33, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 56%, transparent 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  width: min(var(--max-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 30;
  margin-bottom: 18px;
}

.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(7, 16, 31, 0.86);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(8, 17, 35, 0.26);
  backdrop-filter: blur(18px);
  clip-path: var(--clip-card);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

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

.eyebrow,
.mini-label,
.utility-label,
.metric-label,
.section-label,
.tab-meta,
.pill {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
}

.brand-copy .mini-label {
  color: rgba(255, 255, 255, 0.7);
}

.brand-copy strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.site-nav::-webkit-scrollbar,
.tab-rail::-webkit-scrollbar {
  height: 6px;
}

.site-nav::-webkit-scrollbar-thumb,
.tab-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  clip-path: var(--clip-tab);
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  transform: translateY(-2px);
  background: rgba(254, 255, 44, 0.14);
  border-color: rgba(254, 255, 44, 0.28);
  color: #ffffff;
}

.header-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 12%, rgba(254, 255, 44, 0.18), transparent 20%),
    radial-gradient(circle at 10% 88%, rgba(215, 235, 255, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(7, 16, 31, 0.98), rgba(18, 36, 69, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-hero);
  clip-path: var(--clip-card);
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at center, rgba(254, 255, 44, 0.18), transparent 72%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  clip-path: var(--clip-tab);
}

.hero h1 {
  margin: 16px 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  max-width: 12ch;
}

.hero h1 span {
  color: var(--sunbeam);
}

.hero p.lede {
  margin: 0;
  max-width: 66ch;
  font-size: 18px;
  line-height: 1.78;
  color: rgba(255, 255, 255, 0.82);
}

.hero-badges,
.hero-actions,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges {
  margin-top: 20px;
}

.hero-actions {
  margin-top: 24px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  clip-path: var(--clip-tab);
  font-size: 13px;
}

.hero-side {
  display: grid;
  gap: 14px;
}

.bevel-panel,
.metric-card,
.utility-card,
.resource-card,
.insight-card,
.tab-panel,
.workbench-field,
.data-card,
.matrix-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 232, 0.96));
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-card);
  clip-path: var(--clip-card);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #ffffff;
}

.bevel-panel::before,
.metric-card::before,
.utility-card::before,
.resource-card::before,
.tab-panel::before,
.workbench-field::before,
.data-card::before,
.matrix-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 26%);
  pointer-events: none;
}

.bevel-panel,
.hero-panel,
.metric-card,
.utility-card,
.resource-card,
.tab-panel,
.insight-card,
.workbench-field,
.data-card,
.matrix-card {
  padding: 20px;
}

.hero-panel h2,
.panel-title,
.section-title,
.tab-title,
.card-title,
.utility-card h3,
.resource-card h3,
.metric-card h3,
.data-card h3,
.matrix-card h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.hero-panel p,
.utility-card p,
.resource-card p,
.tab-panel p,
.data-card p,
.matrix-card p,
.copy {
  margin: 0;
  line-height: 1.7;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.sidebar-column {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 112px;
}

.section-block {
  margin-bottom: 18px;
}

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

.section-heading p {
  max-width: 62ch;
  color: var(--text-700);
}

.button,
.ghost-button,
.copy-button,
.control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: none;
  clip-path: var(--clip-button);
  font-weight: 800;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease);
}

.button {
  color: #121212;
  background: var(--sunbeam);
  box-shadow: 0 18px 34px rgba(254, 255, 44, 0.18);
}

.button:hover,
.ghost-button:hover,
.copy-button:hover,
.control-button:hover {
  transform: translateY(-2px);
}

.ghost-button,
.copy-button,
.control-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.control-button {
  color: var(--text-900);
  background: #ffffff;
  border: 1px solid var(--line-light);
}

.metric-grid,
.utility-grid,
.resource-grid,
.card-grid,
.matrix-grid,
.callout-grid {
  display: grid;
  gap: 14px;
}

.metric-grid,
.utility-grid,
.resource-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.two-up,
.matrix-grid.two-up,
.callout-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three-up,
.matrix-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-value {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.06em;
}

.metric-card p,
.metric-subtext {
  color: rgba(255, 255, 255, 0.72);
}

.metric-card {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.metric-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 34%);
}

.utility-card small,
.resource-card small,
.data-card small {
  color: var(--text-600);
  display: block;
  margin-bottom: 8px;
}

.resource-card,
.utility-card {
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

.resource-card:hover,
.utility-card:hover,
.data-card:hover,
.matrix-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(35, 70, 127, 0.22);
}

.resource-card .button-row,
.utility-card .button-row,
.data-card .button-row {
  margin-top: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  min-height: 46px;
  white-space: nowrap;
  color: var(--text-700);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-light);
  clip-path: var(--clip-tab);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease);
}

.tab-button:hover,
.tab-button[aria-selected="true"] {
  color: var(--text-900);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(254, 255, 44, 0.3), rgba(255, 255, 255, 0.95));
  border-color: rgba(35, 70, 127, 0.24);
}

.tab-panels {
  margin-top: 16px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.stack {
  display: grid;
  gap: 14px;
}

.stack-lg {
  display: grid;
  gap: 18px;
}

.list,
.bullet-list,
.check-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  line-height: 1.68;
  color: var(--text-900);
}

.kpi-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.kpi-list li,
.callout,
.accordion-item,
.table-shell {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line-light);
  clip-path: var(--clip-card);
}

.callout {
  line-height: 1.7;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(35, 70, 127, 0.08);
  color: var(--ink-700);
  clip-path: var(--clip-tab);
}

.pill.alert {
  background: rgba(255, 216, 121, 0.18);
  color: #7a5200;
}

.pill.success {
  background: rgba(207, 232, 208, 0.36);
  color: #295b32;
}

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

.form-grid .full-span {
  grid-column: 1 / -1;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-700);
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--text-900);
  background: #ffffff;
  border: 1px solid rgba(24, 33, 51, 0.14);
  clip-path: var(--clip-tab);
}

.field-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
}

.assembly-box {
  min-height: 280px;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  background: #0e1730;
  color: #f4f5f7;
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: var(--clip-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

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

.tool-results {
  display: grid;
  gap: 12px;
}

.tool-empty {
  padding: 18px;
  color: var(--text-600);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(24, 33, 51, 0.16);
  clip-path: var(--clip-card);
}

.result-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(254, 255, 44, 0.18);
  color: var(--ink-900);
  clip-path: var(--clip-tab);
  font-weight: 800;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(24, 33, 51, 0.1);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-600);
}

.footer {
  margin-top: 24px;
  padding: 18px 20px;
  color: var(--text-700);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-card);
  clip-path: var(--clip-card);
}

.footer strong {
  color: var(--text-900);
}

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

@media (max-width: 1120px) {
  .header-bar,
  .hero-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-column {
    position: static;
  }
}

@media (max-width: 880px) {
  .metric-grid,
  .utility-grid,
  .resource-grid,
  .card-grid.two-up,
  .callout-grid.two-up,
  .matrix-grid.two-up,
  .card-grid.three-up,
  .matrix-grid.three-up,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(var(--max-width), calc(100vw - 22px));
  }

  .hero,
  .tab-panel,
  .utility-card,
  .resource-card,
  .footer {
    padding: 18px;
  }

  .header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    max-width: none;
  }

  .header-bar {
    padding: 14px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .button,
  .ghost-button,
  .copy-button,
  .control-button {
    width: 100%;
  }
}

/* Apollo x DemandScience redesign */
body.ds-library {
  --ink-975: #060d18;
  --ink-950: #091221;
  --ink-900: #13233c;
  --ink-860: #19324f;
  --slate-700: #40506b;
  --slate-620: #576783;
  --paper-100: #f4f6fb;
  --beam: #e8ff00;
  --radius-panel: 26px;
  --clip-panel: polygon(0 16px, 16px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  --clip-button: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --shell-shadow: 0 30px 80px rgba(7, 16, 31, 0.13);
  --card-shadow: 0 18px 34px rgba(7, 16, 31, 0.08);
  --lift-shadow: 0 24px 44px rgba(7, 16, 31, 0.12);
  margin: 0;
  min-height: 100vh;
  color: var(--ink-950);
  font-family: var(--page-body, "Manrope", sans-serif);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--page-support) 14%, transparent), transparent 26%),
    radial-gradient(circle at left 12%, color-mix(in srgb, var(--page-accent) 10%, transparent), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--paper-100) 58%, #ffffff 100%);
}

body.ds-library::before,
body.ds-library::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.ds-library::before {
  opacity: 0.24;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 50%, transparent 100%),
    linear-gradient(rgba(12, 24, 43, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 24, 43, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  mask-image: radial-gradient(circle at center, black 44%, transparent 88%);
}

body.ds-library::after {
  opacity: 0.12;
  background:
    linear-gradient(120deg, transparent 0%, color-mix(in srgb, var(--page-accent) 22%, transparent) 46%, transparent 64%),
    linear-gradient(160deg, transparent 8%, color-mix(in srgb, var(--page-support) 18%, transparent) 54%, transparent 72%);
  animation: beam-sweep 14s linear infinite;
}

body.ds-library .app-shell {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

body.ds-library .site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin-bottom: 18px;
}

body.ds-library .header-bar {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  color: #f9fbff;
  background:
    linear-gradient(135deg, rgba(7, 15, 27, 0.96), rgba(16, 33, 57, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(7, 16, 31, 0.26);
  backdrop-filter: blur(18px);
  clip-path: var(--clip-panel);
}

body.ds-library .header-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 0 14px;
  color: var(--slate-700);
}

body.ds-library .header-subbar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

body.ds-library .brand-lockup {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

body.ds-library .brand-mark-pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.ds-library .brand-mark-pair img:first-child {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

body.ds-library .brand-beam {
  width: 52px;
  height: 2px;
  background: linear-gradient(90deg, rgba(232, 255, 0, 0), rgba(232, 255, 0, 0.92), rgba(232, 255, 0, 0));
  box-shadow: 0 0 18px rgba(232, 255, 0, 0.38);
}

body.ds-library .brand-partner-logo {
  width: 128px;
  height: auto;
  filter: brightness(1.18);
}

body.ds-library .brand-copy {
  min-width: 0;
}

body.ds-library .brand-copy strong {
  display: block;
  margin-top: 4px;
  font-family: "Archivo", sans-serif;
  font-size: 16px;
  letter-spacing: -0.04em;
}

body.ds-library .brand-copy p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

body.ds-library .mini-label,
body.ds-library .eyebrow,
body.ds-library .section-label,
body.ds-library .metric-label,
body.ds-library .pill,
body.ds-library .chip,
body.ds-library .result-score {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
}

body.ds-library .site-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

body.ds-library .site-nav::-webkit-scrollbar,
body.ds-library .tab-rail::-webkit-scrollbar {
  height: 6px;
}

body.ds-library .site-nav::-webkit-scrollbar-thumb,
body.ds-library .tab-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
}

body.ds-library .nav-link,
body.ds-library .button,
body.ds-library .ghost-button,
body.ds-library .control-button,
body.ds-library .tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    color 220ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: var(--clip-button);
}

body.ds-library .nav-link {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.ds-library .nav-link:hover,
body.ds-library .nav-link.is-active,
body.ds-library .button:hover,
body.ds-library .ghost-button:hover,
body.ds-library .control-button:hover,
body.ds-library .tab-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(7, 16, 31, 0.14);
}

body.ds-library .nav-link.is-active {
  color: #ffffff;
  background: color-mix(in srgb, var(--beam) 16%, rgba(255, 255, 255, 0.08));
  border-color: rgba(232, 255, 0, 0.34);
}

body.ds-library .button {
  color: var(--ink-975);
  background: linear-gradient(180deg, var(--beam) 0%, color-mix(in srgb, var(--beam) 70%, #c4d800) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 12px 24px rgba(232, 255, 0, 0.18);
}

body.ds-library .ghost-button,
body.ds-library .control-button {
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(9, 18, 33, 0.12);
}

body.ds-library .header-actions {
  display: inline-flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

body.ds-library .hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 34px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 84% 12%, color-mix(in srgb, var(--page-accent) 24%, transparent), transparent 18%),
    radial-gradient(circle at 12% 84%, color-mix(in srgb, var(--page-support) 18%, transparent), transparent 24%),
    linear-gradient(135deg, rgba(6, 13, 24, 0.98), rgba(19, 35, 60, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shell-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0%, rgba(255, 255, 255, 0.08) 46%, transparent 60%),
    radial-gradient(circle at 82% 24%, rgba(255, 255, 255, 0.14), transparent 24%);
  opacity: 0.42;
  pointer-events: none;
}

body.ds-library .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 24px;
  align-items: start;
}

body.ds-library .hero-copy h1 {
  margin: 12px 0 12px;
  max-width: 12ch;
  color: #fbfdff;
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

body.ds-library .hero-copy h1 span {
  color: var(--beam);
}

body.ds-library .lede,
body.ds-library .hero-kicker {
  max-width: 62ch;
  font-size: 1.04rem;
  line-height: 1.7;
}

body.ds-library .lede {
  margin: 0 0 14px;
  color: rgba(248, 251, 255, 0.92);
}

body.ds-library .hero-kicker {
  margin: 0 0 18px;
  color: rgba(248, 251, 255, 0.7);
}

body.ds-library .hero-badges,
body.ds-library .button-row,
body.ds-library .signal-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.ds-library .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

body.ds-library .hero-panel,
body.ds-library .data-card,
body.ds-library .matrix-card,
body.ds-library .resource-card,
body.ds-library .utility-card,
body.ds-library .atlas-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  color: var(--ink-950);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 253, 0.94));
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hero-panel,
body.ds-library .bevel-panel {
  color: #f8fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, rgba(10, 22, 39, 0.66), rgba(11, 23, 39, 0.62));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 32px rgba(7, 16, 31, 0.18);
}

body.ds-library .metric-grid,
body.ds-library .card-grid,
body.ds-library .resource-grid,
body.ds-library .utility-grid,
body.ds-library .program-stage-grid,
body.ds-library .journey-flow-grid {
  display: grid;
  gap: 16px;
}

body.ds-library .metric-grid,
body.ds-library .card-grid.two-up,
body.ds-library .program-stage-grid,
body.ds-library .journey-flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ds-library .resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

body.ds-library .utility-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

body.ds-library .metric-card,
body.ds-library .hero-stage-card,
body.ds-library .journey-step-card {
  padding: 18px;
  min-height: 120px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  clip-path: var(--clip-panel);
}

body.ds-library .metric-value,
body.ds-library .resource-card h3,
body.ds-library .data-card h3,
body.ds-library .matrix-card h3,
body.ds-library .utility-card h3,
body.ds-library .atlas-card h3,
body.ds-library .hero-stage-card h3,
body.ds-library .journey-step-card h3 {
  margin: 8px 0 10px;
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

body.ds-library .metric-value {
  color: #ffffff;
}

body.ds-library .metric-subtext,
body.ds-library .resource-card p,
body.ds-library .utility-card p,
body.ds-library .data-card p,
body.ds-library .matrix-card p,
body.ds-library .atlas-card p {
  margin: 0;
  line-height: 1.65;
  color: var(--slate-700);
}

body.ds-library .hero-panel p,
body.ds-library .hero-stage-card p,
body.ds-library .journey-step-card p {
  margin: 0;
  color: rgba(248, 251, 255, 0.76);
  line-height: 1.6;
}

body.ds-library .hero-panel .bullet-list,
body.ds-library .hero-panel .list,
body.ds-library .hero-panel .mini-label,
body.ds-library .hero-stage-card small,
body.ds-library .journey-step-card small {
  color: rgba(248, 251, 255, 0.84);
}

body.ds-library .section-block {
  margin-bottom: 18px;
}

body.ds-library .section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body.ds-library .section-heading h2,
body.ds-library .section-heading h3 {
  margin: 6px 0 0;
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

body.ds-library .section-heading p {
  margin: 4px 0 0;
  color: var(--slate-620);
  line-height: 1.55;
}

body.ds-library .page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

body.ds-library .sidebar-column {
  display: grid;
  gap: 18px;
}

body.ds-library .tab-shell {
  padding: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .tab-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
}

body.ds-library .tab-button {
  white-space: nowrap;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(9, 18, 33, 0.08);
}

body.ds-library .tab-button[aria-selected="true"] {
  color: var(--ink-975);
  background: color-mix(in srgb, var(--page-accent) 18%, #ffffff);
  border-color: color-mix(in srgb, var(--page-accent) 36%, rgba(9, 18, 33, 0.08));
}

body.ds-library .tab-panel {
  display: none;
}

body.ds-library .tab-panel.is-active {
  display: block;
}

body.ds-library .stack-lg {
  display: grid;
  gap: 18px;
}

body.ds-library .bullet-list,
body.ds-library .list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}

body.ds-library .callout,
body.ds-library .assembly-box {
  margin-top: 12px;
  padding: 18px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--page-accent) 9%, #ffffff), #ffffff);
  border: 1px solid rgba(9, 18, 33, 0.08);
  clip-path: var(--clip-panel);
  white-space: pre-wrap;
  line-height: 1.68;
}

body.ds-library .field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 700;
}

body.ds-library .tool-shell {
  display: grid;
  gap: 16px;
}

body.ds-library .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.ds-library .full-span {
  grid-column: 1 / -1;
}

body.ds-library .field-input,
body.ds-library .field-select,
body.ds-library .field-textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(9, 18, 33, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

body.ds-library .field-textarea {
  min-height: 120px;
  resize: vertical;
}

body.ds-library .field-input:focus,
body.ds-library .field-select:focus,
body.ds-library .field-textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--page-accent) 46%, transparent);
  outline-offset: 2px;
}

body.ds-library .assembly-box {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

body.ds-library .pill,
body.ds-library .chip,
body.ds-library .result-score {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 8px 12px;
  border: 1px solid rgba(9, 18, 33, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-950);
  clip-path: var(--clip-button);
}

body.ds-library .success,
body.ds-library .result-score {
  background: color-mix(in srgb, var(--page-accent) 16%, #ffffff);
  border-color: color-mix(in srgb, var(--page-accent) 26%, rgba(9, 18, 33, 0.08));
}

body.ds-library .table-shell {
  overflow: auto;
  border: 1px solid rgba(9, 18, 33, 0.08);
  background: rgba(255, 255, 255, 0.9);
  clip-path: var(--clip-panel);
}

body.ds-library .table-shell table {
  width: 100%;
  border-collapse: collapse;
}

body.ds-library .table-shell th,
body.ds-library .table-shell td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(9, 18, 33, 0.08);
}

body.ds-library .table-shell thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate-620);
}

body.ds-library .table-shell tbody tr:last-child td {
  border-bottom: 0;
}

body.ds-library .resource-card,
body.ds-library .utility-card,
body.ds-library .atlas-card {
  display: block;
}

body.ds-library .utility-card:hover,
body.ds-library .resource-card:hover,
body.ds-library .atlas-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lift-shadow);
}

body.ds-library .lane-prelude--experiments .matrix-card:nth-child(2n) {
  transform: translateY(18px);
}

body.ds-library .atlas-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.ds-library .atlas-card {
  min-height: 150px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)),
    linear-gradient(180deg, rgba(10, 22, 39, 0.74), rgba(11, 23, 39, 0.62));
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.08);
}

body.ds-library .atlas-card p,
body.ds-library .atlas-card h3 {
  color: #f8fbff;
}

body.ds-library .hero--context .hero-grid,
body.ds-library .hero--landing .hero-grid {
  align-items: stretch;
}

body.ds-library .hero-utility-stack,
body.ds-library .manual-stack {
  display: grid;
  gap: 14px;
}

body.ds-library .hero-stage-track,
body.ds-library .journey-stack {
  display: grid;
  gap: 12px;
}

body.ds-library .hero--experiments .hero-stage-track {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ds-library .hero--intent {
  background:
    radial-gradient(circle at 84% 12%, rgba(11, 134, 184, 0.18), transparent 22%),
    radial-gradient(circle at 14% 86%, rgba(232, 255, 0, 0.12), transparent 24%),
    linear-gradient(135deg, #071120, #0d1b30 58%, #102746);
}

body.ds-library .signal-field-panel {
  position: relative;
  min-height: 420px;
}

body.ds-library .signal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

body.ds-library .signal-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  gap: 14px;
}

body.ds-library .page-intent-lab .chip {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.1);
}

body.ds-library .page-gtm-experiments .hero {
  background:
    radial-gradient(circle at 90% 18%, rgba(208, 44, 47, 0.18), transparent 18%),
    radial-gradient(circle at 8% 90%, rgba(232, 255, 0, 0.12), transparent 22%),
    linear-gradient(135deg, #0f1727, #1f2137 52%, #37202c);
}

body.ds-library .page-gtm-experiments .metric-card,
body.ds-library .page-gtm-experiments .hero-stage-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(208, 44, 47, 0.03));
}

body.ds-library .page-context-center .hero {
  background:
    radial-gradient(circle at 84% 14%, rgba(232, 255, 0, 0.2), transparent 16%),
    radial-gradient(circle at 10% 86%, rgba(24, 79, 116, 0.18), transparent 22%),
    linear-gradient(135deg, #091222, #13233c 56%, #184f74);
}

body.ds-library .page-context-center .tab-shell,
body.ds-library .page-context-center .matrix-card,
body.ds-library .page-context-center .data-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.96));
}

body.ds-library .page-inbound-activation .hero {
  background:
    radial-gradient(circle at 88% 14%, rgba(232, 255, 0, 0.16), transparent 18%),
    radial-gradient(circle at 14% 84%, rgba(9, 70, 110, 0.22), transparent 26%),
    linear-gradient(135deg, #081220, #0d2540 54%, #09466e);
}

body.ds-library .page-inbound-activation .journey-step-card,
body.ds-library .page-inbound-activation .matrix-card {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 24px 34px rgba(7, 16, 31, 0.12);
}

body.ds-library .page-domain-mailbox .hero {
  color: var(--ink-950);
  background:
    radial-gradient(circle at 84% 14%, rgba(232, 255, 0, 0.14), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%);
  border-color: rgba(9, 18, 33, 0.08);
}

body.ds-library .page-domain-mailbox .hero-copy h1,
body.ds-library .page-domain-mailbox .lede,
body.ds-library .page-domain-mailbox .hero-kicker,
body.ds-library .page-domain-mailbox .hero-panel p,
body.ds-library .page-domain-mailbox .metric-value {
  color: var(--ink-950);
}

body.ds-library .page-domain-mailbox .hero-panel .bullet-list,
body.ds-library .page-domain-mailbox .hero-panel .list,
body.ds-library .page-domain-mailbox .hero-panel .mini-label {
  color: var(--slate-700);
}

body.ds-library .page-domain-mailbox .hero-panel,
body.ds-library .page-domain-mailbox .bevel-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.98));
  border-color: rgba(9, 18, 33, 0.08);
  box-shadow: none;
}

body.ds-library .page-domain-mailbox .matrix-card,
body.ds-library .page-domain-mailbox .data-card,
body.ds-library .page-domain-mailbox .tab-shell,
body.ds-library .page-domain-mailbox .table-shell {
  box-shadow: none;
  border-color: rgba(9, 18, 33, 0.1);
}

body.ds-library .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 18px 22px;
  color: var(--slate-700);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .footer p,
body.ds-library .footer-brand {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

body.ds-library .footer-brand {
  display: grid;
  gap: 2px;
}

body.ds-library .tool-empty[hidden] {
  display: none !important;
}

body.ds-library .tool-results {
  display: grid;
  gap: 14px;
}

body.ds-library .page-intent-lab .resource-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 251, 255, 0.95));
}

body.ds-library .page-landing .resource-card::after,
body.ds-library .page-context-center .matrix-card::after,
body.ds-library .page-gtm-experiments .resource-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--page-accent) 64%, transparent) 50%, transparent 100%);
  opacity: 0.6;
}

@keyframes beam-sweep {
  0% { transform: translateX(-6%) translateY(-2%); }
  50% { transform: translateX(5%) translateY(1%); }
  100% { transform: translateX(-6%) translateY(-2%); }
}

@media (max-width: 1180px) {
  body.ds-library .header-bar {
    grid-template-columns: 1fr;
  }

  body.ds-library .header-actions {
    justify-content: flex-start;
  }

  body.ds-library .page-grid,
  body.ds-library .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.ds-library .app-shell {
    width: min(1380px, calc(100vw - 24px));
  }

  body.ds-library .hero,
  body.ds-library .tab-shell {
    padding: 22px 18px;
  }

  body.ds-library .metric-grid,
  body.ds-library .card-grid.two-up,
  body.ds-library .program-stage-grid,
  body.ds-library .journey-flow-grid,
  body.ds-library .atlas-preview-grid,
  body.ds-library .hero--experiments .hero-stage-track {
    grid-template-columns: 1fr;
  }

  body.ds-library .form-grid {
    grid-template-columns: 1fr;
  }

  body.ds-library .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  body.ds-library .site-header {
    top: 8px;
  }

  body.ds-library .header-bar {
    padding: 14px;
  }

  body.ds-library .brand-lockup {
    grid-template-columns: 1fr;
  }

  body.ds-library .brand-mark-pair {
    flex-wrap: wrap;
  }

  body.ds-library .brand-partner-logo {
    width: 118px;
  }

  body.ds-library .hero-actions,
  body.ds-library .header-actions {
    width: 100%;
  }

  body.ds-library .hero-actions a,
  body.ds-library .header-actions a,
  body.ds-library .button-row button {
    width: 100%;
  }

  body.ds-library .hero-copy h1 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ds-library::after,
  body.ds-library .nav-link,
  body.ds-library .button,
  body.ds-library .ghost-button,
  body.ds-library .control-button,
  body.ds-library .tab-button,
  body.ds-library .resource-card,
  body.ds-library .utility-card,
  body.ds-library .atlas-card {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* DemandScience production layout overrides */
body.ds-library .landing-shell,
body.ds-library .standalone-shell {
  width: min(1360px, calc(100vw - 34px));
}

body.ds-library .site-header--hub {
  position: relative;
  top: auto;
  margin-bottom: 22px;
}

body.ds-library .hub-header-bar,
body.ds-library .resource-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(7, 15, 27, 0.98), rgba(16, 33, 57, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(7, 16, 31, 0.22);
  clip-path: var(--clip-panel);
}

body.ds-library .resource-masthead {
  position: sticky;
  top: 12px;
  z-index: 40;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 22px;
}

body.ds-library .page-context-center .resource-masthead {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

body.ds-library .page-context-center .resource-masthead__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-left: 68px;
}

body.ds-library .page-gtm-experiments .resource-masthead {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.ds-library .page-gtm-experiments .resource-backlink {
  order: 2;
  justify-self: end;
}

body.ds-library .page-gtm-experiments .brand-system {
  order: 1;
}

body.ds-library .page-gtm-experiments .resource-masthead__actions {
  grid-column: 1 / -1;
  justify-content: space-between;
}

body.ds-library .page-domain-mailbox .resource-masthead {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 247, 251, 0.97));
  border-color: rgba(9, 18, 33, 0.08);
}

body.ds-library .page-domain-mailbox .resource-backlink {
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(9, 18, 33, 0.08);
}

body.ds-library .brand-system {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body.ds-library .brand-platform-zone {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  color: #f9fbff;
  background:
    linear-gradient(135deg, rgba(10, 21, 37, 0.86), rgba(17, 36, 60, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: var(--clip-panel);
}

body.ds-library .brand-platform-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.ds-library .brand-platform-mark img {
  width: 28px;
  height: 28px;
}

body.ds-library .brand-platform-copy {
  min-width: 0;
}

body.ds-library .brand-platform-copy strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-family: "Archivo", sans-serif;
  font-size: 16px;
  letter-spacing: -0.04em;
}

body.ds-library .brand-platform-copy p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

body.ds-library .brand-partner-zone {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  clip-path: var(--clip-panel);
}

body.ds-library .brand-partner-zone small {
  margin: 0;
  color: var(--slate-620);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 800;
}

body.ds-library .brand-partner-logo {
  width: 132px;
  height: auto;
  filter: none !important;
  mix-blend-mode: normal;
}

body.ds-library .header-actions--hub,
body.ds-library .resource-masthead__actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.ds-library .resource-backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-weight: 700;
  clip-path: var(--clip-button);
}

body.ds-library .resource-backlink:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(7, 16, 31, 0.18);
}

body.ds-library .hub-page {
  display: grid;
  gap: 22px;
}

body.ds-library .hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 22px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hub-hero__copy h1 {
  margin: 10px 0 12px;
  color: var(--ink-950);
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

body.ds-library .hub-hero__copy h1 span {
  color: var(--beam);
}

body.ds-library .hub-hero__copy .lede,
body.ds-library .hub-hero__copy .hero-kicker {
  max-width: 58ch;
  color: var(--slate-700);
}

body.ds-library .hub-hero__snapshot {
  display: grid;
  gap: 14px;
}

body.ds-library .hub-summary-card,
body.ds-library .resource-band-card,
body.ds-library .manual-note {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 253, 0.94));
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hub-summary-card h3,
body.ds-library .resource-band-card h3,
body.ds-library .manual-note h3 {
  margin: 8px 0 10px;
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

body.ds-library .hub-summary-card p,
body.ds-library .resource-band-card p,
body.ds-library .manual-note p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.65;
}

body.ds-library .hub-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

body.ds-library .hub-link-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  padding: 22px;
  text-decoration: none;
  color: var(--ink-950);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 253, 0.94));
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hub-link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--lift-shadow);
}

body.ds-library .hub-link-card h3 {
  margin: 0;
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

body.ds-library .hub-link-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.6;
}

body.ds-library .hub-card-meta {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(9, 18, 33, 0.08);
}

body.ds-library .hub-card-meta span {
  color: var(--slate-620);
  font-size: 12px;
  line-height: 1.5;
}

body.ds-library .hub-card-meta strong {
  color: var(--ink-950);
  font-size: 13px;
  line-height: 1.55;
}

body.ds-library .hub-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

body.ds-library .hub-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .hub-rollout-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

body.ds-library .hub-rollout-step {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 253, 0.96));
  border: 1px solid rgba(9, 18, 33, 0.08);
  clip-path: var(--clip-panel);
}

body.ds-library .hub-rollout-step h3 {
  margin: 8px 0 6px;
  font-family: "Archivo", sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

body.ds-library .hub-rollout-step p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.6;
}

body.ds-library .utility-grid--hub {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.ds-library .resource-page {
  display: grid;
  gap: 22px;
}

body.ds-library .context-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.ds-library .context-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

body.ds-library .context-board__surface,
body.ds-library .context-board__side,
body.ds-library .context-support {
  display: grid;
  gap: 18px;
}

body.ds-library .context-board__side {
  position: sticky;
  top: 110px;
}

body.ds-library .utility-grid--context-support {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ds-library .context-workspace__rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 110px;
}

body.ds-library .context-workspace__surface {
  display: grid;
  gap: 18px;
}

body.ds-library .resource-band {
  display: grid;
  gap: 16px;
}

body.ds-library .experiment-planner {
  display: grid;
  gap: 18px;
}

body.ds-library .planner-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(220px, 0.8fr));
  gap: 16px;
}

body.ds-library .experiment-support {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.ds-library .planner-card {
  min-height: 180px;
  padding: 22px;
  color: #f8fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(145deg, #141d2f, #2a2437 58%, #4b252d);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(7, 16, 31, 0.16);
  clip-path: var(--clip-panel);
}

body.ds-library .planner-card--wide {
  background:
    radial-gradient(circle at top right, rgba(232, 255, 0, 0.16), transparent 30%),
    linear-gradient(145deg, #121b2e, #202134 56%, #3d2731);
}

body.ds-library .planner-card h3 {
  margin: 10px 0 8px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

body.ds-library .planner-card p,
body.ds-library .planner-card small {
  margin: 0;
  color: rgba(248, 251, 255, 0.8);
}

body.ds-library .resource-band--experiments {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: start;
}

body.ds-library .utility-grid--strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.ds-library .utility-grid--stack {
  grid-template-columns: 1fr;
}

body.ds-library .utility-grid--compact {
  grid-template-columns: 1fr;
}

body.ds-library .utility-grid--band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.ds-library .roadmap-banner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

body.ds-library .roadmap-banner__step {
  min-height: 150px;
  padding: 18px;
  color: #f8fbff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, #111a2b, #271e33 58%, #4a2227);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(7, 16, 31, 0.12);
  clip-path: var(--clip-panel);
}

body.ds-library .roadmap-banner__step:nth-child(2n) {
  transform: translateY(18px);
}

body.ds-library .roadmap-banner__step h3 {
  margin: 8px 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.2rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

body.ds-library .experiment-deck {
  display: grid;
  gap: 18px;
}

body.ds-library .pilot-board {
  display: grid;
  gap: 16px;
  padding: 22px;
}

body.ds-library .pilot-board__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.ds-library .pilot-board__card {
  min-height: 176px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(208, 44, 47, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: var(--clip-panel);
}

body.ds-library .pilot-board__card h3 {
  margin: 8px 0 10px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

body.ds-library .pilot-board__card p,
body.ds-library .pilot-board__card small {
  margin: 0;
  color: rgba(248, 251, 255, 0.8);
  line-height: 1.6;
}

body.ds-library .intent-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

body.ds-library .intent-console__main,
body.ds-library .intent-console__side {
  display: grid;
  gap: 18px;
}

body.ds-library .journey-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.ds-library .journey-ribbon__step {
  min-height: 150px;
  padding: 18px;
  color: #f8fbff;
  background:
    radial-gradient(circle at top right, rgba(232, 255, 0, 0.14), transparent 34%),
    linear-gradient(135deg, #091221, #0d2540 54%, #0a4f79);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 34px rgba(7, 16, 31, 0.12);
  clip-path: var(--clip-panel);
}

body.ds-library .journey-ribbon__step h3 {
  margin: 8px 0 0;
  color: #ffffff;
  font-family: "Archivo", sans-serif;
  font-size: 1.16rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

body.ds-library .inbound-story {
  display: grid;
  gap: 18px;
}

body.ds-library .chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.ds-library .chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(9, 18, 33, 0.08);
  text-decoration: none;
  font-weight: 700;
  clip-path: var(--clip-button);
}

body.ds-library .chapter-link small {
  color: var(--slate-620);
  font-size: 11px;
  letter-spacing: 0.12em;
}

body.ds-library .chapter-stack {
  display: grid;
  gap: 18px;
}

body.ds-library .chapter-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(9, 18, 33, 0.08);
  box-shadow: var(--card-shadow);
  clip-path: var(--clip-panel);
}

body.ds-library .chapter-panel--alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), color-mix(in srgb, var(--page-accent) 8%, #ffffff));
}

body.ds-library .chapter-panel__header {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

body.ds-library .chapter-panel__header h2 {
  margin: 0;
  font-family: var(--page-display, "Archivo", sans-serif);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

body.ds-library .chapter-panel__body {
  display: grid;
  gap: 14px;
}

body.ds-library .manual-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.ds-library .manual-shell__side,
body.ds-library .manual-shell__main {
  display: grid;
  gap: 18px;
}

body.ds-library .manual-shell__side {
  position: sticky;
  top: 110px;
}

body.ds-library .chapter-nav--manual {
  display: grid;
  gap: 10px;
}

body.ds-library .chapter-nav--manual .chapter-link {
  justify-content: flex-start;
}

body.ds-library .tab-shell--workspace,
body.ds-library .tab-shell--roadmap-split {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.ds-library .tab-shell--workspace-dock {
  display: grid;
  gap: 18px;
}

body.ds-library .tab-shell--workspace-dock .tab-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

body.ds-library .tab-shell--workspace-dock .tab-button {
  min-height: 54px;
  justify-content: flex-start;
}

body.ds-library .tab-panels--workspace-dock {
  min-width: 0;
}

body.ds-library .tab-shell--workspace .tab-rail,
body.ds-library .tab-shell--roadmap-split .tab-rail {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

body.ds-library .tab-shell--workspace .tab-button,
body.ds-library .tab-shell--roadmap-split .tab-button {
  width: 100%;
  justify-content: flex-start;
  min-height: 54px;
}

body.ds-library .tab-panels--workspace,
body.ds-library .tab-panels--roadmap-split {
  min-width: 0;
}

body.ds-library .tab-shell--console {
  padding: 18px;
}

body.ds-library .tab-shell--console .tab-rail {
  display: flex;
  flex-wrap: wrap;
}

body.ds-library .page-context-center .hero {
  background:
    radial-gradient(circle at 84% 14%, rgba(232, 255, 0, 0.22), transparent 16%),
    radial-gradient(circle at 10% 86%, rgba(24, 79, 116, 0.18), transparent 22%),
    linear-gradient(135deg, #091222, #13233c 56%, #184f74);
}

body.ds-library .page-gtm-experiments .hero {
  background:
    radial-gradient(circle at 90% 18%, rgba(208, 44, 47, 0.2), transparent 18%),
    radial-gradient(circle at 8% 90%, rgba(232, 255, 0, 0.12), transparent 22%),
    linear-gradient(135deg, #0f1727, #1f2137 52%, #37202c);
}

body.ds-library .page-gtm-experiments .tab-shell--roadmap-split {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 248, 0.96));
}

body.ds-library .page-intent-lab .hero {
  background:
    radial-gradient(circle at 84% 12%, rgba(11, 134, 184, 0.18), transparent 22%),
    radial-gradient(circle at 14% 86%, rgba(232, 255, 0, 0.14), transparent 24%),
    linear-gradient(135deg, #071120, #0d1b30 58%, #102746);
}

body.ds-library .page-intent-lab .resource-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 251, 255, 0.95));
}

body.ds-library .page-inbound-activation .hero {
  background:
    radial-gradient(circle at 88% 14%, rgba(232, 255, 0, 0.16), transparent 18%),
    radial-gradient(circle at 14% 84%, rgba(9, 70, 110, 0.24), transparent 26%),
    linear-gradient(135deg, #081220, #0d2540 54%, #09466e);
}

body.ds-library .page-domain-mailbox .hero {
  color: var(--ink-950);
  background:
    radial-gradient(circle at 84% 14%, rgba(232, 255, 0, 0.14), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%);
  border-color: rgba(9, 18, 33, 0.08);
}

body.ds-library .page-domain-mailbox .hero-copy h1,
body.ds-library .page-domain-mailbox .lede,
body.ds-library .page-domain-mailbox .hero-kicker,
body.ds-library .page-domain-mailbox .hero-panel p,
body.ds-library .page-domain-mailbox .metric-value {
  color: var(--ink-950);
}

body.ds-library .page-domain-mailbox .hero-panel .bullet-list,
body.ds-library .page-domain-mailbox .hero-panel .list,
body.ds-library .page-domain-mailbox .hero-panel .mini-label {
  color: var(--slate-700);
}

body.ds-library .page-domain-mailbox .hero-panel,
body.ds-library .page-domain-mailbox .bevel-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.98));
  border-color: rgba(9, 18, 33, 0.08);
  box-shadow: none;
}

body.ds-library .page-domain-mailbox .chapter-panel,
body.ds-library .page-domain-mailbox .manual-note {
  box-shadow: none;
  border-color: rgba(9, 18, 33, 0.1);
}

body.ds-library .footer {
  margin-top: 24px;
}

@media (max-width: 1240px) {
  body.ds-library .hub-card-grid,
  body.ds-library .utility-grid--hub,
  body.ds-library .roadmap-banner,
  body.ds-library .journey-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ds-library .hub-snapshot-grid,
  body.ds-library .context-board,
  body.ds-library .context-workspace,
  body.ds-library .experiment-planner,
  body.ds-library .experiment-support,
  body.ds-library .intent-console,
  body.ds-library .manual-shell,
  body.ds-library .resource-band--experiments,
  body.ds-library .pilot-board__grid {
    grid-template-columns: 1fr;
  }

  body.ds-library .context-workspace__rail,
  body.ds-library .context-board__side,
  body.ds-library .manual-shell__side {
    position: relative;
    top: auto;
  }

  body.ds-library .planner-strip,
  body.ds-library .utility-grid--context-support,
  body.ds-library .tab-shell--workspace-dock .tab-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body.ds-library .resource-masthead,
  body.ds-library .hub-header-bar {
    grid-template-columns: 1fr;
  }

  body.ds-library .tab-shell--workspace,
  body.ds-library .tab-shell--roadmap-split {
    grid-template-columns: 1fr;
  }

  body.ds-library .tab-shell--workspace .tab-rail,
  body.ds-library .tab-shell--workspace-dock .tab-rail,
  body.ds-library .tab-shell--roadmap-split .tab-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  body.ds-library .tab-shell--workspace .tab-button,
  body.ds-library .tab-shell--workspace-dock .tab-button,
  body.ds-library .tab-shell--roadmap-split .tab-button {
    width: auto;
  }

  body.ds-library .page-context-center .resource-masthead__actions,
  body.ds-library .page-gtm-experiments .resource-masthead__actions {
    padding-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.ds-library .landing-shell,
  body.ds-library .standalone-shell {
    width: min(1360px, calc(100vw - 22px));
  }

  body.ds-library .hub-hero,
  body.ds-library .hub-card-grid,
  body.ds-library .utility-grid--hub,
  body.ds-library .roadmap-banner,
  body.ds-library .journey-ribbon,
  body.ds-library .utility-grid--band {
    grid-template-columns: 1fr;
  }

  body.ds-library .brand-system {
    grid-template-columns: 1fr;
  }

  body.ds-library .brand-platform-zone {
    grid-template-columns: 1fr;
  }

  body.ds-library .resource-masthead__actions,
  body.ds-library .header-actions--hub {
    justify-content: flex-start;
  }

  body.ds-library .resource-masthead__actions a,
  body.ds-library .header-actions--hub a {
    width: 100%;
  }
}
