/* Atlas Ridge charcoal theme with green accents. Screen-only: exports and print keep their original styling.
   Presentation only. Never reveal hidden content or override disabled, account, or privacy state. */
@media screen {
  html.atlas-charcoal [hidden] { display: none !important; }
  html.atlas-charcoal {
    color-scheme: dark;
    min-height: 100%;
    --bg: #121416; --surface: #1c2022; --panel: #1c2022; --paper: #121416;
    --ink: #f0f3f1; --text: #f0f3f1; --muted: #b7c0bc; --line: #454d50;
    --forest: #29df85; --forest-deep: #092a20; --green: #29df85; --accent: #29df85;
    --leaf: #252a2d; --mint: #252a2d; --lime: #252a2d; --cream: #121416;
    --charcoal: #1c2022; --red: #ffb8af; --red-bg: #3b2528;
    --gold: #ffe0a3; --gold-bg: #362f21; --blue: #43e99b; --blue-bg: #252a2d;
    --atlas-bg: #121416; --atlas-surface: #1c2022; --atlas-ink: #f0f3f1;
    --atlas-muted: #b7c0bc; --atlas-line: #454d50;
    --ar-deep: #121416; --ar-green: #29df85; --ar-muted: #b7c0bc;
  }
  html.atlas-charcoal body {
    background: #121416; color: var(--ink);
    min-height: 100svh; background-attachment: fixed;
    -webkit-font-smoothing: antialiased; accent-color: var(--green);
  }
  html.atlas-charcoal body :is(h1,h2,h3,h4,strong,.price,.metric,.money,.big-progress,.brand) { color: var(--ink); }
  html.atlas-charcoal body :is(p,li,dt,label,small,.muted,.fine,.sub,.subtitle,.lead,.meta,.eyebrow,.entry-type,.back,.job-ref,.review-label,.review-context,.composer-caption) { color: var(--muted); }
  html.atlas-charcoal body :is(a,.text-button,.text-link,.check-records) { color: #43e99b; }
  html.atlas-charcoal body :is(header,.topbar,.chat-header,.sidebar,.mobile-top,.bottom-nav,.auth-story) {
    background: #121416; border-color: var(--line); color: var(--ink);
  }
  html.atlas-charcoal body :is(.brand,.chat-contact h1) { color: var(--ink); }
  html.atlas-charcoal body .brand { white-space: nowrap; }
  html.atlas-charcoal body .brand small { color: #b7c0bc; }
  html.atlas-charcoal body .brand img { border-radius: 11px; }
  html.atlas-charcoal body :is(.nav,.section,footer,.privacy-note,.record,.dialog-footer,.save-row,.card-actions,.log,.steps>li,.pro-benefits li) { border-color: var(--line); }
  html.atlas-charcoal body :is(.panel,.card,.order-card,.project-card,.work-card,.simple-panel,.simple-metrics,.simple-metric,.stat,.review-panel,.search-row,.workspace-entry,.faq details,.code-help,.email-review,.account-links a,.empty,.unavailable,.notice.neutral) {
    background: var(--panel); border-color: var(--line); color: var(--ink); box-shadow: 0 4px 16px #080a0b18;
  }
  html.atlas-charcoal body :is(.field-shift,.simple-primary .simple-action) { background: var(--panel) !important; border-color: var(--line); }
  html.atlas-charcoal body :is(.simple-action strong,.simple-metric strong,.stat strong,.pro-benefits strong) { color: var(--ink); }
  html.atlas-charcoal body :is(.simple-action small,.simple-action span,.simple-metric span,.simple-panel p,.card p,.card li,.faq summary,.faq details p,.faq details li,.steps h3,.steps p,.review-panel ul,.draft-entry ul) { color: var(--muted); }
  html.atlas-charcoal body :is(button,.btn,.button-link,.icon-button,.select-lite) {
    background: #252a2d; border-color: #454d50; color: var(--ink);
  }
  html.atlas-charcoal body :is(.btn.primary,button.primary,a.primary,.primary,.capture-nav,#send) {
    background: #29df85 !important; border-color: #29df85 !important; color: #092a20 !important;
    box-shadow: none;
  }
  html.atlas-charcoal body :is(.primary,.capture-nav) :is(span,strong,small,svg) { color: #092a20; }
  html.atlas-charcoal body :is(button,.btn,.button-link):hover:not(:disabled) { filter: brightness(1.08); }
  html.atlas-charcoal body :is(.text-button,.account-signout) { background: transparent; color: #43e99b; }
  html.atlas-charcoal body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea) {
    background: #121416; color: #f0f3f1; border-color: #454d50; color-scheme: dark;
  }
  html.atlas-charcoal body :is(input,textarea)::placeholder { color: #b7c0bc; }
  html.atlas-charcoal body :is(input,select,textarea):focus { border-color: #29df85; box-shadow: 0 0 0 3px #29df8529; }
  html.atlas-charcoal body :is(a,button,summary,input,select,textarea):focus-visible { outline: 3px solid #43e99b; outline-offset: 3px; }
  html.atlas-charcoal body :is(input,select,textarea):disabled { color: #b7c0bc; background: #252a2d; }
  html.atlas-charcoal body input:is([type=checkbox],[type=radio],[type=range]),html.atlas-charcoal body progress { accent-color: #29df85; }
  html.atlas-charcoal body :is(.segments,.chat-job,.composer-row,.draft-entry,.preview-totals,.consent-details,.getting-started,.story-card,.line-item,.account-links a:hover) {
    background: #252a2d; border-color: var(--line); color: var(--ink);
  }
  html.atlas-charcoal body :is(.segments button.selected,.tabs button[aria-current=page],#tabs button[aria-current=page],.bottom-nav button.active,.sidebar button.active,.nav-item.active) { background: #252a2d; color: #43e99b; border-color: #29df85; }
  html.atlas-charcoal body .bottom-nav button.active .ico { color: #43e99b; }
  html.atlas-charcoal body :is(.pill,.label,.tag,.badge,.quiet-tag) { background: #252a2d; color: #43e99b; border-color: #454d50; }
  html.atlas-charcoal body :is(.status,.notice,#subscription-status) { background: #252a2d; color: #b7c0bc; border-color: #454d50; }
  html.atlas-charcoal body :is(.status.error,.notice.error,.error,.form-error,#form-error,.toast.error) { background: #3b2528; color: #ffb8af; border-color: #a66660; }
  html.atlas-charcoal body :is(.danger,.danger p,.danger strong,.red) { color: #ffb8af; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.simple-field-tip,.private-shared-notice,#allowance-status) { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.simple-field-tip,.private-shared-notice) :is(p,strong,small,li) { color: #ffe0a3; }
  html.atlas-charcoal body :is(.warning,.setup-card,.private-shared-notice) a { color: #ffedc7; }
  html.atlas-charcoal body dialog { background: #1c2022; color: var(--ink); border-color: #454d50; }
  html.atlas-charcoal body dialog::backdrop { background: #080a0bc4; }
  html.atlas-charcoal body :is(.dialog-head,.dialog-body,.dialog-footer,dialog .actions) { background: #1c2022; border-color: var(--line); }
  html.atlas-charcoal body .hero .eyebrow { background: #252a2d; border-color: #454d50; color: #43e99b; }
  /* Account entry keeps the existing steps and fields; the form matches the shared charcoal surfaces. */
  html.atlas-charcoal body :is(.auth-panel,.assistant-shell,#ask,.chat-sheet,.chat-sheet form) { background: #121416; color: var(--ink); border-color: var(--line); }
  html.atlas-charcoal body :is(.auth-form-wrap h2,.chat-welcome h2,.prompt-copy strong,.chat-message.assistant) { color: var(--ink); }
  html.atlas-charcoal body :is(.auth-form-wrap label,.chat-job label,.welcome-kicker,.prompt-arrow,.auth-panel .back) { color: var(--muted); }
  html.atlas-charcoal body .auth-steps .current { color: #43e99b; border-color: #29df85; }
  html.atlas-charcoal body .auth-steps .current>span { background: #29df85; color: #092a20; }
  html.atlas-charcoal body .welcome-prompts button { background: #1c2022; border-color: var(--line); }
  html.atlas-charcoal body .prompt-icon { background: #252a2d; color: #43e99b; }
  html.atlas-charcoal body .chat-message.user { background: #252a2d; color: #f0f3f1; }
  html.atlas-charcoal body .chat-message.user p { color: #f0f3f1; }
  html.atlas-charcoal body #message { background: transparent; color: var(--ink); box-shadow: none; }
  html.atlas-charcoal body #request-status:not(:empty) { background: #252a2d; color: #b7c0bc; border-color: var(--line); }
  html.atlas-charcoal body>section[aria-labelledby="business-release-title"] {
    max-width: 1124px; width: calc(100% - 44px); margin: 24px auto; padding: 24px;
    background: #1c2022; border: 1px solid #454d50; border-radius: 16px;
  }
  /* Light documents are deliberate: quotes and reports remain suitable for customers. */
  html.atlas-charcoal body :is(.document,.report) { background: #fff; color: #17352a; }
  html.atlas-charcoal body :is(.document,.report) :is(p,li,h1,h2,h3,h4,strong,small,dt,dd,td,th) { color: #17352a; }
  html.atlas-charcoal body .document a { color: #195d3b; }
  html.atlas-charcoal body .plans-page { background: transparent; }
  html.atlas-charcoal.plans-page,html.atlas-charcoal body.plans-page { color: var(--ink); }
  html.atlas-charcoal body :is(.card.featured,#subscription-live) { background: #1c2022; border-color: #29df85; }
  /* The legacy featured Pro selector contains an ID; match it explicitly. */
  html.atlas-charcoal body .cards .card:has(#pro-title) { background: #1c2022; color: var(--ink); border-color: #29df85; }
  html.atlas-charcoal body .card.coming { background: #252a2d; border-color: #454d50; }
  html.atlas-charcoal body :is(.business-details,.modern-jobs section,.modern-jobs article.card) { background: #1c2022; border-color: var(--line); }
  html.atlas-charcoal body :is(.plan-intro h1,.plan-intro p,.price,.business-details h2,.business-details li) { color: var(--ink); }
  html.atlas-charcoal body .steps>li:before { background: #29df85; color: #092a20; }
  html.atlas-charcoal body .toast:not(.error) { background: #252a2d; color: #f0f3f1; }
  @media (max-width: 700px) {
    html.atlas-charcoal body :is(.topbar,.nav) { flex-wrap: wrap; gap: 12px; }
    html.atlas-charcoal body .header-actions { flex-wrap: wrap; gap: 12px; }
    html.atlas-charcoal body :is(.topbar,.nav) a { white-space: nowrap; }
  }
}

/* First-shift readability and clean mobile navigation.
   Presentation only: visibility, disabled state, safe-area height and actions are unchanged. */
@media screen {
  html.atlas-charcoal body .simple-start {
    background: #1c2022;
    border-color: var(--line);
    color: var(--ink);
    box-shadow: 0 4px 16px #080a0b18;
  }
  html.atlas-charcoal body .simple-start :is(h2,strong) { color: var(--ink); }
  html.atlas-charcoal body .simple-start :is(p,span,.simple-start-note) { color: var(--muted); }
  html.atlas-charcoal body .simple-start-steps li {
    background: #252a2d;
    border-color: var(--line);
  }
  html.atlas-charcoal body .simple-start-steps li::before {
    background: #29df85;
    color: #092a20;
  }
  html.atlas-charcoal body .simple-next-step {
    background: #252a2d;
    border-color: var(--line);
    color: var(--ink);
  }
  html.atlas-charcoal body .simple-next-step strong { color: var(--ink); }
  html.atlas-charcoal body .simple-next-step span { color: var(--muted); }

  @media (max-width: 700px) {
    html.atlas-charcoal body .bottom-nav {
      background: #121416f5;
      border-top-color: var(--line);
    }
    html.atlas-charcoal body .bottom-nav button {
      position: relative;
      background: transparent !important;
      border-color: transparent !important;
      border-radius: 12px;
      box-shadow: none;
      color: #b7c0bc;
    }
    html.atlas-charcoal body .bottom-nav button.active {
      background: transparent !important;
      border-color: transparent !important;
      color: #43e99b;
    }
    html.atlas-charcoal body .bottom-nav button.active::before {
      content: "";
      position: absolute;
      top: 1px;
      width: 18px;
      height: 3px;
      border-radius: 999px;
      background: #29df85;
    }
    html.atlas-charcoal body .bottom-nav .capture-nav {
      width: 48px;
      height: 48px;
      min-width: 48px;
      min-height: 48px;
      background: #29df85 !important;
      border-color: #29df85 !important;
      color: #092a20 !important;
      border-radius: 16px;
      box-shadow: 0 4px 12px #080a0b40;
    }
    html.atlas-charcoal body .bottom-nav .capture-nav::before { content: none; }
  }
}

/* Hard-coded legacy surfaces are normalized here; semantics stay distinct. */
@media screen {
  html.atlas-charcoal, html.atlas-charcoal body, html.atlas-charcoal body:has(.sidebar) {
    --bg: #121416; --surface: #1c2022; --panel: #1c2022; --paper: #121416;
    --white: #1c2022; --ink: #f0f3f1; --text: #f0f3f1; --muted: #b7c0bc;
    --line: #454d50; --forest: #29df85; --forest-deep: #092a20;
    --accent: #29df85; --green: #29df85; --leaf: #252a2d; --mint: #252a2d;
    --lime: #252a2d; --cream: #121416; --charcoal: #1c2022;
    --atlas-bg: #121416; --atlas-surface: #1c2022; --atlas-paper: #121416;
    --atlas-ink: #f0f3f1; --atlas-muted: #b7c0bc; --atlas-line: #454d50;
    --atlas-forest: #29df85; --atlas-sand: #362f21;
    --ar-deep: #121416; --ar-green: #29df85; --ar-muted: #b7c0bc;
  }
  html.atlas-charcoal body :is(.details,details,.simple-tools,.optional-fields,.note-card,.contact-card,.assist-card,.access-details,.privacy-details,.work-date,.description-options,.example-prompts,.simple-start,.field-job-identity,.work-logs,.log-entry,.atlas-plans-nav) {
    background-color: #1c2022; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(details, .details,.simple-panel,.simple-tools,.simple-start,.note-card,.contact-card) :is(summary,h1,h2,h3,h4,strong,.note-body) { color: #f0f3f1; }
  html.atlas-charcoal body :is(details,.details,.simple-panel,.simple-tools,.simple-start,.note-card,.contact-card) :is(p,small,li,label,dt,.muted,.meta,.simple-empty) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.simple-panel-head,.simple-row,.simple-help,.simple-jobs,.sidebar-user,.work-log,.log-entry,.work-logs,.atlas-plans-nav) { border-color: #454d50; }
  html.atlas-charcoal body :is(.simple-primary .simple-action,.simple-secondary .btn,.organizer-mobile .btn,.top-actions .search-trigger,.example-grid button,.quick-grid button) {
    background: #252a2d; border-color: #454d50; color: #f0f3f1;
  }
  html.atlas-charcoal body :is(.example-grid,.quick-grid) button :is(strong,span) { color: #f0f3f1; }
  html.atlas-charcoal body .simple-action small { color: #b7c0bc; opacity: 1; }
  html.atlas-charcoal body :is(.simple-link,.atlas-plans-link,.sidebar .btn.ghost,.sidebar .project-link) { color: #43e99b; }
  html.atlas-charcoal body :is(.sidebar .project-link.selected,.sidebar .project-link:hover) { background: #252a2d; color: #f0f3f1; }
  html.atlas-charcoal body :is(.sidebar .nav-label,.sidebar .brand-name span,.sidebar .local-state,.sidebar-user small,.sidebar .workspace-pill .caption,.breadcrumb,.job-code,.nav-count) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.sidebar .avatar,.sidebar .workspace-pill,.sidebar .nav-count) { background: #252a2d; border-color: #454d50; }
  html.atlas-charcoal body .sidebar .nav button.active { box-shadow: inset 3px 0 #29df85; }
  html.atlas-charcoal body .field-shift::before { background: #29df85; }
  html.atlas-charcoal body .work-card .progress-track { background: #454d50; }
  html.atlas-charcoal body .work-card .progress-fill { background: #29df85; }
  html.atlas-charcoal body .simple-metric { border-color: #454d50 !important; }
  html.atlas-charcoal body .simple-metrics { background: transparent; box-shadow: none; }
  html.atlas-charcoal body :is(.dialog,.dialog-header,.dialog-head,.dialog-body,.dialog-footer,.sheet-heading) { background: #1c2022; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body .dialog-layer { background: #080a0bc4; }
  html.atlas-charcoal body :is(.skip,.mobile-menu summary,.mobile-panel) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.brand-mark,.mark,.chat-avatar) { background: #252a2d; color: #43e99b; border-color: #454d50; }
  html.atlas-charcoal body :is(.chat-job,.composer-row) { background: #252a2d; border-color: #454d50; }
  html.atlas-charcoal body :is(.chat-contact p,.chat-contact small,.welcome-kicker,.composer-caption) { color: #b7c0bc; }
  html.atlas-charcoal body .modern-jobs #status { background: #252a2d; color: #b7c0bc; border-color: #454d50; }
  html.atlas-charcoal body .modern-jobs .warning { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body :is(.modern-jobs .job-ref,.modern-jobs .job-code,.modern-jobs label,.modern-jobs #page-intro) { color: #b7c0bc; }
  html.atlas-charcoal body .modern-jobs .card .pill { background: #252a2d; color: #43e99b; }

  /* The public homepage uses the charcoal shell, with bright green reserved for actions. */
  html.atlas-charcoal body .hero { background: #121416; }
  html.atlas-charcoal body :is(.header,.cta,.faq-section,.walkthrough-section) { background: #121416; border-color: #454d50; }
  html.atlas-charcoal body :is(.feature-strip,.walkthrough,.sample-result,.workflow-grid article,.pro-offer,.business-details,.sample-footer) { background: #1c2022; border-color: #454d50; color: #f0f3f1; }
  html.atlas-charcoal body :is(.sample-tabs,.workflow-coming) { background: #252a2d; border-color: #454d50; }
  html.atlas-charcoal body :is(.strip-inner span,.sample-label,.sample-date,.sample-tabs button span,.sample-stamp,.workflow-kicker,.workflow-footnote,.number,.feature-tier,.report-preview-top,.report-preview-top small) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.hero h1 span,.workflow-kicker b) { color: #43e99b; }
  html.atlas-charcoal body .hero .eyebrow { background: transparent; color: #b7c0bc; }
  html.atlas-charcoal body .sample-tabs button { background: transparent; color: #b7c0bc; }
  html.atlas-charcoal body .sample-tabs button[aria-selected=true] { background: #252a2d; color: #f0f3f1; border-bottom-color: #29df85; }
  html.atlas-charcoal body :is(.sample-facts dt,.sample-facts dd,.next-action p,.sample-context blockquote,.report-lines dd) { color: #f0f3f1; }
  html.atlas-charcoal body :is(.sample-facts dt small,.sample-facts dd small,.photo-label) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.report-lines>div,.sample-timeline::before,.report-preview-top,.benefit) { border-color: #454d50; }
  html.atlas-charcoal body .sample-timeline::before { background: #454d50; }
  html.atlas-charcoal body .timeline-dot { background: #29df85; border-color: #29df85; }
  html.atlas-charcoal body .timeline-dot.hollow { background: #1c2022; }
  html.atlas-charcoal body .photo-caption strong { color: #fff; }
  html.atlas-charcoal body .workflow-kicker b { background: #252a2d; border-color: #454d50; }
  html.atlas-charcoal body :is(.cta .eyebrow,.cta p,.pro-price small,.pro-price strong span,.footer .brand small) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.card.featured,.cards .card:has(#pro-title),#subscription-live,.pro-offer) { background: #1c2022; border-color: #454d50; }
  html.atlas-charcoal body .card.coming { background: #252a2d; border-color: #454d50; }

  /* Legacy workspace detail, note, schedule and handoff surfaces. */
  html.atlas-charcoal body {
    --canvas: #252a2d;
  }
  html.atlas-charcoal body :is(.brief-card,.quick-card,.detail-stat,.plan-item,.photo-tile,.capture-preview,.source-note,.search-result,.report-pre,.walkthrough-card,.launch-notice,.x-commandbar,.x-review-shell,.x-card,.x-code,.x-health div,.a-facts>div,.a-linked,.a-job-stats>div,.a-message,.a-focus-panel,.a-focus-row,.handoff-metric,.handoff-section,.handoff-source,.handoff-overview>div,.handoff-next,.e-benefit,.e-get-started,.e-account-notice,.e-save-guide,.e-routine-teaser,.e-setup-ready,.l-help-start,.l-help-card,.l-guide-path,.shift-balance-grid>div,.practice-guide) {
    background: #1c2022; border-color: #454d50; color: #f0f3f1;
  }
  html.atlas-charcoal body :is(.wide-table th,.capture-preview .wide-table th,.search-trigger kbd,.tutorial-numbers span,.e-setup-number,.workspace-pill .mini-mark,.count-pill,.x-pill) { background: #252a2d; color: #b7c0bc; border-color: #454d50; }
  html.atlas-charcoal body :is(.wide-table td,.wide-table th,.detail-stat,.source-note,.report-lines>div,.order-reference-details) { border-color: #454d50; }
  html.atlas-charcoal body :is(.brief-kicker,.brief-footer small,.stat-head,.stat-sub,.attention-row .desc,.timeline-time,.project-card .mini-code,.project-card .progress-row,.activity-item,.practice-guide .micro,.practice-guide .guide-path,.practice-guide .guide-footer span,.guide-tip,.l-help-card small) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.brief-card p,.practice-guide p,.timeline-row p,.a-message p,.handoff-section p) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.progress,.progress-track,.timeline-row:not(:last-child)::after) { background: #454d50; }
  html.atlas-charcoal body :is(.progress-fill,.timeline-bullet,.swatch) { background: #29df85; }
  html.atlas-charcoal body :is(.btn.accent,.day-button.selected,.tutorial-numbers span.current,.e-setup-list .is-done .e-setup-number,.e-routine-heading>span) { background: #29df85; border-color: #29df85; color: #092a20; }
  html.atlas-charcoal body .btn.accent :is(span,strong,small) { color: #092a20; }
  html.atlas-charcoal body .day-button.selected :is(span,strong,small) { color: #092a20; }
  html.atlas-charcoal body .capture-textarea { background: #121416 !important; color: #f0f3f1; }
  html.atlas-charcoal body :is(.quick-card .btn,.practice-guide .btn:not(.accent),.capture-hint button,.search-result:hover,.l-help-card:hover) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.photo-tile .delete-photo,.task-check) { background: #252a2d; border-color: #454d50; color: #f0f3f1; }
  html.atlas-charcoal body :is(.badge.green,.task-check.done) { background: #173329; color: #b1e8ca; border-color: #5b9477; }
  html.atlas-charcoal body .badge.orange { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body .badge.red { background: #3b2528; color: #ffb8af; border-color: #a66660; }
  html.atlas-charcoal body .badge.blue { background: #252a2d; color: #43e99b; border-color: #454d50; }
  html.atlas-charcoal body :is(.cloud-ribbon,#runtime-warning,html[data-app-state=failed] .launch-notice) { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body .cloud-ribbon .btn { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body .dialog-status { background: #252a2d; color: #b7c0bc; border-color: #454d50; }
  html.atlas-charcoal body .dialog-status.error { background: #3b2528; color: #ffb8af; border-color: #a66660; }

  /* Status color conveys meaning; ordinary notices remain neutral. */
  html.atlas-charcoal body :is(.success,.status.success,.notice.success,.save-success,.saved,.badge.success) { background: #173329; color: #b1e8ca; border-color: #5b9477; }
  html.atlas-charcoal body :is(.success,.status.success,.notice.success,.save-success,.saved) :is(p,strong,small,span,h2) { color: #b1e8ca; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.simple-field-tip,.private-shared-notice,#allowance-status) { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.simple-field-tip,.private-shared-notice) :is(p,strong,small,li,span,h3) { color: #ffe0a3; }
  html.atlas-charcoal body :is(.status.error,.notice.error,.error,.form-error,#form-error,.toast.error) { background: #3b2528; color: #ffb8af; border-color: #a66660; }
  html.atlas-charcoal body :is(.error,.danger) :is(p,strong,small,span),html.atlas-charcoal body :is(.danger,.red,.modern-jobs .danger) { color: #ffb8af; }
  html.atlas-charcoal body :is(button,.btn,.button-link):disabled,
  html.atlas-charcoal body :is(button,.btn,.button-link)[aria-disabled=true] { filter: none; }
  html.atlas-charcoal body :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible { outline-color: #43e99b; }

  /* Customer documents keep a white page even when reviewed on a dark screen. */
  html.atlas-charcoal body :is(.document,.report) { background: #fff; color: #17352a; }
  html.atlas-charcoal body :is(.document,.report) :is(p,li,h1,h2,h3,h4,strong,small,dt,dd,td,th,label,span) { color: #17352a; }
  html.atlas-charcoal body :is(.document,.report) a { color: #195d3b; }
  html.atlas-charcoal body :is(.document,.report) :is(details,.details) { background: #fff; color: #17352a; }
  html.atlas-charcoal body [hidden] { display: none !important; }
}

/* Charcoal surfaces and comprehensive readability fixes. The atlas-charcoal class
   scopes the theme to the updated pages. No visibility or logic changes. */
@media screen {
  html.atlas-charcoal body { background: #121416; }
  html.atlas-charcoal body .hero { background: #121416; }
  html.atlas-charcoal body .hero h1 span { color: #43e99b; }
  html.atlas-charcoal body :is(.brand-mark,.mark,.auth-mark,.chat-avatar) {
    background: #173e34; color: #d9e9b6; border-color: #454d50;
  }
  html.atlas-charcoal body :is(.brand-mark,.mark,.auth-mark,.chat-avatar) :is(svg,span) { color: #d9e9b6; }
  html.atlas-charcoal body .brand-mark { background: #173e34; color: #d9e9b6; }
  html.atlas-charcoal body .brand-mark svg { color: inherit; stroke: currentColor; }
  html.atlas-charcoal body :is(.brand-name span,.brand small) { color: #b7c0bc; }
  html.atlas-charcoal body {
    --sand: #252a2d; --canvas: #252a2d;
    --blue: #43e99b; --blue-bg: #252a2d;
  }
  html.atlas-charcoal body :is(.job-bar,.jobbar,.tabs,.metric,.metric:nth-child(even),.table-wrap thead,.crew-comparison .selected-crew,.lookahead-status,.intro .eyebrow,.pro-header nav a:hover,.pro-header nav a:first-child) {
    background: #1c2022; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(.job-bar,.jobbar,.metric,.table-wrap,.crew-comparison) :is(label,span,small,th,.crew-label) { color: #b7c0bc; }
  html.atlas-charcoal body :is(.pro-header nav a,.encouragement,.report-mark) { color: #43e99b; }
  html.atlas-charcoal body :is(.tabs button[aria-current=page],.tabs button[aria-current=page]:hover,.report-presets button[aria-pressed=true]) {
    background: #252a2d; color: #43e99b; border-color: #29df85;
  }
  html.atlas-charcoal body .tabs button:hover:not(:disabled) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.row-item,.lookahead-task,.table-wrap td,.table-wrap th,#main .card>h3) { border-color: #454d50; }
  html.atlas-charcoal body :is(.pill.sand,.lookahead-status.needs-review) { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body .auth-steps li { color: #b7c0bc; border-color: #454d50; }
  html.atlas-charcoal body .auth-steps li>span { background: #252a2d; color: #b7c0bc; }
  html.atlas-charcoal body .auth-steps .current { color: #43e99b; border-color: #29df85; }
  html.atlas-charcoal body .auth-steps .current>span { background: #29df85; color: #092a20; }
  html.atlas-charcoal body .auth-steps .complete { color: #b1e8ca; border-color: #5b9477; }
  html.atlas-charcoal body .auth-steps .complete>span { background: #173329; color: #b1e8ca; }

  /* Chat bubbles, allowance details and account states have independent legacy fills. */
  html.atlas-charcoal body :is(.button,.mobile-start) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.welcome-prompts button,.chat-header .icon-button,.chat-shortcuts button,.quick-grid button,.example-grid button):hover:not(:disabled) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.chat-message.assistant,#answer.chat-message,#usage,#deletion-status) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.chat-message.assistant,#answer.chat-message,#usage,#deletion-status) :is(p,small,strong,span) { color: #f0f3f1; }
  html.atlas-charcoal body :is(button.danger,.btn.danger,a.danger) { background: #3b2528; color: #ffb8af; border-color: #a66660; }

  /* Job Pulse was cream underneath shared pale text. Set every layer together. */
  html.atlas-charcoal body .atlas-attention {
    background: #1c2022; color: #f0f3f1; border-color: #a28c52;
    border-top-color: #ffe0a3; box-shadow: 0 10px 40px #080a0b66;
  }
  html.atlas-charcoal body .atlas-attention :is(.atlas-attention-heading,.atlas-attention-item,.atlas-attention-items) {
    background: transparent; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body .atlas-attention :is(strong,h2,h3) { color: #f0f3f1; }
  html.atlas-charcoal body .atlas-attention :is(p,span) { color: #f0f3f1; }
  html.atlas-charcoal body .atlas-attention small { color: #b7c0bc; }
  html.atlas-charcoal body .atlas-attention::before,html.atlas-charcoal body .atlas-attention::after,html.atlas-charcoal body .atlas-attention *::before,html.atlas-charcoal body .atlas-attention *::after { color: inherit; border-color: #a28c52; }
  html.atlas-charcoal body .atlas-attention button {
    background: #29df85; color: #092a20; border-color: #29df85;
  }
  html.atlas-charcoal body .atlas-attention button.atlas-attention-dismiss {
    background: #252a2d; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body .atlas-attention button:focus-visible { outline-color: #83efb3; }

  /* Modal layers, notes and details can be opened from either workspace. */
  html.atlas-charcoal body :is(dialog,.dialog,.dialog-header,.dialog-head,.dialog-body,.dialog-footer,.sheet-heading,.chat-sheet,.handoff-dialog .dialog-body,.note-card,.note-body,.note-preview,.notes-grid .card,.details,.detail-stat,.order-details,.order-reference-details,.source-note,.capture-preview,.simple-panel,.simple-tools,.optional-fields) {
    background-color: #1c2022; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(dialog,.dialog,.chat-sheet,.handoff-dialog,.note-card,.note-body,.note-preview,.details,.order-details,.simple-panel,.simple-tools,.optional-fields) :is(h1,h2,h3,h4,strong,summary,.note-body) { color: #f0f3f1; }
  html.atlas-charcoal body :is(dialog,.dialog,.chat-sheet,.handoff-dialog,.note-card,.note-preview,.details,.order-details,.simple-panel,.simple-tools,.optional-fields) :is(p,small,label,dt,dd,li,.meta,.muted,.fine) { color: #b7c0bc; }
  html.atlas-charcoal body .dialog-layer,html.atlas-charcoal body dialog::backdrop { background: #080a0bc4; }
  html.atlas-charcoal body :is(.danger,.danger strong,.danger p,.error,.error strong,.error p) { color: #ffb8af; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.private-shared-notice) :is(p,strong,small,span,h3,li) { color: #ffe0a3; }

  /* Customer-facing document previews stay paper-white with dark readable text. */
  html.atlas-charcoal body :is(.document,.report,.report-preview:not(.sample-result)) { background: #fff; color: #17352a; }
  html.atlas-charcoal body :is(.document,.report,.report-preview:not(.sample-result)) :is(p,li,h1,h2,h3,h4,strong,small,dt,dd,td,th,label,span,.muted,.fine,.report-mark,.report-disclosure) { color: #17352a; }
  html.atlas-charcoal body :is(.document,.report,.report-preview:not(.sample-result)) :is(a,.text-link) { color: #195d3b; }
  html.atlas-charcoal body :is(.document,.report,.report-preview:not(.sample-result)) :is(details,.details,thead) { background: #fff; color: #17352a; }
  html.atlas-charcoal body [hidden] { display: none !important; }
}

/* Every visible Atlas chat layer is neutral. These explicit selectors also cover
   compact/keyboard layouts and the ID-qualified live answer from assistant.css. */
@media screen {
  html.atlas-charcoal { background: #121416; color-scheme: dark; }
  html.atlas-charcoal body { background: #121416; color: #f0f3f1; }
  html.atlas-charcoal body :is(.hero,.header,.topbar,.mobile-top,.sidebar,.auth-story,.chat-header,.assistant-shell,.assistant-shell .main-card,.assistant-shell .conversation,#ask) {
    background: #121416; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(.chat-job,.chat-job select,.composer-row,.composer-row:focus-within,.chat-message.assistant,#answer.chat-message,.review-panel,.draft-entry,.consent-details,.getting-started,#usage,.chat-sheet,.chat-sheet form,.sheet-heading) {
    background: #1c2022; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(.chat-header .icon-button,.chat-shortcuts button,.add-button,.welcome-prompts button,.prompt-icon,.chat-sheet .quick-grid button,.example-grid button) {
    background: #252a2d; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body :is(.chat-header .icon-button,.chat-shortcuts button,.add-button,.welcome-prompts button,.chat-sheet .quick-grid button,.example-grid button):hover:not(:disabled) {
    background: #303739; color: #f0f3f1; border-color: #687570;
  }
  html.atlas-charcoal body :is(.chat-message.assistant,#answer.chat-message) :is(p,strong,span,small,li) { color: #f0f3f1; }
  html.atlas-charcoal body .chat-message.user { background: #173e34; color: #f0f3f1; }
  html.atlas-charcoal body .chat-message.user :is(p,strong,span,small) { color: #f0f3f1; }
  html.atlas-charcoal body :is(.chat-contact h1,.chat-welcome h2,.prompt-copy strong,.chat-sheet h2,.chat-sheet summary) { color: #f0f3f1; }
  html.atlas-charcoal body :is(.chat-contact p,.chat-job label,.prompt-copy small,.composer-caption,.welcome-kicker,.prompt-arrow,.chat-sheet label,.chat-sheet .fine) { color: #b7c0bc; }
  html.atlas-charcoal body #message { background: transparent; color: #f0f3f1; }
  html.atlas-charcoal body #message::placeholder { color: #b7c0bc; opacity: 1; }
  html.atlas-charcoal body .composer-row:focus-within { border-color: #29df85; box-shadow: none; }
  html.atlas-charcoal body #request-status:not(:empty) { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body .chat-shortcuts { background: #121416; }
  html.atlas-charcoal body :is(#send,.btn.primary,button.primary,a.primary,.primary,.capture-nav) {
    background: #29df85 !important; border-color: #29df85 !important; color: #092a20 !important;
  }
  html.atlas-charcoal body :is(#send,.primary,.capture-nav) :is(span,strong,small,svg) { color: #092a20; }
  html.atlas-charcoal body #send::before { color: #092a20; }
  html.atlas-charcoal body :is(.hero h1 span,.selected-text) { color: #43e99b; }
  html.atlas-charcoal body :is(.brand-mark,.mark,.auth-mark,.chat-avatar) { background: #173e34; color: #d9e9b6; border-color: #454d50; }
  html.atlas-charcoal body .brand-mark svg { color: inherit; stroke: currentColor; }
  html.atlas-charcoal body :is(.chat-job input,.chat-job select,.chat-sheet input,.chat-sheet select,.chat-sheet textarea) {
    background: #1c2022; color: #f0f3f1; border-color: #454d50; color-scheme: dark;
  }
  html.atlas-charcoal body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea) {
    background-color: #1c2022; color: #f0f3f1; border-color: #454d50;
  }
  html.atlas-charcoal body #message { background: transparent; }
  html.atlas-charcoal body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea):disabled { background-color: #252a2d; color: #b7c0bc; }
  html.atlas-charcoal body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea):focus { border-color: #29df85; }
  html.atlas-charcoal body .conversation { scrollbar-color: #687570 transparent; }
  html.atlas-charcoal body :is(.chat-sheet,.dialog,dialog)::backdrop { background: #080a0bc4; }
  html.atlas-charcoal body .atlas-attention { background: #1c2022; color: #f0f3f1; border-color: #a28c52; border-top-color: #ffe0a3; }
  html.atlas-charcoal body .atlas-attention :is(.atlas-attention-heading,.atlas-attention-item,.atlas-attention-items) { background: transparent; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body .atlas-attention :is(strong,h2,h3,p,span) { color: #f0f3f1; }
  html.atlas-charcoal body .atlas-attention small { color: #b7c0bc; }
  html.atlas-charcoal body .atlas-attention button { background: #29df85; color: #092a20; border-color: #29df85; }
  html.atlas-charcoal body .atlas-attention button.atlas-attention-dismiss { background: #252a2d; color: #f0f3f1; border-color: #454d50; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.private-shared-notice) { background: #362f21; color: #ffe0a3; border-color: #9c8253; }
  html.atlas-charcoal body :is(.warning,.clarification,.review-warnings,.setup-card,.private-shared-notice) :is(p,strong,small,span,h3,li) { color: #ffe0a3; }
  html.atlas-charcoal body :is(.status.error,.notice.error,.error,.form-error,#form-error,.toast.error) { background: #3b2528; color: #ffb8af; border-color: #a66660; }
  html.atlas-charcoal body [hidden] { display: none !important; }
}

/* Keep the three expandable sidebar groups consistent in both workspaces. */
@media screen {
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 10px 0 0;
    box-shadow: none;
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 10px;
    background: #252a2d;
    color: #f0f3f1;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary::-webkit-details-marker {
    display: none;
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary::marker {
    content: "";
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary::after {
    content: "";
    display: block;
    flex: 0 0 7px;
    box-sizing: border-box;
    width: 7px;
    height: 7px;
    margin: -3px 3px 0 auto;
    padding: 0;
    border: solid #b7c0bc;
    border-width: 0 2px 2px 0;
    background: transparent;
    transform: rotate(45deg);
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help)[open] > summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
  }
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary:focus-visible {
    outline: 3px solid #43e99b;
    outline-offset: 3px;
  }
  html.atlas-charcoal body .sidebar details.more-pages > button:first-of-type {
    margin-top: 8px;
  }
  html.atlas-charcoal body .sidebar details.more-pages > button + button {
    margin-top: 4px;
  }
  html.atlas-charcoal body .sidebar details.simple-jobs > .sidebar-projects {
    margin: 0;
    padding: 8px 0 0;
    border: 0;
  }
  html.atlas-charcoal body .sidebar details.simple-help > .nav {
    margin: 8px 0 0;
    padding: 0;
  }
  html.atlas-charcoal body .sidebar details.simple-help {
    margin: 0 0 10px;
  }
}
@media screen and (hover: hover) {
  html.atlas-charcoal body .sidebar :is(details.more-pages,details.simple-jobs,details.simple-help) > summary:hover {
    background: #303739;
  }
}
