/*
 * Theme surfaces for the public website. Load after page and companion styles.
 * The existing dark palette remains the default; only the resolved light theme
 * receives color overrides. Source artwork and SVG colors are never transformed.
 */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fc;
  --panel: #ffffff;
  --panel-raised: #eaf1f8;
  --ink: #102b49;
  --muted: #52657c;
  --line: #d6e1ec;
  --cyan: #006f7d;
  --blue: #0063f6;
  --theme-soft: #edf3fa;
  --theme-tint: #e7f4f7;
  --theme-accent-line: #76a8b7;
  --theme-control-line: #8195ac;
  --theme-shadow: 0 16px 44px #123b6012, 0 2px 6px #123b6008;
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--ink);
}

html[data-theme="light"] ::selection {
  background: #c7e8fa;
  color: #00183f;
}

html[data-theme="light"] .vis-page {
  background: radial-gradient(ellipse at 90% 0, #d9edff80, transparent 25%), var(--bg);
}

/* Shared page text and controls. Deliberate brand specimens are excluded. */
html[data-theme="light"] :is(
  .eyebrow, .eyebrow.small, .hero-lead, .hero-sub,
  .hero-footnote, .hero-footnote .muted, .art-coordinate,
  .art-caption, .art-caption .mono, .belief-index,
  .belief-strip p > span, .section-description,
  .chapter-tabs button, .chapter-tabs .mono,
  .chapter-topline .mono, .chapter-intro,
  .chapter-point p, .chapter-footer > p,
  .chapter-pagination > .mono, .editorial-note,
  .figure-corner, .figure-caption, .figure-caption > span:last-child,
  .figure-variants > span, .scenario-label, .workflow-story > p,
  .workflow-steps p, .step-number, .step-role,
  .archive-filters button, .archive-filters button span,
  .archive-count, .archive-img-number, .archive-expand,
  .archive-card > p, .archive-note, .progress-card > p,
  .progress-chips span, .progress-card > a,
  .source-note, .closing > p:not(.eyebrow),
  .site-footer, .site-footer > p, .homepage .site-footer > p,
  .viewer-header .eyebrow, .viewer-toolbar > .mono,
  .viewer-footer p
) {
  color: var(--muted);
}

html[data-theme="light"] :is(
  .belief-strip strong, .chapter-point h4,
  .workflow-story h3, .archive-card h3, .site-footer .brand span
) {
  color: var(--ink);
}

html[data-theme="light"] .eyebrow-divider {
  background: #8da2b7;
}

html[data-theme="light"] :is(.tiny-line, .art-caption-dot) {
  background: #548c9e;
}

html[data-theme="light"] :is(
  .text-link, .subtle-button, .inline-button,
  .download-link
) {
  color: #075c9e;
}

html[data-theme="light"] #zoom-reset {
  color: #075c9e;
}

html[data-theme="light"] :is(
  .text-link:hover, .subtle-button:hover, .inline-button:hover,
  .progress-card > a:hover, .site-footer a:hover
) {
  color: #0048bb;
}

html[data-theme="light"] .button-primary {
  border-color: #0063f6;
  background: #0063f6;
  color: #ffffff;
  box-shadow: 0 5px 16px #0063f61c;
}

html[data-theme="light"] .button-primary:hover {
  border-color: #0054d5;
  background: #0054d5;
}

html[data-theme="light"] .button-quiet {
  color: #345a7a;
}

html[data-theme="light"] .button-quiet:hover {
  color: #0048bb;
  background: #e6eff9;
}

html[data-theme="light"] .icon-button {
  border-color: #adbdcd;
  background: #ffffffb8;
  color: #3c5874;
}

html[data-theme="light"] :is(.icon-button:hover:not(:disabled), .zoom-controls .icon-button:hover) {
  background: #e2edf8;
  color: #0048bb;
}

html[data-theme="light"] .status-label {
  border-color: #b9cbdc;
  background: #edf3f9;
  color: #405e7b;
}

html[data-theme="light"] .skip-link {
  background: #0063f6;
  color: #ffffff;
}

/* Navigation retains its glass treatment, with opaque enough light surfaces. */
html[data-theme="light"] .nav-shell {
  border-color: #c4d5e7;
  background: linear-gradient(180deg, #f1f8ffef, #ffffffed 35%, #ffffffeb 80%, #edf7fbe8);
  box-shadow: inset 0 1px 0 #ffffff, 0 7px 28px #183e6210;
}

html[data-theme="light"] :is(.desktop-nav a, .github-link, .menu-toggle) {
  color: #405a75;
}

html[data-theme="light"] :is(.desktop-nav a:hover, .desktop-nav .nav-active) {
  background: #e8f0fb;
  color: #064d9c;
}

html[data-theme="light"] .nav-cta {
  border-color: #a8bdd3;
  background: #f7faff;
  color: #244e78;
}

html[data-theme="light"] .nav-cta:hover {
  background: #e5f0fc;
}

html[data-theme="light"] .mobile-menu {
  border-color: #b9cce0;
  background: #fffffff7;
  box-shadow: var(--theme-shadow);
}

html[data-theme="light"] .mobile-menu a {
  color: #254a70;
}

html[data-theme="light"] .mobile-menu a:hover {
  background: #e9f2fc;
}

/* Product notebook: paper assets keep their original color and proportions. */
html[data-theme="light"] .paper {
  box-shadow: 0 16px 34px #233b5b24, 0 2px 5px #233b5b17;
}

html[data-theme="light"] .paper:hover {
  box-shadow: 0 23px 48px #233b5b30;
}

html[data-theme="light"] :is(.chapter-tabs button:hover, .chapter-tabs button[aria-selected="true"]) {
  color: #075b8a;
}

html[data-theme="light"] .principle-selectors button {
  border-color: #b6c7d8;
  background: #ffffff;
  color: #435e79;
}

html[data-theme="light"] :is(
  .principle-selectors button[aria-pressed="true"],
  .principle-selectors button:hover
) {
  border-color: #5b9bb0;
  background: #e3f1f8;
  color: #075576;
}

html[data-theme="light"] .principle-detail {
  border-left-color: #428ca2;
  background: linear-gradient(120deg, #e5f3f5, #edf4fb);
}

html[data-theme="light"] .principle-detail h4 {
  color: #125470;
}

html[data-theme="light"] :is(.principle-detail .mono, .principle-detail > p, .principle-example) {
  color: #45647a;
}

html[data-theme="light"] .principle-example {
  border-top-color: #bfd4df;
}

html[data-theme="light"] :is(.principle-example strong, .point-num) {
  color: #006b78;
}

html[data-theme="light"] .chapter-note {
  border-left-color: #668aab;
  background: #e8f0f8;
  color: #435e79 !important;
}

html[data-theme="light"] .figure-stage {
  border-color: #c3d3e1;
  background: radial-gradient(ellipse at 50% 10%, #d7e8f585, transparent 70%), #edf3f9;
}

html[data-theme="light"] .figure-stage::before {
  background-image: radial-gradient(#5680a52b .6px, transparent .6px);
}

html[data-theme="light"] :is(.figure-open img, .archive-thumb img) {
  box-shadow: 0 9px 25px #233b5b26;
}

html[data-theme="light"] .figure-open .zoom-hint {
  border-color: #a6bcd2;
  background: #fffffff0;
  color: #274f74;
  box-shadow: 0 4px 12px #153f6512;
}

html[data-theme="light"] .variant-button {
  background: #e6eef7;
  border-color: #c0cfdd;
}

html[data-theme="light"] .variant-button[aria-pressed="true"] {
  border-color: #006f7d;
  background: #dceff2;
}

html[data-theme="light"] .variant-button:hover {
  border-color: #397e9a;
}

html[data-theme="light"] .workflow-section {
  border-color: #d4e1ed;
  background: linear-gradient(135deg, #eaf3f9, #f0f5fb);
}

html[data-theme="light"] .workflow-steps li {
  border-bottom-color: #ccdce9;
}

html[data-theme="light"] .step-role {
  border-color: #aebfd0;
  background: #f9fcff;
}

html[data-theme="light"] :is(.human-step .step-number, .human-step .step-role) {
  color: #1d6a59;
}

html[data-theme="light"] .human-step .step-role {
  border-color: #9fc8b7;
  background: #e5f4ee;
}

html[data-theme="light"] .archive-filters button[aria-pressed="true"] {
  border-color: #8cb4cf;
  background: #e0eef9;
  color: #145b91;
}

html[data-theme="light"] .archive-filters button:hover {
  background: #e9f1f9;
  color: #145b91;
}

html[data-theme="light"] .archive-thumb {
  border-color: #c4d2e0;
  background: #eaf1f8;
}

html[data-theme="light"] .archive-card:hover .archive-thumb {
  border-color: #819fb9;
  background: #e1ebf5;
}

/* Refined-note editions and the featured model note share the light palette. */
html[data-theme="light"] .archive-card-featured {
  border-color: #bcd3ce;
  background: linear-gradient(115deg, #f9fdfb, #eaf3f6);
  box-shadow: 0 5px 24px #193d6007;
}

html[data-theme="light"] .archive-card-featured:hover {
  border-color: #749e94;
  background-color: #e9f4ee;
}

html[data-theme="light"] .archive-card-featured .archive-thumb {
  border-color: #b6cbc5;
  background: #e4eeea;
}

html[data-theme="light"] .new-note-label {
  color: #366b5b;
}

html[data-theme="light"] :is(.archive-card-copy > p, .archive-featured-description) {
  color: var(--muted);
}

html[data-theme="light"] :is(.archive-featured-cta, .chapter-sources) {
  color: #126954;
}

html[data-theme="light"] .chapter-sources a:hover {
  color: #0048bb;
}

html[data-theme="light"] .viewer-versions {
  border-color: #b8cbdb;
  background: #eaf1f7;
}

html[data-theme="light"] .viewer-versions button {
  color: #425d75;
}

html[data-theme="light"] .viewer-versions button[aria-pressed="true"] {
  color: #154d3e;
  background: #d3e9df;
}

html[data-theme="light"] .viewer-versions button:hover {
  color: #102b49;
}

html[data-theme="light"] .progress-card {
  border-color: #c7d7e6;
  background: linear-gradient(145deg, #ffffff, #f0f6fc);
  box-shadow: 0 5px 20px #193d6005;
}

html[data-theme="light"] .foundation {
  color: #216f55;
}

html[data-theme="light"] .foundation .status-dot {
  background: #2b8868;
}

html[data-theme="light"] .verification {
  color: #865719;
}

html[data-theme="light"] .verification .status-dot {
  background: #a36c24;
}

html[data-theme="light"] .planned {
  color: #365b98;
}

html[data-theme="light"] .planned .status-dot {
  background: #5276af;
}

html[data-theme="light"] .progress-chips span {
  border-color: #c6d4e2;
  background: #f6f9fd;
}

html[data-theme="light"] .progress-card > a {
  border-top-color: #d5e1ec;
}

/* Homepage: the illustrative workspace gets its own light interface. */
html[data-theme="light"] :is(
  .home-hero .eyebrow, .home-hero-detail,
  .home-hero .hero-footnote, .home-hero .hero-footnote .mono,
  .window-bar, .window-hint, .board-nav-item,
  .board-sidebar-bottom, .board-account > div > span,
  .board-tag, .mini-eyebrow, .board-goal > div > span,
  .board-roles > div > div > span, .role-status,
  .workbench-art > figcaption, .workbench-art > figcaption .mono,
  .home-beliefs .mono, .home-beliefs p > span,
  .feature-nav > button, .feature-nav small,
  .feature-panel-copy > p:not(.eyebrow), .feature-labels > span,
  .demo-topline, .demo-topline > span:last-child,
  .demo-account-row small, .demo-account-grid span,
  .demo-chat p, .demo-chat .mono,
  .feature-evidence, .feature-footnote,
  .demo-content-tabs, .demo-document-row small,
  .demo-bot-grid p, .demo-bot-grid > div > span:last-child,
  .workday-copy > p:not(.eyebrow), .workday-copy .scenario-label,
  .desktop-client-top p, .platform-picker > button,
  .platform-detail > div > span, .platform-detail .package-format,
  .platform-detail > p, .client-availability,
  .mobile-client-card > p, .mobile-platforms,
  .thinking-teaser-copy > p:not(.eyebrow), .teaser-notes > .mono,
  .notebook-lead
) {
  color: var(--muted);
}

html[data-theme="light"] :is(
  .home-hero-lead, .board-account strong, .board-goal > p,
  .board-roles strong, .home-beliefs strong,
  .demo-account-row strong, .demo-account-grid strong,
  .demo-document-row strong, .demo-bot-grid strong,
  .connection-node strong, .demo-permissions > div,
  .platform-detail h4
) {
  color: var(--ink);
}

html[data-theme="light"] .workbench-glow {
  background: radial-gradient(ellipse, #2d94db1d, transparent 70%);
}

html[data-theme="light"] .workbench-window {
  border-color: #bfcfe0;
  background: #ffffff;
  box-shadow: 0 24px 55px #173d5d14, 0 0 45px #0063f606, inset 0 1px #ffffff;
}

html[data-theme="light"] .window-bar {
  border-bottom-color: #d5e1ee;
  background: linear-gradient(110deg, #e9f1f9, #f3f7fc);
}

html[data-theme="light"] .window-hint {
  border-color: #b6c8db;
  background: #ffffff9c;
}

html[data-theme="light"] .board-sidebar {
  border-right-color: #d5e1ee;
  background: #f0f5fb;
}

html[data-theme="light"] .board-nav-item.selected {
  background: #dceafc;
  color: #075bb1;
}

html[data-theme="light"] .board-sidebar-bottom {
  border-color: #9eb6cb;
  background: #ffffff;
}

html[data-theme="light"] .account-avatar {
  background: linear-gradient(140deg, #d5eee7, #a1c6c5);
  color: #1b4b4d;
}

html[data-theme="light"] .account-avatar > span {
  border-color: #ffffff;
  background: #28815b;
}

html[data-theme="light"] .board-goal {
  border-color: #bfd5e7;
  background: linear-gradient(115deg, #edf7fd, #f3f7fc);
}

html[data-theme="light"] .board-goal > div > span {
  border-color: #bfd1e2;
  background: #ffffffb3;
}

html[data-theme="light"] .role-avatar.mint {
  border-color: #a8cdbc;
  background: #e0f1e9;
  color: #27644f;
}

html[data-theme="light"] .role-avatar.lilac {
  border-color: #c6bbdc;
  background: #eee9f8;
  color: #624982;
}

html[data-theme="light"] .role-avatar.peach {
  border-color: #dec5a4;
  background: #f9eddf;
  color: #885b2d;
}

html[data-theme="light"] :is(.role-status.warm, .warm-text) {
  color: #895c20;
}

html[data-theme="light"] .board-delivery {
  border-color: #b7d7c9;
  background: #edf8f2;
}

html[data-theme="light"] :is(.file-glyph, .board-delivery > span:last-child) {
  color: #32785e;
}

html[data-theme="light"] .board-delivery strong {
  color: #244e40;
}

html[data-theme="light"] .board-delivery > div > span {
  color: #4b6a5d;
}

html[data-theme="light"] .feature-nav > button:hover {
  background: #eaf2fa;
  color: #235779;
}

html[data-theme="light"] .feature-nav > button[aria-selected="true"] {
  border-color: #99bdd4;
  background: linear-gradient(110deg, #e1f0f8, #edf4fd);
  color: #075a91;
}

html[data-theme="light"] :is(
  .feature-nav > button[aria-selected="true"] .feature-arrow,
  .feature-panel-copy .eyebrow, .feature-evidence > a,
  .feature-footnote a, .demo-content-tabs .selected,
  .demo-document-row > span:last-child,
  .demo-bottom-line, .connection-line,
  .demo-permissions small, .workday-copy h2 > span
) {
  color: #176b73;
}

html[data-theme="light"] .feature-labels > span {
  border-color: #bfd0e0;
  background: #ffffff;
}

html[data-theme="light"] .feature-demo {
  border-color: #c5d7e7;
  background: linear-gradient(125deg, #f5faff, #edf4fa);
}

html[data-theme="light"] .demo-pill {
  border-color: #a4cdbb;
  background: #e7f5ee;
  color: #2b6c52;
}

html[data-theme="light"] :is(.demo-account-grid, .demo-document-row, .demo-permissions) {
  border-color: #cadce9;
}

html[data-theme="light"] .document-icon.green {
  background: #d9eee4;
  color: #2e6953;
}

html[data-theme="light"] .document-icon.blue {
  background: #ddeafa;
  color: #245f9d;
}

html[data-theme="light"] .document-icon.purple {
  background: #ebe2f6;
  color: #664480;
}

html[data-theme="light"] .demo-bot-grid > div {
  border-color: #c1d2e2;
  background: #ffffffb3;
}

html[data-theme="light"] .connection-node > span {
  border-color: #8dbdc7;
  background: #e4f3f6;
  color: #076978;
}

html[data-theme="light"] .connection-line i {
  background: #73a6ac;
}

html[data-theme="light"] :is(.permission-check, .permission-empty) {
  border-color: #648d85;
  color: #24654e;
}

html[data-theme="light"] .permission-check {
  background: #d4eadf;
}

html[data-theme="light"] .context-example {
  box-shadow: 0 14px 35px #1c3a5314;
}

html[data-theme="light"] :is(
  .context-heading > div > span, .context-heading .mono,
  .context-example dt, .context-footer
) {
  color: #586957;
}

html[data-theme="light"] .context-example dd {
  color: #374c40;
}

html[data-theme="light"] .context-example dd > span {
  border-color: #b2c2ac;
  background: #e2e8d9;
  color: #4c6149;
}

html[data-theme="light"] .desktop-client-card {
  border-color: #bed1e2;
  background: linear-gradient(120deg, #ffffff, #eef5fc);
}

html[data-theme="light"] .app-tile {
  box-shadow: inset 0 1px 1px #ffffff, 0 8px 19px #173d5d18;
}

html[data-theme="light"] .desktop-client-top > .status-label {
  border-color: #b0ccbd;
  color: #3d6856;
  background: #edf7f0;
}

html[data-theme="light"] .platform-picker > button {
  background: #ffffffab;
}

html[data-theme="light"] .platform-picker > button[aria-pressed="true"] {
  border-color: #83afcc;
  background: #e0eef9;
  color: #14588c;
}

html[data-theme="light"] .platform-picker > button:hover {
  color: #07519f;
}

html[data-theme="light"] .mobile-client-card {
  border-color: #bed4de;
  background: radial-gradient(ellipse at 100% 0, #d5edf18c, transparent 65%), #f0f7fa;
}

html[data-theme="light"] .mobile-platforms > span + span {
  border-color: #b5cbd9;
}

html[data-theme="light"] .phone-outline {
  border-color: #699baa;
  background: linear-gradient(135deg, #dceff3, #f5fafb);
}

html[data-theme="light"] .phone-outline > :is(span, i) {
  background: #699ba0;
}

html[data-theme="light"] .teaser-notes {
  background: radial-gradient(ellipse, #dce8eb99, transparent 72%);
}

html[data-theme="light"] .teaser-notes img {
  box-shadow: 0 10px 27px #173b5b26;
}

/* VIS: light presentation surfaces, unchanged brand colors and artwork. */
html[data-theme="light"] :is(
  .vis-hero-description, .vis-edition,
  .vis-index a, .vis-index a > span,
  .vis-section-heading .eyebrow, .vis-note,
  .belief-statement > div > p:last-child,
  .purpose-pair .mono, .value-grid p, .vis-inline-note,
  .vis-title-row > p, .stage-coordinate, .stage-spec,
  .logo-description p, .logo-principles .mono,
  .logo-principles p, .vis-details > p, .rules-columns ul,
  .palette-feedback, .type-specimen .mono,
  .type-langup > span, .type-specimen p:not(.type-langup),
  .type-specimen code, .mascot-story > p, .mascot-story dd,
  .motion-rhythm span, .motion-rhythm small, .kit-description,
  .kit-preview figcaption, .application-grid article > .mono,
  .application-grid p, .document-index, .document-kind,
  .document-card p, .document-source
) {
  color: var(--muted);
}

html[data-theme="light"] :is(
  .vis-hero h1 span, .belief-statement h2 span, .value-mark
) {
  color: #006f7d;
}

html[data-theme="light"] :is(
  .vis-hero-lead, .belief-subtitle, .purpose-pair p,
  .vis-details summary, .rules-columns h4,
  .type-langup, .mascot-story dt, .motion-rhythm strong
) {
  color: var(--ink);
}

html[data-theme="light"] .vis-edition i {
  background: #9db3c5;
}

html[data-theme="light"] .identity-cover {
  box-shadow: 0 21px 50px #233e5620;
}

html[data-theme="light"] :is(
  .cover-topline, .cover-topline .mono,
  .cover-bottom span, .identity-cover figcaption,
  .mascot-portrait, .mascot-portrait figcaption
) {
  color: #59695b;
}

html[data-theme="light"] .logo-lab {
  border-color: #bfd1e2;
  box-shadow: 0 6px 25px #173d5d06;
}

html[data-theme="light"] .logo-stage {
  background: #ffffff;
}

html[data-theme="light"] .logo-grid {
  border-color: #8ba5bd33;
  background-image: linear-gradient(#63809c12 1px, transparent 1px), linear-gradient(90deg, #63809c12 1px, transparent 1px);
}

/* A reverse mark needs its intentional dark specimen background in either UI. */
html[data-theme="light"] .logo-stage.is-reverse {
  background: #00183f;
}

html[data-theme="light"] .logo-stage.is-reverse :is(.stage-coordinate, .stage-spec) {
  color: #adbed1;
}

html[data-theme="light"] .logo-stage.is-reverse .logo-grid {
  border-color: #b5cad322;
  background-image: linear-gradient(#b6c7db09 1px, transparent 1px), linear-gradient(90deg, #b6c7db09 1px, transparent 1px);
}

html[data-theme="light"] .logo-lab-controls {
  background: linear-gradient(130deg, #edf5fa, #f7faff);
}

html[data-theme="light"] .logo-variants button {
  border-color: #b6cadd;
  background: #ffffff;
  color: #47617c;
}

html[data-theme="light"] .logo-variants button[aria-selected="true"] {
  border-color: #73a6c2;
  background: #dfedf9;
  color: #07598b;
}

html[data-theme="light"] :is(
  .logo-description a, .vis-details summary > span,
  .source-detail p > a, .document-action, .document-source .mono
) {
  color: #075c9e;
}

html[data-theme="light"] .vis-details {
  border-color: #c6d7e6;
  background: #edf4fa;
}

html[data-theme="light"] .type-specimen {
  background: #ffffffbd;
}

html[data-theme="light"] .mascot-portrait {
  border-color: #d7d7c4;
}

html[data-theme="light"] .vis-badge {
  border-color: #9ec6b3;
  background: #e8f5ee;
  color: #2c6952;
}

html[data-theme="light"] .vis-badge.concept {
  border-color: #c0b0d5;
  background: #f0eaf7;
  color: #684983;
}

html[data-theme="light"] .mascot-story dl > div {
  border-top-color: #cfdeea;
}

html[data-theme="light"] .kit-toolbar [data-kit] {
  border-color: #afc5d8;
  background: #ffffff;
  color: #45617d;
}

html[data-theme="light"] .kit-toolbar [aria-pressed="true"] {
  border-color: #71a5b8;
  background: #e0f0f5;
  color: #095f7a;
}

html[data-theme="light"] .kit-preview > button {
  border-color: #c0d1e1;
  background: #eaf1f8;
}

html[data-theme="light"] .kit-preview > button > span {
  border-color: #9fb8ce;
  background: #fffffff0;
  color: #244f76;
}

html[data-theme="light"] .application-stage {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d3dfeb;
}

html[data-theme="light"] .app-icon-stage {
  background: radial-gradient(ellipse at 25% 15%, #d0eafb, transparent 75%), #eaf3fa;
}

html[data-theme="light"] .duo-stage {
  background: #eeeade;
}

html[data-theme="light"] .document-card:hover {
  background: #e7f0f9;
}

/* Account avatar order and Bot appearance. */
html[data-theme="light"] :is(
  .avatar-priority__body p, .avatar-priority__meta,
  .avatar-specimen figcaption span, .avatar-rules dt,
  .bot-appearance__facts dt
) {
  color: #4a637d;
}

html[data-theme="light"] :is(
  .avatar-priority__body h4, .avatar-specimen figcaption strong,
  .avatar-rules dd, .bot-appearance__facts dd
) {
  color: var(--ink);
}

html[data-theme="light"] .bot-appearance__facts h3 {
  color: var(--ink);
}

html[data-theme="light"] .avatar-priority__item {
  border-bottom-color: var(--line);
}

html[data-theme="light"] .avatar-specimen-frame {
  border-color: #c3d4e3;
}

html[data-theme="light"] .avatar-specimen-frame--preset {
  background: #f1efe6;
}

html[data-theme="light"] .bot-appearance__stage {
  border-color: #bfd1e2;
  background: #ffffff;
  box-shadow: 0 6px 25px #173d5d06;
}

html[data-theme="light"] .bot-appearance__preview {
  background: radial-gradient(ellipse at 50% 38%, #d9ecf780, transparent 66%);
}

html[data-theme="light"] .bot-appearance__input {
  border-color: #bfd1e2;
  background: #f7fafd;
  color: var(--muted);
}

html[data-theme="light"] .bot-appearance__field > .mono {
  color: #6d879b;
}

html[data-theme="light"] .bot-appearance__shape:hover {
  background: #e8f0f8;
}

html[data-theme="light"] .bot-appearance__shape.is-selected {
  border-color: #006f7d;
  background: #e0f0f5;
}

html[data-theme="light"] .bot-appearance__color {
  border-color: #00000024;
}

html[data-theme="light"] .bot-appearance__color.is-selected {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan);
}

html[data-theme="light"] .bot-appearance__facts dl > div {
  border-bottom-color: var(--line);
}

/* The avatar studio gallery and its size previews. */
html[data-theme="light"] .avatar-studio__group > .mono,
html[data-theme="light"] .avatar-studio__sizes > .mono,
html[data-theme="light"] .avatar-studio__companion > .mono {
  color: #6d879b;
}

html[data-theme="light"] .avatar-studio__item figcaption,
html[data-theme="light"] .avatar-studio__master figcaption,
html[data-theme="light"] .avatar-studio__pair figcaption,
html[data-theme="light"] .avatar-studio__companion p {
  color: #4a637d;
}

html[data-theme="light"] .avatar-studio__item img,
html[data-theme="light"] .avatar-studio__master img,
html[data-theme="light"] .avatar-studio__pair img {
  border-color: #c3d4e3;
}

html[data-theme="light"] .avatar-studio__item.is-default img {
  border-color: #006f7d;
}

html[data-theme="light"] .avatar-studio__item figcaption em {
  color: #006f7d;
}

html[data-theme="light"] .avatar-studio__sizes,
html[data-theme="light"] .avatar-studio__companion {
  border-color: #bfd1e2;
  background: #ffffff;
}

html[data-theme="light"] .avatar-studio__pair {
  border-top-color: var(--line);
}

html[data-theme="light"] .avatar-studio__companion p {
  border-top-color: var(--line);
}

/* Original-image and full-document readers, including all modal chrome. */
html[data-theme="light"] :is(#image-dialog, .brand-doc-dialog, .brand-image-dialog) {
  border-color: #a7bed3;
  background: #f9fcff;
  color: var(--ink);
  box-shadow: 0 30px 100px #0d294244;
}

html[data-theme="light"] :is(#image-dialog, .brand-doc-dialog, .brand-image-dialog)::backdrop {
  background: #132b4b66;
}

html[data-theme="light"] :is(.viewer-toolbar, .viewer-footer) {
  border-color: #cfdeeb;
}

html[data-theme="light"] .download-link {
  border-left-color: #b9cede;
}

html[data-theme="light"] :is(.viewer-canvas, .brand-image-canvas) {
  background: #e6edf5;
  scrollbar-color: #91a8be #e6edf5;
}

html[data-theme="light"] .viewer-canvas img {
  box-shadow: 0 6px 30px #233e5629;
}

html[data-theme="light"] :is(.doc-header, .doc-toolbar) {
  background: #f7faff;
}

html[data-theme="light"] :is(.doc-header .eyebrow, .doc-toolbar, .doc-layout > nav a) {
  color: #4a647e;
}

html[data-theme="light"] :is(.doc-header .icon-button, .doc-toolbar a) {
  color: #075c9e;
}

html[data-theme="light"] .doc-layout > nav {
  background: #edf3fa;
}

html[data-theme="light"] .doc-layout > nav a:hover {
  background: #dcebf7;
  color: #075283;
}

html[data-theme="light"] .doc-scroll {
  background: #fffef9;
  color: #263b4e;
  scrollbar-color: #9daebb #f3f2eb;
}

html[data-theme="light"] .doc-context {
  border-left-color: #4c8ea4;
  background: #e8f2f5;
  color: #3e6171;
}

html[data-theme="light"] :is(.doc-article h2, .doc-article hr) {
  border-top-color: #d3dedf;
}

html[data-theme="light"] .doc-article a {
  color: #08628c;
}

html[data-theme="light"] .doc-article code {
  background: #e8eff2;
  color: #274b60;
}

html[data-theme="light"] .doc-article pre {
  background: #eaf0f5;
  color: #213f56;
  box-shadow: inset 0 0 0 1px #d4dfe7;
}

html[data-theme="light"] .doc-article pre code {
  background: transparent;
  color: inherit;
}

html[data-theme="light"] .doc-article blockquote {
  border-left-color: #8aa5a2;
  background: #eef3e9;
  color: #4f6757;
}

html[data-theme="light"] :is(.doc-article th, .doc-article td) {
  border-color: #cbd9dd;
}

html[data-theme="light"] .doc-article th {
  background: #eaf1f1;
}

html[data-theme="light"] .doc-article .source-image-link {
  border-color: #7eaaa9;
  background: #edf5f3;
}

/* Account, Xiaoban and feedback use the same light surface hierarchy. */
html[data-theme="light"] :is(.account-control, .web-companion, #companion-dialog, .companion-toast) {
  --companion-surface: #ffffff;
  --companion-surface-raised: #edf4fa;
  --companion-border: #b7ccdf;
  --companion-text: #102b49;
  --companion-muted: #52657c;
  --companion-accent: #006f7d;
}

html[data-theme="light"] .account-trigger {
  border-color: #afc6db;
  background: #eff5fbd9;
  color: #234b70;
}

html[data-theme="light"] :is(.account-trigger:hover, .account-trigger[aria-expanded="true"]) {
  border-color: #719cbb;
  background: #e0eef9;
}

html[data-theme="light"] .account-trigger > svg:last-child {
  color: #4d7895;
}

html[data-theme="light"] .account-popover {
  border-color: #b9cfe1;
  background: linear-gradient(150deg, #f0f8fffa, #fffffffc 55%);
  box-shadow: 0 18px 48px #143c6022, inset 0 1px #ffffff;
}

html[data-theme="light"] .account-summary .avatar-letter {
  border-color: #a5c7c2;
  background: linear-gradient(140deg, #dcefe9, #b9d8d8);
  color: #224f4f;
}

html[data-theme="light"] :is(
  .account-summary p, .account-action small,
  .account-action > svg:last-child:not(:first-child)
) {
  color: #526b80;
}

html[data-theme="light"] .account-action {
  color: #234d71;
}

html[data-theme="light"] .account-action:hover:not(:disabled) {
  background: #e7f1fa;
  color: #07538b;
}

html[data-theme="light"] .account-action > svg:first-child {
  color: #276e86;
}

html[data-theme="light"] .account-divider {
  background: #d3e0eb;
}

html[data-theme="light"] .pet-orbit {
  border-color: #69b9c733;
  background: radial-gradient(ellipse at center, #52bed52b, #52bed509 60%, transparent 73%);
  box-shadow: 0 0 30px #3ca5c20d;
}

html[data-theme="light"] .pet-label {
  border-color: #c0d3e2;
  background: #fffffff0;
  color: #355875;
  box-shadow: 0 4px 14px #143c6012;
}

html[data-theme="light"] .pet-hide {
  color: #446885;
}

html[data-theme="light"] .pet-hide::before {
  border-color: #aec4d7;
  background: #f9fcfff5;
}

html[data-theme="light"] .pet-hide:hover {
  color: #004c98;
}

html[data-theme="light"] .pet-popover {
  border-color: #b3cddd;
  background: radial-gradient(ellipse at top left, #d8effb80, transparent 65%), #fffffff9;
  box-shadow: 0 18px 55px #143c6029, inset 0 1px #ffffff;
}

html[data-theme="light"] .pet-popover-heading .eyebrow {
  color: #287284;
}

html[data-theme="light"] .pet-popover .close-btn {
  color: #45667f;
}

html[data-theme="light"] .pet-popover .close-btn:hover {
  background: #e4eff8;
  color: #07528f;
}

html[data-theme="light"] .pet-popover h2 {
  color: #163b59;
}

html[data-theme="light"] :is(.pet-popover > p, .pet-choice > small) {
  color: #526b80;
}

html[data-theme="light"] .pet-choice {
  border-color: #afc9db;
  background: linear-gradient(135deg, #f7fcff, #edf5fb);
  color: #214c6d;
}

html[data-theme="light"] .pet-choice:hover:not(:disabled) {
  border-color: #639bad;
  background: #e3f1f8;
}

html[data-theme="light"] .pet-choice > svg {
  color: #1d7889;
}

html[data-theme="light"] .pet-choice:last-child > svg {
  color: #926d16;
}

html[data-theme="light"] .pet-popover-footer {
  border-top-color: #d2e1eb;
}

html[data-theme="light"] .pet-popover-footer :is(button, a) {
  color: #075e8d;
}

html[data-theme="light"] .pet-popover-footer :is(button, a):last-child {
  color: #526b80;
}

html[data-theme="light"] .pet-popover-footer :is(button, a):hover {
  color: #0048bb;
}

html[data-theme="light"] #companion-dialog.companion-dialog {
  border-color: #aec6db;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 28px 100px #15375538, inset 0 1px #ffffff;
}

html[data-theme="light"] #companion-dialog::backdrop {
  background: #132b4b66;
}

html[data-theme="light"] .companion-dialog-head {
  border-bottom-color: #d1e1ee;
  background: linear-gradient(115deg, #eaf5fc, #fbfdff 75%);
}

html[data-theme="light"] .companion-kicker {
  color: #287284;
}

html[data-theme="light"] .companion-heading h2 {
  color: #163b59;
}

html[data-theme="light"] .companion-close {
  color: #45667f;
}

html[data-theme="light"] .companion-close:hover {
  border-color: #c0d3e2;
  background: #e7f1f9;
  color: #07528f;
}

html[data-theme="light"] :is(
  .companion-intro, .companion-session-note, .companion-privacy,
  .companion-empty p, .feedback-list-top, .feedback-replies small
) {
  color: #52657c;
}

html[data-theme="light"] .companion-tabs {
  border-color: #c6d7e5;
  background: #edf3f9;
}

html[data-theme="light"] .companion-tabs > button {
  color: #48657d;
}

html[data-theme="light"] .companion-tabs > button:hover:not(:disabled) {
  background: #e0edf7;
  color: #155b87;
}

html[data-theme="light"] .companion-tabs > button[aria-pressed="true"] {
  border-color: #85b1c8;
  background: #ffffff;
  color: #075b8a;
  box-shadow: 0 2px 5px #173d5d0a;
}

html[data-theme="light"] #companion-dialog .companion-field label {
  color: #284960;
}

html[data-theme="light"] #companion-dialog :is(
  .field-optional, .field-label-row small, .field-label-row .character-count,
  .field-label-row .field-counter, .companion-field > small,
  .companion-check
) {
  color: #526b80;
}

html[data-theme="light"] #companion-dialog .companion-field :is(
  input:not([type="checkbox"]):not([type="radio"]), textarea, select
) {
  border-color: var(--theme-control-line);
  background: #ffffff;
  color: #163b59;
}

html[data-theme="light"] #companion-dialog .companion-field :is(input, textarea)::placeholder {
  color: #62768a;
  opacity: 1;
}

html[data-theme="light"] #companion-dialog .companion-field :is(input, textarea, select):hover:not(:disabled) {
  border-color: #507c9b;
}

html[data-theme="light"] #companion-dialog .companion-field :is(input, textarea, select):focus {
  border-color: #0063f6;
  background: #fbfdff;
}

html[data-theme="light"] #companion-dialog .companion-field :is(input, textarea, select):disabled {
  background: #eff3f7;
  color: #576c80;
}

html[data-theme="light"] #companion-dialog .companion-field [aria-invalid="true"] {
  border-color: #aa4052;
}

html[data-theme="light"] #companion-dialog .field-error {
  color: #a23046;
}

html[data-theme="light"] #companion-dialog .companion-check input[type="checkbox"] {
  accent-color: #0063f6;
}

html[data-theme="light"] #companion-dialog .companion-check a {
  color: #075c9e;
}

html[data-theme="light"] #companion-dialog .context-preview {
  border-color: #c6d9e7;
  background: #f0f6fb;
  color: #42647d;
}

html[data-theme="light"] #companion-dialog .context-preview summary::marker {
  color: #3e8496;
}

html[data-theme="light"] #companion-dialog .context-preview :is(code, pre, p) {
  color: #4b6980;
}

html[data-theme="light"] .companion-inline-message,
html[data-theme="light"] .companion-inline-message[data-tone="info"] {
  border-color: #aecce3;
  background: #edf5fd;
  color: #22577f;
}

html[data-theme="light"] .companion-inline-message[data-tone="error"] {
  border-color: #d4a1ab;
  background: #fff1f3;
  color: #963b4a;
}

html[data-theme="light"] .companion-inline-message[data-tone="success"] {
  border-color: #9fcbb2;
  background: #eaf8ef;
  color: #216846;
}

html[data-theme="light"] .companion-primary {
  border-color: #0063f6;
  background: #0063f6;
  color: #ffffff;
}

html[data-theme="light"] .companion-primary:hover:not(:disabled) {
  border-color: #0054d5;
  background: #0054d5;
}

html[data-theme="light"] .companion-secondary {
  border-color: #a1bdd3;
  background: #f7fbff;
  color: #2c5576;
}

html[data-theme="light"] .companion-secondary:hover:not(:disabled) {
  border-color: #699ab6;
  background: #e6f1f9;
  color: #07578a;
}

html[data-theme="light"] .companion-link {
  color: #075c9e;
}

html[data-theme="light"] .companion-link:hover:not(:disabled) {
  color: #0048bb;
}

html[data-theme="light"] .service-badge {
  border-color: #aac7d5;
  background: #eaf3f8;
  color: #3e6479;
}

html[data-theme="light"] #companion-dialog .login-alternatives > button {
  border-color: #b0c8da;
  background: #f2f7fc;
  color: #375d7a;
}

html[data-theme="light"] #companion-dialog .login-alternatives > button:is(:hover:not(:disabled), [aria-pressed="true"]) {
  border-color: #79a6bc;
  background: #e1f0f7;
  color: #0b5e81;
}

html[data-theme="light"] #companion-dialog .login-benefits {
  border-top-color: #d0e0eb;
  color: #4d6a7e;
}

html[data-theme="light"] #companion-dialog .login-benefits svg {
  color: #287969;
}

html[data-theme="light"] :is(.companion-empty > svg, .companion-empty .companion-empty-icon) {
  border-color: #add0c0;
  background: #edf8f2;
  color: #347859;
}

html[data-theme="light"] .companion-empty h3 {
  color: #244a65;
}

html[data-theme="light"] .feedback-receipt {
  border-color: #a9cfbe;
  background: linear-gradient(120deg, #e9f7ef, #eff8fa);
  color: #2b6451;
}

html[data-theme="light"] .feedback-receipt :is(code, .mono) {
  color: #2b6655;
}

html[data-theme="light"] :is(.feedback-receipt, .feedback-list-item) :is(.status-pill, .feedback-status, .feedback-status-pill) {
  border-color: #9fc6ad;
  background: #e2f2e7;
  color: #2b6946;
}

html[data-theme="light"] .feedback-list-item {
  border-color: #c0d4e3;
  background: #f4f9fd;
  color: #355a76;
}

html[data-theme="light"] .feedback-list-item:hover:not(:disabled) {
  border-color: #87afc5;
  background: #e7f2f9;
}

html[data-theme="light"] :is(.feedback-list-item strong, .feedback-list-item .feedback-item-title) {
  color: #214a68;
}

html[data-theme="light"] .feedback-list-item :is(small, .feedback-meta, .feedback-item-meta, .feedback-list-meta) {
  color: #526b80;
}

html[data-theme="light"] .feedback-list-meta > svg {
  color: #2e7b82;
}

html[data-theme="light"] .feedback-detail-copy {
  color: #36566f;
}

html[data-theme="light"] .feedback-replies article {
  border-color: #c8dce8;
  background: #f0f6fb;
}

html[data-theme="light"] .feedback-replies article :is(h3, strong) {
  color: #244c62;
}

html[data-theme="light"] .feedback-replies article p {
  color: #3d5c72;
}

html[data-theme="light"] .companion-toast {
  border-color: #a9c8d6;
  background: #f9fdfff5;
  box-shadow: 0 9px 30px #173d5d24;
  color: #22536c;
}

/* English copy is allowed to grow instead of being squeezed into Chinese widths.
 * Header preferences have their own layout stylesheet and are not changed here.
 * These rules intentionally work in either theme, without restyling source docs.
 */
html[lang="en"] :is(.home-hero h1, .hero h1, .vis-hero h1) {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  letter-spacing: -.035em;
  line-height: 1.16;
}

html[lang="en"] .home-hero h1 {
  font-size: clamp(40px, 4.25vw, 59px);
}

html[lang="en"] .vis-hero h1 {
  font-size: clamp(44px, 4.7vw, 66px);
}

html[lang="en"] :is(.home-hero-lead, .vis-hero-lead) {
  line-height: 1.55;
  letter-spacing: 0;
}

html[lang="en"] :is(
  .hero-actions, .hero-footnote, .client-actions,
  .kit-toolbar, .kit-toolbar > div,
  .doc-toolbar, .doc-toolbar > div,
  .companion-actions, .field-label-row
) {
  flex-wrap: wrap;
}

html[lang="en"] :is(.button, .text-link) {
  line-height: 1.55;
  white-space: normal;
  text-align: left;
}

html[lang="en"] :is(.home-hero-detail, .vis-hero-description, .section-description) {
  line-height: 1.85;
}

/* Keep authored line breaks: adjacent translated text nodes must not run together. */

.original-language-note {
  max-width: 76ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-top: 16px;
}
html[lang="zh-CN"] .original-language-note { display: none; }
.document-language { font-size: 11px; color: var(--muted); }

html[lang="en"] :is(
  .home-beliefs > div, .home-beliefs p,
  .board-account > div, .board-delivery > div,
  .board-roles > div > div, .demo-account-row > div,
  .demo-document-row > div, .feature-nav > button > span:nth-child(2),
  .desktop-client-top > div, .document-card > div
) {
  min-width: 0;
}

html[lang="en"] :is(.home-beliefs strong, .belief-strip strong) {
  line-height: 1.65;
}

html[lang="en"] :is(.home-beliefs p > span, .belief-strip p > span) {
  font-size: 12px;
  line-height: 1.6;
}

html[lang="en"] .workbench-body {
  grid-template-columns: 64px minmax(0, 1fr);
}

html[lang="en"] :is(.window-bar, .window-hint, .board-nav-item, .board-tag) {
  font-size: 10px;
  line-height: 1.45;
}

html[lang="en"] .window-bar {
  height: auto;
  min-height: 39px;
  padding-block: 8px;
}

html[lang="en"] .board-goal > div {
  flex-wrap: wrap;
}

html[lang="en"] :is(
  .board-account > div > span, .board-goal > div > span,
  .board-roles > div > div > span, .role-status,
  .board-delivery > div > span, .workbench-art > figcaption,
  .feature-nav small, .feature-labels > span,
  .demo-topline, .demo-topline > span:last-child,
  .demo-account-row small, .demo-account-grid span,
  .demo-chat p, .demo-document-row small,
  .demo-document-row > span:last-child, .demo-bot-grid p,
  .demo-bot-grid > div > span:last-child,
  .demo-permissions > div, .demo-permissions small,
  .feature-evidence, .feature-evidence > a, .feature-footnote,
  .client-availability, .context-example dt,
  .context-example dd > span, .context-heading > div > span,
  .context-footer, .vis-note, .vis-inline-note,
  .document-kind, .document-card p, .document-action,
  .document-source, .kit-preview figcaption
) {
  font-size: 11px;
  line-height: 1.65;
}

html[lang="en"] :is(.board-account strong, .board-roles strong, .board-delivery strong) {
  font-size: 12px;
  line-height: 1.5;
}

html[lang="en"] .board-goal > p {
  font-size: 14px;
  line-height: 1.65;
}

html[lang="en"] .board-roles > div {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
}

html[lang="en"] .role-status {
  max-width: 80px;
  white-space: normal;
  text-align: right;
}

html[lang="en"] .workbench-art > figcaption {
  flex-wrap: wrap;
}

html[lang="en"] .workbench-art > figcaption .mono {
  font-size: 10px;
  line-height: 1.6;
}

html[lang="en"] .feature-nav strong {
  font-size: 14px;
  line-height: 1.5;
}

html[lang="en"] .feature-evidence {
  flex-wrap: wrap;
}

html[lang="en"] .feature-evidence > a {
  white-space: normal;
}

html[lang="en"] :is(.demo-account-grid strong, .demo-document-row strong, .demo-bot-grid strong) {
  font-size: 12px;
  line-height: 1.55;
}

html[lang="en"] .demo-account-grid > div {
  gap: 8px;
  flex-wrap: wrap;
}

html[lang="en"] .context-example dl > div {
  grid-template-columns: 83px minmax(0, 1fr);
}

html[lang="en"] .context-example dd {
  font-size: 13px;
  line-height: 1.75;
}

html[lang="en"] .chapter-tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
}

html[lang="en"] .chapter-tabs button {
  flex: 0 0 auto;
  font-size: 13px;
  min-height: 52px;
}

html[lang="en"] :is(.status-label, .step-role, .vis-badge) {
  white-space: normal;
  line-height: 1.6;
}

html[lang="en"] .principle-selectors {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[lang="en"] .principle-selectors button {
  min-height: 44px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.55;
}

html[lang="en"] :is(.principle-detail-head, .figure-caption) {
  flex-wrap: wrap;
}

html[lang="en"] :is(.archive-card-copy, .archive-card-featured .archive-card-copy) {
  min-width: 0;
}

html[lang="en"] :is(.archive-card-copy > p, .new-note-label, .archive-featured-cta, .chapter-sources) {
  font-size: 12px;
  line-height: 1.7;
}

html[lang="en"] .archive-featured-description {
  max-width: 48ch;
  font-size: 13px;
  line-height: 1.8;
}

html[lang="en"] .archive-card-featured h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  letter-spacing: -.025em;
}

html[lang="en"] .viewer-versions button {
  min-height: 32px;
  font-size: 11px;
  padding-inline: 10px;
}

html[lang="en"] .viewer-toolbar .download-link {
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

html[lang="en"] .principle-example strong {
  white-space: normal;
}

html[lang="en"] .vis-index a {
  min-width: 0;
  line-height: 1.55;
}

html[lang="en"] .cover-bottom p {
  font-size: 18px;
  line-height: 1.5;
}

html[lang="en"] .cover-bottom {
  align-items: center;
}

html[lang="en"] .identity-cover figcaption {
  flex-wrap: wrap;
  gap: 8px 15px;
  font-size: 10px;
  line-height: 1.6;
}

html[lang="en"] .logo-variants {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[lang="en"] .logo-variants button {
  min-height: 44px;
  font-size: 12px;
  line-height: 1.55;
}

html[lang="en"] .document-card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 8px 14px;
}

html[lang="en"] .document-card h3 {
  font-size: 16px;
  line-height: 1.5;
}

html[lang="en"] .document-action {
  grid-column: 2;
  width: auto;
  margin: 0;
  white-space: normal;
}

html[lang="en"] :is(.doc-header h2, .viewer-header h2, #document-version) {
  overflow-wrap: anywhere;
}

html[lang="en"] :is(.doc-toolbar, .viewer-toolbar, .viewer-footer) {
  line-height: 1.6;
}

html[lang="en"] .doc-toolbar {
  font-size: 12px;
}

html[lang="en"] .doc-toolbar > div {
  gap: 10px 20px;
}

html[lang="en"] .doc-layout > nav a {
  font-size: 12px;
  overflow-wrap: anywhere;
}

html[lang="en"] :is(.companion-tabs > button, .pet-choice strong) {
  min-width: 0;
  font-size: 13px;
  white-space: normal;
  line-height: 1.5;
}

html[lang="en"] .pet-choice > small {
  font-size: 11px;
  line-height: 1.6;
}

html[lang="en"] .pet-label {
  width: max-content;
  max-width: 108px;
  white-space: normal;
  text-align: center;
  font-size: 10px;
}

html[lang="en"] .companion-actions > button {
  white-space: normal;
  line-height: 1.55;
}

html[lang="en"] .field-label-row {
  gap: 6px 14px;
  align-items: baseline;
}

@media (max-width: 1000px) {
  html[lang="en"] .home-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  html[lang="en"] .workbench-art {
    width: min(100%, 640px);
    margin-inline: auto;
  }

  html[lang="en"] .home-hero h1 {
    max-width: 740px;
    font-size: clamp(40px, 6vw, 59px);
  }

  html[lang="en"] .vis-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
  }

  html[lang="en"] .cover-bottom {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  html[lang="en"] .cover-bottom > img {
    max-width: 140px;
    justify-self: end;
  }
}

@media (max-width: 640px) {
  html[data-theme="light"] .feature-nav > button {
    border-color: #bdcfde;
  }

  html[lang="en"] .home-hero h1 {
    font-size: clamp(36px, 9.8vw, 48px);
    line-height: 1.2;
  }

  html[lang="en"] .vis-hero h1 {
    font-size: clamp(40px, 10vw, 52px);
    line-height: 1.2;
  }

  html[lang="en"] .home-hero-lead {
    font-size: 20px;
  }

  html[lang="en"] .hero-actions {
    gap: 10px 18px;
  }

  html[lang="en"] .hero-actions .button {
    min-height: 44px;
    font-size: 12px;
  }

  html[lang="en"] .board-main {
    padding-inline: 12px;
  }

  html[lang="en"] .board-goal {
    padding-inline: 10px;
  }

  html[lang="en"] .board-roles > div {
    grid-template-columns: 25px minmax(0, 1fr);
    column-gap: 8px;
  }

  html[lang="en"] .board-roles .role-status {
    grid-column: 2;
    margin-left: 0;
    max-width: none;
    text-align: left;
  }

  html[lang="en"] .feature-nav strong {
    font-size: 12px;
  }

  html[lang="en"] .feature-nav > button {
    min-height: 44px;
  }

  html[lang="en"] .demo-bot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[lang="en"] .demo-bot-grid > div {
    padding: 15px;
  }

  html[lang="en"] .demo-document-row {
    flex-wrap: wrap;
  }

  html[lang="en"] .demo-document-row > div {
    flex: 1;
  }

  html[lang="en"] .demo-document-row > span:last-child {
    margin-left: 40px;
    width: 100%;
  }

  html[lang="en"] :is(.belief-strip p, .chapter-footer) {
    flex-wrap: wrap;
    gap: 10px;
  }

  html[lang="en"] .chapter-footer > p {
    max-width: none;
    flex: 1 1 190px;
    font-size: 12px;
  }

  html[lang="en"] .archive-card h3 {
    font-size: 12px;
    line-height: 1.6;
  }

  html[lang="en"] .archive-card > p {
    font-size: 11px;
  }

  html[lang="en"] .archive-card-copy h3 {
    font-size: 16px;
    line-height: 1.5;
  }

  html[lang="en"] .archive-card-featured h3 {
    font-size: 26px;
    line-height: 1.35;
  }

  html[lang="en"] .viewer-toolbar .viewer-versions {
    margin-right: auto;
  }

  html[lang="en"] .viewer-toolbar .zoom-controls {
    margin-left: 0;
  }

  html[lang="en"] .viewer-versions button {
    min-height: 36px;
  }

  html[lang="en"] .vis-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[lang="en"] .vis-index a {
    font-size: 12px;
  }

  html[lang="en"] .cover-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(80px, .7fr);
    gap: 12px;
  }

  html[lang="en"] .cover-bottom p {
    font-size: 16px;
  }

  html[lang="en"] .vis-section-heading {
    flex-wrap: wrap;
  }

  html[lang="en"] .kit-toolbar > .subtle-button {
    max-width: none;
    text-align: left;
    font-size: 11px;
  }

  html[lang="en"] .kit-toolbar [data-kit] {
    min-height: 44px;
    font-size: 12px;
  }

  html[lang="en"] .type-langup > span {
    display: block;
    margin-left: 0;
    white-space: normal;
    font-size: 11px;
  }

  html[lang="en"] :is(.viewer-toolbar, .viewer-footer) {
    flex-wrap: wrap;
  }

  html[lang="en"] .viewer-footer p {
    font-size: 11px;
  }

  html[lang="en"] .viewer-toolbar .status-label {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  html[lang="en"] #companion-dialog .login-code-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  html[lang="en"] :is(.companion-actions > .companion-primary, .companion-actions > .companion-secondary) {
    flex: 1 1 140px;
  }
}
