/* ==========================================================================
   Frost HQ — design system
   Graphite + copper. Quiet surfaces, one warm accent, serif for numbers/titles.
   ========================================================================== */

:root {
  --bg: #09090a;
  --bg-2: #0d0d0f;
  --panel: #131316;
  --panel-2: #18181c;
  --raised: #1e1e23;
  --line: #25252b;
  --line-2: #32323a;

  --text: #eeeae4;
  --text-2: #b6b1a9;
  --muted: #86827c;
  --faint: #5c5955;

  --copper: #d08a52;
  --copper-hi: #e9aa78;
  --copper-lo: #9c5a2c;
  --copper-soft: rgba(208, 138, 82, .12);
  --copper-glow: rgba(208, 138, 82, .22);

  --ok: #86b592;
  --warn: #d8a653;
  --bad: #d77b6a;
  --info: #93a6bb;

  --r: 14px;
  --r-sm: 9px;
  --r-lg: 20px;

  --ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --side: 252px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
body::before { /* soft copper horizon behind everything */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 420px at 88% -8%, rgba(208, 138, 82, .10), transparent 70%),
    radial-gradient(700px 500px at -5% 110%, rgba(147, 166, 187, .05), transparent 70%);
}
::selection { background: rgba(208, 138, 82, .35); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 15px; height: 15px; }

:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 6px; }

/* ---------- app shell ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 26px 16px 18px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 19, 22, .92), rgba(11, 11, 13, .92));
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: #111113; border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 6px 20px -8px rgba(208, 138, 82, .5);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font: 500 21px/1 var(--display); letter-spacing: .01em; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; position: relative;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--copper-soft); color: var(--copper-hi); }
.nav a.active::before { content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--copper); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 99px; }
.nav a.active .count { color: var(--copper-hi); border-color: rgba(208, 138, 82, .3); background: transparent; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.kbd-hint {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); text-align: left;
  transition: border-color .2s, color .2s;
}
.kbd-hint:hover { border-color: var(--line-2); color: var(--text-2); }
.kbd-hint kbd, kbd { margin-left: auto; font: 500 11px var(--ui); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); }
.store-state { display: flex; align-items: center; gap: 9px; padding: 0 12px; font-size: 12px; color: var(--muted); }
.store-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(134, 181, 146, .15); }
.store-state.warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(216, 166, 83, .18); }

.main { min-width: 0; }
.topbar, .bottomnav { display: none; }
.page { max-width: 1240px; margin: 0 auto; padding: 38px 44px 90px; }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); font-weight: 500; margin-bottom: 10px; }
.display { font: 500 40px/1.08 var(--display); letter-spacing: -.01em; }
.display em { font-style: italic; color: var(--copper-hi); }
.lede { color: var(--text-2); margin-top: 10px; max-width: 60ch; font-size: 15.5px; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-weight: 500; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { background: var(--raised); border-color: #3d3d46; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #dc9a62, #bd7236); color: #1b1108; border-color: #e0a06a; font-weight: 600;
  box-shadow: 0 8px 24px -10px rgba(208, 138, 82, .75), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn.primary:hover { background: linear-gradient(180deg, #e6a771, #c6793c); box-shadow: 0 10px 30px -10px rgba(208, 138, 82, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: rgba(215, 123, 106, .5); background: rgba(215, 123, 106, .08); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); transition: all .2s; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.link-btn { background: none; border: 0; padding: 0; color: var(--copper-hi); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- entrance motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  text-align: left; padding: 20px 22px 18px; border-radius: var(--r); background: var(--panel);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .25s, background .25s;
}
.stat::after { content: ''; position: absolute; inset: 0; background: radial-gradient(240px 120px at 100% 0, var(--copper-soft), transparent 70%); opacity: 0; transition: opacity .3s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-2); }
.stat:hover::after { opacity: 1; }
.stat .lbl { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.stat .num { font: 500 46px/1 var(--display); letter-spacing: -.02em; margin-top: 8px; }
.stat .cap { font-size: 12.5px; color: var(--muted); }
.stat.hot { border-color: rgba(208, 138, 82, .38); background: linear-gradient(180deg, rgba(208, 138, 82, .08), var(--panel) 60%); }
.stat.hot .num { color: var(--copper-hi); }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font: 500 21px/1.2 var(--display); }
.panel-head .muted { font-size: 12.5px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.col { min-width: 0; }
.col > .panel + .panel { margin-top: 18px; }

/* ---------- rows ---------- */
.row { display: flex; align-items: center; gap: 14px; padding: 12px 10px; margin: 0 -10px; border-radius: 11px; cursor: pointer; transition: background .2s; }
.row + .row { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.row:hover { background: var(--panel-2); }
.row:hover + .row, .row:hover { border-color: transparent; }
.row-main { min-width: 0; flex: 1; }
.row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-act { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; transition: color .2s, transform .2s; }
.row:hover .row-act { color: var(--copper-hi); transform: translateX(2px); }
.attn .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--info); }
.attn.copper .dot { background: var(--copper); box-shadow: 0 0 0 4px var(--copper-soft); }
.attn.amber .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(216, 166, 83, .12); }
.attn.red .dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(215, 123, 106, .13); }
.empty-inline { display: flex; align-items: center; gap: 12px; color: var(--text-2); padding: 14px 4px 6px; }
.empty-inline .ic { color: var(--ok); }
.empty-inline.plain .ic { color: var(--muted); }

/* ---------- stage pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text-2); background: var(--bg-2); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.st-new i { background: #8c9097; }
.st-planning i { background: var(--info); }
.st-development i { background: var(--copper); }
.st-review { color: #e2c37b; border-color: rgba(216, 166, 83, .3); }
.st-review i { background: var(--warn); }
.st-approval { color: var(--copper-hi); border-color: rgba(208, 138, 82, .38); background: var(--copper-soft); }
.st-approval i { background: var(--copper-hi); box-shadow: 0 0 8px var(--copper); }
.st-live { color: #a9d0b3; border-color: rgba(134, 181, 146, .3); }
.st-live i { background: var(--ok); }
.st-maintenance { color: #a3c4c4; border-color: rgba(125, 170, 170, .28); }
.st-maintenance i { background: #7daaaa; }
.st-active { color: var(--copper-hi); border-color: rgba(208, 138, 82, .3); }
.st-active i { background: var(--copper); }
.st-paused { color: #d9c08a; border-color: rgba(216, 166, 83, .28); }
.st-paused i { background: var(--warn); }
.st-done { color: #a9d0b3; border-color: rgba(134, 181, 146, .3); }
.st-done i { background: var(--ok); }

/* ---------- avatars ---------- */
.avatar {
  position: relative; width: 46px; height: 46px; border-radius: 13px; flex: none; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(145deg, #25252b, #17171a); border: 1px solid var(--line-2);
  font: 500 17px var(--display); color: var(--copper-hi); letter-spacing: .02em;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #f2efea; padding: 5px; }
.avatar.sm { width: 38px; height: 38px; border-radius: 11px; font-size: 14px; }
.avatar.lg { width: 76px; height: 76px; border-radius: 20px; font-size: 28px; }

/* ---------- quick-action buttons ---------- */
.qas { display: flex; gap: 6px; flex: none; }
.qa {
  position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text-2); transition: all .2s var(--ease);
}
.qa:hover { color: #1b1108; background: var(--copper-hi); border-color: var(--copper-hi); transform: translateY(-2px); box-shadow: 0 8px 18px -8px var(--copper); }
.qa.off { color: var(--faint); border-style: dashed; background: transparent; }
.qa.off:hover { color: var(--copper-hi); background: var(--copper-soft); border-color: rgba(208, 138, 82, .5); box-shadow: none; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  background: #000; color: var(--text); border: 1px solid var(--line-2); padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: all .18s var(--ease); z-index: 30;
}
[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- pipeline ---------- */
.pipe { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pipe-col { padding: 14px 14px 16px; min-height: 124px; border-left: 1px solid var(--line); background: var(--bg-2); position: relative; }
.pipe-col:first-child { border-left: 0; }
.pipe-col.gate { border-left: 1px solid rgba(208, 138, 82, .45); background: linear-gradient(90deg, rgba(208, 138, 82, .07), transparent 45%), var(--bg-2); }
.pipe-col.gate::before { content: 'OWNER SIGN-OFF'; position: absolute; top: -1px; left: -1px; font-size: 8.5px; letter-spacing: .12em; color: var(--copper); background: var(--bg); padding: 1px 6px 2px; border: 1px solid rgba(208, 138, 82, .45); border-radius: 0 0 6px 0; display: none; }
.pipe-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.pipe-h b { font: 500 22px/1 var(--display); color: var(--text-2); letter-spacing: 0; }
.pipe-col.has .pipe-h b { color: var(--copper-hi); }
.pipe-body { display: flex; flex-direction: column; gap: 6px; }
.chip { text-align: left; font-size: 12.5px; padding: 5px 9px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: all .2s; }
.chip:hover { border-color: rgba(208, 138, 82, .5); color: var(--copper-hi); }
.pipe-more { font-size: 12px; color: var(--muted); padding: 2px 4px; }

/* ---------- toolbar (clients page) ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.search { position: relative; flex: 1 1 260px; min-width: 200px; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 13px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px var(--copper-soft); background: #0c0c0e; }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(215, 123, 106, .12); }
select { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386827c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
select option, select optgroup { background: #141416; color: var(--text); }
.toolbar select { width: auto; min-width: 170px; }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.seg button { border: 0; background: transparent; color: var(--muted); width: 38px; height: 38px; display: grid; place-items: center; transition: all .2s; }
.seg button.on { background: var(--raised); color: var(--copper-hi); }
.result-count { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px 2px; }

/* ---------- client cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.client-card {
  display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line);
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .25s, box-shadow .35s;
}
.client-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--copper), transparent); opacity: 0; transition: opacity .3s; }
.client-card:hover { transform: translateY(-3px); border-color: #3a3a43; box-shadow: 0 24px 40px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(208, 138, 82, .08); }
.client-card:hover::before { opacity: 1; }
.client-card.archived { opacity: .62; }
.cc-top { display: flex; align-items: center; gap: 14px; }
.cc-id { min-width: 0; flex: 1; }
.cc-id h3 { font: 500 20px/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-id p { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-status { color: var(--text-2); font-size: 13.5px; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.segbar { display: flex; gap: 4px; }
.segbar i { flex: 1; height: 3px; border-radius: 3px; background: var(--line-2); transition: background .3s; }
.segbar i.done { background: rgba(208, 138, 82, .45); }
.segbar i.now { background: var(--copper-hi); box-shadow: 0 0 10px rgba(208, 138, 82, .6); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-meta { font-size: 12px; color: var(--faint); }

/* ---------- list view ---------- */
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lrow { display: grid; grid-template-columns: 38px minmax(160px, 1.1fr) 170px minmax(0, 1.4fr) auto 60px; gap: 16px; align-items: center; padding: 13px 20px; cursor: pointer; transition: background .2s; }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow:hover { background: var(--panel-2); }
.lrow .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .name small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.lrow .status { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .links { font-size: 12px; color: var(--faint); text-align: right; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--text-2); }
.empty .ic { width: 34px; height: 34px; color: var(--copper); margin-bottom: 14px; }
.empty h3 { font: 500 24px var(--display); margin-bottom: 8px; color: var(--text); }
.empty p { max-width: 44ch; margin: 0 auto 20px; color: var(--muted); }

/* ---------- client detail ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 22px; font-size: 13.5px; transition: color .2s, transform .2s; }
.back:hover { color: var(--copper-hi); transform: translateX(-2px); }
.c-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 26px; }
.c-head .who { flex: 1; min-width: 240px; }
.c-head h1 { font: 500 38px/1.08 var(--display); letter-spacing: -.01em; }
.c-head .meta { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-2); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 11px; background: rgba(216, 166, 83, .08); border: 1px solid rgba(216, 166, 83, .28); color: #e2c37b; margin-bottom: 20px; }
.banner .btn { margin-left: auto; }
.banner.warn { background: rgba(216, 166, 83, .08); }

.stepper { display: flex; align-items: center; padding: 6px 0 2px; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { display: flex; flex-direction: column; align-items: center; gap: 9px; background: none; border: 0; padding: 4px 6px; min-width: 76px; color: var(--muted); transition: color .2s; }
.step .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1.5px solid var(--line-2); background: var(--bg-2); transition: all .3s var(--ease); }
.step .lab { font-size: 12px; font-weight: 500; text-align: center; line-height: 1.25; }
.step:hover { color: var(--text); }
.step:hover .dot { border-color: var(--copper); }
.step.done { color: var(--text-2); }
.step.done .dot { background: rgba(208, 138, 82, .18); border-color: rgba(208, 138, 82, .55); color: var(--copper-hi); }
.step.now { color: var(--copper-hi); }
.step.now .dot { background: linear-gradient(180deg, #e0a36c, #c07839); border-color: #e9aa78; color: #1b1108; box-shadow: 0 0 0 5px var(--copper-soft), 0 8px 20px -6px var(--copper); }
.conn { flex: 1; min-width: 14px; height: 2px; margin-bottom: 24px; background: var(--line-2); border-radius: 2px; }
.conn.done { background: linear-gradient(90deg, rgba(208, 138, 82, .55), rgba(208, 138, 82, .55)); }
.gate-node { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 4px 6px; min-width: 74px; }
.gate-node .dia { width: 30px; height: 30px; transform: rotate(45deg); border-radius: 8px; border: 1.5px solid rgba(208, 138, 82, .55); background: var(--bg-2); display: grid; place-items: center; color: var(--copper); }
.gate-node .dia .ic { transform: rotate(-45deg); width: 14px; height: 14px; }
.gate-node.ok .dia { background: var(--copper); border-color: var(--copper-hi); color: #1b1108; box-shadow: 0 0 0 5px var(--copper-soft); }
.gate-node .lab { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--copper); text-align: center; line-height: 1.2; }

.checkpoint { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px; margin-top: 22px; border: 1px solid rgba(208, 138, 82, .3); background: linear-gradient(90deg, rgba(208, 138, 82, .09), transparent 70%); }
.checkpoint.quiet { border-color: var(--line); background: var(--bg-2); }
.checkpoint .gate-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--copper-soft); color: var(--copper-hi); border: 1px solid rgba(208, 138, 82, .35); }
.checkpoint.quiet .gate-badge { background: var(--panel-2); color: var(--muted); border-color: var(--line-2); }
.checkpoint h4 { font-weight: 600; font-size: 14.5px; }
.checkpoint p { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.checkpoint .btn { margin-left: auto; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tile {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2);
  min-width: 0; text-align: left; transition: all .25s var(--ease); position: relative;
}
.tile .ti { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--copper-hi); flex: none; transition: all .25s; }
.tile .tt { min-width: 0; flex: 1; }
.tile .tt b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tt small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .go { color: var(--faint); transition: all .25s; }
a.tile:hover { border-color: rgba(208, 138, 82, .55); transform: translateY(-2px); background: #17130f; box-shadow: 0 14px 26px -18px var(--copper); }
a.tile:hover .ti { background: var(--copper-hi); color: #1b1108; }
a.tile:hover .go { color: var(--copper-hi); transform: translate(2px, -2px); }
.tile.empty-tile { border-style: dashed; background: transparent; }
.tile.empty-tile .ti { background: transparent; color: var(--faint); border: 1px dashed var(--line-2); }
.tile.empty-tile .tt b { color: var(--muted); }
.tile.empty-tile:hover { border-color: rgba(208, 138, 82, .5); background: var(--copper-soft); }
.tile.empty-tile:hover .ti { color: var(--copper-hi); border-color: rgba(208, 138, 82, .5); }

.status-line { font: 500 19px/1.4 var(--display); color: var(--text); }
.status-line.none { color: var(--muted); font-style: italic; font-family: var(--ui); font-size: 14px; }
.notes-wrap { position: relative; }
.notes-state { position: absolute; right: 12px; bottom: 10px; font-size: 11.5px; color: var(--faint); transition: color .2s; pointer-events: none; }
.notes-state.saved { color: var(--ok); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.dates { display: flex; flex-direction: column; }
.drow { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.drow + .drow { border-top: 1px solid var(--line); }
.drow .lbl { flex: 1; min-width: 0; }
.drow .lbl b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow .lbl small { color: var(--muted); font-size: 12px; }
.drow.done .lbl b { text-decoration: line-through; color: var(--muted); }
.drow .when { font-size: 12.5px; color: var(--text-2); text-align: right; white-space: nowrap; }
.drow .when.late { color: var(--bad); }
.drow .when.soon { color: var(--warn); }
.tick { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--bg-2); display: grid; place-items: center; color: transparent; padding: 0; flex: none; transition: all .2s; }
.tick:hover { border-color: var(--copper); }
.tick.on { background: var(--copper); border-color: var(--copper); color: #1b1108; }
.tick .ic { width: 13px; height: 13px; }
.add-date { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.add-date input[type="text"] { grid-column: 1 / -1; order: -1; }
.add-date input, .add-date select { padding: 9px 11px; font-size: 13.5px; }
.add-date select { padding-right: 30px; }
.add-note { display: flex; gap: 8px; margin-bottom: 14px; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.feed-item + .feed-item { border-top: 1px solid var(--line); }
.feed-item .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); margin-top: 7px; flex: none; opacity: .8; }
.feed-item .tx { font-size: 13.5px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.feed-item .tx small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }

/* ---------- backup page ---------- */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack > .panel + .panel { margin-top: 0; }
.kv { display: flex; gap: 10px; align-items: baseline; margin-top: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.kv code, code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; color: var(--copper-hi); overflow-wrap: anywhere; }
.callout { padding: 14px 16px; border-radius: 11px; background: rgba(216, 166, 83, .08); border: 1px solid rgba(216, 166, 83, .3); color: #e4c88a; font-size: 13.5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.snap { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 11px 0; }
.snap + .snap { border-top: 1px solid var(--line); }
.snap b { font-weight: 500; }
.snap small { display: block; color: var(--muted); font-size: 12px; }
.snap .acts { display: flex; gap: 8px; }
.road { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.road div { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--text-2); font-size: 13.5px; }
.road div span { margin-left: auto; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }

/* ---------- modal ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(4, 4, 5, .72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .25s ease both; overflow-y: auto; }
.backdrop.top { align-items: start; padding-top: 12vh; }
.modal { width: 100%; max-width: 480px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(255, 255, 255, .02) inset; animation: pop .35s var(--ease) both; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal.wide { max-width: 760px; }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 8px; gap: 12px; }
.m-head h2 { font: 500 26px var(--display); }
.m-body { padding: 8px 26px 6px; overflow-y: auto; }
.m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 18px 26px 22px; border-top: 1px solid var(--line); margin-top: 10px; }
.m-foot .form-err { margin-right: auto; color: var(--bad); font-size: 13px; }
.m-plain { padding: 26px; }
.m-plain h2 { font: 500 24px var(--display); margin-bottom: 10px; }
.m-plain p { color: var(--text-2); }
.m-plain .btn-row { justify-content: flex-end; margin-top: 22px; }
.f-sec { padding: 14px 0 6px; }
.f-sec + .f-sec { border-top: 1px solid var(--line); margin-top: 10px; }
.f-sec h3 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); font-weight: 500; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field label .opt { color: var(--faint); font-weight: 400; }
.logo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.logo-row .l-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.logo-row .l-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.extra-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; margin-top: 8px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .2s, background .2s; color: var(--text-2); font-size: 13.5px; }
.check + .check { margin-top: 8px; }
.check:hover { border-color: rgba(208, 138, 82, .45); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--copper); flex: none; padding: 0; }
.check:has(input:checked) { border-color: rgba(208, 138, 82, .55); background: var(--copper-soft); color: var(--text); }
.approve-box { margin-top: 14px; }
.gate-head { display: flex; align-items: center; gap: 14px; padding: 24px 26px 4px; }
.gate-head .gate-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--copper-soft); color: var(--copper-hi); border: 1px solid rgba(208, 138, 82, .4); flex: none; }
.gate-head h2 { font: 500 24px var(--display); }
.gate-body { padding: 6px 26px 4px; color: var(--text-2); }
.gate-body > p { margin: 10px 0 16px; }

/* ---------- command palette ---------- */
.palette { max-width: 620px; padding: 0; overflow: hidden; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); color: var(--muted); }
.pal-input input { border: 0; background: transparent; padding: 0; font-size: 16px; box-shadow: none !important; }
.pal-list { padding: 8px; max-height: 52vh; overflow-y: auto; }
.pal-group { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.pal-item.sel, .pal-item:hover { background: var(--panel-2); }
.pal-item.sel { box-shadow: inset 2px 0 0 var(--copper); }
.pal-item .pi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); color: var(--copper-hi); flex: none; }
.pal-item .pt { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: #19191d; border: 1px solid var(--line-2); box-shadow: 0 18px 40px -16px #000; font-size: 13.5px; animation: pop .35s var(--ease) both; }
.toast .ic { color: var(--ok); }
.toast.error .ic { color: var(--bad); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all .3s; }

/* ---------- loading ---------- */
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; grid-column: 1 / -1; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --side: 78px; }
  .nav-group { display: none; }
  .brand-text, .nav a span.t, .nav .count, .kbd-hint span, .kbd-hint kbd, .store-state span { display: none; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav a { justify-content: center; padding: 12px; }
  .nav a.active::before { left: -16px; }
  .kbd-hint { justify-content: center; padding: 11px; }
  .store-state { justify-content: center; padding: 0; }
  .page { padding: 32px 30px 90px; }
  .cols, .detail-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lrow { grid-template-columns: 38px minmax(140px, 1fr) 160px auto; }
  .lrow .status, .lrow .links { display: none; }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; padding: 12px 18px;
    background: rgba(9, 9, 10, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; }
  .topbar .brand-mark { width: 32px; height: 32px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(3, 1fr) ; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(13, 13, 15, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; font-size: 11px; color: var(--muted); border-radius: 10px; }
  .bottomnav a.active, .bottomnav button.active { color: var(--copper-hi); }
  .bottomnav button { background: transparent; border: 0; }
  .page { padding: 22px 18px 110px; }
  .display { font-size: 31px; }
  .c-head h1 { font-size: 30px; }
  .page-head { margin-bottom: 22px; }
  .stat .num { font-size: 38px; }
  .stat { padding: 16px 16px 14px; }
  .panel { padding: 18px; }
  .topbar .brand-text { display: block; }
  .pipe { grid-template-columns: repeat(var(--cols, 7), 150px); width: max-content; }
  .pipe-wrap { overflow-x: auto; margin: 0 -2px; padding-bottom: 4px; }
  .grid-cards { grid-template-columns: 1fr; }
  .toolbar select { flex: 1 1 140px; min-width: 0; }
  .lrow { grid-template-columns: 38px 1fr auto; }
  .lrow .pillcell { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .add-date { grid-template-columns: 1fr 1fr; }
  .add-date input[type="text"] { grid-column: 1 / -1; }
  .road { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .checkpoint { flex-wrap: wrap; }
  .checkpoint .btn { margin-left: 0; width: 100%; }
  .modal, .modal.wide { max-height: calc(100vh - 24px); }
  .backdrop { padding: 12px; }
  .m-head, .m-body, .m-foot, .m-plain, .gate-head, .gate-body { padding-left: 18px; padding-right: 18px; }
  .extra-row { grid-template-columns: 1fr auto; }
  .extra-row input:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .qa { width: 36px; height: 36px; }
  [data-tip]::after { display: none; }
  #toasts { bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}


/* ==========================================================================
   Phase 2 — brands, Asana, settings (same tokens, no new visual language)
   ========================================================================== */

.mono { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none; font: 500 13px var(--display); letter-spacing: .02em; color: var(--copper-hi); background: var(--copper-soft); border: 1px solid rgba(208, 138, 82, .28); }
.mono.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
.mono.xl { width: 76px; height: 76px; border-radius: 20px; font-size: 28px; }
.mono.nav-mono { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.nav a.active .nav-mono { background: rgba(208, 138, 82, .22); }
.nav-group { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.nav a { gap: 12px; }

.brandbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.bchip { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 7px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); color: var(--text-2); font-size: 13.5px; transition: all .2s; }
.bchip:first-child { padding-left: 14px; }
.bchip .mono { width: 24px; height: 24px; border-radius: 50%; font-size: 10.5px; }
.bchip:hover { border-color: rgba(208, 138, 82, .5); color: var(--text); }
.bchip.on { background: var(--copper-soft); border-color: rgba(208, 138, 82, .5); color: var(--copper-hi); }

.sect-label { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); margin: 4px 0 12px; }
.brand-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-bottom: 26px; }
.brand-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; position: relative; overflow: hidden; text-align: left; }
.brand-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--copper), transparent); opacity: 0; transition: opacity .3s; }
.brand-card:hover { transform: translateY(-3px); border-color: #3a3a43; box-shadow: 0 18px 40px -22px #000; }
.brand-card:hover::before { opacity: 1; }
.bc-top { display: flex; align-items: center; gap: 14px; }
.bc-id { min-width: 0; flex: 1; }
.bc-id h3 { font: 500 21px/1.15 var(--display); }
.bc-id p { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-card .go { color: var(--faint); transition: all .25s; }
.brand-card:hover .go { color: var(--copper-hi); transform: translateX(2px); }
.bc-facts { display: flex; gap: 22px; flex-wrap: wrap; }
.bc-facts div { display: flex; flex-direction: column; }
.bc-facts b { font: 500 28px/1 var(--display); letter-spacing: -.01em; }
.bc-facts span { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.bc-facts .hot b { color: var(--copper-hi); }
.bc-facts .bad b { color: var(--bad); }
.bc-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 12px; min-height: 40px; }
.bc-foot .ic { color: var(--muted); }
.bc-foot b { font-weight: 500; }
.brand-card.add { align-items: center; justify-content: center; border-style: dashed; background: transparent; color: var(--muted); min-height: 150px; font-size: 14px; }
.brand-card.add:hover { color: var(--copper-hi); border-color: rgba(208, 138, 82, .5); background: var(--copper-soft); }
.brand-card.add .ic { width: 26px; height: 26px; }

.brandtag { display: inline-block; margin-left: 8px; font-size: 11.5px; color: var(--muted); padding: 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; }
a.brandtag:hover { color: var(--copper-hi); border-color: rgba(208, 138, 82, .5); }
.tag { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.copper { color: var(--copper-hi); border-color: rgba(208, 138, 82, .4); background: var(--copper-soft); }
.tag.amber { color: #e2c37b; border-color: rgba(216, 166, 83, .3); }
.srctag { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--faint); margin-right: 8px; }
.srctag.asana { color: #c9a4a0; border-color: rgba(215, 123, 106, .3); }
.done-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(134, 181, 146, .14); color: var(--ok); flex: none; }
.row[role=link] { cursor: pointer; }

.syncbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 18px; font-size: 12.5px; color: var(--muted); }
.syncbar .ic { color: var(--ok); }
.syncbar.test { color: #e4c88a; }
.syncbar .link-btn { display: inline-flex; align-items: center; gap: 6px; }
.syncbar .link-btn[disabled] { opacity: .5; pointer-events: none; }

/* Asana task panel */
.panel-head h2 .src { font: 500 11px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-left: 8px; vertical-align: middle; }
.ph-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sync-note { font-size: 12px; color: var(--muted); }
.proj-line { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--text-2); font-size: 13.5px; }
.proj-line .ic { color: var(--copper); }
.proj-line b { font-weight: 500; color: var(--text); }
.t-group + .t-group { margin-top: 18px; }
.t-group h4, .mini { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 4px; }
.t-group h4 span { margin-left: 6px; color: var(--muted); }
.task-wrap + .task-wrap { border-top: 1px solid var(--line); }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.task-main { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.task-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-main:hover .task-name { color: var(--copper-hi); }
.task-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.done .task-name { text-decoration: line-through; color: var(--muted); }
.task .when { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.task .when.late { color: var(--bad); }
.task .when.soon { color: var(--warn); }
.task .when.none { color: var(--faint); }
.task .icon-btn { width: 30px; height: 30px; }
.t-drawer { margin: 0 0 12px 32px; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; font-size: 13.5px; }
.t-drawer h5 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 12px 0 6px; }
.t-notes { color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt { padding: 8px 0; }
.cmt + .cmt { border-top: 1px solid var(--line); }
.cmt b { font-weight: 500; }
.cmt small { margin-left: 8px; color: var(--muted); font-size: 12px; }
.cmt p { color: var(--text-2); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.t-edit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.t-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-row label { font-size: 12.5px; color: var(--text-2); min-width: 74px; font-weight: 500; }
.t-row input[type=date], .t-row select { width: auto; flex: 1 1 160px; max-width: 260px; padding: 8px 11px; font-size: 13.5px; }
.t-row.col { align-items: stretch; flex-direction: column; }
.t-row.col label { min-width: 0; }
.upd-wrap { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.upd { padding: 6px 0; }
.upd b { font-weight: 500; }
.upd small { margin-left: 8px; color: var(--muted); font-size: 12px; text-transform: capitalize; }
.upd p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

/* settings */
.asana-connect { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; max-width: 640px; }
.how { margin-top: 14px; color: var(--text-2); font-size: 13.5px; }
.how summary { cursor: pointer; color: var(--copper-hi); }
.how ol { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.form-err { color: var(--bad); font-size: 13px; }
.brow { display: flex; align-items: center; gap: 14px; padding: 12px 0; flex-wrap: wrap; }
.brow + .brow { border-top: 1px solid var(--line); }
.brow.archived { opacity: .6; }
.brow .bn { flex: 1; min-width: 180px; }
.brow .bn b { font-weight: 500; display: block; }
.brow .bn small { color: var(--muted); font-size: 12px; }
.brow .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* pickers + switcher */
.picker .proj-list, .proj-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.proj-item { text-align: left; padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.proj-item:hover { border-color: rgba(208, 138, 82, .5); background: var(--copper-soft); }
.proj-item b { font-weight: 500; }
.proj-item small { color: var(--muted); font-size: 12px; }
.switcher { max-width: 420px; }
.sw-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; margin-top: 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); text-align: left; }
.sw-item:hover { border-color: rgba(208, 138, 82, .5); }
.sw-item .swn b { display: block; font-weight: 500; }
.sw-item .swn small { color: var(--muted); font-size: 12px; }
.sw-item > .ic { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--copper-soft); color: var(--copper-hi); }
.pal-brand { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.pal-item .mono, .pal-item .pi { font: 500 12px var(--display); }
.topbrand { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); max-width: 46vw; }
.topbrand span:not(.mono) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbrand .mono { width: 22px; height: 22px; border-radius: 50%; font-size: 10px; }
.topbrand .ic { color: var(--faint); transform: rotate(90deg); }

@media (max-width: 760px) {
  .brand-cards { grid-template-columns: 1fr; }
  .bchip { font-size: 13px; }
  .brandbar { flex-wrap: nowrap; overflow-x: auto; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .brandbar::-webkit-scrollbar { display: none; }
  .bchip { flex: none; }
  .ph-right { width: 100%; justify-content: flex-start; margin-top: 8px; }
  .panel-head { flex-wrap: wrap; }
  .t-drawer { margin-left: 0; }
  .task .when { display: none; }
  .asana-connect { grid-template-columns: 1fr; }
  .brow .acts { width: 100%; }
  .t-row input[type=date], .t-row select { max-width: none; }
  .c-head .mono.xl { width: 60px; height: 60px; font-size: 22px; }
}

/* ===== Cloud edition ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-fde { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-fde .fde-side { width: 150px; height: auto; display: block; }
.brand-fde .fde-top { height: 26px; width: auto; display: block; }
.brand-name-sm { font: 500 11px var(--sans, Inter, system-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.ws-ico { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; flex: none; }
.ws-ico img { max-width: 30px; max-height: 30px; object-fit: contain; }
.medal { object-fit: contain; border-radius: 50%; flex: none; }
.medal.lg { width: 44px; height: 44px; }
.medal.xl { width: 72px; height: 72px; }
.ws-h1 { margin: 0; line-height: 1; }
.ws-word { display: block; height: 44px; width: auto; max-width: 100%; }
.ws-word-print { display: none; }
.save-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 4px 2px; }
.save-chip i { width: 8px; height: 8px; border-radius: 50%; background: #5fae7e; flex: none; }
.save-chip[data-state=saving] i { background: var(--copper-hi, #d08a52); animation: pulse 1s infinite; }
.save-chip[data-state=error] i, .save-chip[data-state=offline] i { background: #d4604f; }
.save-chip[data-state=error], .save-chip[data-state=offline] { color: #e59a8f; }
@keyframes pulse { 50% { opacity: .35; } }
.conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: #5a2a22; color: #ffe3dd; text-align: center; padding: 10px 16px; font-size: 14px; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { color: var(--copper-hi, #d08a52); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.kv .good { color: #7cc79a; } .kv .bad { color: #e59a8f; }
.first-run { max-width: 520px; margin: 12vh auto; padding: 0 24px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.first-run img { height: auto; max-width: 70%; }

/* phone: simplified executive view */
body.phone .phone-hide, body.phone .sidebar, body.phone .kbd-hint { display: none !important; }
body.phone .topbar { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
body.phone .main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body.phone .cols { display: block; }
body.phone .col { display: flex; flex-direction: column; gap: 14px; }
body.phone .row, body.phone .btn, body.phone .chip { min-height: 48px; }
body.phone .page-head h1 { font-size: 28px; }
body.phone .pipeline, body.phone .pipe-panel { display: none; }
@media print { .ws-word { display: none; } .ws-word-print { display: block; height: 40px; width: auto; } }
.bottomnav a, .bottomnav button { justify-content: flex-end; }
.bottomnav a > img, .bottomnav a > .ws-ico, .bottomnav a > .ic { height: 26px; width: auto; max-width: 44px; margin: 0 auto; object-fit: contain; }
body.phone .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
