body:has(.welcome-screen) .topbar,
body:has(.welcome-screen) #sidebar,
body:has(.welcome-screen) #menuToggle,
body:has(.welcome-screen) #navBackdrop { display:none; }
body:has(.welcome-screen) .content { padding:0; }
.welcome-screen {
  --welcome-green:#78b592; --welcome-ink:#242c31; --welcome-muted:#687178;
  position:relative; min-height:100%; color:var(--welcome-ink); background:#f9fcfc;
  background-image:url("assets/welcome/backgrounds/waves.svg");
  background-position:center bottom; background-size:100% auto;
  background-repeat:no-repeat;
}
.welcome-screen::before { content:""; position:absolute; right:0; top:84px; width:215px; height:150px; background:url("assets/welcome/backgrounds/molecule.svg") center/contain no-repeat; opacity:.35; pointer-events:none; }
.welcome-screen .welcome-icon { width:24px; height:24px; flex:0 0 auto; object-fit:contain; }
.welcome-header { position:relative; min-height:84px; display:flex; align-items:center; gap:48px; padding:14px max(32px,calc((100% - 1320px)/2)); background:rgba(255,255,255,.92); }
.welcome-brand { display:flex; align-items:center; gap:14px; min-width:200px; color:var(--welcome-ink); text-decoration:none; flex:0 0 auto; }
.welcome-brand .welcome-icon { width:48px; height:48px; }
.welcome-brand strong { display:block; font-size:24px; line-height:1.35; font-weight:700; }
.welcome-brand small { display:block; color:var(--welcome-muted); font-size:15px; margin-top:1px; }
.welcome-nav { display:flex; align-items:center; gap:16px; padding-left:40px; border-left:1px solid #e1e9e8; }
.welcome-nav>button,.welcome-nav>a,.welcome-resources>summary,.welcome-meet { display:flex; align-items:center; justify-content:center; gap:10px; font-size:16px; font-weight:600; color:var(--welcome-ink); padding:10px 18px; white-space:nowrap; text-decoration:none; border-radius:28px; min-height:46px; }
.welcome-nav>button:hover,.welcome-nav>a:hover,.welcome-resources>summary:hover { background:#edf6f1; }
.welcome-nav .is-current { background:#eaf4ee; }
.welcome-nav .is-current .welcome-icon { filter:invert(65%) sepia(21%) saturate(540%) hue-rotate(94deg) brightness(95%); }
.welcome-meet { background:#edf5f2; margin-left:auto; flex:0 0 auto; }
.welcome-resources { position:relative; }
.welcome-resources>summary { cursor:pointer; list-style:none; }
.welcome-resources>summary::-webkit-details-marker { display:none; }
.welcome-resource-menu { position:absolute; left:0; top:calc(100% + 10px); width:220px; padding:8px; border:1px solid #e3ece7; border-radius:12px; background:#fff; box-shadow:0 10px 30px #315c4712; z-index:5; }
.welcome-resource-menu a { display:block; padding:10px 12px; color:#315c47; text-decoration:none; font-size:14px; border-radius:6px; }
.welcome-resource-menu a:hover { background:#f0f8f3; }
.welcome-layout { display:grid; grid-template-columns:minmax(0,1.16fr) minmax(0,1fr); align-items:center; gap:32px; width:100%; max-width:1570px; min-height:calc(100dvh - 84px); padding:64px 34px 84px; margin:auto; }
.welcome-side { min-width:0; position:relative; padding:0 0 12px 20px; }
.welcome-side::before { content:""; position:absolute; left:22%; right:5%; bottom:100px; height:180px; background:url("assets/welcome/backgrounds/dna.svg") center/contain no-repeat; opacity:.2; pointer-events:none; }
.welcome-intro { position:relative; display:grid; grid-template-columns:210px minmax(0,1fr); align-items:center; gap:20px; min-height:440px; }
.welcome-mascot { width:100%; max-width:237px; height:auto; display:block; object-fit:contain; align-self:end; }
.welcome-screen .welcome-copy { max-width:none; }
.welcome-screen .welcome-copy h1 { border-left:5px solid #8ec69f; padding:8px 0 8px 14px; margin:0 0 20px -14px; font-size:36px; font-weight:750; line-height:1.55; white-space:nowrap; }
.welcome-screen .welcome-copy h2 { margin:0 0 20px; font-size:25px; line-height:1.6; color:#69a981; font-weight:650; }
.welcome-screen .welcome-copy p { margin:0; font-size:18px; line-height:1.9; color:#5d6670; }
.welcome-features { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:86px; }
.welcome-features button { display:flex; flex-direction:column; gap:12px; padding:0 6px; min-height:90px; border-radius:0; font-size:17px; font-weight:550; }
.welcome-features button+button { border-left:1px solid #e2eae8; }
.welcome-features .welcome-icon { width:43px; height:43px; filter:invert(65%) sepia(21%) saturate(540%) hue-rotate(94deg) brightness(95%); }
.welcome-features button:hover { color:#52936a; }
.welcome-form { position:relative; align-self:center; width:100%; margin:0; display:flex; flex-direction:column; gap:0; background:rgba(255,255,255,.93); border:1px solid #edf4f1; border-radius:24px; padding:36px 38px 42px; box-shadow:0 12px 40px #315c4705; }
.welcome-form h2 { display:flex; align-items:center; gap:14px; margin:0 0 10px; font-size:32px; line-height:1.5; font-weight:700; }
.welcome-form h2::before { content:""; width:7px; height:30px; border-radius:4px; background:#85be96; flex:0 0 auto; }
.welcome-form-description { color:#697078; font-size:16px; line-height:1.8; margin:0 0 28px; }
.welcome-form .form-grid { gap:22px; margin-bottom:28px; }
.welcome-form .field { gap:9px; }
.welcome-form .field label,.welcome-stage legend { display:flex; align-items:center; gap:10px; font-size:16px; font-weight:600; color:#252d30; }
.welcome-form .field label .welcome-icon { width:23px; height:23px; }
.welcome-form .field:nth-child(2) .welcome-icon { filter:invert(65%) sepia(21%) saturate(540%) hue-rotate(94deg) brightness(95%); }
.welcome-form .field input,.welcome-form .field select { width:100%; height:52px; border:1px solid #e3e9e8; border-radius:13px; padding:0 16px; font-size:16px; background:#fff; }
.welcome-form .field input::placeholder { color:#757d84; opacity:1; }
.welcome-form .field input:focus,.welcome-form .field select:focus { border-color:#83ba95; }
.welcome-stage { min-width:0; padding:0; margin:0; border:0; }
.welcome-stage legend { margin:0 0 20px; padding:0; }
.welcome-stage .depth-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; }
.welcome-form .depth-chip { position:relative; display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:15px; min-height:86px; padding:16px 20px; border:1px solid #e5ebe9; border-radius:13px; background:#fff; color:#242c31; font-size:16px; line-height:1.5; }
.welcome-form .depth-chip>.welcome-icon { width:30px; height:30px; filter:invert(65%) sepia(21%) saturate(540%) hue-rotate(94deg) brightness(95%); }
.welcome-form .depth-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.welcome-form .depth-copy strong { font-size:16px; font-weight:650; }
.welcome-form .depth-hint { font-size:13px; font-weight:400; color:#737b80; }
.welcome-form .depth-chip .depth-check { display:none; }
.welcome-form .depth-chip.active { border-color:#80b993; background:#f4fbf5; }
.welcome-form .depth-chip.active::after { content:""; position:absolute; top:8px; right:8px; width:18px; height:18px; border-radius:50%; background:#80b993; }
.welcome-form .depth-chip.active .depth-check { display:block; position:absolute; top:8px; right:8px; width:18px; height:18px; padding:3px; filter:brightness(0) invert(1); z-index:1; }
.welcome-form .welcome-start { width:100%; min-height:58px; margin-top:48px; border-radius:14px; background:#c5e5d0; color:#315c47; font-size:21px; font-weight:650; gap:17px; }
.welcome-form .welcome-start:hover { background:#b4dbc2; }
.welcome-form .welcome-resume { align-self:center; margin-top:14px; padding:8px 16px; color:#537e63; font-size:14px; text-decoration:underline; text-underline-offset:4px; }
.welcome-form .welcome-start .welcome-icon { width:27px; height:27px; filter:invert(30%) sepia(10%) saturate(1534%) hue-rotate(96deg) brightness(90%); }
.welcome-form input[readonly],.welcome-form select:disabled { background:#f7faf8; color:#62726a; }
.welcome-form .depth-chip:disabled { opacity:.8; cursor:default; }
.welcome-conversation.chat-wrap { height:min(680px,calc(100dvh - 180px)); min-height:520px; max-width:none; padding:28px; border:1px solid #e8f0eb; border-radius:24px; background:rgba(255,255,255,.94); }
.welcome-conversation-head { display:flex; align-items:center; gap:16px; justify-content:space-between; padding-bottom:20px; border-bottom:1px solid #e7eeea; }
.welcome-conversation-head h2 { font-size:23px; margin:4px 0 0; line-height:1.5; }
.onboard-home-link { display:inline-flex; gap:6px; align-items:center; font-size:12px; text-decoration:none; color:#628371; white-space:nowrap; }
.onboard-home-link .lucide { width:15px; height:15px; transform:rotate(180deg); }
.welcome-conversation .chat-stream { min-height:0; padding:22px 2px 18px; gap:20px; overscroll-behavior:contain; }
.welcome-conversation .msg { max-width:100%; }
.welcome-conversation .bubble { font-size:14px; line-height:1.85; padding:12px 15px; border-radius:12px; overflow-wrap:anywhere; }
.welcome-conversation .answer-cards { gap:8px; margin-top:10px; }
.welcome-conversation .answer-chip { padding:8px 11px; font-size:12px; text-align:left; justify-content:flex-start; line-height:1.6; }
.welcome-conversation .onboard-progress { font-size:12px; gap:10px; flex-wrap:wrap; }
.welcome-conversation .onboard-progress .muted { font-size:11px; font-weight:400; }
.welcome-conversation .composer textarea { height:65px; font-size:14px; border-radius:10px; }
.welcome-conversation .composer>.primary { width:46px; padding:0; border-radius:10px; background:#78b592; }
.welcome-conversation .composer>.primary .lucide { filter:brightness(0) invert(1); }
.welcome-screen.is-conversation .welcome-mascot { max-height:370px; width:100%; height:auto; object-fit:contain; align-self:center; }
.welcome-screen.is-conversation .welcome-intro { grid-template-columns:235px minmax(0,1fr); }
.welcome-screen.is-conversation .welcome-copy h1 { font-size:30px; white-space:normal; }
.letter-preview { display:flex; flex-direction:column; align-items:center; text-align:center; padding:20px 0 8px; gap:12px; }
.letter-preview>.lucide { filter:invert(65%) sepia(21%) saturate(540%) hue-rotate(94deg) brightness(95%); }
.letter-preview h3 { font-size:21px; margin:0; }
.letter-preview>p { color:#78867e; font-size:13px; max-width:340px; margin:0 0 5px; }
.letter-open { background:#78b592; }
.research-letter-dialog { width:min(720px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:1px solid #dce7df; border-radius:8px; background:#fffefa; color:#303b34; box-shadow:0 24px 80px #1e40352b; overflow:auto; overscroll-behavior:contain; }
.research-letter-dialog::backdrop { background:rgba(31,54,44,.4); backdrop-filter:blur(4px); }
.research-letter-head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:16px 24px; border-bottom:1px solid #e8ece4; background:#f7faf4; }
.research-letter-head>span { display:flex; gap:10px; align-items:center; font-size:13px; font-weight:600; color:#64816d; }
.research-letter-head .icon-button { width:32px; height:32px; background:#fffefa; }
.research-letter-paper { padding:32px 44px 22px; text-align:left; }
.letter-kicker { font-size:11px; color:#82a18a; }
.research-letter-paper h2 { margin:7px 0 28px; font-size:28px; line-height:1.5; }
.research-letter-paper h3 { font-size:16px; margin:24px 0 8px; color:#568066; }
.research-letter-paper p { font-size:14px; line-height:2.05; margin:10px 0; overflow-wrap:anywhere; }
.research-letter-paper .letter-direction { font-size:21px; line-height:1.8; font-weight:650; color:#344f3d; padding-left:15px; border-left:3px solid #b9d6c0; }
.research-letter-paper .letter-note { color:#7b887d; font-size:13px; }
.letter-signature { display:flex; flex-direction:column; align-items:flex-end; gap:7px; margin:26px 0; font-size:13px; color:#829184; }
.letter-signature strong { font-weight:600; color:#578268; }
.letter-scope-details { padding:16px 0; border-top:1px dashed #dce5d9; border-bottom:1px dashed #dce5d9; margin-top:22px; }
.letter-scope-details summary { cursor:pointer; font-size:13px; color:#718675; }
.letter-scope-details>label { display:block; font-size:12px; margin:16px 0 8px; color:#718675; }
.letter-scope-details .dir-title-edit { width:100%; resize:vertical; font:inherit; font-size:14px; line-height:1.7; padding:10px; border:1px solid #dfe7dd; border-radius:6px; background:#fff; }
.letter-scope-details .concept-group { border-radius:6px; box-shadow:none; }
.letter-scope-details .concept-group.cs-core { background:#f5faf4; border-left-color:#78a984; }
.letter-scope-details .cg-state.active.cs-core { background:#709e7b; }
.letter-scope-details .cg-head { align-items:start; }
.letter-scope-details .cg-label { overflow-wrap:anywhere; }
.research-letter-paper .concept-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:24px!important; }
.research-letter-paper .concept-actions .primary { background:#78a984; }
.research-letter-paper .concept-actions button { flex:1 1 200px; min-height:44px; }
.research-letter-footer { padding:0 24px 20px; text-align:center; font-size:12px; }
.research-letter-footer a { text-decoration:none; color:#829184; }
@media(min-width:1700px) {
  .welcome-layout { max-width:1640px; gap:48px; }
  .welcome-intro { grid-template-columns:237px minmax(0,1fr); }
  .welcome-screen .welcome-copy h1 { font-size:40px; }
}
@media(max-width:1390px) {
  .welcome-screen.is-conversation .welcome-intro { grid-template-columns:175px minmax(0,1fr); }
  .welcome-screen.is-conversation .welcome-copy h1 { font-size:26px; }
  .welcome-header { gap:24px; padding-left:28px; padding-right:28px; }
  .welcome-brand { min-width:180px; }
  .welcome-nav { gap:4px; padding-left:24px; }
  .welcome-nav>button,.welcome-nav>a,.welcome-resources>summary,.welcome-meet { font-size:14px; padding:9px 13px; }
  .welcome-layout { padding:46px 28px 66px; gap:24px; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }
  .welcome-side { padding-left:0; }
  .welcome-intro { grid-template-columns:175px minmax(0,1fr); gap:14px; min-height:370px; }
  .welcome-screen .welcome-copy h1 { font-size:29px; }
  .welcome-screen .welcome-copy h2 { font-size:21px; }
  .welcome-screen .welcome-copy p { font-size:15px; }
  .welcome-form { padding:30px 26px 34px; }
  .welcome-form h2 { font-size:28px; }
  .welcome-form-description { font-size:14px; }
  .welcome-form .depth-chip { padding:13px; gap:10px; }
  .welcome-form .depth-copy strong { font-size:14px; }
  .welcome-form .depth-hint { font-size:11px; }
  .welcome-features { margin-top:60px; }
  .welcome-features button { font-size:14px; }
}
@media(max-width:1100px) {
  .welcome-screen.is-conversation .welcome-header { position:sticky; top:0; z-index:4; background:#fff; }
  .welcome-conversation.chat-wrap { height:620px; min-height:500px; scroll-margin-top:145px; }
  .welcome-header { flex-wrap:wrap; gap:12px; padding:14px 24px; }
  .welcome-brand strong { font-size:21px; }
  .welcome-brand small { font-size:12px; }
  .welcome-nav { order:3; width:100%; justify-content:center; padding:9px 0 0; border-left:0; border-top:1px solid #edf2f0; gap:24px; }
  .welcome-meet { margin-left:auto; }
  .welcome-layout { grid-template-columns:minmax(0,1fr); max-width:840px; gap:34px; padding-top:26px; }
  .welcome-intro { grid-template-columns:175px minmax(0,1fr); min-height:310px; }
  .welcome-mascot { max-height:310px; width:auto; max-width:100%; }
  .welcome-screen .welcome-copy h1 { font-size:34px; }
  .welcome-screen .welcome-copy h2 { font-size:24px; }
  .welcome-features { margin-top:30px; }
  .welcome-features button { min-height:80px; font-size:15px; }
  .welcome-form { padding:32px; }
  .welcome-form .depth-copy strong { font-size:16px; }
  .welcome-form .depth-hint { font-size:13px; }
  .welcome-form .welcome-start { margin-top:30px; }
}
@media(max-width:600px) {
  .welcome-screen.is-conversation .welcome-intro { grid-template-columns:100px minmax(0,1fr); }
  .welcome-screen.is-conversation .welcome-copy h1 { font-size:20px; }
  .welcome-conversation.chat-wrap { padding:18px 14px; border-radius:20px; height:600px; min-height:480px; }
  .welcome-conversation-head { gap:8px; padding-bottom:14px; }
  .welcome-conversation-head h2 { font-size:19px; }
  .onboard-home-link { font-size:10px; }
  .welcome-conversation .onboard-progress .muted { display:none; }
  .welcome-conversation .bubble { font-size:12px; padding:10px 12px; }
  .welcome-conversation .answer-chip { font-size:11px; }
  .welcome-conversation .composer textarea { font-size:13px; }
  .research-letter-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); }
  .research-letter-head { padding:12px 16px; }
  .research-letter-paper { padding:22px 22px 16px; }
  .research-letter-paper h2 { font-size:23px; margin-bottom:20px; }
  .research-letter-paper p { font-size:13px; }
  .research-letter-paper .letter-direction { font-size:18px; }
  .welcome-header { padding:13px 16px 9px; }
  .welcome-brand { gap:9px; }
  .welcome-brand { min-width:0; }
  .welcome-brand .welcome-icon { width:36px; height:36px; }
  .welcome-brand strong { font-size:20px; }
  .welcome-brand small { font-size:11px; }
  .welcome-nav { gap:2px; justify-content:space-between; padding-top:8px; }
  .welcome-nav>button,.welcome-nav>a,.welcome-resources>summary { font-size:11px; gap:5px; padding:8px 6px; min-height:36px; border-radius:20px; }
  .welcome-nav .welcome-icon { width:17px; height:17px; }
  .welcome-meet { font-size:12px; padding:7px 11px; min-height:36px; gap:6px; }
  .welcome-meet .welcome-icon { width:19px; height:19px; }
  .welcome-resource-menu { left:auto; right:-70px; }
  .welcome-layout { padding:22px 16px 44px; gap:24px; }
  .welcome-intro { grid-template-columns:100px minmax(0,1fr); gap:12px; min-height:210px; }
  .welcome-mascot { width:100%; height:auto; max-height:none; align-self:center; }
  .welcome-screen .welcome-copy h1 { font-size:20px; white-space:normal; padding-left:10px; margin:0 0 10px; border-left-width:3px; }
  .welcome-screen .welcome-copy h2 { font-size:17px; line-height:1.6; margin:0 0 10px; }
  .welcome-screen .welcome-copy p { font-size:12px; line-height:1.9; }
  .welcome-side { padding-bottom:0; }
  .welcome-side::before { bottom:64px; height:100px; }
  .welcome-features { margin-top:18px; }
  .welcome-features button { font-size:11px; gap:8px; min-height:65px; padding:0 3px; }
  .welcome-features .welcome-icon { width:28px; height:28px; }
  .welcome-form { padding:24px 20px 26px; border-radius:20px; }
  .welcome-form h2 { font-size:25px; gap:10px; }
  .welcome-form h2::before { width:5px; height:25px; }
  .welcome-form-description { font-size:12px; margin-bottom:22px; }
  .welcome-form .form-grid { grid-template-columns:minmax(0,1fr); gap:16px; margin-bottom:22px; }
  .welcome-form .field label,.welcome-stage legend { font-size:14px; gap:8px; }
  .welcome-form .field input,.welcome-form .field select { height:48px; font-size:14px; }
  .welcome-stage legend { margin-bottom:14px; }
  .welcome-stage .depth-grid { gap:10px; }
  .welcome-form .depth-chip { min-height:100px; padding:13px 10px; gap:8px; flex-direction:column; align-items:flex-start; }
  .welcome-form .depth-chip>.welcome-icon { width:25px; height:25px; }
  .welcome-form .depth-copy strong { font-size:12px; }
  .welcome-form .depth-hint { font-size:10px; }
  .welcome-form .welcome-start { margin-top:24px; min-height:50px; font-size:17px; border-radius:12px; }
}
