/* Atlas unified workspace visual contract — Claude-inspired, not a clone.
   Keep domain-specific visualizations intact; normalize the application chrome. */
:root {
  --atlas-card-radius: 12px !important;
  --atlas-control-radius: 8px !important;
  --atlas-motion-duration: 160ms !important;
  --atlas-heading-font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  --atlas-number-font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
html[data-atlas-family] {
  --atlas-card-radius: 12px !important;
  --atlas-control-radius: 8px !important;
  --atlas-heading-font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  --atlas-number-font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}
html[data-atlas-family] body:not(.atlas-login-screen):not(.atlas-observatory) {
  background-image: none !important;
}
html[data-atlas-family=elegant],
html[data-atlas-family=digital],
html[data-atlas-family=creative] {
  --atlas-card-radius: 12px !important;
  --atlas-control-radius: 8px !important;
}
body:not(.atlas-login-screen):not(.atlas-observatory),
body:not(.atlas-login-screen):not(.atlas-observatory) :is(button,input,textarea,select) {
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(h1,h2,h3,h4) {
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  letter-spacing: -0.018em;
}
body:not(.atlas-login-screen):not(.atlas-observatory) h1 { font-size: clamp(1.45rem, 2vw, 1.8rem); line-height: 1.3; font-weight: 620; }
body:not(.atlas-login-screen):not(.atlas-observatory) h2 { font-size: 1.18rem; line-height: 1.4; font-weight: 600; }
body:not(.atlas-login-screen):not(.atlas-observatory) h3 { font-size: 1rem; line-height: 1.45; font-weight: 600; }
body:not(.atlas-login-screen):not(.atlas-observatory) p { line-height: 1.65; }
body:not(.atlas-login-screen):not(.atlas-observatory) :is(button,input,textarea,select) {
  border-radius: 8px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(button,input,textarea,select,a):focus-visible:not(.agent-chat-composer textarea,.channel-editor > textarea) {
  outline: 2px solid var(--atlas-accent, #c47750);
  outline-offset: 2px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) button:disabled { cursor: not-allowed; opacity: .55; }
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.panel,.card,.incubation-card,.my-work-item,.feedback-detail,
  .work-delivery-document,.dataset-card,.product-panel,.workflow-panel,
  .document-card,.knowledge-card,.role-card,.skill-card) {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgb(20 20 20 / 3%);
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.page-line,.page-heading,.feedback-head,.reader-head) {
  gap: 12px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.page-line h1,.page-heading h1) { margin-block: 0; }
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.tiny,.muted,.product-sub,.report-meta,.report-project) {
  line-height: 1.55;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.button,.button.primary,.button.small) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  line-height: 1.4;
  font-weight: 550;
  text-align: center;
}
body:not(.atlas-login-screen):not(.atlas-observatory) .button.small {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) .button > svg {
  flex: none;
  width: 16px;
  height: 16px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) .button:not(:disabled):hover {
  border-color: var(--atlas-muted);
}
body:not(.atlas-login-screen):not(.atlas-observatory) .button[aria-busy=true] {
  cursor: progress;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(input,textarea)::placeholder {
  color: var(--atlas-muted);
  opacity: 1;
}
body:not(.atlas-login-screen):not(.atlas-observatory) .button.primary {
  box-shadow: none;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.modal-shade,.reader,.command-panel,.drawer,.detail-panel) {
  border-radius: 14px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.reader-body,.command-body,.drawer-body) {
  line-height: 1.7;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(table th,table td) { padding-block: 10px; }
body:not(.atlas-login-screen):not(.atlas-observatory) :is(.toast,.error-note,.notice-strip) { border-radius: 9px; }
@media (prefers-reduced-motion: reduce) {
  body:not(.atlas-login-screen):not(.atlas-observatory) *,
  body:not(.atlas-login-screen):not(.atlas-observatory) *::before,
  body:not(.atlas-login-screen):not(.atlas-observatory) *::after {
    scroll-behavior: auto !important;
  }
  body:not(.atlas-login-screen):not(.atlas-observatory) :is(button,input,textarea,select,a) {
    transition: background-color 100ms linear, border-color 100ms linear, color 100ms linear;
  }
}

/* Shared card desk: works with the existing shell and leaves wide data views in
   control of their own scrolling surface. */
html[data-atlas-palette] {
  --atlas-card-radius: 14px !important;
  --atlas-control-radius: 9px !important;
  --atlas-motion-duration: 180ms !important;
  --atlas-workbench-gap: 18px;
}
html[data-atlas-mode=light] {
  --atlas-workbench-card: color-mix(in srgb, var(--atlas-panel) 94%, white);
  --atlas-workbench-raised: color-mix(in srgb, var(--atlas-selection) 72%, var(--atlas-panel));
}
html[data-atlas-mode=dark] {
  --atlas-workbench-card: color-mix(in srgb, var(--atlas-panel) 96%, var(--atlas-canvas));
  --atlas-workbench-raised: color-mix(in srgb, var(--atlas-selection) 84%, var(--atlas-panel));
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .panel,.card,.incubation-card,.my-work-item,.feedback-detail,
  .work-delivery-document,.dataset-card,.product-panel,.workflow-panel,
  .document-card,.knowledge-card,.role-card,.skill-card,.content-reading,
  .content-review,.content-publishing,.growth-card,.method-card,
  .observation-dimension
) {
  background: var(--atlas-workbench-card, var(--atlas-panel));
  border: 1px solid var(--atlas-edge);
  border-radius: var(--atlas-card-radius);
  box-shadow: none;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .incubation-card,.my-work-item,.dataset-card,.product-card,.execution-task,
  .content-card,.growth-card,.method-card,.observation-dimension
) {
  transition:
    border-color var(--atlas-motion-duration) ease,
    background-color var(--atlas-motion-duration) ease;
}
@media (hover:hover) {
  body:not(.atlas-login-screen):not(.atlas-observatory) :is(
    .incubation-card,.my-work-item,.dataset-card,.product-card,.execution-task,
    .content-card,.growth-card,.method-card,.observation-dimension
  ):hover {
    border-color: var(--atlas-muted);
  }
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .is-selected,[aria-selected=true],[aria-current=page],.active
) {
  scroll-margin: 12px;
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .tiny,.muted,.product-sub,.report-meta,.report-project,.content-list-summary,
  .content-kicker,.observation-meta,.method-help,.growth-help
) {
  font-size: max(11px, .78rem);
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .drawer,.reader,.detail-panel,.content-dialog,.growth-dialog,.method-dialog
) {
  background: var(--atlas-workbench-card, var(--atlas-panel));
  border: 1px solid var(--atlas-edge);
  box-shadow: -18px 0 56px color-mix(in srgb, var(--atlas-canvas) 78%, transparent);
}

@media (pointer: coarse) {
  body:not(.atlas-login-screen):not(.atlas-observatory) :is(.button,.button.small) {
    min-height: 44px;
  }
}
body:not(.atlas-login-screen):not(.atlas-observatory) :is(
  .drawer-head,.reader-head,.content-dialog>header,.growth-dialog>header,.method-dialog>header
) {
  background: color-mix(in srgb, var(--atlas-workbench-card, var(--atlas-panel)) 94%, transparent);
  border-bottom-color: var(--atlas-edge);
}
@media (prefers-reduced-motion: reduce) {
  html[data-atlas-palette] { --atlas-motion-duration: 0ms !important; }
  body:not(.atlas-login-screen):not(.atlas-observatory) :is(
    .incubation-card,.my-work-item,.dataset-card,.product-card,.execution-task,
    .content-card,.growth-card,.method-card,.observation-dimension
  ) { transform: none !important; }
}
