/* Shared product layer for the student and teaching workspaces. */
.portal-body {
  --paper:#fff; --ink:#252a27; --muted:#646e60; --line:#e5e7e2;
  --pine:#285a46; --pine-dark:#223e32; --clay:#64776a; --sun:#91b39b;
  --display:var(--sans); --surface:#f8f9f6; --sidebar:#f1f3ef;
  background:var(--surface); font-size:14px; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.portal-body button,.portal-body a,.portal-body input,.portal-body textarea,.portal-body select { -webkit-tap-highlight-color:transparent; }
.portal-body button { transition:background .16s,border-color .16s,box-shadow .16s; }
.portal-body button:disabled { cursor:not-allowed; }
.portal-body :focus-visible { outline:2px solid #4c8063; outline-offset:4px; }
.portal-body h1,.portal-body h2,.portal-body h3 { font-family:var(--sans); }
.portal-body h1:focus { outline:none; }
.portal-body .eyebrow { font:600 10px/1.5 var(--sans); letter-spacing:.13em; color:var(--muted); }
.portal-icon { flex:none; vertical-align:middle; }
.portal-shell { grid-template-columns:248px minmax(0,1fr); background:var(--surface); }
.portal-sidebar { overflow:hidden; padding:24px 14px 14px; background:var(--sidebar); color:var(--ink); border-right:1px solid var(--line); z-index:40; }
.portal-sidebar .portal-brand { font:700 16px/1.15 var(--sans); color:var(--ink); gap:10px; padding:0 10px; flex:none; }
.portal-sidebar .portal-brand img { filter:none; mix-blend-mode:multiply; }
.portal-brand small { font:600 9px/1 var(--sans); letter-spacing:.23em; color:var(--muted); margin-top:6px; }
.workspace-label { font-size:11px; color:var(--muted); padding:13px 10px 20px; }
.workspace-search-trigger { display:flex; align-items:center; gap:9px; width:100%; background:#ffffff80; border:1px solid #dde1d9; border-radius:8px; padding:10px; color:var(--muted); cursor:pointer; font:12px var(--sans); }
.workspace-search-trigger .portal-icon { width:16px; height:16px; }
.workspace-search-trigger kbd { margin-left:auto; font:10px var(--sans); color:#92978f; }
.student-switcher { margin:18px 8px 0; }
.student-switcher label { font-size:10px; font-weight:500; color:var(--muted); }
.student-switcher select { font-size:12px; font-weight:600; min-height:36px; padding:7px 10px; background:transparent; color:var(--ink); border-color:#dce1d8; }
.portal-sidebar nav { display:grid; gap:6px; margin-top:8px; margin-bottom:16px; flex:1; min-height:0; overflow-y:auto; align-content:start; scrollbar-width:thin; }
.nav-group { display:grid; gap:3px; }
.sidebar-label { margin:17px 12px 8px; font:600 10px/1.4 var(--sans); color:#7a8178; letter-spacing:.06em; }
.portal-sidebar nav button { display:flex; align-items:center; gap:11px; padding:10px 12px; min-height:41px; font:500 13px var(--sans); color:#596451; border:1px solid transparent; border-radius:8px; }
.portal-sidebar nav button .portal-icon { width:18px; height:18px; color:#7d887c; }
.portal-sidebar nav button:hover { color:var(--ink); background:#e8ece4; }
.portal-sidebar nav button[aria-current] { color:#284d37; background:#e1e8dc; border-color:#d9e2d2; box-shadow:none; font-weight:700; }
.portal-sidebar nav button[aria-current] .portal-icon { color:#456b47; }
.nav-ai-label { margin-left:auto; font:600 9px var(--sans); border:1px solid #cdd8c6; color:#617653; padding:2px 4px; border-radius:4px; }
.sidebar-person { display:flex; align-items:center; gap:4px; padding:14px 2px 0; border-top:1px solid #dce1d8; }
.sidebar-person .person-account { display:flex; align-items:center; gap:10px; flex:1; min-width:0; padding:5px; margin:0; color:var(--ink); border-radius:8px; }
.person-account:hover { background:#e6ebe1; }
.sidebar-person .person-avatar { display:grid; place-items:center; width:33px; height:33px; border-radius:10px; background:#e0e6da; border:1px solid #d5ddcf; font:600 11px var(--sans); color:#54634b; flex:none; }
.sidebar-person .person-details { display:grid; gap:3px; min-width:0; color:var(--ink); }
.person-details strong { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.person-details small { font-size:10px; color:var(--muted); }
.icon-button,.sidebar-person .icon-button { display:grid; place-items:center; color:var(--muted); background:transparent; border:0; border-radius:7px; width:36px; height:36px; padding:8px; margin:0; cursor:pointer; flex:none; }
.icon-button:hover,.sidebar-person .icon-button:hover { background:#e6eae2; color:var(--ink); }
.sidebar-person .icon-button .portal-icon { width:16px; }
.portal-main { display:flex; flex-direction:column; min-height:100svh; }
.portal-top { height:68px; min-height:68px; padding:0 30px; background:var(--surface); font:11px var(--sans); border-bottom:1px solid var(--line); }
.top-breadcrumb,.top-context { display:flex; align-items:center; gap:16px; }
.top-breadcrumb strong { font-weight:500; color:#484f46; }
.breadcrumb-school { display:flex; gap:16px; color:#8c918a; }
.breadcrumb-school>span { color:#c1c6bc; }
.top-context { gap:20px; font-size:10px; }
.workspace-private { border:1px solid var(--line); padding:5px 9px; border-radius:6px; color:#6b7564; }
.workspace-private::before { content:''; display:inline-block; width:5px; height:5px; background:#829675; border-radius:50%; margin-right:7px; vertical-align:2px; }
.portal-content { width:100%; max-width:1250px; padding:44px clamp(24px,4.1vw,66px) 36px; }
.portal-heading { margin-bottom:28px; }
.portal-heading .eyebrow { margin:0 0 12px; color:#7b8975; }
.portal-heading h1 { font-size:clamp(26px,2.7vw,36px); font-weight:500; letter-spacing:-.045em; line-height:1.25; margin:0 0 10px; }
.portal-heading p:not(.eyebrow) { font-size:14px; line-height:1.7; }
.workspace-launch { padding:25px; margin:0 0 33px; border:1px solid #dfe4d8; background:linear-gradient(115deg,#eff3e8,#f6f7f0 70%,#eef2e5); border-radius:16px; position:relative; overflow:hidden; }
.launch-copy { display:flex; gap:17px; align-items:center; }
.assistant-mark { display:grid; place-items:center; width:44px; height:44px; border:1px solid #d6dfc9; border-radius:14px; background:#f9fbf5; color:#69844e; flex:none; box-shadow:0 3px 10px #55643808; }
.assistant-mark .portal-icon { width:25px; height:25px; }
.launch-copy .eyebrow { font-size:8px; letter-spacing:.14em; margin-bottom:8px; color:#718164; }
.launch-copy h2 { font:500 clamp(19px,1.8vw,24px)/1.3 var(--sans); letter-spacing:-.04em; margin:0 0 6px; color:#34422c; }
.launch-copy p { font-size:13px; color:#66725c; margin:0; }
.launch-open { margin-left:auto; background:#fcfdf8; width:34px; height:34px; display:grid; place-items:center; flex:none; border:1px solid #dce3d4; border-radius:50%; color:#6b7b5c; cursor:pointer; }
.launch-prompts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:24px; }
.launch-prompts button { display:flex; align-items:center; gap:9px; text-align:left; background:#ffffffab; border:1px solid #dce3d5; border-radius:8px; padding:13px 11px; font:500 12px/1.5 var(--sans); color:#55614a; cursor:pointer; }
.launch-prompts button .portal-icon { width:16px; height:16px; }
.launch-prompts button .portal-icon:last-child { width:12px; margin-left:auto; color:#9aa58d; }
.launch-prompts button:hover,.launch-open:hover { background:#fff; border-color:#aebda0; box-shadow:0 3px 10px #44553608; }
.section-caption { display:flex; align-items:center; justify-content:space-between; margin:0 0 13px; gap:12px; }
.section-caption h2 { font:600 13px var(--sans); letter-spacing:-.02em; margin:0; }
.section-caption>span { font-size:10px; color:#889080; }
.metric-grid { gap:12px; margin-bottom:26px; }
.metric-grid article { border-color:var(--line); border-radius:11px; padding:20px 22px; gap:15px; background:#fdfefb; }
.metric-grid span { font-size:12px; color:#65715c; }
.metric-grid strong { font:500 30px/1 var(--sans); letter-spacing:-.055em; color:#35422e; }
.metric-grid .word-metric { font-size:21px; letter-spacing:-.035em; }
.dashboard-grid { grid-template-columns:1.25fr 1fr; gap:20px; }
.portal-card { border-radius:12px; padding:24px; background:#fdfefc; border-color:var(--line); }
.portal-card h2 { font:600 15px/1.4 var(--sans); letter-spacing:-.025em; }
.portal-card h3 { font-size:17px; letter-spacing:-.025em; }
.card-heading { margin-bottom:9px; }
.badge { font-size:9px; font-weight:500; border-radius:5px; padding:4px 7px; background:#f0f3eb; color:#727d66; }
.schedule-list li { grid-template-columns:30px minmax(0,1fr) auto; padding:15px 0; gap:12px; align-items:start; }
.period { display:grid; place-items:center; width:27px; height:29px; border:1px solid #e8ebe1; border-radius:7px; background:#f6f8f1; color:#8c967f; font:10px var(--sans); padding:0; }
.schedule-list h3 { font:600 14px/1.5 var(--sans); margin:0 0 3px; }
.schedule-list p { font-size:12px; color:#69755f; }
.schedule-list small { font-size:10px; color:#808a74; }
.period-time { font:10px/1.6 var(--sans); min-width:64px; gap:5px; color:#8d9585; }
.action-row { font:500 13px/1.6 var(--sans); color:#535f49; padding:17px 0; }
.action-row span { color:#929e86; }
.action-row:hover { color:var(--pine); background:#f7f9f2; }
.record-snippet { margin-top:23px; padding:17px; border:1px solid #e8ecdf; background:#f6f8f1; border-radius:9px; }
.record-snippet .eyebrow { font-size:8px; margin-bottom:10px; }
.record-snippet h3 { font-size:15px; font-weight:600; margin-bottom:8px; }
.record-snippet p:last-child { font-size:12px; line-height:1.8; }
.assignment-row { font-size:13px; padding:20px 0; gap:15px; }
.assignment-row h3 { font-size:14px; font-weight:600; }
.assignment-row p { font-size:11px; }
.small-label { font:10px var(--sans); color:#7b8971; }
.score { font-size:14px; }
.portal-button { border-radius:8px; background:#31563d; font:600 12px/1.6 var(--sans); padding:10px 16px; min-height:40px; box-shadow:0 1px 2px #17261b0d; }
.portal-button:hover { background:#254b31; }
.portal-button.secondary { background:#edf1e7; color:#557044; }
.text-button { font:500 11px/1.6 var(--sans); text-decoration:none; }
.text-button:hover { text-decoration:underline; }
.portal-body label { font-size:12px; font-weight:500; }
.portal-body input,.portal-body select,.portal-body textarea { border-radius:8px; border-color:#dfe4d8; background:#fff; font-size:13px; padding:11px 13px; }
.portal-body input:focus,.portal-body select:focus,.portal-body textarea:focus { outline:2px solid #91ac7f; outline-offset:2px; }
.portal-body input[type=checkbox] { accent-color:var(--pine); }
.filter-row { gap:14px; }
.filter-row label { font-size:11px; }
th,td { font-size:12px; padding:15px 12px; }
th { background:#f7f9f3; font-size:10px; }
.empty-state h3 { font-size:17px; }
.empty-state p,.muted { font-size:12px; }
.workspace-footer { margin:auto 32px 0; padding:20px 0; display:flex; justify-content:space-between; gap:16px; border-top:1px solid var(--line); font-size:9px; color:#959c8d; }
#editor { border-radius:18px; box-shadow:0 28px 100px #1c291b30; padding:32px; }
#editor::backdrop { background:#1f2a214d; backdrop-filter:blur(5px); }
#editor h2 { font-size:27px; font-weight:500; letter-spacing:-.04em; }
#editor h3 { font-size:19px; }
.dialog-close { font-size:22px; width:32px; min-width:32px; height:32px; min-height:32px; background:#f0f3ec; color:var(--muted); }
#notice { border-radius:10px; font-size:12px; }
.workspace-search input { margin:6px 0 15px; }
#workspace-results { max-height:50svh; overflow:auto; margin-bottom:15px; }
.search-result { display:flex; align-items:center; gap:14px; width:100%; padding:14px; border:0; border-radius:8px; background:transparent; text-align:left; color:var(--ink); font:13px var(--sans); cursor:pointer; }
.search-result:hover { background:#edf2e7; }
.search-result .portal-icon:last-child { margin-left:auto; width:15px; }
.sidebar-scrim { display:none; }
/* Conversation canvas, with a quiet history rail and a floating composer. */
.portal-content-chat { max-width:1600px; padding:27px 32px 30px; }
.portal-content-chat .portal-heading { margin-bottom:23px; }
.portal-content-chat .portal-heading .eyebrow { display:none; }
.portal-content-chat .portal-heading h1 { font-size:24px; }
.chat-shell { grid-template-columns:205px minmax(0,1fr); min-height:500px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.chat-history { padding:20px 14px; background:#f5f7f1; border-color:var(--line); }
.chat-history h2 { font:600 11px var(--sans); letter-spacing:0; margin:0 6px 20px; color:#6c7761; }
.chat-history label { font-size:10px; color:#858e7b; }
.chat-history select { font-size:11px; padding:9px; min-height:36px; background:#fbfcf8; }
.chat-history>.portal-button { width:100%; margin:8px 0; }
.chat-history nav { margin-top:15px; }
.chat-history nav button { font-size:11px; color:#647257; padding:12px 10px; cursor:pointer; }
.chat-history nav button:hover { background:#e9efe1; }
.chat-history nav button[aria-current] { background:#e5ecdc; }
.chat-history small { font-size:9px; }
.chat-history-empty { font-size:11px; color:#8a947f; padding:10px 6px; line-height:1.8; }
.chat-panel { display:flex; flex-direction:column; }
.chat-conversation { height:calc(100svh - 245px); min-height:500px; }
.chat-conversation header { padding:19px 26px; border-color:#edf0e8; }
.chat-conversation header h2 { font:600 12px var(--sans); letter-spacing:0; }
.chat-conversation header span { font-size:10px; color:#859078; }
.chat-messages { padding:28px clamp(22px,4vw,64px); }
.chat-speaker { color:#80916f; font-size:10px; }
.chat-message.user { background:#f2f5ed; border-radius:13px; padding:13px 18px; }
.chat-message .ai-formatted { font-size:13px; line-height:1.85; }
.chat-empty { padding:65px 25px; margin:auto 0; color:var(--muted); }
.chat-empty h2,.chat-empty h3 { font:500 clamp(22px,2.4vw,30px)/1.3 var(--sans); letter-spacing:-.04em; color:#3f5033; margin:23px 0 13px; }
.chat-empty p { font-size:14px; max-width:345px; line-height:1.8; }
.chat-orbit { display:grid; place-items:center; width:56px; height:56px; margin:auto; border-radius:18px; border:1px solid #dce5d2; background:linear-gradient(145deg,#f9fbf6,#eaf0df); color:#7c945f; font:32px var(--sans); box-shadow:0 5px 25px #6d865015; }
.chat-empty .portal-button { margin-top:25px; }
.chat-empty .chat-unavailable { margin-top:20px; font-size:11px; color:#8c6540; }
.chat-prompts { display:flex; gap:7px; flex-wrap:wrap; justify-content:center; margin:22px auto 0; max-width:520px; }
.chat-prompts button { font:11px var(--sans); color:#6b7a5c; background:#fafbf8; border:1px solid #e2e8da; border-radius:8px; padding:10px 12px; cursor:pointer; }
.chat-prompts button:hover { background:#eef3e7; border-color:#bacaa9; }
.chat-composer { margin:0 22px 20px; border:1px solid #dde5d5; border-radius:15px; padding:15px 18px; gap:9px; box-shadow:0 5px 20px #283c1910; }
.chat-composer>label:first-child { font-size:10px; color:#89967c; }
.chat-composer textarea { min-height:75px; max-height:220px; margin:0; border:0; padding:9px 0; background:transparent; font-size:13px; }
.chat-composer textarea:focus { outline:0; }
.chat-composer:focus-within { border-color:#9aad89; box-shadow:0 0 0 3px #aebf9420; }
.chat-composer details { margin:0; font-size:10px; color:#79866d; }
.chat-composer summary { cursor:pointer; }
.chat-composer details label { margin-top:12px; }
.chat-compose-actions { gap:12px; }
.chat-compose-actions small { font-size:9px; line-height:1.7; color:#939c89; max-width:340px; }
.chat-compose-actions .portal-button { min-width:66px; }
.portal-body .chat-checkbox { display:flex; align-items:center; gap:8px; font-size:11px; }
.portal-body .chat-checkbox input { min-height:18px; }
/* Sign-in remains part of the same product. */
.login-layout { grid-template-columns:1fr 1fr; padding:16px; gap:16px; background:#f8f9f6; }
.login-story { border-radius:20px; background:#e9eee1; color:#34462d; padding:clamp(30px,5vw,78px); position:relative; overflow:hidden; }
.login-story::after { content:''; position:absolute; width:650px; height:650px; border:1px solid #6b825522; border-radius:50%; right:-250px; bottom:-360px; box-shadow:0 0 0 50px #6b82550a,0 0 0 100px #6b825507,0 0 0 150px #6b825505; pointer-events:none; }
.login-story .portal-brand { color:#34462d; font:600 18px/1.2 var(--sans); }
.login-story img { filter:none; mix-blend-mode:multiply; width:47px; height:47px; }
.login-story .eyebrow { color:#7a8c68; }
.login-story h1 { font:500 clamp(34px,4vw,56px)/1.15 var(--sans); letter-spacing:-.055em; }
.login-story>div>p:last-child { color:#7d8873; font-size:14px; }
.login-story>a:last-child { color:#728166; font-size:11px; z-index:1; }
.login-panel { background:transparent; }
.login-panel>div { max-width:355px; }
.login-panel h2 { font-size:33px; font-weight:500; letter-spacing:-.045em; }
.login-panel>div>p:not(.eyebrow) { font-size:14px; color:var(--muted); }
.login-panel form { margin-top:30px; gap:20px; }
.login-panel .portal-button { margin-top:4px; }
.login-help a { display:block; margin-top:8px; color:var(--pine); }
/* Carry the workspace surfaces through documents and learning activities. */
.portal-game { border-radius:13px; background:white; }
.portal-game h2 { font-size:25px; }
.portal-game p { font-size:13px; }
.docs-workspace { background:#f6f8f2; border-color:#e0e6d8; border-radius:13px; }
.doc-choice,.linked-doc,.work-alternative { border-color:#e0e6d8; border-radius:10px; }
.portal-body .practice-lab { background:#f6f8f2; border-color:#e0e6d8; }
.portal-body .practice-top { background:#eaf0e2; color:#435837; border-bottom:1px solid #dce5d2; }
.practice-top .eyebrow { color:#788d65; }
.practice-top h2 { font-size:28px; }
.practice-top p { font-size:13px; }
.practice-choices article,.practice-notes,.practice-card,.pencil-practice { background:#fff; border-color:#e0e6d8; border-radius:12px; }
.practice-choices h3 { font-size:24px; }
.practice-mark { background:#edf2e5; color:#718858; }
.practice-footer { border-color:#e0e6d8; }
@media(min-width:761px) {
  .sidebar-collapsed { grid-template-columns:76px minmax(0,1fr); }
  .sidebar-collapsed .portal-sidebar { padding-inline:10px; }
  .sidebar-collapsed .portal-brand { padding:0 9px; }
  .sidebar-collapsed .portal-brand img { max-width:none; }
  .sidebar-collapsed .portal-brand>span,.sidebar-collapsed .workspace-label,.sidebar-collapsed .workspace-search-trigger>span,.sidebar-collapsed kbd,.sidebar-collapsed .student-switcher,.sidebar-collapsed nav button>span,.sidebar-collapsed .person-details { display:none; }
  .sidebar-collapsed .workspace-search-trigger { margin-top:25px; justify-content:center; }
  .sidebar-collapsed .sidebar-label { font-size:0; margin:10px 8px; height:1px; background:#dde3d6; }
  .sidebar-collapsed nav button { justify-content:center; padding:11px; }
  .sidebar-collapsed .sidebar-person { flex-direction:column; }
  .sidebar-collapsed .person-account { flex:none; }
}
@media(max-width:1100px) {
  .portal-shell { grid-template-columns:220px minmax(0,1fr); }
  .sidebar-collapsed { grid-template-columns:76px minmax(0,1fr); }
  .portal-content { padding:30px 25px; }
  .dashboard-grid { grid-template-columns:1fr; }
  .launch-prompts { grid-template-columns:1fr; }
  .launch-prompts button { padding:10px 12px; }
  .top-context .workspace-private { display:none; }
  .chat-shell { grid-template-columns:175px minmax(0,1fr); }
  .chat-compose-actions small { max-width:200px; }
}
@media(max-width:760px) {
  .portal-shell { display:block; }
  .portal-sidebar { position:fixed; top:0; left:0; bottom:0; width:260px; height:100dvh; transform:translateX(-100%); visibility:hidden; transition:transform .2s,visibility .2s; padding:25px 14px 15px; }
  .mobile-nav-open .portal-sidebar { transform:none; visibility:visible; }
  .portal-sidebar nav { display:grid; overflow-y:auto; }
  .sidebar-person { margin-top:auto; display:flex; padding-top:14px; }
  .sidebar-person span { display:initial; }
  .sidebar-person .person-details { display:grid; }
  .sidebar-person .person-avatar { display:grid; }
  .mobile-nav-open .sidebar-scrim { display:block; position:fixed; inset:0; z-index:35; background:#26371d55; border:0; backdrop-filter:blur(3px); }
  .portal-top { height:59px; min-height:59px; padding:0 15px; gap:8px; position:sticky; top:0; z-index:30; background:#f8f9f6ed; backdrop-filter:blur(14px); }
  .top-breadcrumb { gap:8px; }
  .breadcrumb-school { display:none; }
  .top-context { font-size:9px; }
  .portal-content { padding:28px 18px; }
  .portal-heading { gap:16px; }
  .portal-heading h1 { font-size:29px; }
  .portal-heading p:not(.eyebrow) { font-size:12px; }
  .workspace-launch { padding:20px; margin-bottom:27px; }
  .launch-copy { gap:13px; align-items:flex-start; }
  .assistant-mark { width:35px; height:35px; border-radius:11px; }
  .launch-copy h2 { font-size:20px; }
  .launch-copy .eyebrow { font-size:7px; }
  .launch-copy p { font-size:11px; }
  .launch-open { display:none; }
  .launch-prompts { margin-top:20px; }
  .section-caption>span { font-size:9px; }
  .metric-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .metric-grid article { display:grid; padding:15px 12px; gap:13px; align-content:space-between; }
  .metric-grid span { font-size:9px; }
  .metric-grid strong { font-size:27px; }
  .metric-grid .word-metric { font-size:16px; line-height:1.25; }
  .portal-card { padding:20px; }
  .schedule-list li { grid-template-columns:28px minmax(0,1fr) auto; }
  .period-time { grid-column:auto; display:grid; gap:5px; }
  .workspace-footer { margin-inline:18px; font-size:8px; }
  .workspace-footer span:last-child { max-width:145px; text-align:right; }
  .chat-shell { grid-template-columns:1fr; }
  .chat-history { border-right:0; padding:18px; display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
  .chat-history h2 { width:100%; margin:0; }
  .chat-history label { flex:1; min-width:100px; margin:0; }
  .chat-history>.portal-button { width:auto; margin:0; }
  .chat-history nav { width:100%; max-height:110px; margin:0; }
  .chat-history-empty { margin:0; font-size:10px; }
  .chat-conversation { min-height:590px; height:80svh; }
  .chat-composer { margin:0 12px 12px; padding:13px; }
  .chat-compose-actions small { font-size:9px; }
  .chat-empty { padding:40px 20px; }
  .chat-panel>.chat-empty { min-height:370px; }
  .login-layout { grid-template-columns:1fr; padding:10px; gap:0; }
  .login-story { padding:23px; border-radius:14px; gap:24px; }
  .login-story>div { display:block; }
  .login-story h1 { display:block; font-size:30px; margin:12px 0; }
  .login-story>div>p:last-child { font-size:12px; margin:0; }
  .login-story>a:last-child { font-size:10px; }
  .login-panel { padding:36px 20px; }
}
@media(prefers-reduced-motion:reduce) {
  .portal-body *, .portal-body *::before, .portal-body *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}

.chat-draft-preview { margin-top:18px!important; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
@media(max-width:760px) { .portal-body input,.portal-body select,.portal-body textarea { font-size:16px; } .portal-sidebar nav button,.launch-prompts button,.chat-prompts button { min-height:44px; } }

.mobile-close { display:none; }
@media(max-width:760px) { .mobile-close { display:grid; position:absolute; right:10px; top:16px; font-size:25px; } .portal-sidebar .portal-brand { padding-right:20px; } }

@media(max-width:760px) { .overview-dashboard>section:last-child { order:-1; } }

.room-card{display:flex;flex-direction:column;min-height:620px;height:min(780px,80vh);background:var(--paper);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.room-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 28px;border-bottom:1px solid var(--line)}
.room-head h2{font-size:23px;margin:0 0 5px}.room-head p{font-size:13px;color:var(--muted);margin:0}.room-head code{background:#e7eee7;border-radius:4px;padding:2px 4px;color:var(--pine)}
.room-presence{white-space:nowrap;font:12px var(--mono);color:var(--pine);background:#e7eee7;border-radius:20px;padding:7px 11px}
.room-feed{flex:1;overflow-y:auto;padding:26px;display:flex;flex-direction:column;gap:16px}.room-empty{text-align:center;color:var(--muted);margin:auto}
.room-message{max-width:min(78%,680px);align-self:flex-start;border:1px solid var(--line);background:#f7f8f4;border-radius:14px 14px 14px 3px;padding:13px 17px}
.room-message.mine{align-self:flex-end;background:#e9f1e6;border-color:#cfdfcd;border-radius:14px 14px 3px 14px}.room-message.assistant{background:#fff9e8;border-color:#e8dba9}
.room-message-meta{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;font-size:12px}.room-message-meta strong{color:var(--pine)}.room-message-meta time{color:var(--muted);font-size:11px}
.room-message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;font-size:14px;margin:7px 0 0}
.room-form{border-top:1px solid var(--line);padding:18px 24px}.room-form label{font-size:13px;font-weight:600}.room-form textarea{display:block;width:100%;margin:7px 0 12px;resize:vertical;min-height:78px}
.room-actions{display:flex;justify-content:space-between;align-items:center;gap:18px}.room-status{font-size:13px;color:var(--muted)}
@media(max-width:700px){.room-card{height:75vh;min-height:520px}.room-head{padding:17px;align-items:flex-start}.room-presence{display:none}.room-feed{padding:16px}.room-message{max-width:92%}.room-form{padding:14px}}
