/* 智链谷 · AI 工作空间
   Tokens → common controls → shell → workbench → applications → chat
   → teaching workflows → dialogs → responsive → accessible print. */

:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  color: #ecf5ff;
  background: #07121f;
  --canvas: #07121f;
  --panel: #101e2e;
  --panel-raised: #132638;
  --panel-deep: #0b1826;
  --text: #ecf5ff;
  --muted: #89a4bc;
  --faint: #607e96;
  --line: #ffffff12;
  --line-strong: #ffffff22;
  --cyan: #48d9e4;
  --navy: #ecf5ff;
  --lake: #48d9e4;
  --pale: #132638;
  --good: #7cddba;
  --danger: #f3a0a0;
  --shadow: 0 12px 30px #0000000c;
  --sidebar-width: 208px;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
button, input, select, textarea, a, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--cyan); }
button, a, input, textarea, select { transition: border-color .16s, background-color .16s, color .16s; }
a { color: var(--cyan); text-underline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 2rem; font-weight: 620; line-height: 1.35; letter-spacing: -.045em; }
h2 { font-size: 1.2rem; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.65; }
p { line-height: 1.85; }
svg { flex: none; }
[hidden] { display: none !important; }
::selection { color: #fff; background: #22747f; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #365064; border: 1px solid transparent; border-radius: 10px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { color: var(--cyan); font-size: .6875rem; font-weight: 600; letter-spacing: .13em; line-height: 1.8; margin-bottom: 13px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.preline { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.starting { padding: 100px 25px; color: var(--muted); text-align: center; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 23px 0; }
.stack { display: grid; gap: 18px; }
.section-gap { margin-top: 23px; }
.actions, .tagrow { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px 17px; min-height: 43px; background: #15283a; color: #c7d9e8; font-weight: 550; font-size: .875rem; line-height: 1.5; text-decoration: none; }
.btn:hover { background: #1b3448; border-color: #89a4bc; color: #fff; }
.btn.primary { background: var(--cyan); color: #09212b; border-color: var(--cyan); font-weight: 650; }
.btn.primary:hover { background: #75e7ee; border-color: #75e7ee; }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); }
.btn.subtle:hover { background: #ffffff06; color: #e8f4ff; }
.btn.compact { font-size: .8125rem; min-height: 36px; padding: 7px 12px; }
.btn.danger { color: var(--danger); }
.btn svg, .text-button svg { width: 17px; height: 17px; }
.text-button { border: 0; background: transparent; padding: 3px 0; color: #71cbd7; font-size: .8125rem; line-height: 1.7; font-weight: 500; text-decoration: none; }
.text-button:hover { color: #b7f4f6; }
.pill { display: inline-block; font-size: .6875rem; line-height: 1.7; padding: 3px 8px; background: #1b3043; border: 1px solid #ffffff05; border-radius: 4px; color: #9ab7ce; font-weight: 500; white-space: nowrap; }
.pill.good { background: #12372f; border-color: #89a4bc; color: var(--good); }
.pill.warn { background: #382f21; border-color: #89a4bc; color: #e5bd7c; }
.pill.error { background: #39282e; border-color: #89a4bc; color: var(--danger); }
.panel, .aside-card { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
.panel-inner { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1rem; }
.empty { grid-column: 1 / -1; padding: 42px 24px; border: 1px dashed #2c455a; border-radius: 9px; background: #0c1b29; text-align: center; color: var(--muted); line-height: 1.8; }
.empty h3 { color: #cbdfed; font-size: 1rem; margin-bottom: 8px; }
.empty p { font-size: .875rem; }
.field { display: grid; gap: 9px; margin-bottom: 19px; }
.field label, .field-label { color: #bdcfe0; font-size: .875rem; font-weight: 550; }
.field input, .field textarea, .field select, .select { width: 100%; min-height: 43px; border: 1px solid #2c4357; border-radius: 6px; padding: 11px 12px; background: #0c1927; color: var(--text); }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.85; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus, .select:focus { outline: 2px solid #48d9e41c; border-color: #47949e; }
.field input[type="file"] { font-size: .8125rem; }
.field input[type="file"]::file-selector-button { border: 1px solid #385468; border-radius: 4px; padding: 6px 11px; margin-right: 12px; background: #20394d; color: #b9d1e2; }
.field .hint { font-size: .8125rem; color: var(--muted); font-weight: 400; }
.form-error { padding: 11px 13px; margin-bottom: 17px; border: 1px solid #75434a; border-radius: 6px; background: #36262d; color: #efb4b9; font-size: .8125rem; line-height: 1.8; }
.form-error:empty { display: none; }
.checks { display: flex; flex-wrap: wrap; gap: 20px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: .875rem; line-height: 1.8; }
.checks input { width: 17px; height: 17px; accent-color: var(--cyan); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Brand and primary navigation */
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 7px; padding: 1px; }
.brand strong { color: var(--text); font-size: 1.05rem; font-weight: 600; letter-spacing: .06em; }
.brand span { display: block; color: #7995ae; font-size: .6875rem; line-height: 1.6; margin-top: 4px; }
.brand-signal { display: inline-block !important; margin: 0 0 0 5px !important; width: 5px; height: 5px; vertical-align: middle; border-radius: 50%; background: var(--cyan); }
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0,1fr); min-height: 100vh; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 28px 17px 20px; border-right: 1px solid var(--line); background: #091522; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 5px; }
.sidebar-label { margin: 36px 14px 14px; color: #89a4bc; font-size: .6875rem; letter-spacing: .12em; }
.nav { display: grid; gap: 5px; }
.nav button { display: flex; align-items: center; gap: 12px; min-height: 43px; border: 1px solid transparent; border-radius: 6px; padding: 10px 13px; background: transparent; color: #7e9ab2; font-size: .8125rem; text-align: left; }
.nav button:hover { color: #d6e8f8; background: #ffffff04; }
.nav button.active { color: #70e2e8; background: #11303a; border-color: #89a4bc; }
.nav-mark { display: inline-flex; justify-content: center; align-items: center; width: 19px; height: 19px; font-size: 1rem; }
.nav-mark svg { width: 18px; height: 18px; }
.nav button.active .nav-mark { color: var(--cyan); }
.side-culture, .side-course-note { margin: 26px 13px 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.side-culture > span { color: #6d91a9; font-size: .6875rem; }
.side-culture p, .side-course-note { color: #89a4bc; font-size: .6875rem; line-height: 1.95; }
.side-culture p { margin-top: 10px; }
.side-footer { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid var(--line); color: #6e8ca3; font-size: .6875rem; line-height: 1.8; text-decoration: none; }
.side-footer:hover { color: var(--cyan); }
.side-footer img { width: 44px; height: 44px; padding: 3px; background: #fff; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 75px; padding: 0 38px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--canvas); }
.topbar-title { display: flex; align-items: center; gap: 12px; color: #97b0c7; font-size: .8125rem; }
.topbar-title .sep { color: #89a4bc; }
.topbar-title .context-name { color: #d8e8f7; }
.topbar-title .pill { font-size: .6875rem; letter-spacing: .03em; padding: 2px 7px; background: #122c33; color: #6ebdc7; border-color: #89a4bc; }
.workspace-header-eyebrow { display: block; font-size: .6875rem; font-weight: 550; letter-spacing: .17em; color: #89a4bc; line-height: 1.6; }
.account { display: flex; align-items: center; gap: 10px; }
.topbar-ip { width: 33px; height: 45px; object-fit: contain; object-position: bottom; margin-right: 5px; }
.avatar { width: 32px; height: 32px; border: 1px solid #314b60; border-radius: 50%; display: grid; place-items: center; background: #192c40; color: #9cc1d9; font-size: .75rem; }
.account-name { color: #bed1e1; font-size: .75rem; }
.account-role { color: #89a4bc; font-size: .6875rem; margin-top: 3px; }
.account .btn { font-size: .6875rem; min-height: 33px; padding: 6px; margin-left: 7px; }
.page { max-width: 1550px; margin: auto; padding: 27px 38px 30px; }
.coursebar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.course-switch { display: flex; align-items: center; gap: 12px; max-width: 100%; min-width: 0; }
.course-switch label { flex: none; color: #89a4bc; font-size: .6875rem; }
.course-switch select { width: 315px; max-width: 100%; min-height: 37px; border-color: #89a4bc; background: #0c1a29; color: #adc6d9; font-size: .75rem; padding: 8px 12px; }
.coursebar > .actions .btn { min-height: 34px; font-size: .6875rem; padding: 7px 11px; background: transparent; border-color: #89a4bc; color: #7c9ab2; }
.coursebar > .actions .btn:hover { color: #cfedf3; border-color: #89a4bc; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.page-title h1 { color: #f1f8ff; font-size: 1.8rem; font-weight: 620; letter-spacing: -.045em; }
.page-title p { color: var(--muted); font-size: .875rem; margin-top: 8px; }
.info-strip { padding: 12px 16px; margin-bottom: 22px; border: 1px solid #244253; border-radius: 7px; background: #102938; color: #94b5c9; font-size: .8125rem; line-height: 1.8; }
.brand-footer { display: flex; justify-content: flex-end; margin-top: 27px; }
.brand-footer a { display: flex; align-items: center; gap: 12px; color: #6c8da4; text-decoration: none; font-size: .6875rem; line-height: 1.9; }
.brand-footer span { text-align: right; }
.brand-footer small { display: block; color: #89a4bc; font-size: .6875rem; }
.brand-footer img { display: block; width: 74px; height: 74px; padding: 4px; border: 1px solid #fff; border-radius: 5px; background: #fff; image-rendering: pixelated; }

/* Workbench: idea → dialogue → outcome */
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(335px,.88fr); column-gap: 30px; row-gap: 23px; padding: 9px 0 27px; }
.hero-copy { align-self: center; padding: 16px 0 12px; }
.hero-copy .eyebrow { color: #6b98b0; font-size: .6875rem; letter-spacing: .18em; margin-bottom: 18px; }
.home-hero-title { color: #edf6ff; font-size: clamp(2.6rem, 3.7vw, 4rem); line-height: 1.19; font-weight: 570; letter-spacing: -.065em; }
.home-hero-title span, .home-hero-title em { color: var(--cyan); font-style: normal; }
.hero-intro strong { color: var(--cyan); font-weight: 600; }
.hero-intro { max-width: 480px; margin-top: 19px; color: #7d9cb5; font-size: .875rem; line-height: 1.95; }
.hero-course-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #284153; border-radius: 4px; margin-top: 19px; background: #0d1c2b; color: #82a4bf; font-size: .6875rem; max-width: 100%; line-height: 1.7; }
.hero-course-chip svg { width: 13px; height: 13px; color: #5eb6c7; }
.hero-topline { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.hero-topline h1 { font-size: 2rem; color: var(--text); }
.hero-topline p { margin-top: 9px; color: var(--muted); font-size: .875rem; }
.hero-ip { display: flex; align-items: center; gap: 12px; }
.hero-ip img { width: 70px; height: 86px; object-fit: contain; }
.hero-ip span { color: #688da5; font-size: .6875rem; writing-mode: vertical-rl; letter-spacing: .12em; }
.intelligence-map { position: relative; height: 270px; width: 100%; align-self: center; overflow: visible; isolation: isolate; }
.intelligence-map::before { content: ""; position: absolute; inset: 4px 0; z-index: -1; background-image: radial-gradient(#44607955 .6px, transparent .6px); background-size: 18px 18px; mask-image: linear-gradient(90deg,transparent,#000 15%,#000 80%,transparent); opacity: .4; }
.intelligence-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: #89a4bc; pointer-events: none; }
.intelligence-map > svg path, .intelligence-map > svg line { vector-effect: non-scaling-stroke; }
.map-node { position: absolute; transform: translate(-50%,-50%); width: 150px; min-height: 69px; padding: 13px 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #2e4b5f; border-radius: 9px; background: #112233; color: #a9c7dc; text-align: left; box-shadow: 0 12px 25px #00000016; }
.map-node:hover { border-color: #58abb8; background: #142c3c; }
.map-node.node-source { left: 24%; top: 25%; }
.map-node.node-dialog { left: 75%; top: 47%; border-color: #89a4bc; background: #102c37; }
.map-node.node-artifact { left: 35%; top: 80%; }
.map-node svg { width: 21px; height: 21px; color: #6dc9d5; }
.map-node strong { display: block; color: #e4f4ff; font-size: 1.4rem; font-weight: 550; line-height: 1.1; letter-spacing: -.04em; }
.map-node small { display: block; color: #779cb6; font-size: .6875rem; line-height: 1.7; margin-top: 6px; }
.map-node .map-node-label { font-size: .6875rem; color: #83a9c0; }
.hero-composer { grid-column: 1 / -1; margin-top: 3px; padding: 21px 24px 17px; border: 1px solid #315269; border-radius: 12px; background: #112334; box-shadow: 0 8px 26px #0000000a; position: relative; }
.hero-composer::before { content: ""; position: absolute; width: 90px; height: 1px; top: -1px; left: 25px; background: var(--cyan); opacity: .8; }
.hero-composer:focus-within { border-color: #89a4bc; }
.hero-composer textarea { display: block; width: 100%; min-height: 69px; resize: none; border: 0; padding: 0; outline: 0; color: var(--text); font-size: .9375rem; line-height: 1.85; background: transparent; }
.hero-composer textarea::placeholder { color: #708fa8; }
.hero-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; }
.hero-composer-foot > span { color: #5f8a9f; font-size: .6875rem; }
.hero-composer-foot .btn { min-height: 37px; padding: 9px 15px; font-size: .75rem; gap: 19px; border-radius: 5px; }
.status-dot { display: inline-block; width: 5px; height: 5px; margin-right: 6px; vertical-align: middle; border-radius: 50%; background: var(--cyan); }
.home-suggestions { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: -13px; }
.home-suggestions button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid transparent; border-radius: 5px; color: #6d91ac; background: transparent; font-size: .6875rem; line-height: 1.8; }
.home-suggestions button:hover { background: #122a3a; border-color: #89a4bc; color: #b9e1ed; }
.home-suggestions svg { width: 13px; height: 13px; }
.home-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 8px 0 26px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-stats button { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 2px 25px; border: 0; border-right: 1px solid var(--line); color: #abc3d6; background: transparent; text-align: left; }
.home-stats button:first-child { padding-left: 0; }
.home-stats button:last-child { border: 0; padding-right: 0; }
.home-stats button > span { color: #678aa4; font-size: .75rem; }
.home-stats strong { color: #c7e5f5; font-size: 1.45rem; font-weight: 500; letter-spacing: -.05em; }
.home-stats small { color: #89a4bc; font-size: .6875rem; font-weight: 400; }
.role-entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 34px; }
.role-entries button { display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0; padding: 18px 17px; border: 1px solid #20384b; border-radius: 8px; background: #0c1b29; }
.role-entries button:hover { border-color: #89a4bc; background: #102333; }
.role-icon { display: grid; place-items: center; width: 35px; height: 37px; flex: none; border: 1px solid #254858; border-radius: 7px; color: #5ec6d2; background: #102b38; }
.role-icon svg { width: 19px; height: 19px; }
.role-entries strong { color: #b9d2e5; font-size: .8125rem; font-weight: 550; }
.role-entries small { display: block; margin-top: 5px; color: #89a4bc; font-size: .6875rem; line-height: 1.7; }
.item-arrow { margin-left: auto; color: #89a4bc; font-size: .875rem; }
.item-arrow svg { width: 15px; height: 15px; }
.home-section { margin-top: 20px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.section-top h2 { color: #d9ebf8; font-size: 1.08rem; font-weight: 570; }
.section-top p { color: #89a4bc; font-size: .75rem; margin-top: 6px; }
.category-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 21px 0 18px; }
.category-quick button { display: inline-flex; gap: 7px; align-items: center; border: 1px solid #213c51; border-radius: 5px; padding: 7px 11px; color: #87a8c0; background: #0d1c2b; font-size: .6875rem; }
.category-quick button:hover { color: #b2e3e9; border-color: #89a4bc; }
.category-quick svg { width: 14px; height: 14px; color: #4f99ad; }
.home-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.home-items { padding: 0 22px; }
.home-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; min-width: 0; }
.home-item:last-child { border: 0; }
.home-item > span:nth-child(2) { min-width: 0; }
.home-item strong { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9bbacf; font-size: .8125rem; font-weight: 500; }
.home-item small { display: block; color: #89a4bc; font-size: .6875rem; line-height: 1.8; margin-top: 5px; }
.item-mark { display: grid; place-items: center; width: 31px; height: 35px; flex: none; border: 1px solid #234256; border-radius: 5px; background: #132d3f; color: #6fa6bd; font-size: .6875rem; }
.item-mark svg { width: 16px; height: 16px; }
.artifact-mark { background: #112f32; color: #76bdb8; border-color: #89a4bc; }
.quiet-empty { min-height: 98px; color: #89a4bc; font-size: .8125rem; line-height: 1.95; padding: 25px 0; }
.home-culture { margin-top: 32px; color: #89a4bc; font-size: .6875rem; letter-spacing: .08em; line-height: 2; text-align: center; }

/* Applications, audiences and useful outputs */
.app-grid { display: grid; gap: 16px; }
.catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.home-app-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.app-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; padding: 23px; border: 1px solid #21394c; border-radius: 9px; background: var(--panel); text-align: left; color: #bed7e9; transition: background .16s, border-color .16s, transform .16s; }
.app-card:hover { background: #13283a; border-color: #89a4bc; transform: translateY(-2px); }
.app-card-top { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 19px; }
.app-card-top > span:not(.app-icon):not(.app-card-arrow) { color: #89a4bc; font-size: .6875rem; line-height: 1.7; }
.app-card-arrow { margin-left: auto; color: #89a4bc; }
.app-card-arrow svg { width: 16px; height: 16px; }
.app-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid #28505f; border-radius: 8px; background: #12323e; color: #56c8d5; font-size: 1.2rem; }
.app-icon svg { width: 22px; height: 22px; }
.app-icon.engineering { border-color: #89a4bc; background: #1a2d3b; color: #83b5d5; }
.app-icon.study { border-color: #89a4bc; background: #142d2c; color: #7bc6b2; }
.app-icon.office { border-color: #89a4bc; background: #2b2921; color: #c5b07a; }
.app-card > strong { color: #dcecf9; font-size: 1.03rem; font-weight: 570; line-height: 1.6; }
.app-card-description { min-height: 48px; color: #6f94ae; font-size: .875rem; line-height: 1.85; margin-top: 7px; }
.app-example { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 52px; margin-top: 20px; padding: 11px 12px; border: 1px solid #1b3549; border-radius: 5px; background: #0b1b2b; color: #6e92ad; font-size: .6875rem; line-height: 1.85; }
.app-example > span { color: #89a4bc; margin-right: 7px; }
.app-outcome { padding-top: 15px; border-top: 1px solid #213548; margin-top: 18px; color: #8cbfce; font-size: .6875rem; line-height: 1.8; }
.app-outcome > span { display: block; color: #89a4bc; font-size: .6875rem; margin-bottom: 3px; }
.app-launch-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 18px; color: #72c9d5; font-size: .6875rem; font-weight: 550; }
.app-launch-label svg { width: 14px; height: 14px; }
.home-app-grid .app-card { padding: 19px; }
.home-app-grid .app-icon { width: 34px; height: 34px; border-radius: 7px; }
.home-app-grid .app-icon svg { width: 19px; height: 19px; }
.home-app-grid .app-card-top { margin-bottom: 17px; gap: 8px; }
.home-app-grid .app-card-top > span:not(.app-icon):not(.app-card-arrow) { font-size: .6875rem; }
.home-app-grid .app-card > strong { font-size: .9rem; }
.home-app-grid .app-card-description { font-size: .875rem; line-height: 1.8; }
.home-app-grid .app-example { min-height: 54px; padding: 10px; margin-top: 15px; font-size: .78125rem; }
.home-app-grid .app-outcome { font-size: .6875rem; margin-top: 15px; padding-top: 13px; }
.catalog-count { color: #89a4bc; font-size: .75rem; white-space: nowrap; }
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 17px; margin-bottom: 21px; }
.role-tabs button { padding: 9px 16px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #6c8ca6; font-size: .8125rem; }
.role-tabs button.active { background: #11323d; border-color: #89a4bc; color: #74d5df; font-weight: 550; }
.role-tabs button:hover { color: #bae9ef; }
.apps-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.category-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.category-tabs button { border: 1px solid transparent; border-radius: 4px; background: transparent; color: #89a4bc; font-size: .6875rem; padding: 6px 9px; }
.category-tabs button.active { color: #a9cbdd; border-color: #89a4bc; background: #172c3e; }
.app-search { display: flex; align-items: center; gap: 8px; flex: none; width: 190px; padding: 9px 11px; border: 1px solid #294354; border-radius: 6px; color: #89a4bc; background: #0b1a29; }
.app-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; color: #a6c4d9; font-size: .75rem; background: transparent; }
.app-search input::placeholder { color: #89a4bc; }
.app-search:focus-within { border-color: #4b99a5; outline: 2px solid #48d9e414; }
.app-search svg { width: 15px; height: 15px; }
.app-footnote { font-size: .6875rem; color: #89a4bc; margin-top: 25px; }
.management-flows { margin: 27px 0; }
.flow-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.flow-grid button { display: grid; grid-template-columns: 27px 1fr; gap: 8px; padding: 18px; border: 1px solid #234358; border-radius: 7px; background: #0e2232; text-align: left; }
.flow-grid button:hover { border-color: #89a4bc; background: #112c3b; }
.flow-grid button > span { grid-row: span 2; color: #5b9cb4; font-size: 1.15rem; }
.flow-grid svg { width: 19px; height: 19px; }
.flow-grid strong { color: #a7cee0; font-size: .8125rem; font-weight: 550; }
.flow-grid small { color: #89a4bc; font-size: .6875rem; line-height: 1.8; }
.flow-grid em { grid-column: 2; margin-top: 3px; color: #5499af; font-style: normal; font-size: .6875rem; }

/* Persistent, course-scoped conversations */
.chat-workspace .page { max-width: none; padding: 21px 30px 20px; }
.chat-workspace .coursebar { margin-bottom: 18px; }
.chat-layout { display: grid; grid-template-columns: 213px minmax(0,1fr); height: calc(100dvh - 244px); min-height: 530px; border: 1px solid #284458; border-radius: 10px; overflow: hidden; background: #0c1a29; }
.chat-history { display: flex; flex-direction: column; min-height: 0; padding: 19px 12px 15px; border-right: 1px solid #21394d; background: #0b1725; }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 39px; padding: 9px 12px; border: 1px solid #2a5966; border-radius: 6px; color: #7ed0de; background: #12303b; font-size: .8125rem; font-weight: 550; }
.new-chat:hover { background: #194552; border-color: #4e9eaa; }
.new-chat > span { font-size: 1.05rem; }
.new-chat svg { width: 15px; height: 15px; }
.history-heading { display: flex; justify-content: space-between; align-items: center; margin: 27px 10px 12px; color: #89a4bc; font-size: .6875rem; letter-spacing: .02em; }
.history-heading small { font-size: .6875rem; }
.history-list { min-height: 0; flex: 1; overflow-y: auto; }
.history-item { display: block; width: 100%; margin-bottom: 5px; padding: 12px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.history-item:hover { background: #10283b; }
.history-item.active { border-color: #89a4bc; background: #132f3c; }
.history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #83a4bc; font-size: .75rem; line-height: 1.8; font-weight: 500; }
.history-item.active strong { color: #b5e4ec; }
.history-item span { display: block; margin-top: 6px; color: #89a4bc; font-size: .6875rem; line-height: 1.7; }
.history-empty { margin: 15px 10px; color: #89a4bc; font-size: .6875rem; line-height: 1.95; }
.history-note { margin-top: 17px; padding: 14px 9px 0; border-top: 1px solid var(--line); color: #89a4bc; font-size: .6875rem; line-height: 1.9; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; background: #0d1c2b; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 25px; border-bottom: 1px solid #1d3549; }
.chat-app-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.chat-app-title > div { min-width: 0; }
.chat-app-title strong { display: block; max-width: 420px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #c3dceb; font-size: .8125rem; line-height: 1.7; font-weight: 550; }
.chat-app-title > div > span { display: block; margin-top: 4px; color: #89a4bc; font-size: .6875rem; }
.chat-toolbar .app-icon { width: 33px; height: 35px; border-radius: 7px; }
.chat-toolbar .app-icon svg { width: 18px; height: 18px; }
.chat-toolbar .model-state { max-width: 175px; text-align: right; font-size: .6875rem; line-height: 1.8; }
.chat-feed { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 28px 30px; scroll-behavior: smooth; }
.chat-welcome { min-height: 230px; height: 100%; padding: 30px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-symbol { color: #5ed0dc; font-size: 2.8rem; font-weight: 300; margin-bottom: 23px; }
.welcome-symbol svg { width: 42px; height: 42px; }
.chat-welcome h2 { color: #d1e7f7; font-size: 1.35rem; font-weight: 500; letter-spacing: -.03em; }
.chat-welcome > p { max-width: 450px; margin-top: 12px; color: #89a4bc; font-size: .8125rem; line-height: 1.95; }
.welcome-ideas { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.welcome-ideas button { padding: 9px 12px; border: 1px solid #254255; border-radius: 5px; background: #102536; color: #7da7bf; font-size: .6875rem; line-height: 1.8; }
.welcome-ideas button:hover { color: #bbe6ec; border-color: #89a4bc; }
.welcome-ideas > span { color: #89a4bc; font-size: .6875rem; }
.chat-composer { flex: none; margin: 0 24px; padding: 17px 17px 12px; border: 1px solid #355b70; border-radius: 9px; background: #132a3c; box-shadow: 0 2px 12px #00000008; }
.chat-composer:focus-within { border-color: #5b9da9; }
.chat-composer textarea { display: block; width: 100%; min-height: 60px; max-height: 160px; padding: 0; border: 0; outline: 0; resize: none; color: #d1e7f7; background: transparent; font-size: .9375rem; line-height: 1.85; }
.chat-composer textarea::placeholder { color: #6488a2; }
.chat-composer .form-error { padding: 8px 10px; font-size: .75rem; margin-bottom: 12px; }
.chat-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-top: 11px; }
.chat-composer-foot > span { color: #89a4bc; font-size: .6875rem; }
.chat-composer-foot .btn { min-height: 35px; padding: 7px 13px; font-size: .6875rem; gap: 16px; border-radius: 5px; }
.chat-disclaimer { flex: none; margin: 10px 15px 13px; color: #89a4bc; font-size: .6875rem; line-height: 1.8; text-align: center; }
.message { display: flex; gap: 13px; max-width: 1040px; margin: 0 auto 30px; }
.message-avatar { display: grid; place-items: center; width: 31px; height: 32px; flex: none; border: 1px solid #2b4c62; border-radius: 7px; background: #1b344a; color: #91bdd7; font-size: .6875rem; }
.ai-avatar { color: #6edbe5; background: #12353d; border-color: #89a4bc; font-size: 1.05rem; }
.ai-avatar svg { width: 19px; height: 19px; }
.message-body { flex: 1; min-width: 0; }
.message-label { display: flex; align-items: center; gap: 13px; margin-top: 5px; margin-bottom: 14px; color: #93b9ce; font-size: .75rem; font-weight: 550; }
.message-label time { color: #89a4bc; font-size: .6875rem; font-weight: 400; }
.user-content { padding: 14px 17px; border: 1px solid #29475b; border-radius: 0 8px 8px; color: #bed5e7; background: #173044; font-size: 1rem; line-height: 1.9; }
.message-footer { display: flex; align-items: start; justify-content: space-between; gap: 13px; margin-top: 18px; padding-top: 11px; border-top: 1px solid #1e3b50; }
.message-footer > span { color: #89a4bc; font-size: .6875rem; line-height: 1.8; }
.message-footer > div { display: flex; gap: 15px; flex: none; }
.message-footer .text-button { color: #5b9ab2; font-size: .6875rem; }
.message-pending, .chat-sending { display: flex; align-items: center; gap: 10px; padding: 7px 0 12px; color: #6893ad; font-size: .8125rem; line-height: 1.85; }
.message-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 17px; }
.message-actions .btn { min-height: 32px; padding: 6px 10px; border-color: #89a4bc; background: #163341; color: #8dc6d6; font-size: .6875rem; }
.chat-error { padding: 15px; border: 1px solid #73494d; border-radius: 7px; color: #e0a3aa; background: #35292f; font-size: .8125rem; }
.chat-error strong { font-weight: 550; }
.chat-error p { margin: 8px 0 12px; color: #ba838b; font-size: .8125rem; }
.chat-error .btn { min-height: 32px; font-size: .6875rem; background: #49333a; border-color: #89a4bc; }

/* Safe Markdown, citations and saved work */
.markdown { color: #b0ccdf; font-size: 1rem; line-height: 1.95; overflow-wrap: anywhere; }
.markdown p { margin: 8px 0; line-height: 1.95; }
.markdown h3 { color: #d4eaf8; font-size: 1.08rem; line-height: 1.7; font-weight: 600; margin: 21px 0 11px; }
.markdown h3:first-child { margin-top: 0; }
.markdown ul, .markdown ol { padding-left: 24px; margin: 12px 0; }
.markdown li { margin: 6px 0; padding-left: 2px; line-height: 1.9; }
.markdown strong { color: #dfedf8; font-weight: 600; }
.markdown code { padding: 2px 5px; border: 1px solid #284a60; border-radius: 4px; color: #8fd2e1; background: #163449; font: .8125rem / 1.8 ui-monospace,SFMono-Regular,Consolas,monospace; }
.markdown blockquote { margin: 15px 0; padding: 12px 17px; border-left: 2px solid #3f8fa2; color: #78a5be; background: #102c3c; font-size: .875rem; }
.codeblock { margin: 17px 0; border: 1px solid #24445b; border-radius: 7px; overflow: hidden; background: #081726; }
.codeblock > span { display: block; padding: 9px 15px; border-bottom: 1px solid #20394f; color: #89a4bc; font-size: .6875rem; }
.codeblock pre { padding: 17px; margin: 0; overflow-x: auto; line-height: 1.9; }
.codeblock pre code { padding: 0; border: 0; border-radius: 0; background: transparent; color: #a2cde2; font-size: .8125rem; white-space: pre; }
.markdown-table { overflow-x: auto; margin: 17px 0; }
.markdown table { width: 100%; border-collapse: collapse; font-size: .8125rem; line-height: 1.85; }
.markdown th, .markdown td { padding: 10px 13px; border: 1px solid #29475b; text-align: left; }
.markdown th { background: #19384b; color: #aad5e5; font-weight: 550; }
.evidence-list { display: grid; gap: 10px; margin-top: 21px; }
.evidence { padding: 13px 15px; border: 1px solid #294d60; border-radius: 6px; background: #10293a; }
.evidence summary { display: flex; align-items: baseline; gap: 9px; cursor: pointer; color: #7cacc5; font-size: .8125rem; line-height: 1.8; }
.evidence-index { color: #60c8d5; font-size: .6875rem; font-weight: 600; }
.evidence .preline { margin-top: 12px; color: #709ab3; font-size: .875rem; line-height: 1.95; }
.message .evidence-list { margin-top: 17px; }
.message .evidence { padding: 11px 13px; }
.message .evidence summary { font-size: .75rem; }
.message .evidence .preline { font-size: .8125rem; }
.artifact-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.artifact-card { padding: 24px; }
.artifact-card .pill { font-size: .6875rem; }
.artifact-card .tagrow > .small { color: #89a4bc; font-size: .6875rem; }
.artifact-open { display: block; width: 100%; padding: 0; margin-top: 21px; border: 0; background: transparent; text-align: left; }
.artifact-open h3 { color: #c5e0ef; font-size: 1.08rem; line-height: 1.7; font-weight: 550; }
.artifact-open p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; min-height: 98px; overflow: hidden; margin-top: 14px; color: #89a4bc; font-size: .8125rem; line-height: 1.95; }
.artifact-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 23px; padding-top: 15px; border-top: 1px solid #213d52; }
.artifact-foot .text-button { font-size: .6875rem; }
.artifact-detail > .markdown { margin-top: 25px; }
.artifact-detail .modal-actions { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Project briefs, submissions and human evaluation */
.course-banner { display: flex; justify-content: space-between; gap: 26px; position: relative; margin-bottom: 23px; padding: 28px; border: 1px solid #294c60; border-radius: 9px; background: #10293a; }
.course-banner h2 { color: #d1e8f8; font-size: 1.35rem; font-weight: 570; margin-bottom: 11px; }
.course-banner .intro { color: #7ca1bb; font-size: .875rem; line-height: 1.9; max-width: 760px; }
.course-banner .tagrow { margin-top: 16px; }
.course-symbol { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 120px; padding-left: 23px; border-left: 1px solid #254b60; color: #5d91ac; }
.course-symbol > span { color: #5ebecf; font-size: 2.5rem; font-weight: 300; letter-spacing: -.05em; }
.course-symbol small { font-size: .6875rem; white-space: nowrap; margin-top: 8px; }
.culture-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 18px; margin: 0 0 25px; font-size: .6875rem; color: #89a4bc; line-height: 1.9; }
.culture-note strong { color: #6d9eb6; font-weight: 500; }
.grid-main { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 22px; align-items: start; }
.task-card { padding: 24px; border: 1px solid #274357; border-radius: 8px; background: #101f2f; }
.task-top { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.task-top h3 { max-width: 750px; color: #c2dced; font-size: 1.08rem; font-weight: 550; }
.task-card .brief { margin-top: 15px; color: #7598b1; font-size: .875rem; line-height: 1.95; white-space: pre-wrap; }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #20394c; }
.task-meta { display: flex; flex-wrap: wrap; gap: 14px; color: #89a4bc; font-size: .6875rem; line-height: 1.8; }
.task-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.task-buttons .btn { font-size: .6875rem; }
.aside-card { padding: 22px; }
.aside-card h3 { color: #a8c6db; font-size: .875rem; margin-bottom: 17px; font-weight: 550; }
.count-row { display: flex; justify-content: space-between; align-items: center; gap: 13px; padding: 10px 0; color: #5d849f; font-size: .8125rem; }
.count-row strong { color: #a5cee1; font-size: 1rem; font-weight: 500; }
.rubric-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #1f3a4e; color: #7299b2; font-size: .75rem; }
.rubric-row:first-of-type { border-top: 0; }
.rubric-row strong { color: #84b4cb; font-weight: 500; }
.student-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #233b4d; color: #8aafc7; font-size: .8125rem; }
.student-line:first-of-type { border-top: 0; }
.aside-note { color: #89a4bc; font-size: .6875rem; line-height: 1.9; margin-top: 16px; }
.filterbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.filterbar .select { width: 200px; font-size: .8125rem; }
.submitted { padding: 25px; }
.submission-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.submission-head h3 { color: #c5dfee; font-size: 1.05rem; }
.submission-head > div > p { color: #89a4bc; font-size: .75rem; }
.submission-content { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 22px; }
.submission-content h4 { color: #89a4bc; font-size: .75rem; font-weight: 500; margin-bottom: 10px; }
.submission-content p { color: #91b2ca; font-size: .875rem; line-height: 1.95; }
.grade { margin-top: 23px; padding: 21px; border: 1px solid #2d5149; border-radius: 7px; background: #112c2a; }
.grade-top { display: flex; align-items: baseline; gap: 10px; }
.grade-score { color: #7bd7b5; font-size: 2rem; font-weight: 500; line-height: 1.2; letter-spacing: -.05em; }
.grade .small { color: #589c87; }
.grade .preline { color: #84b9a9; font-size: .875rem; margin-top: 15px; }
.grade small { display: block; color: #89a4bc; font-size: .6875rem; margin-top: 12px; line-height: 1.8; }
.submission-versions { margin-top: 18px; color: #89a4bc; font-size: .6875rem; }

/* Uploaded materials and deterministic retrieval */
.doc-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.document { padding: 24px; }
.document h3 { color: #bdd9e9; font-size: 1rem; overflow-wrap: anywhere; }
.document .small { color: #89a4bc; font-size: .6875rem; }
.document details { margin-top: 18px; }
.document summary { cursor: pointer; color: #5fbbcd; font-size: .75rem; line-height: 1.9; }
.chunks { display: grid; gap: 15px; margin-top: 19px; }
.chunk { padding: 14px 16px; border-left: 2px solid #315e73; background: #0b1b2b; }
.chunk .locator { color: #89a4bc; font-size: .6875rem; margin-bottom: 9px; }
.chunk .preline { color: #7b9db6; font-size: .875rem; }
.retrieval-section { margin-top: 28px; padding: 21px 24px; border: 1px solid #254359; border-radius: 8px; background: #0d2030; }
.retrieval-section > summary { cursor: pointer; color: #93c5d6; font-size: .875rem; font-weight: 550; line-height: 1.9; }
.retrieval-section > summary span { margin-left: 17px; color: #89a4bc; font-size: .6875rem; font-weight: 400; }
.retrieval-section[open] > summary { margin-bottom: 28px; }
.retrieval-section .page-title h1 { font-size: 1.35rem; }
.retrieval-section .page-title p { font-size: .8125rem; }
.assistant-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 21px; align-items: start; }
.assistant-box { padding: 25px; }
.assistant-box textarea { min-height: 100px; }
.assistant-mode { display: flex; gap: 8px; margin: 17px 0; }
.mode-radio { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mode-label { padding: 8px 14px; border: 1px solid #2b475b; border-radius: 5px; color: #6b94b1; font-size: .8125rem; cursor: pointer; }
.mode-radio:checked + .mode-label { background: #12343e; border-color: #89a4bc; color: #8adbe3; }
.mode-radio:focus-visible + .mode-label { outline: 2px solid var(--cyan); outline-offset: 3px; }
.assistant-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.model-state { color: #89a4bc; font-size: .75rem; line-height: 1.9; }
.model-state.good { color: #6bb6a2; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.suggestion { padding: 7px 10px; border: 1px solid #254256; border-radius: 4px; color: #6a9bb5; background: #102637; font-size: .6875rem; line-height: 1.85; text-align: left; }
.suggestion:hover { border-color: #89a4bc; color: #add8e7; }
.answer-area { margin-top: 23px; }
.answer-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 19px; }
.answer-head h3 { color: #a9cfe1; }
.answer-text { color: #a1c4da; font-size: 1rem; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.run-meta { display: flex; flex-wrap: wrap; gap: 15px; color: #89a4bc; font-size: .6875rem; line-height: 1.9; margin-top: 19px; }
.pending { display: flex; align-items: center; gap: 13px; padding: 25px 10px; color: #78a8c0; font-size: .875rem; }
.spinner { width: 16px; height: 16px; flex: none; border: 2px solid #264857; border-top-color: #64ceda; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eval-controls { display: flex; gap: 10px; margin-top: 15px; }
.eval-controls .select { min-height: 39px; width: 92px; font-size: .8125rem; padding: 8px; }
.eval-result { margin-top: 20px; }
.eval-summary { display: flex; align-items: baseline; gap: 11px; margin-bottom: 14px; }
.eval-summary strong { color: #71d4df; font-size: 1.8rem; font-weight: 500; }
.eval-case { padding: 15px 0; border-top: 1px solid #244256; }
.eval-case:first-child { border-top: 0; }
.eval-case h3 { color: #8db8d0; font-size: .875rem; }
.eval-case p { color: #89a4bc; font-size: .75rem; margin-top: 9px; }

/* Traceable runtime records */
.run-list { display: grid; gap: 13px; }
.run-row { border: 1px solid #233e52; border-radius: 8px; background: #101f2f; }
.run-row > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 20px 24px; list-style: none; cursor: pointer; }
.run-row > summary::-webkit-details-marker { display: none; }
.run-row > summary h3 { color: #a5c9de; font-size: .9375rem; font-weight: 550; overflow-wrap: anywhere; }
.run-row > summary p { color: #89a4bc; font-size: .6875rem; margin-top: 7px; }
.run-states { display: flex; align-items: center; justify-content: end; gap: 14px; flex-wrap: wrap; color: #89a4bc; font-size: .6875rem; }
.run-row[open] { border-color: #89a4bc; }
.run-detail { padding: 0 24px 24px; border-top: 1px solid #244154; }
.run-detail .answer-text { margin-top: 21px; font-size: .9375rem; }
.run-detail .eval-result { margin-top: 19px; }

/* Dialogs, notices and account access */
dialog { width: min(720px,calc(100vw - 36px)); max-height: 90dvh; margin: auto; padding: 0; border: 1px solid #36566c; border-radius: 11px; color: #b6d1e3; background: #101f2e; box-shadow: 0 25px 100px #00000066; }
dialog::backdrop { background: #030b14bb; backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 28px; border-bottom: 1px solid #284254; }
.modal-head h2 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #d9ebf8; font-size: 1.2rem; font-weight: 550; }
.modal-head .eyebrow { margin-bottom: 8px; font-size: .6875rem; }
.modal-close { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid #2b485d; border-radius: 6px; background: #182e41; color: #7098b2; font-size: 1.25rem; line-height: 1; }
.modal-close:hover { color: #cff3f7; border-color: #5f8ea2; }
.modal-body { padding: 26px 28px; }
.modal-actions { display: flex; align-items: center; justify-content: end; gap: 10px; padding-top: 7px; }
.modal-body .field textarea.large { min-height: 170px; }
.meta-intro { color: #648aa5; font-size: .8125rem; line-height: 1.9; margin-bottom: 22px; }
.score-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.score-grid .field label { font-size: .75rem; }
.score-total { color: #5c89a4; font-size: .8125rem; margin-bottom: 21px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translateX(-50%); max-width: calc(100vw - 30px); border: 1px solid #467986; border-radius: 7px; padding: 13px 22px; color: #c0edf1; background: #15343f; box-shadow: 0 10px 45px #00000044; font-size: .875rem; line-height: 1.8; }
.toast.error { border-color: #89a4bc; color: #f4c1c6; background: #4b3038; }
.login { display: grid; grid-template-columns: minmax(420px,1.1fr) 1fr; min-height: 100dvh; }
.login-story { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #081726; border-right: 1px solid #233b4e; padding: 45px clamp(35px,7vw,120px); }
.login-story::after { content: ""; position: absolute; inset: 140px -200px 50px auto; width: 520px; pointer-events: none; border: 1px solid #25465b66; border-radius: 50%; box-shadow: 0 0 0 65px #1d3a501e, 0 0 0 130px #1d3a5012; }
.login-story > * { position: relative; z-index: 1; }
.story-title { margin: 105px 0 35px; }
.story-title h1 { color: #e9f4ff; font-size: clamp(2.4rem,3.5vw,3.5rem); font-weight: 550; line-height: 1.28; letter-spacing: -.055em; }
.story-title p { color: #6d92ad; font-size: .9375rem; line-height: 2; max-width: 390px; margin-top: 27px; }
.story-process { display: grid; gap: 19px; margin-top: 18px; }
.story-step { display: flex; align-items: center; gap: 14px; color: #8fb7d1; font-size: .8125rem; line-height: 1.8; }
.story-step::before { content: ""; width: 7px; height: 7px; flex: none; border: 1px solid #60c5d3; border-radius: 1px; background: #183f4a; }
.login-foot { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-top: 55px; margin-top: auto; }
.login-foot small { color: #89a4bc; font-size: .6875rem; line-height: 1.9; }
.teacher-art { width: 100px; height: 126px; object-fit: contain; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 60px 38px; background: #0b1826; }
.login-card { width: 100%; max-width: 410px; }
.login-card h2 { color: #d8ebf9; font-size: 1.65rem; font-weight: 550; letter-spacing: -.035em; }
.login-card > p { margin: 13px 0 29px; color: #89a4bc; font-size: .875rem; }
.account-choices { display: flex; gap: 8px; margin-bottom: 27px; }
.account-choice { flex: 1; border: 1px solid #294457; border-radius: 6px; padding: 12px 9px; background: #102334; color: #638da7; font-size: .75rem; line-height: 1.9; }
.account-choice strong { display: block; color: #97bbd2; font-size: .875rem; font-weight: 550; }
.account-choice.active { background: #14343d; border-color: #89a4bc; color: #7ac5d3; }
.account-choice.active strong { color: #a5e8ed; }
.login-card .btn.primary { width: 100%; margin-top: 4px; }
.login-card .login-note { color: #89a4bc; font-size: .75rem; line-height: 1.95; margin-top: 24px; }
.login-card .culture-login { padding-top: 22px; border-top: 1px solid #1f3b50; margin-top: 25px; color: #6da3ba; font-size: .75rem; line-height: 1.95; }
.culture-login span { color: #89a4bc; font-size: .6875rem; }
.login-extra { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #203b4f; padding-top: 20px; margin-top: 25px; color: #89a4bc; font-size: .6875rem; line-height: 1.9; }
.mobile-brand { display: none; }

/* Current home composition and semantic scene markers. */
.mobile-tabbar, .chat-history-toggle { display: none; }

/* Primary actions stay comfortable to tap on a phone. */
@media (max-width: 700px) {
  #chat-send, #modal-submit, .hero-composer .btn { min-height: 44px; }
}
body.mobile-preview #chat-send,
body.mobile-preview #modal-submit,
body.mobile-preview .hero-composer .btn { min-height: 44px; }
.device-preview-link { display: flex; align-items: center; gap: 8px; margin: 0 12px 20px; color: #7ea9c0; font-size: .75rem; line-height: 1.8; text-decoration: none; }
.device-preview-link svg { width: 16px; height: 16px; color: #6cc3d1; }
.device-preview-link:hover { color: #bdeaf1; }
.workspace-header-eyebrow { font-size: .625rem; letter-spacing: .1em; color: #7da4bc; }
.home-hero { row-gap: 15px; padding: 0 0 22px; }
.hero-copy { padding: 0; position: relative; }
.hero-copy .eyebrow { font-size: .625rem; line-height: 1.7; margin-bottom: 15px; }
.hero-greeting { color: #8ba9be; font-size: .6875rem; line-height: 1.8; margin-bottom: 8px; }
.home-hero-title { font-size: clamp(2.8rem,3.55vw,3.5rem); line-height: 1.12; }
.hero-intro { margin-top: 14px; line-height: 1.8; }
.hero-course-chip { margin-top: 12px; padding: 4px 9px; }
.home-capability-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 15px; }
.home-capability-strip > span { display: inline-flex; align-items: center; gap: 6px; color: #86a6bc; font-size: .6875rem; line-height: 1.8; }
.home-capability-strip svg { width: 14px; height: 14px; color: #67b9ca; }
.intelligence-map { min-height: 285px; height: 285px; aspect-ratio: 1000 / 620; }
.map-guide { stroke: #35516c; stroke-width: 1; opacity: .35; }
.map-orbit { stroke: #275b70; stroke-width: 1.4; }
.map-signal { stroke: #59d6df; stroke-width: 1.7; stroke-dasharray: 32 360; opacity: .8; }
.map-anchor { fill: #142b3c; stroke: #5db6c5; stroke-width: 1.2; }
.map-node { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 4px; width: 148px; min-height: 72px; padding: 13px 14px; }
.map-node-symbol { grid-column: 1; grid-row: 1 / 3; display: grid; place-items: center; color: #70cfda; }
.map-node-symbol svg { width: 22px; height: 22px; }
.map-node-count { grid-column: 2; grid-row: 1; display: flex !important; align-items: baseline; gap: 3px; white-space: nowrap; font-size: 1.4rem; }
.map-node-count small { display: inline !important; margin: 0 !important; font-size: .6875rem; color: #88aabd; }
.map-node-label { grid-column: 2; grid-row: 2; white-space: nowrap; font-size: .6875rem; line-height: 1.7; color: #8ab2c7; }
.map-caption { position: absolute; right: 0; bottom: 4px; color: #698ca5; font-size: .6875rem; letter-spacing: .04em; }
.hero-composer { padding: 17px 21px 14px; }
.hero-composer textarea { min-height: 49px; }
.hero-composer-foot { margin-top: 7px; }
.home-suggestions { margin-top: -6px; }
.home-suggestions > span { color: #6f94ad; font-size: .6875rem; margin-right: 4px; }
.role-entries { margin-bottom: 21px; }
.app-scene-badge { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #294b60; border-radius: 4px; padding: 3px 7px; color: #83b8cc; background: #112c3c; font-size: .6875rem; line-height: 1.6; }
.app-card-top .app-scene-badge { margin-left: auto; color: #80b7cd !important; }
.app-example { font-size: .8125rem; }
.app-card-description { font-size: .875rem; }

/* Intermediate widths: keep usable work surfaces, not miniature cards. */
@media (min-width: 1650px) {
  .page { padding-left: 48px; padding-right: 48px; }
  .home-hero { grid-template-columns: minmax(0,1.15fr) minmax(380px,.85fr); row-gap: 25px; }
  .home-hero-title { font-size: 3.5rem; }
  .home-app-grid .app-card { padding: 24px; }
  .home-app-grid .app-card > strong { font-size: 1rem; }
  .home-app-grid .app-card-description { font-size: .8125rem; }
}
@media (max-width: 1250px) {
  .page { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .home-hero { grid-template-columns: minmax(0,1.12fr) minmax(300px,.88fr); gap: 20px; }
  .home-hero-title { font-size: 2.8rem; }
  .intelligence-map { height: 255px; }
  .map-node { width: 137px; min-height: 65px; padding: 12px; gap: 10px; }
  .home-app-grid, .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .artifact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-app-grid .app-card { padding: 22px; }
  .home-app-grid .app-card > strong { font-size: 1rem; }
  .home-app-grid .app-card-description { font-size: .8125rem; }
  .home-stats button { padding-left: 18px; padding-right: 18px; }
  .role-entries { gap: 10px; }
  .role-entries button { padding: 16px 13px; gap: 10px; }
  .role-icon { width: 31px; height: 34px; }
  .role-entries small { font-size: .6875rem; }
  .flow-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-main { grid-template-columns: minmax(0,1fr) 230px; gap: 18px; }
  .assistant-layout { grid-template-columns: minmax(0,1fr) 230px; gap: 18px; }
  .course-symbol { display: none; }
  .task-foot { align-items: start; flex-direction: column; }
  .chat-layout { grid-template-columns: 185px minmax(0,1fr); }
  .chat-toolbar { padding: 16px 19px; }
  .chat-feed { padding: 25px 22px; }
  .chat-toolbar .model-state { max-width: 125px; }
  .doc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1199px) {
  .home-app-grid, .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home-app-grid .app-card { padding: 18px; }
  .home-app-grid .app-card-description { font-size: .8125rem; }
}
@media (max-width: 1000px) {
  :root { --sidebar-width: 184px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .sidebar .brand { padding: 0 3px; gap: 8px; }
  .sidebar .brand img { width: 31px; height: 31px; }
  .sidebar .brand strong { font-size: .9375rem; }
  .sidebar .brand span { font-size: .6875rem; }
  .nav button { gap: 10px; font-size: .75rem; padding: 10px 12px; }
  .sidebar-label { margin-left: 12px; }
  .side-culture { margin-left: 11px; margin-right: 11px; }
  .page { padding: 23px; }
  .topbar { padding: 0 23px; }
  .topbar-title > span:first-child, .topbar-title .sep { display: none; }
  .home-hero { grid-template-columns: minmax(0,1fr); gap: 21px; }
  .hero-copy { padding: 8px 0 0; }
  .home-hero-title { font-size: 3rem; }
  .hero-intro { max-width: 100%; }
  .intelligence-map { display: none; }
  .hero-composer { margin-top: 0; }
  .home-stats { margin-top: 5px; }
  .home-stats button { padding: 2px 13px; gap: 8px; }
  .home-stats button > span { font-size: .6875rem; }
  .home-stats strong { font-size: 1.25rem; }
  .role-entries { grid-template-columns: 1fr; gap: 8px; margin-bottom: 28px; }
  .home-app-grid, .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .role-entries button { padding: 13px 16px; }
  .role-entries small { display: inline; margin-left: 12px; font-size: .6875rem; }
  .role-icon { width: 29px; height: 31px; }
  .home-lower { grid-template-columns: 1fr; }
  .apps-tools { align-items: start; flex-direction: column; gap: 15px; }
  .app-search { width: 100%; }
  .grid-main, .assistant-layout { grid-template-columns: 1fr; }
  .aside-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
  .aside-stack .section-gap { margin-top: 0; }
  .assistant-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
  .assistant-aside .section-gap { margin-top: 0; }
  .chat-workspace .page { padding: 20px; }
  .chat-layout { grid-template-columns: 162px minmax(0,1fr); }
  .chat-history { padding: 16px 9px 13px; }
  .history-item { padding: 11px 8px; }
  .chat-toolbar .model-state { display: none; }
  .chat-app-title strong { max-width: 295px; }
  .chat-feed { padding: 21px 16px; }
  .chat-composer { margin: 0 17px; }
  .message { gap: 10px; }
  .message-avatar { width: 28px; height: 29px; }
  .message-footer { flex-wrap: wrap; gap: 5px; }
  .login-story { padding: 35px 32px; }
  .story-title { margin-top: 80px; }
  .story-title h1 { font-size: 2.5rem; }
}

/* Mobile: horizontal navigation and an independent message scroll region. */
@media (max-width: 700px) {
  html { min-width: 320px; }
  .shell { display: block; padding-bottom: calc(77px + env(safe-area-inset-bottom,0px)); }
  .sidebar { display: none; }
  .sidebar .brand { gap: 8px; padding: 0; }
  .sidebar .brand img { width: 29px; height: 29px; }
  .sidebar .brand strong { font-size: 1rem; }
  .sidebar .brand span { display: block; font-size: .6875rem; }
  .brand-signal { width: 4px; height: 4px; }
  .sidebar-label, .side-culture, .side-course-note, .side-footer { display: none; }
  .nav { display: flex; gap: 3px; margin-top: 17px; padding-bottom: 2px; overflow-x: auto; }
  .nav button { flex: none; min-height: 34px; padding: 7px 10px; font-size: .6875rem; gap: 6px; white-space: nowrap; border-radius: 4px; }
  .nav-mark { display: inline-flex; width: 14px; height: 14px; }
  .nav-mark svg { width: 13px; height: 13px; }
  .topbar { height: 62px; padding: 0 17px; gap: 10px; background: #071522; border-bottom: 1px solid #244052; position: sticky; top: 0; z-index: 20; }
  .topbar-title { display: none; }
  .topbar-title .context-name { display: block; }
  .topbar-title .pill { font-size: .6875rem; padding: 1px 5px; }
  .workspace-header-eyebrow { display: none; }
  .topbar-ip { display: block; width: 24px; height: 31px; object-fit: contain; }
  .avatar { display: none; }
  .account { gap: 7px; }
  .account-name { font-size: .6875rem; }
  .account-role { display: none; }
  .account .btn { font-size: .625rem; padding: 5px; min-height: 31px; margin-left: 0; }
  .page { padding: 17px 15px 24px; }
  .coursebar { flex-wrap: wrap; gap: 9px; margin-bottom: 21px; }
  .course-switch { width: 100%; }
  .course-switch label { display: none; }
  .course-switch select { width: 100%; min-width: 0; font-size: .6875rem; min-height: 36px; }
  .coursebar > .actions { margin: 0; gap: 8px; }
  .coursebar > .actions .btn { min-height: 28px; padding: 5px 9px; font-size: .625rem; }
  .page-title { align-items: start; margin-bottom: 23px; gap: 15px; }
  .page-title h1 { font-size: 1.55rem; }
  .page-title p { font-size: .8125rem; margin-top: 7px; }
  .page-title .btn { min-height: 34px; font-size: .6875rem; padding: 7px 11px; }
  .page-title .actions { justify-content: end; gap: 7px; }
  .page-title .actions .btn { font-size: .6875rem; padding: 6px 8px; }
  .home-hero { display: grid; grid-template-columns: minmax(0,1fr); padding: 0 0 21px; gap: 17px; }
  .hero-copy { padding: 3px 0 0; }
  .hero-copy .eyebrow { display: none; }
  .home-hero-title { font-size: 2.25rem; font-weight: 550; letter-spacing: -.05em; line-height: 1.2; }
  .hero-intro { font-size: .8125rem; margin-top: 12px; line-height: 1.8; }
  .hero-course-chip { margin-top: 12px; font-size: .625rem; padding: 4px 8px; }
  .hero-composer { padding: 17px 15px 13px; border-radius: 9px; margin: 1px 0 0; }
  .hero-composer textarea { font-size: .8125rem; min-height: 83px; line-height: 1.9; }
  .hero-composer-foot { gap: 12px; margin-top: 10px; }
  .hero-composer-foot > span { max-width: 125px; font-size: .6875rem; line-height: 1.9; }
  .hero-composer-foot .btn { min-height: 35px; padding: 8px 12px; gap: 11px; font-size: .6875rem; }
  .home-suggestions { gap: 3px; margin-top: -6px; }
  .home-suggestions button { font-size: .625rem; gap: 4px; padding: 5px 7px; }
  .home-suggestions svg { width: 11px; height: 11px; }
  .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 17px; padding: 18px 0; margin: 4px 0 22px; }
  .home-stats button { padding: 0 18px; }
  .home-stats button:nth-child(2) { border-right: 0; padding-right: 0; }
  .home-stats button:nth-child(3) { padding-left: 0; }
  .home-stats button > span { font-size: .6875rem; }
  .home-stats strong { font-size: 1.3rem; }
  .home-stats small { font-size: .6875rem; }
  .role-entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 20px; }
  .role-entries button { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 13px 10px; gap: 9px; }
  .role-entries strong { font-size: .75rem; white-space: nowrap; }
  .role-entries small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 5px 0 0; color: #7b9fb6; font-size: .625rem; line-height: 1.75; }
  .role-icon { width: 29px; height: 30px; border-radius: 5px; }
  .role-icon svg { width: 17px; height: 17px; }
  .section-top { align-items: start; gap: 15px; margin-bottom: 14px; }
  .section-top h2 { font-size: 1rem; }
  .section-top p { font-size: .6875rem; }
  .section-top .text-button { font-size: .6875rem; white-space: nowrap; }
  .category-quick { gap: 6px; margin: 17px 0 16px; }
  .category-quick button { gap: 6px; padding: 6px 8px; font-size: .6875rem; }
  .category-quick svg { width: 12px; height: 12px; }
  
  .app-card, .home-app-grid .app-card { padding: 15px 13px; border-radius: 8px; }
  .app-card-top, .home-app-grid .app-card-top { gap: 6px; margin-bottom: 13px; flex-wrap: wrap; }
  .app-card > strong, .home-app-grid .app-card > strong { font-size: .875rem; line-height: 1.65; }
  .app-card-description, .home-app-grid .app-card-description { min-height: 46px; font-size: .8125rem; line-height: 1.8; margin-top: 6px; }
  .app-example, .home-app-grid .app-example { min-height: 56px; margin-top: 13px; padding: 8px; font-size: .75rem; line-height: 1.8; }
  .app-outcome, .home-app-grid .app-outcome { margin-top: 13px; padding-top: 12px; font-size: .75rem; line-height: 1.8; }
  .app-launch-label { margin-top: 13px; font-size: .6875rem; }
  .home-lower { grid-template-columns: minmax(0,1fr); gap: 17px; margin-top: 24px; }
  .home-items { padding: 0 19px; }
  .home-item { padding: 17px 0; gap: 11px; }
  .home-item strong { font-size: .75rem; max-width: 235px; }
  .home-item small { font-size: .6875rem; }
  .home-culture { font-size: .6875rem; letter-spacing: .02em; line-height: 2; margin-top: 26px; }
  .catalog-count { max-width: 105px; font-size: .6875rem; white-space: normal; line-height: 1.9; text-align: right; }
  .role-tabs { gap: 3px; padding-bottom: 13px; margin-bottom: 17px; }
  .role-tabs button { padding: 8px 9px; font-size: .6875rem; }
  .category-tabs { gap: 3px; }
  .category-tabs button { padding: 6px 8px; font-size: .6875rem; }
  .apps-tools { display: flex; flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 21px; }
  .app-search { width: 100%; padding: 10px 11px; }
  .app-search input { font-size: .75rem; }
  .management-flows { margin: 23px 0; }
  .flow-grid { gap: 10px; }
  .flow-grid button { display: block; padding: 17px 15px; }
  .flow-grid button > span { display: inline-block; vertical-align: middle; margin-right: 8px; }
  .flow-grid strong { display: inline-block; font-size: .75rem; }
  .flow-grid small, .flow-grid em { display: block; font-size: .6875rem; margin-top: 9px; }
  .app-footnote { font-size: .6875rem; margin-top: 22px; line-height: 1.95; }
  .brand-footer { margin-top: 24px; }
  .brand-footer img { width: 56px; height: 56px; }
  .brand-footer a { font-size: .6875rem; }
  .brand-footer small { font-size: .6875rem; }
  .chat-workspace .page { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 12px 10px 10px; }
  .chat-workspace .coursebar { flex: none; margin-bottom: 12px; }
  .chat-layout { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; border-radius: 8px; }
  .chat-history { display: none; }
  .new-chat { width: auto; min-height: 35px; flex: none; gap: 5px; padding: 7px 10px; font-size: .6875rem; }
  .new-chat > span { font-size: .875rem; }
  .new-chat svg { width: 13px; height: 13px; }
  .history-heading, .history-note { display: none; }
  .history-list { display: flex; align-items: center; gap: 4px; height: 100%; overflow: auto; }
  .history-item { width: 135px; flex: none; margin: 0; padding: 8px; }
  .history-item strong { font-size: .6875rem; }
  .history-item span { display: none; }
  .history-empty { white-space: nowrap; font-size: .6875rem; margin: 0 5px; }
  .chat-main { flex: 1; min-height: 0; }
  .chat-toolbar { flex: none; padding: 11px 12px; gap: 9px; }
  .chat-toolbar .app-icon { width: 29px; height: 30px; }
  .chat-toolbar .app-icon svg { width: 16px; height: 16px; }
  .chat-app-title { flex: 1; gap: 8px; min-width: 0; }
  .chat-app-title strong { max-width: 240px; font-size: .75rem; }
  .chat-app-title > div > span { font-size: .6875rem; }
  .chat-feed { padding: 21px 12px; }
  .chat-welcome { min-height: 210px; padding: 23px 10px; }
  .welcome-symbol { font-size: 2.3rem; margin-bottom: 17px; }
  .welcome-symbol svg { width: 35px; height: 35px; }
  .chat-welcome h2 { font-size: 1.08rem; }
  .chat-welcome > p { font-size: .75rem; line-height: 1.95; margin-top: 10px; }
  .welcome-ideas { gap: 5px; margin-top: 21px; }
  .welcome-ideas button { padding: 8px 9px; font-size: .6875rem; }
  .welcome-ideas > span { font-size: .6875rem; }
  .chat-composer { margin: 0 9px; padding: 13px 12px 10px; }
  .chat-composer textarea { min-height: 49px; max-height: 95px; font-size: 1rem; line-height: 1.8; }
  .chat-composer-foot { margin-top: 9px; gap: 12px; }
  .chat-composer-foot > span { font-size: .6875rem; }
  .chat-composer-foot .btn { min-height: 32px; font-size: .6875rem; padding: 7px 12px; gap: 13px; }
  .chat-disclaimer { font-size: .5625rem; margin: 8px 10px 9px; line-height: 1.75; }
  .message { gap: 9px; margin-bottom: 26px; }
  .message-avatar { width: 24px; height: 25px; font-size: .6875rem; border-radius: 5px; }
  .ai-avatar svg { width: 15px; height: 15px; }
  .message-label { font-size: .6875rem; margin-top: 3px; margin-bottom: 11px; gap: 8px; }
  .message-label time { font-size: .6875rem; }
  .user-content { font-size: .9375rem; padding: 12px 14px; }
  .markdown { font-size: .9375rem; }
  .markdown h3 { font-size: 1rem; }
  .markdown code { font-size: .75rem; }
  .codeblock pre { padding: 14px; }
  .codeblock pre code { font-size: .6875rem; }
  .message-footer > span { font-size: .6875rem; }
  .message-footer .text-button { font-size: .6875rem; }
  .message .evidence { padding: 10px 11px; }
  .message .evidence summary { font-size: .6875rem; }
  .message .evidence .preline { font-size: .75rem; }
  .chat-error { padding: 13px; font-size: .75rem; }
  .chat-error p { font-size: .75rem; }
  .artifact-card { padding: 22px; }
  .artifact-open h3 { font-size: 1rem; }
  .artifact-open p { min-height: 0; font-size: .8125rem; }
  .artifact-foot { margin-top: 21px; }
  .course-banner { padding: 23px; }
  .course-banner h2 { font-size: 1.2rem; }
  .course-banner .intro { font-size: .8125rem; }
  .culture-note { font-size: .6875rem; gap: 4px; margin-bottom: 21px; }
  .culture-note > span { width: 100%; }
  .task-card, .submitted, .panel-inner, .assistant-box { padding: 22px; }
  .task-top { gap: 10px; }
  .task-top h3 { font-size: 1rem; }
  .task-top .pill { font-size: .6875rem; }
  .task-card .brief { font-size: .8125rem; margin-top: 14px; }
  .task-foot { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 19px; padding-top: 16px; }
  .task-meta { font-size: .6875rem; }
  .task-buttons .btn { font-size: .6875rem; min-height: 33px; padding: 7px 9px; }
  .aside-stack, .assistant-aside { grid-template-columns: 1fr; }
  .aside-card { padding: 22px; }
  .submission-head { gap: 12px; }
  .submission-head h3 { font-size: .9375rem; }
  .submission-head > div > p { font-size: .6875rem; }
  .submission-head > .btn { font-size: .6875rem; padding: 7px 10px; min-height: 33px; }
  .submission-content { grid-template-columns: 1fr; gap: 20px; margin-top: 21px; }
  .submission-content h4 { font-size: .6875rem; }
  .submission-content p { font-size: .8125rem; }
  .grade { padding: 18px; }
  .grade .preline { font-size: .8125rem; }
  .grade .tagrow .small { font-size: .6875rem; }
  .grade small { font-size: .6875rem; }
  .filterbar { flex-direction: column; align-items: start; gap: 13px; }
  .filterbar .small { font-size: .75rem; }
  .filterbar .select { min-height: 38px; font-size: .75rem; }
  .document { padding: 22px; }
  .document h3 { font-size: .9375rem; }
  .chunk { padding: 12px 14px; }
  .chunk .preline { font-size: .8125rem; }
  .retrieval-section { padding: 20px; }
  .retrieval-section > summary { font-size: .8125rem; }
  .retrieval-section > summary span { display: block; margin: 0; font-size: .6875rem; }
  .retrieval-section .page-title h1 { font-size: 1.2rem; }
  .retrieval-section .page-title p { font-size: .75rem; }
  .retrieval-section .assistant-box { padding: 19px; }
  .assistant-bottom { flex-direction: column; align-items: start; gap: 15px; }
  .assistant-bottom > .btn { width: 100%; }
  .assistant-mode { gap: 7px; }
  .mode-label { font-size: .75rem; padding: 8px 11px; }
  .answer-text { font-size: .9375rem; }
  .answer-head h3 { font-size: 1rem; }
  .run-row > summary { grid-template-columns: 1fr; padding: 19px 21px; gap: 13px; }
  .run-states { justify-content: start; gap: 12px; }
  .run-row > summary h3 { font-size: .875rem; }
  .run-detail { padding: 0 21px 21px; }
  .run-detail .answer-text { font-size: .875rem; }
  .panel-head { padding: 19px 21px; }
  .panel-head h2 { font-size: .9375rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field label, .field-label { font-size: .8125rem; }
  .field input, .field textarea, .field select, .select { font-size: .875rem; }
  .field input[type="file"] { font-size: .6875rem; }
  dialog { width: calc(100vw - 28px); border-radius: 8px; max-height: 91dvh; }
  .modal-head { padding: 21px 22px; }
  .modal-head h2 { font-size: 1.1rem; }
  .modal-body { padding: 22px; }
  .modal-actions { gap: 8px; }
  .modal-actions .btn { font-size: .75rem; padding: 8px 12px; }
  .score-grid { gap: 10px; }
  .score-grid .field label { font-size: .6875rem; }
  .meta-intro { font-size: .75rem; }
  .toast { bottom: 19px; font-size: .8125rem; padding: 12px 18px; }
  .login { grid-template-columns: 1fr; }
  .login-story { padding: 29px 27px 31px; border-right: 0; border-bottom: 1px solid #2c475b; }
  .login-story::after { inset: 20px -110px -170px auto; width: 300px; }
  .story-title { margin: 39px 0 0; }
  .story-title h1 { font-size: 2.3rem; line-height: 1.25; }
  .story-title p { font-size: .8125rem; margin-top: 18px; max-width: 330px; }
  .story-process, .login-foot { display: none; }
  .login-form-side { padding: 38px 27px; }
  .login-card h2 { font-size: 1.4rem; }
  .login-card > p { font-size: .8125rem; margin-top: 13px; }
  .account-choice { padding: 12px 8px; font-size: .6875rem; }
  .account-choice strong { font-size: .8125rem; }
  .account-choices { gap: 7px; }
  .login-card .login-note { font-size: .6875rem; }
  .login-card .culture-login { font-size: .6875rem; }
  .culture-login span { font-size: .6875rem; }
  .login-extra { font-size: .6875rem; }

  .mobile-brand { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: #e2f2ff; text-align: left; }

  .mobile-brand img { width: 28px; height: 28px; object-fit: contain; background: #fff; padding: 1px; border-radius: 5px; }

  .mobile-brand > span { font-size: .875rem; font-weight: 600; line-height: 1.35; }

  .mobile-brand small { display: block; color: #6f99b2; font-size: .5625rem; font-weight: 400; margin-top: 3px; }

  .mobile-tabbar { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; z-index: 30; inset: auto 0 0; padding: 8px 9px calc(9px + env(safe-area-inset-bottom,0px)); min-height: 69px; border-top: 1px solid #2b465b; background: #0b1b2b; box-shadow: 0 -8px 20px #030b1520; }

  .mobile-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 43px; padding: 4px 3px; border: 0; border-radius: 6px; background: transparent; color: #779bb5; font-size: .6875rem; line-height: 1.5; }

  .mobile-tabbar button svg { width: 21px; height: 21px; }

  .mobile-tabbar button.active { color: #7de3e9; background: #12323e; }

  .hero-greeting { font-size: .6875rem; margin-bottom: 6px; color: #8daec3; }

  .home-capability-strip { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 14px; }

  .home-capability-strip > span { display: inline-flex; align-items: center; gap: 5px; font-size: .625rem; color: #8babbe; }

  .home-capability-strip svg { width: 13px; height: 13px; }

  .home-suggestions > span { font-size: .625rem; margin-right: 3px; }

  .role-entries .item-arrow { display: none; }

  .app-grid, .catalog-grid, .home-app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }

  .app-icon, .home-app-grid .app-icon { width: 32px; height: 33px; border-radius: 6px; }

  .app-icon svg, .home-app-grid .app-icon svg { width: 19px; height: 19px; }

  .app-card-top > span:not(.app-icon):not(.app-card-arrow) { font-size: .5625rem; line-height: 1.6; }

  .app-card-top .app-scene-badge { font-size: .5625rem; padding: 2px 4px; margin-left: 0; }

  .view-assistant { height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(69px + env(safe-area-inset-bottom,0px)); overflow: hidden; }

  .view-assistant > .workspace { height: 100%; min-height: 0; display: flex; flex-direction: column; }

  .chat-workspace .topbar { position: static; flex: none; }

  .chat-workspace .coursebar > .actions { display: none; }

  .chat-workspace #page-content { flex: 1; min-height: 0; }

  .chat-workspace .brand-footer { display: none; }

  .chat-history-toggle { display: grid; place-items: center; width: 31px; height: 32px; padding: 0; border: 1px solid #2c5267; border-radius: 5px; background: #163245; color: #8bbdd2; flex: none; }

  .chat-history-toggle svg { width: 18px; height: 18px; }

  .chat-layout.history-mobile-open .chat-history { display: flex; flex-direction: column; position: absolute; z-index: 12; top: 51px; left: 7px; bottom: 7px; width: min(260px,calc(100% - 21px)); height: auto; padding: 17px 12px; border: 1px solid #3c647a; border-radius: 8px; background: #0b1c2b; box-shadow: 20px 0 50px #00000055; }

  .chat-layout.history-mobile-open .history-heading { display: flex; margin: 23px 10px 10px; }

  .chat-layout.history-mobile-open .history-list { display: block; overflow-y: auto; height: auto; flex: 1; }

  .chat-layout.history-mobile-open .history-item { display: block; width: 100%; margin: 0 0 5px; padding: 11px 9px; }

  .chat-layout.history-mobile-open .history-item strong { font-size: .75rem; }

  .chat-layout.history-mobile-open .history-item span { display: block; font-size: .625rem; }

  .chat-layout.history-mobile-open .history-note { display: block; color: #779db6; }

  .chat-layout.history-mobile-open .history-empty { white-space: normal; font-size: .75rem; margin: 16px 10px; }


  .intelligence-map { display: none; }

  .doc-grid { grid-template-columns: minmax(0,1fr); }

  .grid-main, .assistant-layout { grid-template-columns: minmax(0,1fr); }

  .course-symbol { display: none; }

  .chat-toolbar .model-state { display: none; }

}

/* Identical phone rules for the controlled desktop preview. */

body.mobile-preview { min-width: 320px; }
body.mobile-preview .shell { display: block; padding-bottom: calc(77px + env(safe-area-inset-bottom,0px)); }
body.mobile-preview .sidebar { display: none; }
body.mobile-preview .sidebar .brand { gap: 8px; padding: 0; }
body.mobile-preview .sidebar .brand img { width: 29px; height: 29px; }
body.mobile-preview .sidebar .brand strong { font-size: 1rem; }
body.mobile-preview .sidebar .brand span { display: block; font-size: .6875rem; }
body.mobile-preview .brand-signal { width: 4px; height: 4px; }
body.mobile-preview .sidebar-label, body.mobile-preview .side-culture, body.mobile-preview .side-course-note, body.mobile-preview .side-footer { display: none; }
body.mobile-preview .nav { display: flex; gap: 3px; margin-top: 17px; padding-bottom: 2px; overflow-x: auto; }
body.mobile-preview .nav button { flex: none; min-height: 34px; padding: 7px 10px; font-size: .6875rem; gap: 6px; white-space: nowrap; border-radius: 4px; }
body.mobile-preview .nav-mark { display: inline-flex; width: 14px; height: 14px; }
body.mobile-preview .nav-mark svg { width: 13px; height: 13px; }
body.mobile-preview .topbar { height: 62px; padding: 0 17px; gap: 10px; background: #071522; border-bottom: 1px solid #244052; position: sticky; top: 0; z-index: 20; }
body.mobile-preview .topbar-title { display: none; }
body.mobile-preview .topbar-title .context-name { display: block; }
body.mobile-preview .topbar-title .pill { font-size: .6875rem; padding: 1px 5px; }
body.mobile-preview .workspace-header-eyebrow { display: none; }
body.mobile-preview .topbar-ip { display: block; width: 24px; height: 31px; object-fit: contain; }
body.mobile-preview .avatar { display: none; }
body.mobile-preview .account { gap: 7px; }
body.mobile-preview .account-name { font-size: .6875rem; }
body.mobile-preview .account-role { display: none; }
body.mobile-preview .account .btn { font-size: .625rem; padding: 5px; min-height: 31px; margin-left: 0; }
body.mobile-preview .page { padding: 17px 15px 24px; }
body.mobile-preview .coursebar { flex-wrap: wrap; gap: 9px; margin-bottom: 21px; }
body.mobile-preview .course-switch { width: 100%; }
body.mobile-preview .course-switch label { display: none; }
body.mobile-preview .course-switch select { width: 100%; min-width: 0; font-size: .6875rem; min-height: 36px; }
body.mobile-preview .coursebar > .actions { margin: 0; gap: 8px; }
body.mobile-preview .coursebar > .actions .btn { min-height: 28px; padding: 5px 9px; font-size: .625rem; }
body.mobile-preview .page-title { align-items: start; margin-bottom: 23px; gap: 15px; }
body.mobile-preview .page-title h1 { font-size: 1.55rem; }
body.mobile-preview .page-title p { font-size: .8125rem; margin-top: 7px; }
body.mobile-preview .page-title .btn { min-height: 34px; font-size: .6875rem; padding: 7px 11px; }
body.mobile-preview .page-title .actions { justify-content: end; gap: 7px; }
body.mobile-preview .page-title .actions .btn { font-size: .6875rem; padding: 6px 8px; }
body.mobile-preview .home-hero { display: grid; grid-template-columns: minmax(0,1fr); padding: 0 0 21px; gap: 17px; }
body.mobile-preview .hero-copy { padding: 3px 0 0; }
body.mobile-preview .hero-copy .eyebrow { display: none; }
body.mobile-preview .home-hero-title { font-size: 2.25rem; font-weight: 550; letter-spacing: -.05em; line-height: 1.2; }
body.mobile-preview .hero-intro { font-size: .8125rem; margin-top: 12px; line-height: 1.8; }
body.mobile-preview .hero-course-chip { margin-top: 12px; font-size: .625rem; padding: 4px 8px; }
body.mobile-preview .hero-composer { padding: 17px 15px 13px; border-radius: 9px; margin: 1px 0 0; }
body.mobile-preview .hero-composer textarea { font-size: .8125rem; min-height: 83px; line-height: 1.9; }
body.mobile-preview .hero-composer-foot { gap: 12px; margin-top: 10px; }
body.mobile-preview .hero-composer-foot > span { max-width: 125px; font-size: .6875rem; line-height: 1.9; }
body.mobile-preview .hero-composer-foot .btn { min-height: 35px; padding: 8px 12px; gap: 11px; font-size: .6875rem; }
body.mobile-preview .home-suggestions { gap: 3px; margin-top: -6px; }
body.mobile-preview .home-suggestions button { font-size: .625rem; gap: 4px; padding: 5px 7px; }
body.mobile-preview .home-suggestions svg { width: 11px; height: 11px; }
body.mobile-preview .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 17px; padding: 18px 0; margin: 4px 0 22px; }
body.mobile-preview .home-stats button { padding: 0 18px; }
body.mobile-preview .home-stats button:nth-child(2) { border-right: 0; padding-right: 0; }
body.mobile-preview .home-stats button:nth-child(3) { padding-left: 0; }
body.mobile-preview .home-stats button > span { font-size: .6875rem; }
body.mobile-preview .home-stats strong { font-size: 1.3rem; }
body.mobile-preview .home-stats small { font-size: .6875rem; }
body.mobile-preview .role-entries { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 20px; }
body.mobile-preview .role-entries button { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 13px 10px; gap: 9px; }
body.mobile-preview .role-entries strong { font-size: .75rem; white-space: nowrap; }
body.mobile-preview .role-entries small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 5px 0 0; color: #7b9fb6; font-size: .625rem; line-height: 1.75; }
body.mobile-preview .role-icon { width: 29px; height: 30px; border-radius: 5px; }
body.mobile-preview .role-icon svg { width: 17px; height: 17px; }
body.mobile-preview .section-top { align-items: start; gap: 15px; margin-bottom: 14px; }
body.mobile-preview .section-top h2 { font-size: 1rem; }
body.mobile-preview .section-top p { font-size: .6875rem; }
body.mobile-preview .section-top .text-button { font-size: .6875rem; white-space: nowrap; }
body.mobile-preview .category-quick { gap: 6px; margin: 17px 0 16px; }
body.mobile-preview .category-quick button { gap: 6px; padding: 6px 8px; font-size: .6875rem; }
body.mobile-preview .category-quick svg { width: 12px; height: 12px; }
body.mobile-preview .app-card, body.mobile-preview .home-app-grid .app-card { padding: 15px 13px; border-radius: 8px; }
body.mobile-preview .app-card-top, body.mobile-preview .home-app-grid .app-card-top { gap: 6px; margin-bottom: 13px; flex-wrap: wrap; }
body.mobile-preview .app-card > strong, body.mobile-preview .home-app-grid .app-card > strong { font-size: .875rem; line-height: 1.65; }
body.mobile-preview .app-card-description, body.mobile-preview .home-app-grid .app-card-description { min-height: 46px; font-size: .8125rem; line-height: 1.8; margin-top: 6px; }
body.mobile-preview .app-example, body.mobile-preview .home-app-grid .app-example { min-height: 56px; margin-top: 13px; padding: 8px; font-size: .75rem; line-height: 1.8; }
body.mobile-preview .app-outcome, body.mobile-preview .home-app-grid .app-outcome { margin-top: 13px; padding-top: 12px; font-size: .75rem; line-height: 1.8; }
body.mobile-preview .app-launch-label { margin-top: 13px; font-size: .6875rem; }
body.mobile-preview .home-lower { grid-template-columns: minmax(0,1fr); gap: 17px; margin-top: 24px; }
body.mobile-preview .home-items { padding: 0 19px; }
body.mobile-preview .home-item { padding: 17px 0; gap: 11px; }
body.mobile-preview .home-item strong { font-size: .75rem; max-width: 235px; }
body.mobile-preview .home-item small { font-size: .6875rem; }
body.mobile-preview .home-culture { font-size: .6875rem; letter-spacing: .02em; line-height: 2; margin-top: 26px; }
body.mobile-preview .catalog-count { max-width: 105px; font-size: .6875rem; white-space: normal; line-height: 1.9; text-align: right; }
body.mobile-preview .role-tabs { gap: 3px; padding-bottom: 13px; margin-bottom: 17px; }
body.mobile-preview .role-tabs button { padding: 8px 9px; font-size: .6875rem; }
body.mobile-preview .category-tabs { gap: 3px; }
body.mobile-preview .category-tabs button { padding: 6px 8px; font-size: .6875rem; }
body.mobile-preview .apps-tools { display: flex; flex-direction: column; align-items: stretch; gap: 15px; margin-bottom: 21px; }
body.mobile-preview .app-search { width: 100%; padding: 10px 11px; }
body.mobile-preview .app-search input { font-size: .75rem; }
body.mobile-preview .management-flows { margin: 23px 0; }
body.mobile-preview .flow-grid { gap: 10px; }
body.mobile-preview .flow-grid button { display: block; padding: 17px 15px; }
body.mobile-preview .flow-grid button > span { display: inline-block; vertical-align: middle; margin-right: 8px; }
body.mobile-preview .flow-grid strong { display: inline-block; font-size: .75rem; }
body.mobile-preview .flow-grid small, body.mobile-preview .flow-grid em { display: block; font-size: .6875rem; margin-top: 9px; }
body.mobile-preview .app-footnote { font-size: .6875rem; margin-top: 22px; line-height: 1.95; }
body.mobile-preview .brand-footer { margin-top: 24px; }
body.mobile-preview .brand-footer img { width: 56px; height: 56px; }
body.mobile-preview .brand-footer a { font-size: .6875rem; }
body.mobile-preview .brand-footer small { font-size: .6875rem; }
body.mobile-preview .chat-workspace .page { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 12px 10px 10px; }
body.mobile-preview .chat-workspace .coursebar { flex: none; margin-bottom: 12px; }
body.mobile-preview .chat-layout { position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; border-radius: 8px; }
body.mobile-preview .chat-history { display: none; }
body.mobile-preview .new-chat { width: auto; min-height: 35px; flex: none; gap: 5px; padding: 7px 10px; font-size: .6875rem; }
body.mobile-preview .new-chat > span { font-size: .875rem; }
body.mobile-preview .new-chat svg { width: 13px; height: 13px; }
body.mobile-preview .history-heading, body.mobile-preview .history-note { display: none; }
body.mobile-preview .history-list { display: flex; align-items: center; gap: 4px; height: 100%; overflow: auto; }
body.mobile-preview .history-item { width: 135px; flex: none; margin: 0; padding: 8px; }
body.mobile-preview .history-item strong { font-size: .6875rem; }
body.mobile-preview .history-item span { display: none; }
body.mobile-preview .history-empty { white-space: nowrap; font-size: .6875rem; margin: 0 5px; }
body.mobile-preview .chat-main { flex: 1; min-height: 0; }
body.mobile-preview .chat-toolbar { flex: none; padding: 11px 12px; gap: 9px; }
body.mobile-preview .chat-toolbar .app-icon { width: 29px; height: 30px; }
body.mobile-preview .chat-toolbar .app-icon svg { width: 16px; height: 16px; }
body.mobile-preview .chat-app-title { flex: 1; gap: 8px; min-width: 0; }
body.mobile-preview .chat-app-title strong { max-width: 240px; font-size: .75rem; }
body.mobile-preview .chat-app-title > div > span { font-size: .6875rem; }
body.mobile-preview .chat-feed { padding: 21px 12px; }
body.mobile-preview .chat-welcome { min-height: 210px; padding: 23px 10px; }
body.mobile-preview .welcome-symbol { font-size: 2.3rem; margin-bottom: 17px; }
body.mobile-preview .welcome-symbol svg { width: 35px; height: 35px; }
body.mobile-preview .chat-welcome h2 { font-size: 1.08rem; }
body.mobile-preview .chat-welcome > p { font-size: .75rem; line-height: 1.95; margin-top: 10px; }
body.mobile-preview .welcome-ideas { gap: 5px; margin-top: 21px; }
body.mobile-preview .welcome-ideas button { padding: 8px 9px; font-size: .6875rem; }
body.mobile-preview .welcome-ideas > span { font-size: .6875rem; }
body.mobile-preview .chat-composer { margin: 0 9px; padding: 13px 12px 10px; }
body.mobile-preview .chat-composer textarea { min-height: 49px; max-height: 95px; font-size: 1rem; line-height: 1.8; }
body.mobile-preview .chat-composer-foot { margin-top: 9px; gap: 12px; }
body.mobile-preview .chat-composer-foot > span { font-size: .6875rem; }
body.mobile-preview .chat-composer-foot .btn { min-height: 32px; font-size: .6875rem; padding: 7px 12px; gap: 13px; }
body.mobile-preview .chat-disclaimer { font-size: .5625rem; margin: 8px 10px 9px; line-height: 1.75; }
body.mobile-preview .message { gap: 9px; margin-bottom: 26px; }
body.mobile-preview .message-avatar { width: 24px; height: 25px; font-size: .6875rem; border-radius: 5px; }
body.mobile-preview .ai-avatar svg { width: 15px; height: 15px; }
body.mobile-preview .message-label { font-size: .6875rem; margin-top: 3px; margin-bottom: 11px; gap: 8px; }
body.mobile-preview .message-label time { font-size: .6875rem; }
body.mobile-preview .user-content { font-size: .9375rem; padding: 12px 14px; }
body.mobile-preview .markdown { font-size: .9375rem; }
body.mobile-preview .markdown h3 { font-size: 1rem; }
body.mobile-preview .markdown code { font-size: .75rem; }
body.mobile-preview .codeblock pre { padding: 14px; }
body.mobile-preview .codeblock pre code { font-size: .6875rem; }
body.mobile-preview .message-footer > span { font-size: .6875rem; }
body.mobile-preview .message-footer .text-button { font-size: .6875rem; }
body.mobile-preview .message .evidence { padding: 10px 11px; }
body.mobile-preview .message .evidence summary { font-size: .6875rem; }
body.mobile-preview .message .evidence .preline { font-size: .75rem; }
body.mobile-preview .chat-error { padding: 13px; font-size: .75rem; }
body.mobile-preview .chat-error p { font-size: .75rem; }
body.mobile-preview .artifact-card { padding: 22px; }
body.mobile-preview .artifact-open h3 { font-size: 1rem; }
body.mobile-preview .artifact-open p { min-height: 0; font-size: .8125rem; }
body.mobile-preview .artifact-foot { margin-top: 21px; }
body.mobile-preview .course-banner { padding: 23px; }
body.mobile-preview .course-banner h2 { font-size: 1.2rem; }
body.mobile-preview .course-banner .intro { font-size: .8125rem; }
body.mobile-preview .culture-note { font-size: .6875rem; gap: 4px; margin-bottom: 21px; }
body.mobile-preview .culture-note > span { width: 100%; }
body.mobile-preview .task-card, body.mobile-preview .submitted, body.mobile-preview .panel-inner, body.mobile-preview .assistant-box { padding: 22px; }
body.mobile-preview .task-top { gap: 10px; }
body.mobile-preview .task-top h3 { font-size: 1rem; }
body.mobile-preview .task-top .pill { font-size: .6875rem; }
body.mobile-preview .task-card .brief { font-size: .8125rem; margin-top: 14px; }
body.mobile-preview .task-foot { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 19px; padding-top: 16px; }
body.mobile-preview .task-meta { font-size: .6875rem; }
body.mobile-preview .task-buttons .btn { font-size: .6875rem; min-height: 33px; padding: 7px 9px; }
body.mobile-preview .aside-stack, body.mobile-preview .assistant-aside { grid-template-columns: 1fr; }
body.mobile-preview .aside-card { padding: 22px; }
body.mobile-preview .submission-head { gap: 12px; }
body.mobile-preview .submission-head h3 { font-size: .9375rem; }
body.mobile-preview .submission-head > div > p { font-size: .6875rem; }
body.mobile-preview .submission-head > .btn { font-size: .6875rem; padding: 7px 10px; min-height: 33px; }
body.mobile-preview .submission-content { grid-template-columns: 1fr; gap: 20px; margin-top: 21px; }
body.mobile-preview .submission-content h4 { font-size: .6875rem; }
body.mobile-preview .submission-content p { font-size: .8125rem; }
body.mobile-preview .grade { padding: 18px; }
body.mobile-preview .grade .preline { font-size: .8125rem; }
body.mobile-preview .grade .tagrow .small { font-size: .6875rem; }
body.mobile-preview .grade small { font-size: .6875rem; }
body.mobile-preview .filterbar { flex-direction: column; align-items: start; gap: 13px; }
body.mobile-preview .filterbar .small { font-size: .75rem; }
body.mobile-preview .filterbar .select { min-height: 38px; font-size: .75rem; }
body.mobile-preview .document { padding: 22px; }
body.mobile-preview .document h3 { font-size: .9375rem; }
body.mobile-preview .chunk { padding: 12px 14px; }
body.mobile-preview .chunk .preline { font-size: .8125rem; }
body.mobile-preview .retrieval-section { padding: 20px; }
body.mobile-preview .retrieval-section > summary { font-size: .8125rem; }
body.mobile-preview .retrieval-section > summary span { display: block; margin: 0; font-size: .6875rem; }
body.mobile-preview .retrieval-section .page-title h1 { font-size: 1.2rem; }
body.mobile-preview .retrieval-section .page-title p { font-size: .75rem; }
body.mobile-preview .retrieval-section .assistant-box { padding: 19px; }
body.mobile-preview .assistant-bottom { flex-direction: column; align-items: start; gap: 15px; }
body.mobile-preview .assistant-bottom > .btn { width: 100%; }
body.mobile-preview .assistant-mode { gap: 7px; }
body.mobile-preview .mode-label { font-size: .75rem; padding: 8px 11px; }
body.mobile-preview .answer-text { font-size: .9375rem; }
body.mobile-preview .answer-head h3 { font-size: 1rem; }
body.mobile-preview .run-row > summary { grid-template-columns: 1fr; padding: 19px 21px; gap: 13px; }
body.mobile-preview .run-states { justify-content: start; gap: 12px; }
body.mobile-preview .run-row > summary h3 { font-size: .875rem; }
body.mobile-preview .run-detail { padding: 0 21px 21px; }
body.mobile-preview .run-detail .answer-text { font-size: .875rem; }
body.mobile-preview .panel-head { padding: 19px 21px; }
body.mobile-preview .panel-head h2 { font-size: .9375rem; }
body.mobile-preview .field-row { grid-template-columns: 1fr; gap: 0; }
body.mobile-preview .field label, body.mobile-preview .field-label { font-size: .8125rem; }
body.mobile-preview .field input, body.mobile-preview .field textarea, body.mobile-preview .field select, body.mobile-preview .select { font-size: .875rem; }
body.mobile-preview .field input[type="file"] { font-size: .6875rem; }
body.mobile-preview dialog { width: calc(100vw - 28px); border-radius: 8px; max-height: 91dvh; }
body.mobile-preview .modal-head { padding: 21px 22px; }
body.mobile-preview .modal-head h2 { font-size: 1.1rem; }
body.mobile-preview .modal-body { padding: 22px; }
body.mobile-preview .modal-actions { gap: 8px; }
body.mobile-preview .modal-actions .btn { font-size: .75rem; padding: 8px 12px; }
body.mobile-preview .score-grid { gap: 10px; }
body.mobile-preview .score-grid .field label { font-size: .6875rem; }
body.mobile-preview .meta-intro { font-size: .75rem; }
body.mobile-preview .toast { bottom: 19px; font-size: .8125rem; padding: 12px 18px; }
body.mobile-preview .login { grid-template-columns: 1fr; }
body.mobile-preview .login-story { padding: 29px 27px 31px; border-right: 0; border-bottom: 1px solid #2c475b; }
body.mobile-preview .login-story::after { inset: 20px -110px -170px auto; width: 300px; }
body.mobile-preview .story-title { margin: 39px 0 0; }
body.mobile-preview .story-title h1 { font-size: 2.3rem; line-height: 1.25; }
body.mobile-preview .story-title p { font-size: .8125rem; margin-top: 18px; max-width: 330px; }
body.mobile-preview .story-process, body.mobile-preview .login-foot { display: none; }
body.mobile-preview .login-form-side { padding: 38px 27px; }
body.mobile-preview .login-card h2 { font-size: 1.4rem; }
body.mobile-preview .login-card > p { font-size: .8125rem; margin-top: 13px; }
body.mobile-preview .account-choice { padding: 12px 8px; font-size: .6875rem; }
body.mobile-preview .account-choice strong { font-size: .8125rem; }
body.mobile-preview .account-choices { gap: 7px; }
body.mobile-preview .login-card .login-note { font-size: .6875rem; }
body.mobile-preview .login-card .culture-login { font-size: .6875rem; }
body.mobile-preview .culture-login span { font-size: .6875rem; }
body.mobile-preview .login-extra { font-size: .6875rem; }
body.mobile-preview .mobile-brand { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: transparent; color: #e2f2ff; text-align: left; }
body.mobile-preview .mobile-brand img { width: 28px; height: 28px; object-fit: contain; background: #fff; padding: 1px; border-radius: 5px; }
body.mobile-preview .mobile-brand > span { font-size: .875rem; font-weight: 600; line-height: 1.35; }
body.mobile-preview .mobile-brand small { display: block; color: #6f99b2; font-size: .5625rem; font-weight: 400; margin-top: 3px; }
body.mobile-preview .mobile-tabbar { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); position: fixed; z-index: 30; inset: auto 0 0; padding: 8px 9px calc(9px + env(safe-area-inset-bottom,0px)); min-height: 69px; border-top: 1px solid #2b465b; background: #0b1b2b; box-shadow: 0 -8px 20px #030b1520; }
body.mobile-preview .mobile-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 43px; padding: 4px 3px; border: 0; border-radius: 6px; background: transparent; color: #779bb5; font-size: .6875rem; line-height: 1.5; }
body.mobile-preview .mobile-tabbar button svg { width: 21px; height: 21px; }
body.mobile-preview .mobile-tabbar button.active { color: #7de3e9; background: #12323e; }
body.mobile-preview .hero-greeting { font-size: .6875rem; margin-bottom: 6px; color: #8daec3; }
body.mobile-preview .home-capability-strip { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 14px; }
body.mobile-preview .home-capability-strip > span { display: inline-flex; align-items: center; gap: 5px; font-size: .625rem; color: #8babbe; }
body.mobile-preview .home-capability-strip svg { width: 13px; height: 13px; }
body.mobile-preview .home-suggestions > span { font-size: .625rem; margin-right: 3px; }
body.mobile-preview .role-entries .item-arrow { display: none; }
body.mobile-preview .app-grid, body.mobile-preview .catalog-grid, body.mobile-preview .home-app-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
body.mobile-preview .app-icon, body.mobile-preview .home-app-grid .app-icon { width: 32px; height: 33px; border-radius: 6px; }
body.mobile-preview .app-icon svg, body.mobile-preview .home-app-grid .app-icon svg { width: 19px; height: 19px; }
body.mobile-preview .app-card-top > span:not(.app-icon):not(.app-card-arrow) { font-size: .5625rem; line-height: 1.6; }
body.mobile-preview .app-card-top .app-scene-badge { font-size: .5625rem; padding: 2px 4px; margin-left: 0; }
body.mobile-preview .view-assistant { height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(69px + env(safe-area-inset-bottom,0px)); overflow: hidden; }
body.mobile-preview .view-assistant > .workspace { height: 100%; min-height: 0; display: flex; flex-direction: column; }
body.mobile-preview .chat-workspace .topbar { position: static; flex: none; }
body.mobile-preview .chat-workspace .coursebar > .actions { display: none; }
body.mobile-preview .chat-workspace #page-content { flex: 1; min-height: 0; }
body.mobile-preview .chat-workspace .brand-footer { display: none; }
body.mobile-preview .chat-history-toggle { display: grid; place-items: center; width: 31px; height: 32px; padding: 0; border: 1px solid #2c5267; border-radius: 5px; background: #163245; color: #8bbdd2; flex: none; }
body.mobile-preview .chat-history-toggle svg { width: 18px; height: 18px; }
body.mobile-preview .chat-layout.history-mobile-open .chat-history { display: flex; flex-direction: column; position: absolute; z-index: 12; top: 51px; left: 7px; bottom: 7px; width: min(260px,calc(100% - 21px)); height: auto; padding: 17px 12px; border: 1px solid #3c647a; border-radius: 8px; background: #0b1c2b; box-shadow: 20px 0 50px #00000055; }
body.mobile-preview .chat-layout.history-mobile-open .history-heading { display: flex; margin: 23px 10px 10px; }
body.mobile-preview .chat-layout.history-mobile-open .history-list { display: block; overflow-y: auto; height: auto; flex: 1; }
body.mobile-preview .chat-layout.history-mobile-open .history-item { display: block; width: 100%; margin: 0 0 5px; padding: 11px 9px; }
body.mobile-preview .chat-layout.history-mobile-open .history-item strong { font-size: .75rem; }
body.mobile-preview .chat-layout.history-mobile-open .history-item span { display: block; font-size: .625rem; }
body.mobile-preview .chat-layout.history-mobile-open .history-note { display: block; color: #779db6; }
body.mobile-preview .chat-layout.history-mobile-open .history-empty { white-space: normal; font-size: .75rem; margin: 16px 10px; }
body.mobile-preview .intelligence-map { display: none; }
body.mobile-preview .doc-grid { grid-template-columns: minmax(0,1fr); }
body.mobile-preview .grid-main, body.mobile-preview .assistant-layout { grid-template-columns: minmax(0,1fr); }
body.mobile-preview .course-symbol { display: none; }
body.mobile-preview .chat-toolbar .model-state { display: none; }


/* A preview is a real 390/430px work surface with its own scroll region. */
body.mobile-preview #app { width: 100%; max-width: var(--mobile-preview-width,430px); height: var(--mobile-preview-height,100dvh); min-height: 0; margin: 0 auto; position: relative; isolation: isolate; overflow: hidden; background: #07121f; }
body.mobile-preview .shell { display: flex; flex-direction: column; height: 100%; min-height: 0; padding-bottom: 0; overflow: hidden; }
body.mobile-preview .login { display: block; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; }
body.mobile-preview .shell > .workspace { flex: 1; min-height: 0; width: 100%; overflow-x: hidden; overflow-y: auto; }
body.mobile-preview .mobile-tabbar { position: sticky; inset: auto; bottom: 0; width: 100%; flex: none; margin: 0; }
body.mobile-preview .view-assistant { height: 100%; padding-bottom: 0; }
body.mobile-preview .view-assistant > .workspace { flex: 1; height: auto; overflow: hidden; }
body.mobile-preview dialog { width: min(calc(var(--mobile-preview-width,430px) - 28px),calc(100vw - 28px)); }
body.mobile-preview .toast { max-width: min(calc(var(--mobile-preview-width,430px) - 28px),calc(100vw - 28px)); bottom: 80px; }

/* Explicit accessibility and print behavior. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root { color-scheme: light; --text: #172f43; --muted: #607182; --line: #d4dde5; --canvas: #fff; --panel: #fff; --cyan: #176b7b; --lake: #176b7b; --navy: #173d63; background: #fff; color: #172f43; }
  body, .workspace, .page, .panel, .task-card, .aside-card, .submitted, .document, .run-row, .chat-main, .markdown, .artifact-card, .login-card, dialog { background: #fff !important; color: #172f43 !important; box-shadow: none !important; }
  .mobile-tabbar, .device-preview-link, .chat-history-toggle, .sidebar, .topbar, .coursebar > .actions, .home-suggestions, .home-hero .hero-composer, .chat-history, .chat-composer, .chat-disclaimer, .new-chat, .toast, .text-button, .task-buttons, .modal-actions, .intelligence-map { display: none !important; }
  .shell { display: block; }
  .workspace { width: 100%; }
  .page { max-width: none; padding: 12px; }
  .home-hero { display: block; }
  .home-hero-title, .page-title h1, .task-top h3, .artifact-open h3, .document h3, .markdown h3, .markdown strong, .course-banner h2, .grade-score, .panel-head h2 { color: #173d63 !important; }
  p, .brief, .intro, .preline, .app-card-description, .artifact-open p, .message-label, .message-footer, .task-meta, .run-meta, .small, .muted { color: #425c70 !important; }
  .chat-layout { display: block; height: auto; min-height: 0; border-color: #cad8e4; }
  .chat-feed { overflow: visible; height: auto; padding: 15px; }
  .chat-toolbar, .user-content, .grade, .course-banner, .evidence, .chunk, .codeblock, .markdown code, .app-card, .app-example { color: #21485e !important; background: #f4f7fa !important; border-color: #cad8e4 !important; }
  .codeblock pre code, .evidence-index { color: #21485e !important; }
  .message, .task-card, .artifact-card, .submitted, .panel, .document { break-inside: avoid; }
  .app-grid, .artifact-grid { grid-template-columns: 1fr 1fr; }
  .brand-footer img { width: 66px; height: 66px; }
  .brand-footer a, .brand-footer small { color: #476277 !important; }
  a { text-decoration: none; color: #176b7b !important; }
}
