@font-face {
  font-family: "Instrument Sans";
  src: url("./instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

/* Final brand guide: cream canvas, indigo identity and controls, small orange
   accents for proof and wayfinding. Keep readable body copy in charcoal. */
body.brand-editorial {
  --brand: #515CA2;
  --brand-hover: #444E8A;
  --brand-pressed: #394273;
  --signal: #EC5A35;
  --paper: #FBF8F1;
  --surface: #F7F2E9;
  --ink: #202028;
  --muted: #626269;
  --line: rgba(81,92,162,.20);
  --primary: var(--brand);
  --primary-dark: var(--brand-hover);
  --secondary: var(--brand);
  --accent: var(--signal);
  --bg-white: var(--paper);
  --bg-light: var(--paper);
  --bg-gray: var(--surface);
  --bg-dark: var(--paper);
  --bg-darker: var(--surface);
  --text-dark: var(--ink);
  --text-light: var(--muted);
  --text-lighter: var(--muted);
  --text-muted: var(--muted);
  --font-heading: "Instrument Sans", Arial, sans-serif;
  --font-body: "Instrument Sans", Arial, sans-serif;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-body);
}
body.brand-editorial :is(button,input,select,textarea) { font: inherit; }
body.brand-editorial :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--font-heading);
  font-weight: 500;
  font-style: normal;
  color: var(--ink);
  text-wrap: balance;
}
body.brand-editorial strong { font-weight: 600; }
body.brand-editorial :is(p,li) { letter-spacing: normal; }
body.brand-editorial .container { max-width: 1248px; padding-inline: 32px; min-height: 0; }
body.brand-editorial main > section { margin: 0; }
body.brand-editorial main > section.container { margin-inline: auto; padding-top: 0; }
body.brand-editorial :is(a,button,[tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}
body.brand-editorial a { transition: color 150ms ease; }
body.brand-editorial .skip-link {
  position: fixed; top: 8px; left: 16px; z-index: 1100;
  padding: 12px 20px; background: var(--paper); color: var(--ink);
  transform: translateY(-150%); border: 1px solid var(--ink); border-radius: 8px;
}
body.brand-editorial .skip-link:focus { transform: none; }

/* Navigation and controls use indigo without an orange accent. */
body.brand-editorial header { padding: 16px 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
body.brand-editorial .logo { font: 600 24px/1 var(--font-body); letter-spacing: -.04em; }
body.brand-editorial .logo img { width: 32px; height: 32px; }
body.brand-editorial .nav-links { gap: 24px; margin-inline: 32px; }
body.brand-editorial .nav-links a { font-size: 14px; font-weight: 500; }
body.brand-editorial .nav-dropdown-menu { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(32,32,40,.10); }
body.brand-editorial .nav-dropdown-menu a { white-space: normal; line-height: 1.4; padding: 12px 20px; }
body.brand-editorial .nav-dropdown-menu a:hover { background: var(--surface); padding-left: 20px; }
body.brand-editorial .nav-dropdown:not(.open) .nav-dropdown-menu { visibility: hidden; opacity: 0; pointer-events: none; }
body.brand-editorial .nav-dropdown.open .nav-dropdown-menu { visibility: visible; opacity: 1; pointer-events: auto; margin-top: 0; }
body.brand-editorial .btn {
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 500 15px/1.4 var(--font-body); border: 1px solid transparent;
  box-shadow: none; transform: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
body.brand-editorial .btn-primary { background: var(--brand); color: #fff; }
body.brand-editorial .btn-primary:hover { background: var(--brand-hover); color: #fff; box-shadow: none; transform: none; }
body.brand-editorial .btn-primary:active { background: var(--brand-pressed); }
body.brand-editorial header .cta-buttons .btn + .btn { background: transparent; color: var(--brand); border-color: var(--brand); }
body.brand-editorial header .cta-buttons .btn + .btn:hover { background: var(--surface); color: var(--brand-hover); }
body.brand-editorial .btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
body.brand-editorial .btn-outline:hover { background: var(--paper); color: var(--brand-hover); transform: none; }
body.brand-editorial .btn::before, body.brand-editorial .btn::after { display: none; }
body.brand-editorial .cta-buttons { gap: 16px; flex-wrap: wrap; }

/* Pair the story and product in one hero, with proof spanning both columns. */
body.brand-editorial :is(.case-study-hero,.cs-hero,.blog-hero) {
  padding: 120px 0 48px; background: var(--paper);
  --text-muted: var(--muted); --text-light: var(--ink);
  border-bottom: 1px solid var(--line);
}
body.brand-editorial :is(.case-study-hero,.cs-hero,.blog-hero)::before { display: none; }
body.brand-editorial .breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: 13px; line-height: 1.4; }
body.brand-editorial .breadcrumb :is(a,span) { color: var(--muted); }
body.brand-editorial .breadcrumb .current { color: var(--ink); }
body.brand-editorial .breadcrumb a:hover { color: var(--brand); }
body.brand-editorial .case-study-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px 40px; align-items: center; }
body.brand-editorial :is(.case-study-header,.cs-hero,.blog-hero) h1 {
  max-width: 960px; margin: 0 0 24px;
  font-size: clamp(48px,4.2vw,64px); font-weight: 500; line-height: 1.08; letter-spacing: -.04em;
}
body.brand-editorial .case-study-header h1 { font-size: clamp(42px,3.8vw,56px); }
body.brand-editorial :is(.gradient-text,.case-study-header h1 span) { background: none; color: var(--brand); -webkit-text-fill-color: currentColor; }
body.brand-editorial :is(.lead,.case-study-header .lead,.hero-sub,.blog-hero p) {
  max-width: 65ch; margin: 0; font-size: 18px; font-weight: 400; line-height: 1.6; color: var(--muted);
}
body.brand-editorial :is(.industry-tag,.case-study-meta .industry-tag,.section-tag) {
  display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--brand); border: 0;
  padding: 0; border-radius: 0; margin-bottom: 16px;
  font-size: 13px; font-weight: 500; line-height: 1.4; text-transform: none; letter-spacing: 0;
}
body.brand-editorial :is(.industry-tag,.section-tag)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex-shrink: 0; }
body.brand-editorial .case-study-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 16px; }
body.brand-editorial .case-study-meta .industry-tag { margin: 0; }
body.brand-editorial .client-logo { max-width: 96px; margin: 0; }
body.brand-editorial .key-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; max-width: none; margin: 0; }
body.brand-editorial .case-study-header > .key-results { grid-column: 1 / -1; background: var(--brand); border-radius: 16px; padding: 24px 8px; }
body.brand-editorial .result-item { padding: 0 24px; background: transparent; border: 0; border-left: 1px solid rgba(251,248,241,.3); border-radius: 0; text-align: left; }
body.brand-editorial .result-item:first-child { border-left: 0; }
body.brand-editorial .result-item .number {
  display: block; background: none; -webkit-text-fill-color: currentColor;
  color: var(--paper); font-size: 32px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15;
}
body.brand-editorial .result-item .label { display: block; color: var(--paper); font-size: 13px; font-weight: 500; line-height: 1.4; text-transform: none; letter-spacing: 0; margin-block: 8px 0; }
body.brand-editorial .result-item .value { display: block; margin-top: 8px; color: var(--paper); font-size: 16px; line-height: 1.6; font-weight: 400; }
body.brand-editorial .hero-image-wrapper { position: relative; margin: 0; padding: 16px; background: rgba(81,92,162,.08); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
body.brand-editorial .hero-image-wrapper::before { content: ""; position: absolute; top: -2px; left: 24px; width: 48px; height: 4px; background: var(--signal); border-radius: 2px; }
body.brand-editorial .hero-image-wrapper img { display: block; width: 100%; height: auto; max-height: 440px; object-fit: contain; border-radius: 8px; box-shadow: none; }
body.brand-editorial :is(.hero-image-wrapper figcaption,.content-figure figcaption) { color: var(--muted); font-size: 14px; line-height: 1.6; font-style: normal; margin-top: 16px; }

/* Reading sections and warm component surfaces. */
body.brand-editorial :is(.case-study-content,.case-study-section,.cs-listing) { padding: 64px 0; background: var(--paper); }
body.brand-editorial .content-section { margin-bottom: 48px; }
body.brand-editorial .content-section:last-child { margin-bottom: 0; }
body.brand-editorial :is(.content-section,.section-shell,.section-header,.cs-cta,.case-study-cta) h2 {
  font-size: clamp(36px,3.6vw,48px); line-height: 1.08; letter-spacing: -.04em; font-weight: 500; color: var(--brand); margin-bottom: 24px;
}
body.brand-editorial :is(.content-section,.section-shell) h3 { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; font-weight: 500; color: var(--ink); margin-bottom: 16px; }
body.brand-editorial :is(.content-section,.section-shell) :is(p,li) { font-size: 17px; line-height: 1.6; color: var(--muted); }
body.brand-editorial :is(.content-section,.section-shell) > p { max-width: 70ch; margin-bottom: 24px; }
body.brand-editorial .content-section li::before { background: var(--brand); width: 5px; height: 5px; }
body.brand-editorial .two-column { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
body.brand-editorial :is(.two-column,.case-study-header,.hero-side) > * { min-width: 0; }
body.brand-editorial :is(.highlight-box,.quote-block,.agent-card,.tech-item,.obs-item,.tier-item,.concept-card,.architecture-card,.timeline-step,.loop-strip) {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; padding: 24px; color: var(--ink);
}
body.brand-editorial :is(.highlight-box,.quote-block) { padding: 32px; margin-block: 32px; }
body.brand-editorial .highlight-box { border-left: 3px solid var(--signal); }
body.brand-editorial .quote-block { border-left: 3px solid var(--brand); background: rgba(81,92,162,.06); }
body.brand-editorial :is(.highlight-box,.agent-card,.workflow-step-content) h4 { color: var(--ink); font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.025em; margin-bottom: 16px; }
body.brand-editorial :is(.agent-card,.tier-item,.timeline-step) p { font-size: 16px; margin-bottom: 0; }
body.brand-editorial .agent-card:hover { border-color: var(--line); }
body.brand-editorial :is(.tech-name,.obs-label,.tier-item h5) { color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.4; }
body.brand-editorial :is(.tech-role,.obs-desc) { color: var(--muted); font-size: 14px; line-height: 1.6; }
body.brand-editorial :is(.obs-icon,.agent-card h4 i) { background: transparent; color: var(--brand); }
body.brand-editorial :is(.workflow-step-number,.timeline-step .step-number) {
  background: transparent; color: var(--signal); border: 0; border-radius: 0;
  font-size: 24px; font-weight: 500; line-height: 1.15; padding: 0;
}
body.brand-editorial .section-shell { background: var(--paper); box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 32px 0; max-width: none; }
body.brand-editorial .section-shell:first-child { padding-top: 0; border: 0; }
body.brand-editorial .section-shell + .section-shell { margin-top: 16px; }
body.brand-editorial .timeline-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
body.brand-editorial .content-section code { background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
body.brand-editorial .content-figure img { border-radius: 16px; box-shadow: none; }
body.brand-editorial .content-section img[style] { box-shadow: none !important; }
body.brand-editorial .matrix { display: block; overflow-x: auto; max-width: 100%; border-spacing: 0; font-size: 16px; }
body.brand-editorial .matrix :is(th,td) { border-color: var(--line); padding: 16px; color: var(--ink); font-size: 16px; }
body.brand-editorial .matrix th { background: var(--surface); font-weight: 500; }
body.brand-editorial .matrix tr:nth-child(even) td { background: var(--surface); }
body.brand-editorial .tier-item { border-left: 3px solid var(--brand); }
body.brand-editorial .tier-item h5 { margin-bottom: 12px; }
body.brand-editorial .diagram-wrapper { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
body.brand-editorial .diagram-wrapper svg { min-width: 640px; }
body.brand-editorial .mermaid { background: transparent; }

/* Editorial collections. Existing article artwork is preserved. */
body.brand-editorial .cs-listing .section-header { text-align: left; max-width: none; margin: 0 0 32px; }
body.brand-editorial .cs-listing { padding-top: 48px; }
body.brand-editorial .cs-listing .section-header { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 32px; align-items: end; }
body.brand-editorial .cs-listing .section-tag { justify-self: start; margin: 0; box-shadow: none; }
body.brand-editorial .cs-listing .section-header h2 { grid-column: 1; margin: 0; }
body.brand-editorial .cs-listing .section-header p { grid-column: 2; grid-row: 1 / span 2; }
body.brand-editorial .cs-listing .section-header p { max-width: 68ch; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
body.brand-editorial :is(.case-studies-grid,.blog-grid) { gap: 24px; }
body.brand-editorial .blog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); padding-block: 40px 64px; }
body.brand-editorial .blog-hero { padding-block: 112px 32px; }
body.brand-editorial .blog-hero h1 { margin-bottom: 16px; color: var(--brand); }
body.brand-editorial .blog-hero h1::before { content: ""; display: block; width: 32px; height: 4px; margin-bottom: 16px; background: var(--signal); border-radius: 2px; }
body.brand-editorial .blog-hero p { max-width: 60ch; }
body.brand-editorial :is(.cs-card,.blog-card) { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; transition: border-color 150ms ease; }
body.brand-editorial :is(.cs-card,.blog-card):hover { transform: none; box-shadow: none; border-color: var(--brand); }
body.brand-editorial :is(.cs-card-image,.blog-card-image) { height: auto; aspect-ratio: 16/9; background: var(--surface); border-bottom: 1px solid var(--line); }
body.brand-editorial :is(.cs-card-image,.blog-card-image) img { width: 100%; height: 100%; object-fit: cover; transform: none !important; }
body.brand-editorial .blog-card-image img[src$=".svg"] { background: var(--surface); object-fit: contain; }
body.brand-editorial :is(.cs-card-content,.blog-card-body) { padding: 24px; }
body.brand-editorial :is(.cs-card-content h3,.blog-card-body h2) { font-size: 24px; font-weight: 500; line-height: 1.15; letter-spacing: -.025em; color: var(--brand); margin-bottom: 12px; }
body.brand-editorial :is(.cs-card-content .cs-quote,.blog-card-body p) { font: 400 16px/1.6 var(--font-body); color: var(--muted); margin-bottom: 16px; }
body.brand-editorial .blog-card-body p { flex: none; }
body.brand-editorial .blog-card-body .read-more { margin-top: auto; padding-top: 8px; }
body.brand-editorial .cs-read-more i { color: var(--signal); }
body.brand-editorial .blog-card-meta::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 50%; background: var(--signal); }
body.brand-editorial :is(.cs-card-content .cs-read-more,.blog-card-body .read-more) { color: var(--brand); font-size: 14px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
body.brand-editorial .blog-card-meta { font-size: 13px; line-height: 1.4; color: var(--muted); margin-bottom: 16px; }
body.brand-editorial .cs-card-author .cs-author-name { font-size: 14px; font-weight: 500; color: var(--ink); }
body.brand-editorial .cs-card-author .cs-author-title { font-size: 13px; color: var(--muted); }

body.brand-editorial :is(.case-study-cta,.cs-cta) { padding: 64px 0; background: var(--brand); --text-muted: var(--paper); --text-light: var(--paper); border-top: 0; text-align: center; }
body.brand-editorial :is(.case-study-cta,.cs-cta) h2 { max-width: 900px; margin-inline: auto; color: var(--paper); }
body.brand-editorial :is(.case-study-cta,.cs-cta) h2::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 24px; background: var(--signal); border-radius: 2px; }
body.brand-editorial :is(.case-study-cta,.cs-cta) p { color: var(--paper); font-size: 18px; line-height: 1.6; max-width: 65ch; margin: 0 auto 24px; }
body.brand-editorial :is(.case-study-cta,.cs-cta) .btn-primary { background: var(--paper); color: var(--brand); }
body.brand-editorial :is(.case-study-cta,.cs-cta) .btn-outline { border-color: var(--paper); color: var(--paper); }
body.brand-editorial :is(.case-study-cta,.cs-cta) .btn:hover { background: #fff; color: var(--brand-hover); }
body.brand-editorial :is(.case-study-cta,.cs-cta) .cta-buttons { justify-content: center; width: auto; flex-direction: row; }

body.brand-editorial footer { background: var(--paper); padding: 64px 0 32px; border-top: 1px solid var(--line); }
body.brand-editorial footer::before, body.brand-editorial footer::after { display: none; }
body.brand-editorial .footer-grid { border-color: var(--line); }
body.brand-editorial .footer-logo { align-items: flex-start; text-align: left; }
body.brand-editorial .footer-logo > img { width: 40px; height: 40px; }
body.brand-editorial .footer-logo p { max-width: 30ch; color: var(--muted); font-size: 16px; }
body.brand-editorial .footer-links-column h3 { font-size: 16px; font-weight: 500; letter-spacing: 0; padding: 0; }
body.brand-editorial .footer-links-column h3::after { display: none; }
body.brand-editorial .footer-links-column ul li a { font-size: 14px; line-height: 1.6; color: var(--muted); padding-block: 4px; }
body.brand-editorial .footer-links-column ul li a:hover { padding-left: 0; color: var(--brand); }
body.brand-editorial .footer-links-column ul li a::before { display: none; }
body.brand-editorial .social-links a { width: 44px; height: 44px; background: var(--surface); border-color: var(--line); color: var(--brand); box-shadow: none; }
body.brand-editorial .social-links a::before { display: none; }
body.brand-editorial .social-links a:hover { color: var(--brand-hover); background: var(--paper); transform: none; box-shadow: none; border-color: var(--brand); }
body.brand-editorial .footer-bottom, body.brand-editorial .legal-links a { font-size: 13px; color: var(--muted); }

@media (max-width: 1050px) {
  body.brand-editorial .nav-wrapper { right: 0; width: min(360px,calc(100vw - 24px)); max-width: calc(100vw - 24px); background: var(--paper); transform: translateX(110%); visibility: hidden; pointer-events: none; transition: transform 180ms ease, visibility 180ms ease; }
  body.brand-editorial.menu-open .nav-wrapper { transform: none; visibility: visible; pointer-events: auto; }
  body.brand-editorial .nav-links { margin: 0 0 24px; gap: 0; }
  body.brand-editorial .nav-links > li > a { font-size: 16px; min-height: 48px; }
  body.brand-editorial .nav-dropdown:not(.open) .nav-dropdown-menu { display: none; }
  body.brand-editorial .nav-dropdown.open .nav-dropdown-menu { display: block; }
  body.brand-editorial .nav-dropdown-menu a { min-height: 44px; padding: 12px 0; }
  body.brand-editorial .mobile-menu-toggle { min-height: 44px; min-width: 44px; }
  body.brand-editorial .blog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  body.brand-editorial .container { padding-inline: 24px; }
  body.brand-editorial :is(.case-study-hero,.cs-hero,.blog-hero) { padding: 104px 0 32px; }
  body.brand-editorial :is(.case-study-header,.cs-hero,.blog-hero) h1 { font-size: clamp(42px,7vw,56px); line-height: 1.08; }
  body.brand-editorial .breadcrumb { margin-bottom: 24px; }
  body.brand-editorial :is(.case-study-content,.case-study-section,.cs-listing) { padding-block: 40px; }
  body.brand-editorial .content-section { margin-bottom: 40px; }
  body.brand-editorial .cs-listing .section-header { grid-template-columns: minmax(0,1fr); gap: 16px; }
  body.brand-editorial .cs-listing .section-header p { grid-column: 1; grid-row: auto; }
  body.brand-editorial :is(.two-column,.case-study-header,.case-studies-grid,.blog-grid,.agent-grid,.obs-grid,.tier-grid,.timeline-grid) { grid-template-columns: minmax(0,1fr); gap: 24px; }
  body.brand-editorial .key-results { grid-template-columns: minmax(0,1fr); }
  body.brand-editorial .case-study-header > .key-results { padding: 0 24px; gap: 0; }
  body.brand-editorial .result-item { padding: 20px 0; border-left: 0; border-top: 1px solid rgba(251,248,241,.3); }
  body.brand-editorial .result-item:first-child { border-top: 0; }
  body.brand-editorial :is(.highlight-box,.quote-block,.diagram-wrapper) { padding: 24px; }
  body.brand-editorial :is(.case-study-cta,.cs-cta) { padding-block: 56px; }
  body.brand-editorial :is(.case-study-cta,.cs-cta) .cta-buttons { flex-direction: column; align-items: stretch; }
  body.brand-editorial .footer-links-column { text-align: left; }
  body.brand-editorial .footer-links-column ul li a { justify-content: flex-start; }
}
@media (max-width: 480px) {
  body.brand-editorial .container { padding-inline: 20px; }
  body.brand-editorial :is(.cs-card-content,.blog-card-body) { padding: 24px; }
  body.brand-editorial .tech-grid { grid-template-columns: minmax(0,1fr); }
  body.brand-editorial .logo { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.brand-editorial *, body.brand-editorial *::before, body.brand-editorial *::after { animation: none !important; transition: none !important; }
}
/* Content is available even when an optional animation CDN cannot load. */
body.brand-editorial [data-aos] { opacity: 1 !important; transform: none !important; }
