/* GrowthView — GrowthWorks-branded session viewer (navy · brass · ivory). */

:root {
  /* brand */
  --navy:      #0F2A44;
  --navy-deep: #07182B;
  --navy-600:  #355F82;
  --navy-500:  #5479A0;
  --brass:     #A57A30;   /* accent w/ contrast on ivory */
  --brass-lt:  #C99E5C;   /* accent on navy */
  --brass-dp:  #8C6829;
  --gain:      #2F5D43;

  /* surfaces */
  --bg:        #ECE6D9;
  --panel:     #FBF8F2;
  --panel-2:   #F4EFE4;
  --card:      #FFFFFF;
  --ink:       #1C2128;
  --ink-soft:  #3A434F;
  --ink-faint: #77716A;
  --line:      #E4DCCB;
  --line-soft: #EDE7DA;

  --user-bg:   #E9EFF6;   /* navy-tinted employee bubble */
  --user-line: #C7D7E6;
  --user-ink:  #123253;
  --claude-bg: #FFFFFF;
  --accent-wash:#F3E9D4;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,24,29,.05), 0 8px 22px rgba(15,42,68,.07);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono:  ui-monospace, "Cascadia Code", "Consolas", Menlo, monospace;
  --sans:  -apple-system, "Segoe UI", Roboto, system-ui, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; }

/* ---------------- intro splash ---------------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(120% 120% at 50% 30%, #123458 0%, var(--navy) 45%, var(--navy-deep) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
body.app-ready .splash { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner { text-align: center; animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.splash-logo { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.splash-word { font-family: var(--serif); font-weight: 600; font-size: 44px; color: #FBF8F2; margin-top: 22px; letter-spacing: .01em; }
.splash-word span { color: var(--brass-lt); }
.splash-tag { color: #C6D2DE; margin-top: 10px; font-size: 14.5px; max-width: 340px; }
.splash-bar { width: 180px; height: 3px; border-radius: 3px; background: rgba(201,158,92,.2); margin: 26px auto 0; overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--brass-lt); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-120%);} 100% { transform: translateX(360%);} }
.splash-foot { position: absolute; bottom: 26px; color: #8199B2; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; }

/* ---------------- top bar (navy masthead) ---------------- */
.topbar { display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: var(--navy); border-bottom: 2px solid var(--brass-dp); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 20px; color: #FBF8F2; }
.brand-name span { color: var(--brass-lt); }
.brand-sub { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #7C97B1; margin-top: 2px; }
.search-wrap { position: relative; flex: 1; max-width: 560px; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: #6E8AA6; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search { width: 100%; padding: 9px 14px 9px 37px; border: 1px solid #244A6B; border-radius: 999px; background: #0B2138; font: inherit; color: #EAF1F8; outline: none; transition: border-color .15s, background .15s; }
.search:focus { border-color: var(--brass-lt); background: #0D263F; }
.search::placeholder { color: #6E8AA6; }
.mast-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mast-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #244A6B; background: #0B2138; color: #DCE7F2; font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.mast-btn:hover { border-color: var(--brass-lt); color: #fff; }
.mast-btn svg { width: 15px; height: 15px; fill: var(--brass-lt); }
.mast-btn[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: #17293c; }
.mast-btn[aria-pressed="true"] svg { fill: #17293c; }
.mast-btn[hidden] { display: none; }
.live { display: flex; align-items: center; gap: 8px; color: #C6D2DE; font-size: 13px; white-space: nowrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #5FBF88; box-shadow: 0 0 0 0 rgba(95,191,136,.5); animation: ping 1.8s ease-out infinite; }
.pulse.idle { background: #4b6076; animation: none; }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(95,191,136,.45);} 70%{box-shadow:0 0 0 7px rgba(95,191,136,0);} 100%{box-shadow:0 0 0 0 rgba(95,191,136,0);} }

/* ---------------- layout ---------------- */
.layout { display: grid; grid-template-columns: 244px 288px 1fr; height: calc(100vh - 56px); overflow: hidden; }
.layout.assets-open { grid-template-columns: 236px 258px minmax(300px, 1fr) 322px; }
.col { overflow-y: auto; }
.people-col { background: var(--panel); border-right: 1px solid var(--line); }
.sessions-col { background: var(--panel-2); border-right: 1px solid var(--line); }
.chat-col { background: var(--bg); }
.assets-col { display: none; background: var(--panel); border-left: 1px solid var(--line); }
.layout.assets-open .assets-col { display: block; }
.col-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-dp); position: sticky; top: 0; background: inherit; z-index: 2; }
.count { font-weight: 600; color: var(--ink-faint); letter-spacing: 0; }
.list { padding: 4px 10px 16px; }

/* people */
.person { width: 100%; text-align: left; border: 0; background: transparent; display: flex; gap: 11px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; transition: background .12s; }
.person:hover { background: var(--panel-2); }
.person[aria-selected="true"] { background: var(--accent-wash); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 650; font-size: 14px; position: relative; }
.avatar .status { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--panel); background: #b8b0a2; }
.avatar .status.on { background: var(--gain); }
.person-main { min-width: 0; flex: 1; }
.person-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sessions */
.session { width: 100%; text-align: left; border: 1px solid transparent; background: var(--card); display: block; padding: 12px 13px; border-radius: 12px; cursor: pointer; font: inherit; color: inherit; margin-bottom: 8px; box-shadow: var(--shadow); transition: border-color .12s; }
.session:hover { border-color: var(--line); }
.session[aria-selected="true"] { border-color: var(--brass); box-shadow: 0 0 0 2px var(--accent-wash), var(--shadow); }
.session-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.session-name { flex: 1; min-width: 0; font-family: var(--serif); font-weight: 600; font-size: 15.5px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-tag { font-size: 11px; color: var(--ink-faint); white-space: nowrap; flex: none; }
.session-tag.live { color: var(--gain); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.session-tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gain); }
.session-date { font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.session-stats { display: flex; gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--ink-faint); }
.session-stats b { color: var(--ink-soft); font-weight: 600; }
.list .empty { padding: 18px 12px; color: var(--ink-faint); font-size: 13px; }

/* ---------------- chat ---------------- */
.chat-empty { max-width: 400px; margin: 15vh auto 0; text-align: center; padding: 0 24px; }
.chat-empty-art { width: 58px; height: 58px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--navy); border-radius: 16px; }
.chat-empty-art svg { width: 30px; height: 30px; fill: var(--brass-lt); }
.chat-empty h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; color: var(--navy); }
.chat-empty p { color: var(--ink-soft); margin: 0; }

.chat-head { position: sticky; top: 0; z-index: 3; background: rgba(236,230,217,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 14px 28px; display: flex; align-items: center; gap: 14px; }
.chat-head-main { min-width: 0; }
.chat-title { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.chat-sub span + span::before { content: "·"; margin: 0 7px; color: var(--line); }
.export { margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font: inherit; font-size: 12.5px; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.export:hover { border-color: var(--brass); color: var(--brass-dp); }

.thread { max-width: 800px; margin: 0 auto; padding: 22px 24px 80px; }
.daydiv { text-align: center; margin: 22px 0 14px; border-top: 1px solid var(--line-soft); line-height: 0; }
.daydiv span { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); background: var(--bg); padding: 0 12px; position: relative; top: -1px; }

.msg { display: flex; gap: 12px; margin: 16px 0; align-items: flex-start; }
.msg.claude { margin-right: 16%; }
.msg.user { flex-direction: row-reverse; margin-left: 16%; }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 650; margin-top: 2px; }
.msg.claude .msg-avatar { background: #F6F0E4; border: 1px solid #E9DFC9; }
.msg.user .msg-avatar { color: #fff; }
.msg-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.msg.user .msg-col { align-items: flex-end; }
.msg-meta { font-size: 11.5px; color: var(--ink-faint); margin: 0 4px 4px; }
.msg-meta b { color: var(--ink-soft); font-weight: 600; }

.bubble { border-radius: 14px; padding: 11px 15px; box-shadow: var(--shadow); overflow-wrap: anywhere; word-break: break-word; }
.msg.claude .bubble { background: var(--claude-bg); border: 1px solid var(--line); border-top-left-radius: 5px; }
.msg.user .bubble { background: var(--user-bg); border: 1px solid var(--user-line); border-top-right-radius: 5px; color: var(--user-ink); }
.bubble p { margin: 0 0 10px; } .bubble p:last-child { margin-bottom: 0; }
.bubble h1, .bubble h2, .bubble h3 { font-family: var(--serif); margin: 12px 0 6px; line-height: 1.3; font-weight: 600; color: var(--navy); }
.bubble h1 { font-size: 19px; } .bubble h2 { font-size: 17px; } .bubble h3 { font-size: 15px; }
.bubble ul, .bubble ol { margin: 6px 0 10px; padding-left: 22px; } .bubble li { margin: 3px 0; }
.bubble a { color: var(--brass-dp); }
.bubble code.inline { font-family: var(--mono); font-size: .88em; background: var(--panel-2); border: 1px solid var(--line-soft); padding: 1px 5px; border-radius: 6px; }
.bubble pre { background: var(--navy-deep); color: #e7ecf3; border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 8px 0; }
.bubble pre code { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre; }

.chips { margin: 6px 4px 2px; display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.msg.user .chips { align-items: flex-end; }
details.chip { border: 1px solid var(--line); background: var(--card); border-radius: 10px; overflow: hidden; max-width: 100%; }
details.chip > summary { list-style: none; cursor: pointer; padding: 7px 12px; font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; user-select: none; }
details.chip > summary::-webkit-details-marker { display: none; }
.chip .ic { font-size: 14px; line-height: 1; }
.chip .lbl { font-weight: 600; }
.chip .det { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip .arrow { margin-left: auto; padding-left: 8px; color: var(--ink-faint); transition: transform .15s; flex: none; }
details.chip[open] .arrow { transform: rotate(90deg); }
.chip pre { margin: 0; border-top: 1px solid var(--line-soft); background: var(--navy-deep); color: #e7ecf3; padding: 11px 13px; overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chip.think > summary { color: var(--brass-dp); }
.chip.think pre { background: #efe7d6; color: #4a3d22; }

.flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--brass-dp); background: var(--accent-wash); border: 1px solid #e6d3ab; border-radius: 999px; padding: 2px 9px; margin: 6px 4px 0; }
.subtle-note { text-align: center; color: var(--ink-faint); font-size: 12px; margin: 10px 0; }

/* search */
.result { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; margin: 0 0 10px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow); display: block; }
.result:hover { border-color: var(--brass); }
.result-meta { display: flex; gap: 10px; font-size: 12px; color: var(--ink-faint); margin-bottom: 5px; }
.result-meta b { color: var(--ink-soft); font-weight: 600; }
.result-excerpt { font-size: 13.5px; color: var(--ink); }
.result-excerpt mark { background: #f6e4b8; border-radius: 3px; padding: 0 2px; }

.col::-webkit-scrollbar, .chip pre::-webkit-scrollbar, .bubble pre::-webkit-scrollbar { width: 10px; height: 10px; }
.col::-webkit-scrollbar-thumb { background: #d8cdb4; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }

/* ---------------- skills & memory (assets) ---------------- */
.assets-head { position: sticky; top: 0; z-index: 2; background: var(--panel); display: flex; align-items: center; justify-content: space-between; padding: 15px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.assets-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-dp); }
.assets-hide { border: 0; background: transparent; color: var(--ink-faint); font-size: 15px; cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.assets-hide:hover { background: var(--panel-2); color: var(--ink); }
.assets-list { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.assets-list .empty { color: var(--ink-faint); font-size: 12.5px; padding: 10px 4px; }

.artifact { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.artifact-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; flex: none; }
.badge.skill { background: var(--accent-wash); color: var(--brass-dp); }
.badge.memory { background: #e7eef6; color: #234A6B; }
.badge.agent { background: #efe7f6; color: #6d4a9c; }
.artifact-name { font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.artifact-meta { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 8px; }
.artifact-preview { font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--ink-soft); background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 9px 10px; max-height: 104px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; }
.artifact-actions { display: flex; gap: 8px; }
.artifact-btn { flex: 1; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-soft); font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.artifact-btn:hover { border-color: var(--brass); color: var(--brass-dp); }
.artifact-btn.primary { background: var(--navy); border-color: var(--navy); color: #FBF8F2; }
.artifact-btn.primary:hover { background: var(--navy-deep); color: #fff; }

.library { max-width: 1040px; margin: 0 auto; padding: 16px 24px 90px; }
.library-group { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brass-dp); margin: 20px 2px 12px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; }

/* ---------------- sharing / roles / keys ---------------- */
.role-member .admin-only { display: none !important; }

.chat-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.share-btn { border: 1px solid var(--brass); background: var(--card); color: var(--brass-dp); font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.share-btn:hover { background: var(--accent-wash); }
.share-btn.on { background: var(--gain); border-color: var(--gain); color: #fff; }
.shared-badge { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; background: #e7eef6; color: #234A6B; white-space: nowrap; }
.shared-badge.on { background: #e2f0e8; color: var(--gain); }
.session-shared { margin-top: 7px; font-size: 11px; font-weight: 600; color: var(--gain); display: inline-flex; align-items: center; gap: 5px; }
.session-shared::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gain); }

.share-pop { position: fixed; z-index: 50; width: 262px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(15,42,68,.18); padding: 14px; }
.share-pop-h { font-weight: 650; font-size: 13.5px; margin-bottom: 10px; color: var(--navy); }
.share-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-bottom: 12px; }
.share-toggle input { width: 16px; height: 16px; accent-color: var(--gain); }
.share-lbl { font-size: 11px; font-weight: 600; color: var(--ink-faint); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.share-input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.share-input:focus { outline: none; border-color: var(--brass); }
.share-actions { display: flex; gap: 8px; margin-top: 12px; }
.share-save { flex: 1; border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 600; font-size: 13px; padding: 8px; border-radius: 8px; cursor: pointer; }
.share-save:hover { background: var(--navy-deep); }
.share-cancel { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }

.keys-view { max-width: 720px; margin: 0 auto; padding: 20px 24px 90px; }
.key-form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.key-form-h { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--navy); margin-bottom: 12px; }
.key-form-row { display: flex; gap: 10px; }
.key-input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; }
.key-input:focus { outline: none; border-color: var(--brass); }
.key-add { border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.key-add:hover { background: var(--navy-deep); }
.key-out:empty { display: none; }
.key-new { margin-top: 14px; background: var(--accent-wash); border: 1px solid #e6d3ab; border-radius: 10px; padding: 12px; }
.key-new-h { font-weight: 650; font-size: 13px; color: var(--brass-dp); margin-bottom: 8px; }
.key-code { display: block; font-family: var(--mono); font-size: 11.5px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; word-break: break-all; margin-bottom: 8px; }
.key-hint { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
.copy-block { margin: 10px 0; }
.copy-title { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .key-code { flex: 1; margin: 0; }
.copy-row .key-mini { flex: none; }
.keys-list { margin-top: 22px; }
.keys-list-h { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brass-dp); margin-bottom: 10px; }
.keys-list .empty { color: var(--ink-faint); font-size: 13px; padding: 6px 2px; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; box-shadow: var(--shadow); }
.key-row.revoked { opacity: .55; }
.key-info { flex: 1; min-width: 0; }
.key-name { font-weight: 600; }
.key-sub { font-size: 12px; color: var(--ink-faint); }
.key-mini { border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.key-mini:hover { border-color: var(--brass); color: var(--brass-dp); }
.key-mini.danger:hover { border-color: #b0533f; color: #b0533f; }

/* artifact edit control + agents section */
.artifact-edit { margin-left: auto; border: 0; background: transparent; color: var(--ink-faint); font-size: 13px; cursor: pointer; padding: 2px 7px; border-radius: 6px; flex: none; line-height: 1; }
.artifact-edit:hover { background: var(--panel-2); color: var(--brass-dp); }
.share-pop.wide { width: 430px; }

.agents-view { max-width: 1000px; margin: 0 auto; padding: 18px 24px 90px; }
.agents-empty { color: var(--ink-faint); font-size: 13.5px; padding: 22px 4px; }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 10px; }
.agent-card { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.agent-top { display: flex; align-items: center; gap: 11px; margin-bottom: 11px; }
.agent-avatar { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--navy); color: var(--brass-lt); font-size: 18px; }
.agent-h { min-width: 0; flex: 1; }
.agent-name { font-family: var(--serif); font-weight: 600; font-size: 16px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-sub { font-size: 12px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.agent-actions { display: flex; gap: 8px; }
.agent-actions .artifact-btn { flex: 1; }
.agent-card.draft { opacity: .74; border-style: dashed; }
.agent-pub { flex: none; border: 1px solid var(--gain); background: transparent; color: var(--gain); font: inherit; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.agent-pub.on { background: var(--gain); color: #fff; }
.agent-pub:hover { filter: brightness(1.05); }
.agent-pub:disabled { opacity: .6; cursor: default; }

@media (max-width: 1200px) {
  .layout.assets-open { grid-template-columns: 236px 258px 1fr; }
  .layout.assets-open .assets-col { display: none; }
}
@media (max-width: 980px) {
  .layout, .layout.assets-open { grid-template-columns: 190px 1fr; }
  .sessions-col, .assets-col { display: none; }
  .msg.claude { margin-right: 6%; }
  .msg.user { margin-left: 6%; }
  .thread { padding: 18px 16px 70px; }
}
@media (max-width: 560px) {
  .layout, .layout.assets-open { grid-template-columns: 1fr; }
  .people-col { display: none; }
  .msg.claude, .msg.user { margin: 16px 0; }
}
