/* Workspace shell: navigation, header account menu, home page and the coming search module.
   Loaded after base.css by the shell only; module documents (A6, A5) never load it. */
#portal{--sv-gold-deep:#b98b4e;--sv-gold-fill:#e8cd98;--sv-card-line:#e9e1d6;--sv-nav-active:#feefdb}

/* ---------- Sidebar: one list of plain navigation items ---------- */
@media screen{
 .sv-sidebar .sv-nav-home{margin-top:0}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a),.sv-workspace-module .sv-module{display:flex;align-items:center;gap:14px;min-height:52px;margin:0;padding:12px 18px;border:0;border-radius:7px;background:transparent;color:#fff9f4;font-size:15px;font-weight:400;line-height:1.35;text-decoration:none;box-shadow:none;transition:background-color .15s,color .15s}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a,.sv-module)>.sv-icon{width:24px;height:24px;stroke-width:1.6}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a):hover:not([aria-current=page]),.sv-workspace-module .sv-module:hover:not([aria-current]){background:#ffffff14}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a)[aria-current=page],.sv-workspace-module .sv-module[aria-current]{background:var(--sv-nav-active);color:var(--sv-burgundy);font-weight:650;box-shadow:0 3px 10px #44132418}
 .sv-workspace-module{display:grid;gap:13px;margin:13px 0 0}
 .sv-module-text{display:block;min-width:0}
 .sv-module-text>span{font-size:inherit}
 /* 报价AI's own pages, shown while 报价AI is open. */
 .sv-workspace-module .sv-subnav{display:grid;gap:4px;margin:-6px 0 0 30px;padding-left:12px;border-left:1px solid #ffffff38}
 .sv-sidebar:not([data-active-module="a6"]) .sv-subnav{display:none}
 .sv-subnav a{min-height:40px;padding:8px 12px;font-size:14px;font-weight:400;gap:10px}
 .sv-subnav a>.sv-icon{width:18px;height:18px}
 .sv-nav-admin{margin-top:14px;padding-top:14px;border-top:1px solid #ffffff24}
 .sv-avatar{flex:none;font-weight:600;line-height:1}
 .sv-account .sv-avatar{background:linear-gradient(135deg,#946a32,#7d5626);color:#fff}
 .sv-avatar .sv-icon{width:20px;height:20px}
}
@media screen and (min-width:761px) and (max-width:1100px){
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a),.sv-workspace-module .sv-module{gap:12px;padding:12px 14px;font-size:15px}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a,.sv-module)>.sv-icon{width:22px;height:22px}
 .sv-workspace-module{gap:10px;margin-top:10px}
 .sv-workspace-module .sv-subnav{margin-left:26px}
}
@media screen and (max-width:760px){
 .sv-sidebar{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none;mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
 .sv-sidebar::-webkit-scrollbar{display:none}
 .sv-sidebar .sv-nav,.sv-workspace-module{display:flex;flex:0 0 auto;align-items:center;gap:6px;margin:0}
 .sv-sidebar .sv-nav a{flex:0 0 auto}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a),.sv-workspace-module .sv-module{min-height:44px;padding:8px 12px;gap:7px;font-size:13px;white-space:nowrap}
 .sv-sidebar :is(.sv-nav-home a,.sv-nav-admin a,.sv-module)>.sv-icon{width:18px;height:18px}
 .sv-nav-admin{margin:0;padding:0;border:0}
 .sv-sidebar .sv-subnav{margin:0;padding-left:6px}
}

/* ---------- Header: 工作台 | 使用帮助 | 中 / Eng | account menu ---------- */
@media screen and (min-width:761px){
 .sv-header{height:60px;background:#fff}
 .sv-shell{min-height:calc(100dvh - 60px)}
}
@media screen{
 .sv-header-left>.sv-header-title{display:none}
 .sv-header-actions{gap:20px}
 .sv-header-sep{width:1px;height:18px;background:#dccfbf}
 .sv-header-link{color:var(--sv-ink);font-size:14px;text-decoration:none}
 .sv-header-link:hover{color:var(--sv-burgundy)}
 .sv-header-actions>[data-help]{font-size:14px}
 .sv-header-actions>[data-help]>.sv-icon{display:none}
 .sv-header-actions .sv-language-toggle{min-width:0;min-height:0;padding:6px 2px;border:0;background:transparent;font-size:14px}
 .sv-header-actions .sv-language-toggle:hover{background:transparent;color:var(--sv-burgundy)}
 .sv-account-menu{position:relative}
 .sv-account{gap:10px;font-size:14px}
 .sv-account .sv-avatar{width:34px;height:34px;font-size:13px}
 .sv-account>.sv-icon{width:16px;height:16px;color:var(--sv-muted);transition:transform .15s}
 .sv-account[aria-expanded="true"]>.sv-icon{transform:rotate(180deg)}
 .sv-menu{position:absolute;top:calc(100% + 8px);right:0;z-index:50;display:grid;gap:2px;min-width:184px;padding:6px;background:#fff;border:1px solid var(--sv-border);border-radius:8px;box-shadow:0 12px 28px #29262a24}
 .sv-menu[hidden]{display:none}
 .sv-menu :is(a,button){display:flex;align-items:center;gap:10px;width:100%;padding:9px 12px;border:0;border-radius:6px;background:transparent;color:var(--sv-ink);font:inherit;font-size:14px;text-align:left;text-decoration:none;cursor:pointer}
 .sv-menu :is(a,button):hover{background:var(--sv-blush);color:var(--sv-burgundy)}
 .sv-menu :is(a,button):focus-visible{background:var(--sv-blush);color:var(--sv-burgundy);outline:2px solid var(--sv-burgundy);outline-offset:-2px}
 .sv-menu :is(a,button):disabled{opacity:.6;cursor:progress}
 .sv-menu .sv-icon{width:18px;height:18px}
}
@media screen and (max-width:1100px){
 .sv-header-actions{gap:14px}
 .sv-account .sv-auth-header-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
/* English hides the Help label at tablet widths (ui-language.css); show the icon instead. */
@media screen and (min-width:761px) and (max-width:1000px){
 html[lang="en"] .sv-header-actions>[data-help]>.sv-icon{display:block}
}
@media screen and (max-width:760px){
 .sv-header-link,.sv-header-sep{display:none}
 /* The name is hidden on phones but still names the account button. */
 .sv-account>span.sv-auth-header-name{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .sv-header-actions>[data-help]>.sv-icon{display:block}
 .sv-account .sv-avatar{width:34px;height:34px;font-size:14px}
}

/* ---------- 工作台首页: 报价AI's type scale (title 32, T1 24, body 14, caption 12) and card frame ---------- */
.sv-home{margin:0 auto}
.sv-home-hero{margin:0 0 24px}
.sv-home-hero h1{position:relative;margin:0;padding-bottom:12px;font-size:32px;line-height:1.4;font-weight:650;letter-spacing:-.5px;color:var(--sv-burgundy)}
.sv-home-hero h1::after{content:"";position:absolute;left:0;bottom:0;width:48px;height:3px;border-radius:2px;background:var(--sv-gold)}
.sv-home-hero>p{margin-top:12px;font-size:16px;line-height:1.6;color:var(--sv-ink)}
.sv-home-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.sv-home-card{display:flex;flex-direction:column;min-width:0;padding:26px 28px 24px;background:#fff;border:1px solid var(--sv-card-line);border-top:3px solid #d4b483;border-radius:7px}
.sv-home-card::after{content:"";height:2px;margin-top:18px;background:var(--sv-gold)}
.sv-home-art{width:56px;height:56px;color:var(--sv-gold-deep)}
.sv-home-art svg{display:block;width:100%;height:100%}
.sv-home-card h2{position:relative;margin:16px 0 0;padding-bottom:10px;font-size:24px;line-height:1.4;font-weight:650;color:var(--sv-burgundy)}
.sv-home-card h2::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:2px;background:var(--sv-gold)}
.sv-home-desc{margin-top:14px;font-size:14px;line-height:1.75;color:var(--sv-ink)}
/* Chinese wraps at spaces and punctuation, so a line never ends with a lone character. */
.sv-home-desc,.sv-home-meta{word-break:keep-all;overflow-wrap:anywhere}
.sv-home-meta{margin:4px 0 20px;font-size:12px;line-height:1.6;color:var(--sv-muted)}
.sv-home-go{width:100%;min-height:42px;margin-top:auto;font-size:14px;font-weight:600;text-decoration:none}
.sv-home-go .sv-icon{width:16px;height:16px}
.sv-home-caption{margin:20px 0;text-align:center;font-size:13px;line-height:1.6;color:var(--sv-muted)}
.sv-home-recent{padding:22px 28px 6px;background:#fff;border:1px solid var(--sv-card-line);border-radius:7px}
.sv-home-recent>header{display:flex;justify-content:space-between;align-items:center;gap:16px}
.sv-home-recent h2{position:relative;margin:0;padding-bottom:9px;font-size:21px;line-height:1.4;font-weight:650;color:var(--sv-burgundy)}
.sv-home-recent h2::after{content:"";position:absolute;left:0;bottom:0;width:36px;height:2px;background:var(--sv-gold)}
.sv-recent-all{margin-bottom:9px;font-size:14px;font-weight:500}
.sv-recent-all[hidden]{display:none}
.sv-recent-all .sv-icon{width:16px;height:16px}
.sv-recent-list{list-style:none;margin:12px 0 0;padding:0}
.sv-recent-row{display:grid;grid-template-columns:32px minmax(0,1.4fr) minmax(0,1fr) auto;align-items:center;gap:12px 20px;padding:12px 0;border-top:1px solid #ede5dd}
.sv-recent-icon{display:grid;place-items:center;color:#b28b55}
.sv-recent-icon .sv-icon{width:26px;height:26px;stroke-width:1.4}
.sv-recent-title{min-width:0;font-size:14px;font-weight:600;color:var(--sv-ink);overflow-wrap:anywhere}
.sv-recent-dot{margin:0 10px;color:var(--sv-muted);font-weight:400}
.sv-recent-module{font-size:14px;color:var(--sv-ink)}
.sv-recent-action{display:inline-flex;align-items:center;justify-content:center;min-width:112px;min-height:34px;padding:6px 14px;border:1px solid #dcb7bd;border-radius:5px;background:#fdf6f5;color:var(--sv-burgundy);font-size:13px;font-weight:600;text-decoration:none}
.sv-recent-action:hover{background:var(--sv-blush);border-color:var(--sv-burgundy)}
.sv-recent-empty,.sv-recent-status{margin:12px 0 0;padding:12px 0;border-top:1px solid #ede5dd;font-size:13px;line-height:1.6;color:var(--sv-muted)}
.sv-recent-list+.sv-recent-status{margin-top:0}
.sv-home :is(a,button):focus-visible{outline:2px solid var(--sv-burgundy);outline-offset:2px}
@media(max-width:1180px){
 .sv-home-cards{gap:16px}
 .sv-home-card{padding:22px 20px 20px}
 .sv-home-card h2{font-size:22px}
}
/* Tablets: one compact row per module (art, text, button). */
@media(max-width:1100px){
 .sv-home-cards{grid-template-columns:minmax(0,1fr);gap:12px}
 .sv-home-card{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(150px,180px);grid-template-areas:"art title go" "art desc go" "art meta go";column-gap:20px;align-items:center;padding:18px 20px}
 .sv-home-card::after{display:none}
 .sv-home-art{grid-area:art;align-self:start;width:44px;height:44px}
 .sv-home-card h2{grid-area:title;margin:0;padding-bottom:8px;font-size:20px}
 .sv-home-desc{grid-area:desc;margin-top:8px;font-size:13px}
 .sv-home-meta{grid-area:meta;margin:2px 0 0}
 .sv-home-go{grid-area:go;margin:0}
 .sv-recent-row{gap:10px 14px}
 .sv-recent-dot{margin:0 6px}
 .sv-recent-action{min-width:96px}
}
@media(max-width:760px){
 .sv-home-hero h1{font-size:26px}
 .sv-home-hero>p{font-size:15px}
 .sv-home-card{display:flex;align-items:stretch;padding:20px 18px 18px}
 .sv-home-card::after{display:block}
 .sv-home-art{width:48px;height:48px}
 .sv-home-card h2{margin-top:14px;font-size:22px}
 .sv-home-desc{font-size:14px}
 .sv-home-meta{margin:4px 0 18px}
 .sv-home-go{margin-top:auto}
 .sv-home-recent{padding:18px 16px 6px}
 .sv-recent-row{grid-template-columns:28px minmax(0,1fr) auto;gap:4px 12px}
 .sv-recent-icon .sv-icon{width:24px;height:24px}
 .sv-recent-module{grid-column:2;grid-row:2;font-size:12px;color:var(--sv-muted)}
 .sv-recent-action{grid-column:3;grid-row:1/3;min-width:0;padding:6px 12px}
}
/* ---------- 工作台首页 assistants: each card's assistant stands on its right, behind the text ----------
   The head rises over the gold top edge; a mask fades the figure out before it reaches any glyph or the button.
   - 中文, cards about 350px wide or more (from 1400px, and phones from 382px): the description and note wrap at
     170px (on a wider single-column card, at the figure's column) and the figure stands beside them, fading out
     above the button.
   - English, and narrower cards: the text keeps its width and the figure is a bust that fades out above the title.
   - Tablet rows (960-1100px): the figure stands between the text and the button and fades out inside the card;
     the description and note give it 130px. Below 960px the row's text column has no width to spare: no figure.
   The greeting and stacked cards gain the room the heads need (rise + 12px). Type and layout are unchanged. */
.sv-home-card{position:relative;isolation:isolate;--fig-w:150px;--fig-rise:34px;--fig-right:0px;--fig-head:.0125;--fig-bust-to:100px;--fig-fade-from:calc(var(--fig-rise) + var(--fig-head) * 100% + var(--fig-bust-to) - 44px);--fig-fade-to:calc(var(--fig-rise) + var(--fig-head) * 100% + var(--fig-bust-to))}
/* --fig-head: the transparent band above each assistant's hair, as a share of the image height. */
.sv-home-card[data-home-module=a6]{--fig-head:.047}
.sv-home-card[data-home-module=search]{--fig-head:.014}
.sv-home-card>:not(.sv-home-figure){position:relative;z-index:1}
.sv-home-figure{position:absolute;z-index:0;top:calc(-3px - var(--fig-rise));right:var(--fig-right);width:var(--fig-w);max-width:none;height:auto;transform:translateY(calc(var(--fig-head) * -100%));pointer-events:none;user-select:none;-webkit-mask-image:linear-gradient(#000 var(--fig-fade-from),transparent var(--fig-fade-to));mask-image:linear-gradient(#000 var(--fig-fade-from),transparent var(--fig-fade-to))}
.sv-home-cards{margin-top:46px}
@media(min-width:1400px){
 html:not([lang="en"]) .sv-home-card{--fig-w:min(188px,calc((100% - 207px) / .95));--fig-fade-from:70%;--fig-fade-to:97%}
 html:not([lang="en"]) :is(.sv-home-desc,.sv-home-meta){max-width:170px}
}
@media(max-width:1180px){
 .sv-home-card{--fig-bust-to:96px}
}
@media(min-width:761px) and (max-width:1100px){
 .sv-home-cards{margin-top:40px;gap:40px}
 .sv-home-card{--fig-rise:28px;--fig-w:130px;--fig-right:216px;--fig-bust-to:118px}
 .sv-home-desc,.sv-home-meta{max-width:calc(100% - 130px)}
}
@media(min-width:761px) and (max-width:959px){
 .sv-home-figure{display:none}
 .sv-home-cards{margin-top:0;gap:12px}
 .sv-home-desc,.sv-home-meta{max-width:none}
}
@media(max-width:760px){
 .sv-home-cards{margin-top:40px;gap:40px}
 .sv-home-card{--fig-rise:28px;--fig-w:140px;--fig-bust-to:84px}
}
@media(min-width:382px) and (max-width:760px){
 html:not([lang="en"]) .sv-home-card{--fig-w:min(150px,calc((100% - 205px) / .95));--fig-fade-from:70%;--fig-fade-to:97%}
 /* Wrap at 170px on phones; a wider single-column card keeps its text width up to the figure's column. */
 html:not([lang="en"]) :is(.sv-home-desc,.sv-home-meta){max-width:max(170px,calc(100% - 166px))}
}
