/* MonoLog (formerly MonoBlock Analytics). Values from design_handoff_monoblock_analytics (high fidelity). */
:root {
  --ink: #16233d;
  --text-2: #5e6880;
  --muted: #8a93a6;
  --head-muted: #93a0b8;
  --head-muted-2: #b5bfd1;
  --bg: #f3f1ec;
  --card: #fbfaf7;
  --raised: #ffffff;
  --border: #e3dfd6;
  --divider: #ece8e0;
  --row-divider: #f0ede6;
  --track: #e8e5dd;
  --blue: #2f5bd3;
  --blue-tint: #e4eaf8;
  --warm-tint: #ede7da;
  --blue-light: #a9b8e6;
  --compare: #a9b0bf;
  --good: #2f9e63;
  --good-ink: #1f6b43;
  --good-bg: #e3f1e8;
  --live-bg: #e6f2ea;
  --warn: #e0a43a;
  --warn-ink: #8a5a00;
  --warn-bg: #fbf0d9;
  --bad: #d2553c;
  --bad-ink: #a23a26;
  --bad-bg: #f8e6e2;
  /* chart notes, by category (aliases, so a theme only redefines the base colours) */
  --note-note: var(--blue);
  --note-launch: var(--good);
  --note-campaign: var(--warn);
  --note-incident: var(--bad);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 "Geist", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
a, .link { color: var(--blue); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; font-weight: 500; }
a:hover, .link:hover { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
@keyframes mbpulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

/* ---------- header ---------- */
.top { background: var(--ink); color: var(--bg); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 0 32px; height: 60px; display: flex; align-items: center; gap: 40px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; white-space: nowrap; line-height: 1; }
.wordmark { font-family: "Bungee", sans-serif; font-size: 20px; letter-spacing: .01em; }
.product { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--head-muted); padding-left: 1px; }
.tabs { display: flex; gap: 4px; font-size: 14px; }
.tabs button { border: 0; padding: 7px 14px; border-radius: 8px; cursor: pointer; background: transparent; color: var(--head-muted-2); }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 500; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--head-muted-2); white-space: nowrap; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }

/* ---------- layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 20px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.project { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.project .badge { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.project .name { font-weight: 600; font-size: 15px; white-space: nowrap; }
.project .caret { color: var(--muted); font-size: 11px; }
.project select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.project:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.live { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--live-bg); color: var(--good-ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.live .dot, .m-live .dot { position: relative; width: 8px; height: 8px; display: inline-block; }
.live .dot i, .m-live .dot i { position: absolute; inset: 0; border-radius: 50%; background: var(--good); }
.live .dot i:first-child, .m-live .dot i:first-child { animation: mbpulse 1.6s ease-out infinite; }
.seg { display: flex; padding: 3px; background: var(--track); border-radius: 10px; gap: 2px; }
.seg button { border: 0; font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; background: transparent; color: var(--text-2); }
.seg.small button { padding: 6px 12px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 35, 61, .12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; white-space: nowrap; }
.chip b { font-weight: 600; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
/* An in-card toggle reloading just that card: its body dims (after a beat, so fast answers don't flicker); its head and toggle stay. */
.slot { display: contents; }
[data-card].loading > :not(.card-head):not(.mseg) { opacity: .45; pointer-events: none; transition: opacity .15s ease .12s; }
.card-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.notice { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 24px; color: var(--text-2); }
.notice.error { background: var(--bad-bg); border-color: #efc9bf; color: var(--bad-ink); }
.empty { color: var(--muted); padding: 22px 0 8px; font-size: 14px; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--divider) 0, #f6f4ef 50%, var(--divider) 100%) 0 0 / 800px 100%; animation: shimmer 1.4s linear infinite; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(132px, 1fr)); overflow-x: auto; }
.kpi { text-align: left; border: 0; color: inherit; cursor: pointer; padding: 16px 14px 14px; min-width: 120px; background: transparent; border-right: 1px solid var(--divider); border-bottom: 3px solid transparent; display: flex; flex-direction: column; gap: 8px; }
.kpi:last-child { border-right: 0; }
.kpi[aria-pressed="true"] { background: var(--raised); border-bottom-color: var(--blue); }
.kpi .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi .value { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.kpi .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi svg { flex: 1; min-width: 0; max-width: 72px; height: 24px; overflow: visible; }
.delta { font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 6px; white-space: nowrap; background: var(--divider); color: var(--text-2); }
.delta.good { background: var(--good-bg); color: var(--good-ink); }
.delta.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------- main chart ---------- */
.chart-wrap { padding: 24px 28px 20px; border-top: 1px solid var(--divider); }
.chart-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.chart-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .cur { width: 14px; height: 3px; border-radius: 2px; background: var(--blue); }
.legend .prev { width: 14px; border-top: 2px dashed var(--compare); }
.chart { display: flex; gap: 12px; }
.chart .yaxis { position: relative; width: 36px; height: 260px; font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; }
.chart .yaxis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.chart .plot-col { flex: 1; min-width: 0; }
.chart .plot { position: relative; height: 260px; cursor: crosshair; }
.chart .grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--divider); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .guide { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--ink); opacity: .25; pointer-events: none; }
.chart .hdot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--blue); border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--blue); pointer-events: none; }
.chart .tip { position: absolute; top: 8px; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12px; pointer-events: none; min-width: 150px; box-shadow: 0 8px 24px rgba(22, 35, 61, .2); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.chart .tip .d { color: var(--head-muted); }
.chart .tip .r { display: flex; justify-content: space-between; gap: 16px; white-space: nowrap; }
.chart .tip .r.p { color: var(--head-muted); }
.chart .tip b { font-weight: 600; }
/* chart notes: a dashed day line, a diamond on the x-axis, and the note in the day's tooltip */
.cat-note { --nc: var(--note-note); }
.cat-launch { --nc: var(--note-launch); }
.cat-campaign { --nc: var(--note-campaign); }
.cat-incident { --nc: var(--note-incident); }
.chart .plot.pickable { cursor: copy; }
.chart .nline { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--nc); opacity: .5; pointer-events: none; }
.chart .nmark { position: absolute; bottom: 0; width: 10px; height: 10px; margin: 0 0 -5px -5px; padding: 0; border: 2px solid var(--card); border-radius: 2px; background: var(--nc); box-shadow: 0 0 0 1px var(--nc); transform: rotate(45deg); cursor: pointer; z-index: 1; }
.chart .nmark::before { content: ""; position: absolute; inset: -10px; } /* a bigger tap target */
.chart .nmark:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.chart .tip .nt { display: flex; gap: 8px; max-width: 240px; white-space: normal; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); }
.chart .tip .nt::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 1px; background: var(--nc); transform: rotate(45deg); }
.chart .tip .hint { color: var(--head-muted); font-size: 11px; }
.notes { margin-top: 8px; }
.notes:empty { display: none; }
.notes-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.notes-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.notes-empty { margin: 0; font-size: 13px; color: var(--muted); }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--row-divider); min-width: 0; }
.note-row:first-child { border-top: 0; }
.ndot { flex: none; width: 8px; height: 8px; border-radius: 1px; background: var(--nc); transform: rotate(45deg); }
.note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.note-text { font-size: 14px; overflow-wrap: anywhere; }
.note-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-acts { display: flex; gap: 12px; flex: none; }
.note-form { margin: 8px 0 12px; }
.note-form .narrow-date { flex: 0 0 170px; }
.note-form .narrow-cat { flex: 0 0 150px; }
@media (max-width: 640px) {
  .notes { margin-top: 12px; }
  .note-acts .link, .notes-head .link { min-height: 44px; }
  .note-form .narrow-date, .note-form .narrow-cat { flex: 1 1 140px; }
  .note-form .in { font-size: 16px; } /* no zoom on focus in iOS Safari */
  .note-form .btn { flex: 1; min-height: 44px; }
}
.chart .xaxis { position: relative; height: 28px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chart .xaxis span { position: absolute; top: 10px; white-space: nowrap; }

/* ---------- ranked bar rows ---------- */
.table-scroll { overflow-x: auto; }
.rows { min-width: 0; }
.rows.wide { min-width: 640px; }
.rows.perf { min-width: 560px; }
.rhead, .row { display: grid; gap: 0 12px; }
.rhead { font-size: 11px; font-family: var(--mono); letter-spacing: .06em; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--divider); text-transform: uppercase; }
.rhead span + span { text-align: right; }
.row { align-items: center; padding: 6px 0; font-size: 14px; border-radius: 6px; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--bg); }
.row > .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.row > .n.p { font-weight: 500; color: var(--ink); }
.barcell { position: relative; height: 32px; display: flex; align-items: center; min-width: 0; }
.barcell .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-tint); border-radius: 6px; }
.barcell.warm .bar { background: var(--warm-tint); }
.barcell .lbl { position: relative; padding-left: 10px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.barcell .lbl .sub { font-size: 12px; color: var(--muted); }
.barcell .path { position: relative; padding-left: 10px; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iso { font-family: var(--mono); font-size: 11px; padding: 2px 5px; border-radius: 4px; background: var(--ink); color: #fff; align-self: center; }
.barcell .lbl.center { align-items: center; gap: 10px; }

/* ---------- goals ---------- */
.goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.goal { border: 1px solid var(--divider); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--raised); }
.goal .t { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal .t span:first-child { font-weight: 600; font-size: 15px; }
.goal .rate { display: flex; align-items: baseline; gap: 8px; }
.goal .rate b { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.goal .rate span { font-size: 13px; color: var(--text-2); }
.progress { height: 6px; border-radius: 3px; background: var(--divider); overflow: hidden; }
.progress div { height: 100%; background: var(--good); border-radius: 3px; }
.goal .f { display: flex; gap: 24px; font-size: 13px; color: var(--text-2); }
.goal .f b { color: var(--ink); font-weight: 600; }

/* ---------- devices ---------- */
.devices { display: flex; flex-direction: column; gap: 22px; }
.stackbar { display: flex; height: 12px; gap: 3px; }
.stackbar div { border-radius: 4px; }
.dev-legend { display: flex; gap: 24px; flex-wrap: wrap; }
.dev-legend > div { display: flex; flex-direction: column; gap: 2px; }
.dev-legend .k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.dev-legend .k i { width: 8px; height: 8px; border-radius: 2px; }
.dev-legend b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.share-list { display: flex; flex-direction: column; gap: 10px; }
.share-list .h { font-size: 11px; font-family: var(--mono); letter-spacing: .06em; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
.share-item { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.share-item .l { display: flex; justify-content: space-between; }
.share-item .l span:last-child { font-variant-numeric: tabular-nums; color: var(--text-2); }
.share-item .t { height: 4px; border-radius: 2px; background: var(--divider); }
.share-item .t div { height: 100%; background: var(--blue); border-radius: 2px; }

/* ---------- performance ---------- */
.perf-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.perf-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.perf-head .s { font-size: 13px; color: var(--text-2); }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.vital { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.vital .t { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vital .abbr { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.vital .full { font-size: 13px; color: var(--text-2); }
.vital .v { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.vital .dist { display: flex; height: 8px; gap: 2px; }
.vital .dist div { border-radius: 3px; }
.vital .dist-l { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.vital .thr { font-size: 12px; color: var(--muted); border-top: 1px solid var(--divider); padding-top: 10px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.pill.good, .dotkey.good i, .vdot.good { --c: var(--good); }
.pill.good { background: var(--good-bg); color: var(--good-ink); }
.pill.ni { background: var(--warn-bg); color: var(--warn-ink); }
.pill.poor { background: var(--bad-bg); color: var(--bad-ink); }
.pill.none { background: var(--divider); color: var(--text-2); }
.dots { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.dots span { display: flex; align-items: center; gap: 6px; }
.dot8 { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot8.good { background: var(--good); }
.dot8.ni { background: var(--warn); }
.dot8.poor { background: var(--bad); }
.prow { display: grid; gap: 0 12px; align-items: center; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--row-divider); }
.prow .path { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 10px; }
.prow .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.prow .vc { display: flex; align-items: center; justify-content: flex-end; gap: 7px; font-variant-numeric: tabular-nums; font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- conversions (goals editor, funnels) ---------- */
.gname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gname b { font-weight: 500; }
.gname span { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: flex-end; }
.card-actions { display: flex; gap: 14px; }
.link.danger { color: var(--bad-ink); }
.editor { background: var(--raised); border: 1px solid var(--divider); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.editor h3 { margin: 0; font-size: 15px; font-weight: 600; }
.fld { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.fld > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
.fld.narrow { flex: 0 0 120px; }
.two-fld { display: flex; gap: 12px; flex-wrap: wrap; }
.in { height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); padding: 0 12px; font-size: 14px; color: var(--ink); min-width: 0; }
.in:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.rule { display: flex; gap: 8px; flex-wrap: wrap; }
.rule > select.in { flex: 0 0 140px; }
.rule-value { display: contents; }
.rule-value > * { flex: 1 1 200px; display: none; }
.rule-value[data-kind="event"] > [name$="value_event"], .rule-value[data-kind="pageview"] > [name$="value_pageview"], .rule-value[data-kind="click"] > [name$="value_click"] { display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: grid; grid-template-columns: 24px minmax(140px, 1fr) minmax(0, 2fr); gap: 8px; align-items: center; }
.num-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; margin-right: 8px; flex: none; }
.steps .num-badge { margin: 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #2649ad; }
.form-err { color: var(--bad-ink); background: var(--bad-bg); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.fld > .fld-help { font-size: 12px; font-weight: 400; color: var(--muted); }
.rows.xwide { min-width: 840px; }

/* ---------- events (Conversions): custom events, opened in place to their properties ---------- */
.ev-search { height: 34px; width: 220px; font-size: 13px; }
.ev-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.ev-caret { display: inline-block; width: 14px; flex: none; color: var(--text-2); font-size: 14px; line-height: 1; transition: transform .15s ease; }
.ev.open .ev-caret { transform: rotate(90deg); }
.ev-name { overflow: hidden; text-overflow: ellipsis; }
.ev.open > .row { background: var(--bg); }
.ev-goal { font-size: 11px; padding: 2px 6px; }
.ev-detail { margin: 4px 0 12px; padding: 16px 18px; background: var(--raised); border: 1px solid var(--divider); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; }
.ev-props { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 28px; }
.ev-prop { min-width: 0; }
.ev-prop-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--divider); }
.ev-prop-h .mono { color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-prop .mbar { height: 30px; margin-top: 3px; }
.ev-prop .mbar .l { font-size: 13px; display: block; }
.ev-prop .mbar .v { font-size: 13px; padding-right: 2px; }
.ev-more { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ev-num { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding-top: 10px; }
.ev-num div { display: flex; flex-direction: column; gap: 2px; }
.ev-num span { font-size: 11px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ev-num b { font-size: 18px; font-weight: 600; color: var(--ink); }
.ev-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.ev-detail .rev-note { margin: 0; }
.ev-list .m-src .a .ev-goal { flex: none; }
.ev-list .m-src .m { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .ev-search { width: 100%; height: 44px; font-size: 16px; } /* no zoom on focus in iOS Safari */
  .ev-detail { padding: 14px; margin: 0 0 8px; }
  .ev-props { grid-template-columns: 1fr; }
  .ev-actions .btn { min-height: 44px; width: 100%; }
}

/* ---------- revenue (Conversions; Traffic adds columns to Sources). Colours are tokens only. ---------- */
.rev-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px 24px 16px; }
.rev-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cur-code { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; background: var(--blue-tint); color: var(--blue); }
.rev-from { font-size: 12px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.cur-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cur-form .in { height: 38px; }
.rev-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--divider); }
.rev-kpi { padding: 16px 20px; border-right: 1px solid var(--divider); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rev-kpi:last-child { border-right: 0; }
.rev-kpi .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.rev-kpi .value { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rev-kpi .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.seg-scroll { position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-scroll .seg { width: max-content; }
.rev-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .rev-head { padding: 16px 16px 12px; }
  .rev-from { flex-basis: 100%; }
  .rev-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rev-kpi { padding: 14px 16px; }
  .rev-kpi:nth-child(2n) { border-right: 0; }
  .rev-kpi:nth-child(-n + 2) { border-bottom: 1px solid var(--divider); }
  .rev .chart-wrap { padding: 16px; }
  .rev .chart-head { margin-bottom: 12px; }
  .cur-form .btn, .cur-form .in { min-height: 44px; }
  .cur-form .btn { flex: 1; }
}
.funnel { display: flex; flex-direction: column; gap: 6px; }
.f-sum { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.f-sum b { font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.f-sum span { font-size: 13px; color: var(--text-2); }
.f-step { display: flex; flex-direction: column; gap: 8px; }
.f-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.f-top > span:first-child { display: flex; align-items: center; font-weight: 500; }
.f-top > span:last-child { color: var(--text-2); }
.f-top b { color: var(--ink); font-weight: 600; }
.f-bar { height: 32px; border-radius: 6px; background: var(--divider); overflow: hidden; }
.f-bar div { height: 100%; background: var(--blue); border-radius: 6px; min-width: 3px; }
.f-drop { display: flex; gap: 14px; font-size: 12px; color: var(--muted); padding: 4px 0 4px 30px; font-family: var(--mono); }
@media (max-width: 640px) {
  .steps li { grid-template-columns: 24px 1fr; }
  .steps li .rule { grid-column: 2; }
  .rule > select.in { flex: 1 1 100%; }
}

/* ---------- page flow ---------- */
.flow-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.flow-pick { max-width: 100%; }
.flow-pick .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.flow-pick select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 16px; }
.flow-sum { font-size: 13px; color: var(--text-2); }
.flow-sum b { color: var(--ink); font-weight: 600; }
.flow-src { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 8px 0 20px; }
.flow-col .h { display: block; font-size: 11px; font-family: var(--mono); letter-spacing: .06em; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--divider); margin-bottom: 4px; }
.flow-top { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.flow-step .arrow { color: var(--muted); }
@media (max-width: 640px) { .flow-grid { grid-template-columns: 1fr; gap: 16px; } .flow-pick .name { max-width: 220px; } }

/* ---------- returning visitors and retention cohorts ---------- */
.ret-split { display: flex; flex-direction: column; gap: 12px; }
.ret-legend { display: flex; gap: 32px; flex-wrap: wrap; }
.ret-legend > div { display: flex; flex-direction: column; gap: 2px; }
.ret-legend .k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.ret-legend .k i { width: 8px; height: 8px; border-radius: 2px; }
.ret-legend .v { display: flex; align-items: baseline; gap: 8px; }
.ret-legend .v b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.ret-legend .v span { font-size: 13px; color: var(--text-2); }
.ret-note, .ret-lead { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ret-lead { margin: 0 0 12px; font-size: 13px; color: var(--text-2); }
.ret-note b { color: var(--ink); font-weight: 600; }
.ret-why { display: block; margin-top: 2px; }
.ret-empty { color: var(--text-2); font-size: 13px; line-height: 1.5; padding: 4px 0; }
.ret-empty b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cohorts { border-collapse: separate; border-spacing: 3px; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 100%; }
.cohorts th { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .02em; text-align: center; padding: 4px 6px; white-space: nowrap; }
.cohorts th[scope="row"], .cohorts thead th:first-child, .cohorts tfoot th { text-align: left; color: var(--ink); font-family: inherit; font-size: 13px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.cohorts thead th:first-child { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.cohorts thead th:nth-child(2) { text-align: right; padding-right: 8px; }
.cohorts th small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.cohorts td { min-width: 52px; height: 34px; text-align: center; border-radius: 6px; color: var(--ink); }
.cohorts td.dark { color: #fff; }
.cohorts td.size { color: var(--text-2); text-align: right; padding-right: 8px; min-width: 56px; }
.cohorts td.na { color: var(--muted); background: var(--row-divider); }
.cohorts td.void { background: transparent; }
.cohorts td.partial { outline: 1.5px dashed var(--ink); outline-offset: -3px; }
.cohorts td.avg { background: var(--track); font-weight: 600; }
.cohorts tfoot th { font-weight: 600; }
@media (max-width: 640px) {
  .ret-legend { gap: 24px; }
  .ret-legend .v b { font-size: 20px; }
  .cohorts { font-size: 11px; border-spacing: 2px; }
  .cohorts td { min-width: 40px; height: 30px; }
  .cohorts td.size { min-width: 40px; padding-right: 4px; }
  .cohorts th[scope="row"], .cohorts tfoot th { font-size: 12px; }
}

/* ---------- recent visits ---------- */
.visit { border-bottom: 1px solid var(--row-divider); }
.visit-row { width: 100%; display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 6px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 8px; color: inherit; }
.visit-row:hover, .visit.open .visit-row { background: var(--bg); }
.visit-row .vt { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.visit-row .vw { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.visit-row .vw b { font-weight: 500; font-size: 14px; }
.visit-row .vw span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-row .vn { font-size: 13px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline { padding: 4px 6px 14px 138px; }
.timeline ol { list-style: none; margin: 0 0 10px; padding: 0; }
.timeline li { display: grid; grid-template-columns: 64px 14px minmax(0, 1fr); align-items: start; gap: 8px; font-size: 13px; padding: 5px 0; }
.timeline .off { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; text-align: right; }
.timeline .dotline { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 5px; }
.timeline li.ev .dotline { background: var(--good); }
.timeline .what { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .visit-row { grid-template-columns: minmax(0, 1fr) auto; }
  .visit-row .vt { grid-column: 1 / -1; }
  .timeline { padding-left: 0; }
}

/* ---------- map (extra to the handoff: the Countries card's Map view) ---------- */
.map svg { display: block; }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.map-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.maptip { position: fixed; pointer-events: none; z-index: 20; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 12px; box-shadow: 0 8px 24px rgba(22, 35, 61, .2); }

@media (max-width: 960px) {
  .top-in { gap: 20px; padding: 0 16px; }
  main { padding: 20px 16px 48px; }
  .who span:first-child { display: none; }
}
/* ---------- mobile (design_handoff_monoblock_analytics_mobile), below 640px ---------- */
.mtabs, .m-only { display: none; }
.chart.compact .plot { height: 150px; touch-action: pan-y; }
.chart.compact .grid span { position: absolute; right: 0; top: -15px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.chart.compact .xaxis { height: 22px; font-size: 10px; }
.chart.compact .xaxis span { top: 8px; }
.chart .plot { touch-action: pan-y; }

@media (max-width: 640px) {
  .desk-only, .tabs, .who #who { display: none !important; }
  .m-only { display: revert; }
  html { scrollbar-width: none; }
  ::-webkit-scrollbar { display: none; }
  .top-in { height: auto; padding: 14px 20px 16px; gap: 0; justify-content: space-between; }
  .wordmark { font-size: 19px; }
  .brand { gap: 2px; }
  .product { font-size: 11px; }
  .avatar { width: 32px; height: 32px; font-size: 13px; }
  main { padding: 16px 16px 96px; gap: 12px; }
  .stack { gap: 12px; }

  /* bottom tab bar: floating navy capsule */
  .mtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; position: fixed; left: 16px; right: 16px; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); height: 50px; padding: 5px; border-radius: 18px; background: var(--ink); box-shadow: 0 12px 28px rgba(22, 35, 61, .28); z-index: 10; }
  .mtabs button { border: 0; background: transparent; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--head-muted); font-size: 12px; font-weight: 500; cursor: pointer; min-height: 40px; }
  .mtabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
  .mtabs button[aria-selected="true"] .ic { color: #8fb0ff; }
  .ic { height: 17px; display: grid; place-items: center; }
  .ic.grid4 { grid-template-columns: 7px 7px; gap: 3px; height: auto; }
  .ic.grid4 i { width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
  .ic.bars3 { display: flex; align-items: flex-end; gap: 3px; }
  .ic.bars3 i { width: 4px; border-radius: 2px; background: currentColor; }
  .ic.bars3 i:nth-child(1) { height: 7px; } .ic.bars3 i:nth-child(2) { height: 12px; } .ic.bars3 i:nth-child(3) { height: 17px; }
  .ic.gauge { width: 17px; border-radius: 50%; border: 2.5px solid currentColor; border-bottom-color: transparent; }
  .ic.gauge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

  .card { padding: 16px; }
  .card-head { margin-bottom: 8px; gap: 12px; }
  .card-head h2 { font-size: 15px; }
  .hint { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
}

/* mobile building blocks (only rendered on small screens) */
.m-row { display: flex; gap: 8px; align-items: center; }
.m-project { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; height: 44px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; flex: 1; min-width: 0; }
.m-project .badge { width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.m-project .name { font-weight: 600; font-size: 15px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-project .caret, .m-date .caret { color: var(--muted); font-size: 10px; }
.m-project select, .m-date select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.m-live { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 999px; background: var(--live-bg); color: var(--good-ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.m-date { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); font-size: 14px; font-weight: 500; white-space: nowrap; }
.mseg { display: flex; padding: 3px; background: var(--track); border-radius: 12px; gap: 2px; }
.mseg button { flex: 1; border: 0; font-size: 13px; font-weight: 500; height: 38px; border-radius: 9px; cursor: pointer; white-space: nowrap; background: transparent; color: var(--text-2); }
.mseg.s button { height: 36px; }
.mseg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(22, 35, 61, .12); }
.m-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-kpi { text-align: left; color: inherit; cursor: pointer; padding: 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--border); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-kpi[aria-pressed="true"] { background: var(--raised); border-color: var(--blue); }
.m-kpi .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.m-kpi .vr { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.m-kpi .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.m-kpi .delta, .m-goal .delta { font-size: 11px; padding: 3px 6px; }
.m-chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; gap: 8px; }
.m-chart-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.m-chart-head span { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.m-legend { display: flex; gap: 12px; font-size: 11px; color: var(--text-2); margin-bottom: 14px; }
.m-legend span { display: flex; align-items: center; gap: 5px; }
.m-legend .cur { width: 12px; height: 3px; border-radius: 2px; background: var(--blue); }
.m-legend .prev { width: 12px; border-top: 2px dashed var(--compare); }
.mbar { position: relative; height: 44px; display: flex; align-items: center; margin-top: 4px; border-radius: 8px; }
.mbar .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue-tint); border-radius: 8px; }
.mbar.warm .bar { background: var(--warm-tint); }
.mbar .l { position: relative; padding-left: 10px; flex: 1; min-width: 0; font-size: 14px; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar .l.center { align-items: center; gap: 8px; }
.mbar .l .sub { font-size: 11px; color: var(--muted); }
.mbar .l.path { font-family: var(--mono); font-size: 13px; display: block; }
.mbar .iso { font-size: 10px; }
.mbar .v { position: relative; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; padding-left: 8px; }
.mbar.clickable { cursor: pointer; }
.m-goals { display: flex; flex-direction: column; gap: 12px; }
.m-goal { background: var(--raised); border: 1px solid var(--divider); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.m-goal .t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-goal .t span:first-child { font-weight: 600; font-size: 14px; }
.m-goal .r { display: flex; align-items: baseline; gap: 6px; }
.m-goal .r b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.m-goal .r span { font-size: 12px; color: var(--text-2); }
.m-src { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--row-divider); }
.m-src.clickable { cursor: pointer; }
.m-src .a { display: flex; align-items: baseline; gap: 8px; }
.m-src .a span:first-child { flex: 1; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-src .a span:first-child small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.m-src .a b { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.m-src .t { height: 4px; border-radius: 2px; background: var(--divider); }
.m-src .t div { height: 100%; background: var(--blue); border-radius: 2px; }
.m-src .m { font-size: 12px; color: var(--text-2); }
.m-dev { display: flex; flex-direction: column; gap: 14px; }
.m-dev .stackbar { height: 10px; }
.m-dev .legend3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-dev .legend3 > div { display: flex; flex-direction: column; gap: 2px; }
.m-dev .legend3 .k { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.m-dev .legend3 .k i { width: 8px; height: 8px; border-radius: 2px; }
.m-dev .legend3 b { font-size: 20px; font-weight: 600; }
.m-dev .browsers { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--divider); padding-top: 12px; }
.m-dev .br { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.m-dev .br span:first-child { width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-dev .br .t { flex: 1; height: 4px; border-radius: 2px; background: var(--divider); }
.m-dev .br .t div { height: 100%; background: var(--blue); border-radius: 2px; }
.m-dev .br span:last-child { width: 34px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.m-pe { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--row-divider); font-size: 14px; }
.m-pe .p { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-pe b { font-weight: 600; font-variant-numeric: tabular-nums; }
.m-pe span:last-child { width: 44px; text-align: right; font-size: 12px; color: var(--text-2); }
.m-perf-head { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.m-perf-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.m-perf-head span { font-size: 13px; color: var(--text-2); }
.m-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-vital { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.m-vital .t { display: flex; justify-content: space-between; align-items: center; }
.m-vital .t span:first-child { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.m-vital .rd { width: 10px; height: 10px; border-radius: 50%; }
.m-vital .v { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.m-vital .pill { align-self: flex-start; font-size: 11px; padding: 3px 7px; }
.m-vital .dist { display: flex; height: 6px; gap: 2px; }
.m-vital .dist div { border-radius: 3px; }
.m-vital .f { font-size: 11px; color: var(--muted); }
.m-pages-sub { font-size: 12px; color: var(--text-2); }
.m-page { padding: 14px 0; border-bottom: 1px solid var(--row-divider); display: flex; flex-direction: column; gap: 10px; }
.m-page .a { display: flex; align-items: baseline; gap: 8px; }
.m-page .a span:first-child { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-page .a span:last-child { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.m-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.m-cell { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 8px; background: var(--divider); min-width: 0; }
.m-cell span:first-child { font-family: var(--mono); font-size: 10px; color: var(--text-2); }
.m-cell b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-cell.good { background: var(--good-bg); } .m-cell.good b { color: var(--good-ink); }
.m-cell.ni { background: var(--warn-bg); } .m-cell.ni b { color: var(--warn-ink); }
.m-cell.poor { background: var(--bad-bg); } .m-cell.poor b { color: var(--bad-ink); }

/* ---------- share links ---------- */
.share-back { position: fixed; inset: 0; z-index: 50; background: rgba(22, 35, 61, .35); display: grid; place-items: start center; padding: 72px 16px 16px; overflow-y: auto; }
.share-back[hidden] { display: none; }
.share-card { width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 28px rgba(22, 35, 61, .28); }
.share-card .card-head { margin-bottom: 0; }
.share-note { margin: 0; font-size: 13px; color: var(--text-2); }
.share-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.share-form .fld:first-child { flex: 1 1 200px; }
.share-new { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--good-ink); background: var(--good-bg); border-radius: 10px; padding: 10px 12px; }
.share-copy { display: flex; gap: 8px; }
.share-copy .in { flex: 1; font-family: var(--mono); font-size: 12px; }
.share-list { list-style: none; margin: 0; padding: 0; }
.share-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--row-divider); }
.share-l { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.share-l > span:last-child { flex-basis: 100%; font-size: 12px; color: var(--text-2); }
.share-empty { font-size: 13px; color: var(--muted); }
.m-share { height: 44px; border-radius: 12px; flex: none; }
/* Shared (read-only) view: one project, no edits, no individual visits. */
.shared .no-share, .shared [data-tab="conversions"], .shared [data-tab="errors"], .shared button[data-tab="realtime"], .shared .project .caret, .shared .m-project .caret, .shared .card:has(#visits), .shared .who { display: none !important; }
.shared .project select, .shared .m-project select { pointer-events: none; }
/* Web Vitals: a p75 from a handful of loads is noise, so say so. */
.vital .low, .m-vital .low { font-size: 12px; color: var(--muted); font-style: italic; }
.notice.low-sample { padding: 10px 16px; font-size: 13px; }
/* ---------- Errors (web/errors.ts) ---------- */
.err-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.err-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.err-n { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 2px; }
.card-head .hint { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.err-list { display: flex; flex-direction: column; }
.err-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 60px 84px 84px 110px 130px; gap: 12px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--row-divider); cursor: pointer; border-radius: 8px; }
.err-row:hover { background: var(--raised); }
.err-row.err-rh { cursor: default; border-top: 0; padding-top: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.err-row.err-rh:hover { background: none; }
.err-row.err-rh span:not(:first-child) { text-align: right; }
.err-row > .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; }
.err-row > .n.p { color: var(--ink); font-weight: 600; }
.err-issue { min-width: 0; }
.err-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.err-msg { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.err-msg.big { white-space: normal; font-size: 15px; color: var(--ink); margin: 10px 0 6px; overflow-wrap: anywhere; }
.err-rel { text-align: right; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-act { display: flex; gap: 12px; justify-content: flex-end; }
.err-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.err-back { align-self: flex-start; }
.err-sum-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.err-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.err-stats div { background: var(--raised); border: 1px solid var(--divider); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.err-stats span { font-size: 12px; color: var(--text-2); }
.err-stats b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err-note { font-size: 13px; color: var(--text-2); background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.err-note.good { background: var(--good-bg); color: var(--good-ink); }
.err-frames { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.err-frame { padding: 10px 12px; border-radius: 10px; background: var(--raised); border: 1px solid var(--divider); font-size: 13px; overflow-wrap: anywhere; }
.err-frame .mono { font-size: 12px; color: var(--text-2); }
.err-frame.lib { background: transparent; color: var(--text-2); }
.err-frame code { display: block; margin-top: 6px; font-family: var(--mono); font-size: 12px; background: var(--bg); border-radius: 6px; padding: 6px 8px; white-space: pre-wrap; color: var(--ink); }
.err-min { font-size: 11px !important; color: var(--muted) !important; margin-top: 4px; }
.err-raw { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--text-2); }
.err-occ { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--row-divider); font-size: 13px; }
.err-occ:first-child { border-top: 0; }
.err-occ .n { font-variant-numeric: tabular-nums; color: var(--text-2); }
.err-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.err-occ .err-meta { margin: 0; }
@media (max-width: 640px) {
  .mtabs { grid-template-columns: repeat(4, 1fr); }
  .mtabs button { gap: 5px; font-size: 11px; }
  .ic.bug { width: 13px; height: 16px; border-radius: 7px 7px 6px 6px; border: 2.5px solid currentColor; }
  .ic.bug i { width: 2.5px; height: 7px; background: currentColor; border-radius: 1px; }
  .err-head h1 { font-size: 20px; }
  .err-head .seg { width: 100%; }
  .err-head .seg button { flex: 1; padding: 8px 4px; }
  .err-row { display: block; padding: 12px 0; border-radius: 0; }
  .err-row:hover { background: none; }
  .err-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .err-stats div:last-child { grid-column: 1 / -1; }
  .err-sum-head .btns { width: 100%; }
  .err-sum-head .btn { flex: 1; min-height: 44px; }
  .err-occ { grid-template-columns: 1fr; gap: 2px; }
}

.shared .live, .shared .m-live { cursor: default !important; }

/* ---------- Settings → Users (web/settings.ts) ---------- */
.settings { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.usr-intro { margin: 0 0 12px; font-size: 13px; }
.usr-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) 110px 210px; gap: 12px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--row-divider); font-size: 14px; }
.usr-row.usr-rh { border-top: 0; padding-top: 0; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.usr-row.editing { display: block; background: var(--raised); border-radius: 12px; border: 1px solid var(--divider); padding: 16px; margin: 8px 0; }
.usr-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.usr-profile { font-size: 13px; overflow-wrap: anywhere; }
.usr-seen { font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.usr-how { font-size: 11px; color: var(--muted); }
.usr-act { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.usr-edit { display: flex; flex-direction: column; gap: 14px; }
.usr-edit .fld span, .usr-role legend { font-size: 12px; color: var(--text-2); }
.usr-role { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.usr-role label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.usr-orgs { display: flex; flex-direction: column; gap: 8px; }
.usr-orgs[hidden] { display: none; }
.usr-org { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.usr-org select { min-width: 130px; }
.usr-note { margin: 4px 0 0; font-size: 12px; }
.usr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .usr-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .usr-act { justify-content: flex-start; margin-top: 4px; }
  .usr-act .link, .usr-actions .btn { min-height: 44px; }
  .usr-actions .btn { flex: 1; }
  .usr-org select { min-height: 44px; }
}
/* Settings sections: Global, then Site settings with its own site picker. */
.set-sec { display: flex; flex-direction: column; gap: 16px; }
.set-sec[hidden] { display: none; }
.set-head { flex-wrap: wrap; gap: 12px; }
.set-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.set-sec-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.set-sec-title h2 { margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.set-sec-title p { margin: 0; font-size: 13px; }
.set-cards { display: flex; flex-direction: column; gap: 16px; }
.set-site select { min-width: 240px; max-width: 360px; font-size: 14px; font-weight: 600; padding: 0 12px; }
.set-site-one { font-size: 14px; font-weight: 600; padding: 9px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
@media (max-width: 640px) {
  .set-site { width: 100%; }
  .set-site select { width: 100%; min-width: 0; max-width: none; min-height: 44px; }
  .set-site-one { display: block; }
  .set-tabs { width: 100%; }
  .set-tabs button { flex: 1; min-height: 44px; }
}
/* Settings has its own site picker: no toolbar project, range or sharing controls. */
body[data-screen="settings"] .toolbar { display: none !important; }
.acct-row { display: flex; align-items: center; gap: 14px; }
.acct-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.acct-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#avatar[role="button"] { cursor: pointer; }
#avatar[role="button"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) { .acct-row .btn { min-height: 44px; } }

/* ---------- Home (web/home.ts) ---------- */
.home { display: flex; flex-direction: column; gap: 16px; }
.home-h { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand[role="button"] { cursor: pointer; }
/* Home is account-wide: no project switcher, filters, sharing or per-project live pill. */
body[data-screen="home"] .toolbar .project, body[data-screen="home"] .toolbar #live, body[data-screen="home"] .toolbar #chips, body[data-screen="home"] .toolbar [data-share-open] { display: none !important; }
body:not([data-screen="home"]) #home-live { display: none !important; }
/* Home's totals strip has no metric to switch to, and five cells instead of six. */
.kpis.home-kpis { grid-template-columns: repeat(5, minmax(132px, 1fr)); }
.home-kpis .kpi, .home-kpis .m-kpi { cursor: default; }

/* One card per kind: search, count, List/Grid, "+ Add"; then the table or the cards. */
.home-list { display: flex; flex-direction: column; }
.hl-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.hl-search { position: relative; display: flex; align-items: center; flex: 0 1 280px; min-width: 0; }
.hl-search svg { position: absolute; left: 12px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.hl-search .in { width: 100%; height: 38px; padding-left: 34px; background: var(--raised); }
.hl-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.hl-view button { padding: 6px 14px; }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn.ink:hover { background: #22345a; }
.btn.ink span[aria-hidden] { font-size: 16px; line-height: 1; margin-top: -1px; }
.hl-empty { padding: 28px 24px; color: var(--muted); font-size: 14px; }

/* List */
.hl-table { min-width: 1000px; }
.hl-row { display: grid; grid-template-columns: minmax(200px, 1.5fr) minmax(130px, 180px) 104px 76px 76px 72px 112px 72px; gap: 16px; align-items: center; width: 100%; min-height: 75px; padding: 12px 24px; border: 0; border-top: 1px solid var(--row-divider); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background-color .12s; }
.hl-row.app { grid-template-columns: minmax(200px, 1.5fr) minmax(130px, 180px) 96px 76px 112px 92px 64px 112px; }
.hl-row:hover { background: var(--raised); }
.hl-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hl-row.is-live { background: rgba(47, 158, 99, .045); }
.hl-row.is-live:hover { background: rgba(47, 158, 99, .085); }
.hl-row.hl-rh { min-height: 0; cursor: default; border-top: 0; padding-top: 12px; padding-bottom: 10px; }
.hl-row.hl-rh:hover { background: none; }
.hl-row .n { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; color: var(--text-2); }
.hl-row .n.p b { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.home-sort { border: 0; background: none; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.home-sort.r { justify-content: flex-end; }
.home-sort.hl-range { cursor: default; }
.home-sort[aria-sort="ascending"], .home-sort[aria-sort="descending"] { color: var(--ink); }
.hl-delta { font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 5px; white-space: nowrap; background: var(--divider); color: var(--text-2); }
.hl-delta.good { background: var(--good-bg); color: var(--good-ink); }
.hl-delta.bad { background: var(--bad-bg); color: var(--bad-ink); }

.home-site { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hl-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--ink); flex: none; background: var(--blue-tint); }
.hl-badge.t-blue { background: #e4eaf8; }
.hl-badge.t-sand { background: #ede7da; }
.hl-badge.t-green { background: #e1efe5; }
.hl-badge.t-lilac { background: #ebe5f4; }
.hl-badge.t-rose { background: #f5e3df; }
.hl-badge.t-teal { background: #ddeeed; }
.hl-badge.t-amber { background: #f7ecd4; }
.hl-badge.t-slate { background: #e5e8ee; }
.home-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.home-name b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-name span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-spark { display: block; height: 36px; width: 100%; max-width: 180px; }
.hl-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }

.hl-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--live-bg); color: var(--good-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.hl-live .dot { position: relative; width: 7px; height: 7px; display: inline-block; flex: none; }
.hl-live .dot i { position: absolute; inset: 0; border-radius: 50%; background: var(--good); }
.hl-live .dot i:first-child { animation: mbpulse 1.6s ease-out infinite; }
.hl-off { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.hl-off i { width: 7px; height: 7px; border-radius: 50%; background: var(--track); box-shadow: inset 0 0 0 1px #d6d1c6; }
.hl-up { font-weight: 600; }
.hl-up.good { color: var(--good-ink); }
.hl-up.ni { color: var(--warn-ink); }
.hl-up.poor, .hl-up.bad { color: var(--bad-ink); }
.home-err { color: var(--bad-ink); font-weight: 600; cursor: pointer; border-radius: 6px; }
.home-err b { color: inherit; }
.home-err:hover { text-decoration: underline; }
/* A site's error rate above 0% (beats .home-card-low b on a card). */
.hl-err, .hl-err b.num { color: var(--bad-ink); font-weight: 600; }

/* Grid */
.hl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; padding: 16px; }
.hl-card { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--raised); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.hl-card:hover { border-color: #d4cfc4; box-shadow: 0 2px 8px rgba(22, 35, 61, .06); }
.hl-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.hl-card.is-live { background: linear-gradient(rgba(47, 158, 99, .05), rgba(47, 158, 99, .05)), var(--raised); }
.home-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.home-card-mid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.hl-big { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.hl-big b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.hl-big > span:last-child { flex-basis: 100%; font-size: 12px; color: var(--text-2); }
.hl-card .hl-spark { max-width: none; justify-self: end; }
.home-card-low { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--text-2); padding-top: 12px; border-top: 1px solid var(--row-divider); }
.home-card-low b { color: var(--ink); font-weight: 600; }
.home-card-up { margin-left: auto; }
/* On a card the error count is its own tap target (44px tall) without making the row taller. */
.hl-card .home-err { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -12px -10px; padding: 0 10px; }

/* Add site / app */
.add-card .card-head { margin-bottom: 0; }
.add-form { display: flex; flex-direction: column; gap: 14px; }
.add-form .fld { flex: none; }
.add-form .in { width: 100%; }
.add-btns { justify-content: flex-end; }
.add-install .inst-card { padding: 0; border: 0; background: none; }
.add-install .inst-card > .card-head { display: none; }

@media (max-width: 640px) {
  .hl-head { padding: 12px; gap: 10px; }
  .hl-search { flex: 1 1 100%; }
  .hl-search .in { height: 44px; font-size: 16px; } /* no zoom on focus in iOS Safari */
  .hl-view { display: none; }
  .hl-count { flex: 1; min-width: 0; white-space: normal; }
  .hl-add, .add-btns .btn { min-height: 44px; }
  .add-btns .btn { flex: 1; }
  .add-form .in { min-height: 44px; font-size: 16px; }
  .hl-cards { padding: 12px; gap: 10px; }
  .hl-card { padding: 14px; }
  .hl-card .hl-spark { height: 40px; }
}
.up-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--compare); flex: none; }
.up-dot.up { background: var(--good); }
.up-dot.down { background: var(--bad); }

/* ---------- Uptime card on Overview (web/uptime.ts) ---------- */
.up-card { display: flex; flex-direction: column; gap: 14px; }
.up-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.up-domain { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.up-bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 28px; }
.up-bars i { border-radius: 3px; background: var(--track); }
.up-bars i.good { background: var(--good); }
.up-bars i.ni { background: var(--warn); }
.up-bars i.poor { background: var(--bad); }
.up-facts { display: flex; gap: 32px; flex-wrap: wrap; }
.up-facts > div { display: flex; flex-direction: column; gap: 2px; }
.up-facts .k { font-size: 12px; color: var(--muted); }
.up-facts b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.up-facts b.good { color: var(--good-ink); }
.up-facts b.ni { color: var(--warn-ink); }
.up-facts b.poor { color: var(--bad-ink); }
.up-facts .v { font-size: 14px; padding-top: 4px; }
.up-warn { color: var(--bad-ink); font-weight: 600; }
@media (max-width: 640px) { .up-facts { gap: 16px 24px; } .up-bars { gap: 2px; } }

/* ---------- Settings → Alerts (web/alerts.ts) ---------- */
.alr-form { display: flex; flex-direction: column; gap: 18px; }
.alr-rules, .alr-people { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.alr-rules legend, .alr-people legend { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; padding: 0; }
.alr-rule { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--row-divider); cursor: pointer; }
.alr-rule:first-of-type { border-top: 0; }
.alr-rule input, .alr-person input { margin-top: 3px; accent-color: var(--blue); flex: none; }
.alr-rule > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.alr-rule .muted { font-size: 13px; line-height: 1.45; }
.alr-hours { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.alr-hours select { height: 32px; padding: 0 10px; }
.alr-person { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.alr-person input { margin-top: 0; }
.alr-person .muted { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.alr-recent { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--divider); }
.alr-recent h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.alr-inc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--row-divider); font-size: 13px; }
.alr-inc:first-of-type { border-top: 0; }
.alr-inc-what { font-weight: 500; }
a.alr-inc-what { color: var(--ink); text-decoration: none; }
a.alr-inc-what:hover { text-decoration: underline; }
/* Settings → Alerts: global error alerts (web/alert-settings.ts). */
.gea-on { border-top: 0; padding-top: 0; }
.gea-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 16px; }
.gea-grid select { width: 100%; padding: 0 10px; font-size: 14px; }
.gea-min { display: flex; align-items: center; gap: 8px; }
.gea-min .acct-input { height: 38px; max-width: 110px; }
.gea-min .muted { font-size: 13px; }
.gea-form .usr-note { margin: 0; }
@media (max-width: 640px) {
  .alr-person { min-height: 44px; }
  .alr-hours select { min-height: 44px; }
  .gea-grid { grid-template-columns: 1fr; }
  .gea-grid select, .gea-min .acct-input { min-height: 44px; }
  .gea-min .acct-input { max-width: none; flex: 1; }
  .gea-on { min-height: 44px; }
}

/* AI summary (Overview, top): a few sentences written from the period's numbers. */
.summary .card-head { margin-bottom: 10px; }
.summary-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 72ch; transition: opacity .2s; }
.summary-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
#summary-act .summary-note { margin: 0; }
@media (max-width: 640px) {
  .summary-text { font-size: 14px; }
  .summary .link[data-summary-refresh] { min-height: 44px; padding: 0 4px; }
}

/* ---------- Inbox (web/inbox.ts) ---------- */
:root {
  --lv-info: var(--blue);
  --lv-success: var(--good);
  --lv-warning: var(--warn);
  --lv-critical: var(--bad);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
.lv-info { --lv: var(--lv-info); }
.lv-success { --lv: var(--lv-success); }
.lv-warning { --lv: var(--lv-warning); }
.lv-critical { --lv: var(--lv-critical); }
.ic20 { width: 20px; height: 20px; flex: none; display: block; }
body[data-screen="inbox"] .toolbar { display: none !important; }

/* tab badges (header and bottom bar) */
.tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 7px; border-radius: 9px; background: var(--blue); color: #fff; font: 600 11px/1 "Geist", system-ui, sans-serif; font-variant-numeric: tabular-nums; vertical-align: 1px; letter-spacing: 0; }
.tab-badge.crit { background: var(--bad); }
.tabs .tab-inbox { position: relative; margin-left: 13px; display: inline-flex; align-items: center; }
.tabs .tab-inbox::before { content: ""; position: absolute; left: -9px; top: 9px; bottom: 9px; width: 1px; background: rgba(255, 255, 255, .14); }

/* layout: views and sources on the left, the feed on the right */
.ibx { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 32px; align-items: start; }
.ibx.m { display: block; }
.ibx-aside { position: sticky; top: 24px; display: flex; flex-direction: column; padding-top: 58px; }
.ibx-views, .ibx-sources { display: flex; flex-direction: column; gap: 2px; }
.ibx-nav { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.ibx-nav:hover { background: rgba(22, 35, 61, .045); color: var(--ink); }
.ibx-nav.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(22, 35, 61, .06); }
.ibx-nav .ic20 { width: 18px; height: 18px; color: var(--muted); transition: color .15s; }
.ibx-nav.on .ic20 { color: var(--blue); }
.ibx-nav > span:not(.ibx-ava) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-nav em { font-style: normal; font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.ibx-nav.hot em { font: 600 11px/1 "Geist", system-ui, sans-serif; color: #fff; background: var(--bad); border-radius: 9px; padding: 4px 7px; }
.ibx-nav.src { gap: 10px; }
.ibx-side-h { display: flex; align-items: center; justify-content: space-between; margin: 26px 4px 6px 10px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ibx-mini { border: 0; background: none; color: var(--muted); padding: 5px; border-radius: 8px; cursor: pointer; display: grid; }
.ibx-mini:hover { color: var(--ink); background: rgba(22, 35, 61, .05); }
.ibx-mini .ic20 { width: 16px; height: 16px; }
.ibx-side-empty { margin: 4px 10px; font-size: 13px; color: var(--muted); }

/* source avatars: emoji on a tint, initial on the colour, MonoLog's own M */
.ibx-ava { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; font-weight: 600; font-size: 15px; line-height: 1; color: #fff; background: var(--c, var(--blue)); }
.ibx-ava.sm { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }
.ibx-ava.emo { background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.ibx-ava.emo b { font-size: 19px; font-weight: 400; line-height: 1; }
.ibx-ava.sm.emo b { font-size: 12.5px; }
.ibx-ava.ini { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 86%, #fff), var(--c)); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.ibx-ava.sys { background: var(--ink); color: var(--bg); font-family: "Bungee", sans-serif; font-weight: 400; font-size: 15px; text-shadow: 1.5px 1.5px 0 var(--blue); }
.ibx-ava.sm.sys { font-size: 10px; text-shadow: 1px 1px 0 var(--blue); }
.ibx-ring { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--lv); box-shadow: 0 0 0 2.5px var(--card); }

/* header */
.ibx-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ibx-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.ibx-h { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.ibx-h h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.ibx-sub { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.ibx-sub .sep { margin: 0 7px; color: var(--muted); }
.ibx-sub .crit { color: var(--bad-ink); font-weight: 500; }
.ibx-search { position: relative; display: flex; align-items: center; width: 260px; }
.ibx-search .ic20 { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.ibx-search input { width: 100%; height: 38px; padding: 0 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none; }
.ibx-search input::placeholder { color: var(--muted); }
.ibx-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 91, 211, .14); background: var(--raised); }
.ibx-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ibx-search kbd { position: absolute; right: 9px; font: 500 11px var(--mono); color: var(--muted); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--raised); line-height: 17px; }
.ibx-search input:focus + kbd, .ibx-search input:not(:placeholder-shown) + kbd { display: none; }
.ibx-readall { display: inline-flex; align-items: center; gap: 7px; }
.ibx-readall .ic20 { width: 16px; height: 16px; }

/* the feed */
.ibx-feed.card { padding: 6px; border-radius: 18px; box-shadow: 0 1px 2px rgba(22, 35, 61, .03); }
.ibx-gh { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 6px; margin: 0; padding: 14px 14px 8px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: linear-gradient(var(--card) 72%, rgba(251, 250, 247, 0)); border-radius: 12px 12px 0 0; }
.ibx-gh .ic20 { width: 13px; height: 13px; }
.ibx-group.pinned .ibx-gh { color: var(--blue); }
.ibx-list { display: flex; flex-direction: column; gap: 2px; }

.ibx-item { position: relative; border-radius: 13px; transition: background .2s, box-shadow .2s, margin .2s, height .22s var(--ease), opacity .22s; }
.ibx-swipe { display: none; }
.ibx-row { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 13px; background: var(--card); cursor: pointer; outline: none; transition: background .15s, transform .28s var(--ease); }
.ibx-row::before { content: ""; position: absolute; left: 5px; top: 15px; bottom: 15px; width: 3px; border-radius: 3px; background: var(--lv); opacity: .2; transition: opacity .2s; }
.ibx-item.unread .ibx-row::before { opacity: 1; }
.ibx-row:hover { background: #f5f3ee; }
.ibx-row:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.ibx-item.focus:not(.open) .ibx-row { box-shadow: inset 0 0 0 1.5px rgba(47, 91, 211, .4); }
.ibx-item.open { background: var(--raised); box-shadow: 0 0 0 1px var(--divider), 0 12px 32px -18px rgba(22, 35, 61, .3); margin: 6px 0; }
.ibx-item.open .ibx-row { background: transparent; }
.ibx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ibx-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ibx-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; letter-spacing: -.005em; color: #3a4660; }
.ibx-item.unread .ibx-title { font-weight: 600; color: var(--ink); }
.ibx-count { flex: none; font: 600 11px/1 var(--mono); color: var(--text-2); background: var(--track); padding: 4px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.ibx-lvl { flex: none; font-size: 11px; line-height: 1; font-weight: 600; padding: 4px 7px; border-radius: 6px; letter-spacing: .01em; }
.ibx-lvl.lv-critical { background: var(--bad-bg); color: var(--bad-ink); }
.ibx-lvl.lv-warning { background: var(--warn-bg); color: var(--warn-ink); }
.ibx-pinned { flex: none; color: var(--blue); display: grid; }
.ibx-pinned .ic20 { width: 13px; height: 13px; }
.ibx-l2 { display: flex; align-items: baseline; min-width: 0; font-size: 13px; color: var(--text-2); }
.ibx-src { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ibx-prev { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ibx-src + .ibx-prev::before { content: "·"; margin: 0 7px; }
.ibx-item.unread .ibx-prev { color: var(--text-2); }
.ibx-side-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; min-width: 40px; }
.ibx-side-meta time { font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ibx-udot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); opacity: 0; transform: scale(.3); transition: opacity .2s, transform .2s var(--ease); }
.ibx-item.unread .ibx-udot { opacity: 1; transform: none; }
.ibx-hover { position: absolute; right: 10px; top: 50%; z-index: 2; transform: translateY(-50%); display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--raised); box-shadow: 0 0 0 1px var(--divider), 0 6px 16px -6px rgba(22, 35, 61, .22); opacity: 0; pointer-events: none; transition: opacity .12s; }
.ibx-row:hover .ibx-hover, .ibx-item.focus .ibx-hover, .ibx-hover:focus-within { opacity: 1; pointer-events: auto; }
.ibx-item.open .ibx-hover { display: none; }
.ibx-icon-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.ibx-icon-btn:hover { background: var(--bg); color: var(--ink); }
.ibx-icon-btn.on { color: var(--blue); }
.ibx-icon-btn .ic20 { width: 17px; height: 17px; }

@keyframes ibxin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ibxglow { 0%, 30% { background: #e6edfb; } 100% { background: var(--card); } }
@keyframes ibxopen { from { opacity: 0; transform: translateY(-4px); } }
.ibx-item.fresh { animation: ibxin .45s var(--ease) both; }
.ibx-item.fresh:not(.open) .ibx-row { animation: ibxglow 3s ease-out; }
.ibx-item.leaving { opacity: 0; overflow: hidden; margin: 0; }

/* opened: the whole message, its data, tags and link */
.ibx-detail { padding: 0 18px 16px 70px; display: flex; flex-direction: column; gap: 14px; animation: ibxopen .22s var(--ease); }
.ibx-md { max-width: 74ch; font-size: 14.5px; line-height: 1.62; color: var(--ink); overflow-wrap: anywhere; }
.ibx-md p, .ibx-md ul, .ibx-md pre { margin: 0 0 10px; }
.ibx-md > :last-child { margin-bottom: 0; }
.ibx-md ul { padding-left: 18px; }
.ibx-md li + li { margin-top: 3px; }
.ibx-md strong { font-weight: 600; }
.ibx-md a { font-size: inherit; text-decoration: underline; text-decoration-color: rgba(47, 91, 211, .35); text-underline-offset: 3px; }
.ibx-md code { font: 12.5px var(--mono); background: var(--bg); border: 1px solid var(--divider); border-radius: 6px; padding: 1px 5px; }
.ibx-md pre { padding: 12px 14px; background: var(--ink); color: #dfe6f3; border-radius: 10px; overflow-x: auto; font: 12.5px/1.55 var(--mono); }
.ibx-md pre code { background: none; border: 0; padding: 0; color: inherit; }
.ibx-kv { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ibx-kv div { min-width: 0; padding: 9px 12px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--divider); }
.ibx-kv dt { margin-bottom: 4px; font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibx-kv dd { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ibx-kv dd a { font-size: inherit; }
.ibx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ibx-tag { font: 500 12px var(--mono); color: var(--text-2); background: var(--track); padding: 3px 9px; border-radius: 999px; }
.ibx-tag::before { content: "#"; color: var(--muted); margin-right: 1px; }
.ibx-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--row-divider); }
.ibx-foot .spacer { flex: 1; }
a.ibx-link { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; color: #fff; font-size: 13px; text-decoration: none; }
a.ibx-link:hover { color: #fff; }
.ibx-link .ic20 { width: 15px; height: 15px; opacity: .8; }
.ibx-meta { font-size: 12.5px; color: var(--muted); }
.ibx-meta .sep { margin: 0 7px; }
.ibx-acts { display: flex; gap: 2px; }
.ibx-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.ibx-act:hover { background: var(--bg); color: var(--ink); }
.ibx-act.on { color: var(--blue); }
.ibx-act .ic20 { width: 16px; height: 16px; }

/* empty, loading, paging, toast */
.ibx-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 52px 24px 60px; text-align: center; }
.ibx-art { width: 200px; height: 140px; margin-bottom: 8px; }
.ibx-empty h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.ibx-empty p { max-width: 430px; margin: 0 0 10px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.ibx-empty p code { font: 12.5px var(--mono); background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.ibx-curl { max-width: 100%; margin: 4px 0 16px; padding: 14px 18px; overflow-x: auto; text-align: left; background: var(--ink); color: #dfe6f3; border-radius: 12px; font: 12.5px/1.65 var(--mono); }
.ibx-loading { padding: 8px 4px; }
.ibx-sk { display: flex; align-items: center; gap: 14px; padding: 12px 14px; animation: ibxin .4s var(--ease) both; animation-delay: var(--d); }
.ibx-sk > span { flex: 1; }
.ibx-sk i { width: 38px; height: 38px; border-radius: 11px; }
.ibx-sk b { display: block; width: 38%; height: 10px; border-radius: 5px; }
.ibx-sk b + b { width: 72%; height: 8px; margin-top: 9px; }
.ibx-sk i, .ibx-sk b { background: linear-gradient(90deg, var(--divider) 0, #f6f4ef 50%, var(--divider) 100%) 0 0 / 800px 100%; animation: shimmer 1.4s linear infinite; }
.ibx-more { display: flex; justify-content: center; padding: 14px 0 10px; }
.ibx-end { padding: 18px 0 12px; text-align: center; font-size: 12px; color: var(--muted); }
.ibx-toast { position: fixed; left: 50%; bottom: 28px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; min-height: 44px; background: var(--ink); color: var(--bg); border-radius: 12px; box-shadow: 0 14px 34px rgba(22, 35, 61, .3); font-size: 13.5px; white-space: nowrap; }
.ibx-toast.show { animation: ibxtoast .28s var(--ease); }
@keyframes ibxtoast { from { opacity: 0; transform: translate(-50%, 8px); } }
.ibx-toast button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.ibx-toast button:hover { background: rgba(255, 255, 255, .16); }
.ibx-toast .ic20 { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) {
  .ibx-item, .ibx-item.fresh, .ibx-row, .ibx-detail, .ibx-toast.show, .ibx-sk { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  /* five tabs at the bottom for admins: icon over label */
  body.has-inbox .mtabs { grid-template-columns: repeat(5, 1fr); height: 58px; }
  body.has-inbox .mtabs button { flex-direction: column; gap: 4px; font-size: 10.5px; }
  .mtabs .ic.tray { position: relative; width: 19px; height: 17px; }
  .mtabs .ic.tray svg { width: 19px; height: 19px; margin-top: -1px; }
  .mtabs .tab-badge { position: absolute; top: -7px; left: 11px; min-width: 17px; height: 17px; margin: 0; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--ink); }

  .ibx-head { flex-wrap: wrap; gap: 10px; padding-top: 2px; }
  .ibx-h { flex: 1; flex-direction: column; gap: 2px; }
  .ibx-h h1 { font-size: 26px; }
  .ibx-search { order: 3; width: 100%; }
  .ibx-search input { height: 44px; font-size: 16px; border-radius: 12px; }
  .ibx-readall { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 12px; }
  .ibx-readall span { display: none; }
  .ibx-readall .ic20 { width: 19px; height: 19px; }
  .ibx-chips { display: flex; gap: 6px; margin: -2px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
  .ibx-chips::-webkit-scrollbar { display: none; }
  .ibx-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
  .ibx-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
  .ibx-chip em { font: 600 11px var(--mono); font-style: normal; opacity: .65; }
  .ibx-chip.hot em { color: var(--bad); opacity: 1; }
  .ibx-chip.on.hot em { color: #ffb2a1; }
  .ibx-chip.src { padding-left: 5px; }
  .ibx-chip .ibx-ava.sm { width: 26px; height: 26px; border-radius: 999px; font-size: 11px; }
  .ibx-chip-sep { flex: none; width: 1px; margin: 7px 2px; background: var(--border); }

  .ibx-feed.card { padding: 4px; border-radius: 18px; }
  .ibx-gh { padding: 12px 12px 6px; }
  .ibx-row { align-items: flex-start; gap: 12px; padding: 12px 12px 12px 16px; touch-action: pan-y; }
  .ibx-row::before { top: 16px; bottom: 16px; left: 4px; }
  .ibx-ava { width: 40px; height: 40px; border-radius: 12px; }
  .ibx-row:hover { background: var(--card); }
  .ibx-row:active { background: #f5f3ee; }
  .ibx-l2 { flex-direction: column; gap: 2px; }
  .ibx-src { max-width: 100%; }
  .ibx-src + .ibx-prev::before { content: none; }
  .ibx-prev { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
  .ibx-side-meta { padding-top: 2px; }
  .ibx-hover { display: none; }
  .ibx-detail { padding: 0 14px 14px; }
  .ibx-md { font-size: 15px; }
  .ibx-kv { grid-template-columns: 1fr 1fr; }
  .ibx-foot { gap: 10px; }
  a.ibx-link { width: 100%; justify-content: center; height: 44px; font-size: 14px; }
  .ibx-meta { width: 100%; }
  .ibx-foot .spacer { display: none; }
  .ibx-acts { width: 100%; gap: 6px; }
  .ibx-act { flex: 1; height: 42px; background: var(--bg); }
  .ibx-l1 { flex-wrap: wrap; row-gap: 4px; }
  .ibx-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
  .ibx-swipe { position: absolute; inset: 1px; opacity: 0; display: flex; border-radius: 13px; overflow: hidden; color: #fff; font-size: 13px; font-weight: 600; }
  .ibx-swipe span { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 22px; transition: filter .15s; }
  .ibx-swipe .ic20 { width: 19px; height: 19px; transition: transform .2s var(--ease); }
  .ibx-swipe .sw-l { background: var(--blue); }
  .ibx-swipe .sw-r { background: var(--ink); justify-content: flex-end; }
  .ibx-item[data-swipe] .ibx-swipe { opacity: 1; }
  .ibx-item[data-swipe="left"] .sw-l, .ibx-item[data-swipe="right"] .sw-r { visibility: hidden; }
  .ibx-item.armed .ibx-swipe .ic20 { transform: scale(1.18); }
  .ibx-item.armed .ibx-swipe span { filter: brightness(1.15); }
  .ibx-item.open .ibx-swipe { display: none; }
  .ibx-toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .ibx-empty { padding: 40px 12px 48px; }
  .ibx-curl { font-size: 11.5px; padding: 12px 14px; }
}

/* ---------- Settings → Ping (web/notify-settings.ts) ---------- */
.nfy { display: flex; flex-direction: column; gap: 16px; }
.nfy-push { display: flex; align-items: center; gap: 18px; }
.nfy-bell { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--blue-tint); color: var(--blue); }
.nfy-bell svg { width: 26px; height: 26px; }
.nfy-push.on .nfy-bell { background: var(--good-bg); color: var(--good-ink); }
.nfy-bell i { position: absolute; top: 11px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2.5px var(--good-bg); }
.nfy-bell i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: mbpulse 1.8s ease-out infinite; }
.nfy-push-text { flex: 1; min-width: 0; }
.nfy-push-text h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.nfy-push-text p { margin: 0; max-width: 640px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.nfy-push-text code, .nfy-intro code, .nfy-note code { font: 12px var(--mono); background: var(--bg); border: 1px solid var(--divider); border-radius: 5px; padding: 0 4px; }
.nfy-push-acts { flex: none; display: flex; gap: 8px; }
.nfy-push-msg { margin: 12px 0 0; }
.nfy-push-msg:empty { display: none; }
.nfy-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--row-divider); }
.nfy-sub h3, .nfy-tokens h3 { margin: 0 0 6px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nfy-devs { list-style: none; margin: 0; padding: 0; }
.nfy-dev { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--row-divider); }
.nfy-dev:first-child { border-top: 0; }
.nfy-dev-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg); font-size: 16px; }
.nfy-dev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nfy-dev-main b { font-size: 14px; font-weight: 500; }
.nfy-dev-main .muted { font-size: 12.5px; }
.nfy-dev-main .pill { margin-left: 4px; font-size: 11px; padding: 2px 6px; vertical-align: 1px; }
.nfy-bad { color: var(--bad-ink); }

.nfy-form { display: flex; flex-direction: column; gap: 18px; }
.nfy-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.nfy-levels legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.nfy-level { position: relative; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.nfy-level input { position: absolute; opacity: 0; pointer-events: none; }
.nfy-lv-dot { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border); transition: background .15s, border-color .15s; }
.nfy-level input:checked ~ .nfy-lv-dot { background: var(--lv); border-color: var(--lv); }
.nfy-level input:checked ~ .nfy-lv-dot::after { content: ""; width: 8px; height: 4.5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translate(0, -1px) rotate(-45deg); }
.nfy-level:has(input:checked) { border-color: color-mix(in srgb, var(--lv) 50%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 11%, transparent); }
.nfy-level:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.nfy-level > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nfy-level b { font-size: 14px; font-weight: 600; }
.nfy-level small { font-size: 12px; color: var(--muted); }
.nfy-note { margin: -8px 0 0; font-size: 12.5px; }
.nfy-quiet, .nfy-email { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--row-divider); }
.nfy-switch { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.nfy-switch input { position: absolute; opacity: 0; pointer-events: none; }
.nfy-switch .sw { position: relative; flex: none; width: 38px; height: 22px; margin-top: 1px; border-radius: 11px; background: #dcd8cf; transition: background .2s; }
.nfy-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(22, 35, 61, .25); transition: transform .22s var(--ease); }
.nfy-switch input:checked + .sw { background: var(--blue); }
.nfy-switch input:checked + .sw::after { transform: translateX(16px); }
.nfy-switch input:focus-visible + .sw { outline: 2px solid var(--blue); outline-offset: 2px; }
.nfy-switch > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.nfy-switch b { font-size: 14px; font-weight: 600; }
.nfy-switch small { max-width: 640px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.nfy-quiet-times { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 50px; transition: opacity .2s; }
.nfy-quiet-times[data-off] { opacity: .4; pointer-events: none; }
.nfy-quiet-times .fld { flex: 0 0 130px; }
.nfy-quiet-times .nfy-tz { flex: 1 1 220px; max-width: 300px; }
.nfy-tz select { width: 100%; height: 44px; }
.nfy-check { display: flex; align-items: center; gap: 10px; padding-left: 50px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.nfy-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }

.nfy-intro { margin: -6px 0 14px; font-size: 13px; line-height: 1.5; }
.nfy-srcs { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nfy-src { border: 1px solid var(--divider); border-radius: 14px; background: var(--raised); transition: box-shadow .2s, border-color .2s; }
.nfy-src.open { border-color: var(--border); box-shadow: 0 12px 30px -18px rgba(22, 35, 61, .28); }
.nfy-src-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; }
.nfy-src-row[role="button"] { cursor: pointer; }
.nfy-src-row[role="button"]:hover { background: rgba(22, 35, 61, .02); }
.nfy-src-row:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.nfy-src-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nfy-src-main b { font-size: 14.5px; font-weight: 600; }
.nfy-src-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.nfy-tok-count { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.nfy-chev { flex: none; width: 8px; height: 8px; margin: 0 4px 3px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s var(--ease); }
.nfy-src.open .nfy-chev { transform: rotate(225deg); margin-bottom: -3px; }
.nfy-src-body { display: flex; flex-direction: column; gap: 14px; padding: 2px 16px 16px; animation: ibxopen .22s var(--ease); }
.nfy-secret { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--good-bg); color: var(--good-ink); }
.nfy-secret > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.nfy-secret-row { display: flex; align-items: center; gap: 8px; }
.nfy-secret-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 9px 12px; border: 1px solid rgba(31, 107, 67, .2); border-radius: 9px; background: #fff; color: var(--ink); font: 13px var(--mono); }
.nfy-tokens-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 4px; }
.nfy-tokens-head h3 { margin: 0; }
.nfy-token-new { display: flex; gap: 8px; }
.nfy-token-new .btn { white-space: nowrap; }
.nfy-token-new .acct-input { width: 220px; height: 38px; }
.nfy-tokens ul { list-style: none; margin: 0; padding: 0; }
.nfy-tokens li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--row-divider); font-size: 13.5px; }
.nfy-tokens li:first-child { border-top: 0; }
.nfy-prefix { padding: 2px 7px; border: 1px solid var(--divider); border-radius: 6px; background: var(--bg); font: 12.5px var(--mono); }
.nfy-tok-label { font-weight: 500; }
.nfy-tokens li .muted { flex: 1; font-size: 12.5px; }
.nfy-first { margin-top: 14px; }

.nfy-code { overflow: hidden; border-radius: 14px; background: #121c31; box-shadow: 0 0 0 1px #0d1526; }
.nfy-code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.nfy-langs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nfy-langs::-webkit-scrollbar { display: none; }
.nfy-langs button { position: relative; padding: 9px 10px 11px; border: 0; background: none; color: #8592ab; font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.nfy-langs button:hover { color: #dfe6f3; }
.nfy-langs button[aria-selected="true"] { color: #fff; }
.nfy-langs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: #8fb0ff; }
.nfy-copy { flex: none; height: 28px; margin-bottom: 6px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #dfe6f3; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s; }
.nfy-copy:hover { background: rgba(255, 255, 255, .14); }
.nfy-copy.done, .btn.done { background: var(--good); border-color: var(--good); color: #fff; }
.nfy-code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; color: #dfe6f3; font: 12.5px/1.7 var(--mono); tab-size: 2; }
.tk-s { color: #a6dbb6; }
.tk-c { color: #6b7a97; font-style: italic; }
.tk-k { color: #8fb0ff; }
.tk-f, .tk-n { color: #f2c487; }
.nfy-code-note { margin: 0; padding: 12px 18px 14px; border-top: 1px solid rgba(255, 255, 255, .07); color: #96a3bb; font-size: 12.5px; line-height: 1.55; }
.nfy-code-note code { padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: #dfe6f3; font: 12px var(--mono); }

.nfy-src.editing { padding: 16px; }
.nfy-src.editing.new { margin-bottom: 8px; border-color: var(--border); }
.nfy-src-form { display: flex; align-items: flex-start; gap: 18px; }
.nfy-src-preview .ibx-ava { width: 56px; height: 56px; border-radius: 17px; font-size: 22px; }
.nfy-src-preview .ibx-ava.emo b { font-size: 28px; }
.nfy-src-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.nfy-src-fields .fld > span { font-size: 12px; font-weight: 500; color: var(--text-2); }
.nfy-src-fields .fld > .acct-input { max-width: 360px; }
.nfy-emoji { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.nfy-emoji .acct-input { width: 60px; height: 40px; margin-right: 6px; padding: 0; text-align: center; font-size: 18px; }
.nfy-emoji button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; font-size: 18px; cursor: pointer; }
.nfy-emoji button:hover { background: var(--bg); }
.nfy-colors { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px; }
.nfy-colors label { position: relative; cursor: pointer; }
.nfy-colors input { position: absolute; opacity: 0; }
.nfy-colors i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s var(--ease), box-shadow .15s; }
.nfy-colors label:hover i { transform: scale(1.08); }
.nfy-colors input:checked + i { box-shadow: 0 0 0 2px var(--raised), 0 0 0 4px var(--c); }
.nfy-colors input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 5px; }
.nfy-src-fields select { height: 40px; max-width: 320px; }
.nfy-del { margin-left: auto; }

@media (max-width: 640px) {
  .set-tabs { overflow-x: auto; scrollbar-width: none; }
  .set-tabs::-webkit-scrollbar { display: none; }
  .set-tabs button { flex: 0 0 auto !important; padding: 8px 12px; }
  .nfy-push { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nfy-push-acts { width: 100%; }
  .nfy-push-acts .btn { flex: 1; min-height: 44px; }
  .nfy-levels { grid-template-columns: 1fr 1fr; }
  .nfy-quiet-times, .nfy-check { padding-left: 0; }
  .nfy-quiet-times .fld { flex: 1 1 120px; }
  .nfy-quiet-times .nfy-tz { max-width: none; }
  .nfy-src-row { padding: 12px; gap: 12px; }
  .nfy-tok-count { display: none; }
  .nfy-src-body { padding: 2px 12px 12px; }
  .nfy-src-form { flex-direction: column; }
  .nfy-tokens li { flex-wrap: wrap; gap: 4px 10px; }
  .nfy-tokens li .muted { order: 3; flex-basis: 100%; }
  .nfy-token-new { width: 100%; }
  .nfy-token-new .acct-input { flex: 1; width: auto; height: 44px; font-size: 16px; }
  .nfy-token-new .btn { min-height: 44px; }
  .nfy-code pre { font-size: 11.5px; padding: 14px; }
  .nfy-dev .link { min-height: 44px; }
}

/* ---------- Ping on its own host (ping.monoblock.ae: data-app="ping", app.ts PING) ---------- */
/* Only Ping and its settings: no analytics tabs, toolbar or project picker. */
html[data-app="ping"] .tabs button:not([data-tab="inbox"]),
html[data-app="ping"] .mtabs button:not([data-tab="inbox"]):not([data-ping-tab]),
html[data-app="ping"] .toolbar { display: none !important; }
html[data-app="ping"] .tabs .tab-inbox { margin-left: 0; }
html[data-app="ping"] .tabs .tab-inbox::before { display: none; }
.mtabs .ic.gear svg { width: 19px; height: 19px; }
@media (max-width: 640px) {
  html[data-app="ping"] body.has-inbox .mtabs { grid-template-columns: repeat(2, 1fr); left: 22%; right: 22%; }
}
