/* Dark theme: html[data-theme="dark"] (set by theme.js). Respect navy as the night sky,
   off-white type, a slightly brighter Respect blue for anything that must read as blue. */
.theme-switch { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid rgba(43, 95, 227, 0.3); background: #fff; color: #0a1730; cursor: pointer; transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.theme-switch svg { width: 17px; height: 17px; }
.theme-switch .ts-sun { display: none; }
.theme-switch:hover { border-color: #2b5fe3; color: #2b5fe3; }
.theme-switch:focus-visible { outline: 2px solid #2b5fe3; outline-offset: 3px; }
/* article pages: keep the link, TH/EN and the theme switch together on the right */
.article-header { justify-content: flex-start !important; }
.article-header .article-wordmark { margin-right: auto; }
html.theme-anim, html.theme-anim body, html.theme-anim body * { transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, fill 0.4s ease !important; }

html[data-theme="dark"] {
  color-scheme: dark;
  --d-bg: #070d1a; --d-bg2: #0a1324; --d-card: #0f1a30; --d-card2: #13213b;
  --d-line: rgba(150, 175, 220, 0.16); --d-text: #e9eef8; --d-soft: #aab6cb; --d-muted: #7f8ca5; --d-blue: #6f97ff;
  /* the site's own tokens */
  --bg: var(--d-bg); --surface: var(--d-card); --text: var(--d-text); --muted: var(--d-soft); --line: var(--d-line); --blue: var(--d-blue);
  --ink: var(--d-text); --ink-soft: var(--d-soft); --rule: var(--d-line); --brand-tint: rgba(91, 140, 255, 0.14); --brand-deep: #9db8ff; --accent: var(--d-blue);
}
html[data-theme="dark"] body { background: var(--d-bg); color: var(--d-text); }
html[data-theme="dark"] .theme-switch { background: transparent; border-color: rgba(150, 175, 220, 0.3); color: var(--d-text); }
html[data-theme="dark"] .theme-switch .ts-sun { display: block; }
html[data-theme="dark"] .theme-switch .ts-moon { display: none; }

/* ---------- header ---------- */
html[data-theme="dark"] .header, html[data-theme="dark"] .header.is-scrolled { background: rgba(7, 13, 26, 0.82) !important; border-bottom-color: var(--d-line) !important; }
html[data-theme="dark"] .company-wordmark { color: var(--d-text) !important; }
html[data-theme="dark"] .header nav { color: #c5cfe2; }
html[data-theme="dark"] .header nav a:hover { color: var(--d-blue) !important; }
html[data-theme="dark"] .menu { border-color: var(--d-line); }
html[data-theme="dark"] .menu span { background: var(--d-text); }
html[data-theme="dark"] .calculator-link { color: #c9d6f5; border-color: rgba(111, 151, 255, 0.4) !important; }
html[data-theme="dark"] .calculator-link:hover { background: rgba(91, 140, 255, 0.14); }
html[data-theme="dark"] .header-cta { background: linear-gradient(180deg, #3a6cf0 0%, #2350c8 100%) !important; }
html[data-theme="dark"] .lang-switch { background: transparent; border-color: rgba(150, 175, 220, 0.3); }
html[data-theme="dark"] .lang-switch span:not(.is-on) { color: #9fb0cc; }
@media (max-width: 700px) { html[data-theme="dark"] .header nav { background: var(--d-bg2); border-bottom-color: var(--d-line); color: var(--d-text); } }

/* ---------- hero ---------- */
html[data-theme="dark"] .product-showcase { background: var(--d-bg) !important; }
html[data-theme="dark"] .showcase-copy h1.scan-name { color: #25314a; }
html[data-theme="dark"] .showcase-copy .eyebrow { color: var(--d-blue); }
html[data-theme="dark"] .showcase-copy h2 { color: #8fb0ff; }
html[data-theme="dark"] .showcase-copy > p:not(.eyebrow) { color: var(--d-soft); }
html[data-theme="dark"] .product-link { color: var(--d-text); }
html[data-theme="dark"] .orbit-slice { background: #13213b; }
html[data-theme="dark"] .showcase-bottom { box-shadow: 0 0 0 1px var(--d-line); }
html[data-theme="dark"] .product-showcase .showcase-hint { color: var(--d-muted); }

/* ---------- about / "Respect is how we work." handwriting ---------- */
html[data-theme="dark"] .editorial-about, html[data-theme="dark"] .hw { background: transparent; }
html[data-theme="dark"] .center-heading > p:last-child, html[data-theme="dark"] .about-story p { color: var(--d-soft); }
html[data-theme="dark"] .about-story h3, html[data-theme="dark"] .center-heading h2 { color: var(--d-text); }
html[data-theme="dark"] .about-story figcaption { color: var(--d-muted); }
html[data-theme="dark"] .pill-button, html[data-theme="dark"] .solution-pills a { background: var(--d-card); border-color: var(--d-line); color: var(--d-text); }
html[data-theme="dark"] .pill-button:hover { background: var(--d-card2); border-color: rgba(111, 151, 255, 0.4); }
html[data-theme="dark"] .hw-svg path { fill: #e9eef8; stroke: #e9eef8; }
html[data-theme="dark"] .hw-type { background: linear-gradient(100deg, #e9eef8 0%, #b9cbff 48%, #7aa0ff 58%, #e9eef8 100%); -webkit-background-clip: text; background-clip: text; }

/* ---------- solutions (ps) ---------- */
html[data-theme="dark"] .ps-light, html[data-theme="dark"] .ps-name { color: #7f8ca5; }
html[data-theme="dark"] .ps-no, html[data-theme="dark"] .ps-tags, html[data-theme="dark"] .ps-count, html[data-theme="dark"] .ps-caption small { color: #6f7d97; }
html[data-theme="dark"] .ps-item.is-active .ps-no, html[data-theme="dark"] .ps-item.is-active .ps-name b, html[data-theme="dark"] .ps-item button:hover .ps-name b, html[data-theme="dark"] .ps-detail a { color: var(--d-blue); }
html[data-theme="dark"] .ps-item.is-active { border-bottom-color: var(--d-blue); }
html[data-theme="dark"] .ps-bar i { background: #1d2a44; }
html[data-theme="dark"] .ps-bar i::after { background: var(--d-blue); }
html[data-theme="dark"] .ps-nav button { background: transparent; border-color: rgba(111, 151, 255, 0.35); color: var(--d-text); }
html[data-theme="dark"] .ps-nav button:hover { background: #2b5fe3; border-color: #2b5fe3; color: #fff; }

/* ---------- smart meeting (sm2) ---------- */
html[data-theme="dark"] .sm2-caption { color: var(--d-soft); }

/* ---------- products (pshow) ---------- */
html[data-theme="dark"] .pshow-section { background: var(--d-bg); }
html[data-theme="dark"] .pshow-brand { background: #e6ebf5; border-color: transparent; color: #0a1730; }
html[data-theme="dark"] .pshow-brand:hover { background: #fff; }
html[data-theme="dark"] .pshow-brand.is-all { background: transparent; border-color: var(--d-line); color: var(--d-text); }
html[data-theme="dark"] .pshow-brand[aria-pressed="true"] { background: #2b5fe3; border-color: #2b5fe3; color: #fff; }

/* ---------- articles ---------- */
html[data-theme="dark"] .home-insights { border-color: var(--d-line); }
html[data-theme="dark"] .insight-copy h3 { color: var(--d-text); }
html[data-theme="dark"] .insight-copy p { color: var(--d-soft); }
html[data-theme="dark"] .insight-copy > .micro { color: var(--d-muted); }
html[data-theme="dark"] .insight-read { color: var(--d-text); }
html[data-theme="dark"] .insight-image > span { background: rgba(7, 13, 26, 0.85); color: var(--d-text); }

/* shared section headings */
html[data-theme="dark"] .section-heading h2 { color: var(--d-text); }
html[data-theme="dark"] .section-heading h2 .subtle, html[data-theme="dark"] .subtle { color: #7f93bd; }
html[data-theme="dark"] .section-heading > p, html[data-theme="dark"] .section-note, html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .micro { color: var(--d-muted); }
html[data-theme="dark"] .section-top { border-color: var(--d-line); }

/* ---------- Respect principle (belief) ---------- */
html[data-theme="dark"] .belief { background: var(--d-bg2); color: var(--d-text); }
html[data-theme="dark"] .belief-title h3 { color: var(--d-text); }
html[data-theme="dark"] .belief-title p, html[data-theme="dark"] .values p { color: var(--d-soft); }
html[data-theme="dark"] .belief-title h2 > span { color: #6f7d97; }
html[data-theme="dark"] .belief-title h2 > span.ink-line { background-image: linear-gradient(90deg, #e9eef8 calc(var(--ink, -10%) - 9%), #56627c calc(var(--ink, -10%) + 9%)); }
html[data-theme="dark"] .values, html[data-theme="dark"] .values article { border-color: var(--d-line); }
html[data-theme="dark"] .values article > span { color: var(--d-muted); }
html[data-theme="dark"] .values h3 { color: var(--d-text); }
html[data-theme="dark"] .values article:hover p { color: var(--d-text); }

/* ---------- journey (ps2) ---------- */
html[data-theme="dark"] .ps2, html[data-theme="dark"] .ps2-panel { background: var(--d-bg); }
html[data-theme="dark"] .ps2-title, html[data-theme="dark"] .ps2-item h3, html[data-theme="dark"] .ps2-stop h3 { color: var(--d-text); }
html[data-theme="dark"] .ps2-lede { color: #8fa6d6; }
html[data-theme="dark"] .ps2-copy p, html[data-theme="dark"] .ps2-item p { color: var(--d-soft); }
html[data-theme="dark"] .ps2-note { color: var(--d-muted); }
html[data-theme="dark"] .ps2-rule { border-top-color: var(--d-line); }
html[data-theme="dark"] .ps2-tab { background: transparent; border-color: var(--d-line); color: var(--d-soft); }
html[data-theme="dark"] .ps2-tab:hover { border-color: var(--d-blue); color: var(--d-blue); }
html[data-theme="dark"] .ps2-tab[aria-pressed="true"] { background: #2b5fe3; border-color: #2b5fe3; color: #fff; }
html[data-theme="dark"] .ps2-fig { background: var(--d-card); }
html[data-theme="dark"] .ps2-mark i { background: var(--d-bg); border-color: #3a4a68; }
html[data-theme="dark"] .ps2-mark b { color: var(--d-soft); }
html[data-theme="dark"] .ps2-mark span { color: var(--d-muted); }
html[data-theme="dark"] .ps2-stop.is-today .ps2-mark i { background: #2b5fe3; border-color: #2b5fe3; }
html[data-theme="dark"] .ps2-stop.is-today .ps2-mark b { color: var(--d-text); }
html[data-theme="dark"] .ps2-chips li { background: var(--d-card); border-color: var(--d-line); color: var(--d-soft); }
html[data-theme="dark"] .ps2-tl::before { background: linear-gradient(90deg, #26344f 0, #26344f 100%); }
html[data-theme="dark"] .ps2-intro-type {
  background-image:
    linear-gradient(90deg, transparent 0%, var(--ps2-beam-edge) 28%, var(--ps2-beam) 50%, var(--ps2-beam-edge) 72%, transparent 100%),
    linear-gradient(90deg, transparent 0%, var(--ps2-beam-edge) 28%, var(--ps2-beam) 50%, var(--ps2-beam-edge) 72%, transparent 100%),
    linear-gradient(100deg, #e9eef8 0%, #b9cbff 48%, #7aa0ff 58%, #e9eef8 100%);
}
html[data-theme="dark"] .ps2-intro::after { background: radial-gradient(closest-side, rgba(91, 140, 255, 0.5), rgba(91, 140, 255, 0.16) 60%, transparent); }

/* ---------- FAQ ---------- */
html[data-theme="dark"] .faq2 { background: var(--d-bg2); border-top-color: var(--d-line); }
html[data-theme="dark"] .faq2-title { color: var(--d-text); }
html[data-theme="dark"] .faq2-title .ln + .ln { color: var(--d-blue); }
html[data-theme="dark"] .faq2-sub, html[data-theme="dark"] .faq2-ask .faq2-ask-p { color: var(--d-soft); }
html[data-theme="dark"] .faq2-ask .faq2-ask-t { color: var(--d-text); }
html[data-theme="dark"] .faq2-cat { background: transparent; border-color: var(--d-line); color: var(--d-soft); }
html[data-theme="dark"] .faq2-cat:hover { border-color: var(--d-blue); color: var(--d-text); }
html[data-theme="dark"] .faq2-cat[aria-selected="true"] { background: #2b5fe3; border-color: #2b5fe3; color: #fff; }
html[data-theme="dark"] .faq2-item, html[data-theme="dark"] .faq2-item.is-open { border-bottom-color: var(--d-line); background: transparent; }
html[data-theme="dark"] .faq2-q { color: var(--d-text); }
html[data-theme="dark"] .faq2-q:hover { color: var(--d-blue); }
html[data-theme="dark"] .faq2-a p { color: var(--d-soft); }
html[data-theme="dark"] .faq2-link { color: var(--d-blue); border-bottom-color: rgba(111, 151, 255, 0.4); }

/* ---------- contact ---------- */
html[data-theme="dark"] .cta2 { background: var(--d-bg); }
html[data-theme="dark"] .cta2-card { background-color: #0c1629; }
html[data-theme="dark"] .cta2-details, html[data-theme="dark"] .cd-big, html[data-theme="dark"] .cd-title, html[data-theme="dark"] .cd-foot-title { color: var(--d-text); }
html[data-theme="dark"] .cd-big span { color: var(--d-blue); }
html[data-theme="dark"] .cd-text, html[data-theme="dark"] .cd-row > span { color: var(--d-soft); }
html[data-theme="dark"] .cd-eyebrow, html[data-theme="dark"] .cd-tags, html[data-theme="dark"] .cd-kicker, html[data-theme="dark"] .cd-company, html[data-theme="dark"] .cd-foot-text { color: var(--d-muted); }
html[data-theme="dark"] .cd-panel { background: var(--d-card); border-color: var(--d-line); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.8); }
html[data-theme="dark"] .cd-row, html[data-theme="dark"] .cd-foot { border-top-color: var(--d-line); }
html[data-theme="dark"] .cd-row a { color: var(--d-text); }
html[data-theme="dark"] .cd-row a:hover { color: var(--d-blue); }
html[data-theme="dark"] .cd-back, html[data-theme="dark"] .cd-btn { background: transparent; border-color: var(--d-line); color: var(--d-text); }
html[data-theme="dark"] .cd-back:hover, html[data-theme="dark"] .cd-btn:hover { border-color: var(--d-blue); color: var(--d-blue); }
html[data-theme="dark"] .cd-foot img { border-color: var(--d-line); }

/* ---------- footer ---------- */
html[data-theme="dark"] .editorial-footer { background: #050a14 !important; border-top: 1px solid var(--d-line); }

/* ---------- quote chooser (quote.js) ---------- */
html[data-theme="dark"] .qd { background: var(--d-card); color: var(--d-text); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--d-line); }
html[data-theme="dark"] .qd p { color: var(--d-soft); }
html[data-theme="dark"] .qd-x { background: transparent; border-color: var(--d-line); color: var(--d-text); }
html[data-theme="dark"] .qd-qr { background: var(--d-card2); }
html[data-theme="dark"] .qd-foot a { color: var(--d-text); border-bottom-color: var(--d-line); }

/* ---------- product models and projects (content.js) ---------- */
html[data-theme="dark"] .pc-card { background: var(--d-card); border-color: var(--d-line); }
html[data-theme="dark"] .pc-img { background: var(--d-card2); }
html[data-theme="dark"] .pc-body h3, html[data-theme="dark"] .rp-copy h3, html[data-theme="dark"] .pc-specs dd { color: var(--d-text); }
html[data-theme="dark"] .pc-brand { color: var(--d-blue); }
html[data-theme="dark"] .pc-sum, html[data-theme="dark"] .rp-sum { color: var(--d-soft); }
html[data-theme="dark"] .pc-model, html[data-theme="dark"] .rp-meta, html[data-theme="dark"] .pc-specs dt { color: var(--d-muted); }
html[data-theme="dark"] .pc-specs, html[data-theme="dark"] .pc-specs div { border-color: var(--d-line); }
html[data-theme="dark"] .rp-img { background: var(--d-card); }
html[data-theme="dark"] .rp-tag { background: rgba(7, 13, 26, 0.85); color: var(--d-text); }
/* the R in brushed steel for the night ground: deep metal tones with one bright sheen passing
   across, a fine light rim on its edges; mid-toned so the white copy over it stays readable */
html[data-theme="dark"] .belief-mark-r {
  background: linear-gradient(120deg, #3c4554 0%, #747e8d 14%, #4a5362 28%, #9aa3b1 40%, #e4e8ee 48%, #959eac 56%, #434c5b 68%, #7f8998 82%, #485160 100%);
  background-size: 260% 260%;
  filter: drop-shadow(0 0 0.6px rgba(235, 240, 248, 0.55)) drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
}
html[data-theme="dark"] .belief-mark-sq { filter: drop-shadow(0 0 18px rgba(61, 95, 184, 0.35)); }
@media (max-width: 760px) { html[data-theme="dark"] .belief-mark { opacity: 0.75; } }
html[data-theme="dark"] .belief-title h2, html[data-theme="dark"] .belief-title h3, html[data-theme="dark"] .belief-title p, html[data-theme="dark"] .values h3, html[data-theme="dark"] .values p {
  text-shadow: 0 1px 2px rgba(7, 13, 26, 0.55), 0 0 22px rgba(7, 13, 26, 0.75);
}

/* ---------- product pages ---------- */
html[data-theme="dark"] .detail-page { background: var(--d-bg); color: var(--d-text); }
html[data-theme="dark"] .detail-header { border-bottom-color: var(--d-line); }
html[data-theme="dark"] .detail-logo { color: var(--d-text); }
html[data-theme="dark"] .detail-header nav a:not(.quote-link) { color: #c5cfe2; }
html[data-theme="dark"] .quote-link { background: linear-gradient(180deg, #3a6cf0 0%, #2350c8 100%); color: #fff; }
html[data-theme="dark"] .back-link { color: var(--d-muted); }
html[data-theme="dark"] .detail-intro h1, html[data-theme="dark"] .detail-content h2 { color: var(--d-text); }
html[data-theme="dark"] .detail-intro h2 { color: #8fb0ff; }
html[data-theme="dark"] .detail-intro p, html[data-theme="dark"] .detail-content p { color: var(--d-soft); }
html[data-theme="dark"] .detail-notice { background: var(--d-card); }
html[data-theme="dark"] .detail-notice h3 { color: var(--d-text); }
html[data-theme="dark"] .related-products a { border-color: var(--d-line); color: var(--d-text); }
html[data-theme="dark"] .related-products a:hover { border-color: var(--d-blue); color: var(--d-blue); }
html[data-theme="dark"] .stage-halo { background: radial-gradient(ellipse, rgba(43, 95, 227, 0.22), transparent 70%); }
html[data-theme="dark"] .concept-label { color: var(--d-muted); }

/* ---------- article pages ---------- */
html[data-theme="dark"] .article-page { background: var(--d-bg); }
html[data-theme="dark"] .article-header { background: var(--d-bg); border-color: var(--d-line); }
html[data-theme="dark"] .article-wordmark, html[data-theme="dark"] .article-header > a { color: var(--d-text); }
html[data-theme="dark"] .breadcrumb, html[data-theme="dark"] .article-body .article-byline, html[data-theme="dark"] .article-body figcaption { color: var(--d-muted); }
html[data-theme="dark"] .breadcrumb a:hover { color: var(--d-blue); }
html[data-theme="dark"] .article-body h1, html[data-theme="dark"] .article-body h2 { color: var(--d-text); }
html[data-theme="dark"] .article-body .article-deck, html[data-theme="dark"] .article-body > p, html[data-theme="dark"] .article-body section p, html[data-theme="dark"] .article-body li { color: var(--d-soft); }
html[data-theme="dark"] .article-body a:not(.button) { color: var(--d-blue); }
html[data-theme="dark"] .article-cta { background: var(--d-card); }
html[data-theme="dark"] .article-cta p { color: var(--d-soft); }
html[data-theme="dark"] .article-cta .micro { color: var(--d-muted); }
html[data-theme="dark"] .button.light, html[data-theme="dark"] .article-cta .button { background: linear-gradient(180deg, #3a6cf0 0%, #2350c8 100%); color: #fff; }
html[data-theme="dark"] .article-cta .underlined, html[data-theme="dark"] .underlined { color: var(--d-text); }
html[data-theme="dark"] .related-articles > a { color: var(--d-text); border-color: var(--d-line); }
html[data-theme="dark"] .related-articles > a:hover { color: var(--d-blue); }
html[data-theme="dark"] .article-page footer { color: var(--d-muted); border-color: var(--d-line); }
html[data-theme="dark"] .article-page footer a { color: var(--d-soft); }
/* keep the copy off the metal: the R sits a little further off the edge, the paragraph wraps before it */
@media (min-width: 761px) {
  html[data-theme="dark"] .belief-mark { right: calc(-1 * clamp(110px, 19vw, 300px)); }
  html[data-theme="dark"] .belief-title p { max-width: 27em; }
}
html[data-theme="dark"] .sq-card { background: var(--d-card); }
