/* Screen finishes only. Business status colours, box dimensions and print rules stay in the base sheet. */
@media screen {
  [data-brand-theme] .scm-prototype {
    --crown: #d61d3d;
    --ink: #333;
    --muted: #60656d;
    --line: #dce0e4;
    --background: #f5f7fa;
    --nav: #24272c;
    --nav-deep: #17191d;
    --blue: #40464d;
    --blue-hover: #20242a;
    --blue-light: #edf0f3;
    --action: var(--crown);
    --action-hover: #b71632;
    --control-line: #c2c7cf;
    --panel-radius: 3px;
    --table-head: #edf0f4;
    --table-ink: #454c55;
    --photo: url("brand-assets/official/campus.webp");
    --rail-bg: #fff;
    --rail-copy: #252c36;
    --rail-muted: #515762;
    --rail-hover: #f4f5f7;
    --rail-current: #fae9ed;
    --rail-current-text: #85152c;
    --logo: url("brand-assets/official/logo.png");
  }
  [data-brand-theme="materials"] .scm-prototype {
    --background: #eff2f4;
    --nav: #26353c;
    --nav-deep: #1a262c;
    --blue: #365865;
    --blue-hover: #213944;
    --blue-light: #e8eff2;
    --action: #344b56;
    --action-hover: #1e3039;
    --table-head: #dfe7eb;
    --table-ink: #344b56;
    --rail-bg: #f8fafb;
    --rail-copy: #36454c;
    --rail-muted: #57666d;
    --rail-hover: #e8edf0;
    --rail-current: #dce6ea;
    --rail-current-text: #233f4a;
    --photo: url("brand-assets/official/lab.webp");
  }
  [data-brand-theme="editorial"] .scm-prototype {
    --background: #fff;
    --nav: #262626;
    --blue: #343434;
    --blue-hover: #111;
    --blue-light: #f0efed;
    --action: #292929;
    --action-hover: #111;
    --line: #deddd9;
    --muted: #656460;
    --table-head: #f3f2ef;
    --table-ink: #41413d;
    --control-line: #c6c4be;
    --panel-radius: 0px;
    --rail-bg: #f8f7f4;
    --rail-copy: #3e3d39;
    --rail-muted: #666560;
    --rail-hover: #eeede9;
    --rail-current: #eeede9;
    --rail-current-text: #222;
    --photo: url("brand-assets/official/solar.webp");
  }

  /* The official wordmark occupies the old brand box. Retain the underlying accessible name. */
  [data-brand-theme] .scm-prototype .sidebar { background: var(--rail-bg); color: var(--rail-copy); box-shadow: inset -1px 0 var(--line); isolation: isolate; }
  [data-brand-theme] .scm-prototype .sidebar .brand { position: relative; color: transparent; }
  [data-brand-theme] .scm-prototype .sidebar .brand::before { content: ""; position: absolute; pointer-events: none; left: 7px; top: 2px; width: min(165px,calc(100% - 14px)); height: 22px; background: var(--logo) left center / contain no-repeat; }
  [data-brand-theme] .scm-prototype .sidebar .brand-icon,
  [data-brand-theme] .scm-prototype .login-brand .brand-icon { opacity: 0; }
  [data-brand-theme] .scm-prototype .sidebar .brand small { color: var(--rail-muted); transform: translateX(-49px); white-space: nowrap; }
  [data-brand-theme] .scm-prototype .sidebar > .nav-group { color: var(--rail-muted); }
  [data-brand-theme] .scm-prototype .sidebar .nav-item { color: var(--rail-copy); border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype .sidebar .nav-item:hover { color: var(--rail-current-text); background: var(--rail-hover); }
  [data-brand-theme] .scm-prototype .sidebar .nav-item.active { color: var(--rail-current-text); background: var(--rail-current); box-shadow: inset 3px 0 var(--crown); }
  [data-brand-theme] .scm-prototype .sidebar-foot { position: relative; color: var(--rail-muted); border-top-color: color-mix(in srgb,var(--rail-muted) 35%,transparent); }
  [data-brand-theme] .scm-prototype .sidebar::before { content: ""; position: absolute; z-index: -1; pointer-events: none; bottom: 0; left: 0; right: 0; height: max(0px,min(45%,calc(100% - 450px))); background-repeat: no-repeat; }
  [data-brand-theme="campus"] .scm-prototype .sidebar .nav-item.active { font-weight: 700; box-shadow: inset 4px 0 var(--crown); }
  [data-brand-theme="campus"] .scm-prototype .sidebar .nav-item:focus-visible { outline: 2px solid var(--rail-current-text); outline-offset: -2px; }
  [data-brand-theme="campus"] .scm-prototype .sidebar::before { bottom: 62px; height: max(0px,min(38%,calc(100% - 527px))); background: linear-gradient(to bottom,#fff,transparent 12%),var(--photo) 50% 48% / cover no-repeat; }
  [data-brand-theme="editorial"] .scm-prototype .sidebar::before { left: 16px; right: 16px; bottom: 68px; height: max(0px,min(150px,calc(100% - 520px))); background: var(--photo) 42% 55% / cover no-repeat; }
  [data-brand-theme="editorial"] .scm-prototype .sidebar .nav-item.active { background: transparent; color: #9e1831; }
  [data-brand-theme="campus"] .scm-prototype .topbar { box-shadow: inset 0 2px var(--crown); }
  [data-brand-theme="materials"] .scm-prototype .topbar {
    color: #fff; background: var(--nav); border-bottom-color: var(--nav); isolation: isolate;
  }
  [data-brand-theme="materials"] .scm-prototype .topbar :is(.breadcrumb,.account-control small) { color: #e5ecf0; }
  [data-brand-theme="materials"] .scm-prototype .topbar .account-avatar { color: #fff; background: #536a76; }
  [data-brand-theme="materials"] .scm-prototype .topbar .btn.ghost { color: #fff; }
  [data-brand-theme="materials"] .scm-prototype .topbar .btn.ghost:hover:not(:disabled) { color: white; background: #415560; }
  [data-brand-theme="editorial"] .scm-prototype .topbar { border-bottom-color: #3d3c39; }

  /* Keep repeated business controls neutral; reserve the brand stripe for selection. */
  [data-brand-theme] .scm-prototype :is(.panel,.card,.rule-card,.project-card,.quote-card,.stepper,.quick-switch-menu,.login-card,.demo-console) { border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype .panel { border-color: var(--line); }
  [data-brand-theme] .scm-prototype :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) { border-color: var(--control-line); border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype :is(input,textarea,select):focus { border-color: var(--blue); }
  [data-brand-theme] .scm-prototype input:is([type="checkbox"],[type="radio"]) { accent-color: var(--blue); }
  [data-brand-theme] .scm-prototype .btn:not(.rule-help-button) { border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype .btn:not(.primary,.ghost,.success,.danger,.demo-cases-launch,.rule-help-button) { border-color: var(--control-line); color: var(--ink); }
  [data-brand-theme] .scm-prototype .btn:not(.primary,.ghost,.success,.danger):hover:not(:disabled) { background: var(--blue-light); color: var(--ink); border-color: var(--blue); }
  [data-brand-theme] .scm-prototype .btn.primary { background: var(--action); border-color: var(--action); color: white; }
  [data-brand-theme] .scm-prototype .btn.primary:hover:not(:disabled) { background: var(--action-hover); border-color: var(--action-hover); color: white; }
  [data-brand-theme] .scm-prototype .btn.terminate-link { color: #913d43; }
  [data-brand-theme] .scm-prototype .account-avatar { background: var(--blue-light); color: var(--blue); }
  [data-brand-theme] .scm-prototype .stage-tab .stage-count { color: var(--ink); background: var(--table-head); }
  [data-brand-theme] .scm-prototype :is(.stage-tab,.tab).active { color: var(--ink); border-bottom-color: var(--crown); }
  [data-brand-theme] .scm-prototype .stage-tab.active .stage-count { background: var(--blue-light); color: var(--ink); }
  [data-brand-theme] .scm-prototype .project-stage-tabs .stage-tab + .stage-tab::before { background: var(--line); }
  [data-brand-theme] .scm-prototype .project-list-panel { border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype th { background: var(--table-head); color: var(--table-ink); border-bottom-color: var(--control-line); }
  [data-brand-theme] .scm-prototype td { border-bottom-color: var(--line); }
  [data-brand-theme] .scm-prototype tbody tr:hover { background: var(--table-head); }
  [data-brand-theme] .scm-prototype :is(td strong,.money,.summary-bar strong,.project-focus-deadline strong) { color: var(--ink); }
  [data-brand-theme] .scm-prototype .project-row-title { color: var(--ink); text-decoration: none; }
  [data-brand-theme] .scm-prototype .project-row-title:is(:hover,:focus-visible) { text-decoration: underline; }
  [data-brand-theme] .scm-prototype .demo-console { border-color: var(--line); box-shadow: 0 3px 14px #15171b24; }
  [data-brand-theme] .scm-prototype .demo-console summary small { color: #e1e3e6; }
  [data-brand-theme] .scm-prototype .demo-console .btn.demo-cases-launch { border-color: #afb5bb; }
  [data-brand-theme] .scm-prototype #modal { border-color: var(--line); border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype #modal::backdrop { background: #16181c83; }
  [data-brand-theme] .scm-prototype #toast { border-color: var(--control-line); color: var(--ink); }
  [data-brand-theme] .scm-prototype .project-focus { border-color: var(--line); border-left-color: var(--action); background: var(--blue-light); border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype :is(.project-focus-copy>p,.project-focus-progress) { color: var(--muted); }
  [data-brand-theme] .scm-prototype :is(.project-rule-details,.scoring-trial,.scoring-disclosure,.technical-project-config,.formula,.summary-bar,.rank-box,.file-chip,.supplier-product-chip) { border-color: var(--line); background: var(--blue-light); color: var(--blue); }
  [data-brand-theme] .scm-prototype :is(.scoring-trial,.scoring-disclosure) summary { color: var(--ink); }
  [data-brand-theme] .scm-prototype .notice:not(.amber,.red) { border-color: var(--line); border-left-color: var(--blue); background: var(--blue-light); color: var(--ink); }
  [data-brand-theme] .scm-prototype .type-option:has(input:checked),
  [data-brand-theme] .scm-prototype :is(.supplier-selection-row,.expert-selection-row):has(input:checked) { background: var(--blue-light); color: var(--blue); border-color: var(--control-line); }
  [data-brand-theme] .scm-prototype #project-form .project-form-section { background: #fff; border-color: var(--control-line); border-radius: var(--panel-radius); }
  [data-brand-theme] .scm-prototype #project-form .project-form-section h3 { color: var(--ink); }
  [data-brand-theme] .scm-prototype .login-shell { background: linear-gradient(#171b2268,#171b2282),var(--photo) center / cover no-repeat; }
  [data-brand-theme] .scm-prototype .login-brand { position: relative; }
  [data-brand-theme] .scm-prototype .login-brand::before { position: absolute; content: ""; left: 0; top: 4px; width: min(180px,95%); height: 27px; background: white var(--logo) left center / contain no-repeat; }
  [data-brand-theme] .scm-prototype .login-brand h1 { color: transparent; }
  [data-brand-theme] .scm-prototype .login-brand p { transform: translateX(-54px); }
  [data-brand-theme] .scm-prototype :is(.control-page,.project-detail-page) .page-head h1 { color: var(--ink); }
}
@media screen and (min-width:641px) {
  [data-brand-theme="materials"] .scm-prototype .sidebar::before {
    content: none;
  }
}
@media screen and (min-width:641px) and (min-height:685px) {
  [data-brand-theme="materials"] .scm-prototype .sidebar::before {
    content: ""; left: 16px; right: 16px; bottom: 84px; height: auto; aspect-ratio: 722 / 399;
    background: var(--photo) center / cover no-repeat;
  }
  [data-brand-theme="materials"] .scm-prototype .sidebar::after {
    content: "研发现场"; position: absolute; left: 16px; right: 16px; bottom: 63px;
    font-size: 12px; line-height: 21px; color: #3a515b; pointer-events: none;
  }
}
@media screen and (max-width:960px) {
  [data-brand-theme] .scm-prototype .sidebar .brand::before { left: 4px; }
  [data-brand-theme] .scm-prototype .sidebar .brand small { transform: translateX(-47px); }
}
@media screen and (max-width:640px) {
  [data-brand-theme] .scm-prototype .sidebar { background: var(--rail-bg); }
  [data-brand-theme] .scm-prototype .sidebar .brand::before { left: 4px; top: 50%; transform: translateY(-50%); width: min(153px,47%); }
  [data-brand-theme] .scm-prototype .sidebar::before { left: auto; right: 0; bottom: auto; top: 0; width: 45%; height: 57px; background: linear-gradient(90deg,var(--rail-bg),transparent 28%),var(--photo) 50% 48% / cover no-repeat; }
  [data-brand-theme="campus"] .scm-prototype .sidebar::before { bottom: auto; height: 57px; background: linear-gradient(90deg,#fff,transparent 30%),var(--photo) 50% 48% / cover no-repeat; }
}
@media (forced-colors:active) {
  [data-brand-theme] .scm-prototype .sidebar .nav-item.active { outline: 2px solid Highlight; outline-offset: -2px; }
  [data-brand-theme] .scm-prototype .sidebar .brand { color: LinkText; }
  [data-brand-theme] .scm-prototype .sidebar .brand::before,
  [data-brand-theme] .scm-prototype .login-brand::before { content: none; }
  [data-brand-theme] .scm-prototype .login-brand h1 { color: CanvasText; }
}

/* Procurement register: the company notice board's ruled columns and red section markers. */
@media screen {
  [data-brand-theme="editorial"] .scm-prototype {
    --ink:#242424; --muted:#595959; --line:#d0d0d0; --control-line:#a6a6a6;
    --rail-bg:#fff; --rail-copy:#262626; --rail-muted:#555; --rail-hover:#f0f0f0;
    --blue:#9b1931; --blue-light:#f6f3f3; --action:#9b1931; --action-hover:#801429;
    --table-head:#8d1830; --table-ink:#fff;
  }
  [data-brand-theme="editorial"] .scm-prototype :is(.page-head h1,.section-title h2) {
    font-family:"Noto Serif CJK SC","Songti SC","SimSun",serif;
  }
  [data-brand-theme="editorial"] .scm-prototype .page-head { position:relative; }
  [data-brand-theme="editorial"] .scm-prototype .page-head::after {
    content:""; position:absolute; pointer-events:none; left:0; right:0; bottom:-7px;
    height:3px; border-block:1px solid #777;
  }
  [data-brand-theme="editorial"] .scm-prototype .topbar { border-bottom-color:#acacac; }
  [data-brand-theme="editorial"] .scm-prototype .sidebar .nav-item {
    box-shadow:inset 0 -1px #d4d4d4;
  }
  [data-brand-theme="editorial"] .scm-prototype .sidebar .nav-item.active {
    background:#333; color:#fff; box-shadow:inset 4px 0 var(--crown);
  }
  [data-brand-theme="editorial"] .scm-prototype .btn.primary {
    color:#9b1931; background:#fff; border-color:#9b1931;
  }
  [data-brand-theme="editorial"] .scm-prototype .btn.primary:hover:not(:disabled) {
    color:#fff; background:#9b1931; border-color:#9b1931;
  }
  [data-brand-theme="editorial"] .scm-prototype :is(.panel,.project-list-panel,.demo-console) { box-shadow:none; }
  [data-brand-theme="editorial"] .scm-prototype .project-list-panel { border-color:#aaa; }
  [data-brand-theme="editorial"] .scm-prototype th {
    background:var(--table-head); color:var(--table-ink); border-bottom-color:#761328;
    box-shadow:inset -1px 0 #ffffff35;
  }
  [data-brand-theme="editorial"] .scm-prototype td { border-bottom-color:#ccc; }
  [data-brand-theme="editorial"] .scm-prototype .project-list-table tr:nth-child(even) td { background:#f7f7f7; }
  [data-brand-theme="editorial"] .scm-prototype tbody tr:hover,
  [data-brand-theme="editorial"] .scm-prototype tbody tr:hover td { background:#f3eeee; }
  [data-brand-theme="editorial"] .scm-prototype .project-row-title:is(:hover,:focus-visible) { color:#9b1931; }
  [data-brand-theme="editorial"] .scm-prototype .stage-tab .stage-count {
    color:#555; background:transparent; border-radius:0;
  }
  [data-brand-theme="editorial"] .scm-prototype .stage-tab.active .stage-count { color:#8d1830; }
  [data-brand-theme="editorial"] .scm-prototype .badge.project-stage { border-radius:0; }
}
@media screen and (min-width:641px) {
  [data-brand-theme="editorial"] .scm-prototype .sidebar::before {
    left:0; right:1px; bottom:56px; height:max(0px,min(30%,calc(100% - 505px)));
    background:var(--photo) 40% 60% / cover no-repeat;
  }
}
@media screen and (max-width:640px) {
  [data-brand-theme="editorial"] .scm-prototype .sidebar .nav-item { box-shadow:none; }
  [data-brand-theme="editorial"] .scm-prototype .sidebar .nav-item.active { box-shadow:inset 0 -3px var(--crown); }
}
