:root {
  --bg: #f2f2f5; --surface: #fff; --raised: #f0f0f3; --fg: #141416; --muted: #6b6b74; --subtle: #9b9ba3; --line: #e4e4e9;
  --cubby: #ff4f57; --cubby-tint: #ffe9ea; --cubby-soft: #ffc2c5; --blurtle: #5c63c4; --blurtle-tint: #ecedfa;
  --good: #3fa877; --good-tint: #e3f4eb; --warn-tint: #fbf1d9; --warn-ink: #9a7317;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 14px/1.4 Figtree, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 700; }
b { font-weight: 600; }
small { font-size: 12px; color: var(--muted); }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card .sub { font-size: 13px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.grow { flex: 1; }
.ic { width: 18px; height: 18px; flex: none; stroke-width: 2; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .6px; color: var(--subtle); text-transform: uppercase; margin-bottom: 8px; }
.empty { padding: 28px 24px; color: var(--muted); }
.pad .empty { padding: 0; }

/* Shell */
.app { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 16px; }
.brand b { font-weight: 700; }
.mark { display: block; flex: none; }
.mark-s { width: 28px; height: 28px; }
.mark-l { width: 44px; height: 44px; }
.group { display: flex; flex-direction: column; gap: 4px; }
.group .label { margin: 0 0 2px; letter-spacing: .8px; padding: 0 2px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav:hover { background: var(--raised); }
.nav.on { background: var(--raised); color: var(--fg); font-weight: 600; }
.nav .cubby { color: var(--cubby); } .nav .blurtle { color: var(--blurtle); }
.acct { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 10px; }
.acct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acct-t small { font-size: 11px; font-weight: 500; }
.acct-t b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct a { color: var(--muted); display: flex; } .acct .ic { width: 16px; height: 16px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--cubby-tint); color: var(--cubby); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.av-l { width: 64px; height: 64px; font-size: 26px; }
.main { flex: 1; min-width: 0; padding: 32px 40px; display: flex; flex-direction: column; gap: 24px; }

/* Blocks */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.seg a { padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg a.on { background: var(--fg); color: var(--surface); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.pad { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card:not(.pad) > .card-h { padding: 20px 24px; }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cubby); white-space: nowrap; }
.link .ic { width: 15px; height: 15px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-h { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-h .ic { width: 16px; height: 16px; }
.stat-v { font-size: 30px; font-weight: 700; line-height: 1.15; }
.stat-n { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-n.good { color: var(--good); } .stat-n.bad { color: var(--cubby); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.split.wide-side { grid-template-columns: minmax(0, 1fr) 460px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--good-tint); color: var(--good); white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.quiet { background: var(--raised); color: var(--muted); } .chip.quiet i { background: var(--subtle); }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.bars span { flex: 1; background: var(--cubby-soft); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars span.now { background: var(--cubby); }
.bars.small { height: 44px; gap: 4px; }
.bars.small span { border-radius: 3px 3px 0 0; background: var(--raised); }
.bars.small span.b { background: var(--blurtle); }
.axis { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; color: var(--subtle); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.meter-t .ic { width: 15px; height: 15px; color: var(--muted); }
.meter-t span { flex: 1; }
.track { height: 6px; border-radius: 3px; background: var(--raised); }
.track span { display: block; height: 6px; border-radius: 3px; background: var(--cubby); }

/* Tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--raised); text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; white-space: nowrap; }
.tbl td { padding: 12px; border-top: 1px solid var(--line); font-weight: 500; vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 24px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 24px; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #fafafb; }
.tbl .num { text-align: right; }
.person { display: flex; align-items: center; gap: 10px; }
.person span { display: flex; flex-direction: column; min-width: 0; }
.person small { font-weight: 400; }
.search { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); width: 240px; }
.search .ic { width: 14px; height: 14px; color: var(--subtle); }
.search input { border: 0; outline: 0; font: 500 13px Figtree, sans-serif; flex: 1; min-width: 0; background: none; color: var(--fg); }

/* Feed */
.event { display: flex; gap: 12px; align-items: flex-start; }
.ev-i { width: 30px; height: 30px; border-radius: 9px; background: var(--raised); display: flex; align-items: center; justify-content: center; flex: none; }
.ev-i .ic { width: 15px; height: 15px; }
.ev-t { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 500; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.ev-t small { color: var(--subtle); font-weight: 400; }
.feed { gap: 14px; }
.dot-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; padding: 3px 0; }
.dot-row i { width: 6px; height: 6px; border-radius: 50%; background: var(--cubby); flex: none; }
.dot-row.blurtle i { background: var(--blurtle); }
.dot-row span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-row small { color: var(--subtle); white-space: nowrap; font-weight: 500; }

/* User */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.crumb .ic { width: 16px; height: 16px; } .crumb b { color: var(--fg); }
.profile { padding: 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.who { flex: 1; min-width: 220px; }
.who-n { display: flex; align-items: center; gap: 10px; }
.who h1 { font-size: 24px; }
.meta { display: flex; gap: 32px; flex-wrap: wrap; }
.meta div { display: flex; flex-direction: column; gap: 4px; }
.meta small { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--subtle); }
.tabs { display: flex; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 16px 0 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--fg); font-weight: 700; border-color: var(--cubby); }
.count { background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.filters { display: flex; align-items: center; gap: 8px; padding: 14px 24px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; background: var(--raised); font-size: 12px; font-weight: 600; color: var(--muted); }
.pill small { font-weight: 500; }
.pill.on { background: var(--fg); color: var(--surface); } .pill.on small { color: var(--subtle); }
.tgroup { padding: 6px 24px 10px; }
.tgroup-h { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.tgroup-h i, .habit-h i, .list-row i, .note small i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.tgroup-h b { font-weight: 700; } .tgroup-h small { color: var(--subtle); }
.task { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--subtle); flex: none; display: flex; align-items: center; justify-content: center; }
.task.done .box { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.box .ic { width: 12px; height: 12px; stroke-width: 3; }
.task-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 500; overflow-wrap: anywhere; }
.task.done .task-t > span { color: var(--muted); text-decoration: line-through; }
.task-t small { color: var(--subtle); white-space: pre-line; }
.extra { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--subtle); white-space: nowrap; }
.extra .ic { width: 13px; height: 13px; }
.pri { padding: 2px 6px; border-radius: 5px; background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 700; }
.pri.p1 { background: var(--cubby-tint); color: var(--cubby); }
.due { width: 110px; text-align: right; font-size: 12px; font-weight: 500; color: var(--muted); flex: none; }
.due.late { color: var(--cubby); }
.tab-body { padding-bottom: 12px; }
.habit-row { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.habit-row:first-child { border-top: 0; }
.habit-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.habit-h small { color: var(--subtle); flex: 1; }
.streak { font-size: 12px; font-weight: 600; color: var(--muted); }
.days { display: flex; gap: 4px; }
.days span { flex: 1; height: 14px; border-radius: 3px; background: var(--raised); }
.mini-habit { display: flex; flex-direction: column; gap: 7px; }
.mini-h { display: flex; justify-content: space-between; font-size: 13px; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 20px 24px; }
.note { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.note-h { display: flex; justify-content: space-between; gap: 8px; }
.note-h .ic { width: 14px; height: 14px; }
.note small { display: flex; align-items: center; gap: 6px; color: var(--subtle); }
.note p { margin: 0; font-size: 13px; white-space: pre-line; color: var(--fg); overflow-wrap: anywhere; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-top: 1px solid var(--line); font-size: 13px; }
.list-row:first-child { border-top: 0; }
.list-row b { flex: 1; }

/* Blurtle */
.kinds { display: flex; gap: 6px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kinds .pill:not(.on) { color: var(--fg); }
.issues td:first-child { max-width: 0; width: 100%; }
.issues tr.sel { background: var(--blurtle-tint); box-shadow: inset 3px 0 var(--blurtle); }
.issues tr.sel:hover { background: var(--blurtle-tint); }
.issue-t { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.issue-t a { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issues td small { display: block; margin-top: 4px; font-weight: 400; }
.kind { padding: 2px 6px; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--raised); color: var(--muted); flex: none; }
.k-save { background: var(--warn-tint); color: var(--warn-ink); }
.k-js, .k-native, .k-anr { background: var(--cubby-tint); color: var(--cubby); }
.k-open { background: var(--blurtle-tint); color: var(--blurtle); }
.detail { gap: 18px; position: sticky; top: 16px; }
.d-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.d-msg { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.facts > div { background: var(--raised); border-radius: 10px; padding: 12px; min-width: 0; }
.fact { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 0; }
.fact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact b { color: var(--muted); font-weight: 700; }
.d-row { display: flex; justify-content: space-between; align-items: center; }
.d-row .label { margin: 0; }
.copy { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; color: var(--blurtle); font: 600 12px Figtree, sans-serif; cursor: pointer; padding: 0; }
.copy .ic { width: 13px; height: 13px; }
.code { margin: 8px 0 0; background: #141416; color: #d6d6dc; border-radius: 10px; padding: 14px; font: 11px/1.6 'JetBrains Mono', ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
.kv { display: flex; gap: 12px; font-size: 12px; font-weight: 500; padding: 2px 0; }
.kv span:first-child { width: 90px; flex: none; color: var(--muted); }
.kv span:last-child { overflow-wrap: anywhere; }
.pager { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.pager span { display: flex; gap: 6px; }
.pager a { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.pager a.off { opacity: .35; pointer-events: none; }
.pager .ic { width: 16px; height: 16px; }

/* Sign in and pick */
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.signin { width: 420px; max-width: 100%; padding: 40px; border-radius: 20px; display: flex; flex-direction: column; gap: 24px; }
.signin h1 { font-size: 26px; }
.signin .sub { font-size: 15px; line-height: 1.45; margin-top: 8px; }
/* Google renders its own button (its branding rules); this keeps the space steady while it loads. */
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.hint, .alert { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--raised); color: var(--muted); font-size: 13px; font-weight: 500; }
.alert { background: var(--cubby-tint); color: var(--cubby); }
.hint .ic, .alert .ic { width: 16px; height: 16px; }
.pick { max-width: 920px; margin: 0 auto; padding: 120px 16px 48px; display: flex; flex-direction: column; gap: 40px; }
.pick h1 { font-size: 32px; } .pick header .sub { font-size: 16px; margin-top: 8px; }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.app-card { padding: 32px; border-radius: 20px; display: flex; flex-direction: column; gap: 24px; transition: border-color .15s; }
.app-card:hover { border-color: var(--subtle); }
.app-top { display: flex; align-items: center; gap: 14px; }
.app-top h2 { font-size: 22px; }
.tile { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile .ic { width: 26px; height: 26px; }
.tile.cubby { background: var(--cubby-tint); color: var(--cubby); } .tile.blurtle { background: var(--blurtle-tint); color: var(--blurtle); }
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.nums div { background: var(--raised); border-radius: 12px; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nums small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nums b { font-size: 22px; font-weight: 700; }
.latest { flex: 1; }
.open { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; font-weight: 600; }
.open.cubby { color: var(--cubby); } .open.blurtle { color: var(--blurtle); }
.out { align-self: center; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.out .ic { width: 15px; height: 15px; }

@media (max-width: 1100px) {
  .split, .split.wide-side { grid-template-columns: 1fr; }
  .detail { position: static; }
  .row4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .label, .grow, .acct-t { display: none; }
  .group { flex-direction: row; }
  .acct { padding: 6px; }
  .main { padding: 20px 16px; }
  .apps { grid-template-columns: 1fr; }
  .pick { padding-top: 48px; }
  .due { width: auto; }
  .extra { display: none; }
}
