/* Shared visual finish. Deliberately leaves courseware canvases and business state alone. */
:root {
  --co-ui-font: -apple-system, BlinkMacSystemFont, "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  --co-ui-ink: #243b32;
  --co-ui-muted: #64766c;
  --co-ui-accent: #21664e;
  --co-ui-line: #dfe7e2;
  --co-ui-soft: #eff5f1;
  --co-ui-paper: #f5f7f5;
}
body.coop-surface, body:has(.ws-main), body.coop-page { background:var(--co-ui-paper)!important; color:var(--co-ui-ink)!important; }
body.coop-surface :is(h1,h2,h3,h4,p,a,button,label,input,select,textarea,span,small,th,td,strong,summary,dt,dd),
body :is(.bio-coop,.bio-account-popover), body :is(.bio-coop,.bio-account-popover) *,
body:has(.ws-main), body:has(.ws-main) :is(button,input,textarea,select) {
  font-family:var(--co-ui-font)!important; letter-spacing:normal; font-synthesis:none;
}
body.coop-surface { font-family:var(--co-ui-font); -webkit-font-smoothing:antialiased; }
body.coop-surface :is(button,input,select,textarea), body .bio-coop :is(button,input,select,textarea) { border-radius:9px; }
body.coop-surface :is(input,select,textarea), body .bio-coop :is(input,select,textarea) { border-color:#ccd8d0!important; background:#fff; color:#243b32; box-shadow:0 1px 2px #193b2e03; }
body.coop-surface :is(button,a,input,select,textarea):focus-visible, body .bio-coop :is(button,a,input,select,textarea):focus-visible { outline:3px solid #80b99d!important; outline-offset:3px; }
body.coop-surface :is(button,a),body .bio-coop :is(button,a) { transition:background-color .16s ease,color .16s ease,box-shadow .16s ease; }
body.coop-surface button:not(:disabled):hover,body .bio-coop button:not(:disabled):hover { box-shadow:0 2px 7px #214c3612; }
body.coop-surface button:disabled,body .bio-coop button:disabled { box-shadow:none; }

/* Existing homepage geometry, carousel and resource density are retained. */
body.coop-home-restored .home-card { background:#fff!important; border:1px solid var(--co-ui-line)!important; box-shadow:0 2px 5px #254f3205; border-radius:12px!important; }
body.coop-home-restored .home-card__copy h3 { font-size:16px!important; font-weight:650!important; line-height:1.45!important; color:#233e31!important; }
body.coop-home-restored .home-card__copy p { color:#586a60!important; font-size:14px!important; line-height:1.6!important; }
body.coop-home-restored .home-dense .home-card .home-card__copy :is(h3,p,a,span,small),
body.coop-home-restored .home-search :is(label,input,button,a) { font-family:var(--co-ui-font)!important; }
body.coop-home-restored :is(.home-card__open,#home-search-submit) { background:#205e48!important; color:#fff!important; border-radius:8px!important; font-weight:600!important; }
body.coop-home-restored :is(.cn-home-sidebar,.home-center-compact,.home-search) { border-color:var(--co-ui-line)!important; background:#fff!important; box-shadow:none!important; border-radius:12px!important; }
body.coop-home-restored .home-v2__hero { background:#eff5ee!important; border:0!important; border-left:3px solid #a5c3ab!important; border-radius:12px!important; }
body.coop-home-restored #home-title { font-family:var(--co-ui-font)!important; font-size:clamp(22px,2vw,32px)!important; font-weight:600!important; line-height:1.55!important; letter-spacing:-.025em!important; color:#234331!important; }
body.coop-home-restored #home-title :is(span,em,strong) { font:inherit!important; color:inherit!important; background:none!important; text-decoration-color:#bad8ad!important; }
body.coop-home-restored .cn-home-tabs { padding:3px; gap:3px; border-radius:10px; background:#edf2ee; }
body.coop-home-restored .cn-home-tabs button { border:0!important; background:transparent!important; border-radius:8px!important; color:#51665b; }
body.coop-home-restored .cn-home-tabs button[aria-selected=true] { background:#fff!important; color:#19543c!important; box-shadow:0 2px 5px #1a3c2812; }
body.coop-home-restored .cn-ranking-row { border-color:#e9eeea!important; }
body.coop-home-restored .cn-ranking-row strong { color:#284b38!important; font-weight:600!important; }
body.coop-home-restored :is(.cn-ranking-summary,.cn-ranking-meta) { color:#64766c!important; }
body.coop-home-restored .cn-teaching-label { background:#edf4ef!important; border-color:#d9e8dd!important; color:#36664c!important; font-weight:500!important; }
body.coop-home-restored .home-search__heading>.cn-lesson-cta { background:#eef5ef!important; color:#285e44!important; border-color:#d8e7db!important; }
body.coop-home-restored :is(.sidebar,.site-sidebar) { background:#143f32!important; }

/* Member surfaces: contemporary neutral controls, restrained green emphasis. */
body .bio-coop { color:#2a4036!important; --member-bg:#fff; --member-border:var(--co-ui-line); }
body .bio-coop :is(h2,h3) { color:#203f30!important; font-weight:650!important; letter-spacing:-.02em; }
body .bio-coop :is(p,label,input,select,textarea) { font-size:15px; line-height:1.65; }
body .bio-coop :is(.card,.member-profile,.modern-account-summary,.empty-state) { background:#f6f8f6!important; border-color:#e1e8e2!important; border-radius:12px!important; }
body .bio-coop .modern-account-links button { background:#f5f8f5!important; border:1px solid #e7ede8!important; border-radius:12px!important; }
body .bio-coop .modern-account-links button strong { font-size:16px; font-weight:600; }
body .bio-coop .modern-account-links button small { color:#64766c!important; }
body .bio-coop :is(.primary,.btn-primary) { background:#21664e!important; border-color:#21664e!important; color:white!important; }
body .bio-coop button { color:#335b46; font-weight:500; }
body .bio-coop :is(.message-project-icon,.text-avatar) { background:#e9f3ec!important; color:#2a674a!important; }
body .bio-coop .message-row { border-color:#e6ece7!important; }
body .bio-coop .message-row:hover { background:#f4f8f4!important; }
body .bio-account-popover { background:#fffffff7!important; color:#2a4036!important; border:1px solid #e2e9e3!important; border-radius:16px!important; box-shadow:0 12px 40px #17372c24!important; }
body .bio-account-popover :is(button,a):hover { background:#eff6f0!important; }
body .bio-coop::backdrop { background:#18362b55; backdrop-filter:blur(5px); }
body .bio-coop .modern-account-secondary :is(button,a) { color:#3e6651!important; }

/* Requests and author workbench: no extra panels around each message. */
body:has(.ws-main) :is(.ws-panel,.ws-conversation) { background:white!important; border-color:#e0e7e1!important; border-radius:14px!important; box-shadow:0 3px 14px #29483204!important; }
body:has(.ws-main) .ws-topbar { background:#fffffff5!important; border-color:#e1e8e2!important; color:#234b36!important; }
body:has(.ws-main) .ws-topbrand { font-size:21px!important; font-weight:650; }
body:has(.ws-main) :is(h1,h2,h3,legend) { color:#244432!important; font-weight:650!important; }
body:has(.ws-main) .ws-topic-meta h2 { font-size:24px!important; }
body:has(.ws-main) .ws-bubble { color:#304438!important; font-size:16px!important; line-height:1.8!important; }
body:has(.ws-main) .ws-comment { border-color:#edf0eb!important; }
body:has(.ws-main) .ws-comment header strong { font-weight:600!important; color:#31583f; }
body:has(.ws-main) .ws-target-tabs { background:#eef3ee!important; padding:3px; gap:3px; border:0!important; border-radius:10px!important; }
body:has(.ws-main) .ws-target-tabs button { border-radius:8px!important; background:transparent!important; color:#5a6a5e!important; padding:7px 6px!important; }
body:has(.ws-main) .ws-target-tabs button[aria-selected=true] { color:#235c3f!important; background:white!important; box-shadow:0 2px 6px #20433213; }
body:has(.ws-main) .ws-date-grid button { border-radius:8px!important; border-color:#e0e7df!important; color:#385743; }
body:has(.ws-main) .ws-date-grid button.is-selected { background:#25644b!important; color:#fff!important; border-color:#25644b!important; }
body:has(.ws-main) .primary { background:#21664e!important; border-color:#21664e!important; color:white!important; box-shadow:0 2px 4px #204a3310!important; border-radius:9px!important; }
.ws-guide-link { font-size:13px; font-weight:550; color:#446951; white-space:nowrap; text-underline-offset:4px; }

/* Administration keeps adjacent labels/numbers and the compact chart layout. */
body.coop-surface:has(#coop-panel) :is(h1,h2,h3,h4) { color:#254735!important; font-weight:650!important; }
body.coop-surface:has(#coop-panel) :is(.card,.panel,.cn-panel,.cn-detail,.daily-columns>section) { border-color:#e0e8e2!important; border-radius:12px!important; background:#fff!important; box-shadow:0 2px 8px #264c3304!important; }
body.coop-surface:has(#coop-panel) :is(th,thead) { background:#f1f5f1!important; color:#53685b!important; font-weight:600!important; }
body.coop-surface:has(#coop-panel) :is(td,th) { border-color:#e8eee8!important; }
body.coop-surface:has(#coop-panel) :is(.primary,.tabs button[aria-current=page]) { background:#e9f3ec!important; border-color:#c8dfce!important; color:#235d3f!important; }
body.coop-surface:has(#coop-panel) .daily-metrics { border-color:#dce6de!important; border-radius:12px!important; }
body.coop-surface:has(#coop-panel) .daily-metrics strong { color:#245e42!important; font-variant-numeric:tabular-nums; font-weight:650; }
body.coop-surface:has(#coop-panel) .daily-metrics span { color:#536c5b!important; }
body.coop-surface:has(#coop-panel) .cn-request-row[aria-selected=true] { background:#edf5ef!important; border-color:#b9d1be!important; }
@media(max-width:600px){body:has(.ws-main) .ws-topbrand{font-size:18px!important}body.coop-home-restored #home-title{font-size:22px!important}}
@media(prefers-reduced-motion:reduce){body.coop-surface *,body .bio-coop *,body .bio-account-popover *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
