:root {
  --ink:#2c251c; --muted:#6a604f; --brand:#483e2f; --line:#dcd2bd;
  --paper:#fdfaf2; --white:#fffdf7; --gold:#fab220;
}
.workmark { display:grid; justify-items:center; gap:6px; width:min(100%,216px); min-width:0; align-self:center; }
.workmark img { display:block; width:100%; min-width:0; height:34px; object-fit:contain; object-position:center; }
.workmark-names { display:flex; justify-content:center; align-items:center; gap:8px; min-width:0; max-width:100%; text-align:center; font-size:13px; line-height:1.45; color:#665842; }
.workmark-names span,.workmark-names strong { min-width:0; overflow-wrap:anywhere; }
.workmark-names strong { color:var(--ink); font-weight:650; }
.workmark-names i { flex:none; width:1px; height:.9em; background:#b9a88d; }
.workmark-names:has([hidden]) i { display:none; }
.sun-login { max-width:1020px; margin:clamp(18px,8vh,100px) auto; border:1px solid #d2c6ad; border-radius:13px; overflow:hidden; background:var(--white); }
.sun-mast { min-height:72px; border-bottom:2px solid var(--ink); background:#fffaf0; display:flex; justify-content:space-between; align-items:center; gap:15px; padding:12px clamp(18px,3vw,40px); }
.sun-mast .workmark { display:flex; align-items:center; gap:16px; width:auto; max-width:calc(100% - 70px); }
.sun-mast .workmark img { width:clamp(145px,25vw,225px); }
.sun-mast .workmark:has([data-sample-field="brand"][hidden]) { display:grid; gap:3px; }
.sun-mast>small { font-size:13px; flex:none; }
.sun-layout { display:grid; grid-template-columns:1fr 1fr; min-height:450px; }
.sun-cover,.sample-cover { background:var(--gold); color:#1d1a15; }
.sun-cover { display:flex; flex-direction:column; border-right:2px solid var(--ink); min-width:0; }
.sun-copy { padding:30px clamp(22px,3.5vw,46px) 16px; overflow-wrap:anywhere; }
.sun-copy small,.sample-cover small { display:inline-block; padding:3px 9px; background:#211e19; color:#ffe6a5; font-weight:650; }
.sun-copy h1 { font-size:clamp(37px,4.5vw,62px); margin:8px 0 3px; font-weight:900; }
.sun-copy p { font-size:15px; }
.sun-art { flex:1 1 auto; width:100%; height:220px; min-height:135px; object-fit:cover; object-position:50% 47%; clip-path:polygon(0 12%,100% 0,100% 100%,0 100%); }
.sun-layout .login-form { padding:clamp(24px,4vw,56px); background:#fffdf7; min-width:0; overflow-wrap:anywhere; }
.login-form>small { color:var(--muted); }
.login-form h2 { margin-top:6px; }
input,textarea,select { border-color:#b9ad97; }
.sun-login .primary { background:var(--gold); border:1px solid #30281e; color:#211c13; box-shadow:2px 2px #30281e; }
.workspace aside { background:#efe7d6; color:var(--ink); border-right:1px solid #d4c8b0; }
.header-start { display:flex; align-items:center; gap:14px; min-width:0; }
.sidebar-toggle { display:none; }
@media (min-width:691px) and (scripting:enabled) {
  .workspace { --sidebar-width:254px; --sidebar-motion:280ms cubic-bezier(.25,.8,.25,1); grid-template-columns:var(--sidebar-width) minmax(0,1fr); }
  /* 保持目录原宽平移，长模块名在收起过程中也不会逐字换行。 */
  .workspace>aside { width:var(--sidebar-width); min-width:0; }
  .workspace[data-sidebar-collapsed] { grid-template-columns:0px minmax(0,1fr); }
  .workspace[data-sidebar-collapsed]>aside { transform:translateX(-100%); pointer-events:none; }
  .workspace[data-sidebar-collapsed] .content { max-width:calc(1620px + var(--sidebar-width)); }
  .main>header { position:sticky; top:0; z-index:5; }
  html:has(.workspace) { scroll-padding-top:78px; }
  .workspace .brand-sample { top:85px; }
  .sidebar-toggle { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex:none; min-height:36px; padding:5px 10px; border:1px solid #d1c4aa; border-radius:7px; color:#594c38; background:#fbf7ec; font-size:13px; font-weight:600; }
  .sidebar-toggle:hover { background:#f1e6cf; border-color:#b7a37e; }
  .sidebar-toggle[aria-expanded="false"] { color:#49371c; background:#f6e9c9; }
  .sidebar-toggle svg { width:18px; height:18px; }
  .sidebar-toggle svg path:last-child { transform-box:fill-box; transform-origin:center; }
  .sidebar-toggle[aria-expanded="false"] svg path:last-child { transform:scaleX(-1); }
  .sidebar-toggle span { max-width:9em; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
}
@media (min-width:691px) and (max-width:900px) and (scripting:enabled) {
  .workspace { --sidebar-width:208px; }
  .sidebar-toggle { width:36px; padding:0; }
  .sidebar-toggle span { display:none; }
  .header-start .crumb { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}
@media (min-width:691px) and (prefers-reduced-motion:no-preference) {
  .sidebar-animated { transition:grid-template-columns var(--sidebar-motion); }
  .sidebar-animated>aside { transition:transform var(--sidebar-motion); }
  .sidebar-animated .content { transition:max-width var(--sidebar-motion); }
  .sidebar-animated .sidebar-toggle svg path:last-child { transition:transform var(--sidebar-motion); }
}
@media (max-width:690px) { .header-start { display:none; } }
.workspace aside nav a,.nav-branch summary { color:var(--ink); }
.nav-branch summary small,.module-link small,.nav-caption,.module-link[aria-current] small { color:var(--muted); }
aside nav a:hover,.nav-branch summary:hover,.nav-branch[open]>summary { background:#e5dac4; color:var(--ink); }
aside nav .nav-home[aria-current],aside nav .module-link[aria-current],aside nav .brand-entry[aria-current] {
  background:#fff9e9; border-radius:0 4px 4px 0; box-shadow:inset 4px 0 #edb623; color:var(--ink); font-weight:700;
}
.nav-branch ul,.aux-nav { border-color:#c8ba9f; }
.brand-entry { border-top:1px solid #cfc2aa; margin-top:8px; }
.rail-art { margin-top:auto; padding:15px 8px 0; display:grid; gap:8px; overflow-wrap:anywhere; }
.rail-art img { width:73px; height:95px; object-fit:cover; transform:rotate(-4deg); border:3px solid #fffdf5; box-shadow:0 1px 3px #44371d45; }
.rail-art small { font-size:12px; color:var(--muted); }
header { background:#fdfaf2; }
.content { overflow-wrap:anywhere; }
.hero { background:transparent; color:var(--ink); padding:0 0 20px; min-height:0; border-radius:0; border-bottom:1px solid #bdae91; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:13px; }
.hero::after { content:none; }
.hero h1 { font-weight:850; }
.hero p,.hero .kicker,.hero-side>span { color:var(--muted); }
.kicker i { background:#ad9671; }
.hero-side { grid-column:1/-1; min-width:0; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.hero-side>span { margin:0; }
.hero-side a,.task-links>a { color:#473923; background:#f2e6cb; border-color:#d5c4a1; }
.calendar-slip { min-width:60px; text-align:center; border-top:4px solid #edb623; border-bottom:1px solid #c8b99e; padding:5px 8px; line-height:1.2; }
.calendar-slip small,.calendar-slip strong { display:block; }
.calendar-slip strong { font:700 32px/1.1 Arial,sans-serif; }
.calendar-slip small { font-size:12px; }
.workspace .panel { background:var(--white); }
.hero~.panel { background:transparent; padding:10px 0; border:0; border-radius:0; }
.hero~.panel>h2 { border-bottom:1px solid #b7a789; padding-bottom:7px; }
.inbox-list li+li { border-top-style:dashed; }
.inbox-list li>a:hover,.switch a:hover,.switch [aria-current],.step-body,.metricrow>div,thead th,.topics span { background:#f3eddf; }
.inline { color:#6b4a19; }
.edit-heading p { color:var(--muted); margin:6px 0 18px; }
.brand-picker,.edit-actions { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.brand-picker label { margin:0; min-width:0; }
.brand-picker select { display:block; margin-top:4px; max-width:100%; }
.brand-picker button,.edit-actions button:not(.primary) { border:1px solid #baad94; background:#fffcf4; border-radius:5px; padding:8px 13px; }
.brand-editor { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; align-items:start; }
.brand-edit-form input[type=file] { max-width:100%; }
.brand-edit-form label small { font-weight:400; }
.brand-edit-form .check-default { display:flex; align-items:center; gap:8px; }
.brand-edit-form .check-default input { width:auto; }
.brand-edit-form .image-feedback,.brand-saved { font-size:14px; color:#65502d; }
.brand-saved { background:#f2e5bf; padding:8px 12px; border-radius:4px; }
.edit-actions { margin-top:20px; }
.brand-sample { position:sticky; top:15px; }
.brand-sample [hidden] { display:none; }
.brand-sample .sample-cover { overflow:hidden; }
.sample-cover>div,.sample-identity,.sample-side,.sample-role,.sample-login { padding:18px; }
.sample-cover h2 { margin:6px 0 0; font-size:clamp(22px,3vw,40px); }
.sample-cover img { display:block; width:100%; height:170px; object-fit:cover; object-position:50% 47%; clip-path:polygon(0 12%,100% 0,100% 100%,0 100%); }
.sample-identity,.sample-side { background:#efe7d6; display:grid; gap:5px; }
.sample-identity { justify-items:center; }
.sample-side img { width:75px; height:95px; object-fit:cover; border:3px solid white; transform:rotate(-4deg); margin:8px; }
.sample-side strong { border-left:4px solid #edb623; background:#fff9e8; padding:5px 9px; }
.sample-side p,.sample-copy dd { margin:0; }
.sample-login,.sample-role { background:#faf5e8; }
.sample-login b,.sample-login span,.sample-login strong { display:block; }
.sample-login b { margin-top:12px; font-size:13px; }
.sample-login span { min-height:32px; padding:4px 8px; border:1px solid #c1b6a1; background:white; }
.sample-login strong { background:var(--gold); margin-top:15px; padding:5px 12px; text-align:center; }
.sample-copy dt { color:var(--muted); margin-top:10px; font-size:13px; }
.sample-copy dd { font-weight:650; }
@media(max-width:1050px) { .sun-login { margin:30px 18px; } }
@media(min-width:691px) { .brand-editor:has(.sample-identity) { grid-template-columns:repeat(auto-fit,minmax(min(100%,304px),1fr)); } }
@media(min-width:691px) and (max-width:900px) { .workmark { width:min(100%,186px); } }
@media(max-height:660px) and (min-width:691px) { .rail-art img { height:60px; width:45px; } }
@media(max-width:690px) {
  .workspace aside { border:0; }
  .workspace .menu-toggle { color:var(--ink); border-color:#b3a386; }
  .workmark { width:min(100%,150px); gap:3px; }
  .workspace aside>.workmark { max-width:65%; }
  .workmark img { height:25px; }
  .workmark-names { gap:6px; font-size:12px; }
  .rail-art { display:none; }
  .sun-login { margin:12px; }
  .sun-mast { min-height:58px; padding:10px 15px; }
  .sun-mast .workmark { display:grid; width:165px; gap:3px; }
  .sun-mast .workmark img { width:100%; }
  .sun-layout { display:block; min-height:0; }
  .sun-cover { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); border:0; border-bottom:2px solid var(--ink); }
  .sun-copy { align-self:center; padding:14px; }
  .sun-copy h1 { font-size:clamp(25px,6.8vw,39px); }
  .sun-copy p { font-size:13px; }
  .sun-art { height:100%; min-height:115px; max-height:260px; clip-path:polygon(10% 0,100% 0,100% 100%,0 100%); }
  .sun-layout .login-form { padding:22px 18px; }
  .hero { padding:5px 2px 15px; }
  .hero-side { align-items:flex-start; }
  .brand-editor { grid-template-columns:1fr; gap:0; }
  .brand-sample { position:static; }
}
