/* WichLive admin: dark control center. Sidebar views (overview / members / free trials / payments),
   a slide-over drawer for one member. Standalone: no site.css. */
:root {
  --bg: #0a0f1e; --side: #0c1326; --card: #111a30; --card-2: #16213b; --line: rgba(148, 163, 184, .13); --line-2: rgba(148, 163, 184, .24);
  --ink: #e8edf7; --ink-2: #a3aec5; --ink-3: #6f7b94;
  --blue: #3b82f6; --cyan: #22d3ee; --green: #22c55e; --yellow: #facc15; --orange: #fb923c; --purple: #8b5cf6; --pink: #ec4899; --red: #f87171;
  --display: "Prompt", "Anuphan", system-ui, sans-serif; --body: "Anuphan", "Prompt", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 600; }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .r { text-align: right; } .c { text-align: center; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------------------------------------------ frame */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; background: var(--side); border-right: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 0 8px; }
.logo img { width: 40px; height: 40px; border-radius: 11px; }
.logo b { display: block; font: 700 1.25rem/1.1 var(--display); }
.logo i { font-style: normal; background: linear-gradient(95deg, #7aa7ff, #a58bff 60%, #d07bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo small { color: var(--ink-3); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--ink-2); padding: 11px 14px; border-radius: 12px; font-size: .98rem; text-align: left; transition: background .15s, color .15s; }
.nav button svg { width: 21px; height: 21px; }
.nav button em:empty { display: none; }
.nav button em { margin-left: auto; font-style: normal; font-size: .75rem; color: var(--ink-3); background: rgba(148, 163, 184, .1); padding: 1px 8px; border-radius: 99px; }
.nav button:hover { background: rgba(148, 163, 184, .08); color: var(--ink); }
.nav button.on { background: linear-gradient(90deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, .08)); color: #fff; box-shadow: inset 3px 0 0 var(--blue); }
.nav button.on em { color: #cfe0ff; background: rgba(59, 130, 246, .3); }
.side-foot { margin-top: auto; display: grid; gap: 2px; }
.side-foot a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; color: var(--ink-3); text-decoration: none; font-size: .9rem; }
.side-foot a:hover { color: var(--ink); background: rgba(148, 163, 184, .07); }
.side-foot svg { width: 18px; height: 18px; }

.main { min-width: 0; padding: 0 26px 30px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 16px 0 14px; background: linear-gradient(var(--bg) 78%, rgba(10, 15, 30, 0)); }
.top h1 { font-size: 1.45rem; margin-right: auto; }
.search { display: flex; align-items: center; gap: 8px; width: min(380px, 40vw); padding: 0 14px; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink-3); }
.search:focus-within { border-color: rgba(59, 130, 246, .6); }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }
.search.in { width: min(420px, 100%); background: var(--bg); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upd { color: var(--ink-3); font-size: .8rem; white-space: nowrap; }
.notice { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .35); color: #fde68a; }
.notice.bad { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .4); color: #fecaca; }
.view { display: grid; gap: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ------------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h2 { font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.card-h h2 small { color: var(--ink-3); font: 400 .82rem var(--body); }
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink-3); color: var(--ink-3); font: 600 .7rem/1 var(--display); cursor: help; }
.note { margin: 10px 0 0; color: var(--ink-3); font-size: .82rem; }
.link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: #7fb0ff; font-size: .88rem; padding: 4px 0; }
.link svg { width: 15px; height: 15px; }
.link:hover { color: #b9d3ff; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.seg button { border: 0; background: none; color: var(--ink-2); padding: 5px 14px; border-radius: 8px; font-size: .86rem; }
.seg button.on { background: var(--blue); color: #fff; font-weight: 600; box-shadow: 0 4px 14px -6px rgba(59, 130, 246, .9); }
.row { display: grid; gap: 16px; }
.r-funnel { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.r-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* today strip (the widget's numbers; first thing on a phone) */
.today { border-radius: 18px; padding: 14px 18px 16px; background: linear-gradient(120deg, #1a1f45, #2a1d52); border: 1px solid rgba(167, 139, 250, .25); }
.td-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.td-h b { font: 600 1rem var(--display); }
.td-h small { color: var(--ink-3); font-size: .78rem; }
.td-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.td small { display: block; color: #c7c9e8; font-size: .82rem; }
.td b { display: block; font: 700 2rem/1.15 var(--display); color: var(--k); font-variant-numeric: tabular-nums; }
.td em { display: block; font-style: normal; color: #9a9cc0; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 18px 18px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--k) 12%, transparent), transparent 70%); pointer-events: none; }
.ki { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--k); box-shadow: 0 8px 22px -8px var(--k); }
.ki svg { width: 25px; height: 25px; }
.kv small { display: block; color: var(--ink-2); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv b { display: block; font: 700 1.75rem/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.kf { grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-width: 0; }
.kf em, .kv em { display: block; font-style: normal; font-size: .8rem; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf em, .kv em { min-width: 0; } .kf em .up, .kv em .up { color: var(--green); font-weight: 600; } .kf em .dn, .kv em .dn { color: var(--red); font-weight: 600; }
.spark { width: 96px; height: 30px; overflow: visible; flex: none; }

/* funnel: stepped blocks */
.funnel { display: flex; gap: 0; align-items: stretch; min-height: 128px; }
.fs { position: relative; flex: 1; min-width: 0; padding: 14px 10px 12px 22px; color: #fff; text-align: center; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, #fff 8%), color-mix(in srgb, var(--c) 70%, #000 30%));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); margin-left: -8px; }
.fs:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); margin-left: 0; padding-left: 12px; border-radius: 12px 0 0 12px; }
.fs small { font-size: .78rem; opacity: .92; line-height: 1.25; }
.fs b { font: 700 1.55rem/1.15 var(--display); margin: 4px 0 2px; }
.fs i { font-style: normal; font-size: .76rem; opacity: .85; }
.fsub { display: flex; gap: 0; margin-top: 8px; }
.fsub span { flex: 1; text-align: center; font-size: .76rem; color: var(--ink-3); }

/* donut */
.donut-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
.donut { position: relative; width: 150px; height: 150px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dc b { font: 700 1.8rem/1 var(--display); }
.dc small { color: var(--ink-2); font-size: .78rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; font-size: .86rem; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.legend span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.legend b { font-variant-numeric: tabular-nums; } .legend small { color: var(--ink-3); width: 42px; text-align: right; }
.empty { color: var(--ink-3); font-size: .9rem; padding: 20px 0; text-align: center; }

/* revenue chart */
.chart { position: relative; height: 210px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--line); }
.chart text { fill: var(--ink-3); font: 500 11px var(--body); }
.chart .dot { fill: var(--bg); stroke-width: 2; }
.chart .hl { stroke: rgba(148, 163, 184, .4); stroke-dasharray: 3 3; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: #f8fafc; color: #0f172a; border-radius: 10px; padding: 7px 11px; font-size: .8rem; line-height: 1.3; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; box-shadow: 0 10px 30px -10px #000; }
.tip b { display: block; font: 700 1rem var(--display); }

/* tables */
.tw { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: .8rem; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(148, 163, 184, .04); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.go { cursor: pointer; transition: background .12s; }
.tbl tbody tr.go:hover { background: rgba(59, 130, 246, .07); }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl small { display: block; color: var(--ink-3); font-size: .78rem; }
.tbl.compact td { padding: 9px 10px; }
.tbl .num { font: 600 .95rem var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .t { white-space: nowrap; color: var(--ink-2); }
.tbl .em { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mem .av { width: 32px; height: 32px; font-size: .9rem; }
.mem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 16px; height: 16px; color: var(--ink-3); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: rgba(148, 163, 184, .12); color: var(--ink-2); }
.badge.pro { background: rgba(59, 130, 246, .16); color: #93c5fd; box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .35); }
.badge.karaoke { background: rgba(34, 197, 94, .14); color: #86efac; box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .3); }
.badge.ok { background: rgba(34, 197, 94, .14); color: #86efac; } .badge.ref { background: rgba(248, 113, 113, .14); color: #fca5a5; }
.dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select { height: 40px; padding: 0 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }

/* trial state cards (filters) */
.states { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.st { text-align: left; border: 1px solid var(--line); background: var(--card-2); border-radius: 14px; padding: 12px 14px; color: var(--ink); box-shadow: inset 0 3px 0 var(--c); transition: border-color .15s, transform .15s; }
.st small { display: block; color: var(--ink-2); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st b { font: 700 1.45rem/1.3 var(--display); }
.st:hover { border-color: var(--line-2); transform: translateY(-1px); }
.st.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.states.big .st b { font-size: 1.65rem; }
.modes { margin-left: auto; color: var(--ink-2); font-size: .86rem; }
.modes summary { cursor: pointer; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); list-style: none; }
.modes summary::-webkit-details-marker { display: none; }
.modes[open] summary { border-color: var(--line-2); }
.modes p { position: absolute; right: 26px; z-index: 5; width: min(560px, 80vw); margin: 8px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -16px #000; line-height: 1.7; }

/* trials table: fixed columns so nothing runs off the edge */
.tbl.trials { table-layout: fixed; min-width: 900px; }
.tbl.trials .c1 { width: 22%; } .tbl.trials .c2 { width: 14%; } .tbl.trials .c3 { width: 28%; } .tbl.trials .c4 { width: 24%; } .tbl.trials .c5 { width: 12%; }
.tbl.trials td { vertical-align: top; overflow-wrap: anywhere; }
.tdev b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdup { display: inline-block; margin-top: 5px; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; background: rgba(250, 204, 21, .14); color: #fde68a; cursor: help; }
.tmin b { font: 600 .9rem var(--display); }
.tbar { height: 6px; border-radius: 99px; background: rgba(148, 163, 184, .16); margin: 5px 0 4px; overflow: hidden; }
.tbar i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.tstate { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.twhy { display: block; margin-top: 6px; font-size: .8rem; color: var(--ink-2); line-height: 1.45; }
.twhy.bad { color: #fca5a5; } .twhy.lite { color: #c4b5fd; }
.tmode { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600; background: rgba(148, 163, 184, .12); color: var(--ink-2); }
.tmode.full { background: rgba(34, 211, 238, .14); color: #a5f3fc; }
.tmode.lite { background: rgba(139, 92, 246, .18); color: #ddd6fe; }
.tmode.manual { background: rgba(167, 139, 250, .26); }
.tmode.cpu { background: rgba(251, 146, 60, .18); color: #fed7aa; }
.tmode.guessgpu { background: rgba(56, 189, 248, .18); color: #bae6fd; }
.tmode.s4 { box-shadow: inset 0 0 0 1.5px rgba(251, 146, 60, .7); }
.tmode.guess { opacity: .75; }
.tlast { white-space: nowrap; }
.tlast b { font-weight: 600; }
.tlast > span { display: block; }
.tlast > span small { display: inline; }

/* ------------------------------------------------------------------ drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(2, 6, 18, .55); backdrop-filter: blur(2px); }
.drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--side); border-left: 1px solid var(--line-2); box-shadow: -30px 0 60px -30px #000; animation: slide .22s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.dr-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.dr-h h2 { font-size: 1.1rem; }
.who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px 12px; }
.who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; }
.who small { color: var(--ink-3); font-size: .8rem; }
.av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 1.15rem var(--display); color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); flex: none; }
.pill { padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: rgba(148, 163, 184, .12); color: var(--ink-2); white-space: nowrap; }
.pill.on { background: rgba(34, 197, 94, .16); color: #86efac; }
.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; color: var(--ink-2); padding: 10px 12px; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: #fff; border-bottom-color: var(--blue); font-weight: 600; }
.dr-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.dr-body h3 { font-size: .98rem; margin: 4px 0 10px; display: flex; align-items: center; gap: 8px; }
.dr-body h3 svg { width: 18px; height: 18px; color: var(--green); }
.ents, .devs, .plist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.ents li, .devs li, .plist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.ents li.live { border-color: rgba(59, 130, 246, .5); box-shadow: inset 3px 0 0 var(--blue); }
.ents b, .devs b, .plist b { display: block; font-weight: 600; }
.ents small, .devs small, .plist small { color: var(--ink-3); font-size: .8rem; display: block; }
.devs li { grid-template-columns: auto minmax(0, 1fr); }
.devs li > svg { width: 22px; height: 22px; color: var(--ink-2); }
.devs .acts { grid-column: 1 / -1; display: flex; gap: 8px; }
.mini { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 9px; padding: 5px 11px; font-size: .8rem; white-space: nowrap; }
.mini:hover { color: #fff; border-color: rgba(59, 130, 246, .7); }
.mini.warn { color: #fca5a5; border-color: rgba(248, 113, 113, .45); }
.mini.sure { background: rgba(248, 113, 113, .2); color: #fff; }
.grant { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.grant label { display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); }
.grant label small { color: var(--ink-3); }
.grant input, .grant select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); }
.btn-go { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 0; border-radius: 12px; font: 600 .98rem var(--display); color: #062b10; background: linear-gradient(180deg, #a3e635, #65d244); box-shadow: 0 10px 24px -12px rgba(132, 204, 22, .9); }
.btn-go svg { width: 19px; height: 19px; }
.btn-go:hover { filter: brightness(1.06); }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-funnel, .r-rev { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .logo span, .side-foot { display: none; }
  .logo img { width: 32px; height: 32px; }
  .nav { display: flex; gap: 2px; }
  .nav button { padding: 8px 10px; white-space: nowrap; font-size: .88rem; gap: 6px; }
  .nav button.on { box-shadow: inset 0 -2px 0 var(--blue); }
  .nav button em { display: none; }
  .main { padding: 0 14px 24px; }
  .top { position: static; flex-wrap: wrap; padding-top: 14px; }
  .top .search { order: 3; width: 100%; }
  .kpis, .kpis.three { grid-template-columns: minmax(0, 1fr); }
  .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .td b { font-size: 1.7rem; }
  .states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel { flex-direction: column; gap: 6px; min-height: 0; }
  .fs, .fs:first-child { clip-path: none; margin: 0; border-radius: 12px; flex-direction: row; justify-content: space-between; align-items: center; text-align: left; padding: 10px 14px; gap: 8px; }
  .fs b { margin: 0; font-size: 1.2rem; }
  .fsub { display: none; }
  .donut-wrap { grid-template-columns: 120px minmax(0, 1fr); }
  .donut { width: 120px; height: 120px; }
  .modes { margin-left: 0; }
  .modes p { right: 14px; }
}

/* invite a friend */
.tbl.refs td { vertical-align: top; }
.tbl.refs .why { display: block; margin-top: 4px; color: var(--ink-3); font-size: .76rem; }
.tbl.refs .code { display: block; color: var(--ink-3); font-size: .74rem; letter-spacing: .08em; }
.tbl.refs .link { padding: 0; font: inherit; color: inherit; text-align: left; display: inline; }
.tbl.refs .link:hover { color: var(--ink); text-decoration: underline; }
