/* Cannedly dashboard — shared styles. Tokens mirror the marketing site (cannedly.pages.dev). */
:root{
  --bg:#fbf8f3; --surface:#ffffff; --surface-2:#f3eee5; --ink:#1a1d2e; --ink-2:#4a4f63; --muted:#6e7387;
  --line:#e4ddd0; --line-2:#d6cdbd; --accent:#f2a93b; --accent-ink:#1a1d2e; --accent-soft:#fdf0d9; --accent-strong:#d98c17;
  --brand:#2f3a8f; --brand-soft:#e6e9fb; --ok:#1f8a5b; --ok-soft:#e1f3ea; --no:#b44a3c; --no-soft:#f8e6e2;
  --bubble:#e2e7ff; --chat-bg:#efe9df;
  --shadow-sm:0 1px 2px rgba(26,29,46,.06),0 1px 1px rgba(26,29,46,.04);
  --shadow:0 20px 50px -20px rgba(26,29,46,.25);
  --radius:16px; --radius-sm:10px;
  --sidebar:252px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#12141f; --surface:#1b1e2c; --surface-2:#23273a; --ink:#f1efe9; --ink-2:#c3c5d2; --muted:#9296aa;
    --line:#2f3346; --line-2:#3c4159; --accent:#f2a93b; --accent-ink:#1a1d2e; --accent-soft:#3a2f1c; --accent-strong:#f6bd62;
    --brand:#9aa6ff; --brand-soft:#262c52; --ok:#4cc38a; --ok-soft:#183427; --no:#e0806f; --no-soft:#3a201c;
    --bubble:#2e3768; --chat-bg:#171a27;
    --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow:0 20px 50px -20px rgba(0,0,0,.6);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#12141f; --surface:#1b1e2c; --surface-2:#23273a; --ink:#f1efe9; --ink-2:#c3c5d2; --muted:#9296aa;
  --line:#2f3346; --line-2:#3c4159; --accent:#f2a93b; --accent-ink:#1a1d2e; --accent-soft:#3a2f1c; --accent-strong:#f6bd62;
  --brand:#9aa6ff; --brand-soft:#262c52; --ok:#4cc38a; --ok-soft:#183427; --no:#e0806f; --no-soft:#3a201c;
  --bubble:#2e3768; --chat-bg:#171a27;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow:0 20px 50px -20px rgba(0,0,0,.6);
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden}
h1,h2,h3,h4{font-family:"Bricolage Grotesque",Inter,system-ui,sans-serif;line-height:1.15;margin:0;letter-spacing:-.02em;color:var(--ink)}
h1{font-size:clamp(1.6rem,3vw,2.05rem);font-weight:800}
h2{font-size:1.25rem;font-weight:800}
h3{font-size:1.02rem;font-weight:600}
p{margin:0}
a{color:var(--brand)}
img{max-width:100%}
button{font:inherit;color:inherit}
:focus-visible{outline:2.5px solid var(--accent);outline-offset:2px;border-radius:6px}
.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}
.muted{color:var(--muted)}
.fine{font-size:.84rem;color:var(--muted)}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
[hidden]{display:none!important}

/* ---------- logo ---------- */
.logo{display:inline-flex;align-items:center;gap:10px;font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:1.25rem;color:var(--ink);text-decoration:none;letter-spacing:-.02em}
.logo-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--accent);color:var(--accent-ink);font:800 1.15rem/1 "Bricolage Grotesque",sans-serif;flex:none;box-shadow:inset 0 -2px 0 rgba(26,29,46,.12)}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:11px;padding:10px 16px;font:600 .94rem/1.2 Inter,sans-serif;cursor:pointer;text-decoration:none;transition:transform .12s,box-shadow .15s,background .15s,border-color .15s;white-space:nowrap;min-height:40px}
.btn svg{width:17px;height:17px;flex:none}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none!important}
.btn-primary{background:var(--accent);color:var(--accent-ink);box-shadow:0 6px 16px -8px rgba(242,169,59,.9)}
.btn-primary:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 8px 20px -8px rgba(242,169,59,1)}
.btn-ghost{background:var(--surface);color:var(--ink);border:1.5px solid var(--line)}
.btn-ghost:hover:not(:disabled){border-color:var(--line-2);background:var(--surface-2)}
.btn-quiet{background:transparent;color:var(--ink-2)}
.btn-quiet:hover:not(:disabled){background:var(--surface-2);color:var(--ink)}
.btn-danger{background:var(--no);color:#fff}
.btn-danger:hover:not(:disabled){filter:brightness(1.07)}
.btn-danger-ghost{background:transparent;color:var(--no);border:1.5px solid color-mix(in srgb,var(--no) 35%,var(--line))}
.btn-danger-ghost:hover:not(:disabled){background:var(--no-soft)}
.btn-sm{padding:7px 12px;font-size:.86rem;min-height:34px;border-radius:9px}
.btn-block{width:100%}
.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:9px;border:0;background:transparent;color:var(--muted);cursor:pointer;flex:none;transition:background .12s,color .12s}
.icon-btn svg{width:18px;height:18px}
.icon-btn:hover:not(:disabled){background:var(--surface-2);color:var(--ink)}
.icon-btn:disabled{opacity:.4;cursor:not-allowed}
.icon-btn.danger:hover:not(:disabled){background:var(--no-soft);color:var(--no)}
.icon-btn.star.on{color:var(--accent-strong)}
.icon-btn.star.on svg{fill:currentColor}
.spinner{width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .7s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- forms ---------- */
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field label,.label{font-size:.84rem;font-weight:600;color:var(--ink-2)}
.field .hint{font-size:.8rem;color:var(--muted)}
.field .err{font-size:.8rem;color:var(--no);font-weight:500;min-height:0}
.input,.select,.textarea{width:100%;padding:10px 12px;border-radius:var(--radius-sm);border:1.5px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:.95rem;transition:border-color .12s,box-shadow .12s}
.input::placeholder,.textarea::placeholder{color:var(--muted)}
.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent)}
.input[aria-invalid="true"],.textarea[aria-invalid="true"]{border-color:var(--no)}
.input[readonly]{background:var(--surface-2);color:var(--ink-2)}
.textarea{resize:vertical;min-height:140px;line-height:1.5}
.select{appearance:none;-webkit-appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23767b8f' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}
.select-sm{padding:6px 30px 6px 10px;font-size:.86rem;border-radius:8px;background-position:right 10px center}
.slash-input{display:flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--radius-sm);background:var(--bg);transition:border-color .12s,box-shadow .12s}
.slash-input>span{padding-left:12px;font:700 1rem ui-monospace,Menlo,monospace;color:var(--accent-strong)}
.slash-input .input{border:0;background:transparent;padding-left:4px;box-shadow:none!important;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.slash-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent)}
.slash-input.invalid{border-color:var(--no)}
.row{display:flex;gap:12px;align-items:center}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-2>*{min-width:0}
@media (max-width:560px){.grid-2{grid-template-columns:1fr}}

/* switch */
.switch{display:flex;align-items:flex-start;gap:12px;cursor:pointer;user-select:none}
.switch input{position:absolute;opacity:0;width:1px;height:1px}
.switch .track{position:relative;width:40px;height:23px;border-radius:999px;background:var(--line-2);flex:none;transition:background .15s;margin-top:1px}
.switch .track:after{content:"";position:absolute;top:3px;left:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.switch input:checked+.track{background:var(--brand)}
.switch input:checked+.track:after{transform:translateX(17px)}
.switch input:focus-visible+.track{outline:2.5px solid var(--accent);outline-offset:2px}
.switch input:disabled+.track{opacity:.5}
.switch b{display:block;font-size:.9rem;font-weight:600}
.switch small{display:block;font-size:.8rem;color:var(--muted)}

/* ---------- chips & badges ---------- */
.chip{display:inline-flex;align-items:center;font:600 .82rem/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--ink);background:var(--accent-soft);padding:5px 8px;border-radius:7px;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:.74rem;font-weight:600;padding:3px 8px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}
.badge svg{width:12px;height:12px}
.badge-lock{background:var(--brand-soft);color:var(--brand)}
.badge-owner{background:var(--accent-soft);color:var(--ink)}
.badge-admin{background:var(--brand-soft);color:var(--brand)}
.badge-ok{background:var(--ok-soft);color:var(--ok)}
.badge-no{background:var(--no-soft);color:var(--no)}
.folder-tag{font-size:.78rem;color:var(--muted);display:inline-flex;align-items:center;gap:5px;min-width:0}
.folder-tag svg{width:13px;height:13px;flex:none}
.folder-tag span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- auth pages ---------- */
.auth{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.auth-brand{background:#1a1d2e;color:#f1efe9;padding:40px 48px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth-brand .logo{color:#f1efe9}
.auth-brand h1{color:#fbf8f3;font-size:clamp(1.9rem,3.4vw,2.7rem);max-width:15ch;margin:28px 0 14px}
.auth-brand p{color:#c3c5d2;max-width:38ch;font-size:1.02rem}
.auth-brand .canny{width:min(300px,70%);border-radius:28px;align-self:flex-start;margin:28px 0;box-shadow:0 30px 60px -30px rgba(242,169,59,.55)}
.auth-brand .quote{font-size:.9rem;color:#9296aa;border-left:3px solid var(--accent);padding-left:12px}
.auth-brand kbd{font-family:ui-monospace,Menlo,monospace;background:rgba(242,169,59,.16);color:#f6c47a;padding:1px 6px;border-radius:6px}
.auth-main{display:flex;align-items:center;justify-content:center;padding:40px 20px}
.auth-card{width:100%;max-width:420px}
.auth-card h2{font-size:1.65rem;margin-bottom:6px}
.auth-card .sub{color:var(--ink-2);margin-bottom:22px}
.auth-form{display:flex;flex-direction:column;gap:14px}
.tabs{display:flex;background:var(--surface-2);border-radius:12px;padding:4px;margin-bottom:24px;gap:4px}
.tabs button{flex:1;border:0;background:transparent;border-radius:9px;padding:9px 10px;font-weight:600;color:var(--ink-2);cursor:pointer;font-size:.92rem}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
.form-error{background:var(--no-soft);color:var(--no);border-radius:10px;padding:10px 12px;font-size:.88rem;font-weight:500}
.auth-mobile-logo{display:none;margin-bottom:28px}
@media (max-width:860px){
  .auth{grid-template-columns:1fr}
  .auth-brand{display:none}
  .auth-mobile-logo{display:flex}
  .auth-main{align-items:flex-start;padding:32px 16px}
}
.invite-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-bottom:22px;display:flex;gap:14px;align-items:center}
.invite-card img{width:56px;height:56px;border-radius:14px;flex:none}
.invite-card b{font-family:"Bricolage Grotesque",sans-serif;font-size:1.15rem;display:block;line-height:1.2;overflow-wrap:anywhere}

/* ---------- app shell ---------- */
.shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:18px 14px;gap:16px;z-index:30}
.sidebar .logo{padding:4px 8px}
.ws-box{background:var(--surface-2);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.ws-box .ws-label{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.ws-box .ws-name{font-weight:600;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ws-box .select{background-color:var(--surface);padding:7px 30px 7px 10px;font-size:.9rem;font-weight:600}
.ws-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.nav{display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:11px;padding:9px 10px;border-radius:10px;color:var(--ink-2);text-decoration:none;font-weight:500;font-size:.94rem;position:relative}
.nav a svg{width:19px;height:19px;flex:none;opacity:.85}
.nav a:hover{background:var(--surface-2);color:var(--ink)}
.nav a[aria-current="page"]{background:var(--accent-soft);color:var(--ink);font-weight:600}
.nav a[aria-current="page"] svg{opacity:1;color:var(--accent-strong)}
.nav a .count{margin-left:auto;font-size:.75rem;color:var(--muted);font-weight:600}
.sidebar-foot{margin-top:auto;border-top:1px solid var(--line);padding-top:14px;display:flex;align-items:center;gap:10px}
.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font:700 .8rem Inter,sans-serif;color:#1a1d2e;flex:none;text-transform:uppercase}
.who{min-width:0;flex:1}
.who b{display:block;font-size:.88rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who span{display:block;font-size:.76rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topbar{display:none}
.scrim{display:none}
.main{min-width:0;padding:32px 36px 64px}
.page{max-width:1080px;margin:0 auto}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap}
.page-head p{color:var(--ink-2);margin-top:6px}
.page-head .actions{display:flex;gap:8px;flex-wrap:wrap}
.loading{display:flex;align-items:center;gap:10px;color:var(--muted);padding:40px 0;justify-content:center}

@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .topbar{display:flex;position:sticky;top:0;z-index:20;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
  .topbar .ws-chip{font-size:.82rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;text-align:right}
  .sidebar{position:fixed;left:0;top:0;bottom:0;width:min(300px,86vw);transform:translateX(-102%);transition:transform .2s ease;box-shadow:var(--shadow)}
  .sidebar.open{transform:none}
  .scrim{display:block;position:fixed;inset:0;background:rgba(18,20,31,.45);z-index:25;opacity:0;pointer-events:none;transition:opacity .2s}
  .scrim.show{opacity:1;pointer-events:auto}
  .main{padding:20px 16px 56px}
}

/* ---------- cards / panels ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.card + .card{margin-top:16px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.card-head p{color:var(--muted);font-size:.86rem;margin-top:2px}
.stack{display:flex;flex-direction:column;gap:16px}

/* ---------- replies ---------- */
.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.search{position:relative;flex:1;min-width:200px}
.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--muted);pointer-events:none}
.search .input{padding-left:38px;background:var(--surface)}
.folders{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:18px;scrollbar-width:thin}
.folders button{flex:none;border:1.5px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 13px;font-size:.85rem;font-weight:500;color:var(--ink-2);cursor:pointer;display:inline-flex;gap:6px;align-items:center;max-width:220px}
.folders button span.n{color:var(--muted);font-size:.78rem}
.folders button .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.folders button:hover{border-color:var(--line-2)}
.folders button[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.folders button[aria-pressed="true"] span.n{color:color-mix(in srgb,var(--bg) 70%,transparent)}
.replies{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.reply{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 16px 12px;display:flex;flex-direction:column;gap:10px;min-width:0;transition:border-color .15s,box-shadow .15s}
.reply:hover{border-color:var(--line-2);box-shadow:var(--shadow-sm)}
.reply-top{display:flex;align-items:flex-start;gap:8px}
.reply-title{flex:1;min-width:0}
.reply-title h3{font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reply-title .meta{display:flex;gap:6px;align-items:center;margin-top:7px;flex-wrap:wrap}
.reply-body{font-size:.9rem;color:var(--ink-2);white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;min-height:2.8em}
.reply-body .ph{background:var(--brand-soft);color:var(--brand);border-radius:5px;padding:0 3px;font-weight:500}
.reply-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding-top:8px;margin-top:auto}
.reply-foot .fine{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.reply-actions{display:flex;gap:2px;flex:none}
.reply-actions .icon-btn{width:32px;height:32px}
.reply-actions .icon-btn svg{width:16px;height:16px}

/* ---------- modal ---------- */
.modal-wrap{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(18,20,31,.5);animation:fade .15s ease}
.modal{background:var(--surface);border-radius:20px;box-shadow:var(--shadow);width:100%;max-width:880px;max-height:calc(100vh - 40px);display:flex;flex-direction:column;animation:pop .18s ease;border:1px solid var(--line)}
.modal.sm{max-width:440px}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line)}
.modal-body{padding:20px 22px;overflow-y:auto}
.modal-foot{display:flex;justify-content:space-between;gap:10px;padding:14px 22px;border-top:1px solid var(--line);flex-wrap:wrap}
.modal-foot .right{display:flex;gap:8px;margin-left:auto}
.editor{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px}
.editor .form{display:flex;flex-direction:column;gap:14px}
.preview{background:var(--chat-bg);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:10px;min-height:240px;align-self:start;position:sticky;top:0}
.preview-head{display:flex;align-items:center;gap:10px;font-size:.84rem;color:var(--muted)}
.preview-head .pa{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#f6c47a,#e98a5b);flex:none}
.preview-head b{color:var(--ink);font-size:.9rem;display:block;line-height:1.2}
.bubble{align-self:flex-end;max-width:92%;background:var(--bubble);color:var(--ink);padding:10px 12px;border-radius:14px;border-top-right-radius:4px;font-size:.92rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 1px 1px rgba(0,0,0,.06)}
.bubble.empty{color:var(--muted);font-style:italic}
.bubble mark{background:color-mix(in srgb,var(--accent) 40%,transparent);color:inherit;border-radius:4px;padding:0 2px}
.bubble-in{align-self:flex-start;background:var(--surface);border-radius:14px;border-top-left-radius:4px;padding:9px 12px;font-size:.9rem;max-width:85%}
.counter{font-size:.78rem;color:var(--muted);text-align:right}
.counter.over{color:var(--no);font-weight:600}
.locked-note{display:flex;gap:10px;align-items:flex-start;background:var(--brand-soft);color:var(--ink);border-radius:12px;padding:11px 13px;font-size:.88rem}
.locked-note svg{width:18px;height:18px;color:var(--brand);flex:none;margin-top:1px}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.99)}}
@media (max-width:760px){
  .editor{grid-template-columns:1fr}
  .preview{position:static;min-height:0}
  .editor .textarea{min-height:120px;height:150px}
}
@media (max-width:560px){
  .modal-wrap{padding:0;align-items:flex-end}
  .modal{max-height:94vh;border-radius:20px 20px 0 0}
  .modal-head,.modal-body,.modal-foot{padding-left:16px;padding-right:16px}
}

/* ---------- empty state ---------- */
.empty{text-align:center;padding:44px 20px;background:var(--surface);border:1.5px dashed var(--line-2);border-radius:var(--radius);display:flex;flex-direction:column;align-items:center;gap:10px}
.empty img{width:112px;height:112px;border-radius:26px;margin-bottom:6px;box-shadow:0 18px 40px -22px rgba(242,169,59,.8)}
.empty h3{font-family:"Bricolage Grotesque",sans-serif;font-size:1.2rem;font-weight:800}
.empty p{color:var(--ink-2);max-width:42ch}
.empty .btn{margin-top:8px}
.empty.compact{padding:26px 16px}
.empty.compact img{width:72px;height:72px;border-radius:18px}

/* ---------- team ---------- */
.seats{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.seats .big{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:2rem;line-height:1}
.seats .big small{font-size:1rem;color:var(--muted);font-weight:600}
.meter{height:10px;background:var(--surface-2);border-radius:999px;overflow:hidden;flex:1;min-width:140px}
.meter i{display:block;height:100%;background:var(--accent);border-radius:999px;transition:width .4s ease}
.meter.full i{background:var(--no)}
.list{display:flex;flex-direction:column}
.list-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);flex-wrap:wrap}
.list-row:first-child{border-top:0;padding-top:2px}
.list-row .who{min-width:160px}
.list-row .who b{font-size:.94rem}
.list-row .stat-cell{font-size:.84rem;color:var(--muted);min-width:84px;text-align:right}
.list-row .stat-cell b{color:var(--ink);font-weight:600}
.list-row .ctrl{display:flex;gap:6px;align-items:center;margin-left:auto}
.list-row .who b .you{display:inline;font-size:.75rem;color:var(--muted);font-weight:500;margin-left:6px}
.invite-new{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.copy-field{display:flex;gap:8px;margin-top:14px;align-items:center}
.copy-field .input{font-family:ui-monospace,Menlo,monospace;font-size:.86rem}
.invite-code{font:600 .86rem ui-monospace,Menlo,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:560px){
  .list-row .stat-cell{text-align:left;min-width:0}
  .list-row .ctrl{margin-left:46px;width:100%}
  .list-row .who{min-width:0;flex:1 1 60%}
  .invite-row .ctrl{margin-left:0}
}

/* ---------- insights ---------- */
.seg{display:inline-flex;background:var(--surface-2);border-radius:10px;padding:3px;gap:2px}
.seg button{border:0;background:transparent;padding:6px 12px;border-radius:8px;font-weight:600;font-size:.86rem;color:var(--ink-2);cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
@media (max-width:980px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.tiles{gap:10px}.tile{padding:14px}.tile .k{font-size:.7rem;letter-spacing:.04em}.tile .v{font-size:1.7rem}}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px}
.tile .k{font-size:.8rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.tile .v{font-family:"Bricolage Grotesque",sans-serif;font-weight:800;font-size:2rem;line-height:1.1;margin-top:8px;color:var(--ink);overflow-wrap:anywhere}
.tile .v small{font-size:.95rem;color:var(--muted);font-weight:600;margin-left:2px}
.tile .s{font-size:.8rem;color:var(--muted);margin-top:4px}
.tile.hero{background:var(--ink);border-color:var(--ink)}
.tile.hero .k,.tile.hero .s{color:color-mix(in srgb,var(--bg) 65%,transparent)}
.tile.hero .v{color:var(--accent)}
.insights-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px}
@media (max-width:980px){.insights-grid{grid-template-columns:1fr}}
.insights-grid .card + .card{margin-top:0}
.daily{display:flex;align-items:flex-end;gap:3px;height:180px;padding-top:8px;border-bottom:1.5px solid var(--line)}
.daily .b{flex:1;min-width:0;display:flex;align-items:flex-end;height:100%;position:relative}
.daily .b i{display:block;width:100%;background:var(--accent);border-radius:4px 4px 1px 1px;min-height:2px;transition:height .4s ease}
.daily .b.zero i{background:var(--line)}
.daily .b:hover i{background:var(--accent-strong)}
.daily .b:hover:after{content:attr(data-tip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);background:var(--ink);color:var(--bg);font-size:.74rem;padding:4px 8px;border-radius:6px;white-space:nowrap;z-index:2;pointer-events:none}
.daily.dense{gap:1px}
.daily.dense .b i{border-radius:2px 2px 0 0}
.daily-axis{display:flex;justify-content:space-between;font-size:.74rem;color:var(--muted);margin-top:6px}
.hbars{display:flex;flex-direction:column;gap:12px}
.hbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center}
.hbar .nm{display:flex;gap:8px;align-items:center;min-width:0;font-size:.9rem}
.hbar .nm span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink-2)}
.hbar .ct{font-weight:600;font-size:.88rem;font-variant-numeric:tabular-nums}
.hbar .track{grid-column:1/-1;height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden}
.hbar .track i{display:block;height:100%;background:var(--brand);border-radius:999px}
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:.9rem}
.table th,.table td{padding:11px 10px;text-align:left;border-bottom:1px solid var(--line)}
.table th{font-size:.76rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600}
.table td.num,.table th.num{text-align:right;font-variant-numeric:tabular-nums}
.table tr:last-child td{border-bottom:0}
.table .person{display:flex;align-items:center;gap:10px;min-width:0}
.table .person .avatar{width:28px;height:28px;font-size:.7rem}

/* ---------- extension page ---------- */
.steps{counter-reset:s;display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}
.steps li{counter-increment:s;display:flex;gap:14px;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
.steps li:before{content:counter(s);display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--accent);color:var(--accent-ink);font:800 .95rem "Bricolage Grotesque",sans-serif;flex:none}
.steps li>div>b{display:block;margin-bottom:3px}
.steps li p{color:var(--ink-2);font-size:.92rem}
.steps code,.code{font-family:ui-monospace,Menlo,monospace;background:var(--surface-2);padding:1px 6px;border-radius:6px;font-size:.86em;overflow-wrap:anywhere}
.ext-hero{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:24px;align-items:center;background:var(--ink);color:var(--bg);border-radius:20px;padding:26px 28px;margin-bottom:18px}
.ext-hero h2{color:#fbf8f3;font-size:1.5rem}
.ext-hero p{color:#c3c5d2;margin:8px 0 16px;max-width:52ch}
.ext-hero img{width:100%;border-radius:22px}
.ext-hero .fine{color:#9296aa;margin-top:10px}
:root[data-theme="dark"] .ext-hero,:root[data-theme="dark"] .tile.hero{background:#0c0e16;border:1px solid var(--line)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .ext-hero,:root:not([data-theme="light"]) .tile.hero{background:#0c0e16;border:1px solid var(--line)}}
@media (max-width:640px){.ext-hero{grid-template-columns:1fr;padding:22px}.ext-hero img{display:none}}

/* ---------- settings ---------- */
.settings-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.settings-form .field{flex:1;min-width:200px}
.kv{display:grid;grid-template-columns:140px minmax(0,1fr);gap:10px 16px;font-size:.92rem}
.kv dt{color:var(--muted)}
.kv dd{margin:0;overflow-wrap:anywhere}
@media (max-width:480px){.kv{grid-template-columns:1fr;gap:2px}.kv dd{margin-bottom:10px}}
.danger-zone{border-color:color-mix(in srgb,var(--no) 30%,var(--line))}

/* ---------- toasts ---------- */
.toasts{position:fixed;right:20px;bottom:20px;z-index:100;display:flex;flex-direction:column;gap:10px;max-width:min(380px,calc(100vw - 32px));pointer-events:none}
.toast{pointer-events:auto;display:flex;gap:10px;align-items:flex-start;background:var(--ink);color:var(--bg);padding:12px 14px;border-radius:12px;box-shadow:var(--shadow);font-size:.9rem;animation:toastIn .2s ease;border-left:4px solid var(--accent)}
.toast svg{width:18px;height:18px;flex:none;margin-top:1px}
.toast.ok{border-left-color:#4cc38a}
.toast.ok svg{color:#4cc38a}
.toast.err{border-left-color:#e0806f}
.toast.err svg{color:#e0806f}
.toast.out{opacity:0;transform:translateY(6px);transition:.2s}
.toast span{flex:1;overflow-wrap:anywhere}
@keyframes toastIn{from{opacity:0;transform:translateY(8px)}}
@media (max-width:560px){.toasts{left:16px;right:16px;bottom:16px;max-width:none}}

@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
a.sr-only:focus{position:fixed!important;left:12px;top:12px;width:auto;height:auto;clip:auto;margin:0;padding:10px 14px;background:var(--ink);color:var(--bg);border-radius:10px;z-index:200;white-space:nowrap}
