/* ai-shelf by MarkApp. One design system for the product site, sign-in, the client app and the master console.
   MarkApp palette (same family as the pitch deck): navy, blue, sky; green for leads, orange for gaps. */
:root {
  --navy: #0f1f3d; --navy-2: #162a52; --navy-3: #1f3a70; --blue: #2a78d6; --blue-2: #1f63b8; --sky: #8fb8ff;
  --orange: #eb6834; --green: #1baf7a; --amber: #e0a100; --red: #d64545; --violet: #7f5af0;
  --bg: #f3f6fb; --surface: #ffffff; --surface-2: #f7f9fc; --tint: #eaf2fd; --tint-2: #dbe8fb;
  --rule: rgba(15,31,61,.08); --rule-2: rgba(15,31,61,.14);
  --ink: #0b1530; --ink-2: #4a5672; --muted: #8a94a9;
  --green-soft: #e2f6ee; --green-ink: #0b7a52; --orange-soft: #fdede5; --orange-ink: #b9461c;
  --amber-soft: #fff4d6; --amber-ink: #8a6200; --red-soft: #fdeceb; --red-ink: #b02a2a;
  --shadow-sm: 0 1px 2px rgba(15,31,61,.05);
  --shadow: 0 1px 2px rgba(15,31,61,.04), 0 8px 24px -6px rgba(15,31,61,.08);
  --shadow-lg: 0 24px 60px -18px rgba(15,31,61,.32);
  --r: 18px; --r-sm: 12px;
  --display: Poppins, Inter, "Helvetica Neue", Arial, sans-serif;
  --text: Inter, Poppins, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #060d1c; --surface: #0d1830; --surface-2: #111f3b; --tint: rgba(42,120,214,.16); --tint-2: rgba(42,120,214,.26);
  --rule: rgba(255,255,255,.07); --rule-2: rgba(255,255,255,.13);
  --ink: #edf2ff; --ink-2: #b2bfda; --muted: #7887a6;
  --green-soft: rgba(27,175,122,.15); --green-ink: #4fd6a3; --orange-soft: rgba(235,104,52,.15); --orange-ink: #ff9a70;
  --amber-soft: rgba(224,161,0,.15); --amber-ink: #f3c14d; --red-soft: rgba(214,69,69,.16); --red-ink: #ff8f8f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -10px rgba(0,0,0,.5); --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.015em; }
h1 { font-size: 28px; line-height: 1.15; margin: 0; font-weight: 700; }
h2 { font-size: 16.5px; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 14.5px; margin: 0 0 6px; font-weight: 600; }
.muted { color: var(--muted); } .ink2 { color: var(--ink-2); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 600; color: var(--blue); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 16px; color: #fff;
  background: radial-gradient(600px 300px at -10% -10%, rgba(42,120,214,.35), transparent 60%),
              radial-gradient(500px 400px at 120% 110%, rgba(143,184,255,.12), transparent 60%), var(--navy); }
.brandmark { display: flex; align-items: center; gap: 11px; color: #fff; padding: 2px 8px 18px; white-space: nowrap; }
.brandmark:hover { text-decoration: none; }
.brandmark b { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; line-height: 1.1; }
.brandmark small { display: block; font-size: 11px; color: var(--sky); letter-spacing: .06em; }
.ws { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; }
.ws .dot { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
  background: linear-gradient(135deg, var(--blue), var(--sky)); flex: 0 0 30px; }
.ws b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws span { display: block; font-size: 11px; color: #9fb2d6; }
.ws.master .dot { background: linear-gradient(135deg, var(--orange), #ffb48f); }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side nav .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #6f84ad; padding: 16px 12px 6px; font-weight: 600; }
.side nav a { position: relative; display: flex; align-items: center; gap: 11px; color: #c3cfe7; padding: 9px 12px; border-radius: 11px; font-weight: 500; font-size: 14px; }
.side nav a svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .8; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side nav a.on { background: linear-gradient(90deg, rgba(42,120,214,.95), rgba(42,120,214,.75)); color: #fff; box-shadow: 0 8px 22px -6px rgba(42,120,214,.6); }
.side nav a.on svg { opacity: 1; }
.side nav a .count { margin-left: auto; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side .foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.side .me .who { min-width: 0; flex: 1; }
.side .me .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me .who span { display: block; font-size: 11.5px; color: #9fb0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--sky)); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; color: #fff; flex: 0 0 34px; letter-spacing: .02em; }
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }
.iconbtn { background: none; border: 0; color: inherit; cursor: pointer; padding: 7px; border-radius: 10px; display: inline-flex; position: relative; }
.iconbtn:hover { background: var(--tint); }
.side .iconbtn { color: #c9d4ea; } .side .iconbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .badge { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px var(--surface); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--rule); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--ink-2); } .crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.searchbtn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--rule-2); background: var(--surface); border-radius: 11px;
  padding: 7px 10px 7px 12px; color: var(--muted); cursor: pointer; min-width: 230px; font-size: 13px; box-shadow: var(--shadow-sm); }
.searchbtn svg { width: 15px; height: 15px; }
.searchbtn kbd { margin-left: auto; }
kbd { font-family: var(--text); font-size: 11px; border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; color: var(--muted); background: var(--surface-2); }
main { padding: 26px 32px 72px; max-width: 1380px; width: 100%; min-width: 0; margin: 0 auto; }
.topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.topline .sub { color: var(--ink-2); margin: 6px 0 0; max-width: 720px; }
.topline .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; gap: 6px; overflow-x: auto; }
  .side .brandmark { padding: 0 6px 0 2px; } .side .brandmark div, .ws, .side nav .lbl, .side .me .who { display: none; }
  .side nav { flex-direction: row; flex: 1; min-width: 0; overflow-x: auto; }
  .side nav a { padding: 8px 10px; white-space: nowrap; } .side nav a span.t { display: none; }
  .side .foot { margin: 0; flex-direction: row; } .side .me { padding: 4px; background: none; border: 0; }
  .topbar { padding: 10px 16px; top: 52px; } .searchbtn { min-width: 0; } .searchbtn span, .searchbtn kbd { display: none; }
  main { padding: 18px 16px 56px; }
}

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card.pad-sm { padding: 16px 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; cursor: pointer; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--rule-2); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h2 { margin: 0; }
.card-h .r { display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-wide { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1180px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } .g-side { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .g2, .g3, .g4, .g5, .g-wide { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 18px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.hr { height: 1px; background: var(--rule); margin: 16px 0; border: 0; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; border: 1px solid transparent;
  border-radius: 11px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px -6px rgba(42,120,214,.6); }
.btn:hover { background: var(--blue-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 13px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.xs { padding: 3px 9px; font-size: 12px; border-radius: 8px; box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--blue) 40%, var(--rule-2)); }
.btn.soft { background: var(--tint); color: var(--blue); box-shadow: none; }
.btn.soft:hover { background: var(--tint-2); }
.btn.white { background: #fff; color: var(--navy); box-shadow: 0 8px 20px -8px rgba(0,0,0,.4); }
.btn.white:hover { background: #eef4ff; }
.btn.glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); box-shadow: none; backdrop-filter: blur(6px); }
.btn.glass:hover { background: rgba(255,255,255,.18); }
.btn.orange { background: var(--orange); box-shadow: 0 6px 16px -6px rgba(235,104,52,.6); } .btn.orange:hover { background: #d65a29; }
.btn.green { background: var(--green); box-shadow: 0 6px 16px -6px rgba(27,175,122,.6); } .btn.green:hover { background: #159767; }
.btn.danger { background: transparent; color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 35%, transparent); box-shadow: none; }
.btn.danger:hover { background: var(--red-soft); }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .55; cursor: default; pointer-events: none; }
.btn.busy::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--rule); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ready, .pill.lead, .pill.done, .pill.green { background: var(--green-soft); color: var(--green-ink); border-color: transparent; }
.pill.run, .pill.blue, .pill.contacted { background: var(--tint); color: var(--blue); border-color: transparent; }
.pill.run .dot { animation: pulse 1.4s ease-in-out infinite; }
.pill.review, .pill.close, .pill.new, .pill.amber { background: var(--amber-soft); color: var(--amber-ink); border-color: transparent; }
.pill.failed, .pill.red { background: var(--red-soft); color: var(--red-ink); border-color: transparent; }
.pill.gap, .pill.orange, .pill.paid { background: var(--orange-soft); color: var(--orange-ink); border-color: transparent; }
.pill.paid { background: var(--green-soft); color: var(--green-ink); }
.pill.declined { opacity: .7; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 1px 8px; }
.delta.up { background: var(--green-soft); color: var(--green-ink); } .delta.down { background: var(--orange-soft); color: var(--orange-ink); }
.delta.flat { background: var(--surface-2); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--surface-2); border: 1px solid var(--rule); border-radius: 9px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); }
.chip.blue { background: var(--tint); border-color: transparent; color: var(--blue); }
.ai { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.ai i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--blue)); flex: 0 0 9px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--blue)) 18%, transparent); }
.err { background: var(--red-soft); color: var(--red-ink); border-radius: 12px; padding: 11px 14px; margin: 10px 0; font-size: 14px; }
.ok { background: var(--green-soft); color: var(--green-ink); border-radius: 12px; padding: 11px 14px; margin: 10px 0; font-size: 14px; word-break: break-word; }
.note { background: var(--tint); color: var(--ink-2); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; }

/* ---------------------------------------------------------------- hero and score */
.switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.switcher button { border: 1px solid var(--rule-2); background: var(--surface); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 500; font-size: 13.5px; display: inline-flex; gap: 8px; align-items: center; }
.switcher button b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blue); }
.switcher button.on { background: var(--navy); color: #fff; border-color: var(--navy); } .switcher button.on b { color: var(--sky); }
.hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; color: #fff; padding: 30px 32px;
  background: radial-gradient(700px 360px at 92% -30%, rgba(143,184,255,.42), transparent 62%),
              radial-gradient(520px 300px at -10% 120%, rgba(42,120,214,.5), transparent 60%),
              radial-gradient(300px 200px at 60% 130%, rgba(235,104,52,.18), transparent 70%),
              linear-gradient(135deg, #0c1a36 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: minmax(0, 1.35fr) auto minmax(0, 1fr); gap: 30px; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse at 70% 0%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 10%, transparent 70%); }
.hero .eyebrow { color: var(--sky); }
.hero h1 { color: #fff; font-size: 36px; margin: 8px 0 6px; letter-spacing: -.025em; }
.hero .meta { color: #c3d0ea; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.hero .meta .ai { color: #fff; font-weight: 500; }
.hero .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero .rankbox .big { font-family: var(--display); font-size: 60px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.hero .rankbox .big small { font-size: 22px; color: #9fb4da; font-weight: 600; }
.hero .rankbox .of { color: #c3d0ea; font-size: 14.5px; margin-top: 6px; }
.hero .rankbox .lead { margin-top: 14px; font-size: 13.5px; color: #c3d0ea; display: flex; flex-direction: column; gap: 6px; }
.hero .rankbox .lead b { color: #fff; }
.hero .sample { position: absolute; top: 14px; right: 16px; font-size: 11px; letter-spacing: .14em; font-weight: 700; color: #ffd3c2; background: rgba(235,104,52,.25); border-radius: 8px; padding: 3px 8px; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr auto; } .hero .rankbox { grid-column: 1 / -1; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; } .hero .rankbox .lead { margin: 0; } }
@media (max-width: 640px) { .hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; border-radius: 20px; } .hero > * { min-width: 0; } .hero .acts .btn { flex: 1 1 auto; } .hero h1 { font-size: 27px; } .gauge { margin: 0 auto; } }
.gauge { width: 220px; height: 220px; position: relative; }
.gauge svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.gauge .track { stroke: rgba(255,255,255,.1); }
.gauge .arc { stroke: url(#gg); transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 10px rgba(143,184,255,.55)); }
.gauge .tick { stroke: rgba(255,255,255,.22); }
.gauge .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gauge .val b { font-family: var(--display); font-size: 54px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.gauge .val span { font-size: 11.5px; color: #b9c8e6; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.gauge .val em { font-style: normal; margin-top: 8px; }
.ring { width: 64px; height: 64px; position: relative; flex: 0 0 64px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--rule-2); } .ring .arc { stroke: var(--c, var(--blue)); transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 17px; font-weight: 700; }

/* ---------------------------------------------------------------- KPIs and assistants */
.kpi { position: relative; overflow: hidden; }
.kpi .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.kpi .ic svg { width: 19px; height: 19px; }
.kpi .v { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin-top: 14px; }
.kpi .l { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.kpi .bar { height: 5px; border-radius: 4px; background: var(--surface-2); margin-top: 14px; overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--sky)); width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.assist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .assist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .assist { grid-template-columns: 1fr 1fr; } }
.atile { position: relative; border-radius: 16px; padding: 16px; border: 1px solid var(--rule); background: var(--surface); min-height: 148px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.atile::after { content: ""; position: absolute; inset: auto -30px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: var(--c); opacity: .07; }
.atile .hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atile .mk { font-size: 11.5px; color: var(--muted); }
.atile .sc { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.atile .sc .t b { display: block; font-size: 13px; } .atile .sc .t span { font-size: 12px; color: var(--muted); }
.atile.locked { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); border-style: dashed; border-color: var(--rule-2); }
.atile.locked .lockrow { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.atile.locked .lk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.atile.locked .lk svg { width: 13px; height: 13px; }
.atile.pending { border-color: color-mix(in srgb, var(--amber) 50%, transparent); }

/* ---------------------------------------------------------------- charts and lists */
.take { list-style: none; padding: 0; margin: 0; }
.take li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.take li:last-child { border-bottom: 0; }
.take li i { flex: 0 0 26px; height: 26px; border-radius: 8px; background: var(--tint); color: var(--blue); font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-family: var(--display); }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 24px minmax(90px, 170px) minmax(0, 1fr) 40px; gap: 12px; align-items: center; padding: 7px 0; font-size: 14px; }
.board li .r { color: var(--muted); font-weight: 600; text-align: right; font-size: 12.5px; }
.board li .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board li .b { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.board li .b i { display: block; height: 100%; border-radius: 6px; background: color-mix(in srgb, var(--ink-2) 28%, transparent); width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.board li .s { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.board li.me { background: var(--tint); border-radius: 12px; margin: 3px -10px; padding: 8px 10px; }
.board li.me .n, .board li.me .s { color: var(--blue); font-weight: 700; }
.board li.me .b i { background: linear-gradient(90deg, var(--blue), var(--sky)); }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) 130px 62px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.topic:last-child { border-bottom: 0; }
.topic .t b { display: block; font-weight: 500; }
.topic .t span { font-size: 12px; color: var(--muted); }
.vs { height: 8px; border-radius: 6px; background: var(--surface-2); position: relative; }
.vs i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.vs b { position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px; background: var(--orange); }
.radar svg { width: 100%; height: auto; max-height: 330px; display: block; }
.radar .web { fill: none; stroke: var(--rule-2); } .radar .axis { stroke: var(--rule); }
.radar .me { fill: color-mix(in srgb, var(--blue) 22%, transparent); stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.radar .ld { fill: color-mix(in srgb, var(--orange) 10%, transparent); stroke: var(--orange); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.radar text { font-size: 11px; fill: var(--ink-2); font-family: var(--text); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 4px; border-radius: 3px; background: var(--blue); }
.legend i.o { background: var(--orange); }
.reason { border-radius: 14px; padding: 14px 16px; background: var(--surface-2); margin-bottom: 10px; border: 1px solid var(--rule); position: relative; }
.reason::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--green); }
.reason.gap::before { background: var(--orange); }
.reason h3 { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.reason p { margin: 0; font-size: 13px; color: var(--ink-2); }
.reason q { display: block; font-size: 13px; color: var(--ink-2); font-style: italic; margin-top: 6px; }
.opp { display: flex; align-items: center; gap: 18px; margin: 8px 0 14px; }
.opp .from, .opp .to { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.opp .to { color: var(--green); }
.opp .arrow { flex: 1; height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--green)); position: relative; }
.opp .arrow::after { content: ""; position: absolute; right: -6px; top: -6px; border: 10px solid transparent; border-left-color: var(--green); border-right: 0; }
.media { position: relative; overflow: hidden; border-radius: var(--r); padding: 24px; color: #fff; box-shadow: var(--shadow);
  background: radial-gradient(400px 200px at 100% 0%, rgba(143,184,255,.3), transparent 60%), linear-gradient(140deg, var(--navy-2), var(--navy)); }
.media h2 { color: #fff; } .media p { color: #c3d0ea; margin: 0 0 14px; }
.media .eyebrow { color: var(--sky); }
.eco { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.eco div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px; }
.eco b { display: block; font-size: 13.5px; } .eco span { font-size: 10.5px; color: var(--sky); text-transform: uppercase; letter-spacing: .12em; }
@media (max-width: 760px) { .eco { grid-template-columns: 1fr 1fr; } }
.trend svg { width: 100%; height: 200px; display: block; }
.trend .line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend .pt { fill: var(--surface); stroke: var(--blue); stroke-width: 3; }
.trend .grid { stroke: var(--rule-2); stroke-dasharray: 3 5; }
.trend text { font-size: 11px; fill: var(--muted); font-family: var(--text); }
.spark { width: 100%; height: 34px; display: block; }
.spark .l { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .a { fill: color-mix(in srgb, var(--blue) 14%, transparent); }
.srcs { list-style: none; margin: 0; padding: 0; }
.srcs li { display: grid; grid-template-columns: minmax(0, 1fr) 110px 36px; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--rule); }
.srcs li:last-child { border-bottom: 0; }
.srcs .d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; align-items: center; }
.srcs .d i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 8px; }
.srcs .d i.owned { background: var(--green); } .srcs .d i.competitor { background: var(--orange); } .srcs .d i.third_party { background: var(--sky); }
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.place { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--surface-2); }
.place b { display: block; font-size: 14px; } .place .v { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--blue); }
.place span { font-size: 12px; color: var(--muted); display: block; }
.place.weak .v { color: var(--orange); }
.checks-list { list-style: none; margin: 0; padding: 0; }
.checks-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.checks-list li:last-child { border-bottom: 0; }
.checks-list .s { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; margin-top: 1px; }
.checks-list .s.green { background: var(--green); } .checks-list .s.amber { background: var(--amber); } .checks-list .s.red { background: var(--red); } .checks-list .s.grey { background: var(--muted); }
.fix { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.fix:last-child { border-bottom: 0; }
.fix input { margin-top: 3px; accent-color: var(--green); width: 17px; height: 17px; flex: 0 0 17px; }
.fix b { display: block; font-weight: 600; font-size: 14px; } .fix p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.fix.done b { text-decoration: line-through; color: var(--muted); }
.meter { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--rule); }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #6fe0b4); border-radius: 6px; }
.plan { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.plan .big { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }

/* ---------------------------------------------------------------- banners, steps, tables */
.banner { position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; border-radius: var(--r); padding: 16px 20px; background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--blue) 22%, transparent); }
.banner::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, var(--blue), transparent); animation: sweep 2.2s ease-in-out infinite; }
.banner .spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--blue) 25%, transparent); border-top-color: var(--blue); animation: spin 1s linear infinite; flex: 0 0 22px; }
.banner b { display: block; }
.banner.amber { background: var(--amber-soft); border-color: transparent; } .banner.amber::after { display: none; }
.steps { display: flex; gap: 6px; margin-top: 10px; }
.steps i { height: 5px; flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--blue) 20%, transparent); min-width: 22px; }
.steps i.done { background: var(--blue); }
.steps i.now { background: linear-gradient(90deg, var(--blue), var(--sky)); animation: pulse 1.4s ease-in-out infinite; }
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pipeline div { text-align: center; font-size: 11.5px; color: var(--muted); }
.pipeline div i { display: block; height: 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--rule); margin-bottom: 8px; }
.pipeline div.done { color: var(--ink-2); } .pipeline div.done i { background: var(--blue); border-color: transparent; }
.pipeline div.now { color: var(--blue); font-weight: 600; } .pipeline div.now i { background: linear-gradient(90deg, var(--blue), var(--sky)); border-color: transparent; animation: pulse 1.4s infinite; }
@media (max-width: 760px) { .pipeline { grid-template-columns: repeat(4, 1fr); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.t td { padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tr.click { cursor: pointer; }
table.t td.r, table.t th.r { text-align: right; }
.table-wrap { overflow-x: auto; }
.card.flush .table-wrap { margin: 0; }
.cell-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo, .cell-brand .logo { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; font-family: var(--display); }
.cell-brand b { display: block; white-space: nowrap; } .cell-brand span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.empty { text-align: center; padding: 56px 20px; }
.empty .art { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 30px; display: flex; align-items: center; justify-content: center; color: var(--blue);
  background: radial-gradient(circle at 30% 20%, var(--tint-2), var(--tint)); box-shadow: inset 0 0 0 1px var(--rule); }
.empty .art svg { width: 50px; height: 50px; }
.empty p { max-width: 480px; margin: 8px auto 0; }
.stat { padding: 16px 18px; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat.accent { background: linear-gradient(135deg, var(--navy-2), var(--navy)); color: #fff; border-color: transparent; }
.stat.accent .l { color: #b8c6e2; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--rule-2); }
.timeline li:last-child::before { display: none; }
.timeline li i { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--blue); }
.timeline li.green i { border-color: var(--green); } .timeline li.amber i { border-color: var(--amber); } .timeline li.orange i { border-color: var(--orange); } .timeline li.grey i { border-color: var(--muted); }
.timeline li b { font-weight: 600; } .timeline li span { display: block; font-size: 12px; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; }
.feed .fi { width: 30px; height: 30px; border-radius: 9px; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 30px; }
.feed .fi svg { width: 15px; height: 15px; }
.feed .fi.req { background: var(--orange-soft); color: var(--orange-ink); } .feed .fi.ok { background: var(--green-soft); color: var(--green-ink); margin: 0; padding: 0; }
.feed span.t { display: block; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- portfolio */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters input[type=search] { max-width: 300px; }
.filters select { width: auto; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 14px; }
.pcard .hd { display: flex; align-items: center; gap: 12px; }
.pcard .hd .grow b { display: block; font-family: var(--display); font-size: 16px; }
.pcard .hd .grow span { display: block; font-size: 12.5px; color: var(--muted); }
.pcard .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard .nums div { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; border: 1px solid var(--rule); }
.pcard .nums b { display: block; font-family: var(--display); font-size: 19px; font-weight: 700; }
.pcard .nums span { font-size: 11.5px; color: var(--muted); }
.pcard .ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- report viewer */
.viewer { border-radius: var(--r); overflow: hidden; border: 1px solid var(--rule); background: var(--surface-2); box-shadow: var(--shadow); }
.tabs { display: flex; gap: 4px; padding: 6px; background: var(--surface); border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; border-radius: 10px; cursor: pointer; color: var(--ink-2); font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.tabs button:hover { background: var(--surface-2); }
.tabs button.on { background: var(--navy); color: #fff; }
.frame { width: 100%; border: 0; display: block; background: #e9ebef; }
.frame.deck { aspect-ratio: 16 / 10; min-height: 460px; }
.frame.page { height: 80vh; background: #fff; }
.files { list-style: none; margin: 0; padding: 8px 22px; background: var(--surface); }
.files li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.files li:last-child { border-bottom: 0; }
.files .fi { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #fff; flex: 0 0 40px; }
.files .fi.pdf { background: #d9483b; } .files .fi.xlsx { background: #1f8a5b; } .files .fi.csv { background: #5b6b86; } .files .fi.html { background: var(--blue); }
.files .ft { flex: 1; min-width: 0; } .files .ft b { display: block; font-weight: 600; } .files .ft span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--rule-2); border-radius: 11px; padding: 10px 13px; transition: border-color .12s, box-shadow .12s; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
input[readonly] { background: var(--surface-2); color: var(--ink-2); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
textarea.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; min-height: 220px; white-space: pre; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-2); border-radius: 11px; padding: 8px 12px; cursor: pointer; margin: 0; font-size: 13.5px; transition: border-color .12s, background .12s; }
.checks label:has(input:checked) { border-color: var(--blue); background: var(--tint); }
.checks label.off { opacity: .5; cursor: default; }
.checks input, .choice input { accent-color: var(--blue); }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice label { display: block; background: var(--surface-2); border: 1px solid var(--rule-2); border-radius: 13px; padding: 12px 14px; cursor: pointer; font-weight: 500; color: var(--ink); margin: 0; font-size: 13.5px; }
.choice label:has(input:checked) { border-color: var(--blue); background: var(--tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent); }
.choice input { margin-right: 8px; }
.choice label small { display: block; color: var(--muted); font-weight: 400; margin: 3px 0 0 24px; font-size: 12px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick label { position: relative; margin: 0; cursor: pointer; border-radius: 14px; border: 1px solid var(--rule-2); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); transition: all .12s; }
.pick label input { position: absolute; opacity: 0; }
.pick label .ai { font-size: 14px; }
.pick label small { font-weight: 400; color: var(--muted); font-size: 12px; }
.pick label:has(input:checked) { border-color: var(--blue); background: var(--tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.pick label:has(input:checked)::after { content: ""; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pick label.has { opacity: .55; cursor: default; }
.form .sec { margin-bottom: 18px; }
.form .sec h2 { display: flex; align-items: center; gap: 10px; }
.form .sec h2 i { font-style: normal; background: var(--navy); color: #fff; width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; background: var(--surface); border: 1px solid var(--rule-2); border-radius: 11px; padding: 6px; }
.tagbox:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
.tagbox input { border: 0 !important; flex: 1; min-width: 150px; padding: 5px 6px !important; box-shadow: none !important; background: transparent !important; }
.tagbox .chip { display: inline-flex; gap: 6px; align-items: center; background: var(--tint); border-color: transparent; color: var(--blue); }
.tagbox .chip button { border: 0; background: none; cursor: pointer; color: var(--blue); font-size: 15px; padding: 0; line-height: 1; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; word-break: break-word; }
.copybox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--rule-2); border-radius: 12px; padding: 8px 8px 8px 12px; font-size: 13px; }
.copybox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------------------------------------------------------------- overlays: modal, drawer, palette, toasts */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(6,13,28,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; animation: fadein .18s ease both; overflow-y: auto; }
.modal { width: 100%; max-width: 620px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--rule); animation: rise .22s cubic-bezier(.2,.8,.2,1) both; }
.modal.wide { max-width: 860px; }
.modal .mh { padding: 22px 24px 0; display: flex; gap: 12px; align-items: flex-start; }
.modal .mh h2 { margin: 0; font-size: 19px; } .modal .mh p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.modal .mb { padding: 18px 24px; }
.modal .mf { padding: 14px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.drawer-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(6,13,28,.4); animation: fadein .18s ease both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--rule); display: flex; flex-direction: column; animation: slidein .26s cubic-bezier(.2,.8,.2,1) both; }
.drawer .dh { padding: 20px 22px; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: flex-start; }
.drawer .db { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer .df { padding: 14px 22px; border-top: 1px solid var(--rule); display: flex; gap: 8px; flex-wrap: wrap; }
.cmdk { width: 100%; max-width: 640px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--rule); overflow: hidden; animation: rise .18s ease both; }
.cmdk input { border: 0 !important; border-bottom: 1px solid var(--rule) !important; border-radius: 0 !important; padding: 18px 20px !important; font-size: 16px !important; box-shadow: none !important; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.cmdk li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; font-size: 14px; }
.cmdk li svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 17px; }
.cmdk li span.k { margin-left: auto; font-size: 12px; color: var(--muted); }
.cmdk li.on { background: var(--tint); } .cmdk li.on svg { color: var(--blue); }
.cmdk .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 12px 4px; font-weight: 600; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 40; padding: 8px; animation: rise .16s ease both; }
.pop .ph { padding: 8px 10px; font-weight: 600; font-family: var(--display); }
.pop ul { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.pop li { padding: 10px; border-radius: 10px; font-size: 13px; cursor: pointer; display: flex; gap: 10px; }
.pop li:hover { background: var(--surface-2); } .pop li span { display: block; font-size: 12px; color: var(--muted); }
.pop li.unread { background: var(--tint); }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: 14px; max-width: 400px; animation: rise .22s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 8px; }
.toast.bad::before { background: var(--orange); }

/* ---------------------------------------------------------------- loading and motion */
.skel { border-radius: 14px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border: 1px solid var(--rule); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.fade > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.fade > *:nth-child(2) { animation-delay: .04s; } .fade > *:nth-child(3) { animation-delay: .08s; } .fade > *:nth-child(4) { animation-delay: .12s; }
.fade > *:nth-child(5) { animation-delay: .16s; } .fade > *:nth-child(6) { animation-delay: .2s; } .fade > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- sign-in and invite pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); background: var(--surface); }
.auth .art { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background: radial-gradient(800px 500px at 110% -10%, rgba(143,184,255,.4), transparent 60%), radial-gradient(600px 400px at -20% 110%, rgba(42,120,214,.55), transparent 60%),
              linear-gradient(150deg, #0b1833, var(--navy-2) 70%, var(--navy-3)); }
.auth .art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .4;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
.auth .art h1 { color: #fff; font-size: 44px; line-height: 1.08; margin: auto 0 16px; max-width: 580px; letter-spacing: -.03em; }
.auth .art h1 em { font-style: normal; background: linear-gradient(90deg, var(--sky), #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth .art p { color: #c3d0ea; font-size: 16.5px; max-width: 520px; margin: 0; }
.auth .pane { display: flex; align-items: center; justify-content: center; padding: 32px 20px; position: relative; }
.auth form { width: 100%; max-width: 390px; }
.auth form h1 { font-size: 30px; margin-bottom: 6px; }
.auth form > div { margin-bottom: 16px; }
.auth .pw { position: relative; }
.auth .pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.auth .foot { margin-top: 26px; font-size: 13px; color: var(--muted); }
.auth .back { position: absolute; top: 22px; right: 26px; font-size: 13px; color: var(--muted); }
.mock { position: relative; margin: 34px 0 auto; max-width: 540px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 20px; padding: 18px;
  backdrop-filter: blur(8px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.mock .row2 { display: flex; gap: 10px; }
.mock .m { flex: 1; background: rgba(255,255,255,.07); border-radius: 13px; padding: 12px; }
.mock .m b { display: block; font-family: var(--display); font-size: 25px; } .mock .m span { font-size: 11px; color: #c3d0ea; }
.mock .bars { margin-top: 12px; }
.mock .bars div { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #c3d0ea; margin: 8px 0; }
.mock .bars i { height: 8px; border-radius: 5px; background: rgba(255,255,255,.22); display: block; }
.mock .bars div.me i { background: linear-gradient(90deg, var(--sky), #fff); } .mock .bars div.me { color: #fff; font-weight: 600; }
.mock .float { position: absolute; display: flex; align-items: center; gap: 8px; background: #fff; color: var(--navy); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); animation: bob 5s ease-in-out infinite; }
.mock .float i { width: 9px; height: 9px; border-radius: 3px; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth .art { padding: 26px 20px; } .auth .art h1 { font-size: 30px; margin-top: 26px; } .mock { display: none; } }

/* ---------------------------------------------------------------- wordmark */
.brandmark img { border-radius: 11px; box-shadow: 0 6px 18px -6px rgba(42,120,214,.55); }
.brandmark b i { font-style: normal; background: linear-gradient(90deg, #8fb8ff, #4f98f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
footer.lf .brandmark b i { background: linear-gradient(90deg, #2a78d6, #1f63b8); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="dark"] footer.lf .brandmark b i { background: linear-gradient(90deg, #8fb8ff, #4f98f0); -webkit-background-clip: text; background-clip: text; }
