/* The Plugix client cabinet — the approved design (plugix.ai's own language — a navy rail with the «P» (the site's dark sections), a paper work area with white
   cards and ink pill buttons (its light sections). Five sections, each answers one question the owner has. */
:root {
  --bg: #f7f7f7; --surface: #ffffff; --surface-2: #f1f1f1; --line: #e8e8e8; --line-2: #d5d5d5;
  --fg: #1a1a1a; --fg-2: #5d6068; --fg-3: #8b8e96;
  --btn: #1a1a1a; --btn-fg: #ffffff;
  --accent: #2d3c9a; --accent-soft: rgba(45, 60, 154, .08);
  --side: #101938; --side-2: #1b2550; --side-fg: #eef0fb; --side-fg-2: rgba(222, 227, 255, .68); --side-fg-3: rgba(222, 227, 255, .44); --peri: #9aa6ff;
  --ok: #1a7d43; --ok-soft: rgba(26, 125, 67, .09); --live: #3fbf7a;
  --warn: #8a5a00; --warn-soft: rgba(176, 116, 0, .1);
  --bad: #b4232f; --bad-soft: rgba(180, 35, 47, .08);
  --shadow: 0 1px 2px rgba(16, 25, 56, .05), 0 24px 70px rgba(16, 25, 56, .1);
  --font: Manrope, -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #070b1d; --surface: #0e1430; --surface-2: #151c40; --line: rgba(195, 201, 255, .1); --line-2: rgba(195, 201, 255, .18);
  --fg: #eef0fb; --fg-2: rgba(222, 227, 255, .68); --fg-3: rgba(222, 227, 255, .44);
  --btn: #ffffff; --btn-fg: #101938; --accent: #9aa6ff; --accent-soft: rgba(154, 166, 255, .12);
  --side: #05070f; --side-2: #10162f;
  --ok: #3fbf7a; --ok-soft: rgba(63, 191, 122, .12); --warn: #f0b44c; --warn-soft: rgba(240, 180, 76, .12); --bad: #ff8f9a; --bad-soft: rgba(255, 143, 154, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 70px rgba(0, 0, 0, .35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #070b1d; --surface: #0e1430; --surface-2: #151c40; --line: rgba(195, 201, 255, .1); --line-2: rgba(195, 201, 255, .18);
  --fg: #eef0fb; --fg-2: rgba(222, 227, 255, .68); --fg-3: rgba(222, 227, 255, .44);
  --btn: #ffffff; --btn-fg: #101938; --accent: #9aa6ff; --accent-soft: rgba(154, 166, 255, .12);
  --side: #05070f; --side-2: #10162f;
  --ok: #3fbf7a; --ok-soft: rgba(63, 191, 122, .12); --warn: #f0b44c; --warn-soft: rgba(240, 180, 76, .12); --bad: #ff8f9a; --bad-soft: rgba(255, 143, 154, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 70px rgba(0, 0, 0, .35); color-scheme: dark; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pm { fill: currentColor; stroke: none; }
.num { font-variant-numeric: tabular-nums; }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.muted { color: var(--fg-2); } .faint { color: var(--fg-3); }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px; background: var(--side); color: var(--side-fg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand .pm { width: 28px; height: 28px; }
.biz { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--side-2); }
.biz-l { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: #101938; font-weight: 800; flex: none; }
.biz b { display: block; font-size: 14px; line-height: 1.25; }
.biz small { display: block; font-size: 12px; color: var(--side-fg-2); line-height: 1.3; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border: 0; border-radius: 12px; background: none; color: var(--side-fg-2); font-size: 15px; font-weight: 600; text-align: left; transition: background .2s, color .2s; }
.nav button:hover { background: rgba(255, 255, 255, .05); color: var(--side-fg); }
.nav button[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.cnt { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-align: center; background: #fff; color: #101938; }
.plan { margin-top: auto; display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--side-2); font-size: 12.5px; color: var(--side-fg-2); }
.plan b { color: var(--side-fg); font-size: 13.5px; }
.meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: var(--side-fg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: flex; align-items: center; gap: 14px; padding-block: 14px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.top .sub { font-size: 13px; color: var(--fg-3); }
.demo { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--warn-soft); }
.demo label { font-size: 12px; font-weight: 700; color: var(--warn); white-space: nowrap; }
.demo select { border: 0; border-radius: 999px; padding: 6px 30px 6px 12px; background: var(--surface); font-size: 13.5px; font-weight: 600; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.content { padding-block: 24px 48px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); display: grid; gap: 20px; align-content: start; max-width: 1180px; width: 100%; }

/* ---------------------------------------------------------------- shared */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card h2 { margin: 0; font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; }
.card-h small { font-size: 12.5px; color: var(--fg-3); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; background: var(--btn); color: var(--btn-fg); white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s; }
.pill:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(16, 25, 56, .18); }
.pill .i { width: 17px; height: 17px; }
.pill.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill.ghost:hover { box-shadow: inset 0 0 0 1px var(--fg-3); }
.pill.link { background: none; color: var(--fg-2); padding-inline: 8px; }
.pill.link:hover { color: var(--fg); box-shadow: none; transform: none; }
.pill.sm { padding: 7px 14px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); } .chip.acc { background: var(--accent-soft); color: var(--accent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; display: inline-block; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid2 > * { min-width: 0; }

/* ---------------------------------------------------------------- home */
.hello h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.035em; line-height: 1.15; text-wrap: balance; }
.hello p { margin: 6px 0 0; color: var(--fg-2); max-width: 60ch; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; display: grid; gap: 2px; min-width: 0; overflow: hidden; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.kpi .d { font-size: 12.5px; font-weight: 600; color: var(--fg-3); }
.kpi .d.up { color: var(--ok); }
.kpi svg { position: absolute; right: 14px; top: 16px; width: 92px; height: 30px; }
.kpi.hot { background: var(--btn); color: var(--btn-fg); border-color: transparent; }
.kpi.hot .kicker, .kpi.hot .d { color: inherit; opacity: .72; }
.kpi.hot .pill { position: absolute; right: 14px; bottom: 14px; background: var(--btn-fg); color: var(--btn); }
.att-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 2px; border-top: 1px solid var(--line); }
.att-row:first-of-type { border-top: 0; }
.sev { width: 10px; height: 10px; border-radius: 50%; }
.sev.bad { background: var(--bad); } .sev.warn { background: var(--warn); } .sev.acc { background: var(--accent); } .sev.ok { background: var(--ok); }
.att-row b { display: block; font-size: 14.5px; line-height: 1.35; }
.att-row span { display: block; font-size: 13px; color: var(--fg-2); }
.ask { display: grid; gap: 12px; background: var(--side); color: var(--side-fg); border: 0; }
.ask h2 { color: #fff; }
.ask p { margin: 0; color: var(--side-fg-2); font-size: 13.5px; }
.ask-in { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ask-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; padding: 7px 0; }
.ask-in input::placeholder { color: var(--side-fg-3); }
.ask-in button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: #101938; display: grid; place-items: center; flex: none; }
.ask-qs { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-qs button { border: 0; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--side-fg); font-size: 12.5px; font-weight: 600; text-align: left; }
.ask-qs button:hover { background: rgba(255, 255, 255, .14); }
.ask-a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.55; }
.ask-a .pm { width: 22px; height: 22px; margin-top: 2px; color: var(--peri); }
.ask-a small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--side-fg-3); }
.week { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.week div b { display: block; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; }
.week div span { font-size: 12.5px; color: var(--fg-2); }
.week p { margin: 0 0 0 auto; font-size: 12.5px; color: var(--fg-3); max-width: 26ch; }

/* ---------------------------------------------------------------- conversations */
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; min-height: 600px; }
.inbox > * { min-width: 0; }
.list { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.filters { display: flex; gap: 6px; padding: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.filters button { border: 0; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--fg-2); white-space: nowrap; }
.filters button[aria-pressed="true"] { background: var(--btn); color: var(--btn-fg); }
.conv { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 11px; width: 100%; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.conv:hover { background: var(--surface-2); }
.conv[aria-current="true"] { background: var(--accent-soft); }
.c-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--fg-2); flex: none; }
.c-ic .i { width: 18px; height: 18px; }
.c-t { display: flex; align-items: baseline; gap: 8px; }
.c-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-t time { margin-left: auto; font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.conv p { margin: 2px 0 6px; font-size: 13px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: flex; flex-direction: column; }
.th-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.th-h b { font-size: 15px; } .th-h small { display: block; font-size: 12.5px; color: var(--fg-3); }
.th-h .chip { margin-left: auto; }
.back { display: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); place-items: center; flex: none; }
.priv { margin: 12px 18px 0; padding: 9px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.m { max-width: 78%; padding: 10px 14px; font-size: 14px; line-height: 1.5; border-radius: 18px; }
.m.u { align-self: flex-end; background: var(--surface-2); border-bottom-right-radius: 6px; }
.m.a { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.m.op { align-self: flex-end; background: var(--btn); color: var(--btn-fg); border-bottom-right-radius: 6px; }
.m small { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 11.5px; font-weight: 700; color: var(--fg-3); }
.m.op small { color: inherit; opacity: .7; }
.m small .pm { width: 13px; height: 13px; color: var(--accent); }
.sys { align-self: center; max-width: 92%; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-align: center; }
.sys.bad { color: var(--bad); background: var(--bad-soft); } .sys.ok { color: var(--ok); background: var(--ok-soft); }
.sys .i { width: 15px; height: 15px; }
.reply { display: flex; gap: 8px; align-items: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.reply textarea { flex: 1 1 220px; min-width: 0; resize: none; border: 1px solid var(--line-2); border-radius: 18px; padding: 10px 14px; background: var(--surface); min-height: 44px; outline: 0; }
.reply textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.reply-acts { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- improve */
.big { font-size: clamp(30px, 4vw, 40px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.todo { display: grid; gap: 12px; }
.task { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; }
.task > div { min-width: 0; }
.task b { display: block; font-size: 15.5px; line-height: 1.35; margin-top: 3px; }
.task span.t { display: block; font-size: 13.5px; color: var(--fg-2); margin-top: 2px; }
.task .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.task .draft { grid-column: 1 / -1; margin: 4px 0 0; width: 100%; padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; background: var(--surface-2); font-size: 14px; line-height: 1.5; resize: vertical; min-height: 48px; }
.task .draft:focus { outline: 0; border-color: var(--accent); background: var(--surface); }
.task .val { font-weight: 700; color: var(--fg); }
.k-bad { color: var(--bad); } .k-warn { color: var(--warn); } .k-acc { color: var(--accent); }
.empty { padding: 28px; text-align: center; color: var(--fg-2); }

/* ---------------------------------------------------------------- knowledge, settings */
.src { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.src-l { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--fg-2); }
.stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--fg-2); }
.stats b { display: block; font-size: 19px; color: var(--fg); letter-spacing: -.02em; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 2px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row > div { min-width: 0; }
.row b { display: block; font-size: 14.5px; }
.row span { display: block; font-size: 13px; color: var(--fg-2); }
.row textarea { width: 100%; margin-top: 6px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--accent); background: var(--surface); font-size: 13.5px; resize: vertical; min-height: 60px; outline: 0; }
.ch { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ch .c-ic { width: 34px; height: 34px; }
.tog { width: 44px; height: 26px; border-radius: 13px; border: 0; padding: 3px; background: var(--line-2); display: flex; flex: none; transition: background .2s; }
.tog i { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.tog[aria-checked="true"] { background: var(--ok); }
.tog[aria-checked="true"] i { transform: translateX(18px); }
.tog:disabled { opacity: .6; cursor: default; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(16, 25, 56, .12); }
.mbar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.mbar i { display: block; height: 100%; border-radius: 5px; background: var(--fg); }
.mate { display: flex; align-items: center; gap: 12px; }
.ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 13.5px; flex: none; }
.setcol { display: grid; gap: 20px; align-content: start; min-width: 0; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 999px; background: var(--btn); color: var(--btn-fg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: opacity .25s, transform .35s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* credits: balance, what spends them, packs to top up */
.plan .pill { justify-self: start; margin-top: 2px; background: #fff; color: #101938; }
.cred-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cred-big b { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.cred-note { font-size: 13.5px; margin: 0; }
.cred-note.warn { color: var(--warn); font-weight: 600; }
.cost { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 4px; }
.cost td { padding: 8px 2px; border-top: 1px solid var(--line); }
.cost td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.cred-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5, 7, 15, .5); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { width: min(520px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); border-radius: 26px; padding: 22px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.sheet h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.sheet-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; flex: none; font-size: 20px; line-height: 1; }
.packs { display: grid; gap: 10px; }
.pack { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line-2); background: var(--surface); text-align: left; width: 100%; }
.pack[aria-checked="true"] { border-color: var(--fg); box-shadow: 0 0 0 3px var(--accent-soft); }
.pack .rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.pack[aria-checked="true"] .rad { border-color: var(--fg); }
.pack[aria-checked="true"] .rad::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); }
.pack b { display: block; font-size: 16px; }
.pack span.per { font-size: 12.5px; color: var(--fg-2); }
.pack strong { font-size: 17px; white-space: nowrap; }
.pay { display: grid; gap: 8px; }
.pay label { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--surface-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.pay input { accent-color: var(--fg); width: 18px; height: 18px; margin: 0; }
.sheet .fine { margin: 0; font-size: 12.5px; color: var(--fg-3); }
.sheet .pill.full { width: 100%; padding: 14px; font-size: 15px; }
@media (max-width: 560px) { .scrim { place-items: end center; padding: 0; } .sheet { border-radius: 24px 24px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); } }

/* phones: the rail becomes five tabs; conversations show the list, then the thread */
.tabbar { display: none; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top .sub { display: none; }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); background: var(--side); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 2px; color: var(--side-fg-3); font-size: 11px; font-weight: 600; }
  .tabbar button[aria-current="page"] { color: #fff; }
  .tabbar button > span:not(.cnt) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .cnt { position: absolute; top: 1px; left: calc(50% + 5px); margin: 0; min-width: 17px; padding: 0 5px; font-size: 10.5px; line-height: 17px; }
  .inbox { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 18px; }
  .inbox .thread { display: none; }
  .inbox.open .list { display: none; }
  .inbox.open .thread { display: flex; }
  .back { display: grid; }
  .m { max-width: 90%; }
  .src { grid-template-columns: auto minmax(0, 1fr); }
  .src > .pill { grid-column: 1 / -1; justify-self: start; }
  .task { grid-template-columns: minmax(0, 1fr); }
  .task .acts { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi.hot .pill { position: static; justify-self: start; margin-top: 8px; }
  .demo { margin-left: 0; width: 100%; justify-content: space-between; }
  .demo select { flex: 1; min-width: 0; }
  .week p { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------------------------------------------------------------- the real app on top of the design: sign-in, forms, lists */
.boot { padding: 40px; color: var(--fg-3); }
.login { min-height: 100vh; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--side); }
.login-card { width: min(420px, 100%); background: var(--surface); color: var(--fg); border-radius: 26px; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login-card .brand { color: var(--fg); padding: 0; }
.login-card h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.03em; }
.login-card p { margin: 0; color: var(--fg-2); font-size: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.field input, .field select { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-size: 16px; outline: 0; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.code { letter-spacing: .4em; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.err { color: var(--bad); font-size: 13px; font-weight: 600; }
.pill.full { width: 100%; padding: 13px; font-size: 15px; }
.pill[disabled] { opacity: .5; pointer-events: none; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: 13.5px; text-align: left; }
.outbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--fg-2); flex: none; }
.who-top { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.empty-s { padding: 36px 20px; text-align: center; color: var(--fg-2); }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.pay-row:first-child { border-top: 0; }
.pay-row a { color: var(--accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.plans-pick { display: grid; gap: 8px; }
.invite { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.invite input { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.rm { border: 0; background: none; color: var(--fg-3); font-size: 13px; font-weight: 600; }
.rm:hover { color: var(--bad); }
@media (max-width: 560px) { .pay-row { grid-template-columns: minmax(0, 1fr) auto; } .pay-row a { grid-column: 1 / -1; } .invite { grid-template-columns: minmax(0, 1fr); } }
