*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 system-ui,"PingFang SC","Microsoft YaHei",sans-serif}button,input,select{font:inherit}a{color:var(--accent);text-decoration:none;font-weight:650}button,.primary{padding:8px 15px;border:1px solid var(--control-line);background:white;border-radius:7px;color:var(--ink);cursor:pointer}.primary{background:var(--accent);border-color:var(--accent);color:white;font-weight:680;display:inline-block}button:disabled{opacity:.55}.brand{display:flex;align-items:center;gap:11px;background:var(--app-bar);color:white;border-bottom:1px solid var(--app-bar);padding:14px clamp(18px,4vw,64px)}.mark{width:40px;height:40px;object-fit:contain}.brand b{font-size:18px}.brand small,td small{display:block;color:var(--sub)}.brand #identity{margin-left:auto;display:flex;align-items:center;gap:12px}.login{max-width:880px;margin:clamp(30px,9vh,110px) auto;display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:white}.cover{display:flex;align-items:flex-end;background:linear-gradient(0deg,#152e4a 0%,#18334f24 86%),url('/assets/consultation-session.webp') 60% center/cover;color:white;min-height:400px;padding:34px}.cover h1{font-size:32px;line-height:1.4;margin:10px 0}.credentials{padding:clamp(20px,4vw,46px)}h1,h2,p{margin:0 0 12px}.credentials>p,.heading p,article small{color:var(--sub)}.credentials form label,dialog label,.tools label{display:grid;gap:5px;font-weight:650;margin:12px 0}input,select{padding:9px 10px;border-radius:6px;border:1px solid var(--control-line);background:white;min-width:0;color:var(--ink)}.credentials .primary{width:100%}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--control-focus);outline-offset:2px}.workspace{max-width:1160px;margin:auto;padding:28px clamp(14px,4vw,44px)}.heading,.tools,footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.heading{margin:12px 0 18px}.heading h1{margin:0}.projects{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:14px}article,.directory{background:white;border:1px solid var(--line);border-radius:12px;padding:18px}article footer{justify-content:flex-start;margin-top:18px}.directory{overflow:auto}.tools label{display:flex;align-items:center}.tools label select{max-width:60vw}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px 8px;border-bottom:1px solid var(--line)}th{background:var(--bg);color:var(--sub)}dialog{width:min(390px,94vw);border:1px solid var(--line);border-radius:12px;padding:24px;color:inherit}dialog::backdrop{background:#152a2280}dialog footer{justify-content:flex-end;margin-top:18px}[role=alert],#message{color:#973d30}:is([role=alert],#message):empty{display:none}@media(max-width:650px){.login{display:block;margin:20px 14px}.cover{min-height:115px;padding:17px 23px}.cover h1{font-size:22px;margin:2px 0}.cover h1 br,.cover p{display:none}.brand{padding:10px 14px}.workspace{padding:18px 12px}td,th{padding:9px 5px}td button{padding:6px}.credentials{padding:23px}}

.brand small,.brand #identity {color:var(--on-bar)}
.brand #identity button,.brand #identity a {background:transparent;color:white;border-color:#6d849d}
.brand #identity button:hover,.brand #identity a:hover {background:var(--bar-hover)}
.primary:hover:not(:disabled) {background:var(--accent-hover);border-color:var(--accent-hover)}
.portal-shell {min-height:100dvh}
.portal-shell .brand {padding:4px 16px;min-height:52px;gap:9px}
.portal-shell .brand .mark {width:36px;height:36px;flex:none}
.portal-shell .brand small {display:none}
.portal-shell .brand b {white-space:nowrap;font-size:17px}
.portal-shell #identity {min-width:0}
.portal-shell #identity span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.portal-shell #identity button {flex:none}
.portal-shell .workspace {width:100%;margin:0 auto;align-self:start}
.portal-shell #system-navigation {position:sticky;top:52px;align-self:start;display:grid;align-content:start;gap:4px;height:calc(100dvh - 52px);padding:16px 12px;background:white;border-right:1px solid var(--line)}
.portal-shell #system-navigation a {padding:9px 12px;border-radius:7px;min-height:36px;font-weight:450;color:var(--sub)}
.portal-shell #system-navigation a:is(:hover,[aria-current]) {background:var(--tint);color:var(--accent)}
.portal-shell #system-navigation a[aria-current] {box-shadow:inset 3px 0 var(--accent);font-weight:700}
@media(pointer:coarse){.portal-shell #system-navigation a,.portal-shell #identity button {min-height:44px}}
@media(max-width:760px){
 .portal-shell .brand {min-height:52px;padding:4px 10px}
 .portal-shell #system-navigation {position:static;height:auto;display:flex;flex-wrap:wrap;padding:4px 10px;border-right:0;border-bottom:1px solid var(--line)}
}

.settings-page .heading {margin:0 0 14px}
.settings-page h1 {font-size:clamp(24px,3vw,32px);letter-spacing:-.025em}
.settings-tabs {display:flex;gap:18px;border-bottom:1px solid var(--line);margin-bottom:16px}
.settings-tabs a {padding:9px 2px;color:var(--sub);border-bottom:3px solid transparent}
.settings-tabs a[aria-current] {color:var(--accent);border-color:currentColor}
.settings-page .directory {padding:0}
.settings-page .tools {padding:14px 18px;min-height:54px}
.settings-page .tools h2 {font-size:18px;margin:0}
.settings-page .tools h2 small {font-size:13px;font-weight:500;color:var(--sub);margin-left:6px}
.settings-page .tools label {margin:0}
.account-actions {display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.settings-page table :is(th,td) {padding:10px 16px;overflow-wrap:anywhere}
.settings-page tbody tr:last-child td {border-bottom:0}
.settings-page #members {overflow-x:auto}
.settings-page #message:not(:empty) {margin:12px 18px}
.models-panel .model-heading {padding:18px 20px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px}
.model-heading h2 {margin:0;font-size:19px}
.model-heading p,.model-heading small,.model-purpose small,.model-source,#model-status {font-size:13px;color:var(--sub)}
.model-heading p {margin:3px 0 0}
.provider-section {padding:20px;border-top:1px solid var(--line)}
.provider-section h3 {margin:0;font-size:16px}
.provider-section p,.provider-key small,.task-model label {color:var(--sub);font-size:13px}
.provider-section p {margin:4px 0 12px}
.provider-keys {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.provider-key,.task-model>div,.model-picker label {display:grid;gap:5px;min-width:0}
.provider-key label {font-weight:600}
.provider-key input,.task-model :is(select,input) {width:100%;min-width:0;min-height:42px}
.task-model {display:grid;grid-template-columns:minmax(100px,.8fr) minmax(150px,1fr) minmax(170px,1.3fr) 80px;align-items:start;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}
.task-model:last-child {border:0;padding-bottom:0}
.task-model strong {align-self:center}
.task-model .model-source {align-self:center;justify-items:start}
.model-picker label[hidden] {display:none}
.model-source {flex-wrap:wrap;gap:2px 10px}
.model-source button {border:0;padding:3px 0;color:var(--accent);font-weight:650;font-size:13px;background:transparent}
.model-source button:hover {text-decoration:underline}
.models-panel footer {justify-content:flex-end;align-items:center;padding:12px 20px;background:var(--bg);border-top:1px solid var(--line)}
.models-panel #model-status {min-width:0;overflow-wrap:anywhere;font-size:14px}
.models-panel footer button {min-width:7em}
.models-panel footer[data-state=saved] {background:#e9f5ed;border-color:#b9d9c3}
.models-panel footer[data-state=saved] #model-status {color:#205937;font-weight:650}
.models-panel footer[data-state=saved] button:disabled {opacity:1;color:#205937;background:white;border-color:#8ebba0;cursor:default}
.models-panel footer:is([data-state=error],[data-state=invalid]) #model-status {color:#923729;font-weight:650}
.models-panel footer[data-state=saving] #model-status {color:var(--accent)}
.models-panel #reload-models {margin:0 18px 14px}
#model-fields[aria-busy=true] {padding:16px 20px}
@media(max-width:850px){.model-grid {grid-template-columns:minmax(160px,1fr) minmax(0,1.25fr) minmax(84px,.5fr);gap:10px}}
@media(max-width:750px){
 .provider-section {padding:14px 12px}
 .provider-keys,.task-model {grid-template-columns:minmax(0,1fr)}
 .provider-key input,.task-model :is(select,input) {min-height:44px;font-size:16px}
 .task-model {gap:8px}
 .task-model .model-source {display:flex;flex-direction:row;align-items:center}
}
@media(max-width:650px){
 .models-panel footer {flex-direction:column;align-items:stretch;gap:8px}
 .settings-tabs a,.settings-page button,.settings-page select,.model-row input {min-height:44px}
 .settings-page .tools,.models-panel footer,.models-panel .model-heading {padding:12px}
 #key-state {justify-items:start}
 .model-columns {display:none}
 .model-row {grid-template-columns:minmax(0,1fr) auto;gap:9px;padding:12px}
 .model-columns+.model-row {border-top:1px solid var(--line)}
 .model-purpose {grid-column:1/-1}
 .model-row :is(input,select) {font-size:16px}
 .model-source {flex-direction:column;align-items:flex-start;justify-content:center}
 .model-source button:not([hidden]) {min-height:44px}
 .settings-page table :is(th,td) {padding:8px}
 .account-actions {gap:8px}
}

.android-client body {background:var(--bg);color:var(--ink)}
.android-client .brand {background:var(--app-bar);color:#fff;border-color:var(--app-bar);min-height:var(--android-bar-height);padding:7px 16px;gap:0}
.android-client .brand .mark {width:32px;height:32px;margin-right:10px;border-radius:9px}
.brand .android-title-suffix {display:none}
.android-client .brand .android-title-suffix {display:inline}
.android-client .brand b {color:#fff;font-size:16px;font-weight:700;line-height:1.25}
.android-client .brand small,.android-client .cover {display:none}
.android-client .login {display:block;width:calc(100% - 32px);max-width:420px;margin:24px auto;padding:0;border:1px solid var(--line);border-radius:16px;background:white;overflow:hidden}
.android-client .login::before {content:'';display:block;height:clamp(98px,18vh,148px);background:var(--app-bar) url('/assets/consultation-session.webp') 60% 40% / cover}
.android-client .credentials {width:100%;padding:20px;border:0;background:white}
.android-client .credentials input {font-size:16px}
.android-client .primary {min-height:44px;background:var(--accent);border-color:var(--accent)}
.android-client #identity button {min-height:44px}
.android-client #identity {min-width:0;margin-left:auto}
.android-client #identity span {font-size:13px;overflow-wrap:anywhere;text-align:right}
.android-client #identity button {margin-left:8px;flex:none;padding:5px 4px;border:0;background:transparent;color:#deebfb;font-size:14px}
.android-courses {max-width:720px;margin:0 auto;padding:22px 16px}
.course-heading {display:grid;gap:5px;margin-bottom:18px}
.course-heading h1 {margin:0;font-size:26px;line-height:1.3}
.course-heading small,.course-row small {color:var(--sub);font-size:13px;font-weight:400}
.course-list {overflow:hidden;border:1px solid var(--line);border-radius:14px;background:#fff}
.course-list>p {margin:0;padding:18px}
.course-row {display:grid;grid-template-columns:42px minmax(0,1fr) 10px;align-items:center;gap:12px;min-height:80px;padding:13px 16px;color:var(--ink)}
.course-row+.course-row {border-top:1px solid var(--line)}
.course-row strong,.course-row small {display:block}
.course-row strong {font-size:17px;line-height:1.45;overflow-wrap:anywhere}
.course-row:focus {outline-offset:-3px}
.course-row:active {background:var(--tint)}
.course-icon {display:grid;place-items:center;background:var(--tint);color:var(--accent);height:42px;border-radius:12px}
.course-arrow {width:8px;height:8px;border:solid var(--sub);border-width:2px 2px 0 0;transform:rotate(45deg)}

.android-client .brand #identity span {color:#deebfb}
