/* Avori workspace system. Shared rhythm; chat keeps its own type scale. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar: #0a0a0a;
  --chrome: rgba(10,10,10,.94);
  --chrome-soft: rgba(10,10,10,.7);
  --radius: 12px;
  --radius-lg: 16px;
}
:root[data-theme="light"] {
  --sidebar: #f7f7f7;
  --chrome: rgba(255,255,255,.94);
  --chrome-soft: rgba(255,255,255,.7);
  --line: rgba(0,0,0,.09);
  --line-2: rgba(0,0,0,.16);
  --line-3: rgba(0,0,0,.26);
  --hover: rgba(0,0,0,.04);
  --hover-2: rgba(0,0,0,.07);
  --press: rgba(0,0,0,.1);
  --gray-soft: rgba(0,0,0,.05);
}
body { font-family:var(--font); font-size:14px; font-weight:400; letter-spacing:0; }
button,input,textarea,select { font-family:inherit; }
:is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
[hidden] { display:none !important; }
.btn { font-size:13px; font-weight:550; min-height:38px; border-radius:9px; box-shadow:none; }
.btn.primary,.sidebar .new-chat { background:var(--ink); border-color:var(--ink); color:var(--bg); box-shadow:none; }
.btn.primary:hover,.sidebar .new-chat:hover { background:var(--ink-2); border-color:var(--ink-2); color:var(--bg); }
.btn.small { min-height:32px; font-size:12px; }
.field label { font-size:13px; font-weight:500; }
.field input,.field select,.field textarea { font-size:14px; border-radius:9px; background:var(--panel-2); border-color:var(--line-2); }
.field input,.field select { min-height:42px; }
.sidebar { background:var(--sidebar); padding:18px 12px 10px; }
.sidebar .brand { padding:4px 10px 22px; }
.sidebar .nav a { min-height:36px; font-size:13px; font-weight:400; border-radius:8px; }
.sidebar .nav a.active { background:var(--hover-2); color:var(--ink); box-shadow:none; border-color:transparent; }
.sb-group-title { font-size:11px; font-weight:500; text-transform:none; letter-spacing:.01em; margin-top:20px; }
.topbar { min-height:68px; padding:14px 30px; gap:14px; background:var(--bg); }
.topbar h1 { font-size:22px; font-weight:600; letter-spacing:-.035em; }
.topbar .search { max-width:360px; }
.content:not(.bare) { padding:36px 40px 64px; }
.content:not(.bare) .inner { max-width:1080px; }
.page-note { font-size:15px; line-height:1.65; margin:0 0 28px; color:var(--ink-2); max-width:740px; }
.page-sect { margin-bottom:36px; }
.page-sect-head { gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.page-sect-head h2 { font-size:20px; font-weight:600; letter-spacing:-.025em; }
.page-sect-head .sub { font-size:13px; }
.panel { border-radius:14px; box-shadow:none; }
.sect { padding:24px; }
.sect h3 { font-size:16px; font-weight:600; letter-spacing:-.02em; margin-bottom:14px; }
.sub,.hint { line-height:1.6; }
.grid { grid-template-columns:repeat(auto-fill,minmax(285px,1fr)); gap:18px; }
.card { border-radius:14px; box-shadow:none; }
.card .title,.card h3 { font-size:16px; font-weight:600; line-height:1.4; }
.card .sub,.card .desc { font-size:13px; line-height:1.65; }
.list-row { padding:16px 0; gap:16px; }
.list-row .title { font-size:14px; font-weight:550; }
.list-row .sub { font-size:13px; margin-top:4px; }
.empty { padding:48px 24px; border-style:solid; border-color:var(--line); border-radius:14px; font-size:14px; line-height:1.7; }
.icon-menu { width:38px; justify-content:center; padding:8px; }
.library-options > summary { list-style:none; }
.library-options > summary::-webkit-details-marker { display:none; }
.library-options > summary::after { display:none; }
.icon-menu svg { width:18px; height:18px; }
/* The whole identity row opens a small, reachable account menu. */
.account-footer { position:relative; display:block; padding-top:12px; }
.account-trigger { display:flex; align-items:center; gap:12px; width:100%; padding:10px 8px; border:0; border-radius:10px; background:transparent; text-align:left; }
.account-trigger:hover,.account-trigger[aria-expanded="true"] { background:var(--hover); }
.account-trigger .who { display:flex; flex:1; flex-direction:column; min-width:0; }
.account-trigger .name { font-size:13px; font-weight:550; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-trigger .role { font-size:11px; color:var(--ink-3); }
.account-trigger > svg { width:18px; height:18px; flex:none; color:var(--ink-3); }
.account-menu { position:absolute; bottom:calc(100% + 8px); left:0; width:260px; max-width:calc(100vw - 32px); padding:6px; border:1px solid var(--line-2); border-radius:14px; background:var(--menu); box-shadow:var(--shadow-pop); z-index:100; }
.account-menu-identity { display:flex; flex-direction:column; gap:4px; padding:12px; border-bottom:1px solid var(--line); margin-bottom:5px; }
.account-menu-identity strong { font-size:13px; font-weight:600; }
.account-menu-identity span { font-size:12px; color:var(--ink-3); overflow-wrap:anywhere; }
.account-menu :is(a,button) { display:flex; align-items:center; gap:10px; min-height:40px; width:100%; padding:10px 12px; border:0; border-radius:7px; background:transparent; color:var(--ink-2); text-align:left; font-size:13px; }
.account-menu :is(a,button):hover { background:var(--hover); color:var(--ink); }
.account-menu svg { width:16px; height:16px; }
.account-menu #logout-btn { border-top:1px solid var(--line); margin-top:5px; border-radius:0 0 7px 7px; }
/* Auth is a compact form with direct recovery and invitation guidance. */
.login-welcome .login-card { max-width:440px; padding:40px; border:1px solid var(--line); border-radius:20px; background:var(--panel); }
.login-welcome .logo-row { margin-bottom:36px; }
.login-welcome h1 { font-size:32px; font-weight:600; line-height:1.2; letter-spacing:-.045em; }
.login-welcome .sub { font-size:14px; line-height:1.6; color:var(--ink-3); margin:10px 0 28px; }
.login-welcome .login-form { gap:18px; }
.login-welcome input { background:var(--panel-2); border:1px solid var(--line-2); min-height:48px; }
.login-welcome input:-webkit-autofill { -webkit-box-shadow:0 0 0 1000px var(--panel-2) inset; -webkit-text-fill-color:var(--ink); }
.login-welcome .btn.primary { justify-content:center; min-height:46px; }
.login-welcome .btn.subtle { justify-content:center; padding:0; min-height:24px; border:0; background:transparent; color:var(--ink-2); font-weight:400; }
.login-welcome .foot-note { font-size:12px; line-height:1.65; color:var(--ink-3); margin-top:24px; }
.login-welcome .login-help { font-size:12px; line-height:1.65; color:var(--ink-3); border-top:1px solid var(--line); padding-top:18px; margin:18px 0 0; }
/* Settings uses the same visual language as the rest of the workspace. */
.settings-intro { margin-bottom:40px; }
.settings-intro h2 { font-size:32px; line-height:1.2; letter-spacing:-.04em; font-weight:600; margin:0 0 12px; }
.settings-intro p { font-size:15px; color:var(--ink-3); }
.settings-group { margin-bottom:36px; }
.settings-group > h2 { font-size:13px; font-weight:500; color:var(--ink-3); margin:0 0 16px; }
.settings-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.settings-card { display:block; padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); color:var(--ink); }
.settings-card:hover { background:var(--panel-2); border-color:var(--line-2); }
.settings-icon { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:10px; margin-bottom:24px; color:var(--ink-2); }
.settings-icon svg { width:20px; height:20px; }
.settings-card h3 { margin:0 0 10px; font-size:16px; font-weight:600; }
.settings-card p { margin:0; font-size:13px; line-height:1.7; color:var(--ink-3); }
.account-settings { width:min(880px,100%); max-width:880px; border-radius:18px; }
.account-settings .modal-head { padding:20px 24px; }
.account-settings .modal-head strong { font-size:17px; font-weight:600; }
.account-settings .modal-body { display:grid; grid-template-columns:180px minmax(0,1fr); padding:0; overflow:hidden; min-height:410px; }
.account-settings-nav { padding:18px 12px; border-right:1px solid var(--line); background:var(--sidebar); }
.account-settings-nav button { display:block; width:100%; text-align:left; padding:11px 12px; border:0; border-radius:8px; background:transparent; color:var(--ink-3); font-size:13px; }
.account-settings-nav button.active { background:var(--hover-2); color:var(--ink); }
.account-settings-panes { padding:28px; overflow:auto; max-height:65vh; min-width:0; }
.account-section h3 { font-size:17px; font-weight:600; margin-bottom:18px !important; }
.account-section .kv { font-size:14px; gap:16px; }
.account-section .mono { font-family:var(--font); overflow-wrap:anywhere; }
.account-section .form { gap:18px !important; }
.account-section > .form { margin-top:18px; }
.account-section .sub { font-size:13px; }
.account-section .panel { margin-bottom:28px !important; }
/* Visible overview and genuine conversation activity. */
.home-activity { margin-top:36px; text-align:left; }
.home-activity > h2 { font-size:24px; font-weight:600; letter-spacing:-.03em; margin:0 0 18px; }
.home-hero h1 { font-weight:600; }
.workflow-filters { margin:0 0 28px; }
.workflow-filters .count-strip { flex-wrap:wrap; gap:8px; }
.workflow-filters .count-chip { font-size:13px; min-height:36px; }
.agent-hero { border:0; background:transparent; box-shadow:none; }
.agent-cover { height:150px; border-radius:16px; }
.agent-hero-body { padding:24px 0; }
.agent-hero-name h2 { font-size:30px; line-height:1.25; font-weight:600; letter-spacing:-.04em; }
.agent-hero-desc { max-width:750px; font-size:15px; line-height:1.7; }
.agent-tabs button { font-size:13px; padding:14px 12px; }
.conversation-activity { padding:26px; border-bottom:1px solid var(--line); }
.activity-heading { display:flex; justify-content:space-between; gap:20px; margin-bottom:24px; }
.activity-heading h3 { margin:0 0 7px; font-size:17px; font-weight:600; }
.activity-heading p { margin:0; color:var(--ink-3); font-size:12px; }
.activity-heading > strong { font-size:28px; line-height:1.1; font-weight:550; text-align:right; }
.activity-heading > strong span { display:block; font-size:11px; color:var(--ink-3); font-weight:400; margin-top:8px; }
.activity-bars { display:flex; align-items:stretch; gap:10px; height:130px; border-bottom:1px solid var(--line-2); background:repeating-linear-gradient(to top,transparent 0,transparent 42px,var(--line) 43px,transparent 44px); }
.activity-bar-slot { flex:1; display:flex; align-items:flex-end; min-width:0; }
.activity-bar-slot span { width:100%; background:var(--ink-2); border-radius:4px 4px 0 0; }
.activity-axis { display:flex; justify-content:space-between; margin-top:10px; color:var(--ink-3); font-size:11px; }
@media(max-width:1100px) { .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .content:not(.bare) { padding:24px 18px 44px; }
  .topbar { padding:12px 18px; gap:10px; flex-wrap:wrap; }
  .topbar h1 { font-size:20px; }
  .topbar .search { flex:1 1 180px; min-width:0; }
  .grid { grid-template-columns:minmax(0,1fr); }
  .settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .settings-card { padding:18px; }
  .settings-intro h2 { font-size:27px; }
  .account-settings .modal-body { display:flex; flex-direction:column; min-height:0; }
  .account-settings-nav { display:flex; overflow:auto; flex:none; padding:10px; border-right:0; border-bottom:1px solid var(--line); }
  .account-settings-nav button { width:auto; white-space:nowrap; }
  .account-settings-panes { padding:22px; max-height:60vh; }
  .login-welcome .login-card { padding:30px 24px; }
  .sect,.conversation-activity { padding:20px; }
  .activity-heading { flex-wrap:wrap; }
  .agent-hero-name h2 { font-size:25px; }
  .agent-cover { height:110px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; } }
/* Specificity bridge for the original shell and resource card components. */
.sidebar .foot.account-footer { display:block; flex:none; padding:10px 0 0; }
.sidebar .foot .account-trigger.account-usage { display:flex; place-items:initial; width:100%; height:auto; min-height:58px; padding:10px 8px; border-radius:10px; gap:10px; }
.sidebar .foot .account-menu button { padding:10px 12px; }
.sidebar #sb-newchat { background:var(--ink); color:var(--bg); border-color:var(--ink); font-weight:550; }
.premium-card { height:auto; min-height:210px; border-radius:14px; }
.premium-card-body { padding:20px; gap:12px; }
.premium-card-title { font-size:16px; font-weight:600; line-height:1.4; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.premium-card-sub { font-size:12px; line-height:1.5; margin-top:5px; }
.premium-card-desc { font-size:13px; line-height:1.65; min-height:0; -webkit-line-clamp:3; }
.premium-card-copy { padding-top:0; }
.premium-card-foot { margin-top:auto; padding-top:14px; gap:12px; }
.premium-card-footline { font-size:11px; line-height:1.5; }
.premium-card-icon { box-shadow:none; background:var(--panel-2); }
.premium-card-main { margin-top:0; }
.premium-card-banner { height:64px; }
.compact-skill-card,.wf-card { min-height:210px; height:auto; }
.home-card-grid .premium-card { height:auto; min-height:150px; }
.home-card-grid .premium-card-main { margin-top:0; }
.home-card-grid .premium-card-body { padding:18px; }
.agent-tabs { display:flex; overflow-x:auto; border-bottom:1px solid var(--line); }
.agent-tabs button { flex:none; }
.login-welcome .login-brand-name { font-family:var(--font); font-weight:600; }
.login-welcome .login-form .btn.subtle { margin:0; }
.sidebar #sb-newchat svg { color:var(--bg); }
.workflow-filters .count-strip { display:flex; border:0; margin:0; padding:0; }
.workflow-filters .count-chip { display:flex; flex-direction:row; align-items:center; gap:8px; padding:8px 14px; border-radius:20px; background:transparent; }
.workflow-filters .count-chip strong { font-size:12px; color:var(--ink-3); }
.workflow-filters .count-chip.active { background:var(--hover-2); border-color:var(--line-3); color:var(--ink); }
.topbar .search:focus-within { outline:2px solid var(--ink-3); outline-offset:2px; }
.topbar .search input:focus-visible { outline:0; }
#agent-tabs { margin:8px 0 24px; display:flex; overflow-x:auto; }
#agent-tabs button { flex:none; font-size:13px; padding:14px 12px; }
#agent-tabs button.active { color:var(--ink); border-bottom-color:var(--ink); }
.agent-hero-body { border:0; background:transparent; border-radius:0; }
.agent-hero-tagline { font-size:15px; line-height:1.7; margin:14px 0 24px; }
.agent-setup-summary { gap:16px; }
.team-message-layout { grid-template-columns:260px minmax(0,1fr); min-height:460px; }
.team-message-layout > section > .empty { min-height:440px; display:grid; place-items:center; border:0; }
.connections-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.connections-intro > .grow { flex:1; }
.connections-intro > .grow > p:first-child { font-size:20px; font-weight:600; margin:0 0 8px; }
@media(max-width:700px) { .team-message-layout { grid-template-columns:minmax(0,1fr); }.connections-intro { flex-wrap:wrap; }.connections-intro > .grow { flex-basis:100%; } }
.tc-app-grid { grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.tc-app-card { grid-template-columns:38px minmax(0,1fr); padding:18px; gap:12px; border-radius:12px; }
.tc-app-card > button { grid-column:2; justify-self:start; }
.tc-app-main strong { font-size:14px; line-height:1.45; white-space:normal; }
.tc-app-main span { font-size:12px; line-height:1.5; white-space:normal; }
.admin-users-table :is(input,select),.panel .form-row :is(input,select) { font-family:var(--font); font-size:13px; min-height:36px; padding:7px 10px; background:var(--panel-2); border:1px solid var(--line-2); border-radius:8px; }
.admin-users-table td { padding-top:16px; padding-bottom:16px; }
.chat-empty-inner h1 { font-size:36px; font-weight:600; letter-spacing:-.04em; }
.composer-model-wrap.empty { padding:6px 10px; min-height:0; border:1px solid var(--line); font-size:12px; }
#composer-input:focus-visible { outline:0; }
.composer:focus-within { border-color:var(--line-3); }
@media(max-width:700px) { .tc-app-grid { grid-template-columns:minmax(0,1fr); }.chat-empty-inner h1 { font-size:28px; } }
/* Long-form editors and secondary screens follow the same reading rhythm. */
.detail-head h2,.profile-activity h2 { font-size:26px; font-weight:600; letter-spacing:-.035em; line-height:1.25; }
.detail-head .sub { font-size:14px; line-height:1.65; max-width:760px; }
.workflow-editor { gap:0; }
.editor-section { display:flex; flex-direction:column; gap:18px; padding:12px 8px 28px; }
.editor-section + .editor-section { padding-top:28px; border-top:1px solid var(--line); }
.editor-section > h3 { margin:0; font-size:19px; }
.editor-section > .hint { margin:-10px 0 0; }
.editor-section .field { margin:0; }
.form .row { flex-wrap:wrap; }
.form .row .field { min-width:220px; }
.form .checks { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.form .checks label { border:1px solid var(--line); border-radius:8px; padding:12px; min-height:44px; }
.form .checks input[type=checkbox] { flex:none; width:16px; min-height:16px; height:16px; margin:0; }
.form-actions input:not([type=checkbox]),.form-actions textarea { background:var(--panel-2); color:var(--ink); border:1px solid var(--line-2); border-radius:8px; padding:10px 12px; font:inherit; min-height:38px; }
.tabs { overflow-x:auto; max-width:100%; }
.tabs a { white-space:nowrap; }
.tabs a.active { border-bottom-color:var(--ink); }
.quiet-details > summary { display:flex; align-items:center; gap:12px; list-style:none; font-size:13px; font-weight:500; padding:12px 0; cursor:pointer; }
.quiet-details > summary::-webkit-details-marker { display:none; }
.quiet-details > summary::before { content:'+'; font-size:18px; font-weight:400; color:var(--ink-3); }
.quiet-details[open] > summary::before { content:'−'; }
.profile-activity .activity-row { padding:14px 0; }
.audit-table { table-layout:fixed; width:100%; }
.audit-table th:nth-child(1) { width:16%; }.audit-table th:nth-child(2) { width:12%; }.audit-table th:nth-child(3) { width:19%; }.audit-table th:nth-child(4) { width:23%; }.audit-table th:nth-child(5) { width:30%; }
.audit-table td { overflow-wrap:anywhere; vertical-align:top; padding:16px 10px; }
.audit-detail { white-space:pre-wrap; overflow-wrap:anywhere; max-height:180px; overflow:auto; margin:0; font:12px/1.6 var(--mono); }
.cc-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.cc-card { padding:24px; border-radius:14px; }
.cc-card h4 { font-size:15px; text-transform:none; letter-spacing:0; font-weight:600; }
.cc-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:16px 0; gap:12px; }
.cc-stat { background:transparent; border:0; padding:8px 0; text-align:left; }
.cc-stat .cc-v { font-size:24px; font-weight:550; line-height:1.3; }
.cc-stat .cc-k { font-size:12px; margin-top:6px; }
@media(max-width:700px) {
  .editor-section { padding:8px 0 24px; }.form .row { flex-direction:column; }.form .row .field { min-width:0; }
  .form .checks,.cc-grid { grid-template-columns:minmax(0,1fr); }
  .audit-table { display:block; overflow-x:auto; }.audit-table th,.audit-table td { min-width:140px; }.audit-table td:last-child { min-width:260px; }
  .detail-head h2,.profile-activity h2 { font-size:22px; }.quiet-details > summary { flex-wrap:wrap; }
}
.tabs { overflow-y:hidden; }
