
/* Layout: quiet light sidebar + one large rounded panel (reference: Arena).
   Views: Home (start) · Projects (previous projects grid) · Project (chat left, live website preview right).
   Project top bar follows the 10Web reference: name menu, history, Code editor, WordPress, fullscreen, Publish. */
:root {
  --bg: #FAFAF8; --panel: #FCFCFA; --card: #FFFFFF; --soft: #F3F2EE;
  --line: #E8E7E2; --line-strong: #DAD9D3;
  --fg: #1B1B19; --muted: #6B6A64; --faint: #A3A29B;
  --ink: #161615; --ink-fg: #FFFFFF;
  --blue: #2F5BEA; --blue-soft: #E9EEFD;
  --ok: #2F7D4F; --warn: #A3620A;
  --shadow: 0 1px 2px rgba(27,27,25,.05), 0 5px 17px rgba(27,27,25,.07);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161614; --panel: #1A1A18; --card: #20201E; --soft: #262623;
    --line: #2D2D2A; --line-strong: #3A3A36; --fg: #ECEAE4; --muted: #A4A29A; --faint: #74726C;
    --ink: #ECEAE4; --ink-fg: #161614; --blue: #7C9BFF; --blue-soft: #1F2644; --ok: #6CC795; --warn: #E0A54A;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 5px 17px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161614; --panel: #1A1A18; --card: #20201E; --soft: #262623;
  --line: #2D2D2A; --line-strong: #3A3A36; --fg: #ECEAE4; --muted: #A4A29A; --faint: #74726C;
  --ink: #ECEAE4; --ink-fg: #161614; --blue: #7C9BFF; --blue-soft: #1F2644; --ok: #6CC795; --warn: #E0A54A;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 5px 17px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 5px; }
svg.i { width: 15.5px; height: 15.5px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { position: relative; }

[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 8.5px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--ink-fg); font: 11px/1 var(--sans); padding: 7.5px 10.5px; border-radius: 6px;
  white-space: nowrap; z-index: 30; box-shadow: var(--shadow); pointer-events: none;
}

/* ---------- Frame ---------- */
.app { position: relative; display: grid; grid-template-columns: clamp(190px, var(--side-w, 227px), 40vw) minmax(0, 1fr); height: 100%; padding: 8.5px 8.5px 8.5px 0; }
.app.closed { grid-template-columns: 60px minmax(0, 1fr); padding-left: 0; }
.app.closed .side { visibility: visible; align-items: center; gap: 5px; padding: 10.5px 5px 7px; overflow: visible; }
.app.closed .side-top { justify-content: center; width: 100%; margin-bottom: 12px; }
.app.closed .brand-name, .app.closed .brand .brand-mark, .app.closed .new > span, .app.closed .nav-item > span, .app.closed .side-label, .app.closed .recent, .app.closed .side-empty, .app.closed .plan-card, .app.closed .account-btn > span:not(.avatar) { display: none; }
.app.closed .brand { display: none; }
.app.closed .collapse-side { display: inline-grid; margin: 0; }
.app.closed .new, .app.closed .nav-item { justify-content: center; width: 42px; height: 38px; padding: 0; }
.app.closed .side-menu, .app.closed .agency-menu { width: 42px; }
.app.closed .side-divider { display: none; }
.app.closed .new .i, .app.closed .nav-item .i { width: 18px; height: 18px; }
.app.closed .account, .app.closed .account-btn { width: 42px; padding: 0; justify-content: center; }
.app.closed .side [data-tip]::after { left: calc(100% + 8px); }

.side { display: flex; flex-direction: column; gap: 5px; padding: 10.5px 12px 7px 19px; min-height: 0; overflow-y: auto; }
.side > * { flex-shrink: 0; }
.side-top { display: flex; align-items: center; height: 38px; margin-bottom: 19px; }
.brand { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 3.5px 5px 3.5px 0; border-radius: 7px; }
.brand-mark { width: 19px; height: 19px; }
.brand-name { font: 500 18px/1 var(--serif); letter-spacing: -.02em; }
.brand .i { width: 12px; height: 12px; color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 7.5px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--fg); }
.icon-btn[aria-pressed="true"] { background: var(--soft); color: var(--fg); }
.side-top .icon-btn { margin-left: auto; }

.new { display: flex; align-items: center; gap: 8.5px; height: 36px; padding: 0 10.5px; width: 100%; border: 1px solid transparent; border-radius: 8.5px; background: transparent; text-align: left; font: 14px var(--sans); }
.new:hover, .new[aria-current="page"] { background: var(--soft); }
.side-menu, .agency-menu { display: grid; gap: 5px; }
.side-divider { height: 1px; margin: 8px 10.5px 3px; background: var(--line); }
.nav-item[draggable="true"] { cursor: grab; }
.nav-item[draggable="true"]:active { cursor: grabbing; }
.nav-item.dragging { opacity: .44; }
.nav-item.drag-over { box-shadow: inset 0 2px 0 var(--blue); }
.nav-item { display: flex; align-items: center; gap: 8.5px; height: 32.5px; padding: 0 10.5px; width: 100%; border: 0; border-radius: 7.5px; background: transparent; text-align: left; font: 14px var(--sans); color: var(--fg); }
.nav-item .i { color: var(--muted); }
.nav-item:hover, .nav-item[aria-current="page"] { background: var(--soft); }
.nav-item .count { margin-left: auto; font: 11px var(--sans); color: var(--faint); }

.side-label { display: flex; align-items: center; margin: 19px 10.5px 3.5px; font-size: 11px; color: var(--faint); }
.side-label button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 11px; padding: 2px 5px; border-radius: 5px; }
.side-label button:hover { background: var(--soft); color: var(--fg); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.recent button.r-open { display: flex; align-items: center; gap: 8.5px; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 10.5px; border-radius: 7px; font-size: 12px; color: var(--muted); }
.recent button span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent button:hover, .recent button[aria-current="true"] { background: var(--soft); color: var(--fg); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

.side-spacer { flex: 1; }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 10.5px; width: 100%; padding: 7px; border: 0; border-radius: 8.5px; background: transparent; text-align: left; }
.account-btn:hover { background: var(--soft); }
.avatar { width: 32.5px; height: 32.5px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #3D4A42; color: #E3EEE7; font: 500 11px var(--sans); }
.account-name { display: block; font-size: 12px; font-weight: 500; }
.account-mail { display: block; font-size: 11px; color: var(--muted); }

/* Popovers and menus */
.pop { position: absolute; z-index: 25; min-width: 189px; background: var(--card); border: 1px solid var(--line); border-radius: 10.5px; box-shadow: var(--shadow); padding: 5px; }
.pop.up { left: 0; right: 0; bottom: calc(100% + 5px); }
.pop.down { top: calc(100% + 5px); left: 0; }
.pop.down.right { left: auto; right: 0; }
.pop-label { font-size: 10.5px; color: var(--faint); padding: 5px 7px 3.5px; }
.pop-row { display:flex; align-items:center; justify-content:space-between; padding-right:3px; }
.pop-row .pop-label { padding:5px 7px 3.5px; }
.appearance-toggle { width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:7px; background:transparent; color:var(--muted); }
.appearance-toggle:hover { background:var(--soft); color:var(--fg); }
.appearance-toggle .i { width:17px; height:17px; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.pop-item { display: flex; align-items: center; gap: 8.5px; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8.5px; border-radius: 7px; font-size: 12px; color: var(--fg); text-decoration: none; }
.pop-item:hover, .pop-item[aria-current="true"], .pop-item[aria-checked="true"] { background: var(--soft); }
.pop-item .i { color: var(--muted); width: 14px; height: 14px; }
.pop-item small { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.pop-item.danger { color: #B3261E; }
.pop-item.danger .i { color: #B3261E; }
.pop-opt { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 8.5px; border-radius: 7px; }
.pop-opt:hover, .pop-opt[aria-checked="true"] { background: var(--soft); }
.pop-opt span { font-size: 11px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5px; padding: 3px; background: var(--soft); border-radius: 7.5px; }
.seg button { height: 27.5px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.pop-search { display: flex; align-items: center; gap: 7px; padding: 0 8.5px; height: 32.5px; margin: 2px 2px 5px; border: 1px solid var(--line); border-radius: 7.5px; background: var(--soft); }
.pop-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 12px; }
.pop-search .i { width: 14px; height: 14px; color: var(--muted); }
.pop-list { max-height: 241px; overflow-y: auto; display: grid; gap: 1px; }
.switcher { width: 275px; }
.ver-pop { width: 292.5px; }
.ver-row { display: grid; grid-template-columns: 32.5px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 7px 8.5px; border-radius: 7px; }
.ver-row:hover { background: var(--soft); }
.ver-row b { font: 400 14px var(--serif); }
.ver-row .what { min-width: 0; font-size: 12px; }
.ver-row .what small { display: block; color: var(--faint); font-size: 11px; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.mini-btn { border: 1px solid var(--line); background: var(--card); border-radius: 6px; height: 24px; padding: 0 8.5px; font-size: 11px; }
.mini-btn:hover { background: var(--soft); }

/* ---------- Main panel ---------- */
.main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 7px; padding: 10.5px 14px; min-height: 55px; }
.open-side { display: none; }
.mode { display: inline-flex; align-items: center; gap: 5px; height: 31px; padding: 0 8.5px; border: 0; border-radius: 7.5px; background: transparent; font: 14px var(--serif); max-width: 241px; }
.mode:hover { background: var(--soft); }
.mode .i { width: 12px; height: 12px; color: var(--muted); }
.mode span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.plain-btn { display: inline-flex; align-items: center; gap: 7px; height: 29px; padding: 0 8.5px; border: 0; border-radius: 7px; background: transparent; color: var(--fg); font-size: 13px; }
.plain-btn:hover { background: var(--soft); }
.plain-btn .i { color: var(--muted); }
.outline-btn { display: inline-flex; align-items: center; gap: 7px; height: 31px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7.5px; background: var(--card); font-size: 12px; white-space: nowrap; }
a.outline-btn { text-decoration: none; color: inherit; }
.outline-btn:hover { border-color: var(--line-strong); }
.outline-btn[aria-pressed="true"] { background: var(--soft); border-color: var(--line-strong); }
.ink-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 31px; padding: 0 14px; border: 0; border-radius: 7.5px; background: var(--ink); color: var(--ink-fg); font-size: 12px; white-space: nowrap; }
.ink-btn:hover { opacity: .9; }
.code-btn { display: inline-flex; align-items: center; gap: 7px; height: 32.5px; padding: 0 12px; margin-left: 3.5px; border: 1px solid var(--line); border-radius: 8.5px; background: var(--soft); font-size: 13px; }
.code-btn:hover { border-color: var(--line-strong); }
.code-btn[aria-pressed="true"] { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.code-btn .i { width: 14.5px; height: 14.5px; }

.banner { position: absolute; top: 50px; right: 15.5px; z-index: 2; display: flex; align-items: center; gap: 12px; height: 44.5px; padding: 0 7px 0 8.5px; border: 1px solid var(--line); border-radius: 10.5px; background: var(--card); font-size: 13px; box-shadow: var(--shadow); }
.banner a { color: var(--fg); font-size: 12px; display: inline-flex; align-items: center; gap: 3.5px; padding: 5px 8.5px; border-radius: 7px; border: 1px solid var(--line); text-decoration: none; }
.banner a:hover { background: var(--soft); }

/* ---------- Home ---------- */
.home { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34.5px 20.5px 103px; }
.hero { font: 400 clamp(27.5px, 3.4vw, 38px)/1.15 var(--serif); letter-spacing: -.02em; margin: 0 0 29px; text-align: center; text-wrap: balance; }
.hero em { font-style: italic; }
.composer { width: min(653.5px, 100%); border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 14px 10.5px 15.5px; display: grid; gap: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.composer:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow); }
.composer-in { display: flex; gap: 10.5px; align-items: flex-start; }
.composer-in .i { color: var(--muted); width: 19px; height: 19px; margin-top: 2px; }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; font-size: 14.5px; line-height: 1.5; min-height: 55px; max-height: 172px; }
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; gap: 7px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34.5px; padding: 0 12px 0 10.5px; border: 1px solid var(--line); border-radius: 859px; background: var(--card); font-size: 13px; }
.pill:hover { background: var(--soft); }
.round { display: inline-grid; place-items: center; width: 34.5px; height: 34.5px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--fg); }
.round:hover { background: var(--soft); }
.round:disabled { opacity: .45; cursor: default; }
.composer-row .end { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.model { display: inline-flex; align-items: center; gap: 5px; height: 31px; padding: 0 8.5px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; }
.model:hover { background: var(--soft); color: var(--fg); }
.model .i { width: 12px; height: 12px; }
.attached { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 5px 0 3.5px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; color: var(--muted); background: var(--card); }
.chip i { width: 22.5px; height: 17px; border-radius: 4.5px; display: block; }
.chip button { border: 0; background: transparent; color: var(--faint); padding: 0 2px; }
.chip.sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); padding-left: 8.5px; }
.chip.sel button { color: var(--blue); }

.promo { position: absolute; right: 15.5px; bottom: 15.5px; width: 249.5px; z-index: 2; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 10.5px; box-shadow: var(--shadow); display: grid; gap: 8.5px; }
.promo-art { height: 110px; border-radius: 7px; background: #EDEBE4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 10.5px; }
.promo-art i { display: block; border-radius: 3px; }
.promo h3 { margin: 3.5px 0 0; font: 400 18px/1.2 var(--serif); letter-spacing: -.01em; }
.promo p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.promo .ink-btn, .promo .outline-btn { width: 100%; justify-content: center; height: 34.5px; }
.side-promos { display:grid; gap:8px; max-height:45vh; overflow-y:auto; width:100%; }
.side .promo { position:relative; inset:auto; width:100%; padding:9px; border-radius:10px; gap:7px; }
.promo-image { display:block; width:100%; height:92px; border-radius:7px; object-fit:cover; background:var(--soft); }
.promo-placeholder { display:grid; place-items:center; height:92px; border-radius:7px; background:var(--soft); color:var(--muted); font-size:24px; }
.promo-hide-x { position:absolute; z-index:1; top:13px; right:13px; display:grid; place-items:center; width:25px; height:25px; border:0; border-radius:50%; background:rgba(255,255,255,.92); color:#555; }
.promo-hide-x .i { width:14px; height:14px; }
.side .promo h3 { margin:2px 0 0; font-size:16px; }
.side .promo p { font-size:12px; }
.side .promo .ink-btn, .side .promo .outline-btn { height:32px; }
.promo-admin { padding:0 20px 18px; display:grid; gap:14px; }
.promo-admin-head { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid var(--line); padding:14px 0 10px; }
.promo-admin-head .cb-title { padding:0; }
.toggle-line { display:flex; align-items:center; gap:8px; color:var(--fg); font-size:13px; }
.toggle-line input { accent-color:var(--fg); }
.promo-rule-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.promo-admin .promo-rule-grid label, .promo-editor > label:not(.toggle-line) { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.promo-admin input:not([type="checkbox"]) { width:100%; min-width:0; height:36px; border:1px solid var(--line); border-radius:8px; background:var(--soft); color:var(--fg); padding:0 10px; font:13px var(--sans); }
.promo-admin .hint { margin:0; }
.promo-admin-list { display:grid; gap:12px; }
.promo-editor { display:grid; gap:11px; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.promo-editor header { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.promo-editor header b { font-size:13px; }
.promo-editor .danger { color:#B3261E; }
@media(max-width:650px) { .promo-rule-grid { grid-template-columns:1fr; } .promo-admin { padding:0 14px 16px; } }

/* ---------- Projects page ---------- */
.projects-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 7px 24px 34.5px; }
.projects-in { max-width: 946px; margin: 0 auto; }
.projects-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20.5px 0 17px; }
.projects-head .projects-title { margin: 0; }
.projects-head .ink-btn { flex: none; }
.projects-title { font: 400 clamp(24px, 3vw, 32.5px)/1.15 var(--serif); letter-spacing: -.02em; margin: 20.5px 0 17px; }
.filters { display: flex; align-items: center; gap: 8.5px; flex-wrap: wrap; margin-bottom: 17px; }
.filters .seg { width: 241px; }
.search-field { display: flex; align-items: center; gap: 7px; height: 34.5px; padding: 0 10.5px; border: 1px solid var(--line); border-radius: 8.5px; background: var(--card); width: min(275px, 100%); margin-left: auto; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; }
.search-field .i { width: 14px; height: 14px; color: var(--muted); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(223.5px, 1fr)); gap: 14px; }
.pcard { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.pcard:hover, .pcard:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow); }
.pcard-open { position: absolute; inset: 0; border: 0; background: transparent; border-radius: 12px; }
.pthumb { height: 129px; padding: 10.5px; display: grid; gap: 5px; grid-template-rows: auto 1fr auto; }
.pthumb .bar { height: 7px; display: flex; justify-content: space-between; align-items: center; }
.pthumb .bar i { display: block; height: 3.5px; width: 22%; border-radius: 2px; background: currentColor; opacity: .35; }
.pthumb .hero { border-radius: 5px; margin: 0; text-align: left; font: inherit; min-height: 0; }
.pthumb .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; height: 22.5px; }
.pthumb .row3 i { display: block; border-radius: 3.5px; }
.pmeta { display: flex; align-items: flex-start; gap: 7px; padding: 10.5px 12px 12px; }
.pname { font: 400 15.5px/1.25 var(--serif); letter-spacing: -.01em; }
.psub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pmeta .wrap { margin-left: auto; position: relative; z-index: 2; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status-chip.pub::before { background: var(--ok); }
.empty { padding: 41.5px 0; text-align: center; color: var(--muted); }

/* ---------- Project workspace ---------- */
.project { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, clamp(300px, var(--chat-w, 42%), calc(100% - 380px))) minmax(0, 1fr); border-top: 1px solid var(--line); }
.project.full { grid-template-columns: minmax(0, 1fr); }
.project.full .chat { display: none; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 0 5px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.status.busy::before { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.swap { display: none; }

.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); }
.thread { flex: 1; min-height: 0; overflow-y: auto; padding: 19px 20.5px 17px; }
.thread-in { max-width: 550.5px; margin: 0 auto; display: flex; flex-direction: column; gap: 19px; }
.day { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11px; margin: 0; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { display: grid; gap: 7px; }
.msg.me { justify-items: end; }
.bubble { max-width: 86%; background: var(--soft); border-radius: 14px; padding: 8.5px 14px; font-size: 14px; line-height: 1.5; }
.meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--faint); }
.meta .i { width: 13px; height: 13px; }
.say { font-size: 14px; line-height: 1.65; }
.say p { margin: 0 0 10.5px; }
.say p:last-child { margin: 0; }
.say b { font-weight: 600; }
.say ul { margin: 0 0 10.5px; padding: 0; list-style: none; display: grid; gap: 3.5px; }
.say li { padding-left: 19px; position: relative; }
.say li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 3.5px; height: 3.5px; border-radius: 50%; background: var(--faint); }

.code { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 14px 15.5px 10.5px; font: 11px/1.75 var(--mono); }
.code pre { margin: 0; white-space: pre; overflow-x: auto; max-height: 129px; transition: max-height .25s ease; }
.code.open pre { max-height: 550.5px; }
.code .copy { position: absolute; top: 8.5px; right: 8.5px; }
.code .more { display: flex; align-items: center; gap: 5px; margin: 3.5px 0 0 auto; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.code .more:hover { color: var(--fg); }
.code.open .more .i { transform: rotate(180deg); }
.code .k { color: var(--faint); }
.code .s { color: var(--ok); }

.run { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.run-head { display: flex; align-items: baseline; gap: 8.5px; padding: 10.5px 14px 3.5px; }
.run-head b { font: 400 14.5px var(--serif); }
.run-head span { margin-left: auto; font-size: 11px; color: var(--faint); }
.steps { list-style: none; margin: 0; padding: 3.5px 0 8.5px; }
.step { display: flex; align-items: center; gap: 10.5px; padding: 5px 14px; font-size: 13px; color: var(--muted); animation: in .25s ease both; }
.step .ico { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: var(--ok); border: 1px solid var(--line); flex: none; }
.step .ico .i { width: 10.5px; height: 10.5px; stroke-width: 2.2; }
.step.pending .ico { color: var(--warn); }
.step.pending .ico .i { animation: spin 1s linear infinite; }
.step.stopped .ico { color: var(--faint); }
.step code { font: 11px var(--mono); background: var(--soft); padding: 1px 5px; border-radius: 4.5px; color: var(--fg); }
.step .delta { margin-left: auto; font-size: 11px; color: var(--faint); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes in { from { opacity: 0; transform: translateY(3px); } }

/* Modification card (reference: 10Web) */
.mod { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 8px 10px 9px; display: grid; gap: 6px; }
.mod.selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.mod-top { display: flex; align-items: center; font-size: 12px; color: var(--muted); }
.mod-top button { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--fg); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; padding: 2px 3.5px; border-radius: 5px; }
.mod-top button:hover { background: var(--soft); }
.mod-top .i { width: 13px; height: 13px; }
.mod p { margin: 0; font-size: 13px; line-height: 1.4; }
.mod-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-actions .blue-btn, .mod-actions .outline-btn { height: 29px; padding: 0 10px; font-size: 11.5px; }
.mod-actions .i { width: 13px; height: 13px; }
.blue-btn { display: inline-flex; align-items: center; gap: 7px; height: 32.5px; padding: 0 12px; border: 0; border-radius: 7.5px; background: var(--blue); color: #FFFFFF; font-size: 12px; }
.blue-btn:hover { opacity: .92; }
:root[data-theme="dark"] .blue-btn, :root:not([data-theme="light"]) .blue-btn { color: #0F1530; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .blue-btn { color: #FFFFFF; } }
:root[data-theme="light"] .blue-btn { color: #FFFFFF; }

.dock { padding: 0 20.5px 15.5px; }
.dock-in { max-width: 550.5px; margin: 0 auto; display: grid; gap: 8.5px; }
.dock .composer { width: 100%; }
.dock .composer textarea { min-height: 44.5px; font-size: 14px; }
.q-pill { display: inline-flex; align-items: center; gap: 8.5px; width: fit-content; height: 36px; padding: 0 10.5px 0 14px; border: 1px solid var(--line); border-radius: 10.5px; background: var(--card); font-size: 13px; }
.q-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); }
.q-pill:hover { border-color: var(--line-strong); }
.q-pill .i { width: 13px; height: 13px; color: var(--muted); }
.q { border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.q-head { display: flex; align-items: flex-start; gap: 10.5px; padding: 14px 15.5px 5px; }
.q-count { font-size: 11px; color: var(--muted); }
.q-text { margin: 3.5px 0 0; font: 400 18px/1.3 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.q-head .icon-btn { margin-left: auto; }
.q-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 15.5px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: 13.5px; }
.q-opt:hover, .q-opt[aria-checked="true"] { background: var(--soft); }
.q-num { width: 22.5px; height: 22.5px; border-radius: 6px; display: grid; place-items: center; flex: none; font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: var(--card); }
.q-opt[aria-checked="true"] .q-num { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.q-opt input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; }
.q-opt input::placeholder { color: var(--faint); }
.q-foot { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10.5px 15.5px; border-top: 1px solid var(--line); }
.q-foot .pager { display: flex; align-items: center; gap: 3.5px; font-size: 12px; color: var(--muted); }
.q-foot .acts { margin-left: auto; display: flex; gap: 7px; }
.stop-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.note { font-size: 11px; color: var(--faint); text-align: center; }

/* Right side: preview or code */
.right { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pv { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.project-tabs { display: flex; align-items: center; gap: 5px; flex: 1; max-width: 460px; min-width: 0; overflow-x: auto; margin: 0 8px; scrollbar-width: thin; }
.project-tab { cursor: pointer; display: flex; align-items: center; min-width: 0; max-width: 190px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--muted); }
.project-tab-open { min-width: 0; height: 100%; padding: 0 7px 0 11px; border: 0; background: transparent; color: inherit; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-tab-open:hover { color: var(--fg); }
.project-tab-close { display: grid; place-items: center; width: 24px; height: 24px; flex: none; margin-right: 3px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); font-size: 16px; line-height: 1; }
.project-tab-close:hover { background: var(--line); color: var(--fg); }
.project-tab-add { width: 29px; height: 29px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--muted); font-size: 19px; line-height: 1; }
.project-tab-add:hover { background: var(--soft); color: var(--fg); }
.pv-bar { display: flex; align-items: center; gap: 7px; padding: 10.5px 12px; flex-wrap: wrap; }
.devices { display: flex; gap: 2px; padding: 3px; border-radius: 8.5px; background: var(--soft); }
.devices button { width: 32.5px; height: 27.5px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.devices button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.devices .i { width: 14.5px; height: 14.5px; }
.route-wrap { position: relative; flex: 1; min-width: 137.5px; }
.route { appearance: none; -webkit-appearance: none; width: 100%; height: 34.5px; border: 0; border-radius: 8.5px; background: var(--soft); padding: 0 31px 0 12px; font-size: 13px; }
.route-wrap .i { position: absolute; right: 10.5px; top: 11px; width: 12px; height: 12px; color: var(--muted); pointer-events: none; }
.spin .i { animation: spin .6s linear; }
.canvas { flex: 1; min-height: 0; overflow: auto; background: var(--bg); padding: 0 12px 12px; display: flex; justify-content: center; }
.device { container-type: inline-size; width: 100%; height: fit-content; min-height: 100%; background: #F9F9F9; color: #111; border: 1px solid var(--line); border-radius: 8.5px; overflow: hidden; box-shadow: var(--shadow); position: relative; transition: width .3s ease; }
.device.tablet { width: 72%; }
.device.mobile { width: 275px; max-width: 100%; }
.device.selecting { cursor: crosshair; }
.chrome { display: flex; align-items: center; gap: 5px; padding: 7px 10.5px; border-bottom: 1px solid #E8E8E8; background: #FFFFFF; }
.chrome i { width: 7px; height: 7px; border-radius: 50%; background: #DADADA; display: block; }
.chrome span { flex: 1; margin-left: 7px; text-align: center; font: 9.5px var(--mono); color: #8A8A8A; background: #F2F2F2; border-radius: 5px; padding: 3px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-box { position: absolute; z-index: 5; border: 1.5px dashed #2F6FEB; background: rgba(47,111,235,.07); pointer-events: none; border-radius: 3px; }
.sel-box.locked { border-style: solid; background: rgba(47,111,235,.12); }
.sel-tag { position: absolute; left: -2px; top: -22px; background: #1F6FEB; color: #FFFFFF; font: 9.5px/1 var(--sans); padding: 4.5px 7px; border-radius: 4.5px; white-space: nowrap; }

/* Code pane */
.cp { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; background: var(--card); color: var(--fg); }
.cp-bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); min-height: 44px; box-sizing: border-box; }
.cp-mode-tabs { display: inline-flex; align-items: center; background: var(--soft); border-radius: 8px; padding: 2.5px; gap: 2px; border: 1px solid var(--line); }
.cp-tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4.5px 12px; border: 0; background: transparent; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .15s ease; user-select: none; }
.cp-tab-btn:hover { color: var(--fg); background: color-mix(in srgb, var(--card) 60%, transparent); }
.cp-tab-btn.active { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.cp-tab-btn svg { width: 14px; height: 14px; }
.cp-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); cursor: pointer; transition: all .15s ease; }
.cp-icon-btn:hover { background: var(--soft); color: var(--fg); }
.cp-icon-btn svg { width: 14px; height: 14px; }
.cp-bar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cp-avatars { display: flex; align-items: center; margin-right: 4px; user-select: none; }
.cp-avatar { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #ffffff; border: 2px solid var(--card); margin-left: -6px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.cp-avatar:first-child { margin-left: 0; }
.cp-avatar-teal { background: #0d9488; }
.cp-avatar-blue { background: #2563eb; }
.cp-pill-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4.5px 13px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-size: 12px; font-weight: 500; cursor: pointer; transition: all .15s ease; }
.cp-pill-btn:hover { background: var(--soft); border-color: var(--line-strong); }
.cp-build-btn { background: var(--ok) !important; color: #ffffff !important; border-color: var(--ok) !important; font-weight: 600 !important; }
.cp-build-btn:hover { opacity: .88; }
.cp-back-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4.5px 11px; font-size: 12px; border-radius: 7px; }

.cp-banner { display: flex; align-items: center; gap: 8.5px; padding: 7px 14px; background: var(--blue-soft); color: var(--blue); font-size: 12px; border-bottom: 1px solid var(--line); }
.cp-banner button { margin-left: auto; border: 0; background: transparent; color: inherit; text-decoration: underline; font-size: 12px; cursor: pointer; }

.cp-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: clamp(140px, var(--tree-w, 220px), calc(100% - 240px)) minmax(0, 1fr); background: var(--card); }
.tree-pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.tree-search-wrap { padding: 9px 10px 6px; position: relative; display: flex; align-items: center; }
.tree-search-input { width: 100%; height: 32px; padding: 0 24px 0 30px; background: var(--card); border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; color: var(--fg); outline: none; transition: all .15s ease; box-sizing: border-box; }
.tree-search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.tree-search-icon { position: absolute; left: 18px; width: 14px; height: 14px; color: var(--faint); pointer-events: none; }
.tree-search-clear { position: absolute; right: 16px; width: 18px; height: 18px; border: 0; background: transparent; color: var(--faint); font-size: 10px; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tree-search-clear:hover { color: var(--fg); background: var(--soft); }

.tree { flex: 1; padding: 6px 6px 16px; overflow-y: auto; font-size: 12.5px; user-select: none; }
.tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.tree > ul { padding: 0; }
.tree .dir-group { margin-bottom: 2px; }
.tree .dir-row { display: flex; align-items: center; gap: 6px; padding: 4.5px 7px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .12s; user-select: none; }
.tree .dir-row:hover { background: var(--soft); color: var(--fg); }
.tree .dir-chevron { width: 10px; height: 10px; color: var(--faint); transition: transform .15s ease; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.tree .dir-chevron.collapsed { transform: rotate(-90deg); }
.tree .dir-icon { width: 15px; height: 15px; flex-shrink: 0; }
.tree .dir-name { font-size: 12.5px; }

.tree button { width: 100%; text-align: left; border: 0; background: transparent; padding: 4.5px 7px; border-radius: 6px; display: flex; align-items: center; gap: 7px; font: 12.5px/1.5 var(--mono); color: var(--muted); cursor: pointer; transition: all .12s ease; user-select: none; }
.tree button:hover { background: var(--soft); color: var(--fg); }
.tree button[aria-current="true"] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.tree .tree-icon { width: 15px; height: 15px; flex-shrink: 0; }
.tree .tree-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.tree .mod-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.tree .empty-note { padding: 12px 10px; color: var(--faint); font-size: 12px; font-style: italic; text-align: center; }

/* Editor main */
.editor { min-width: 0; display: flex; flex-direction: column; background: var(--card); flex: 1; }
.editor-tabs-bar { display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--panel); min-height: 38px; overflow-x: auto; box-sizing: border-box; }
.editor-tabs-list { display: flex; align-items: stretch; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.editor-tabs-list::-webkit-scrollbar { display: none; }
.ed-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; font-family: var(--mono); color: var(--muted); border-right: 1px solid var(--line); background: var(--panel); cursor: pointer; white-space: nowrap; user-select: none; transition: all .12s ease; border-top: 2px solid transparent; box-sizing: border-box; }
.ed-tab:hover { background: var(--card); color: var(--fg); }
.ed-tab.active { background: var(--card); color: var(--fg); font-weight: 600; border-top-color: var(--blue); }
.ed-tab .tree-icon { width: 14px; height: 14px; flex-shrink: 0; }
.ed-tab-title { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ed-tab-close { border: 0; background: transparent; padding: 2px; width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--faint); margin-left: 2px; cursor: pointer; transition: all .12s ease; }
.ed-tab-close:hover { background: var(--soft); color: var(--fg); }

.editor-toolbar { display: flex; align-items: center; gap: 4px; padding: 0 10px; border-left: 1px solid var(--line); background: var(--panel); flex-shrink: 0; }
.ed-tool-btn { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 26px; padding: 0 6px; border: 1px solid transparent; background: transparent; border-radius: 6px; color: var(--muted); font-size: 12px; cursor: pointer; transition: all .12s ease; gap: 4px; }
.ed-tool-btn:hover { background: var(--card); border-color: var(--line); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.ed-tool-btn svg { width: 14px; height: 14px; }
.ed-download-btn { padding: 0 8px; font-weight: 500; font-size: 11.5px; }
.editor-actions { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }

/* Code viewing & editing area */
.editor-view-wrap { position: relative; flex: 1; min-height: 0; display: flex; overflow: hidden; background: var(--card); }
.file-code { margin: 0; flex: 1; overflow: auto; padding: 12px 0 24px; font: 12.5px/1.7 var(--mono); background: var(--card); color: var(--fg); tab-size: 2; box-sizing: border-box; }

.code-line, .editor .l { display: flex; align-items: stretch; min-width: 100%; white-space: pre; padding-right: 20px; box-sizing: border-box; }
.code-line:hover, .editor .l:hover { background: color-mix(in srgb, var(--soft) 50%, transparent); }
.l-num { width: 48px; min-width: 48px; text-align: right; padding-right: 16px; color: var(--faint); user-select: none; font-size: 12px; flex-shrink: 0; box-sizing: border-box; border-right: 1px solid var(--line); margin-right: 14px; }
.l-code { flex: 1; white-space: pre; font-family: inherit; font-size: inherit; tab-size: 2; }

/* Diff highlights */
.code-line.del, .editor .l.del { background: color-mix(in srgb, #cf222e 8%, transparent) !important; color: #cf222e; }
.code-line.del .l-num, .editor .l.del .l-num { color: #cf222e; }
.code-line.add, .editor .l.add { background: color-mix(in srgb, #1a7f37 8%, transparent) !important; color: #1a7f37; }
.code-line.add .l-num, .editor .l.add .l-num { color: #1a7f37; }
.tok-diff-del-prefix { color: #cf222e; font-weight: 700; margin-right: 2px; }
.tok-diff-add-prefix { color: #1a7f37; font-weight: 700; margin-right: 2px; }

/* Syntax highlighting tokens */
.tok-keyword { color: var(--blue); font-weight: 600; }
.tok-type { color: #953800; font-weight: 500; }
.tok-fn { color: #8250df; }
.tok-string { color: #a31515; }
.tok-comment { color: var(--faint); font-style: italic; }
.tok-number { color: #0550ae; }
.tok-punct { color: var(--fg); }
.tok-atom { color: #cf222e; }
.tok-property { color: #0550ae; }
.tok-tag { color: #116329; font-weight: 600; }
.tok-attr { color: #0550ae; }
.tok-heading { color: var(--fg); font-weight: 700; }
.tok-bullet { color: var(--blue); font-weight: 600; }

/* Editing mode */
.editor-edit-container { display: flex; flex: 1; min-height: 0; background: var(--card); width: 100%; box-sizing: border-box; }
.editor-edit-gutter { width: 48px; min-width: 48px; padding: 12px 14px 24px 0; text-align: right; color: var(--faint); font: 12.5px/1.7 var(--mono); user-select: none; border-right: 1px solid var(--line); overflow: hidden; box-sizing: border-box; background: var(--panel); }
.editor-edit-gutter div { height: 21.25px; line-height: 21.25px; font-size: 12px; }
.file-edit { flex: 1; border: 0; outline: none; padding: 12px 16px 24px 14px; font: 12.5px/1.7 var(--mono); background: var(--card); color: var(--fg); resize: none; tab-size: 2; white-space: pre; overflow: auto; box-sizing: border-box; }
.editor-edit-container[hidden] { display: none; }

.editor-img { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--soft); overflow: auto; }
.editor-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: calc(20.5px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 14px); background: var(--ink); color: var(--ink-fg); padding: 8.5px 14px; border-radius: 8.5px; font-size: 12px; opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none; z-index: 60; max-width: calc(100% - 27.5px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .banner { display: none; }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project .right { display: none; }
  .project.show-right .chat { display: none; }
  .project.show-right .right { display: flex; }
  .swap { display: inline-flex; }
  .chat { border-right: 0; }
  .cp-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 146px; }
}
@media (max-width: 860px) {
  .app, .app.closed { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .app.closed .side { visibility: visible; }
  .side { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(249.5px, 86vw); background: var(--bg); border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .25s ease; padding-top: calc(10.5px + env(safe-area-inset-top, 0px)); }
  .app.drawer .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.35); }
  .open-side, .app.closed .open-side { display: inline-grid; }
  .collapse-side { display: none; }
  .main { border-radius: 0; border: 0; min-height: 100%; }
  .topbar { padding: 8.5px 8.5px; gap: 2px; flex-wrap: nowrap; }
  .topbar .mode { max-width: 101.5px; padding: 0 5px; }
  .topbar .top-right { gap: 3.5px; }
  .swap { padding: 0 8.5px; }
  .swap span { display: none; }
  .code-btn { margin-left: 0; padding: 0 9.5px; }
  .ink-btn { padding: 0 10.5px; }
  .home { justify-content: flex-start; padding: 27.5px 14px 41.5px; }
  .thread { padding: 14px 14px 10.5px; }
  .dock { padding: 0 10.5px 10.5px; }
  .projects-body { padding: 3.5px 14px 27.5px; }
  .filters .seg { width: 100%; }
  .search-field { margin-left: 0; width: 100%; }
  .hide-sm { display: none !important; }
  .pop.down.right { right: -8px; }
  .switcher, .ver-pop { width: min(275px, calc(100vw - 20.5px)); }
  [data-tip]:hover::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }


/* ================= Real-app additions ================= */
.notice { margin: 0 16px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--soft); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.notice code, .pop-note code { font: 11.5px var(--mono); background: var(--card); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
.notice-err { overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; max-width: 100%; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, #B3261E 35%, var(--line)); background: color-mix(in srgb, #B3261E 8%, var(--card)); color: var(--fg); font-size: 13px; line-height: 1.5; }
.pop-note { margin: 2px 8px 6px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.side-empty { margin: 8px 12px; font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.model-label { font-size: 11.5px; color: var(--faint); margin-right: 4px; text-transform: capitalize; }
.say.muted { color: var(--muted); font-size: 12.5px; }
.md-code { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); font: 12px/1.6 var(--mono); overflow-x: auto; }
.chip img { width: 22px; height: 17px; object-fit: cover; border-radius: 4px; display: block; }
.step.fail { color: var(--fg); }
.step.fail .ico { color: #B3261E; }
.step .lbl { min-width: 0; overflow-wrap: anywhere; }
.live-now { display: flex; align-items: center; gap: 8px; padding: 6px 14px 12px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.live-now span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#live-text:empty { display: none; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--fg); animation: spin .8s linear infinite; flex: none; }
.spinner.sm { width: 11px; height: 11px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Project cards: initial on a tinted block (no screenshots stored yet) */
.pthumb { height: 118px; padding: 12px; display: grid; place-items: center; position: relative; grid-template-rows: none; }
.pthumb .pinit { font: 400 44px/1 var(--serif); letter-spacing: -.02em; }
.pthumb .pver { position: absolute; right: 10px; bottom: 8px; font-size: 11px; opacity: .7; }

/* Preview frame */
.canvas { padding: 0 12px 12px; align-items: stretch; }
.device { display: flex; flex-direction: column; height: 100%; min-height: 0; container-type: normal; background: #fff; }
.device.tablet { width: 768px; max-width: 100%; }
.device.mobile { width: 390px; max-width: 100%; }
.device iframe { flex: 1; width: 100%; min-height: 0; border: 0; background: #fff; display: block; }
.pv-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 82%, transparent); z-index: 4; text-align: center; padding: 20px; }
.pv-overlay[hidden] { display: none; }
.pv-box { display: grid; justify-items: center; gap: 10px; color: var(--muted); font-size: 13px; max-width: 320px; }
.pv-error { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 6; max-height: 60%; overflow: auto; background: var(--card); border: 1px solid color-mix(in srgb, #B3261E 40%, var(--line)); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13px; display: grid; gap: 8px; }
.pv-error pre { margin: 0; white-space: pre-wrap; font: 11.5px/1.5 var(--mono); color: var(--muted); max-height: 160px; overflow: auto; }
.pv-error-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vbanner { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 7px 12px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 12.5px; }
.vbanner[hidden] { display: none; }
.vbanner button { margin-left: auto; border: 0; background: transparent; color: inherit; text-decoration: underline; font-size: 12.5px; }

/* Code editor */
.editor { position: relative; }
.editor-tabs { align-items: center; }
.editor-actions { margin-left: auto; display: flex; gap: 6px; padding-right: 10px; }
.editor-actions[hidden] { display: none; }
#file-edit { flex: 1; width: 100%; border: 0; outline: none; resize: none; background: var(--card); color: var(--fg); padding: 14px 16px; font: 12px/1.7 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }
.editor-img { flex: 1; display: grid; place-items: center; padding: 20px; background: var(--soft); overflow: auto; }
.editor-img img { max-width: 100%; max-height: 100%; }
.editor-img[hidden], #file-edit[hidden], #file-code[hidden] { display: none; }
.cp-banner[hidden] { display: none; }
.tree button span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= Settings, connected agents ================= */
.build-types { display:flex; gap:10px; justify-content:center; margin:0 auto 20px; }
.build-type { display:flex; align-items:center; gap:12px; text-align:left; padding:12px 16px; min-width:220px; border:1px solid var(--line); border-radius:12px; color:var(--fg); background:var(--card); cursor:pointer; }
.build-type .i { width:21px; height:21px; color:var(--muted); }
.build-type span { display:grid; gap:3px; }
.build-type b { font-size:13px; font-weight:600; }
.build-type small { font-size:11px; color:var(--muted); }
.build-type.selected { border-color:var(--fg); box-shadow:0 0 0 1px var(--fg); }
.stack-picker { width:min(440px,calc(100% - 28px)); margin:-6px auto 18px; display:grid; gap:6px; color:var(--muted); font-size:12px; text-align:left; }
.stack-picker select { width:100%; height:40px; padding:0 12px; border:1px solid var(--line); border-radius:10px; color:var(--fg); background:var(--card); font:inherit; font-size:13px; }
.stack-picker small { font-size:11px; }
.runtime-actions { display:flex; align-items:center; gap:7px; }
.runtime-actions[hidden] { display:none; }
.runtime-network { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:11px; white-space:nowrap; }
.runtime-log { padding:9px 13px; border-bottom:1px solid var(--line); background:var(--soft); }
.runtime-log[hidden] { display:none; }
.runtime-log > div { display:flex; align-items:center; justify-content:space-between; font-size:12px; }
.runtime-log pre { max-height:140px; overflow:auto; white-space:pre-wrap; margin:7px 0 0; font:11px/1.5 var(--mono); color:var(--muted); }
.integration-in { max-width:920px; display:grid; gap:18px; }
.integration-intro { margin:-9px 0 18px; color:var(--muted); font-size:14px; }
.integration-list { display:grid; gap:12px; }
.integration-card { display:flex; align-items:center; gap:18px; min-height:92px; padding:20px 22px; border:1px solid var(--line); border-radius:15px; background:var(--card); }
.integration-card > div { flex:1; min-width:0; }
.integration-card h2 { margin:0 0 5px; font-size:15px; font-weight:600; }
.integration-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.integration-icon { width:48px; height:48px; display:grid; place-items:center; flex:none; border-radius:12px; color:var(--fg); background:var(--soft); font-size:23px; }
.integration-icon .i { width:22px; height:22px; }
.integration-icon.wp { color:#2870c8; }
.integration-soon { margin:26px 0 0; font-size:17px; font-weight:500; }
.integration-card.disabled { opacity:.78; }
.coming-tag { flex:none; padding:7px 10px; border-radius:99px; background:var(--soft); color:var(--muted); font-size:11px; }
 .view-toggle { display:inline-flex; margin:-4px 0 4px; padding:3px; gap:2px; border:1px solid var(--line); border-radius:99px; background:var(--card); justify-self:start; }
.view-toggle button { display:inline-flex; align-items:center; gap:6px; padding:6px 13px; border:0; border-radius:99px; background:none; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; }
.view-toggle button[aria-pressed="true"] { background:var(--soft); color:var(--fg); font-weight:500; }
.view-toggle .i { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.integration-in.as-grid { max-width:1100px; }
.as-grid .integration-list { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:16px; }
.as-grid .integration-card { flex-direction:column; align-items:stretch; gap:14px; padding:22px; border-radius:22px; min-height:0; }
.as-grid .integration-card > div { flex:1 1 auto; }
.as-grid .integration-card > button,.as-grid .integration-card > .coming-tag { width:100%; margin-left:0; border-radius:99px; padding:12px 16px; text-align:center; align-self:stretch; }
.as-grid .integration-icon { width:54px; height:54px; border-radius:50%; }
.as-icons .integration-list { grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:14px; }
.as-icons .integration-card { position:relative; align-items:center; justify-content:center; gap:10px; padding:20px 10px 16px; text-align:center; border-radius:16px; transition:border-color .15s, background .15s; }
.as-icons .integration-card:hover { border-color:var(--fg); }
.as-icons .integration-card > div { flex:none; }
.as-icons .integration-card h2 { margin:0; font-size:14px; font-weight:500; }
.as-icons .integration-card p,.as-icons .coming-tag { display:none; }
.as-icons .integration-icon { width:44px; height:44px; }
.as-icons .integration-card > button { position:absolute; inset:0; width:100%; height:100%; padding:0; border:0; border-radius:inherit; background:transparent; color:transparent; font-size:0; cursor:pointer; }
.as-icons .integration-card > button:focus-visible { outline:2px solid var(--fg); outline-offset:2px; }
@media(max-width:600px) { .build-types { flex-direction:column; } .build-type { width:100%; } .integration-card { flex-wrap:wrap; padding:16px; } .integration-card > div { flex:1 1 calc(100% - 70px); } .integration-card > button,.coming-tag { margin-left:66px; } .as-grid .integration-card > button,.as-grid .coming-tag { margin-left:0; } }
.settings-in { max-width: 760px; display: grid; gap: 18px; }
.card-box { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.card-box > h2 { margin: 0; padding: 20px 22px 4px; font: 500 18px/1.25 var(--sans); letter-spacing: -.01em; }
.card-sub { margin: 0; padding: 0 22px 16px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); }
.agent-row, #row-builtin { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); }
.ag-ava { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; font: 500 15px var(--serif); color: var(--fg); background: var(--soft); }
.ag-ava .i { width: 17px; height: 17px; color: var(--muted); }
.ag-main { min-width: 0; flex: 1; }
.ag-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; line-height: 1.45; }
.ag-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.disconnect { height: 32px; padding: 0 14px; border: 1px solid #D9742B; border-radius: 9px; background: transparent; color: #C25E16; font-size: 13px; }
.disconnect:hover { background: color-mix(in srgb, #D9742B 10%, transparent); }
.agent-empty { padding: 18px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chip-soft { font-size: 11.5px; font-weight: 400; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.chip-soft.ok { color: var(--ok); } .chip-soft.warn { color: var(--warn); }
.keyform { padding: 14px 22px 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.keyform label { font-size: 12.5px; color: var(--muted); }
.keyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.keyrow input { flex: 1; min-width: 220px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 0 12px; font: 13px var(--mono); }
.keyrow input:disabled { opacity: .55; }
.hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.hint code, .steps2 code, #connect-panel p code { font: 11.5px var(--mono); background: var(--soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.tabs2 { display: flex; gap: 2px; padding: 4px 18px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs2 button { height: 36px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.tabs2 button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.ctab { padding: 18px 22px; display: grid; gap: 14px; font-size: 13px; line-height: 1.6; }
.ctab[hidden] { display: none; }
.ctab p { margin: 0; color: var(--muted); }
.steps2 { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--muted); }
.steps2 strong { color: var(--fg); font-weight: 500; }
.copyrow { display: flex; gap: 10px; align-items: flex-start; }
.copyrow code, .copyrow pre { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); font: 12px/1.6 var(--mono); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.copyrow .outline-btn { height: 34px; flex: none; }
.tokenform { display: flex; gap: 8px; flex-wrap: wrap; }
.tokenform input { flex: 1; min-width: 180px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 0 12px; }
.tokenbox { margin: 0 22px 18px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--soft); display: grid; gap: 8px; font-size: 13px; }
.tokenbox[hidden] { display: none; }
.statusline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 10px 12px; background: var(--soft); border-radius: 9px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); }
.toolsbox { margin: 0 22px 18px; font-size: 13px; color: var(--muted); }
.toolsbox summary { cursor: pointer; padding: 6px 0; }
.toolsbox ul { margin: 6px 0 10px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.toolsbox code { font: 11.5px var(--mono); background: var(--soft); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }

.approval { position: relative; z-index: 8; display: grid; flex: none; background: var(--ink); color: var(--ink-fg); }
.approval[hidden] { display: none; }
.approval-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 10px 18px; font-size: 13px; border-bottom: 1px solid color-mix(in srgb, var(--ink-fg) 20%, transparent); }
.approval-row small { opacity: .7; }
.approval-actions { display: flex; gap: 8px; }
.approval .ink-btn { background: var(--ink-fg); color: var(--ink); height: 32px; }
.approval .outline-btn { background: transparent; color: var(--ink-fg); border-color: color-mix(in srgb, var(--ink-fg) 40%, transparent); height: 32px; }
@media (max-width: 860px) {
  .agent-row, #row-builtin { flex-wrap: wrap; }
  .ag-actions { width: 100%; justify-content: flex-end; }
  .copyrow { flex-direction: column; } .copyrow .outline-btn { align-self: flex-end; }
}

/* Taking a screenshot for an agent while the preview pane is hidden. The frame is laid out inside the viewport but
   invisible and behind everything: browsers stop rendering cross-origin frames that are off screen, which would hang the capture. */
.project.capturing .right { display: flex !important; position: fixed; left: 0; top: 0; width: 1300px; height: 900px; z-index: -1; opacity: 0; pointer-events: none; }
.project.capturing #cp { display: none !important; }
.project.capturing #pv { display: flex !important; }

/* ---------- Resizable panes ---------- */
.resizer { position: absolute; top: 0; bottom: 0; width: 11px; margin-left: -5.5px; cursor: col-resize; z-index: 20; touch-action: none; outline: none; }
.resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; border-radius: 2px; background: transparent; transition: background .12s; }
.resizer:hover::after, .resizer:focus-visible::after, .resizer.active::after { background: color-mix(in srgb, var(--fg) 28%, transparent); }
.resizer.active::after { background: var(--fg); }
#rs-chat { left: clamp(300px, var(--chat-w, 42%), calc(100% - 380px)); }
#rs-tree { left: clamp(130px, var(--tree-w, 189px), calc(100% - 240px)); }
.side-rs { left: clamp(190px, var(--side-w, 227px), 40vw); top: 8.5px; bottom: 8.5px; }
.app.closed .side-rs, .project.full #rs-chat { display: none; }
body.resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
body.resizing iframe { pointer-events: none; }
@media (max-width: 1100px) { #rs-chat { display: none; } #rs-tree { display: none; } }
@media (max-width: 860px) { .side-rs { display: none; } }

/* ---------- One-click install (Publish menu) ---------- */
#pub-sites { display: grid; }
.pub-result { margin: 4px 8px 6px; padding: 9px 11px; border-radius: 9px; background: var(--soft); font-size: 12px; line-height: 1.5; color: var(--muted); display: grid; gap: 6px; }
.pub-result strong { color: var(--fg); font-weight: 500; } .pub-result strong.bad { color: #B3261E; }
.pub-result a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.pub-links { display: flex; gap: 4px; flex-wrap: wrap; }
.pub-result .mini-btn { justify-self: start; }
.spin-dot { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop-item:disabled { opacity: .5; cursor: default; }

/* ---------- Accounts, settings sections, billing ---------- */
.settings-in { width: 100%; max-width: 980px; display:grid; grid-template-columns:210px minmax(0,1fr); grid-template-rows:auto 1fr; column-gap:34px; row-gap:8px; align-content:start; }
.settings-in > .projects-title { grid-column:1; grid-row:1; }
.settings-layout { display:contents; }
.settings-nav { grid-column:1; grid-row:2; display:grid; align-content:start; align-self:start; gap:4px; position:sticky; top:4px; }
.settings-nav button { text-align: left; height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; }
.settings-nav button:hover { background: var(--soft); color: var(--fg); }
.settings-nav button[aria-selected="true"] { background: var(--soft); color: var(--fg); font-weight: 500; }
.settings-nav button[hidden] { display: none; }
.settings-main { grid-column:2; grid-row:1 / span 2; min-width:0; padding-top:20.5px; }
.spanel { display: grid; gap: 18px; }
.spanel[hidden] { display: none; }
.sp-head h2 { margin: 0; font: 500 22px/1.2 var(--sans); letter-spacing: -.015em; }
.sp-head p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.sp-note { padding: 18px 22px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.sp-note p { margin: 0; }
.pref-card { padding-bottom: 18px; }
.pref-card .card-sub { margin: 5px 22px 14px; }
.pref-theme { width: min(360px, calc(100% - 44px)); margin: 0 22px; }
.cb-title { margin: 0; padding: 18px 22px 2px; font: 500 15px/1.3 var(--sans); }
.acct-form { display: grid; gap: 7px; padding: 10px 22px 20px; max-width: 520px; }
.acct-form label { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.acct-form #acct-email-wrap { display: grid; gap: 7px; }
.acct-form input, .auth-form input { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 0 12px; font: 14px var(--sans); color: var(--fg); width: 100%; box-sizing: border-box; }
.acct-form input:focus, .auth-form input:focus { outline: 2px solid color-mix(in srgb, var(--fg) 30%, transparent); outline-offset: 1px; background: var(--card); }
.acct-actions { margin-top: 10px; display: flex; gap: 8px; }
.form-msg { margin: 4px 0 0; font-size: 12.5px; color: var(--ok); } .form-msg.bad { color: #B3261E; }
.danger-box { border-color: color-mix(in srgb, #B3261E 30%, var(--line)); }
.danger-btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #B3261E; background: #B3261E; color: #fff; font-size: 13px; cursor: pointer; }
.danger-btn:disabled { opacity: .6; cursor: default; }

/* billing, laid out like a plain settings page: label, card, label, card */
/* a label sits close above its card, whichever page it is on (the pages that are not already grids become one, so the gap is the same everywhere) */
:has(> .bl-label) { display: grid; gap: 18px; align-content: start; }
:has(> .bl-label) > * { min-width: 0; }
.bl-label { margin: 10px 0 -6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.bl-card, .bl-details { padding: 0; }
.bl-row { padding: 18px 22px; font-size: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bl-row strong { font-weight: 500; }
.bl-in { padding: 18px 22px; border-top: 1px solid var(--line); }
.bl-in h4 { margin: 0 0 6px; font: 500 15px var(--sans); color: var(--fg); }
.bl-in p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.bl-upsell { display: flex; gap: 22px; justify-content: space-between; align-items: flex-start; padding: 18px 22px 20px; border-top: 1px solid var(--line); }
.bl-upsell h4 { margin: 0 0 4px; font: 500 15px var(--sans); }
.bl-upsell p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; max-width: 460px; }
.bl-cta { display: grid; gap: 8px; justify-items: center; flex: none; }
.bl-cta small { font-size: 12px; color: var(--muted); }
.bl-cta .ink-btn { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 9px; }
.bl-usage { padding: 8px 22px; display: grid; }
.bl-usage div { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; color: var(--muted); }
.bl-usage b { font-weight: 500; color: var(--fg); }
.bl-usage .full b { color: #B3261E; }
.bl-bar { height: 4px; border-radius: 4px; background: var(--soft); margin: -4px 0 6px; overflow: hidden; }
.bl-bar i { display: block; height: 100%; background: var(--fg); border-radius: 4px; } .bl-bar.full i { background: #B3261E; }
.bl-foot { padding: 14px 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bl-details .bl-in { padding: 18px 22px; }
.bl-details h4 { margin: 0 0 4px; font: 500 15px var(--sans); }
.bl-details p { margin: 0; font-size: 14px; color: var(--muted); }
.bl-details .bl-card-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.chip-soft.test { background: #FFF4E5; color: #7a4a00; }

/* sidebar plan card and account */
.plan-card { margin: 0 4px 6px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-card[hidden] { display: none; }
.plan-card b { font-size: 13px; font-weight: 500; display: block; } .plan-card span { font-size: 11px; color: var(--muted); display: block; }
.plan-btn { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--ink); color: var(--ink-fg); font-size: 12px; cursor: pointer; }
.billing-banner { background: #7a2a12; }
body.accounts .pop-signout-show { display: flex; }

/* sign in */
.app.auth-mode { grid-template-columns: minmax(0, 1fr); padding: 0; }
.app.auth-mode .side, .app.auth-mode .side-rs, .app.auth-mode .scrim { display: none; }
.app.auth-mode .main { border-radius: 0; }
.auth-view { flex: 1; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.auth-view[hidden] { display: none; }
.auth-card { width: min(420px, 100%); min-height: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 30px 26px; box-shadow: var(--shadow); transition: min-height .24s ease; }
.auth-brand { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; }
.auth-card h1 { margin: 0 0 6px; font: 400 28px/1.15 var(--serif); letter-spacing: -.02em; }
.auth-sub { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.auth-tabs { padding: 0; margin-bottom: 18px; }
.auth-tabs button { flex: 1; }
.auth-form { display: grid; gap: 6px; }
.auth-form label { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.auth-form .ink-btn.wide { width: 100%; height: 42px; font-size: 14.5px; border-radius: 10px; margin-top: 14px; }
.auth-form[hidden] { display: none; }
.auth-card.auth-transition-out > :not(.auth-brand) { animation: auth-out .12s ease both; }
.auth-card.auth-transition-in > :not(.auth-brand) { animation: auth-in .26s cubic-bezier(.2,.75,.2,1) both; }
@keyframes auth-out { to { opacity: 0; transform: translateX(-10px); } }
@keyframes auth-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .auth-card, .auth-card.auth-transition-out > :not(.auth-brand), .auth-card.auth-transition-in > :not(.auth-brand) { animation: none; transition: none; } }
.link-btn { border: 0; background: transparent; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0 0; cursor: pointer; justify-self: center; }
.link-btn:hover { color: var(--fg); }
.auth-error { margin: 14px 0 0; padding: 9px 12px; border-radius: 9px; background: color-mix(in srgb, #B3261E 10%, transparent); color: #B3261E; font-size: 13px; }
.auth-note { margin: 14px 0 0; padding: 9px 12px; border-radius: 9px; background: var(--soft); color: var(--muted); font-size: 13px; }
.auth-error[hidden], .auth-note[hidden] { display: none; }

/* dialogs */
.modal-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(20,20,18,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); overflow-y: auto; }
.modal-back[hidden] { display: none; }
.modal-card { position: relative; width: min(760px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-card h2 { margin: 0 0 6px; font: 400 26px/1.15 var(--serif); letter-spacing: -.02em; }
.modal-card p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 16px; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-opt { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.plan-opt.rec { border-color: var(--fg); }
.plan-opt h3 { margin: 0; font: 500 16px var(--sans); display: flex; gap: 8px; align-items: center; }
.plan-opt .price { font: 400 28px/1 var(--serif); } .plan-opt .price small { font: 12px var(--sans); color: var(--muted); }
.plan-opt ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 5px; }
.plan-opt .ink-btn, .plan-opt .outline-btn { width: 100%; height: 38px; justify-content: center; }
.price-compare-scroll { width:100%; overflow-x:auto; }
.price-compare { min-width:670px; border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:hidden; }
.price-compare-head, .price-compare-row { display:grid; grid-template-columns:minmax(165px,1.25fr) repeat(3,minmax(125px,1fr)); align-items:stretch; }
.price-compare-head { padding:14px 14px 12px; gap:8px; background:var(--soft); }
.price-compare-label { color:var(--muted); font-size:13px; }
.price-compare-plan { display:grid; gap:8px; justify-items:center; align-content:start; padding:10px 8px; border:1px solid transparent; border-radius:12px; }
.price-compare-plan.recommended { border-color:var(--line); background:var(--card); }
.price-compare-plan.power { border-color:color-mix(in srgb, var(--fg) 35%, var(--line)); background:color-mix(in srgb, var(--fg) 90%, var(--card)); color:var(--card); }
.price-compare-plan strong { font-size:15px; }
.price-compare-plan > span { font-size:18px; }
.price-compare-plan small { margin-left:3px; color:var(--muted); font-size:11px; }
.price-compare-plan.power small { color:inherit; opacity:.7; }
.price-compare-plan button { width:100%; min-height:32px; padding:5px 7px; justify-content:center; font-size:12px; }
.price-compare-plan.power .outline-btn { border-color:rgba(255,255,255,.35); background:var(--card); color:var(--fg); }
.price-compare-dash { color:var(--muted); }
.price-compare-row { min-height:44px; padding:10px 18px; border-top:1px solid var(--line); text-align:center; font-size:13px; }
.price-compare-row > div { display:grid; align-content:center; }
.price-compare-row .price-compare-label { text-align:left; }
.price-compare-foot { margin:0; padding:12px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.price-compare.in-modal { min-width:700px; }
.price-compare.in-modal .price-compare-label { font-size:12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .settings-in { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; row-gap:12px; }
  .settings-in > .projects-title { grid-column:1; grid-row:1; margin-bottom:0; }
  .settings-nav { grid-column:1; grid-row:2; }
  .settings-main { grid-column:1; grid-row:3; padding-top:0; }
  .settings-nav { display: flex; overflow-x: auto; position: static; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
  .settings-nav button { flex: none; height: 34px; padding: 0 12px; }
  .bl-upsell { flex-direction: column; } .bl-cta { justify-items: start; }
  .plans-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: 24px 20px 20px; }
}
#acct-body { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); align-items: start; }
#acct-body .acct-form { max-width: none; }

.plug-banner { background: #FFF4E5; color: #6b4300; align-items: flex-start; line-height: 1.45; }
.plug-banner button { margin-left: 0; white-space: nowrap; font-weight: 500; }
.plug-banner span { flex: 1; }

.pv-play { margin-top: 14px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ink-fg); display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform .15s ease; }
.pv-play:hover { transform: scale(1.06); }
.pv-play[hidden] { display: none; }
.pv-play .i { width: 24px; height: 24px; }

.pthumb { overflow: hidden; }
.pthumb .pshot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; background: var(--card); }
.pthumb .pver { z-index: 1; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--card) 85%, transparent); opacity: 1; }

.recent li { position: relative; display: flex; align-items: center; }
.recent li .r-open { flex: 1; min-width: 0; padding-right: 28px; }
.recent .r-pin { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--faint); opacity: 0; cursor: pointer; padding: 0; }
.recent .r-pin .i { width: 13px; height: 13px; }
.recent li:hover .r-pin, .recent .r-pin:focus-visible, .recent li.pinned .r-pin { opacity: 1; }
.recent li.pinned .r-pin { color: var(--fg); }
.recent li.pinned .r-pin .i { fill: currentColor; }
.recent .r-pin:hover { background: var(--line); color: var(--fg); }

/* ---------- Tabs above the preview, tool panels, Domains ---------- */
.rtabs { display: flex; align-items: center; gap: 4px; padding: 8px 12px 0; overflow-x: auto; scrollbar-width: none; flex: none; }
.rtab { display: flex; align-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--muted); }
.rtab.on { background: var(--soft); border-color: var(--line); color: var(--fg); }
.rtab:not(.on):hover { background: var(--soft); }
.rtab-open { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 0; background: transparent; color: inherit; font-size: 13px; white-space: nowrap; border-radius: 9px; }
.rtab-open .i { width: 15px; height: 15px; }
.rtab-x { display: grid; place-items: center; width: 22px; height: 22px; margin-right: 5px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); padding: 0; }
.rtab-x .i { width: 13px; height: 13px; }
.rtab-x:hover { background: var(--line); color: var(--fg); }
.rtab-add { width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 19px; line-height: 1; }
.rtab-add:hover { background: var(--soft); color: var(--fg); }
.rtool { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 28px; }
.rtool[hidden] { display: none; }
#rtool-new { max-width: 640px; width: 100%; margin: 0 auto; padding-top: 28px; }
.rtool-list { display: grid; gap: 2px; margin-top: 14px; }
.rtool-item { display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-radius: 10px; background: transparent; padding: 10px 12px; color: var(--fg); }
.rtool-item:hover, .rtool-item:focus-visible { background: var(--soft); }
.rtool-item b { display: block; font-weight: 500; font-size: 14px; }
.rtool-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rtool-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
.rtool-ic .i { width: 18px; height: 18px; }
.dom { max-width: 720px; display: grid; gap: 16px; }
.dom h2 { margin: 0; font: 500 22px/1.2 var(--serif); }
.dom-sub { margin: -10px 0 0; }
.dom-card { padding: 18px 20px; display: grid; gap: 12px; }
.dom-card h3 { margin: 0; font: 500 15px/1.3 var(--sans); }
.dom-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dom-actions { display: flex; gap: 8px; }
.dom-actions button[disabled], .dom-form button[disabled] { opacity: .5; cursor: not-allowed; }
.dom-url { font-size: 15px; font-weight: 500; color: var(--fg); }
a.dom-url[href] { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dom-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dom-addr { flex: 1; min-width: 200px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding-right: 10px; }
.dom-addr input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; padding: 0 10px; font: inherit; font-size: 13px; color: var(--fg); outline: none; }
.dom-addr:focus-within { border-color: var(--line-strong); }
.dom-addr span { color: var(--muted); font-size: 13px; }
.dom-note, .dom-msg { margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--soft); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.dom-item { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.dom-recs { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; font-size: 12px; }
.dom-rec { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; padding: 8px 10px; background: var(--card); align-items: center; }
.dom-rec-h { background: var(--soft); color: var(--muted); }
.dom-rec code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.dom-val { cursor: copy; }

.rshell { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; overflow: hidden; }
.rshell[hidden] { display: none; }
.rshell-bar { display: flex; align-items: center; gap: 8px; flex: none; }
.rshell-spacer { flex: 1; }
.rshell-state { font-size: 12px; color: var(--muted); }
.rshell-note { font-size: 12px; color: var(--muted); line-height: 1.5; padding: 8px 10px; background: var(--soft); border-radius: 9px; flex: none; }
.rshell-term { flex: 1; min-height: 0; background: #161614; border-radius: 10px; padding: 8px 6px 4px 10px; overflow: hidden; }
.rshell-term .xterm { height: 100%; }

/* ---------- Admin panel and support ---------- */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.adm-tile { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 14px 16px; display: grid; gap: 4px; }
.adm-tile b { font: 500 24px/1.1 var(--serif); }
.adm-tile span { font-size: 12px; color: var(--muted); }
.adm-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 8px 22px 18px; }
.adm-bars i { flex: 1; min-height: 2px; background: var(--ink); border-radius: 2px 2px 0 0; opacity: .75; }
.adm-chip { display: inline-block; font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
.adm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adm-bar input[type=search], .adm-bar select, .adm-ctl select, .adm-inline input, .acct-form select { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 0 10px; font-size: 13px; color: var(--fg); }
.acct-form select { width: 100%; height: 38px; }
.adm-bar input[type=search] { flex: 1; min-width: 180px; }
.adm-table { padding: 0; }
.adm-row { display: grid; grid-template-columns: 52px minmax(0, 2.2fr) minmax(0, 1.6fr) 120px minmax(0, 1fr) 150px; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 18px; border: 0; border-top: 1px solid var(--line); background: transparent; font-size: 13px; color: var(--fg); }
.adm-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.adm-row { cursor: pointer; } button.adm-row:hover { background: var(--soft); }
.adm-h { color: var(--muted); font-size: 12px; border-top: 0; }
.adm-row.adm-c { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.8fr) 80px 80px 90px 150px; }
.adm-row.adm-t { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 150px minmax(0, 1.6fr); }
.adm-row.adm-a { grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 2fr); }
.adm-row.adm-a > span { white-space: normal; }
.adm-row.adm-s2 { grid-template-columns: 52px minmax(0, 3fr) 110px 150px; }
.adm-row code { font-size: 11px; color: var(--muted); }
.adm-st { font-style: normal; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); text-transform: capitalize; }
.adm-st.open { background: color-mix(in srgb, #D9822B 18%, var(--card)); } .adm-st.solved { background: color-mix(in srgb, #3C9A5F 18%, var(--card)); } .adm-st.pending { background: color-mix(in srgb, #4C7BD9 15%, var(--card)); }
.adm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #D9822B; }
.adm-detail { padding: 18px 22px 20px; display: grid; gap: 14px; margin-top: 4px; }
.adm-detail h4 { margin: 4px 0 -6px; font: 500 14px var(--sans); }
.adm-dh { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.adm-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-thread { display: grid; gap: 10px; }
.adm-msg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--card); }
.adm-msg.customer { background: var(--soft); }
.adm-msg.note { background: color-mix(in srgb, #E5B93C 16%, var(--card)); border-style: dashed; }
.adm-msg.system { background: transparent; color: var(--muted); font-size: 12px; }
.adm-mh { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.adm-mh b { color: var(--fg); font-weight: 500; }
.adm-mt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.adm-reply textarea, .adm-detail textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px 12px; font: 14px var(--sans); resize: vertical; }
.adm-inline { display: flex; gap: 8px; flex-wrap: wrap; } .adm-inline input { flex: 1; min-width: 140px; }
.adm-consent { border-top: 1px solid var(--line); padding-top: 12px; }
.adm-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.adm-file { border: 1px solid var(--line); background: var(--soft); border-radius: 7px; padding: 3px 9px; font: 12px ui-monospace, Menlo, monospace; cursor: pointer; }
.adm-code { max-height: 340px; overflow: auto; background: #161614; color: #ecebe6; border-radius: 10px; padding: 12px; font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre; }
.adm-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.adm-steps code, .sp-note code { font: 12px ui-monospace, Menlo, monospace; background: var(--soft); padding: 1px 6px; border-radius: 5px; }
@media (max-width: 860px) { .adm-row, .adm-row.adm-c, .adm-row.adm-t, .adm-row.adm-a, .adm-row.adm-s2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .adm-h { display: none; } }

.adm-warn { padding: 11px 14px; border-radius: 10px; background: color-mix(in srgb, #D9822B 16%, var(--card)); border: 1px solid color-mix(in srgb, #D9822B 35%, var(--line)); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.adm-warn code { font: 12px ui-monospace, Menlo, monospace; }

.admin-body { display: flex; flex-direction: column; min-height: 100vh; height: 100vh; }
.admin-root { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.admin-root > .view { flex: 1; }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.adm-top-r { display: flex; align-items: center; gap: 12px; }
.admin-root .open-side { display: none; }

.dom-log summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.dom-log .adm-code { max-height: 260px; margin-top: 6px; white-space: pre-wrap; }

/* ---------- usage charts and meters ---------- */
.u-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.chart { margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 14px 16px 10px; display: grid; gap: 8px; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.chart figcaption b { color: var(--fg); font-weight: 500; font-size: 15px; } .chart figcaption small { color: var(--muted); font-weight: 400; font-size: 11px; }
.chart svg { width: 100%; height: 130px; display: block; overflow: visible; }
.ch-bar { fill: var(--fg); opacity: .78; } .ch-hit { fill: transparent; } .ch-hit:hover + .ch-bar, .ch-bar:hover { opacity: 1; }
.ch-base { stroke: var(--line-strong, var(--line)); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-x { fill: var(--muted); font-size: 10.5px; }
.ch-empty, .ch-note { margin: 0; font-size: 12px; color: var(--muted); }
.ch-table summary { cursor: pointer; font-size: 11.5px; color: var(--muted); }
.ch-table table, .u-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ch-table th, .ch-table td, .u-table th, .u-table td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); } .u-table th { color: var(--muted); font-weight: 400; border-top: 0; } .u-table th, .u-table td { padding: 10px 18px; }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: var(--ink-fg); font-size: 12px; padding: 5px 9px; border-radius: 7px; white-space: nowrap; }
.chart-tip[hidden] { display: none; }
.u-limits { padding: 6px 22px; } .u-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; } .u-row:first-child { border-top: 0; }
.u-meter { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); } .u-meter em { font-style: normal; }
.u-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); } .u-bar i { display: block; height: 100%; background: var(--fg); opacity: .8; border-radius: 99px; } .u-bar i.near { background: #D9822B; opacity: 1; } .u-bar i.full { background: #B3261E; opacity: 1; }
.u-recent { list-style: none; margin: 0; padding: 6px 22px; } .u-recent li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 160px; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; } .u-recent li:first-child { border-top: 0; } .u-recent time { color: var(--muted); font-size: 12px; text-align: right; }
.adm-row.u-apps { grid-template-columns: minmax(0, 1.4fr) 150px 80px 90px 80px; } .adm-row.u-proj { grid-template-columns: minmax(0, 1.6fr) 80px 90px minmax(0, 1.2fr); }
.adm-tile small { color: var(--muted); font-size: 11px; }
@media (max-width: 860px) { .u-row { grid-template-columns: 1fr; gap: 6px; } .u-recent li { grid-template-columns: 1fr auto; } .u-recent time { display: none; } }
.adm-row.u-adm-apps { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.4fr) 90px 150px 80px 140px; } .adm-row.u-adm-top { grid-template-columns: minmax(0, 1.8fr) 80px 90px 90px 70px 90px; }
.ch-plot { position: relative; } .ch-peak { position: absolute; right: 0; top: -2px; font-size: 10.5px; color: var(--muted); } .ch-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; } .chart svg { height: 110px; margin-top: 12px; }

/* the card's menu must not be clipped by the card */
.pcard { overflow: visible; }
.pcard .pthumb { border-radius: 11px 11px 0 0; }
.pcard:has(.pop:not([hidden])) { z-index: 20; }
.pcard .pop { min-width: 200px; } .pcard .pop-item { white-space: nowrap; }

/* ---- Storage and Secrets tabs ---- */
.stor-kind { display: flex; gap: 8px; flex-wrap: wrap; }
.stor-kind .outline-btn.on { background: var(--soft); border-color: var(--fg); }
.stor-parts { display: grid; gap: 4px; margin: 10px 0 4px; }
.stor-parts > div, .stor-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.stor-files { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.stor-file { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.stor-file:last-child { border-bottom: 0; }
.stor-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stor-act { display: flex; gap: 6px; }
.stor-act .outline-btn { height: 26px; padding: 0 9px; font-size: 11.5px; display: inline-flex; align-items: center; text-decoration: none; }

/* ---- announcement card ---- */
.ann { z-index: 70; width: 320px; max-width: calc(100vw - 24px); box-sizing: border-box; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .14); }
.ann:not(.ann-static) { position: fixed; animation: ann-in .25s ease-out; }
.ann-bottom-right { right: 20px; bottom: 20px; } .ann-bottom-left { left: 20px; bottom: 20px; } .ann-top-right { right: 20px; top: 20px; } .ann-top-left { left: 20px; top: 20px; }
.ann-center { left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28), 0 12px 40px rgba(0, 0, 0, .2); }
.ann-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 12px; background: var(--soft); }
.ann-title { margin: 0 4px 4px; font: 500 20px var(--serif, Georgia, serif); color: var(--fg); }
.ann-text { margin: 0 4px 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ann-watch, .ann-hide { display: flex; align-items: center; justify-content: center; width: 100%; height: 42px; border-radius: 10px; font: 500 14px var(--sans); text-decoration: none; cursor: pointer; box-sizing: border-box; }
.ann-watch { background: var(--fg); color: var(--bg, #fff); border: 1px solid var(--fg); margin-bottom: 8px; }
.ann-hide { background: transparent; color: var(--fg); border: 1px solid var(--line-strong, var(--line)); }
@keyframes ann-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ann-center:not(.ann-static) { animation: none; }
@media (prefers-reduced-motion: reduce) { .ann:not(.ann-static) { animation: none; } }
.ann-form { display: grid; gap: 8px; max-width: 520px; }
.ann-form label { font-size: 12.5px; color: var(--muted); }
.ann-form textarea { min-height: 64px; }
.ann-prev { margin-top: 14px; display: flex; justify-content: flex-start; padding: 16px; background: var(--soft); border-radius: 12px; }
.ann-form .toggle-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fg); }
.ann-form input[type="checkbox"] { width: auto; height: auto; flex: none; }

/* ---- setup alert next to the profile (hover or focus for the full message) ---- */
.cred-alert { display: contents; }
.cred-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 5; }
.cred-btn { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: #b45309; cursor: help; padding: 0; }
.cred-btn .i { width: 14px; height: 14px; }
.cred-btn:hover, .cred-btn:focus-visible { background: var(--soft); }
.cred-tip { display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 80; box-sizing: border-box; padding: 12px 14px; background: var(--card); border: 1px solid var(--line-strong, var(--line)); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); font-size: 12.5px; line-height: 1.5; color: var(--fg); text-align: left; }
.cred-tip strong { display: block; margin-bottom: 4px; font-size: 13px; }
.cred-tip span { color: var(--muted); }
.cred-tip code { font-size: 11.5px; background: var(--soft); border-radius: 5px; padding: 1px 4px; }
.cred-alert:hover .cred-tip, .cred-alert:focus-within .cred-tip { display: block; }
.cred-alert[hidden] { display: none; }
.app.closed .cred-alert { display: none; }
.account-btn { padding-right: 40px; }

/* ---- Publish menu for web apps ---- */
.pubw-addr { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pubw-url { font: 500 13px var(--mono, monospace); color: var(--fg); word-break: break-all; text-decoration: none; }
a.pubw-url[href]:hover { text-decoration: underline; }
.pubw-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pubw-open { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; text-decoration: none; }
.pubw-links { display: flex; gap: 14px; margin-top: 10px; }
.linklike { border: 0; background: transparent; padding: 0; color: var(--muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--fg); }
.pubw-wp { margin-top: 10px; display: grid; gap: 6px; }
.pubw-cred { font-size: 12px; display: grid; gap: 3px; }
.pubw-cred span { display: inline-block; width: 64px; color: var(--muted); }
.pubw-cred code { font: 12px var(--mono, monospace); background: var(--soft); border-radius: 5px; padding: 1px 5px; word-break: break-all; }

/* ---- GitHub ---- */
.gh-card-box { width: min(560px, 100%); }
.gh-who { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.gh-who img { border-radius: 50%; }
.gh-who b { display: block; }
.gh-filter { width: 100%; box-sizing: border-box; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); padding: 0 10px; font: inherit; font-size: 13px; color: var(--fg); margin-bottom: 8px; }
.gh-repos { display: grid; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.gh-repos button { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 9px 12px; color: var(--fg); }
.gh-repos button:last-child { border-bottom: 0; }
.gh-repos button:hover { background: var(--soft); }
.gh-repos small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.gh-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.acct-form .toggle-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg); }
.acct-form .toggle-line input[type="checkbox"] { width: auto; height: auto; flex: none; margin: 0; }
.dep-job { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--soft); }
.dep-job.error { border-color: #d9a3a3; }
.dep-job.ready { border-color: #9cc9ab; }
.dep-job pre { max-height: 220px; overflow: auto; margin: 8px 0 0; font-size: 11.5px; white-space: pre-wrap; }
.gh-repos button.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--fg); }

/* ---- the AI agents options, shown on the Integrations page ---- */
.int-agents { margin: 18px 0 8px; display: grid; gap: 14px; }
.int-agents-head { display: flex; align-items: center; justify-content: space-between; }
.int-agents-head h2 { margin: 0; font: 400 22px/1.2 var(--serif); letter-spacing: -.01em; }

/* ---------- what to do with the attached images ---------- */
.image-intent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 2px 0; }
.image-intent .ask { font-size: 12px; color: var(--muted); margin-right: 2px; }
.image-intent .opt { position: relative; height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 859px; background: var(--card); color: var(--ink, inherit); font-size: 12.5px; cursor: pointer; }
.image-intent .opt:hover { background: var(--soft); }
.image-intent .opt[aria-checked="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.image-intent .opt:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.image-intent .opt::after { content: attr(data-hint); position: absolute; left: 0; bottom: calc(100% + 8px); width: 230px; padding: 8px 10px; border-radius: 9px; background: #1d1d1b; color: #fff; font-size: 12px; line-height: 1.4; text-align: left; white-space: normal; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .12s, transform .12s; z-index: 20; }
.image-intent .opt:hover::after, .image-intent .opt:focus-visible::after { opacity: 1; transform: none; }
.image-intent.need { animation: intent-nudge .35s; }
.image-intent.need .ask { color: var(--blue); font-weight: 600; }
@keyframes intent-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .image-intent.need { animation: none; } }

/* ---------- Agency workspace and client portal ---------- */
.agency-in { max-width: 1020px; }
.agency-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin:22px 0 24px; }
.agency-heading .projects-title { margin:0; }
.agency-sub { margin:5px 0 0; color:var(--muted); font-size:13px; }
.eyebrow { color:var(--faint); font-size:10px; font-weight:600; letter-spacing:.12em; margin-bottom:5px; }
.agency-portal-link { color:var(--agency-accent,var(--muted)); text-decoration:none; font-size:12px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; }
.agency-portal-link:hover { background:var(--soft); }
.agency-tabs { display:flex; gap:5px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.agency-tabs button { position:relative; border:0; background:none; color:var(--muted); padding:9px 12px 11px; font-size:12.5px; }
.agency-tabs button[aria-selected="true"] { color:var(--fg); font-weight:600; }
.agency-tabs button[aria-selected="true"]::after { content:""; position:absolute; bottom:-1px; left:10px; right:10px; height:2px; border-radius:2px; background:var(--agency-accent,var(--fg)); }
.agency-panel { padding-bottom:32px; }
.agency-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; margin:0 0 27px; }
.agency-stats article,.agency-lead,.agency-client-card,.agency-settings-card { background:var(--card); border:1px solid var(--line); border-radius:12px; }
.agency-stats article { display:grid; gap:3px; padding:13px 15px; }
.agency-stats article span,.agency-stats article small { color:var(--muted); font-size:11.5px; }
.agency-stats article b { font-size:22px; font-weight:500; letter-spacing:-.03em; }
.agency-section-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.agency-section-head h2,.agency-settings-card h2 { margin:0; font:500 18px/1.3 var(--sans); }
.agency-section-head p,.agency-settings-card>p { color:var(--muted); margin:3px 0 0; font-size:12px; }
.agency-actions { display:flex; gap:7px; }
.agency-leads,.agency-client-list { display:grid; gap:8px; }
.agency-lead { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto auto auto; gap:10px; align-items:center; padding:12px 14px; }
.agency-lead-title { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.agency-lead-title b,.agency-client-info>b { font-size:13px; font-weight:600; }
.agency-lead-title span,.agency-lead-meta,.agency-lead-main>p { color:var(--muted); font-size:11.5px; }
.agency-lead-meta { display:flex; flex-wrap:wrap; gap:4px; margin-top:3px; }
.agency-lead-meta a { color:inherit; text-decoration:none; }
.agency-lead-main>p { margin:5px 0 0; }
.agency-due { color:var(--warn); font-weight:600; }
.agency-lead-value { text-align:right; min-width:82px; }
.agency-lead-value b,.agency-client-price b { display:block; font-size:12.5px; font-weight:600; }
.agency-lead-value small,.agency-client-price span { color:var(--muted); font-size:10.5px; }
.agency-lead select,.agency-form input,.agency-form textarea,.agency-form select,.agency-settings-form input,.portal-login input,.portal-shell input { min-width:0; width:100%; border:1px solid var(--line); border-radius:7px; background:var(--bg); padding:7px 9px; font-size:12px; }
.agency-lead select { width:auto; min-width:98px; }
.agency-lead .outline-btn,.agency-actions .outline-btn,.agency-actions .ink-btn,.agency-client-card .outline-btn { white-space:nowrap; font-size:11.5px; min-height:31px; padding:0 10px; }
.agency-empty { text-align:center; padding:48px 20px; border:1px dashed var(--line-strong); border-radius:12px; }
.agency-empty>span { display:grid; place-items:center; width:35px; height:35px; margin:0 auto 10px; border-radius:10px; background:var(--soft); color:var(--agency-accent,var(--muted)); font-size:18px; }
.agency-empty h3 { margin:0; font-size:14px; font-weight:600; }
.agency-empty p { margin:5px auto 14px; max-width:340px; color:var(--muted); font-size:12px; }
.agency-client-card { display:flex; align-items:center; gap:12px; padding:12px 14px; }
.agency-client-avatar,.agency-preview-logo { display:grid; place-items:center; flex:none; width:36px; height:36px; border-radius:10px; color:#fff; background:var(--agency-accent,#687363); font-weight:600; }
.agency-client-info { min-width:0; display:grid; flex:1; gap:2px; }
.agency-client-info span,.agency-client-info small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11.5px; }
.agency-client-price { min-width:90px; text-align:right; }
.agency-settings-card { max-width:660px; padding:20px; }
.agency-settings-card>p { margin:4px 0 20px; }
.agency-settings-form { display:grid; gap:13px; }
.agency-settings-form label,.agency-form label,.portal-login label,.portal-shell label { display:grid; gap:5px; font-size:11.5px; font-weight:500; }
.agency-settings-form input[type=color] { width:54px; height:34px; padding:3px; }
.agency-settings-form input[type=number] { max-width:140px; }
.agency-settings-form small,.agency-form label small { color:var(--muted); font-size:10.5px; font-weight:400; }
.agency-settings-form .ink-btn { justify-self:start; margin-top:4px; }
.agency-preview { display:flex; gap:10px; align-items:center; padding-top:18px; margin-top:20px; border-top:1px solid var(--line); }
.agency-preview>div:last-child { display:grid; gap:2px; font-size:12px; }
.agency-preview span { color:var(--muted); font-size:10.5px; }
.agency-dialog { width:min(590px,calc(100% - 24px)); max-height:calc(100% - 24px); overflow-y:auto; border:1px solid var(--line); border-radius:15px; padding:22px; color:var(--fg); background:var(--panel); box-shadow:var(--shadow); }
.agency-dialog::backdrop { background:rgba(20,20,18,.38); backdrop-filter:blur(2px); }
.agency-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:15px; }
.agency-dialog-head h2 { margin:0; font:500 21px/1.2 var(--sans); }
.agency-form>p,.agency-dialog>p { margin:0 0 15px; color:var(--muted); font-size:12px; }
.agency-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.agency-form .span-two { grid-column:1/-1; }
.agency-form textarea { resize:vertical; }
.agency-form select[multiple] { height:88px; }
.agency-form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.agency-dialog>label { display:grid; gap:5px; margin:10px 0; font-size:11px; font-weight:600; }
.agency-dialog>label input { width:100%; min-width:0; border:1px solid var(--line); background:var(--bg); color:var(--fg); border-radius:7px; padding:8px 9px; font-size:12px; }
.agency-error { color:var(--warn); }
.app.client-portal-mode { grid-template-columns:minmax(0,1fr); padding:0; }
.app.client-portal-mode .side,.app.client-portal-mode .side-rs,.app.client-portal-mode .scrim { display:none; }
.app.client-portal-mode .main { border:0; border-radius:0; }
.client-portal { min-height:100%; background:var(--bg); }
.portal-login { display:grid; gap:12px; width:min(370px,calc(100% - 36px)); margin:10vh auto; padding:26px; border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:var(--shadow); }
.portal-login .agency-preview-logo { margin-bottom:2px; }
.portal-login h1 { margin:0; font:400 26px/1.2 var(--serif); }
.portal-login>p { color:var(--muted); font-size:12px; margin:0; }
.portal-login form { display:grid; gap:12px; margin-top:6px; }
.portal-shell { min-height:100vh; }
.portal-shell>header { height:58px; display:flex; align-items:center; gap:10px; padding:0 max(24px,calc((100% - 900px)/2)); border-bottom:1px solid var(--line); background:var(--panel); }
.portal-shell>header .agency-preview-logo { width:30px; height:30px; border-radius:8px; }
.portal-shell>header .link-btn { margin-left:auto; }
.portal-shell>main { max-width:900px; margin:46px auto; padding:0 22px 40px; }
.portal-shell h1 { margin:0; font:400 32px/1.2 var(--serif); }
.portal-shell main>p { margin:7px 0 22px; color:var(--muted); }
.portal-sites { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px; margin-bottom:22px; }
.portal-sites article { display:grid; gap:9px; padding:17px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.portal-sites h2 { margin:0; font-size:15px; font-weight:500; }
.portal-sites p,.portal-sites .hint { margin:0; color:var(--muted); font-size:12px; }
.portal-sites .ink-btn { justify-self:start; text-decoration:none; }
.portal-state { color:var(--agency-accent); font-size:10.5px; }
.portal-shell .agency-settings-card { margin-top:20px; }
@media (max-width:720px) {
  .agency-stats { grid-template-columns:1fr; gap:7px; }
  .agency-stats article { grid-template-columns:1fr auto; align-items:center; }
  .agency-stats article small { grid-column:1/-1; }
  .agency-section-head { align-items:flex-start; flex-direction:column; }
  .agency-lead { grid-template-columns:1fr auto; gap:8px; }
  .agency-lead-value { grid-column:2; grid-row:1; }
  .agency-lead select { grid-column:1; grid-row:2; }
  .agency-lead .outline-btn { grid-column:2; grid-row:2; }
  .agency-client-card { flex-wrap:wrap; }
  .agency-client-price { margin-left:auto; }
  .agency-client-card .outline-btn { margin-left:auto; }
  .agency-form-grid { grid-template-columns:1fr; }
  .agency-form .span-two { grid-column:auto; }
  .agency-heading { margin-top:14px; }
  .portal-shell>main { margin:32px auto; }
}
.project-scope select { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); padding: 0 28px 0 10px; font: 12px var(--sans); }
.agency-project-list { display: grid; gap: 10px; }
.agency-project-card { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.agency-project-card b,.agency-project-card span { display:block; }
.agency-project-card span { margin-top:4px; color:var(--muted); font-size:12px; }
.agency-project-card > div:last-child { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.agency-back { padding:0; margin:0 0 7px; }
@media (max-width:700px) { .agency-project-card { align-items:flex-start; flex-direction:column; } .agency-project-card > div:last-child { justify-content:flex-start; } }

.agency-compose { width:min(690px,100%); }
.agency-compose-close { position:absolute; top:14px; right:14px; font-size:22px; }
.agency-compose .build-types { margin:18px 0; }
.agency-compose .composer { margin-top:0; }

.composer-more-wrap { position:relative; }
.composer-more { min-width:170px; }
.composer-more .pop-item { white-space:nowrap; }
.agency-compose-note { margin-left: 3px; font-size: 12px; }
@media (max-width: 560px) { .agency-compose-note { display: none; } }

.agency-password-row { display:flex; gap:8px; align-items:center; }
.agency-password-row input { min-width:0; flex:1; }
.agency-password-row .outline-btn { flex:none; white-space:nowrap; }

.portal-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:24px 0 30px; }
.portal-stats article { border:1px solid var(--line); border-radius:12px; padding:16px; background:var(--card); }
.portal-stats span,.portal-stats small { display:block; color:var(--muted); }
.portal-stats b { display:block; margin:5px 0; font-size:25px; }
.portal-stats b.portal-email { font-size:15px; overflow-wrap:anywhere; }
.portal-section > div:first-child h2 { margin-bottom:2px; }
.portal-section > div:first-child p { margin-top:0; color:var(--muted); }
@media (max-width:700px) { .portal-stats { grid-template-columns:1fr; } }

.agency-client-more { position:relative; }
.agency-client-more .icon-btn { border:1px solid var(--line); }
.agency-client-more .pop { min-width:172px; }

/* ---------- model picker ---------- */
.model-pick { position: relative; display: inline-flex; }
.model-pick .pop.up { left: auto; right: 0; width: 270px; }
button.model-label { border: 0; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 7px; text-transform: none; }
button.model-label:hover, button.model-label[aria-expanded="true"] { background: var(--soft); color: var(--muted); }
button.model-label::after { content: ' \25BE'; font-size: 9px; }
.model-pick .pop-opt b { font-weight: 600; font-size: 13px; }

/* ---------- bot traps ---------- */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-slot:empty { display: none; }
.cf-slot { margin: 6px 0 2px; min-height: 65px; }

/* ---------- confirm-your-email banner ---------- */
.verify-banner { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; max-width: min(640px, calc(100vw - 24px)); padding: 9px 10px 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); font-size: 13px; line-height: 1.4; }
.verify-banner[hidden] { display: none; }
.verify-banner button { flex: none; height: 28px; padding: 0 12px; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; background: var(--soft); cursor: pointer; font-size: 12.5px; }
.verify-banner button:disabled { opacity: .6; cursor: default; }

/* ---------- which AI pays ---------- */
.ai-source { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.ai-source select { max-width: 560px; }
#buy-ai { text-decoration: none; display: inline-flex; width: fit-content; }

/* ---------- branding card ---------- */
.brand-pick { display: grid; gap: 4px; }
.bp-row { display: flex; gap: 8px; align-items: center; }
.bp-row input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
.bp-row input[data-key] { width: 210px; font-family: var(--mono); }
.bp-preview { display: flex; gap: 14px; align-items: center; padding: 12px 0 2px; }
.bp-link { color: var(--blue); font-weight: 500; }

/* ---------- a connected agent is in use ---------- */
.agent-live { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 6px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); font-size: 12.5px; }
.agent-live[hidden] { display: none; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: pulse-dot 1.1s ease-in-out infinite; flex: none; }
@keyframes pulse-dot { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
button.model-label.connected { color: var(--ok); }
button.model-label.connected::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
button.model-label.working::before { animation: pulse-dot 1.1s ease-in-out infinite; }
.conn-dot { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; background: var(--ok); }
.pop-head { padding: 8px 8.5px 3px; font-size: 11px; letter-spacing: .02em; color: var(--faint); text-transform: uppercase; }

.pv-progress { width:min(340px,80vw); margin:14px auto 0; text-align:left; }
.pv-meter { height:8px; border-radius:99px; background:var(--soft); overflow:hidden; }
.pv-meter i { display:block; height:100%; width:0; border-radius:99px; background:var(--fg); transition:width .6s ease; }
.pv-steps { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:6px; font-size:13px; color:var(--muted); }
.pv-steps li::before { content:"○"; display:inline-block; width:20px; }
.pv-steps li.done { color:var(--fg); } .pv-steps li.done::before { content:"✓"; }
.pv-steps li.now { color:var(--fg); font-weight:500; } .pv-steps li.now::before { content:"●"; animation:pvpulse 1.1s ease-in-out infinite; }
.pv-time { margin:10px 0 0; font-size:12px; color:var(--muted); }
@keyframes pvpulse { 50% { opacity:.3; } }
@media (prefers-reduced-motion:reduce) { .pv-steps li.now::before { animation:none; } .pv-meter i { transition:none; } }

/* Long project names are cut with an ellipsis and never push the sidebar wider (grid and flex items must be allowed to shrink) */
.recent { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.recent li { min-width: 0; }
.recent button.r-open { min-width: 0; overflow: hidden; }
.recent button span.t { flex: 1 1 auto; min-width: 0; display: block; }
.recent button .dot { flex: none; }
.pname { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }

/* Chat: versions are plain checkpoint lines in the flow (no buttons); the message box is a rounded field that lights up when focused */
.mod { border: 0; background: transparent; padding: 7px 8px; border-radius: 10px; gap: 3px; cursor: pointer; }
.mod:hover { background: var(--soft); }
.mod.selected { border: 0; box-shadow: none; background: var(--blue-soft); }
.mod-top { gap: 7px; }
.mod-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--blue); border-radius: 50%; color: var(--blue); flex: none; }
.mod-ic .i { width: 10px; height: 10px; }
.mod-top button { opacity: 0; transition: opacity .12s; }
.mod:hover .mod-top button, .mod:focus-within .mod-top button, .mod.selected .mod-top button { opacity: 1; }
.mod p { color: var(--fg); font-size: 13.5px; padding-left: 25px; }
.dock .composer { border-radius: 18px; padding: 14px 14px 10px 16px; gap: 8px; }
.dock .composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dock .composer-in > .i { display: none; }
.dock .composer textarea { min-height: 46px; font-size: 15px; }
.dock .composer-row .round#dock-attach { border: 0; background: transparent; }
.dock .composer-row .round#dock-attach:hover { background: var(--soft); }

/* Integrations that are connected carry a small "Connected" badge (a dot in the icons-only view) */
.integration-card.is-connected h2::after { content: "Connected"; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: #e6f4ea; color: #1e6b3a; font: 500 11px/1.6 var(--sans, system-ui); vertical-align: 2px; }
.as-icons .integration-card.is-connected h2::after { content: ""; display: inline-block; width: 7px; height: 7px; padding: 0; margin-left: 6px; background: #2a9d55; vertical-align: 1px; }
@media (prefers-color-scheme: dark) { .integration-card.is-connected h2::after { background: #1d3a29; color: #7bd69a; } }
.agency-form .check-line { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; font-size: 13.5px; }
.agency-form .check-line input { margin-top: 3px; width: auto; }
.agency-form .check-line small { grid-column: 2; color: var(--muted); font-size: 12px; }
.adm-chip.adm-warn { background: #fdf0d5; color: #8a5a00; }
@media (prefers-color-scheme: dark) { .adm-chip.adm-warn { background: #3a2f12; color: #f0c674; } }

/* intake forms */
.agency-forms { display:grid; gap:10px; }
.agency-form-card { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:14px; background:var(--card); border:1px solid var(--line); border-radius:12px; }
.agency-form-main { flex:1 1 320px; min-width:0; }
.agency-form-main .agency-lead-title b { font-size:14px; }
.agency-form-link input { width:100%; margin-top:8px; border:1px solid var(--line); border-radius:8px; background:var(--soft); color:var(--muted); font:12px var(--mono,ui-monospace,monospace); padding:7px 9px; }
.agency-form-buttons { display:flex; flex-wrap:wrap; gap:6px; }
.agency-form-buttons a.outline-btn { color:inherit; }
.agency-form-buttons .outline-btn,.agency-form-buttons .ink-btn { font-size:11.5px; min-height:31px; padding:0 10px; display:inline-flex; align-items:center; white-space:nowrap; text-decoration:none; }
.agency-new,.agency-open,.agency-closed { font-style:normal; font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:99px; }
.agency-new { background:var(--agency-accent,#687363); color:#fff; }
.agency-open { background:color-mix(in srgb,#2e7d32 16%,transparent); color:#2e7d32; }
.agency-closed { background:var(--soft); color:var(--muted); }
.fe-h { margin:18px 0 8px; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.fe-list { list-style:none; margin:0 0 12px; padding:0; display:grid; gap:8px; }
.fe-q { border:1px solid var(--line); border-radius:10px; padding:10px; background:var(--card); display:grid; gap:8px; }
.fe-row { display:grid; grid-template-columns:auto minmax(0,1fr) 150px; gap:8px; align-items:center; }
.fe-n { width:22px; height:22px; border-radius:6px; display:grid; place-items:center; background:var(--soft); font-size:11px; color:var(--muted); }
.fe-tools { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:12px; }
.fe-tools .link-btn { margin-left:10px; font-size:12px; }
.fe-tools .link-btn[disabled] { opacity:.35; cursor:default; }
.fe-req { display:flex; align-items:center; gap:6px; }
.agency-form .fe-req input { width:auto; flex:none; margin:0; }
.agency-form .fe-req { flex-direction:row; }
.agency-form-editor { max-width:720px; }
#agency-dialog:has(.agency-form-editor),#agency-dialog:has(.agency-brief) { width:min(760px,calc(100vw - 24px)); max-height:calc(100vh - 32px); overflow:auto; }
.agency-brief { display:grid; gap:4px; }
.ab-meta { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:12.5px; color:var(--muted); }
.ab-meta a { color:inherit; }
.ab-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:center; }
.ab-actions select { width:auto; }
.ab-answers { margin:0; }
.ab-answers dt { font-size:12px; color:var(--muted); margin-top:14px; }
.ab-answers dd { margin:2px 0 0; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.ab-notes { white-space:pre-wrap; font-size:13px; }
.ab-thread { list-style:none; padding:0; margin:0 0 10px; display:grid; gap:8px; }
.ab-thread li { border:1px solid var(--line); border-left:3px solid var(--agency-accent,var(--fg)); border-radius:12px; padding:11px 14px; background:transparent; }
.ab-thread small { display:block; color:var(--muted); font-size:11px; }
.ab-thread p { margin:6px 0 0; white-space:pre-wrap; font-size:13px; overflow-wrap:anywhere; }

@media (max-width:640px) { .fe-row { grid-template-columns:auto 1fr; } .fe-row select { grid-column:1 / -1; } .ab-send { flex-direction:column; align-items:stretch; } }

.form-menu-wrap { position:relative; display:inline-block; }
.form-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:30; width:300px; max-width:calc(100vw - 32px); max-height:70vh; overflow:auto; padding:6px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(0,0,0,.14); text-align:left; }
.agency-empty .form-menu { left:50%; right:auto; transform:translateX(-50%); }
.form-menu[hidden] { display:none; }
.form-menu-h { padding:8px 10px 4px; font-size:10.5px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); }
.form-menu button[role=menuitem] { display:block; width:100%; text-align:left; padding:8px 10px; border:0; background:none; border-radius:8px; cursor:pointer; color:var(--ink); font:inherit; }
.form-menu button[role=menuitem]:hover,.form-menu button[role=menuitem]:focus-visible { background:var(--soft); }
.form-menu b { display:block; font-size:12.5px; font-weight:600; }
.form-menu b i { font-style:normal; font-size:10px; font-weight:600; margin-left:6px; padding:1px 6px; border-radius:99px; background:var(--agency-accent,#687363); color:#fff; }
.form-menu small { display:block; color:var(--muted); font-size:11px; margin-top:1px; }
.form-menu-row { display:flex; align-items:center; }
.form-menu-row button[role=menuitem] { flex:1; }
.form-menu-x { border:0; background:none; color:var(--muted); font-size:18px; width:28px; height:28px; border-radius:6px; cursor:pointer; }
.form-menu-x:hover { background:var(--soft); color:var(--ink); }
.fe-preset { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.fe-preset input { flex:1 1 180px; min-width:0; }
.fe-preset small { flex-basis:100%; color:var(--muted); font-size:11px; }

.fe-slug { display:flex; align-items:center; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:var(--card); }
.fe-slug span { padding:0 0 0 10px; color:var(--muted); font-size:12px; white-space:nowrap; }
.agency-form .fe-slug input { border:0; border-radius:0; flex:1; min-width:0; padding-left:2px; }
.agency-invites { display:grid; gap:10px; }
.inv-add { display:grid; grid-template-columns:1fr 1fr auto; gap:8px; }
.inv-list { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.inv-list li { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:var(--card); }
.inv-who { flex:1 1 160px; min-width:0; }
.inv-who b { display:block; font-size:13px; }
.inv-who small { color:var(--muted); font-size:11.5px; }
.inv-status { font-size:11px; font-weight:600; padding:2px 9px; border-radius:99px; background:var(--soft); color:var(--muted); }
.inv-status.seen { background:color-mix(in srgb,#b26a00 16%,transparent); color:#b26a00; }
.inv-status.done { background:color-mix(in srgb,#2e7d32 16%,transparent); color:#2e7d32; }
.inv-btns { display:flex; gap:6px; flex-wrap:wrap; }
.inv-btns .outline-btn { font-size:11.5px; min-height:30px; padding:0 10px; }
.inv-empty { color:var(--muted); font-size:12.5px; justify-content:center; }
#agency-dialog:has(.agency-invites) { width:min(680px,calc(100vw - 24px)); max-height:calc(100vh - 32px); overflow:auto; }
@media (max-width:560px) { .inv-add { grid-template-columns:1fr; } }

/* a lead from a form: key answers as tags, a short excerpt, never the whole brief */
.agency-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.agency-chip { display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:2px 9px; border-radius:99px; background:var(--soft); border:1px solid var(--line); font-size:11px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agency-chip i { font-style:normal; color:var(--muted); }
.agency-excerpt { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.agency-lead-value b,.agency-lead-value small,.agency-lead-value span { display:block; }
.agency-lead-main { min-width:0; }

/* agency settings: use the width of the page, form on the left and the client portal preview on the right */
#agency-panel .agency-settings-card { max-width:none; padding:26px 28px; display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr); gap:0 40px; align-items:start; }
#agency-panel .agency-settings-card>h2,#agency-panel .agency-settings-card>p { grid-column:1 / -1; }
#agency-panel .agency-settings-form { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:18px 20px; align-items:start; }
#agency-panel .agency-settings-form label:first-child,#agency-panel .agency-settings-form .ink-btn { grid-column:1 / -1; }
#agency-panel .agency-settings-form input[type=number] { max-width:none; }
#agency-panel .agency-settings-form input[type=color] { width:100%; height:38px; }
#agency-panel .agency-preview { flex-direction:column; align-items:flex-start; gap:14px; margin:0; padding:22px; border:1px solid var(--line); border-radius:12px; background:var(--soft); min-height:100%; }
#agency-panel .agency-preview .agency-preview-logo { width:52px; height:52px; border-radius:14px; font-size:20px; }
#agency-panel .agency-preview>div:last-child { font-size:15px; }
#agency-panel .agency-preview span { font-size:12px; }
@media (max-width:900px) { #agency-panel .agency-settings-card { grid-template-columns:1fr; gap:22px; } }

/* integrations library: tabs and search, a recommended row, filters, and cards with the connect button at the bottom */
.integration-in.int-lib { max-width:1180px; gap:22px; }
[hidden].integration-card,[hidden].int-rec-wrap,[hidden].int-empty { display:none !important; }
.int-bar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.int-tabs { display:inline-flex; padding:3px; gap:2px; border:1px solid var(--line); border-radius:11px; background:var(--soft); }
.int-tabs button { border:0; background:transparent; color:var(--muted); font:inherit; font-size:14px; padding:8px 14px; border-radius:8px; cursor:pointer; }
.int-tabs button[aria-selected="true"] { background:var(--card); color:var(--fg); box-shadow:0 0 0 1px var(--line); }
.int-search { position:relative; flex:0 1 380px; min-width:220px; display:block; }
.int-search input { width:100%; height:42px; padding:0 42px 0 14px; border:1px solid var(--line); border-radius:11px; background:var(--card); color:var(--fg); font:inherit; font-size:14px; }
.int-search input:focus { outline:2px solid color-mix(in srgb,var(--fg) 30%,transparent); outline-offset:1px; }
.int-search .i { position:absolute; right:14px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--muted); pointer-events:none; }
.int-h { margin:0; font-size:20px; font-weight:500; letter-spacing:-.01em; }
.int-rec-wrap { display:grid; gap:14px; }
.int-rec { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(290px,1fr); gap:14px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity; }
.int-rec-card { scroll-snap-align:start; display:flex; flex-direction:column; gap:12px; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.int-rec-top { display:flex; align-items:center; gap:12px; }
.int-rec-top h3 { margin:0 0 4px; font-size:15px; font-weight:600; }
.int-rec-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; flex:1; }
.int-rec-card .outline-btn { width:100%; justify-content:center; }
.int-head { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; margin-top:6px; }
.int-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.int-filters select { height:38px; padding:0 30px 0 12px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--fg); font:inherit; font-size:13.5px; }
.int-filters .view-toggle { margin:0; }
.int-tag { display:inline-block; margin:0 0 6px; padding:1px 8px; border-radius:6px; background:var(--soft); color:var(--muted); font-size:11px; font-weight:500; }
.int-tag.t-mcp { background:color-mix(in srgb,#8b3fa8 24%,transparent); color:#a15bc0; }
.int-rec-top .int-tag { margin:0; }
.int-empty { margin:6px 0; padding:34px 18px; text-align:center; border:1px dashed var(--line); border-radius:14px; color:var(--muted); font-size:14px; }
.int-lib.as-grid:not(.as-icons) .integration-list { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); }
.int-lib.as-grid:not(.as-icons) .integration-card { border-radius:16px; padding:20px; }
.int-lib.as-grid:not(.as-icons) .integration-card h2 { font-size:15.5px; }
.int-lib.as-grid:not(.as-icons) .integration-card > button { border-radius:10px; padding:11px 16px; }
.int-lib.as-grid:not(.as-icons) .integration-icon,.int-rec-top .integration-icon { width:46px; height:46px; border-radius:12px; }
.int-lib.as-icons .integration-tag,.int-lib.as-icons .int-tag { display:none; }
@media (max-width:640px) { .int-search { flex-basis:100%; } .int-rec { grid-auto-columns:82%; } }
.integration-in.int-lib .integration-intro { margin:-12px 0 0; }

/* project views: Brief, Sitemap, Preview and Code, one click apart */
.view-switch { display:inline-flex; gap:2px; padding:3px; margin:0 auto; border:1px solid var(--line); border-radius:11px; background:var(--soft); flex:none; }
.view-switch button { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; white-space:nowrap; }
.view-switch button .i { width:15px; height:15px; }
.view-switch button:hover { color:var(--fg); }
.view-switch button[aria-selected="true"] { background:var(--card); color:var(--fg); box-shadow:0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.06); }
.view-switch button:focus-visible { outline:2px solid color-mix(in srgb,var(--fg) 35%,transparent); outline-offset:1px; }
@media (max-width:1280px) { .view-switch button span { display:none; } .view-switch button { padding:0 10px; } }
.rtool.pvw { overflow:auto; padding:22px 26px 40px; }
.pvw-in { max-width:760px; margin:0 auto; display:grid; gap:18px; }
.pvw h2 { margin:0; font:500 22px/1.25 var(--serif); letter-spacing:-.01em; }
.pvw .pvw-sub { margin:4px 0 0; color:var(--muted); font-size:13.5px; }
.pvw-head { display:flex; gap:12px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
.pvw-saved { color:var(--muted); font-size:12px; min-height:1.2em; }
.pvw-card { border:1px solid var(--line); border-radius:14px; background:var(--card); padding:16px 18px; display:grid; gap:6px; }
.pvw-card label { font-size:12.5px; font-weight:600; }
.pvw-card small { color:var(--muted); font-size:11.5px; }
.pvw-card textarea { width:100%; min-height:84px; resize:vertical; border:1px solid var(--line); border-radius:9px; background:var(--bg); color:var(--fg); font:inherit; font-size:14px; line-height:1.5; padding:10px 12px; }
.pvw-card textarea:focus,.pvw-row input:focus { outline:2px solid color-mix(in srgb,var(--fg) 25%,transparent); outline-offset:1px; }
.pvw-source { display:inline-flex; gap:6px; align-items:center; padding:3px 10px; border-radius:99px; background:var(--soft); border:1px solid var(--line); font-size:12px; color:var(--muted); width:fit-content; }
.pvw-actions { display:flex; gap:8px; flex-wrap:wrap; }
.sm-list { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.pvw-row { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto; gap:8px; align-items:center; border:1px solid var(--line); border-radius:11px; background:var(--card); padding:8px 10px; }
.pvw-row .sm-main { display:grid; gap:6px; min-width:0; }
.pvw-row input { width:100%; min-width:0; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); font:inherit; font-size:13.5px; padding:7px 9px; }
.pvw-row .sm-title { font-weight:600; }
.pvw-row .sm-note { font-size:12.5px; color:var(--muted); }
.sm-tools { display:flex; gap:4px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.sm-tools button { border:1px solid var(--line); background:var(--soft); color:var(--fg); border-radius:7px; min-width:28px; height:28px; font-size:13px; cursor:pointer; }
.sm-tools button[disabled] { opacity:.35; cursor:default; }
.sm-badge { font-size:10.5px; font-weight:600; padding:1px 8px; border-radius:99px; background:var(--soft); color:var(--muted); }
.sm-badge.built { background:color-mix(in srgb,#2e7d32 16%,transparent); color:#2e7d32; }
.sm-depth-1 { margin-left:22px; } .sm-depth-2 { margin-left:44px; } .sm-depth-3 { margin-left:66px; } .sm-depth-4 { margin-left:88px; }
.sm-depth-1,.sm-depth-2,.sm-depth-3,.sm-depth-4 { position:relative; }
.sm-depth-1::before,.sm-depth-2::before,.sm-depth-3::before,.sm-depth-4::before { content:""; position:absolute; left:-12px; top:50%; width:10px; border-top:1px solid var(--line-strong,var(--line)); }
@media (max-width:640px) { .pvw-row { grid-template-columns:1fr; } .sm-tools { justify-content:flex-start; } .rtool.pvw { padding:16px 14px 30px; } }

/* the Publish button while the site is live */
.ink-btn.is-live::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:#3ddc84; vertical-align:1px; }
.outline-btn.pubw-off { color:#b3261e; border-color:color-mix(in srgb,#b3261e 40%,var(--line)); }
.outline-btn.pubw-off:hover { background:color-mix(in srgb,#b3261e 10%,transparent); }
/* the Publish menu: status, address, one clear primary action, then tidy rows */
.pubw { display:grid; gap:10px; padding:6px 4px 0; }
.pubw-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.pubw-ver { font-size:11.5px; color:var(--muted); }
.pubw-addr { display:flex; align-items:center; gap:8px; padding:7px 8px 7px 10px; border:1px solid var(--line); border-radius:10px; background:var(--soft); min-width:0; }
.pubw-addr > .i { width:15px; height:15px; color:var(--muted); flex:none; }
.pubw-url { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:500 12.5px var(--mono, ui-monospace, monospace); color:var(--fg); text-decoration:none; }
a.pubw-url[href]:hover { text-decoration:underline; }
.pubw-icon { flex:none; width:26px; height:26px; display:grid; place-items:center; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; }
.pubw-icon:hover { background:var(--card); color:var(--fg); }
.pubw-icon .i { width:14px; height:14px; }
.pubw-text { margin:0; font-size:12px; line-height:1.5; color:var(--muted); }
.pubw-notice { font-size:12px; line-height:1.45; padding:8px 10px; border-radius:9px; background:color-mix(in srgb,#d98200 14%,transparent); color:#8a5200; }
@media (prefers-color-scheme:dark) { .pubw-notice { color:#f2b45a; } }
.pubw-primary { width:100%; height:38px; justify-content:center; font-size:13.5px; }
.pubw-secondary { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pubw-secondary > * { height:34px; justify-content:center; font-size:12.5px; }
.pubw-rows { display:grid; gap:1px; margin:2px -4px 0; padding-top:8px; border-top:1px solid var(--line); }
.pubw-rows .pop-item { padding:8px 10px; font-size:12.5px; }
.pubw hr { display:none; }
a.outline-btn.pubw-open { color:var(--fg); text-decoration:none; }

/* an edit run is one quiet line until someone opens it */
button.run-head { width:100%; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; align-items:center; padding:11px 14px; border-radius:12px; }
button.run-head:hover { background:var(--soft); }
button.run-head:focus-visible { outline:2px solid color-mix(in srgb,var(--fg) 30%,transparent); outline-offset:-2px; }
.run-head .run-sum { margin-left:0; font-size:12px; color:var(--muted); }
.run-head .run-cost { margin-left:auto; }
.run-head .run-chev { width:14px; height:14px; flex:none; color:var(--muted); transition:transform .15s; transform:rotate(-90deg); align-self:center; }
.run.open .run-chev { transform:rotate(0deg); }
.run:not(.open) .steps { display:none; }
.run.open button.run-head { border-bottom-left-radius:0; border-bottom-right-radius:0; padding-bottom:6px; }

/* the chat column never grows wider than the pane, however long a line is */
.msg { grid-template-columns: minmax(0, 1fr); }
.msg.me { justify-items: end; grid-template-columns: minmax(0, auto); }
.say { overflow-wrap: anywhere; }
/* a smaller, quieter run card */
.run { overflow: hidden; }
button.run-head { padding: 8px 12px; gap: 7px; }
.run-head b { font-size: 13px; }
.run-head .run-sum, .run-head .run-cost { font-size: 11.5px; }
.live-now { padding: 2px 12px 9px; gap: 7px; font-size: 12px; font-style: normal; }
.live-now .spinner.sm { width: 11px; height: 11px; }
.steps { padding: 2px 0 6px; }
.step { font-size: 12.5px; }

/* what changed in an edit: added lines green, removed lines red */
.step .delta { display:flex; gap:8px; font:500 11px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-variant-numeric:tabular-nums; color:var(--faint); }
.step .delta .add { color:#1a7f37; }
.step .delta .del { color:#cf222e; }
.step .delta .zero { opacity:.4; }
@media (prefers-color-scheme:dark) { .step .delta .add { color:#3fb950; } .step .delta .del { color:#ff7b72; } }
:root[data-theme="dark"] .step .delta .add { color:#3fb950; } :root[data-theme="dark"] .step .delta .del { color:#ff7b72; }
:root[data-theme="light"] .step .delta .add { color:#1a7f37; } :root[data-theme="light"] .step .delta .del { color:#cf222e; }

/* the Integrations page in the admin: groups, two columns, cards you can move */
.int-layout { display:grid; gap:34px; margin-top:22px; }
.int-cat { display:grid; gap:14px; }
.int-cat.dragging { opacity:.5; }
.int-cat-head { position:relative; display:flex; gap:10px; align-items:flex-start; padding-bottom:10px; border-bottom:1px solid var(--line); }
.int-cat-head h3 { margin:0; font:600 11.5px/1.3 var(--sans); letter-spacing:.09em; text-transform:uppercase; color:var(--muted); }
.int-cat-head p { margin:3px 0 0; font-size:13px; color:var(--muted); }
.int-layout { container-type:inline-size; }
.int-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:18px; align-items:start; min-height:60px; }
@container (min-width:600px) { .int-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.int-grid.empty { border:1.5px dashed var(--line-strong, var(--line)); border-radius:14px; place-items:center; }
.int-grid.empty::before { content:"Drop a card here"; color:var(--muted); font-size:13px; padding:20px; }
.int-grid .card-box { position:relative; margin:0; box-shadow:0 1px 0 rgba(0,0,0,.02); }
.int-grid .card-box.dragging { opacity:.45; outline:2px dashed var(--line-strong, var(--line)); }
.int-grid .acct-form { max-width:none; }
.int-grid .cb-title { padding-right:52px; }
.int-grid .card-box > .grip { position:absolute; top:12px; right:12px; }
.grip { width:28px; height:28px; display:grid; place-items:center; flex:none; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); cursor:grab; padding:0; }
.grip:hover, .grip:focus-visible { background:var(--soft); border-color:var(--line); color:var(--fg); }
.grip:active { cursor:grabbing; }
.grip .i { width:15px; height:15px; fill:currentColor; stroke:none; }
.int-reset { margin-top:8px; }
#view-admin .settings-in.wide { max-width:1560px; }
.int-grid .acct-form { padding:10px 18px 18px; }
.int-grid .cb-title { padding:16px 52px 2px 18px; }
.int-grid .card-hint, .int-grid .card-box > .hint { margin-left:18px !important; margin-right:18px !important; }
.int-grid .bp-row { flex-wrap:wrap; }
.int-grid .card-box { min-width:0; }
.int-grid code, .int-grid .sp-note, .int-grid .hint { overflow-wrap:anywhere; }
.int-grid select, .int-grid input:not([type=checkbox]):not([type=color]) { max-width:100%; }

.int-grid { grid-auto-rows:4px; row-gap:0; column-gap:18px; }
.int-grid.empty { grid-auto-rows:auto; }

.fld { display:grid; gap:5px; align-content:start; min-width:0; }
@container (min-width:600px) {
  #i-security { grid-column:1 / -1; }
  .acct-form.two-col { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 28px; }
  .acct-form.two-col > .sp-note, .acct-form.two-col > .acct-actions, .acct-form.two-col > .form-msg { grid-column:1 / -1; }
}

/* a long card keeps one standard height; "Show all" opens it */
.int-grid .card-box.is-long:not(.open) { max-height:460px; }
.int-grid .card-box.is-long:not(.open)::after { content:""; position:absolute; left:0; right:0; bottom:0; height:120px; background:linear-gradient(to bottom, transparent, var(--card) 70%); pointer-events:none; }
.card-more { display:none; align-items:center; gap:6px; border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:99px; padding:6px 14px; font:inherit; font-size:12.5px; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.05); }
.card-more::after { content:"▾"; font-size:11px; color:var(--muted); }
.card-more[aria-expanded="true"]::after { content:"▴"; }
.card-more:hover { background:var(--soft); }
.card-box.is-long > .card-more { display:inline-flex; }
.int-grid .card-box.is-long:not(.open) > .card-more { position:absolute; left:50%; bottom:14px; transform:translateX(-50%); z-index:2; }
.int-grid .card-box.is-long.open > .card-more { margin:4px auto 16px; display:flex; }

/* ---------- the admin, the way each person likes it ---------- */
.settings-nav button.dragging { opacity:.4; }
.settings-nav button[draggable="true"] { cursor:pointer; }
/* menu across the top */
#view-admin.adm-horizontal .settings-in { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto 1fr; max-width:1240px; }
#view-admin.adm-horizontal .settings-nav { grid-column:1; grid-row:2; display:flex; flex-wrap:wrap; overflow:visible; position:static; gap:2px 2px; border-bottom:1px solid var(--line); padding-bottom:6px; }
#view-admin.adm-horizontal .settings-nav button { flex:none; height:36px; padding:0 14px; white-space:nowrap; }
#view-admin.adm-horizontal .settings-main { grid-column:1; grid-row:3; padding-top:14px; }
#view-admin.adm-horizontal .settings-in.wide { max-width:1560px; }
/* spacing and text size */
#view-admin[data-density="compact"] .acct-form { gap:4px; padding-top:6px; padding-bottom:14px; }
#view-admin[data-density="compact"] .cb-title { padding-top:12px; }
#view-admin[data-density="compact"] .int-layout { gap:22px; margin-top:14px; }
#view-admin[data-density="compact"] .settings-nav button { height:32px; }
#view-admin[data-density="compact"] .adm-row { padding-top:6px; padding-bottom:6px; }
#view-admin[data-density="spacious"] .acct-form { gap:11px; padding-top:14px; padding-bottom:26px; }
#view-admin[data-density="spacious"] .cb-title { padding-top:22px; }
#view-admin[data-density="spacious"] .int-layout { gap:46px; margin-top:30px; }
#view-admin[data-density="spacious"] .settings-nav button { height:44px; }
#view-admin[data-density="spacious"] .adm-row { padding-top:13px; padding-bottom:13px; }
#view-admin[data-size="small"] .settings-in { zoom:.92; }
#view-admin[data-size="large"] .settings-in { zoom:1.1; }
/* the preferences page */
.pref-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:10px 0 0; }
.pref-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:18px; margin-top:12px; align-items:start; }
.pref-grid .acct-form { max-width:none; }
.pref-choice { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.pref-choice button { display:flex; gap:12px; align-items:center; text-align:left; padding:12px; border:1.5px solid var(--line); border-radius:12px; background:var(--card); color:var(--fg); cursor:pointer; font:inherit; font-size:13.5px; }
.pref-choice button small { display:block; color:var(--muted); font-size:11.5px; margin-top:2px; }
.pref-choice button[aria-checked="true"] { border-color:var(--blue); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 16%,transparent); }
.pref-mock { width:54px; height:38px; border:1.5px solid var(--line-strong, var(--line)); border-radius:7px; display:flex; overflow:hidden; background:var(--bg); flex:none; }
.pref-mock i { background:color-mix(in srgb,var(--muted) 35%,transparent); }
.pref-mock.v { flex-direction:row; } .pref-mock.v i { width:16px; } .pref-mock.v b { flex:1; }
.pref-mock.h { flex-direction:column; } .pref-mock.h i { height:9px; } .pref-mock.h b { flex:1; }
.pref-order { list-style:none; margin:4px 0 0; padding:0; display:grid; gap:4px; }
.pref-row { display:flex; align-items:center; gap:8px; padding:5px 8px 5px 4px; border:1px solid var(--line); border-radius:10px; background:var(--card); font-size:13.5px; }
.pref-row.dragging { opacity:.45; }
.pref-row > span:first-of-type { flex:1; }
.pref-arrows { display:flex; gap:3px; }
.pref-arrows button { width:26px; height:26px; border:1px solid var(--line); background:var(--soft); border-radius:7px; cursor:pointer; color:var(--fg); font-size:12px; }
.pref-arrows button[disabled] { opacity:.3; cursor:default; }
.pref-preview { display:flex; gap:14px; align-items:center; flex-wrap:wrap; padding:12px 0 2px; }
.pref-link { color:var(--blue); }
.pref-seg { display:inline-flex; padding:3px; gap:2px; border:1px solid var(--line); border-radius:10px; background:var(--soft); width:fit-content; max-width:100%; flex-wrap:wrap; }
.pref-seg button { border:0; background:transparent; color:var(--muted); font:inherit; font-size:13px; padding:7px 13px; border-radius:7px; cursor:pointer; }
.pref-seg button[aria-checked="true"] { background:var(--card); color:var(--fg); box-shadow:0 0 0 1px var(--line); }
.pref-presets { list-style:none; margin:4px 0 6px; padding:0; display:grid; gap:6px; }
.pref-preset { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.pref-preset b { display:block; font-size:13.5px; font-weight:600; } .pref-preset small { color:var(--muted); font-size:11.5px; }
.pref-preset-btns { display:flex; gap:6px; flex:none; }
.pref-preset-btns .outline-btn { font-size:12px; min-height:30px; padding:0 11px; }
.pref-save { display:flex; gap:8px; flex-wrap:wrap; }
.pref-save input { flex:1 1 200px; min-width:0; }

/* ---------- the app, the way each person likes it (Settings → My preferences) ---------- */
/* the menu inside Settings across the top instead of down the side (the main sidebar is never changed) */
#view-settings.settings-horizontal .settings-in { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto 1fr; max-width:1100px; }
#view-settings.settings-horizontal .settings-nav { grid-column:1; grid-row:2; display:flex; flex-wrap:wrap; overflow:visible; position:static; gap:2px; border-bottom:1px solid var(--line); padding-bottom:6px; }
#view-settings.settings-horizontal .settings-nav button { flex:none; height:36px; padding:0 14px; white-space:nowrap; }
#view-settings.settings-horizontal .settings-main { grid-column:1; grid-row:3; padding-top:14px; }
#settings-nav button.dragging { opacity:.4; }
.app[data-density="compact"] .thread-in { gap:13px; }
.app[data-density="compact"] .acct-form { gap:4px; padding-top:6px; padding-bottom:14px; }
.app[data-density="compact"] .spanel { gap:12px; }
.app[data-density="spacious"] .thread-in { gap:26px; }
.app[data-density="spacious"] .acct-form { gap:11px; padding-top:14px; padding-bottom:26px; }
.app[data-density="spacious"] .spanel { gap:26px; }
.app[data-size="small"] .thread-in, .app[data-size="small"] .settings-main, .app[data-size="small"] .projects-in { zoom:.92; }
.app[data-size="large"] .thread-in, .app[data-size="large"] .settings-main, .app[data-size="large"] .projects-in { zoom:1.1; }
.spanel[data-spanel="preferences"] .pref-bar { margin:0; }
.spanel[data-spanel="preferences"] .pref-grid { margin-top:0; }
.pref-choice button { padding:10px 12px; gap:10px; }
.pref-choice .pref-mock { width:46px; height:34px; }
.pref-choice button > span:last-child { min-width:0; }

/* Agency → Proposals */
.pp-none { color:var(--muted); font-size:12.5px; padding:14px 2px; }
.pp-list { display:grid; gap:8px; margin-top:14px; }
.pp-row { display:flex; align-items:center; gap:14px; padding:6px 12px 6px 6px; border:1px solid var(--line); border-radius:11px; background:var(--card); }
.pp-row:hover { border-color:var(--line-strong); }
.pp-open { flex:1; min-width:0; display:flex; align-items:center; gap:12px; padding:9px 8px; border:0; background:none; text-align:left; cursor:pointer; color:inherit; font:inherit; border-radius:8px; }
.pp-dot { width:10px; height:34px; border-radius:5px; flex:none; }
.pp-main { display:grid; min-width:0; }
.pp-main b { font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pp-main small { color:var(--muted); font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pp-total { min-width:78px; text-align:right; font-weight:600; font-size:13px; }
.pp-chip { display:inline-block; padding:2px 9px; border-radius:99px; font-size:11px; font-weight:600; background:var(--soft); color:var(--muted); white-space:nowrap; }
.pp-chip.s-sent,.pp-chip.s-viewed { background:var(--blue-soft); color:var(--blue); }
.pp-chip.s-accepted { background:color-mix(in srgb, var(--ok) 15%, transparent); color:var(--ok); }
.pp-chip.s-changes { background:color-mix(in srgb, var(--warn) 15%, transparent); color:var(--warn); }
.pp-chip.s-declined { background:color-mix(in srgb, #b3261e 13%, transparent); color:#b3261e; }
.pp-top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.pp-top .agency-back { padding:0; }
.pp-title { display:flex; align-items:center; gap:10px; flex:1 1 100%; order:3; min-width:0; }
.pp-top .agency-back { margin-right:auto; }
.pp-title input { flex:1; min-width:0; font:600 20px var(--sans); border:1px solid transparent; border-radius:8px; padding:5px 8px; background:transparent; color:var(--fg); }
.pp-title input:hover,.pp-title input:focus { border-color:var(--line-strong); background:var(--card); outline:0; }
.pp-state { color:var(--muted); font-size:11.5px; min-width:92px; text-align:right; }
.pp-actions { display:flex; gap:7px; align-items:center; }
.pp-actions a.outline-btn { text-decoration:none; color:inherit; }
.pp-lock { padding:9px 13px; margin-bottom:12px; border-radius:9px; background:var(--soft); color:var(--muted); font-size:12.5px; }
.pp-cols { display:grid; grid-template-columns:minmax(340px, 460px) minmax(0, 1fr); gap:18px; align-items:start; }
.pp-left { display:grid; gap:10px; }
.pp-left fieldset { border:0; margin:0; padding:0; display:grid; gap:10px; min-width:0; }
.pp-g { border:1px solid var(--line); border-radius:12px; background:var(--card); }
.pp-gh { width:100%; display:flex; justify-content:space-between; align-items:center; padding:11px 14px; border:0; background:none; cursor:pointer; color:var(--fg); font:inherit; font-size:13px; }
.pp-gh span { color:var(--muted); font-size:17px; line-height:1; }
.pp-gb { padding:2px 14px 14px; display:grid; gap:11px; }
.pp-f { display:grid; gap:4px; font-size:11.5px; font-weight:600; color:var(--muted); }
.pp-f input[type=text],.pp-f input[type=email],.pp-f input[type=url],.pp-f input[type=date],.pp-f input[type=number],.pp-f select,.pp-f textarea,.pp-row3 input[type=text],.pp-row3 input[type=number] { width:100%; font:13px var(--sans); color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 9px; }
.pp-f textarea { resize:vertical; line-height:1.5; }
.pp-f small { font-weight:400; font-size:11px; color:var(--faint); }
.pp-two { display:grid; grid-template-columns:1fr 1fr; gap:11px; align-items:start; }
.pp-themes { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pp-theme { display:flex; gap:10px; align-items:center; text-align:left; padding:9px; border:1px solid var(--line); border-radius:10px; background:var(--bg); cursor:pointer; color:var(--fg); font:inherit; }
.pp-theme[aria-checked="true"] { border-color:var(--fg); box-shadow:0 0 0 1px var(--fg); }
.pp-theme i { width:34px; height:44px; border-radius:6px; flex:none; display:block; border:1px solid var(--line); }
.pp-theme.t-classic i { border-radius:2px; border-top:6px double var(--fg); background:#fffdf8 !important; }
.pp-theme.t-minimal i { background:#fff !important; border-left:3px solid var(--fg); }
.pp-theme.t-bold i { background:#141418 !important; border-top:10px solid; }
.pp-theme b { display:block; font-size:12.5px; } .pp-theme small { display:block; font-size:10.5px; color:var(--muted); line-height:1.3; }
.pp-colour { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pp-colour input[type=color] { width:34px; height:30px; padding:0; border:1px solid var(--line); border-radius:7px; background:none; }
.pp-sw { width:18px; height:18px; border-radius:50%; border:2px solid var(--card); box-shadow:0 0 0 1px var(--line-strong); cursor:pointer; padding:0; }
.pp-secs { display:grid; gap:7px; }
.pp-sec { border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.pp-sec.open { border-color:var(--line-strong); }
.pp-sh { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:3px 6px 3px 3px; }
.pp-sh-main { flex:1; min-width:0; display:flex; align-items:center; gap:9px; border:0; background:none; padding:7px; cursor:pointer; text-align:left; color:var(--fg); font:inherit; font-size:12.5px; }
.pp-sh-main b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.pp-ty { font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:2px 7px; border-radius:99px; background:var(--soft); color:var(--muted); flex:none; }
.pp-sh-btns { display:flex; } .pp-sh-btns .icon-btn { width:25px; height:25px; } .pp-sh-btns .icon-btn:disabled { opacity:.3; cursor:default; }
.pp-sb { padding:4px 11px 12px; display:grid; gap:10px; }
.pp-rows { display:grid; gap:8px; }
.pp-row3 { display:grid; grid-template-columns:1fr 56px 84px auto 26px; gap:6px; align-items:center; padding:8px; border:1px solid var(--line); border-radius:9px; background:var(--card); }
.pp-row3.tl { grid-template-columns:1fr 130px 26px; }
.pp-row3 .pp-note { grid-column:1 / -1; }
.pp-opt { display:flex; gap:4px; align-items:center; font-size:11px; color:var(--muted); white-space:nowrap; }
.pp-addrow { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; } .pp-addrow .pp-f { width:80px; } .pp-sum { margin-left:auto; font-size:13px; }
.pp-add { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:10px; } .pp-add>span { font-size:11.5px; color:var(--muted); font-weight:600; margin-right:4px; }
.pp-act { list-style:none; margin:0; padding:0; display:grid; gap:8px; } .pp-act li { display:grid; font-size:12.5px; } .pp-act small { color:var(--muted); font-size:11px; }
.pp-right { position:sticky; top:8px; border:1px solid var(--line); border-radius:12px; background:var(--soft); overflow:hidden; }
.pp-pv-bar { display:flex; justify-content:space-between; align-items:center; padding:6px 10px; border-bottom:1px solid var(--line); background:var(--card); font-size:12px; }
.pp-right iframe { display:block; margin:0 auto; height:calc(100vh - 190px); min-height:480px; border:0; background:#fff; max-width:100%; transition:width .2s; }
@media (max-width:1000px) { .pp-cols { grid-template-columns:1fr; } .pp-right { position:static; } .pp-right iframe { height:70vh; } }
@media (max-width:560px) { .pp-two,.pp-themes { grid-template-columns:1fr; } .pp-row { flex-wrap:wrap; } .pp-row3 { grid-template-columns:1fr 56px 84px; } .pp-row3 .pp-opt,.pp-row3 .icon-btn { justify-self:start; } }

/* Agency → Inbox */
.tab-badge { display:inline-block; min-width:17px; margin-left:6px; padding:0 5px; border-radius:99px; background:var(--agency-accent,var(--ink)); color:#fff; font-size:10px; font-weight:700; line-height:17px; text-align:center; vertical-align:1px; }
.ib-link { padding:0 0 0 6px; font-size:12px; }
.ib-err-inline { color:#b3261e; font-size:11.5px; }
.ib-err { color:#b3261e; font-size:12.5px; margin:0 0 10px; }
.ib-setup { border:1px solid var(--line); border-radius:14px; background:var(--card); padding:16px; margin-bottom:14px; }
.ib-setup-h { display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; } .ib-setup-h h3 { margin:0; font-size:15px; } .ib-setup-h p { margin:3px 0 0; color:var(--muted); font-size:12px; max-width:560px; }
.ib-opts { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
.ib-opt { border:1px solid var(--line); border-radius:12px; padding:14px; background:var(--bg); } .ib-opt.on { border-color:var(--fg); }
.ib-opt-h { display:flex; align-items:center; gap:8px; margin-bottom:4px; } .ib-opt p { margin:6px 0; font-size:12.5px; color:var(--muted); line-height:1.5; }
.ib-note { color:var(--muted); } .ib-ok { color:var(--ok) !important; }
.ib-handle { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.ib-addr { display:flex; align-items:center; border:1px solid var(--line); border-radius:8px; background:var(--card); padding-right:9px; flex:1; min-width:210px; } .ib-addr input { border:0; background:none; padding:7px 4px 7px 9px; font:13px var(--sans); color:var(--fg); min-width:60px; flex:1; outline:0; } .ib-addr span { color:var(--muted); font-size:12.5px; white-space:nowrap; }
.ib-use { margin-top:8px; font-size:12.5px; }
.ib-grid { display:grid; grid-template-columns:1fr 90px; gap:9px; margin-top:8px; } .ib-grid label { display:grid; gap:3px; font-size:11.5px; font-weight:600; color:var(--muted); } .ib-grid label.wide,.ib-grid .wide { grid-column:1 / -1; }
.ib-grid input { font:13px var(--sans); color:var(--fg); background:var(--card); border:1px solid var(--line); border-radius:8px; padding:7px 9px; width:100%; }
.ib-act { display:flex; }
.ib-cols { display:grid; grid-template-columns:minmax(260px,340px) minmax(0,1fr); gap:0; border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:hidden; min-height:460px; height:calc(100vh - 300px); }
.ib-list { border-right:1px solid var(--line); overflow:auto; display:flex; flex-direction:column; min-height:0; }
.ib-tools { position:sticky; top:0; background:var(--card); padding:10px; display:grid; gap:8px; border-bottom:1px solid var(--line); z-index:1; }
.ib-tools input { font:13px var(--sans); border:1px solid var(--line); border-radius:8px; padding:7px 10px; background:var(--bg); color:var(--fg); width:100%; }
.ib-filter { display:flex; gap:4px; } .ib-filter button { border:0; background:none; font:12px var(--sans); color:var(--muted); padding:4px 9px; border-radius:99px; cursor:pointer; } .ib-filter button[aria-selected="true"] { background:var(--soft); color:var(--fg); font-weight:600; }
.ib-row { display:flex; gap:10px; align-items:flex-start; padding:11px 12px; border:0; border-bottom:1px solid var(--line); background:none; text-align:left; cursor:pointer; color:inherit; font:inherit; width:100%; position:relative; }
.ib-row:hover { background:var(--soft); } .ib-row.on { background:var(--soft); box-shadow:inset 3px 0 0 var(--agency-accent,var(--fg)); }
.ib-av { width:30px; height:30px; border-radius:50%; background:var(--soft); display:grid; place-items:center; font-size:12px; font-weight:700; color:var(--muted); flex:none; } .ib-row.unread .ib-av { background:var(--agency-accent,var(--ink)); color:#fff; }
.ib-r { display:grid; gap:1px; min-width:0; flex:1; } .ib-r1 { display:flex; justify-content:space-between; gap:8px; } .ib-r1 b { font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .ib-r1 small { color:var(--faint); font-size:10.5px; white-space:nowrap; }
.ib-r2 { font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .ib-r2 i { font-style:normal; font-size:10px; background:var(--soft); border-radius:99px; padding:0 6px; margin-left:4px; color:var(--muted); }
.ib-r3 { font-size:11.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .ib-row.unread .ib-r1 b,.ib-row.unread .ib-r2 { font-weight:700; }
.ib-dot { width:8px; height:8px; border-radius:50%; background:var(--agency-accent,var(--blue)); margin-top:6px; flex:none; }
.ib-none { padding:22px 16px; color:var(--muted); font-size:12.5px; }
.ib-detail { display:flex; flex-direction:column; min-width:0; min-height:0; }
.ib-back { display:none; padding:10px 14px 0; }
.ib-empty { margin:auto; text-align:center; color:var(--muted); padding:30px; } .ib-empty span { font-size:28px; display:block; } .ib-empty h3 { margin:6px 0 2px; font-size:14px; color:var(--fg); } .ib-empty p { margin:0; font-size:12px; }
.ib-thread { display:flex; flex-direction:column; min-height:0; flex:1; }
.ib-th { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:14px 16px; border-bottom:1px solid var(--line); } .ib-th h3 { margin:0; font-size:15px; } .ib-th p { margin:3px 0 0; font-size:12px; color:var(--muted); }
.ib-th-btns { display:flex; gap:7px; align-items:center; flex-wrap:wrap; } .ib-th-btns select { font:12px var(--sans); border:1px solid var(--line); border-radius:7.5px; padding:6px 8px; background:var(--card); color:var(--fg); height:31px; max-width:170px; }
.ib-msgs { flex:1; overflow:auto; padding:14px 16px; display:grid; gap:12px; align-content:start; min-height:0; }
.ib-msg { border:1px solid var(--line); border-radius:12px; padding:11px 14px; background:var(--bg); max-width:760px; } .ib-msg.out { background:var(--soft); margin-left:auto; }
.ib-msg header { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:6px; } .ib-msg header b { font-size:12.5px; } .ib-msg header small { color:var(--muted); font-size:11px; } .ib-msg .ib-av { width:22px; height:22px; font-size:10px; }
.ib-body { font-size:13px; line-height:1.6; white-space:pre-wrap; word-break:break-word; overflow-wrap:anywhere; }
.ib-quote { margin:6px 0; } .ib-quote summary { cursor:pointer; color:var(--muted); font-size:11.5px; } .ib-quote div { color:var(--muted); border-left:3px solid var(--line); padding-left:10px; margin-top:4px; white-space:pre-wrap; }
.ib-msg footer { margin-top:8px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; } .ib-msg footer small { color:var(--faint); font-size:10.5px; }
.ib-reply { border-top:1px solid var(--line); padding:10px 16px 12px; display:grid; gap:8px; } .ib-reply textarea { font:13px/1.5 var(--sans); border:1px solid var(--line); border-radius:9px; padding:9px 11px; background:var(--bg); color:var(--fg); resize:vertical; width:100%; }
.ib-reply-b { display:flex; justify-content:space-between; align-items:center; gap:10px; } .ib-reply-b small { color:var(--muted); font-size:11.5px; }
@media (max-width:900px) { .ib-opts { grid-template-columns:1fr; } .ib-cols { grid-template-columns:1fr; height:auto; min-height:0; } .ib-cols.has-thread .ib-list { display:none; } .ib-cols:not(.has-thread) .ib-detail { display:none; } .ib-back { display:block; } .ib-list { max-height:70vh; } .ib-msgs { max-height:55vh; } }

/* Inbox: open, airy, hairline borders instead of white cards */
.ib-cols { background:transparent; border:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0; }
.ib-list { border-right:1px solid var(--line); }
.ib-tools { background:var(--panel); border-bottom:1px solid var(--line); }
.ib-tools input { background:transparent; }
.ib-row { border-bottom:1px solid var(--line); }
.ib-setup { background:transparent; border-radius:12px; }
.ib-opt { background:transparent; }
.ib-th { border-bottom:1px solid var(--line); padding:18px 24px; }
.ib-th h3 { font-size:18px; font-weight:600; }
.ib-msgs { padding:20px 24px; gap:0; }
.ib-msg { background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:18px 0; max-width:none; }
.ib-msg:last-child { border-bottom:0; } .ib-msg.out { background:transparent; margin-left:0; }
.ib-msg.out header::after { content:"Sent"; font-size:10px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); border:1px solid var(--line); border-radius:99px; padding:0 7px; }
.ib-body { font-size:14.5px; line-height:1.7; }
.ib-reply { border-top:1px solid var(--line); padding:14px 24px 16px; gap:10px; }
.ib-reply textarea { border:0; background:transparent; padding:4px 0; font-size:14.5px; line-height:1.7; resize:none; min-height:64px; outline:0; }
.ib-chips { display:flex; flex-wrap:wrap; gap:8px; }
.ib-chip { border:1px solid var(--line); background:transparent; color:var(--fg); border-radius:99px; padding:6px 13px; font:12.5px var(--sans); cursor:pointer; } .ib-chip:hover { border-color:var(--line-strong); background:var(--soft); }
.ib-reply-b { align-items:center; }
.ib-from { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:99px; padding:3px 12px 3px 4px; font-size:12.5px; max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .ib-from .ib-av { width:22px; height:22px; font-size:10px; }
.ib-send { display:inline-flex; align-items:center; gap:10px; } .ib-send small { color:var(--muted); font-size:11.5px; }
.ib-go { border:0; background:var(--ink); color:var(--ink-fg); border-radius:10px; height:38px; padding:0 22px; font:600 13px var(--sans); cursor:pointer; } .ib-go:hover { opacity:.9; } .ib-go:disabled { opacity:.55; cursor:default; }
dialog.ib-compose-dlg { width:min(760px, calc(100vw - 32px)); padding:0; border:1px solid var(--line); border-radius:18px; background:var(--panel); }
.ib-c { display:grid; padding:22px 28px 20px; }
.ib-c-top { display:flex; align-items:center; gap:14px; padding-bottom:14px; border-bottom:1px solid var(--line); }
.ib-to { position:relative; flex:1; min-width:0; } .ib-to input { width:100%; border:0; background:transparent; font:14.5px var(--sans); color:var(--fg); outline:0; padding:6px 0; }
.ib-ac { position:absolute; left:-8px; top:calc(100% + 8px); width:min(340px, 90vw); z-index:5; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:6px; box-shadow:var(--shadow); } .ib-ac[hidden] { display:none; }
.ib-opt-row { display:flex; align-items:center; gap:11px; width:100%; border:0; background:none; text-align:left; padding:9px 10px; border-radius:10px; cursor:pointer; color:var(--fg); font:inherit; } .ib-opt-row b { display:block; font-size:13px; font-weight:500; } .ib-opt-row small { display:block; font-size:11px; color:var(--muted); } .ib-opt-row:hover,.ib-opt-row.on { background:var(--soft); }
.ib-subject { border:0; border-bottom:1px solid var(--line); background:transparent; text-align:center; font:500 15px var(--sans); color:var(--fg); padding:14px 0; outline:0; }
.ib-compose-body { border:0; background:transparent; font:15px/1.7 var(--sans); color:var(--fg); resize:none; min-height:240px; padding:22px 0; outline:0; }
.ib-c-bot { display:flex; justify-content:space-between; align-items:center; padding-top:12px; }

/* Availability (agency header) and the client portal chat */
.agency-heading { gap:12px; }
.avail { position:relative; margin-left:auto; margin-right:10px; align-self:flex-start; }
.avail-btn { display:inline-flex; align-items:center; gap:8px; height:32px; padding:0 12px; border:1px solid var(--line); border-radius:99px; background:transparent; color:var(--fg); font:500 12.5px var(--sans); cursor:pointer; }
.avail-btn:hover { border-color:var(--line-strong); background:var(--soft); }
.avail-btn i,.portal-status i { width:8px; height:8px; border-radius:50%; background:#9a9a94; flex:none; }
.avail-btn.s-online i,.portal-status.s-online i { background:#2fb36a; box-shadow:0 0 0 3px color-mix(in srgb, #2fb36a 22%, transparent); }
.avail-btn.s-away i,.portal-status.s-away i { background:#e0a020; }
.avail-btn.s-vacation i,.portal-status.s-vacation i { background:#4a7cf0; }
.avail-btn small { color:var(--muted); font-size:11px; } .avail-btn b { color:var(--muted); font-size:10px; }
.avail-pop { position:absolute; right:0; top:calc(100% + 8px); z-index:40; width:340px; max-width:calc(100vw - 32px); padding:16px; background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); display:grid; gap:10px; }
.avail-pop h3 { margin:0; font-size:14px; } .avail-pop>p { margin:0; font-size:12px; color:var(--muted); line-height:1.45; }
.avail-modes { display:grid; gap:4px; } .avail-modes label { display:flex; gap:10px; align-items:flex-start; padding:8px 10px; border-radius:10px; cursor:pointer; border:1px solid transparent; } .avail-modes label:hover { background:var(--soft); } .avail-modes label.on { border-color:var(--line-strong); background:var(--soft); }
.avail-modes input { margin-top:3px; } .avail-modes b { display:block; font-size:12.5px; } .avail-modes small { display:block; color:var(--muted); font-size:11px; }
.avail-f { display:grid; gap:4px; font-size:11.5px; font-weight:600; color:var(--muted); } .avail-f input,.avail-f textarea { font:13px var(--sans); color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:7px 9px; width:100%; } .avail-f small { font-weight:400; font-size:11px; color:var(--faint); }
.avail-act { display:flex; justify-content:flex-end; gap:8px; }
@media (max-width:700px) { .avail { margin-left:0; } .avail-pop { right:auto; left:0; } }
.portal-status { display:inline-flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); margin-left:12px; padding:3px 11px; border:1px solid var(--line); border-radius:99px; }
.portal-chat { display:grid; gap:12px; }
.pc-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; flex-wrap:wrap; } .pc-head h2 { margin:0; font-size:18px; } .pc-head p { margin:3px 0 0; color:var(--muted); font-size:12.5px; } .pc-head .portal-status { margin-left:0; }
.pc-note { display:flex; flex-direction:column; gap:2px; padding:11px 14px; border:1px solid var(--line); border-left:4px solid #9a9a94; border-radius:10px; font-size:13px; } .pc-note.s-vacation { border-left-color:#4a7cf0; } .pc-note.s-away { border-left-color:#e0a020; } .pc-note span { color:var(--muted); }
.pc-list { border:1px solid var(--line); border-radius:14px; padding:16px; min-height:140px; max-height:420px; overflow:auto; display:grid; gap:12px; align-content:start; }
.pc-empty { color:var(--muted); font-size:13px; margin:auto; text-align:center; padding:20px 0; }
.pc-msg { display:grid; gap:3px; max-width:78%; } .pc-msg.me { justify-self:end; text-align:right; } .pc-msg small { color:var(--faint); font-size:11px; }
.pc-b { padding:10px 14px; border-radius:16px; font-size:14px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; text-align:left; border:1px solid var(--line); }
.pc-msg.me .pc-b { background:var(--ink); color:var(--ink-fg); border-color:var(--ink); border-bottom-right-radius:4px; } .pc-msg.them .pc-b { border-bottom-left-radius:4px; } .pc-msg.auto .pc-b { font-style:italic; color:var(--muted); border-style:dashed; }
.pc-form { display:flex; gap:10px; align-items:flex-end; } .pc-form textarea { flex:1; font:14px/1.5 var(--sans); border:1px solid var(--line); border-radius:12px; padding:10px 13px; background:transparent; color:var(--fg); resize:vertical; min-height:46px; } .pc-form .ink-btn { height:42px; padding:0 20px; }
.pc-err { color:#b3261e; font-size:12.5px; margin:0; min-height:1em; }
.ib-ch { font-style:normal; font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:0 6px; border-radius:99px; background:var(--agency-accent,var(--ink)); color:#fff; margin-right:4px; }

/* Payments in the proposal editor */
.pp-warn { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:10px 12px; border:1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius:10px; background:color-mix(in srgb, var(--warn) 8%, transparent); font-size:12.5px; }
.pp-warn .outline-btn { margin-left:auto; }
.pp-okline { font-size:12.5px; color:var(--muted); }
.pp-sumline { font-size:12.5px; color:var(--muted); padding:8px 10px; border:1px dashed var(--line-strong); border-radius:9px; } .pp-sumline b { color:var(--fg); }
.st-p { margin:0 0 10px; font-size:13px; line-height:1.55; color:var(--muted); } .st-p b { color:var(--fg); } .st-warn { color:var(--warn); }
.st-steps { margin:0 0 12px; padding-left:20px; font-size:12.5px; line-height:1.6; color:var(--muted); } .st-steps b,.st-steps a { color:var(--fg); } .st-steps code { background:var(--soft); padding:0 4px; border-radius:4px; font-size:11.5px; }
.st-f { display:grid; gap:4px; font-size:11.5px; font-weight:600; color:var(--muted); margin-bottom:10px; } .st-f input { font:13px var(--sans); color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 10px; width:100%; }

/* Home notification bar */
.homebar { display:flex; align-items:center; gap:12px; width:fit-content; max-width:min(720px, calc(100% - 32px)); margin:14px 24px 0 auto; padding:6px 8px 6px 6px; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--muted); font-size:13.5px; box-shadow:0 1px 2px rgba(27,27,25,.04); }
.homebar-x { display:grid; place-items:center; width:32px; height:32px; border:0; border-radius:9px; background:transparent; color:var(--muted); cursor:pointer; flex:none; } .homebar-x:hover { background:var(--soft); color:var(--fg); }
.homebar-t { flex:1; min-width:0; }
.homebar-s { display:flex; gap:2px; padding:3px; margin-left:4px; border-radius:11px; background:var(--soft); flex:none; }
.homebar-s a { display:grid; place-items:center; width:32px; height:30px; border-radius:8px; color:var(--muted); } .homebar-s a:hover { background:var(--card); color:var(--fg); }
.homebar a:focus-visible,.homebar-x:focus-visible { outline:2px solid var(--blue); outline-offset:1px; }
@media (max-width:640px) { .homebar { margin:10px 12px 0; width:auto; max-width:none; } .homebar-t { font-size:12.5px; } }
.ib-sending { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 14px; margin-bottom:12px; border:1px solid var(--line); border-radius:12px; } .ib-sending b { font-size:13px; } .ib-sending p { margin:2px 0 0; color:var(--muted); font-size:12px; max-width:520px; } .ib-sending select { font:12.5px var(--sans); border:1px solid var(--line); border-radius:8px; padding:7px 9px; background:var(--card); color:var(--fg); max-width:320px; }
.agency-form label.st-chk { display:flex; flex-direction:row; align-items:center; gap:8px; font-weight:400; }
.agency-form label.st-chk input { width:auto; margin:0; }
.ib-warn { display:inline-flex; align-items:center; gap:7px; color:#b3261e; font-weight:500; } .ib-warn i { width:8px; height:8px; border-radius:50%; background:#d93025; box-shadow:0 0 0 3px color-mix(in srgb, #d93025 20%, transparent); }
.ib-link.needs { color:#b3261e; text-decoration-color:#b3261e; }

/* Agency team */
.agency-switch { display:inline-flex; align-items:center; gap:8px; margin-left:auto; margin-right:10px; align-self:flex-start; font-size:12px; color:var(--muted); } .agency-switch select { font:500 12.5px var(--sans); border:1px solid var(--line); border-radius:99px; padding:6px 12px; background:var(--card); color:var(--fg); height:32px; max-width:260px; }
.agency-switch + .avail { margin-left:0; }
.status-chip.shared { display:inline-block; background:var(--blue-soft); color:var(--blue); }
.tm-list { display:grid; gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; margin-bottom:6px; }
.tm-row { display:grid; grid-template-columns:36px minmax(0,1fr) 150px 96px 80px; gap:12px; align-items:center; padding:11px 14px; border-bottom:1px solid var(--line); } .tm-row:last-child { border-bottom:0; }
.tm-av { width:32px; height:32px; border-radius:50%; background:var(--soft); display:grid; place-items:center; font-size:12px; font-weight:700; color:var(--muted); }
.tm-who { display:grid; min-width:0; } .tm-who b { font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .tm-who b i { font-style:normal; font-size:10px; font-weight:600; margin-left:6px; padding:1px 7px; border-radius:99px; background:var(--soft); color:var(--muted); } .tm-who small { color:var(--muted); font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-role { font:12.5px var(--sans); border:1px solid var(--line); border-radius:8px; padding:6px 8px; background:var(--card); color:var(--fg); width:100%; }
.tm-row .pp-chip { justify-self:start; } .tm-row .icon-btn,.tm-row .link-btn,.tm-row .outline-btn { justify-self:end; }
.tm-h { margin:22px 0 8px; font-size:13px; font-weight:600; }
.tm-note { display:flex; gap:14px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:12px 14px; border:1px dashed var(--line-strong); border-radius:12px; } .tm-note p { margin:0; font-size:12.5px; color:var(--muted); max-width:560px; }
.tm-matrix { overflow:auto; border:1px solid var(--line); border-radius:12px; } .tm-matrix table { width:100%; border-collapse:collapse; font-size:12.5px; } .tm-matrix th,.tm-matrix td { padding:8px 12px; border-bottom:1px solid var(--line); text-align:center; } .tm-matrix thead th { font-size:11px; color:var(--muted); font-weight:600; } .tm-matrix tbody th { text-align:left; font-weight:500; } .tm-matrix tr:last-child th,.tm-matrix tr:last-child td { border-bottom:0; }
.tm-yes { color:var(--ok); font-weight:700; } .tm-no { color:var(--faint); } .tm-only { color:var(--muted); font-size:11.5px; text-align:left; }
.tm-roles { margin:12px 0 0; padding-left:18px; font-size:12.5px; color:var(--muted); line-height:1.6; } .tm-roles b { color:var(--fg); }
.tm-roles-pick { display:grid; gap:6px; margin-bottom:14px; } .tm-roles-pick label { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; } .tm-roles-pick label.on { border-color:var(--fg); background:var(--soft); } .tm-roles-pick b { display:block; font-size:13px; } .tm-roles-pick small { display:block; color:var(--muted); font-size:11.5px; line-height:1.4; } .tm-roles-pick input { margin-top:3px; }
.tm-link { display:flex; gap:8px; } .tm-link input { flex:1; min-width:0; font:12.5px var(--mono); border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:var(--bg); color:var(--fg); }
.tm-proj { display:grid; gap:6px; max-height:300px; overflow:auto; margin-bottom:6px; } .tm-proj label { display:flex; gap:10px; align-items:center; padding:9px 12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; } .tm-proj b { display:block; font-size:13px; } .tm-proj small { color:var(--muted); font-size:11.5px; }
@media (max-width:760px) { .tm-row { grid-template-columns:36px minmax(0,1fr) auto; } .tm-row > :nth-child(4),.tm-row > :nth-child(5) { grid-column:2 / -1; justify-self:start; } .agency-switch { margin-left:0; } }
.agency-form .tm-roles-pick label,.agency-form .tm-proj label { display:flex; flex-direction:row; align-items:flex-start; gap:10px; text-align:left; font-weight:400; }
.agency-form .tm-proj label { align-items:center; }
.agency-form .tm-roles-pick input,.agency-form .tm-proj input { width:auto; margin:3px 0 0; flex:none; }
.agency-form .tm-roles-pick span,.agency-form .tm-proj span { display:block; text-align:left; }

/* Agency billing and the client's plans */
.bl-list,.bl-prods { display:grid; gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.bl-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:14px; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); } .bl-row:last-child,.bl-prod:last-child { border-bottom:0; }
.bl-main { display:grid; min-width:0; } .bl-main b { font-size:13.5px; font-weight:600; } .bl-main small { color:var(--muted); font-size:11.5px; } .bl-warn { color:var(--warn) !important; }
.bl-act { display:flex; gap:6px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.bl-prod { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line); } .bl-prod.off { opacity:.55; }
.bl-prod b { font-size:13.5px; margin-left:8px; } .bl-prod p { margin:4px 0 0; color:var(--muted); font-size:12px; max-width:520px; }
.bl-pp { display:grid; gap:6px; justify-items:end; text-align:right; } .bl-pp b { margin:0; font-size:13.5px; } .bl-pp span { display:flex; gap:6px; }
.bl-ideas { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:12px; } .bl-ideas>span { font-size:11.5px; color:var(--muted); font-weight:600; margin-right:4px; }
.pl-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
.pl-card { display:grid; gap:6px; align-content:start; padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--card); } .pl-card h3 { margin:0; font-size:15px; } .pl-card p { margin:0; color:var(--muted); font-size:12.5px; line-height:1.5; } .pl-card small { color:var(--muted); font-size:12px; }
.pl-price { font-size:20px; letter-spacing:-.01em; } .pl-state { justify-self:start; font-size:10.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); padding:2px 9px; border-radius:99px; background:var(--soft); }
.pl-card.s-active .pl-state { background:color-mix(in srgb, var(--ok) 15%, transparent); color:var(--ok); } .pl-card.s-past_due .pl-state { background:color-mix(in srgb, #b3261e 13%, transparent); color:#b3261e; }
.pl-card a { text-decoration:none; justify-self:start; margin-top:6px; } .pl-card a.outline-btn { color:inherit; }
@media (max-width:640px) { .bl-row { grid-template-columns:1fr auto; } .bl-act { grid-column:1 / -1; justify-content:flex-start; } .bl-prod { flex-direction:column; align-items:flex-start; } .bl-pp { justify-items:start; text-align:left; } }

/* Tool picker */
.rtool-h { margin:14px 4px 4px; font-size:10.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); } .rtool-h:first-child { margin-top:4px; }
.rtool-more { padding:10px 4px; }
/* Database tool */
.dbv-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; } .dbv-head h2 { display:inline; margin:0 10px 0 0; font-size:20px; }
.dbv-banner { display:flex; gap:12px; align-items:flex-start; padding:12px 14px; margin-bottom:12px; border:1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); background:var(--blue-soft); border-radius:12px; font-size:12.5px; line-height:1.55; } .dbv-banner>span { color:var(--blue); display:grid; padding-top:2px; } .dbv-banner p { margin:0; flex:1; } .dbv-banner code,.dbv-code code,.dbv-empty code { background:color-mix(in srgb, var(--fg) 8%, transparent); padding:0 5px; border-radius:4px; font-size:11.5px; } .dbv-banner .link-btn { padding:0; justify-self:start; display:inline; }
.dbv-filter { display:block; margin-bottom:10px; } .dbv-filter input { width:100%; font:13px var(--sans); color:var(--fg); background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px 14px; }
.dbv-list { display:grid; gap:8px; }
.dbv-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); gap:8px; }
.dbv-cell { display:flex; align-items:center; gap:8px; min-width:0; padding:6px 8px 6px 6px; background:var(--soft); border-radius:10px; }
.dbv-name,.dbv-val { font:13px var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; } .dbv-val.mask { letter-spacing:.12em; color:var(--muted); }
.dbv-copy,.dbv-eye { display:grid; place-items:center; width:28px; height:28px; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; flex:none; } .dbv-copy:hover,.dbv-eye:hover { background:var(--card); color:var(--fg); } .dbv-eye[aria-pressed="true"] { color:var(--blue); }
.dbv-h { margin:22px 0 8px; font-size:13px; font-weight:600; }
.dbv-use { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; } .dbv-use>div { padding:10px 12px; background:var(--soft); border-radius:10px; display:grid; gap:2px; } .dbv-use span { font-size:11.5px; color:var(--muted); } .dbv-use b { font-size:13px; }
.dbv-code p { margin:0 0 8px; font-size:12.5px; color:var(--muted); } .dbv-code pre { margin:0 0 8px; padding:12px 14px; background:var(--soft); border-radius:10px; font:12px/1.6 var(--mono); overflow:auto; }
.dbv-empty { text-align:center; padding:36px 20px; border:1px dashed var(--line-strong); border-radius:14px; } .dbv-empty>span { display:grid; place-items:center; width:38px; height:38px; margin:0 auto 10px; border-radius:11px; background:var(--soft); color:var(--muted); } .dbv-empty h3 { margin:0; font-size:15px; } .dbv-empty p { margin:6px auto 0; max-width:420px; font-size:12.5px; color:var(--muted); line-height:1.55; }
@media (max-width:560px) { .dbv-row { grid-template-columns:1fr; } }

/* Sitemap map */
.pvw.pvw-wide .pvw-in { max-width:none; }
.smm-mode { display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; margin-left:auto; } .smm-mode button { border:0; background:transparent; padding:5px 14px; font:12px var(--sans); color:var(--muted); cursor:pointer; } .smm-mode button[aria-pressed="true"] { background:var(--soft); color:var(--fg); font-weight:600; }
.smm { display:grid; gap:8px; margin:6px 0 14px; }
.smm-bar { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; } .smm-hint { font-size:12px; color:var(--muted); }
.smm-ctl { display:flex; gap:6px; align-items:center; } .smm-ctl button { border:1px solid var(--line); background:var(--card); border-radius:8px; padding:5px 11px; font:12px var(--sans); color:var(--fg); cursor:pointer; } .smm-ctl button:hover { border-color:var(--line-strong); }
.smm-zoom { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:8px; background:var(--card); } .smm-zoom button { border:0; padding:5px 10px; } .smm-zoom output { font-size:11.5px; min-width:42px; text-align:center; color:var(--muted); }
.smm-view { position:relative; height:calc(100vh - 330px); min-height:380px; overflow:hidden; border:1px solid var(--line); border-radius:14px; background-color:var(--bg); background-image:radial-gradient(color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px); background-size:22px 22px; cursor:grab; touch-action:none; outline:0; } .smm-view:focus-visible { box-shadow:0 0 0 2px var(--blue); } .smm-view.pan { cursor:grabbing; }
.smm-world { position:absolute; left:0; top:0; transform-origin:0 0; }
.smm-edges { position:absolute; left:0; top:0; overflow:visible; pointer-events:none; }
.smm-edge { fill:none; stroke:color-mix(in srgb, var(--fg) 45%, transparent); stroke-width:1.6; } .smm-edge.link { stroke:#14a3b3; stroke-dasharray:6 4; } .smm-edge.tmp { stroke:#14a3b3; stroke-dasharray:4 4; } .smm-head { fill:color-mix(in srgb, var(--fg) 55%, transparent); }
.smm-pill { position:absolute; transform:translate(-50%,-50%); border:1px solid var(--line-strong); background:var(--card); color:var(--fg); border-radius:99px; padding:3px 11px; font:11.5px var(--sans); cursor:pointer; white-space:nowrap; z-index:3; box-shadow:0 1px 2px rgba(0,0,0,.06); } .smm-pill.empty { color:var(--faint); border-style:dashed; opacity:.8; } .smm-pill:hover { border-color:#14a3b3; opacity:1; }
.smn { position:absolute; box-sizing:border-box; display:grid; grid-template-rows:auto auto auto auto; align-content:start; gap:3px; padding:10px; background:var(--card); border:1px solid var(--line-strong); border-radius:13px; box-shadow:var(--shadow); cursor:grab; user-select:none; z-index:2; outline:0; }
.smn:focus-visible,.smn.sel { border-color:var(--blue); box-shadow:0 0 0 2px color-mix(in srgb, var(--blue) 40%, transparent), var(--shadow); } .smn.drag { cursor:grabbing; z-index:5; box-shadow:0 8px 24px rgba(0,0,0,.18); } .smn.target { border-color:#14a3b3; box-shadow:0 0 0 3px color-mix(in srgb, #14a3b3 35%, transparent); }
.smn-num { position:absolute; top:-11px; left:-11px; width:24px; height:24px; border-radius:50%; background:#14a3b3; color:#fff; display:grid; place-items:center; font:700 11.5px var(--sans); box-shadow:0 0 0 3px var(--bg); }
.smn-thumb { height:84px; border-radius:8px; background:var(--soft); overflow:hidden; } .smn-thumb svg { width:100%; height:100%; display:block; } .smn-thumb .a { fill:color-mix(in srgb, var(--fg) 20%, transparent); } .smn-thumb .b { fill:color-mix(in srgb, var(--fg) 10%, transparent); } .smn-thumb .c { fill:color-mix(in srgb, var(--fg) 34%, transparent); }
.smn-title { font-size:13px; font-weight:600; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .smn-path { font:11px var(--mono); color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .smn-note { font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.smn-built { position:absolute; top:14px; right:14px; font-size:10px; font-weight:700; padding:1px 7px; border-radius:99px; background:color-mix(in srgb, var(--ok) 18%, var(--card)); color:var(--ok); }
.smn-tools { position:absolute; top:-12px; right:8px; display:none; gap:4px; } .smn:hover .smn-tools,.smn:focus-within .smn-tools,.smn.sel .smn-tools { display:flex; } .smn-tools button { width:24px; height:24px; border-radius:7px; border:1px solid var(--line-strong); background:var(--card); color:var(--fg); cursor:pointer; font-size:12px; padding:0; line-height:1; } .smn-tools button:hover { background:var(--soft); }
.smn-port { position:absolute; right:-8px; top:50%; width:14px; height:14px; margin-top:-7px; border-radius:50%; background:var(--card); border:2px solid #14a3b3; cursor:crosshair; opacity:0; transition:opacity .12s; } .smn:hover .smn-port,.smn.sel .smn-port,.smn.target .smn-port { opacity:1; }
@media (max-width:700px) { .smm-view { height:calc(100vh - 380px); } }

/* Brand logo in the header and on sign-in pages */
.brand-logo { height:24px; width:auto; max-width:150px; object-fit:contain; display:block; flex:none; }
.brand.logo-only .brand-logo { height:28px; max-width:170px; }
.auth-brand .brand-logo { height:34px; max-width:180px; } .auth-brand.logo-only .brand-logo { height:40px; max-width:220px; }
.brand [hidden],.auth-brand [hidden] { display:none !important; }
/* Admin: name, logo and favicon card */
.bi-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:12px 0; } .bi-box { display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:12px; align-content:start; } .bi-box b { font-size:13px; }
.bi-prev { height:74px; border-radius:10px; background:var(--soft); display:grid; place-items:center; overflow:hidden; color:var(--faint); font-size:12px; } .bi-prev img { max-height:60px; max-width:90%; object-fit:contain; } .bi-prev.small img { height:32px; width:32px; }
.bi-act { display:flex; gap:6px; flex-wrap:wrap; } .bi-up { cursor:pointer; }
.bi-live { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 12px; border:1px dashed var(--line-strong); border-radius:12px; } .bi-head { display:flex; align-items:center; gap:9px; font-size:15px; min-height:30px; } .bi-head .brand-logo { height:26px; } .bi-head svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.6; }
@media (max-width:640px) { .bi-grid { grid-template-columns:1fr; } }
.brand .brand-name,.auth-brand .brand-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }

/* Admin mailbox */
.mb-head p { margin:0; font-size:12.5px; color:var(--muted); }
.ib-filter button i { font-style:normal; font-size:10px; background:var(--soft); border-radius:99px; padding:0 6px; margin-left:3px; color:var(--muted); }
.ib-ch.mb-closed { background:var(--soft); color:var(--muted); } .ib-ch.mb-who { background:var(--blue-soft); color:var(--blue); }
.ib-msg.mb-note { background:color-mix(in srgb, var(--warn) 10%, transparent); border-bottom-color:color-mix(in srgb, var(--warn) 25%, var(--line)); border-radius:10px; padding:12px 14px; margin:6px 0; }
.mb-mode { display:flex; gap:4px; } .mb-mode button { border:0; background:none; font:12px var(--sans); color:var(--muted); padding:4px 11px; border-radius:99px; cursor:pointer; } .mb-mode button[aria-selected="true"] { background:var(--soft); color:var(--fg); font-weight:600; }
.ep-recv { border-top:1px solid var(--line); margin-top:6px; padding-top:12px; display:grid; gap:8px; } .ep-recv h3 { margin:0; font-size:13.5px; } .ep-reply { display:flex; gap:8px; align-items:flex-end; } .ep-reply .st-f { flex:1; margin:0; }

/* Email content: clickable links, formatted messages in a locked frame, spam warnings */
.ib-body a,.mv-text a { color:var(--blue); text-decoration:underline; text-underline-offset:2px; word-break:break-all; }
.mv-frame { width:100%; min-height:60px; border:1px solid var(--line); border-radius:10px; background:#fff; display:block; } .mv-frame[hidden] { display:none; }
.mv-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:6px; font-size:12px; } .mv-bar button { border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:8px; padding:3px 10px; font:12px var(--sans); cursor:pointer; } .mv-bar button:hover { border-color:var(--line-strong); } .mv-bar button[hidden],.mv-note[hidden] { display:none; } .mv-note { color:var(--muted); flex:1; min-width:180px; }
.mv-spam { margin:0 0 10px; padding:10px 14px; border-radius:10px; font-size:12.5px; border:1px solid; } .mv-spam b { display:block; margin-bottom:2px; } .mv-spam ul { margin:0; padding-left:18px; } .mv-spam.bad { background:color-mix(in srgb, #b3261e 9%, transparent); border-color:color-mix(in srgb, #b3261e 40%, var(--line)); } .mv-spam.warn { background:color-mix(in srgb, var(--warn) 10%, transparent); border-color:color-mix(in srgb, var(--warn) 40%, var(--line)); }
.mv-chip { font-size:10.5px; font-weight:600; padding:1px 8px; border-radius:99px; border:1px solid var(--line); } .mv-chip.ok { color:var(--ok); } .mv-chip.bad { color:#b3261e; border-color:color-mix(in srgb, #b3261e 40%, var(--line)); }
.ib-ch.mv-spamtag { background:#b3261e; } .ib-ch.mv-sus { background:var(--warn); }

/* Message a lead: a composer like the inbox's */
.abt-h { display:flex; align-items:center; gap:9px; } .abt-h b { font-size:13px; } .abt-av { width:24px; height:24px; border-radius:50%; background:var(--soft); color:var(--muted); display:inline-grid; place-items:center; font:700 11px var(--sans); flex:none; }
.ab-thread li small { margin:3px 0 0 33px; } .ab-thread li p { margin:8px 0 0 33px; }
.ab-compose { margin-top:12px; } .abc-card { border:1px solid var(--line); border-radius:14px; background:var(--card); overflow:hidden; } .abc-card:focus-within { border-color:var(--line-strong); box-shadow:0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.abc-row { display:flex; align-items:center; gap:12px; padding:9px 16px; border-bottom:1px solid var(--line); font-size:13px; min-height:44px; } .abc-lbl { width:54px; color:var(--muted); font-size:12px; flex:none; }
.abc-to { display:inline-flex; align-items:center; gap:8px; min-width:0; flex-wrap:wrap; } .abc-to small { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; }
.abc-subject { flex:1; min-width:0; border:0; background:transparent; font:500 14px var(--sans); color:var(--fg); padding:6px 0; outline:0; }
.abc-text { display:block; width:100%; border:0; background:transparent; font:14px/1.65 var(--sans); color:var(--fg); padding:14px 16px 8px; resize:vertical; min-height:130px; outline:0; box-sizing:border-box; }
.abc-chips { display:flex; flex-wrap:wrap; gap:6px; padding:4px 16px 12px; } .abc-chip { border:1px solid var(--line); background:transparent; color:var(--muted); border-radius:99px; padding:5px 12px; font:12px var(--sans); cursor:pointer; } .abc-chip:hover { border-color:var(--line-strong); color:var(--fg); background:var(--soft); }
.abc-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 16px 12px; border-top:1px solid var(--line); background:var(--soft); } .abc-foot small { color:var(--muted); font-size:11.5px; } .abc-send { height:36px; padding:0 20px; border-radius:10px; font-weight:600; }
@media (max-width:640px) { .abc-foot { flex-direction:column; align-items:stretch; } .abc-row { padding:8px 12px; } .abc-lbl { width:46px; } }

.tm-fold { margin-top:22px; } .tm-fold > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; padding:10px 14px; border:1px solid var(--line); border-radius:12px; } .tm-fold > summary::-webkit-details-marker { display:none; } .tm-fold > summary::before { content:"▸"; font-size:11px; transition:transform .15s; } .tm-fold[open] > summary::before { transform:rotate(90deg); } .tm-fold[open] > summary { margin-bottom:10px; }
.rq-grid { display:grid; grid-template-columns:minmax(260px,340px) 1fr; gap:16px; align-items:start; } @media (max-width:820px){ .rq-grid { grid-template-columns:1fr; } }
.rq-list { display:grid; gap:8px; } .rq-row { display:grid; gap:4px; text-align:left; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:transparent; cursor:pointer; font:inherit; color:inherit; } .rq-row:hover,.rq-row.on { border-color:var(--agency-accent,var(--fg)); } .rq-row.unread b { font-weight:700; }
.rq-r1 { display:flex; justify-content:space-between; gap:8px; font-size:14px; } .rq-r2 { font-size:12.5px; color:var(--muted); } .rq-r3 { display:flex; align-items:center; justify-content:space-between; gap:8px; } .rq-r3 small { color:var(--muted); font-size:12px; } .rq-urgent { color:#b3261e; font-style:normal; font-weight:600; }
.rq-thread { border:1px solid var(--line); border-radius:14px; padding:16px; min-width:0; } .rq-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.55; margin-top:8px; }
.rq-note { background:color-mix(in srgb, var(--warn) 9%, transparent); border-radius:10px; } .rq-reply.is-note textarea { background:color-mix(in srgb, var(--warn) 7%, transparent); }
.rq-mode { display:flex; gap:4px; margin-bottom:8px; } .rq-mode button { border:0; background:transparent; padding:5px 11px; border-radius:99px; font:inherit; font-size:12.5px; cursor:pointer; color:var(--muted); } .rq-mode button[aria-selected="true"] { background:var(--soft); color:var(--fg); font-weight:600; }
.pp-chip.rq-s-open { background:var(--blue-soft); color:var(--blue); } .pp-chip.rq-s-in_progress { background:color-mix(in srgb, var(--warn) 15%, transparent); color:var(--warn); } .pp-chip.rq-s-waiting { background:color-mix(in srgb, #b3261e 13%, transparent); color:#b3261e; } .pp-chip.rq-s-done { background:color-mix(in srgb, var(--ok) 15%, transparent); color:var(--ok); }
.pr-list { display:grid; gap:8px; } .pr-row { display:flex; justify-content:space-between; align-items:center; gap:10px; text-align:left; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:transparent; font:inherit; color:inherit; cursor:pointer; } .pr-row span:first-child { display:grid; gap:2px; } .pr-row small,.pr-thread small { color:var(--muted); font-size:12px; }
.pr-form { display:grid; gap:12px; } .pr-form label { display:grid; gap:5px; font-size:13px; font-weight:600; } .pr-form input,.pr-form select,.pr-form textarea { font:inherit; font-weight:400; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:transparent; color:inherit; } .pr-two { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; } .pr-act { display:flex; gap:8px; }
.pr-th { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 0 2px; } .pr-th h3 { margin:0; font-size:16px; } .pr-thread .pc-list { margin:12px 0; max-height:380px; }

@keyframes view-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.view:not([hidden]) { animation:view-in .2s ease-out; } @media (prefers-reduced-motion:reduce) { .view:not([hidden]) { animation:none; } }
.pd-card { margin-top:16px; } .pd-form { display:flex; gap:8px; flex-wrap:wrap; } .pd-form input { flex:1 1 240px; font:inherit; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:transparent; color:inherit; } .pd-act { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.pd-records { overflow:auto; border:1px solid var(--line); border-radius:12px; margin:10px 0; } .pd-records table { width:100%; border-collapse:collapse; font-size:12.5px; } .pd-records th,.pd-records td { text-align:left; padding:8px 12px; border-bottom:1px solid var(--line); } .pd-records tr:last-child td { border-bottom:0; } .pd-records code { overflow-wrap:anywhere; }
.pd-card { display:block; } .pd-card > h2 { margin-top:0; }
.explore-menu { margin-top:5px; } .explore-in { max-width:1180px; } .ex-h1 { margin:2px 0 4px; font-size:28px; letter-spacing:-.02em; font-weight:600; }
.ex-tools { display:flex; gap:10px; margin:6px 0 12px; flex-wrap:wrap; } .ex-tools input { flex:1 1 260px; font:inherit; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:transparent; color:inherit; } .ex-tools select { font:inherit; padding:9px 12px; border:1px solid var(--line); border-radius:12px; background:transparent; color:inherit; }
.ex-chips { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; align-items:center; } .ex-chip { border:1px solid var(--line); background:transparent; color:var(--muted); padding:5px 13px; border-radius:99px; font:inherit; font-size:13px; cursor:pointer; } .ex-chip:hover { color:var(--fg); } .ex-chip[aria-selected="true"] { background:var(--fg); color:var(--bg); border-color:var(--fg); } .ex-sep { width:1px; height:20px; background:var(--line); margin:0 4px; }
.ex-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:18px; } .ex-card { min-width:0; } .ex-open { display:block; width:100%; text-align:left; padding:0; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:transparent; color:inherit; font:inherit; cursor:pointer; transition:transform .15s, border-color .15s, box-shadow .15s; } .ex-open:hover { transform:translateY(-2px); border-color:color-mix(in srgb, var(--fg) 30%, var(--line)); box-shadow:0 8px 24px -12px rgba(0,0,0,.25); }
.ex-cover { position:relative; display:block; aspect-ratio:16/10; background:var(--soft); overflow:hidden; } .ex-cover img,.ex-hero img { width:100%; height:100%; object-fit:cover; display:block; } .ex-ph { display:grid; place-items:center; width:100%; height:100%; background:linear-gradient(135deg, hsl(var(--h) 45% 82%), hsl(calc(var(--h) + 40) 50% 70%)); } .ex-ph b { font-size:46px; font-weight:600; color:rgba(255,255,255,.9); }
.ex-feat { position:absolute; top:10px; left:10px; background:rgba(0,0,0,.72); color:#fff; font-style:normal; font-size:11px; font-weight:600; padding:3px 9px; border-radius:99px; } .ex-hid { left:auto; right:10px; background:#b3261e; }
.ex-meta { display:grid; gap:3px; padding:12px 14px 14px; } .ex-meta b { font-size:15px; } .ex-meta small { color:var(--muted); font-size:13px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; } .ex-foot { display:flex; justify-content:space-between; gap:8px; margin-top:6px; font-size:12px; color:var(--muted); }
.ex-empty { text-align:center; padding:60px 20px; border:1px dashed var(--line); border-radius:16px; color:var(--muted); } .ex-empty h3 { margin:0 0 4px; color:var(--fg); }
.ex-dialog { max-width:720px; } .ex-detail { position:relative; } .ex-x { position:absolute; top:8px; right:8px; z-index:2; background:var(--bg); } .ex-hero { aspect-ratio:16/9; border-radius:12px; overflow:hidden; background:var(--soft); margin-bottom:14px; } .ex-hero .ex-ph b { font-size:72px; }
.ex-d-head { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:flex-start; } .ex-d-head h2 { margin:0; } .ex-by { margin:2px 0 0; color:var(--muted); font-size:13px; } .ex-d-btns { display:flex; gap:8px; flex-wrap:wrap; } .ex-sum { font-size:15px; margin:12px 0 6px; } .ex-desc { white-space:pre-wrap; overflow-wrap:anywhere; color:var(--muted); font-size:14px; line-height:1.6; } .ex-tags { margin:12px 0 0; } .ex-owner { margin-top:16px; border-top:1px solid var(--line); padding-top:12px; }
.ex-form .ex-two { display:grid; grid-template-columns:1fr 1fr; gap:12px; } @media (max-width:560px){ .ex-form .ex-two { grid-template-columns:1fr; } } .ex-prev { display:flex; align-items:center; gap:10px; } .ex-prev img { max-height:90px; border-radius:8px; border:1px solid var(--line); } .agency-form .ex-check { display:flex; flex-direction:row; align-items:center; gap:8px; } .agency-form .ex-check input { width:auto; margin:0; }
.ex-coverbox { display:grid; gap:8px; } .ex-coverbox > b { font-size:13px; } .ex-cover-btns { display:flex; gap:8px; flex-wrap:wrap; align-items:center; } .ex-up { cursor:pointer; } .ex-prev img { max-height:140px; max-width:100%; border-radius:10px; border:1px solid var(--line); }
.pd-h { margin:18px 0 6px; font-size:15px; display:flex; align-items:center; gap:8px; } .pd-hr { border:0; border-top:1px solid var(--line); margin:20px 0 0; } .pd-form .ib-addr { flex:1 1 280px; }
.ex-auto { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .ex-auto .hint { flex:1 1 220px; margin:0; font-size:12.5px; }

.bk-kit { display:grid; gap:18px; margin-top:12px; padding-top:14px; border-top:1px solid var(--line); } .bk-sec { display:grid; gap:10px; } .bk-h { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; } .bk-h > b,.bk-ah > b { font-size:13px; }
.bk-add { display:flex; gap:6px; align-items:center; flex-wrap:wrap; } .bk-add input:not([type=color]) { font:inherit; font-size:13px; padding:6px 10px; border:1px solid var(--line); border-radius:9px; background:transparent; color:inherit; min-width:0; width:170px; } .bk-add .bk-role { width:110px; } .bk-add input[type=color] { width:34px; height:30px; padding:0; border:1px solid var(--line); border-radius:8px; background:transparent; cursor:pointer; } .bk-add .outline-btn { padding:5px 11px; font-size:12.5px; }
.bk-sws { display:flex; flex-wrap:wrap; gap:10px; } .bk-sw { position:relative; display:flex; align-items:center; gap:10px; padding:7px 28px 7px 7px; border:1px solid var(--line); border-radius:12px; background:var(--card); } .bk-sw.dup { opacity:.7; } .bk-chip { position:relative; width:44px; height:44px; border-radius:9px; background:var(--c); box-shadow:inset 0 0 0 1px rgba(128,128,128,.35); cursor:pointer; overflow:hidden; } .bk-chip input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.bk-sl { display:grid; gap:1px; font-size:12px; } .bk-sl b { font-weight:600; max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .bk-copy { border:0; background:transparent; padding:0; font:inherit; font-size:12px; color:var(--muted); text-align:left; cursor:pointer; font-variant-numeric:tabular-nums; } .bk-copy:hover { color:var(--fg); text-decoration:underline; }
.bk-x { position:absolute; top:4px; right:4px; width:20px; height:20px; border:0; border-radius:99px; background:transparent; color:var(--muted); cursor:pointer; font-size:15px; line-height:1; } .bk-x:hover { background:var(--soft); color:var(--fg); }
.bk-fonts { display:grid; gap:8px; } .bk-font { position:relative; display:flex; align-items:center; gap:14px; padding:10px 32px 10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); } .bk-aa { font-size:34px; line-height:1; min-width:56px; text-align:center; } .bk-fb { display:grid; gap:2px; min-width:0; } .bk-fb b { font-size:13px; } .bk-fb small { color:var(--muted); font-weight:400; margin-left:4px; } .bk-fb span { font-size:15px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bk-assets { display:grid; gap:10px; padding:12px; border:1px dashed var(--line); border-radius:14px; transition:background .15s, border-color .15s; } .bk-assets.over { background:var(--soft); border-color:var(--fg); } .bk-ah { display:grid; gap:2px; } .bk-ah span { font-size:12.5px; color:var(--muted); }
.bk-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:10px; } .bk-tile { position:relative; margin:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--card); } .bk-tile img { width:100%; aspect-ratio:1; object-fit:cover; display:block; background:repeating-conic-gradient(#8881 0 25%, transparent 0 50%) 0 0/16px 16px; } .bk-tile figcaption { padding:5px 8px; font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .bk-tile .bk-x { background:rgba(255,255,255,.85); color:#222; }
.bk-up { display:grid; place-items:center; gap:2px; aspect-ratio:1; border:1px dashed var(--line); border-radius:12px; cursor:pointer; color:var(--muted); text-align:center; } .bk-up:hover { color:var(--fg); border-color:var(--fg); } .bk-up span { font-size:24px; line-height:1; } .bk-up small { font-size:11.5px; padding:0 6px; }
.bk-links { display:grid; gap:8px; margin-top:10px; } .bk-link { display:flex; align-items:center; gap:12px; padding:9px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); color:inherit; text-decoration:none; } .bk-link:hover { border-color:var(--fg); } .bk-link > span:nth-child(2) { display:grid; min-width:0; flex:1; } .bk-link b { font-size:13.5px; } .bk-link small { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .bk-link i { font-style:normal; color:var(--muted); } .bk-fav { display:grid; place-items:center; width:32px; height:32px; border-radius:8px; font-weight:600; color:#fff; background:hsl(var(--h) 40% 45%); flex:none; } .bk-addlink input:first-child { flex:1 1 220px; }

.ib-thumbs { display:flex; gap:8px; flex-wrap:wrap; width:100%; } .ib-thumb { display:block; border-radius:10px; overflow:hidden; border:1px solid var(--line, #2a2a28); background:#fff; } .ib-thumb img { display:block; max-width:min(100%, 360px); max-height:280px; object-fit:contain; }

.chat.drop-over, #home-form.drop-over { outline:2px dashed var(--accent, #2f5bea); outline-offset:-6px; border-radius:14px; background-image:linear-gradient(rgba(47,91,234,.06),rgba(47,91,234,.06)); position:relative; } .chat.drop-over::after, #home-form.drop-over::after { content:'Drop pictures to attach them'; position:absolute; inset:0; display:grid; place-items:center; font-weight:600; color:var(--accent, #2f5bea); pointer-events:none; text-shadow:0 0 8px var(--bg, #fff); }

.msg-pics { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; margin:6px 0 2px; max-width:100%; } .msg-pic { padding:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--card); cursor:zoom-in; line-height:0; } .msg-pic img { width:96px; height:76px; object-fit:cover; display:block; transition:transform .15s; } .msg-pic:hover img { transform:scale(1.04); } .msg-pic:focus-visible { outline:2px solid var(--accent, #2f5bea); outline-offset:2px; }
.lb-back { position:fixed; inset:0; z-index:300; background:rgba(15,15,14,.82); display:grid; place-items:center; padding:24px; } .lb-back figure { margin:0; max-width:min(1100px,100%); max-height:100%; display:grid; gap:10px; justify-items:center; } .lb-back img { max-width:100%; max-height:calc(100vh - 110px); object-fit:contain; border-radius:10px; background:#fff; } .lb-back figcaption { color:#eee; font-size:13px; } .lb-x, .lb-n { position:absolute; border:0; border-radius:999px; width:42px; height:42px; background:rgba(255,255,255,.14); color:#fff; font-size:26px; line-height:1; cursor:pointer; } .lb-x { top:16px; right:16px; } .lb-n { top:50%; transform:translateY(-50%); } .lb-n.prev { left:16px; } .lb-n.next { right:16px; } .lb-x:hover, .lb-n:hover { background:rgba(255,255,255,.28); }

/* full screen and its own window (public/window-mode.js): the page fills the window and is scaled up by --win-zoom */
.win-ctl { margin-left:auto; display:flex; align-items:center; gap:4px; } .win-ctl .icon-btn { min-width:32px; height:32px; font-size:15px; line-height:1; } .win-zoom { display:none; align-items:center; gap:2px; font-size:12px; color:var(--muted); } html.win-on .win-zoom { display:inline-flex; } .win-zoom-val { min-width:40px; text-align:center; }
.view.v-fs { position:fixed; inset:0; z-index:150; background:var(--bg); overflow:auto; max-width:none; }
html.pop-window .app { grid-template-columns:minmax(0,1fr); padding:0; } html.pop-window .side, html.pop-window [data-open-side] { display:none !important; } html.pop-window .view { max-width:none; }
.v-fs .projects-in, html.pop-window .projects-in, .v-fs .agency-in, html.pop-window .agency-in { max-width:none; }
.v-fs .ib-cols, html.pop-window .ib-cols { height:calc(100vh / var(--win-zoom, 1) - 300px); min-height:300px; } .v-fs .agency-heading .eyebrow, html.pop-window .agency-heading .eyebrow, .v-fs .agency-sub, html.pop-window .agency-sub { display:none; }
.v-fs .ib-msgs, html.pop-window .ib-msgs { padding-inline:clamp(20px,4vw,56px); } .v-fs .ib-thread, html.pop-window .ib-thread { max-width:none; }
/* inbox: draggable divider, reading pane position, folders, stars and selecting several */
.ib-cols { grid-template-columns:var(--ib-list-w,340px) 8px minmax(0,1fr); }
.ib-split { cursor:col-resize; position:relative; touch-action:none; outline:0; } .ib-split::before { content:''; position:absolute; inset:0 3px; background:var(--line); border-radius:2px; transition:background .12s, inset .12s; }
.ib-split:hover::before, .ib-split:focus-visible::before, body.ib-dragging .ib-split::before { background:var(--agency-accent, var(--blue, #2f5bea)); inset:0 2px; } body.ib-dragging { user-select:none; cursor:col-resize; } body.ib-dragging iframe { pointer-events:none; }
.ib-list { border-right:0; }
.ib-cols.pane-bottom { grid-template-columns:minmax(0,1fr); grid-template-rows:var(--ib-list-h,260px) 8px minmax(0,1fr); } .pane-bottom .ib-split { cursor:row-resize; } .pane-bottom .ib-split::before { inset:3px 0; } .pane-bottom .ib-split:hover::before, .pane-bottom .ib-split:focus-visible::before { inset:2px 0; } .pane-bottom .ib-list { border-bottom:0; } body.ib-dragging:has(.pane-bottom) { cursor:row-resize; }
.ib-cols.pane-off { grid-template-columns:minmax(0,1fr); } .pane-off .ib-split { display:none; } .pane-off.has-thread .ib-list { display:none; } .pane-off:not(.has-thread) .ib-detail { display:none; } .pane-off .ib-back { display:block; }
@media (max-width:900px) { .ib-split { display:none; } .ib-cols.pane-bottom, .ib-cols.pane-right { grid-template-columns:1fr; grid-template-rows:none; } }
.ib-panesel select { font:12px var(--sans); border:1px solid var(--line); border-radius:8px; padding:6px 8px; background:var(--card); color:var(--fg); }
.ib-filter { flex-wrap:wrap; } .ib-filter button { white-space:nowrap; }
.ib-rw { position:relative; border-bottom:1px solid var(--line); } .ib-rw .ib-row { border-bottom:0; padding-right:40px; } .ib-rw.picked .ib-row { background:var(--soft); }
.ib-sel { position:absolute; left:17px; top:21px; width:18px; height:18px; margin:0; z-index:2; opacity:0; cursor:pointer; accent-color:var(--agency-accent, var(--fg)); } .ib-rw:hover .ib-sel, .ib-rw.selecting .ib-sel, .ib-sel:focus-visible { opacity:1; } .ib-rw:hover .ib-av, .ib-rw.selecting .ib-av { visibility:hidden; } .ib-rw .ib-row { padding-left:12px; }
.ib-star { position:absolute; right:10px; top:34px; border:0; background:none; font-size:17px; line-height:1; color:var(--muted); cursor:pointer; padding:4px; border-radius:6px; opacity:.55; } .ib-star:hover { opacity:1; background:var(--soft); } .ib-star.on { color:#e0a100; opacity:1; }
.ib-all { display:flex; gap:8px; align-items:center; font-size:12px; color:var(--muted); cursor:pointer; } .ib-all input { margin:0; accent-color:var(--agency-accent, var(--fg)); }
.ib-bulk { display:flex; flex-wrap:wrap; gap:4px; align-items:center; padding:6px 8px; border-radius:10px; background:var(--soft); } .ib-bulk b { font-size:12px; margin-right:4px; } .ib-bulk button { border:1px solid var(--line); background:var(--card); border-radius:99px; font:12px var(--sans); padding:3px 10px; cursor:pointer; color:var(--fg); } .ib-bulk button:hover { border-color:var(--muted); } .ib-bulk .danger { color:#b3261e; }

/* crypto wallets dialog */
.cxw .agency-form { max-height: 86vh; overflow: auto; } .cxw-net { border:1px solid var(--line); border-radius:12px; margin:10px 0 0; padding:8px 14px 12px; } .cxw-net legend { font-weight:600; padding:0 6px; } .cxw-net legend small { font-weight:400; color:var(--muted); margin-left:6px; }
.cxw-f { display:grid; gap:4px; margin-top:8px; } .cxw-f span { font-size:12.5px; color:var(--muted); } .cxw-f input { font:13px ui-monospace, SFMono-Regular, Menlo, monospace; border:1px solid var(--line); border-radius:8px; padding:9px 10px; background:var(--bg); color:var(--fg); }
.cxw-h { margin:22px 0 6px; font-size:15px; } .cxw-led { overflow:auto; } .cxw-led table { width:100%; border-collapse:collapse; font-size:13px; } .cxw-led th { text-align:left; font-weight:500; color:var(--muted); padding:6px 8px; border-bottom:1px solid var(--line); } .cxw-led td { padding:8px; border-bottom:1px solid var(--line); vertical-align:top; } .cxw-led small { color:var(--muted); margin-left:4px; }
.dom-msg.bad { color:#b3261e; }

/* proposal editor: undo, redo */
.pp-hist { display:inline-flex; gap:2px; margin-left:auto; } .pp-hist .icon-btn { font-size:18px; line-height:1; min-width:34px; height:34px; } .pp-hist .icon-btn:disabled { opacity:.35; cursor:default; }
.pp-snack { position:fixed; left:50%; bottom:22px; transform:translateX(-50%); z-index:400; display:flex; gap:14px; align-items:center; background:var(--ink, #1d1d1b); color:var(--bg, #fff); padding:10px 12px 10px 16px; border-radius:12px; box-shadow:0 8px 28px rgba(0,0,0,.22); font-size:14px; } .pp-snack button { border:0; background:rgba(255,255,255,.16); color:inherit; font:600 13px var(--sans); padding:5px 12px; border-radius:99px; cursor:pointer; } .pp-snack button:hover { background:rgba(255,255,255,.28); }

/* payments dashboard */
.pd-methods { display:flex; flex-wrap:wrap; gap:8px; margin:-6px 0 16px; } .pd-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } .pd-stats article b { font-size:clamp(18px,2.4vw,24px); overflow-wrap:anywhere; }
.pd-chart { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:14px 16px 10px; margin:0 0 22px; } .pd-ch-h { display:flex; justify-content:space-between; align-items:baseline; } .pd-ch-h small { color:var(--muted); }
.pd-bars { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; align-items:end; height:170px; padding-top:22px; } .pd-bar { position:relative; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; gap:5px; } .pd-bar i { display:block; width:100%; max-width:64px; background:var(--agency-accent, var(--accent, #687363)); border-radius:6px 6px 2px 2px; } .pd-v { font-size:11.5px; color:var(--muted); white-space:nowrap; } .pd-l { font-size:12px; color:var(--muted); }
.pd-filters { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; } .pd-filters select, .pd-filters input { font:13px var(--sans); border:1px solid var(--line); border-radius:8px; padding:7px 10px; background:var(--card); color:var(--fg); } .pd-filters input { flex:1; min-width:220px; }
.pd-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--card); } .pd-table { width:100%; border-collapse:collapse; font-size:13.5px; } .pd-table th { text-align:left; font-weight:500; color:var(--muted); padding:9px 12px; border-bottom:1px solid var(--line); white-space:nowrap; } .pd-table td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top; } .pd-table tr:last-child td { border-bottom:0; } .pd-table .r { text-align:right; } .pd-table small { display:block; color:var(--muted); font-size:11.5px; margin-top:1px; } .pd-act { white-space:nowrap; text-align:right; } .pd-act a { margin-left:8px; font-size:13px; }
.pd-foot { margin:8px 2px 0; } .pd-two { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:22px; align-items:start; } @media (max-width:900px) { .pd-two { grid-template-columns:1fr; } .pd-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.pd-top { list-style:none; margin:0; padding:0; border:1px solid var(--line); border-radius:12px; background:var(--card); } .pd-top li { display:flex; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid var(--line); } .pd-top li:last-child { border-bottom:0; } .pd-top small { display:block; color:var(--muted); font-size:11.5px; }

/* inbox list: the select-all checkbox and the folder tabs fit the column */
.ib-tools input[type="checkbox"] { width:16px; height:16px; padding:0; margin:0; flex:none; border-radius:4px; accent-color:var(--agency-accent, var(--fg)); } .ib-all { display:flex; align-items:center; gap:8px; justify-content:flex-start; white-space:nowrap; } .ib-all span { display:inline; }
.ib-filter { gap:2px; } .ib-filter button { padding:4px 8px; font-size:12px; } .ib-filter button i { margin-left:2px; }

/* window buttons with words, placed where people look */
.win-ctl .win-zoom .icon-btn { font-size:13px; }
.fe-win { display:inline-flex; gap:6px; margin-left:auto; margin-right:8px; } .fe-win .icon-btn { min-width:32px; height:32px; font-size:15px; line-height:1; }
#agency-dialog.fe-wide:has(.agency-form-editor) { width:min(1180px, calc(100vw - 24px)); max-height:calc(100vh - 16px); height:calc(100vh - 16px); } #agency-dialog.fe-wide .agency-form-editor { max-width:none; }
.ib-th-btns { flex-wrap:wrap; }

html.pop-window [data-pp="pop"], html.pop-window [data-ib="popthread"], html.pop-window [data-fe="pop"] { display:none; }

/* the window icons inside an Agency tab's own button row */
.agency-actions .win-ctl, .agency-section-head > .win-ctl { margin:0 4px 0 0; } .agency-section-head > .win-ctl { margin-left:auto; } .win-slot { display:flex; justify-content:flex-end; margin:0 0 6px; } .win-slot .win-ctl { margin:0; }

/* just one tab's content: it alone fills the window (icons in the tab's own button row), or alone fills a window of its own (?pop=1&only=1) */
#agency-panel.p-fs { position:fixed; inset:0; z-index:150; background:var(--bg); overflow:auto; padding:18px clamp(14px,2.5vw,32px) 14px; max-width:none; }
.p-fs .ib-cols, html.pop-only .ib-cols { height:calc(100vh / var(--win-zoom, 1) - 130px); min-height:300px; } .p-fs .ib-msgs, html.pop-only .ib-msgs { padding-inline:clamp(20px,4vw,56px); } .p-fs .ib-thread, html.pop-only .ib-thread { max-width:none; }
html.pop-only .agency-heading, html.pop-only .agency-tabs, html.pop-only #view-agency > .topbar { display:none; }

.pp-cxsum { margin:10px 0 0; padding:10px 12px; border:1px dashed var(--line); border-radius:10px; font-size:13px; } .pp-cxsum ul { margin:6px 0; padding-left:18px; } .pp-cxsum li { margin:3px 0; } .pp-cxsum small { color:var(--muted); display:block; }

/* in full screen, one set of window icons: the one in the top corner stays, the others (a tab's own, a proposal's, a conversation's, a form's) are hidden */
html.win-outer .win-ctl[data-level="inner"], html.win-inner .win-ctl[data-level="outer"], html.win-full [data-pp="pop"], html.win-full [data-ib="popthread"], html.win-full [data-fe="pop"] { display:none; }

/* lead cards: header (who, what it is worth), the answers, then status and actions */
.agency-leads { gap:12px; }
.agency-lead { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding:16px 18px; align-items:stretch; }
.al-top { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:start; }
.al-av { width:40px; height:40px; border-radius:50%; background:var(--soft); color:var(--muted); display:grid; place-items:center; font-weight:600; font-size:15px; border:1px solid var(--line); }
.agency-lead-title b { font-size:16px; } .agency-lead-title { gap:10px; } .al-co { color:var(--muted); font-size:13px; margin-top:1px; }
.agency-lead .agency-lead-meta { font-size:12.5px; margin-top:4px; gap:6px; } .agency-lead .agency-lead-meta a { text-decoration:underline; text-underline-offset:2px; text-decoration-color:var(--line); }
.agency-lead-value { min-width:0; text-align:right; } .agency-lead-value b { font-size:19px; font-weight:600; letter-spacing:-.01em; } .agency-lead-value small { font-size:11.5px; } .agency-lead-value span { font-size:11.5px; color:var(--muted); }
.agency-lead .agency-chips { margin-top:0; } .agency-lead .agency-chip { font-size:12px; padding:3px 10px; } .agency-lead .agency-excerpt { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.al-foot { display:flex; justify-content:space-between; align-items:center; gap:10px 16px; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--line); }
.al-status { position:relative; display:inline-flex; align-items:center; } .al-status select { width:auto; min-width:128px; padding-left:28px; border-radius:99px; font-weight:500; } .al-dot { position:absolute; left:11px; width:9px; height:9px; border-radius:50%; background:#9a9a94; pointer-events:none; }
.st-new .al-dot { background:#2f5bea; } .st-contacted .al-dot { background:#d98a00; } .st-proposal .al-dot { background:#7c3aed; } .st-won .al-dot { background:#1f9d55; } .st-lost .al-dot { background:#b3261e; }
.al-actions { display:flex; gap:8px; flex-wrap:wrap; margin-left:auto; } .agency-lead .al-actions .outline-btn, .agency-lead .al-actions .ink-btn { min-height:34px; padding:0 14px; font-size:13px; }
@media (max-width:700px) { .al-top { grid-template-columns:auto minmax(0,1fr); } .agency-lead-value { grid-column:1 / -1; text-align:left; display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; } .al-actions { margin-left:0; width:100%; } }

/* Formatting toolbar above proposal text boxes */
.pp-fmt { margin-bottom:-4px; display:flex; flex-wrap:wrap; gap:2px; padding:3px; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; background:var(--panel, var(--bg)); }
.pp-fmt button { min-width:28px; height:26px; padding:0 7px; border:0; border-radius:6px; background:transparent; color:var(--fg); font:13px var(--sans); cursor:pointer; }
.pp-fmt button:hover { background:var(--line); } .pp-fmt button:focus-visible { outline:2px solid var(--fg); outline-offset:1px; }
.pp-rich .pp-fmt + textarea { border-top-left-radius:0; border-top-right-radius:0; }

/* Admin: the same window controls, and the mailbox's pane, divider, stars and bulk actions */
#admin-main.p-fs { position:fixed; inset:0; z-index:150; background:var(--bg); overflow:auto; padding:18px clamp(14px,2.5vw,32px) 14px; max-width:none; }
#admin-main .win-slot { margin-bottom:10px; }
.v-fs .settings-in, html.pop-window .settings-in { max-width:none; }
html.pop-only #view-admin .projects-title, html.pop-only #admin-nav, html.pop-only #view-admin > .topbar { display:none; } html.pop-only #view-admin .settings-layout { grid-template-columns:minmax(0,1fr); }
.mb-head .agency-actions { flex-wrap:wrap; justify-content:flex-end; }
html.pop-window [data-mb="popthread"], html.win-full [data-mb="popthread"] { display:none; }

/* Projects: "Recently deleted" sits on its own at the right of the filter row */
.trash-filter { display:inline-flex; align-items:center; gap:6px; height:34.5px; padding:0 12px; border:1px solid var(--line); border-radius:8.5px; background:var(--card); color:var(--muted); font:12px var(--sans); cursor:pointer; white-space:nowrap; }
.trash-filter .i { width:14px; height:14px; }
.trash-filter:hover { color:var(--fg); border-color:var(--muted); }
.trash-filter[aria-pressed="true"] { color:var(--fg); border-color:var(--fg); background:var(--soft); }
@media (max-width: 700px) { .trash-filter { margin-left:auto; } }
.filters .search-field { width:auto; flex:0 1 275px; min-width:150px; }
@media (max-width: 700px) { .filters .search-field { flex:1 1 100%; } }
@media (min-width: 901px) { #view-projects .filters { flex-wrap:nowrap; } #view-projects .filters .seg, #view-projects .filters .project-scope, #view-projects .trash-filter { flex-shrink:0; } }
@media (max-width: 700px) { #view-projects .filters .search-field { order:2; } }

/* refresh buttons: the arrow spins while loading, then a short tick */
.rf-ico { display:inline-block; line-height:1; transform-origin:50% 55%; }
.rf-spin .rf-ico { animation:rf-turn .8s linear infinite; }
.rf-spin { cursor:progress; }
.rf-done .rf-ico { animation:rf-pop .9s ease; }
@keyframes rf-turn { to { transform:rotate(360deg); } }
@keyframes rf-pop { 0% { transform:scale(1); } 30% { transform:scale(1.35); color:var(--ok, #2e7d32); } 100% { transform:scale(1); } }
@media (prefers-reduced-motion: reduce) { .rf-spin .rf-ico { animation:none; opacity:.45; } .rf-done .rf-ico { animation:none; } }

/* Admin integrations: a dot for connected (green) or not (red), and cards or groups minimised to just their name */
.link-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:8px; vertical-align:middle; position:relative; top:-1px; flex:none; }
.link-dot.on { background:#2e9e4f; box-shadow:0 0 0 3px rgba(46,158,79,.16); } .link-dot.off { background:#d23b2f; box-shadow:0 0 0 3px rgba(210,59,47,.14); }
.int-grid .card-box > .card-min { position:absolute; top:12px; right:44px; }
.card-min { width:28px; height:28px; display:grid; place-items:center; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); font:16px/1 var(--sans); cursor:pointer; padding:0; }
.card-min:hover, .card-min:focus-visible { background:var(--soft); border-color:var(--line); color:var(--fg); }
.int-grid .card-box.min { max-height:none; padding-bottom:14px; }
.int-grid .card-box.min > :not(.cb-title):not(.grip):not(.card-min) { display:none !important; }
.int-grid .card-box.min::after { display:none; }
.int-grid .card-box.min .cb-title { margin-bottom:0; padding-right:80px; }
.int-cat-head .card-min { margin-left:auto; }
.int-cat.min > .int-grid { display:none; } .int-cat.min .int-cat-head { border-bottom-style:dashed; }

/* the address bar above a server app's preview */
.rt-addr { flex:1; min-width:150px; display:flex; align-items:center; gap:6px; height:34.5px; border-radius:8.5px; background:var(--soft); padding:0 12px; border:1px solid transparent; }
.rt-addr:focus-within { border-color:var(--line); background:var(--card); }
.rt-addr-pre { font-size:11px; opacity:.55; }
.rt-addr input { flex:1; min-width:0; border:0; outline:0; background:transparent; font:13px ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--fg); }
.pv-bar .rt-addr:not([hidden]) ~ .route-wrap { flex:0 1 190px; min-width:120px; }

/* the Brief / Sitemap / Preview / Code switch sits in the preview's own top row, on the right of its tabs */
.rhead { display:flex; align-items:center; gap:10px; flex:none; min-width:0; }
.rhead .rtabs { flex:1 1 auto; min-width:0; }
.rhead .view-switch { margin:8px 12px 0 auto; }
.rhead .view-switch button { height:28px; }
/* the switch sits in the middle of the row; when the tabs on the left need more room, it moves right */
.rhead .rtabs { flex:0 1 auto; min-width:0; }
.rhead::after { content:""; flex:1 1 0; min-width:0; }
.rhead .view-switch { margin:8px 0 0; }

/* Recently deleted cards: the two buttons share the card's width and never run past its edge */
.trash-btns { display:flex; flex-wrap:wrap; gap:8px; padding:0 14px 14px; } .trash-btns > button { flex:1 1 0; min-width:0; justify-content:center; white-space:nowrap; }
.trash-btns .danger-sure { color:#b3261e; border-color:#b3261e; }
/* tool tabs (Database, Storage, Domains ...) sit in the middle of the pane, not against its left edge */
.rtool:not(#rtool-new):not(.rshell) > * { margin-left:auto; margin-right:auto; }

/* Database tab: Tables (look at and change rows), SQL, Connection */
.dbd-modes { display:inline-flex; margin:4px 0 16px; }
.dbd-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin:0 0 14px; }
.dbd-tables { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 16px; }
.dbd-chip { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:99px; padding:6px 12px; font:13px ui-monospace, SFMono-Regular, Menlo, monospace; cursor:pointer; }
.dbd-chip small { color:var(--muted); font:11px var(--sans); } .dbd-chip:hover { border-color:var(--muted); } .dbd-chip.on { background:var(--fg); color:var(--bg); border-color:var(--fg); } .dbd-chip.on small { color:inherit; opacity:.7; }
.dbd-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; } .dbd-head b { font:600 15px ui-monospace, SFMono-Regular, Menlo, monospace; } .dbd-head small { margin-left:10px; color:var(--muted); font-size:12.5px; }
.dbd-grid-wrap { overflow:auto; max-height:min(60vh, 560px); border:1px solid var(--line); border-radius:12px; background:var(--card); margin:0 0 10px; }
.dbd-grid { width:100%; border-collapse:collapse; font:12.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.dbd-grid th { position:sticky; top:0; background:var(--soft); text-align:left; font-weight:600; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; z-index:1; }
.dbd-grid td { padding:7px 10px; border-bottom:1px solid var(--line); vertical-align:top; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dbd-grid tr:last-child td { border-bottom:0; } .dbd-grid tr.on td { background:color-mix(in srgb, var(--fg) 6%, transparent); } .dbd-grid tbody tr:hover td { background:var(--soft); }
.dbd-act { position:sticky; right:0; background:var(--card); text-align:right; white-space:nowrap; } th.dbd-act { background:var(--soft); } .dbd-act .link-btn { margin-left:10px; font:12.5px var(--sans); } .dbd-del { color:#b3261e; }
.dbd-null { color:var(--faint, var(--muted)); } .dbd-empty { text-align:center; color:var(--muted); padding:22px !important; font-family:var(--sans); }
.dbd-form { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:14px 16px; margin:0 0 12px; } .dbd-form h4 { margin:0 0 10px; font-size:14px; }
.dbd-fields { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:10px 14px; }
.dbd-field { display:grid; gap:4px; font-size:12.5px; } .dbd-field span { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; } .dbd-field small { color:var(--muted); font-family:var(--sans); }
.dbd-field input, .dbd-sql textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:var(--bg); color:var(--fg); font:13px ui-monospace, SFMono-Regular, Menlo, monospace; }
.dbd-form-btns { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0 12px; } .dbd-file { cursor:pointer; }
.dbd-pager { display:flex; align-items:center; justify-content:center; gap:14px; font-size:13px; color:var(--muted); margin:6px 0 20px; }
.dbd-sql { display:block; } .dbd-sql textarea { resize:vertical; min-height:140px; line-height:1.5; }
.dbd-err { white-space:pre-wrap; color:#b3261e; background:color-mix(in srgb, #b3261e 7%, transparent); border-radius:10px; padding:10px 12px; font-size:12.5px; }
.dbv .dbv-head { margin-top:6px; }
.pp-pv-seg { display:inline-flex; margin:0 auto 0 12px; } .pp-pv-seg button { padding:4px 10px; font-size:12px; } .pp-pv-note { margin:0 auto 0 12px; font-size:12px; color:var(--muted); }
.pp-pricenote { font-size:12px; color:var(--muted); margin:-4px 0 10px; } .pp-pricenote:empty { display:none; } .pp-pricenote .link-btn { font-size:12px; }
.pp-lock { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; } .pp-lock .ink-btn { white-space:nowrap; } .pp-lock-ok { font-size:13px; color:var(--fg); white-space:nowrap; } .pp-lock-ok .link-btn { margin-left:6px; }
.agency-tabs [data-agency-tab] { cursor:pointer; } .agency-tabs [data-agency-tab].dragging { opacity:.4; } .agency-tabs [data-agency-tab]:active { cursor:grabbing; }
.pref-agency { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; }
