/* The native guides keep their content and controls inside the same paper frame as the V2 home. */
html:is([data-soceo-editorial-page], [data-soceo-editorial-destination]) {
  --destination-paper: #faf9f6;
  --destination-panel: #fffefd;
  --destination-lilac: #eee8f4;
  --destination-ink: #292139;
  --destination-muted: #62576e;
  --destination-accent: #654587;
  --destination-rule: #d8cfe0;
  --destination-grain: url("/assets/soceo-editorial-paper.png");
}
html[data-soceo-editorial-destination] {
  color-scheme: light;
  --soceo-brand-paper: var(--destination-paper);
  --soceo-brand-cream: var(--destination-lilac);
  --soceo-brand-line: var(--destination-rule);
  --soceo-brand-ink: var(--destination-ink);
  --soceo-brand-muted: var(--destination-muted);
  --soceo-brand-purple: var(--destination-accent);
  --soceo-brand-deep: #332842;
  background-color: var(--destination-paper) !important;
}
html[data-soceo-editorial-destination] body {
  background-color: var(--destination-paper) !important;
}
html[data-soceo-editorial-destination] :is(main[class*="page"], .mix-platform-hero, .soceo-shell-host--bottom) {
  box-sizing: border-box;
  width: 96%;
  margin-inline: auto;
}
html[data-soceo-editorial-destination] main[class*="page"] {
  border-inline: 1px solid var(--destination-rule);
  background-color: var(--destination-paper);
}
html[data-soceo-editorial-destination] :is(main[class*="page"] h1, .mix-platform-hero h1) {
  font-family: "Bricolage Grotesque", Inter, Arial, sans-serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.04em;
  text-wrap: balance;
}
html[data-soceo-editorial-destination] main[class*="page"] :is(h2, h3) {
  font-family: "Bricolage Grotesque", Inter, Arial, sans-serif;
}

/* Openings use the actual paper asset, two open guides and space for the native illustration. */
html[data-soceo-editorial-destination] :is(main[class*="page"], .mix-platform-root) :is(
    .mix-connect-hero, .mix-plan-hero, .mix-age-hero, .mix-controla-hero,
    .mix-platform-hero, .mix-platform-hero-fallback, .mix-connectors-hero, .mix-connect-subpage-hero, .mix-controla-subpage__hero,
    .mix-agents-hero, .mix-apis-hero, .mix-model-center-comparator, .mix-security-hero, .mix-roadmap-content,
    .mix-hub-hero, .mix-blog-hero, .mix-post-head, .mix-materials-finder, .mix-tools-hero, .mix-newsletter-hero,
    .mix-faculty-hero, .mix-support-hero, .mix-support-splash, .mix-vision-hero, .mix-mission-hero, .mix-values-hero,
    .mix-story-hero, .mix-purpose-hero, .mix-ethics-hero
), html[data-soceo-editorial-destination] main.ds-page {
  background:
    linear-gradient(var(--destination-rule), var(--destination-rule)) left 19px top / 1px 100% no-repeat,
    linear-gradient(var(--destination-rule), var(--destination-rule)) right 19px top / 1px 100% no-repeat,
    var(--destination-grain) 0 0 / 128px 128px repeat,
    var(--destination-paper);
  color: var(--destination-ink);
}
html[data-soceo-editorial-destination] main.ds-page {
  --ds-paper: var(--destination-panel);
  --ds-cream: var(--destination-paper);
  --ds-purple: var(--destination-accent);
  --ds-line: var(--destination-rule);
}
html[data-soceo-editorial-destination] main[class*="page"] :is(
  .ds-tools, .mix-connectors-mosaic, .mix-agents-hero-visual, .mix-apis-flow,
  .mix-security-hero-chain, .mix-platform-map, .mix-platform-context-map,
  .mix-mission-hero__diagram, .mix-values-hero__sequence, .mix-purpose-sequence,
  .mix-ethics-hero__note, .mix-tools-hero__diagram, .mix-support-hero__visual, .mix-support-splash__visual,
  .mix-connect-subpage-hero-visual, .mix-controla-subpage__hero-visual,
  .mix-controla-subpage__showcase-frame
) {
  border: 1px solid #c7b8d1;
  border-radius: 6px;
  background: radial-gradient(#cbbbd3 .75px, transparent .9px) 0 0 / 8px 8px, #f2edf5;
  color: var(--destination-ink);
  box-shadow: 4px 4px 0 #e9e2ef;
}
/* Keep the four stages on one reading axis as the sequence is revealed. */
html[data-soceo-editorial-destination] main.mix-purpose-page .mix-purpose-sequence {
  background: var(--destination-panel);
  border-color: var(--destination-rule);
  box-shadow: 3px 3px 0 var(--destination-lilac);
}
html[data-soceo-editorial-destination] .mix-purpose-sequence__caption {
  border-color: var(--destination-rule);
}
html[data-soceo-editorial-destination] main .mix-purpose-sequence li {
  display: flex;
  justify-content: start;
  gap: clamp(10px, 1vw, 16px);
  min-height: 62px;
  border-color: var(--destination-rule);
  text-align: start;
}
html[data-soceo-editorial-destination] main .mix-purpose-sequence li span {
  color: var(--destination-ink);
  line-height: 1.22;
}
html[data-soceo-editorial-destination] main .mix-purpose-sequence li b {
  margin-inline-start: auto;
  color: var(--destination-accent);
  font-family: "DM Mono", monospace;
  font-weight: 500;
}
html[data-soceo-editorial-destination] main .mix-purpose-sequence .is-traced {
  background: transparent;
}
html[data-soceo-editorial-destination] main .mix-purpose-sequence li > svg.ink-emblem {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--destination-rule);
  border-radius: 5px;
  background: #f5eff7;
}
html[data-soceo-editorial-destination] main .mix-story-hero__art {
  background: radial-gradient(ellipse at center, #fffefd 10%, #eee6f4 72%);
  border-color: #beaccb;
  box-shadow: none;
}
html[data-soceo-editorial-destination] main :is(.mix-story-hero__art-word, .mix-story-hero__art-word span,
    .mix-ethics-hero__note :is(span,p), .mix-purpose-sequence :is(p,b),
    .mix-values-hero__sequence :is(p,small), .mix-mission-hero__diagram-head, .mix-mission-hero__diagram > p,
    .mix-security-hero-chain__head h2, .mix-security-hero-chain figcaption,
    .mix-tools-hero__diagram :is(strong,span), .mix-support-hero__visual figcaption) { color: var(--destination-ink); }
html[data-soceo-editorial-destination] main :is(.mix-mission-orbit__label, .mix-story-hero__art-caption) {
  color: var(--destination-ink);
  background: var(--destination-panel);
  border-color: var(--destination-rule);
}
html[data-soceo-editorial-destination] main .mix-story-hero__orbit { border-color: #ab92bf; }
html[data-soceo-editorial-destination] .ds-filters button {
  color: var(--destination-ink);
  border-color: var(--destination-rule);
  background: var(--destination-panel);
}
html[data-soceo-editorial-destination] .ds-filters button span { color: var(--destination-muted); }
html[data-soceo-editorial-destination] .ds-filters button[aria-pressed="true"] {
  color: var(--destination-ink);
  border-color: #9d80b4;
  background: #e8def0;
}
html[data-soceo-editorial-destination] .ds-tools button:focus-visible { outline-color: var(--destination-accent); }

/* Full-width reading chapters continue in lilac. Self-contained product consoles retain their own controls. */
html[data-soceo-editorial-destination] main[class*="page"] :is(
  .mix-connectors-source-context, .mix-connectors-permissions-close,
  .mix-platform-age, .mix-platform-final, .mix-agents-path, .mix-agents-ecosystem, .mix-agents-final,
  .mix-model-center-cases, .mix-model-center-cta, .mix-model-center-cta__panel, .mix-apis-developer, .mix-apis-authority,
  .mix-apis-final, .mix-security-governance, .mix-ai-gateway-path, .mix-ai-gateway-routing, .mix-ai-gateway-final,
  .mix-roadmap-cta, .mix-blog-cta, .mix-materials-blog-cta, .mix-support-section--partner-offer, .mix-support-contact,
  .mix-mission-statement, .mix-mission-close, .mix-vision-promise, .mix-values-lab, .mix-story-solo,
  .mix-story-foundation, .mix-story-next, .mix-purpose-method, .mix-ethics-contact,
  .mix-controla-subpage__showcase, .mix-controla-subpage__handoff,
  .mix-connect-subpage-governance, .mix-connect-subpage-proof, .mix-connect-subpage-final
) {
  color: var(--destination-ink);
  border-color: var(--destination-rule);
  background: var(--destination-grain) 0 0 / 128px 128px repeat, var(--destination-lilac);
  & :is(h1,h2,h3,blockquote,p):not(:where(figure *, article *, form *, button *, a *, pre *, [role="tabpanel"] *, [class*="console"] *)) {
    color: var(--destination-ink);
  }
}
html[data-soceo-editorial-destination] main :is(.mix-connect-subpage-proof__facts li, .mix-connect-subpage-hero-visual > figcaption,
    .mix-controla-subpage__hero-visual figcaption, .mix-controla-subpage__hero-alert, .mix-controla-subpage__hero-lineage) {
  border: 1px solid var(--destination-rule);
  color: var(--destination-ink);
  background: var(--destination-panel);
  border-radius: 4px;
  backdrop-filter: none;
}
html[data-soceo-editorial-destination] main.mix-controla-subpage {
  --controla-dark-soft: #f4eff7;
  --motor-panel-border: var(--destination-rule);
}
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.mix-controla-subpage__hero-alert, .mix-controla-subpage__hero-lineage,
  .mix-controla-subpage__showcase-frame) :is(span, strong, b, small, dt, dd, p, h3, em, button, li) { color: var(--destination-ink); }
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.mix-controla-subpage__showcase-controls button,
  .mix-controla-subpage__kpi-frame, .mix-controla-subpage__kpi-frame li, .mix-controla-subpage__lineage-path li,
  .mix-controla-subpage__hero-lineage li, .mix-controla-subpage__hero-alert dl > div,
  .mix-controla-subpage__alert-evidence > div) {
  background: var(--destination-panel);
  border-color: var(--destination-rule);
}
html[data-soceo-editorial-destination] main.mix-controla-subpage .mix-controla-subpage__showcase-controls button[aria-pressed="true"] {
  color: var(--destination-ink);
  background: #e4d9ee;
  border-color: #977bab;
}
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.is-observed, .is-fact) { stroke: #382d49; }
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.is-projection, .is-projected) { stroke: #845e9e; }
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.is-limit-line, .is-threshold) { stroke: #a44355; }
html[data-soceo-editorial-destination] main.mix-controla-subpage .is-limit { color: #8a3448; background: #fff7f8; }
html[data-soceo-editorial-destination] main.mix-controla-subpage :is(.mix-controla-subpage__hero-chart, .mix-controla-subpage__alert-plot) {
  background: repeating-linear-gradient(0deg,#ded5e3 0 1px, transparent 1px 20%);
}
html[data-soceo-editorial-destination] main :is(.mix-motor-section-head > div > span, .mix-connect-subpage-proof__facts span) { color: var(--destination-muted); }

/* Text and control states that previously used white ink over the legacy artwork. */
html[data-soceo-editorial-destination] main[class*="page"] :is(
  .mix-agents-path__signal, .mix-connectors-architecture__node p,
  .mix-platform-age .mix-platform-section-index, .mix-platform-final > div > span,
  .mix-model-center-cases :is(small, li), .mix-ai-gateway-routing :is(strong,span),
  .mix-ai-gateway-final p, .mix-apis-dev-note small, .mix-apis-final__inner > small,
  .mix-roadmap-cta span, .mix-support-hero__core span,
  .mix-mission-statement__foot :is(span,a), .mix-mission-close__links a,
  .mix-values-hero__sequence li span, .mix-values-lab article p,
  .mix-story-solo small, .mix-story-foundation__intro > span,
  .mix-story-foundation__visual-word, .mix-story-foundation__visual-caption,
  .mix-story-foundation__step-label, .mix-story-foundation__step p, .mix-story-foundation strong,
  .mix-story-next h2 span, .mix-ethics-contact__links a, .mix-purpose-sequence__caption
) { color: var(--destination-ink); }
html[data-soceo-editorial-destination] main[class*="page"] :is(
  .mix-agents-ecosystem .mix-agents-cta--light, .mix-ai-gateway-final .mix-ai-gateway-cta--ghost,
  .mix-connect-subpage-final__layout, .mix-controla-subpage__handoff > .mix-motor-inner
) {
  color: var(--destination-ink);
  background: var(--destination-panel);
  border: 1px solid var(--destination-rule);
  border-radius: 5px;
  backdrop-filter: none;
}
html[data-soceo-editorial-destination] main .mix-agents-ecosystem .mix-agents-cta--light span,
html[data-soceo-editorial-destination] main .mix-ai-gateway-final .mix-ai-gateway-cta--ghost span {
  color: inherit;
}
html[data-soceo-editorial-destination] :is(main[class*="page"], .mix-platform-root) :is(
  .mix-platform-start, .mix-mission-hero__copy > a, .mix-connect-subpage-cta--primary, .mix-motor-cta--primary,
  .mix-agents-cta--violet, .mix-apis-cta--primary, .mix-support-cta--primary
) {
  color: #fff;
  background: #111c3b;
  border: 1px solid #111c3b;
  border-radius: 4px;
  box-shadow: none;
}
html[data-soceo-editorial-destination] :is(main[class*="page"], .mix-platform-root) :is(
  .mix-platform-start, .mix-mission-hero__copy > a, .mix-connect-subpage-cta--primary, .mix-motor-cta--primary,
  .mix-agents-cta--violet, .mix-apis-cta--primary, .mix-support-cta--primary
):is(:hover, :focus-visible) { background: #393451; color: #fff; }

html[data-soceo-editorial-destination] main .mix-governance-module {
  --mix-governance-surface: var(--destination-lilac);
  --mix-governance-panel: var(--destination-panel);
  --mix-governance-panel-soft: #f5f1f7;
  --mix-governance-exception: #e8def2;
  --mix-governance-line: var(--destination-rule);
  --mix-governance-line-strong: #a393b3;
  --mix-governance-violet: var(--destination-accent);
  --mix-governance-text: var(--destination-ink);
  --mix-governance-muted: var(--destination-muted);
  font-family: Inter, Arial, sans-serif;
}
html[data-soceo-editorial-destination] main .mix-apis-authority-node {
  background: var(--destination-panel);
  border-color: var(--destination-rule);
}
html[data-soceo-editorial-destination] main :is(.mix-apis-authority-node > span, .mix-apis-authority-node p,
  .mix-governance-table thead th, .mix-governance-person-role, .mix-governance-person-separator,
  .mix-governance-budget small, .mix-governance-chip-group h3,
  .mix-governance-example-badge, .mix-governance-panel-instruction, .mix-connect-subpage-final .mix-connect-subpage-eyebrow,
  .mix-values-lab .mix-values-case p, .mix-values-lab [role="tabpanel"] p, .mix-values-lab__tabs button, .mix-values-lab__tabs button span) {
  color: var(--destination-muted);
}
html[data-soceo-editorial-destination] main .mix-governance-budget small[data-direction="down"] { color: #286350; }
html[data-soceo-editorial-destination] main .mix-values-lab__tabs button[aria-selected="true"] {
  background: #e2d6ed;
  color: var(--destination-ink);
}
html[data-soceo-editorial-destination] main.mix-controla-subpage .mix-controla-subpage__kpi-frame {
  & [data-controla-kpi-field] { background: var(--destination-panel); }
  &[data-controla-current-key="value"] [data-controla-kpi-field="value"],
  &[data-controla-current-key="formula"] [data-controla-kpi-field="formula"],
  &[data-controla-current-key="target"] [data-controla-kpi-field="target"],
  &[data-controla-current-key="period"] [data-controla-kpi-field="period"],
  &[data-controla-current-key="freshness"] [data-controla-kpi-field="freshness"],
  &[data-controla-current-key="projection"] [data-controla-kpi-field="projection"] {
    background: #e5d9ed;
    border-left-color: var(--destination-accent);
  }
}

html[data-soceo-editorial-destination] .mix-support-splash__bar {
  display: flex;
  justify-content: flex-start;
  padding-inline: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}
/* The shared header already supplies the home link. Keep the two support destinations together. */
html[data-soceo-editorial-destination] .mix-support-splash__bar :is(.mix-support-splash__brand, .mix-support-splash__return) { display: none; }
html[data-soceo-editorial-destination] .mix-support-splash__nav { border: 1px solid var(--destination-rule); border-radius: 5px; }
html[data-soceo-editorial-destination] .mix-support-splash__visual :is(.mix-support-splash__visual-caption span, .mix-support-splash__visual-center span) { color: var(--destination-ink); }

@media (max-width: 700px) {
  html[data-soceo-editorial-destination] :is(main[class*="page"], .mix-platform-hero, .soceo-shell-host--bottom) {
    width: 100%;
    border-inline: none;
  }
  html[data-soceo-editorial-destination] :is(main[class*="page"] h1, .mix-platform-hero h1) {
    font-size: clamp(2.35rem, 8vw, 3.7rem);
    overflow-wrap: break-word;
  }
}

/* Native diagrams can also appear in motor guides and in the embedded gateway.
   Set the surface and its ink together wherever these paper panels are reused. */
html[data-soceo-collection] main.ed-collection .mix-connectors-source-context {
  background: var(--destination-grain) 0 0 / 128px 128px, #eef3ef;
}
html[data-soceo-collection] main.ed-collection .mix-connectors-architecture {
  padding: clamp(10px,1.4vw,20px);
  background: #f6f8f4;
  border: 1px solid #ced8cf;
  border-radius: 5px;
}
html[data-soceo-collection] main.ed-collection :is(.mix-connectors-architecture__node,.mix-ai-gateway-path__rail li) {
  background: var(--destination-panel);
  color: var(--destination-ink);
  border: 1px solid var(--destination-rule);
  border-radius: 4px;
}
html[data-soceo-collection] main.ed-collection :is(.mix-connectors-architecture__node--context,.mix-ai-gateway-path__rail li:nth-child(4)) {
  background: #eee7f5;
  border-color: #b7a2c7;
}
html[data-soceo-collection] main.ed-collection :is(.mix-connectors-architecture__node small,.mix-connectors-proofs span,
    .mix-ai-gateway-path__rail li > span,.mix-governance-outcome span,
    .mix-connect-final__layout > div > span,.mix-connect-subpage-proof .mix-connect-subpage-eyebrow,
    .mix-story-solo__top span,.mix-story-solo__rules span,.mix-story-next__chapter,.mix-values-case__bottom span,
    .mix-vision-promise > div span,.mix-roadmap-detail-item h4) { color: var(--destination-muted); }

html[data-soceo-collection] main .agent-detail-visual--flow {
  color: var(--destination-ink);
  background: var(--destination-panel);
  border-color: var(--destination-rule);
}
html[data-soceo-collection] main .agent-detail-visual--flow :is(figcaption,.agent-detail-visual__flow-request,.agent-detail-visual__flow-track li) {
  border-color: var(--destination-rule);
}
html[data-soceo-collection] main .agent-detail-visual--flow figcaption {
  background: var(--destination-lilac);
  color: var(--destination-accent);
}
html[data-soceo-collection] main .agent-detail-visual--flow :is(strong,p) { color: var(--destination-ink); }
html[data-soceo-collection] main .agent-detail-visual--flow :is(span,small,.agent-detail-visual__flow-note) { color: var(--destination-muted); }
html[data-soceo-collection] main .agent-detail-visual--flow .agent-detail-visual__flow-transfer div { border-color: var(--destination-rule); }

html[data-soceo-collection] main.mix-age-page .mix-age-queue__control {
  background: #eee8f3;
  color: var(--destination-ink);
  border-color: var(--destination-rule);
}
html[data-soceo-collection] main.mix-age-page .mix-age-queue__control :is(span,p) { color: var(--destination-muted); }
html[data-soceo-collection] main.mix-age-page .mix-age-queue__control button:not([aria-disabled="true"]) { color: white; background: #111c3b; }
html[data-soceo-collection] main.mix-age-page .mix-age-queue__control button:hover:not([aria-disabled="true"]) { background: #49365d; }
html[data-soceo-collection] main .mix-agesub-hero-visual[data-illustration-artifact] .mix-agesub-cascade li:last-child {
  color: #292139;
  background: #e4ede7;
  border-color: #a4beae;
}
html[data-soceo-collection] main .mix-agesub-hero-visual[data-illustration-artifact] .mix-agesub-cascade li:last-child > :is(span,small,strong) { color: inherit; }
html[data-soceo-collection] main.ed-collection .mix-connect-subpage-proof__facts .mix-connect-subpage-proof__status { color: #315d4b; background: #e4efe6; }

html[data-soceo-collection] main.mix-security-page .mix-security-closing {
  padding-block: clamp(48px,6vw,88px);
}
html[data-soceo-collection] main.mix-security-page .mix-security-final { align-items: center; gap: clamp(24px,5vw,78px); }
html[data-soceo-collection] main.mix-security-page .mix-security-final .mix-security-cta {
  border: 1px solid #111c3b;
  color: #fff;
  background: #111c3b;
  border-radius: 3px;
  box-shadow: none;
}
html[data-soceo-collection] main.mix-security-page .mix-security-final .mix-security-cta--ghost {
  background: var(--destination-panel);
  color: var(--destination-ink);
  border-color: #8d789f;
}
html[data-soceo-collection] main.mix-security-page .mix-security-final .mix-security-cta:is(:hover,:focus-visible) {
  color: white;
  background: #49365d;
}
html[data-soceo-collection] main.mix-security-page .mix-security-final .mix-security-cta:focus-visible { outline: 2px solid #654587; outline-offset: 4px; }
