/* Kimaru Tracker — follows the Kimaru Platform Design System:
   white surfaces, slate neutrals, Inter, Brand Blue #3162B4 as the single accent. */
:root {
  --bg: #ffffff; --panel: #ffffff; --panel-2: #f8fafc; --hover: #f1f5f9;
  --text: #0f172a; --body: #1e293b; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-2: #cbd5e1;
  --accent: #0f172a; --accent-hover: #0f172a; --accent-soft: #f1f5f9; --on-accent: #f8fafc; --done: #008080;   /* Kimaru: primary is slate 900, teal marks work that is done, blue is for the logo only */
  --purple: #5215a3; --teal: #3a7575; --red: #ef4444; --green: #10b981; --amber: #d97706;
  --shadow: 0 1px 2px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.1), 0 20px 40px -12px rgba(15,23,42,.25);
  --r: 6px; --r-lg: 8px;
}
[data-theme="dark"] {
  --bg: #0b1120; --panel: #0f172a; --panel-2: #111b31; --hover: #1e293b;
  --text: #f8fafc; --body: #e2e8f0; --muted: #94a3b8; --faint: #64748b;
  --line: #1e293b; --line-2: #334155;
  --accent: #e2e8f0; --accent-hover: #e2e8f0; --accent-soft: rgba(148,163,184,.14); --on-accent: #0f172a; --done: #2dd4bf;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.5), 0 20px 40px -12px rgba(0,0,0,.7);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--body); font: 400 14px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; flex: none; stroke-width: 2; }
svg.logo { height: 22px; width: auto; display: block; color: var(--text); }

/* shell — sidebar behaves like kimaru-platform-web's Navbar: a 44px icon rail that expands to 192px on hover (300ms ease-in-out) */
.shell { display: flex; height: 100vh; height: 100dvh; }   /* dvh: the visible height, so nothing hides behind a browser or system bar */
.side { flex: none; width: 44px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 0 4px max(8px, env(safe-area-inset-bottom)); gap: 2px; overflow: hidden; transition: width .3s ease-in-out; z-index: 40; }
.side:is(:hover, .xp), .shell.pinned .side { width: 192px; }
.side .brand { height: 48px; flex: none; display: flex; align-items: center; padding: 0 10px; margin: 0 -4px 12px; border-bottom: 1px solid var(--line); }
.side .brand svg.mark { width: 16px; height: 16px; margin-left: 4px; }
.side .brand svg.logo { display: none; height: 24px; }
.side:is(:hover, .xp) .brand svg.logo, .shell.pinned .side .brand svg.logo { display: block; }
.side:is(:hover, .xp) .brand svg.mark, .shell.pinned .side .brand svg.mark { display: none; }
.nav { display: flex; align-items: center; gap: 12px; height: 36px; flex: none; padding: 0 10px; border-radius: var(--r); background: none; border: 0; color: var(--body); text-align: left; width: 100%; font-weight: 500; white-space: nowrap; }
.nav svg.i { flex: none; }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--hover); color: var(--text); font-weight: 600; }
.nav.sub { height: 30px; font-weight: 400; font-size: 13px; }
.nav.sub.on { background: #1e293b; color: #fff; font-weight: 500; }
[data-theme="dark"] .nav.sub.on { background: #334155; }
.nav .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin: 0 4px; }
.nav .n { margin-left: auto; font-size: 12px; color: var(--muted); }
.nav.sub.on .n { color: #cbd5e1; }
.side .sec { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 6px; white-space: nowrap; }
.side .grow { flex: 1; }
/* text only shows once the rail is open */
.side .label, .side .n, .side .sec, .side .who, .side .me .btn { opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.side:is(:hover, .xp) .label, .side:is(:hover, .xp) .n, .side:is(:hover, .xp) .sec, .side:is(:hover, .xp) .who, .side:is(:hover, .xp) .me .btn,
.shell.pinned .side .label, .shell.pinned .side .n, .shell.pinned .side .sec, .shell.pinned .side .who, .shell.pinned .side .me .btn { opacity: 1; transition-delay: .12s; pointer-events: auto; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 0 4px 6px; border-top: 1px solid var(--line); margin-top: 8px; flex: none; white-space: nowrap; }
.me .who { min-width: 0; flex: 1; line-height: 1.25; }
.me .who b { display: block; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--muted); }

.main { display: flex; flex-direction: column; flex: 1; min-width: 0; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 12px; height: 48px; flex: none; padding: 0 24px; border-bottom: 1px solid var(--line); }   /* same height and rule as the sidebar's logo row */
.top h1 { font-size: 17px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.top .subtitle { margin: 0; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sp { flex: 1; }
.content { flex: 1; overflow: auto; padding: 20px 24px 40px; min-height: 0; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 24px 0; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 9px; top: 9px; color: var(--faint); }
.search-wrap input[type=text] { padding-left: 30px; width: 220px; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--body); font-weight: 500; white-space: nowrap; }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary.done { background: var(--done); border-color: var(--done); color: #fff; }
.btn.danger { color: var(--red); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--hover); }   /* the only hover tint: quiet icon buttons, never a solid button */
.btn.icon-btn { width: 36px; padding: 0; justify-content: center; }
.btn.sm.icon-btn { width: 28px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; height: 36px; width: 100%; color: var(--body); }
select { width: auto; padding-right: 4px; }
textarea { resize: vertical; min-height: 90px; padding: 8px 10px; height: auto; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input[type=color] { padding: 2px; width: 36px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: none; height: 34px; padding: 0 12px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--hover); color: var(--text); }
label.f { display: block; font-size: 12px; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* badges & small elements */
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar.none { background: var(--hover) !important; color: var(--faint); border: 1px dashed var(--line-2); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--body); }
.tag.blue { background: var(--accent-soft); color: var(--accent); }
.tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pri { font-size: 11px; font-weight: 600; text-transform: capitalize; color: var(--muted); }
.pri.high { color: var(--amber); } .pri.urgent { color: var(--red); }
.key { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tt { display: inline-flex; width: 16px; height: 16px; border-radius: 4px; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: none; background: var(--hover); color: var(--body); border: 1px solid var(--line-2); }
.tt.bug { color: var(--red); border-color: var(--red); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.overdue { color: var(--red); font-weight: 600; }
.muted { color: var(--muted); } .faint { color: var(--faint); }

/* board */
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.col { flex: 0 0 272px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col h3 { margin: 0; padding: 12px 14px 8px; font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.col h3 i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.col h3 .n { margin-left: auto; font-weight: 500; color: var(--muted); }
.cards { padding: 4px 8px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; box-shadow: var(--shadow); cursor: pointer; }
.card:hover { border-color: var(--line-2); box-shadow: 0 2px 6px rgba(15,23,42,.1); }
.card.dragging { opacity: .4; }
.card .ttl { margin: 6px 0 8px; font-weight: 500; color: var(--text); }
.card .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.card .meta .sp { flex: 1; }
.add-card { margin: 0 8px 8px; justify-content: flex-start; color: var(--muted); }

/* table */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl .ttl { font-weight: 500; color: var(--text); }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { margin: 0 8px; font-size: 18px; font-weight: 600; color: var(--text); min-width: 160px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.cal .dow { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 118px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal.week .day { min-height: 340px; }
.cal .day.out .num { color: var(--faint); font-weight: 400; }
.cal .day.wknd { background: var(--panel-2); }
.cal .day:hover { background: var(--hover); }
.cal .day.over { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .num { font-size: 12px; color: var(--body); padding: 2px 4px; font-weight: 500; }
.cal .today .num { background: var(--accent); color: var(--on-accent); border-radius: 999px; align-self: flex-start; padding: 0 7px; }
.chip { display: flex; align-items: center; gap: 5px; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 500; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c); overflow: hidden; white-space: nowrap; cursor: pointer; }
.chip:hover { background: var(--accent-soft); }
.chip .avatar { width: 16px; height: 16px; font-size: 8px; }
.chip.done { opacity: .5; text-decoration: line-through; }
.chip span { overflow: hidden; text-overflow: ellipsis; }
.more { font-size: 12px; color: var(--accent); padding: 0 6px; font-weight: 500; }

.bar { position: absolute; height: 24px; border-radius: 4px; padding: 0 8px; font-size: 12px; font-weight: 500; color: var(--text); background: color-mix(in srgb, var(--c) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--panel)); border-left: 3px solid var(--c); display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; z-index: 2; }
.bar:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); }
.bar.done { opacity: .45; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* overview */
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--line-2); box-shadow: 0 2px 6px rgba(15,23,42,.1); }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.stat b { font-size: 28px; font-weight: 700; display: block; color: var(--text); letter-spacing: -.02em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.hbar { display: grid; grid-template-columns: 110px 1fr 32px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.hbar .track { background: var(--hover); border-radius: 999px; height: 8px; overflow: hidden; }
.hbar .track i { display: block; background: var(--done); height: 100%; border-radius: 999px; }
.hbar .v { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 8px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix th { font-size: 12px; color: var(--muted); font-weight: 600; }
.matrix td.hot { font-weight: 600; color: var(--text); }
.listrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.listrow:last-child { border-bottom: 0; }

/* modal */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--panel); border-radius: 12px; width: 100%; max-width: 880px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.modal.narrow { max-width: 480px; }
.modal header { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.modal header b { color: var(--text); font-size: 16px; font-weight: 600; }
.modal header .sp { flex: 1; }
.modal .body { padding: 20px; }
.modal .cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.modal .ttl-in { font-size: 20px; font-weight: 600; color: var(--text); border-color: transparent; padding: 0 8px; height: 40px; margin: 0 -8px 12px; width: calc(100% + 16px); }
.modal .ttl-in:hover, .modal .ttl-in:focus { border-color: var(--line); }
.fields { display: flex; flex-direction: column; gap: 12px; }
.fields select, .fields input { width: 100%; }
.sub { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.sub input[type=checkbox], .row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.sub.done span { text-decoration: line-through; color: var(--faint); }
.sub span { flex: 1; }
.progress { height: 6px; background: var(--hover); border-radius: 4px; overflow: hidden; margin: 6px 0 8px; }
.progress i { display: block; height: 100%; background: var(--done); border-radius: 999px; transition: width .6s cubic-bezier(.32, .72, 0, 1); }
.cmt { display: flex; gap: 10px; margin: 12px 0; }
.cmt .bub { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 12px; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cmt small, .act { color: var(--muted); font-size: 12px; }
.act { padding: 3px 0; }
h4 { margin: 22px 0 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.auth .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 32px; width: 100%; max-width: 400px; }
.auth svg.logo { height: 28px; margin-bottom: 24px; }
.auth h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: var(--text); } .auth p { color: var(--muted); margin: 0 0 20px; }
.auth .fields { gap: 14px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: #0f172a; color: #fff; padding: 10px 16px; border-radius: var(--r-lg); opacity: 0; pointer-events: none; transition: .2s; z-index: 99; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.menu-toggle { display: none; }
kbd { font: 500 11px 'Inter', sans-serif; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); }

@media (max-width: 860px) {
  .side { position: fixed; inset: 0 auto 0 0; width: 240px; padding-bottom: 8px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side:is(:hover, .xp) { width: 240px; }
  .side.open { transform: none; }
  .side .brand svg.logo { display: block; } .side .brand svg.mark { display: none; }
  .side .label, .side .n, .side .sec, .side .who, .side .me .btn { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex; }
  .modal .cols { grid-template-columns: 1fr; }
  .content, .top, .filters { padding-left: 14px; padding-right: 14px; }
  .cal .day { min-height: 80px; } .chip .avatar { display: none; }
}

/* ---- streams, learning and the completion celebration ---- */
.grid.three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.tag.flag.red { background: #fee2e2; color: #b91c1c; }
.tag.flag.purple { background: #ede9fe; color: var(--purple); }
.tag.flag.grey { background: var(--hover); color: var(--muted); }
[data-theme="dark"] .tag.flag.red { background: rgba(239,68,68,.16); color: #fca5a5; }
[data-theme="dark"] .tag.flag.purple { background: rgba(124,58,237,.2); color: #c4b5fd; }
.blk { font-size: 12px; color: #b91c1c; margin: -2px 0 8px; }
[data-theme="dark"] .blk { color: #fca5a5; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }
.panel.stream { display: flex; flex-direction: column; gap: 14px; border-top: 3px solid var(--c); }
.statrow { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.statrow b { color: var(--text); font-size: 16px; margin-right: 3px; }
.statrow .overdue b { color: var(--red); }
.stack { display: inline-flex; }
.stack .avatar { margin-left: -6px; border: 2px solid var(--panel); }
.stack .avatar:first-child { margin-left: 0; }
.avatar.more { background: var(--hover); color: var(--muted); }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch i { display: block; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-2); }
.swatch input:checked + i { box-shadow: 0 0 0 2px var(--text); }
.swatch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }
.pick { max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 10px; }
.pick label { padding: 5px 0; cursor: pointer; }
.panel.learn, .panel.topic { cursor: pointer; }
.panel.learn { background: linear-gradient(135deg, var(--accent-soft), var(--panel) 70%); }
.panel.learn:hover, .panel.topic:hover { border-color: var(--accent); }
.panel.topic.seen { background: var(--panel-2); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.tick { color: var(--green); font-weight: 700; }
.topicbody { max-width: 680px; }
.topicbody p { line-height: 1.65; margin: 0 0 12px; }
.topicbody .lede { font-size: 15px; color: var(--muted); }
.topicbody h4 { margin: 18px 0 6px; color: var(--text); }
.topicbody ul { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }
.callout { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 10px 14px; margin: 14px 0; }
.callout b { color: var(--text); display: block; margin-bottom: 2px; }
#toast.cheer { display: flex; align-items: center; gap: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
#toast .ck { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--accent); align-items: center; justify-content: center; font-size: 13px; flex: none; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.row .sp { flex: 1; }

@media (max-width: 860px) { .top .subtitle { display: none; } .top { padding: 0 14px; } .filters { padding: 12px 14px 0; } }
.tipwrap { max-width: 720px; margin: 0 auto 16px; }

/* signed-in user at the bottom of the sidebar, as in the master demo: icon, name, chevron; the menu opens upward */
.side .userdd { border-top: 1px solid var(--line); margin: 6px -4px 0; padding: 4px 4px 0; }
.side .userrow { height: 40px; }
.side .userrow .chev { margin-left: auto; display: inline-flex; transition: transform .2s, opacity .15s ease; }
.side .userrow .chev.up svg { transform: rotate(180deg); }
.side .userrow .label { overflow: hidden; text-overflow: ellipsis; }
.userdd .menu { position: fixed; left: 6px; bottom: 54px; width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 80; }
.userdd .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 1px; }
.userdd .who b { color: var(--text); }
.userdd .who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.userdd .item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; background: none; border: 0; border-radius: var(--r); text-align: left; color: var(--body); font-weight: 500; }
.userdd .item:hover { background: var(--hover); color: var(--text); }
/* tabs and filters read as two separate groups */
.filters { gap: 10px; }
.filters .seg { margin-right: 4px; }
.vsep { width: 1px; height: 26px; background: var(--line-2); margin: 0 10px; flex: none; }
/* worked examples on the cards */
.codewrap { position: relative; margin: 6px 0 14px; }
pre.code { margin: 0; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); white-space: pre; }
.codecopy { position: absolute; top: 8px; right: 8px; opacity: .85; }
@media (max-width: 860px) { .vsep { display: none; } }

/* sign-in page: Google first, then the password form */
.auth .or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12px; }
.auth .or::before, .auth .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth .err { margin-top: 10px; min-height: 18px; }
.auth input[type=email], .auth input[type=password] { width: 100%; height: 44px; font-size: 16px; }   /* 16px stops phones zooming in */

/* the page list scrolls on short screens; the user row below it never gets cut off */
.side .navscroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
.side .navscroll::-webkit-scrollbar { display: none; }
.side .userdd { flex: none; margin-top: 4px; padding-bottom: 2px; }
/* the board fills the screen height, so its sideways scrollbar sits at the bottom, not right after the cards */
.content.fill { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 12px; }
.content.fill .board { flex: 1; min-height: 0; align-items: stretch; padding-bottom: 10px; }
.content.fill .col { max-height: none; }
.content.fill .cards { flex: 1; }
/* one-click finish on a card */
.qdone { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; margin-right: 6px; border: 0; background: none; color: var(--faint); border-radius: 50%; }
.qdone:hover, .qdone:focus-visible { color: var(--green); background: var(--hover); }
.qdone svg { width: 18px; height: 18px; }
/* celebration: the Kimaru diamonds fly in and lock into the logo, a check pops, then everything lifts away in a shower of diamonds */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 44%; width: var(--s); height: var(--s); border-radius: 2px; opacity: 0; animation: burst var(--d) cubic-bezier(.15, .7, .3, 1) var(--delay, .8s) forwards; }
@keyframes burst {
  0%   { opacity: 1; transform: translate(0, 0) rotate(45deg) scale(.4); }
  45%  { opacity: 1; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) / 2)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.2), calc(var(--y) + 85vh)) rotate(var(--r)) scale(1); }
}
.cel-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 44%, rgba(84, 141, 224, .32), rgba(113, 52, 190, .14) 32%, transparent 62%); opacity: 0; animation: glow 3s ease-out forwards; }
@keyframes glow { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.cel-stage { --mw: clamp(120px, 20vw, 170px); position: absolute; left: 50%; top: 44%; width: 0; height: 0; }
.cel-stage.big { --mw: clamp(165px, 27vw, 230px); }
.cel-stage > * { position: absolute; }
.cel-rays { left: calc(var(--mw) * -2); top: calc(var(--mw) * -2); width: calc(var(--mw) * 4); height: calc(var(--mw) * 4); border-radius: 50%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(84, 141, 224, .34) 0 8deg, transparent 8deg 24deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 68%); mask: radial-gradient(circle, #000 0, transparent 68%); animation: rays 2.8s ease-out .5s forwards; }
@keyframes rays { 0% { opacity: 0; transform: rotate(0) scale(.5); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(60deg) scale(1.15); } }
.cel-ring { left: calc(var(--mw) * -.5); top: calc(var(--mw) * -.5); width: var(--mw); height: var(--mw); border: 3px solid #548DE0; border-radius: 50%; opacity: 0; animation: ripple 1.1s ease-out .75s forwards; }
.cel-ring.r2 { border-color: #7134BE; animation-delay: .95s; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }
.cel-mark { left: calc(var(--mw) * -.5); top: calc(var(--mw) * -.5); width: var(--mw); filter: drop-shadow(0 10px 18px rgba(49, 98, 180, .35)); animation: markLife 3.1s ease-in-out forwards; }
.cel-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.dg { transform-box: fill-box; transform-origin: center; opacity: 0; animation: dIn .78s cubic-bezier(.2, 1.15, .3, 1) forwards; }
.dg.d1 { --fx: -150px; --fy: -110px; --fr: -200deg; animation-delay: .05s; }
.dg.d2 { --fx: 170px; --fy: -40px; --fr: 220deg; animation-delay: .17s; }
.dg.d3 { --fx: -80px; --fy: 150px; --fr: -240deg; animation-delay: .29s; }
@keyframes dIn { 0% { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)) scale(.2); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes markLife {
  0%, 24% { transform: scale(1); }
  32% { transform: scale(1.14); }
  42% { transform: scale(1); }
  55% { transform: translateY(-6px); }
  66% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(-52px) scale(.92); opacity: 0; }
}
.cel-check { left: calc(var(--mw) * .12); top: calc(var(--mw) * .08); width: calc(var(--mw) * .46); height: calc(var(--mw) * .46); transform: scale(0); filter: drop-shadow(0 6px 10px rgba(16, 185, 129, .45)); animation: checkPop 3s cubic-bezier(.2, 1.5, .4, 1) .78s forwards; }
.cel-check svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cel-check .cc { fill: #10b981; stroke: #fff; stroke-width: 3; }
.cel-check .ck2 { fill: none; stroke: #fff; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44; stroke-dashoffset: 44; animation: drawCheck .45s ease-out 1.1s forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes checkPop { 0% { transform: scale(0); opacity: 1; } 12% { transform: scale(1.18); } 20% { transform: scale(1); } 74% { transform: scale(1); opacity: 1; } 100% { transform: translateY(-52px) scale(.9); opacity: 0; } }
.confetti i.star { left: 0; top: 0; width: var(--s); height: var(--s); border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 1s ease-in-out var(--delay) forwards; }
@keyframes twinkle { 0% { opacity: 0; transform: scale(0) rotate(0); } 40% { opacity: 1; transform: scale(1.2) rotate(40deg); } 100% { opacity: 0; transform: scale(.2) rotate(90deg); } }
.confetti i.spark { left: 0; top: 0; border-radius: 2px; animation: sparkFade .95s ease-out forwards; }
@keyframes sparkFade { 0% { opacity: 1; transform: translateY(0) rotate(45deg) scale(1); } 100% { opacity: 0; transform: translateY(54px) rotate(225deg) scale(.3); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }

/* the celebration character: it swoops in above the logo, hovers, then flies off */
.confetti img.cel-pet { position: fixed; width: clamp(96px, 15vw, 160px); height: auto; left: 50%; top: 19%; opacity: 0; transform: translate(-50%, -50%) scale(0); filter: drop-shadow(0 8px 12px rgba(15, 23, 42, .2)); animation: petIn 3.5s cubic-bezier(.2, .9, .25, 1) .5s forwards; }
.confetti img.cel-pet.left { left: 26%; top: 27%; } .confetti img.cel-pet.right { left: 74%; top: 27%; animation-delay: .65s; }
.confetti img.cel-pet.center { top: 14%; width: clamp(120px, 19vw, 210px); animation-delay: .55s; }
@keyframes petIn {
  0%   { opacity: 0; transform: translate(-190%, 150%) scale(.3) rotate(-25deg); }
  14%  { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(7deg); }
  22%  { transform: translate(-50%, -50%) scale(1) rotate(-3deg); }
  34%  { transform: translate(-50%, -60%) scale(1.04) rotate(3deg); }
  46%  { transform: translate(-50%, -45%) scale(1) rotate(-3deg); }
  58%  { transform: translate(-50%, -58%) scale(1.03) rotate(2deg); }
  70%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(150%, -170%) scale(.6) rotate(20deg); }
}
.credits { margin: 6px 4px 2px; padding: 8px 8px 4px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.4; color: var(--faint); }
.credits a { color: var(--muted); }

/* status as a pill dropdown right in the table */
.stsel { appearance: none; -webkit-appearance: none; height: 28px; max-width: 150px; padding: 0 26px 0 26px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer;
  background-color: var(--panel);
  background-image: radial-gradient(circle at 12px 50%, var(--c) 0 4px, transparent 4.5px), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0 0, right 9px center; }
.stsel:hover { border-color: var(--line-2); background-color: var(--hover); }
.stsel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tbl .stsel, .listrow .stsel { vertical-align: middle; }

/* the day view opened from the calendar */
.day { cursor: pointer; }
.daybody { max-width: 860px; }
.daystats { gap: 22px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.daystats b { color: var(--text); font-size: 18px; margin-right: 4px; }
.daygroup { margin-bottom: 14px; }
.daygroup h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 14px; }
.daygroup h4 .faint { font-weight: 400; font-size: 12px; }
.dayrow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 150px auto auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.dayrow:hover, .tlrow:hover { background: var(--hover); }
.dayrow .ttl { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dayrow .who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; }
.dayrow .who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.flag.green { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .tag.flag.green { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 12px; }
.tlrow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tlrow .tm { flex: none; width: 64px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.tlrow i { color: var(--muted); }
@media (max-width: 860px) { .dayrow { grid-template-columns: 56px minmax(0, 1fr) auto; } .dayrow .who, .dayrow .pri { display: none; } .dayrow > :nth-child(n+4):not(.who):not(.pri) { grid-column: 2 / -1; } }

/* documents */
.dochead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.crumbs { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 200px; flex-wrap: wrap; }
.crumbs button { background: none; border: 0; padding: 4px 6px; border-radius: 6px; color: var(--accent); font-weight: 500; }
.crumbs button:hover { background: var(--hover); }
.crumbs button[aria-current] { color: var(--text); font-weight: 600; cursor: default; }
.docq { width: 220px; }
.docrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; border-radius: 6px; color: var(--body); }
button.docrow { cursor: pointer; }
button.docrow:hover, .docrow.file:hover { background: var(--hover); }
.docrow svg { color: var(--muted); flex: none; }
.docrow.folder svg:first-child { color: var(--accent); }
.docrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.docrow .meta { font-size: 12px; white-space: nowrap; }
.docsec { margin: 18px 0 6px; }
.docsec .panel { margin-top: 10px; }
.docchip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); max-width: 100%; }
.docchip button { background: none; border: 0; color: var(--body); }
.docopen { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; max-width: 280px; font-size: 13px; }
.docopen span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docopen:hover { color: var(--accent); }
.docrm { display: inline-flex; padding: 4px 8px 4px 2px; color: var(--faint); }
.docrm:hover { color: var(--red); }
.docchip svg { width: 14px; height: 14px; }
@media (max-width: 860px) { .docq { width: 100%; } .docrow .meta { display: none; } }

/* the date fields stay inside the window */
.fields .row.dates { flex-wrap: wrap; align-items: flex-start; }
.fields .row.dates > div { flex: 1 1 128px; min-width: 0; }
.fields input[type=date], .fields input[type=number], .fields input[type=text], .fields select { width: 100%; min-width: 0; max-width: 100%; }
/* @ mentions of documents */
.mentionbox { position: absolute; left: 0; right: 0; z-index: 90; max-height: 270px; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 4px; }
.mention { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 6px; text-align: left; color: var(--body); }
.mention.on, .mention:hover { background: var(--accent-soft); }
.mention svg { color: var(--muted); flex: none; }
.mention .nm { font-weight: 600; color: var(--text); white-space: nowrap; }
.mention .faint { margin-left: auto; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.descview { min-height: 64px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); white-space: pre-wrap; word-break: break-word; line-height: 1.7; cursor: text; }
.descview:hover { border-color: var(--accent); }
.mention-chip { display: inline-flex; align-items: center; gap: 4px; margin: 0 1px; padding: 1px 8px 1px 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; vertical-align: baseline; }
.mention-chip:hover { background: var(--accent); color: var(--on-accent); }
.mention-chip svg { width: 13px; height: 13px; }

/* related fields share a row, so the form stays short */
.fields .pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 10px; }
.fields .pair > div { min-width: 0; }
.fields .pair select, .fields .pair input { font-size: 13px; }
.modal .cols > div:first-child { min-width: 0; }
/* toasts (as in the master demo): green when something worked, red for a problem, amber for a notice; at the top of the screen */
#toast { top: 20px; bottom: auto; transform: translate(-50%, -14px); display: flex; align-items: center; gap: 10px; max-width: min(92vw, 560px); padding: 13px 18px; border-radius: 10px; font-size: 14.5px; font-weight: 500; line-height: 1.35; background: #0f172a; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .22); z-index: 300; }
#toast.show { transform: translate(-50%, 0); }
#toast .ti { width: 20px; height: 20px; flex: none; }
#toast.ok, #toast.cheer { background: #ECFDF5; color: #0b1d14; border: 2px solid #10B981; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
#toast.err { background: #FEF2F2; color: #3b0a0a; border: 2px solid #EF4444; }
#toast.warn { background: #FFFBEB; color: #3a2a05; border: 2px solid #F59E0B; }
[data-theme="dark"] #toast.ok, [data-theme="dark"] #toast.cheer { background: #0d2a20; color: #d1fae5; }
[data-theme="dark"] #toast.err { background: #2c1214; color: #fecaca; }
[data-theme="dark"] #toast.warn { background: #2b2108; color: #fde68a; }
#toast.cheer { font-weight: 600; }
#toast .ck { background: #10B981; color: #fff; }
@media (max-width: 860px) { .modal .cols { grid-template-columns: minmax(0, 1fr); } }
.modal #nd, .modal #td { min-height: 150px; }

/* long titles are cut with an ellipsis so the Assigned by column fits */
.tbl td.ttl .cut { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sections inside a stream */
.tag.sec { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.secs { display: grid; gap: 4px; }
.secline { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: 10px; padding: 5px 8px; border: 0; border-radius: var(--radius); background: var(--panel-2, rgba(100, 116, 139, .08)); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; color: var(--text); }
.secline .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secline .progress { margin: 0; height: 5px; }
.secin { margin-bottom: 6px; }
.secin input { flex: 1; }
.secrow:empty { display: none; }

/* ---------- motion: the iOS feel ----------
   Two curves do most of the work: the iOS sheet curve (fast start, long soft landing) for things that slide, and a gentle spring for things that pop.
   Buttons do not change colour on hover (Kimaru design); they answer a press by shrinking slightly, like a key on a phone. */
:root { --ease-ios: cubic-bezier(.32, .72, 0, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }
.btn, .card, .panel.stream, .chip, .listrow, .stat, .seg button, .nav, .userdd .item, .mention-chip { transition: transform .22s var(--ease-ios), box-shadow .22s var(--ease-ios), background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease; }
.btn:active, .seg button:active, .chip:active { transform: scale(.96); transition-duration: .08s; }
.nav:active, .listrow:active, .stat.link:active { transform: scale(.985); transition-duration: .08s; }
.card:not(.dragging):hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(15, 23, 42, .22); }
.card:active { transform: scale(.985); }
.panel.stream:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
/* windows rise like an iOS sheet; the dim layer fades behind them */
.scrim { animation: scrimIn .28s ease both; }
.modal { animation: sheetIn .42s var(--ease-ios) both; transform-origin: 50% 0; }
@keyframes scrimIn { from { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(28px) scale(.96); } }
/* menus open from the corner they hang from */
.userdd .menu { animation: menuIn .26s var(--spring) both; transform-origin: 0 100%; }
@keyframes menuIn { from { opacity: 0; transform: scale(.88) translateY(8px); } }
/* a page slides up softly when you change page */
.content.enter > * { animation: pageIn .45s var(--ease-ios) both; }
.content.enter > *:nth-child(2) { animation-delay: .04s; }
.content.enter > *:nth-child(3) { animation-delay: .08s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } }
.content.enter .grid > *, .content.enter .cards > .card, .content.enter .tbl tbody tr { animation: pageIn .5s var(--ease-ios) both; }
.content.enter .grid > *:nth-child(2) { animation-delay: .05s; }
.content.enter .grid > *:nth-child(3) { animation-delay: .1s; }
.content.enter .grid > *:nth-child(4) { animation-delay: .15s; }
/* toasts drop in with a little bounce */
#toast { transition: transform .5s var(--spring), opacity .25s ease; }
/* the sliding segmented control: the selected tab fades up instead of snapping */
.seg button.on { animation: segOn .3s var(--ease-ios); }
@keyframes segOn { from { transform: scale(.94); } }
/* the board column that a card hovers over breathes slightly */
.col.over { transform: scale(1.01); transition: transform .2s var(--ease-ios), background-color .2s ease, border-color .2s ease; }
.card.dragging { transform: rotate(2deg) scale(1.03); box-shadow: var(--shadow-lg); opacity: .9; }
/* switches and checkboxes */
input[type=checkbox], input[type=radio] { transition: transform .2s var(--spring); }
input[type=checkbox]:active, input[type=radio]:active { transform: scale(.85); }
select, input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], textarea { transition: border-color .2s ease, box-shadow .2s ease; }
select:focus, input:focus, textarea:focus { box-shadow: 0 0 0 3px rgba(100, 116, 139, .18); outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* meeting import */
.impbox { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 18px; flex-wrap: wrap; }
.impbox .grow { flex: 1; min-width: 200px; }
.meetpick .grow { flex: 1; min-width: 0; }
.meetpick .tag { flex: none; }
.impbox b { color: var(--text); }
.impbox .muted { font-size: 13px; }
.impbox.quiet { opacity: .85; }
.ibadge { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: var(--done); color: #fff; flex: none; }
.ibadge svg { width: 18px; height: 18px; }
.impgrid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.meetlist { display: grid; gap: 6px; max-height: 60vh; overflow-y: auto; }
.meetpick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; }
.meetpick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.meetpick input { accent-color: var(--accent); }
.meetpick b { color: var(--text); font-size: 13.5px; }
.meetpick .muted { font-size: 12px; }
.tag.done { background: rgba(0, 128, 128, .12); color: var(--done); }
.improws { display: grid; gap: 10px; margin-top: 12px; }
.improw { display: grid; grid-template-columns: 22px minmax(0, 1fr) 270px; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.improw.off { opacity: .55; }
.improw.created { border-color: var(--done); }
.improw .main { min-width: 0; display: grid; gap: 6px; align-content: start; }
.improw .ttl-in { font-size: 15px; font-weight: 600; width: 100%; margin: 0; }
.improw textarea { min-height: 48px; font-size: 13px; }
.improw > input[type=checkbox] { margin-top: 10px; width: 16px; height: 16px; accent-color: var(--accent); }
.improw .quote { font-size: 12px; color: var(--muted); font-style: italic; border-left: 2px solid var(--line-2); padding-left: 8px; }
.okline { font-size: 12px; color: var(--done); display: flex; gap: 4px; align-items: center; }
.warnline { font-size: 12px; color: var(--amber); }
.impbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 0 2px; background: var(--panel); border-top: 1px solid var(--line); flex-wrap: wrap; }
.impbar .grow { flex: 1; }
.ovw { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ovw summary { cursor: pointer; color: var(--text); font-weight: 500; }
.steps { padding-left: 20px; display: grid; gap: 10px; }
.code { background: var(--panel-2, #f1f5f9); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font: 12px ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; margin: 8px 0 0; user-select: all; }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--line-2); border-top-color: var(--done); border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 980px) { .impgrid { grid-template-columns: 1fr; } .improw { grid-template-columns: 22px minmax(0, 1fr); } .improw .fields { grid-column: 1 / -1; } }

/* meeting import: one compact line per suggested task; the editor opens on click */
.improw { display: block; padding: 0; }
.improw.open { border-color: var(--line-2); }
.imphead { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; border-radius: var(--r-lg); }
.imphead:hover { background: var(--hover, rgba(127, 127, 127, .06)); }
.imphead > input[type=checkbox] { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.impsum { min-width: 0; }
.impsum .t { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.impsum .m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.impsum .m > span { display: inline-flex; align-items: center; gap: 4px; }
.impsum .who { gap: 6px; }
.impchev { display: inline-flex; color: var(--muted); transition: transform .15s; }
.impchev.open { transform: rotate(90deg); }
.impchev svg { width: 16px; height: 16px; }
.improw .impbody { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; padding: 4px 14px 14px 48px; border-top: 1px dashed var(--line); }
.improw .impbody .main { display: grid; gap: 6px; align-content: start; padding-top: 10px; min-width: 0; }
.improw .impbody .fields { display: grid; gap: 8px; align-content: start; padding-top: 10px; }
.impsub { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 6px; align-items: center; }
.impsub input { min-width: 0; }
.cochips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.cochip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: var(--panel); }
.cochip .x { border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; padding: 0 4px; }
.cochip .x svg { width: 12px; height: 12px; }
.cowrap select { width: 100%; }
.warnt { color: var(--amber); }
.tag.warn { background: rgba(217, 119, 6, .14); color: var(--amber); }
.impctl { margin: 8px 0 4px; }
.sub .subwho { width: 120px; margin-left: auto; font-size: 12px; }
@media (max-width: 1280px) { .improw .impbody { grid-template-columns: 1fr; padding-left: 14px; } }

/* list: fewer, calmer columns. Two-line cells keep stream+section and assignee+assigned by together, with long text cut short. */
.tbl { table-layout: fixed; }
.tbl th:nth-child(1) { width: 92px; } .tbl th:nth-child(3) { width: 132px; } .tbl th:nth-child(4) { width: 90px; }
.tbl th:nth-child(5) { width: 17%; } .tbl th:nth-child(6) { width: 17%; } .tbl th:nth-child(7) { width: 84px; }
.tbl td { overflow: hidden; }
.tbl td.ttl .cut { max-width: none; }
.tbl td.two { line-height: 1.25; }
.tbl td.two > * { max-width: 100%; }
.tbl td .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tbl td .row.cut { display: flex; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.tbl td .cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl td.due { white-space: nowrap; }
.stfilter { font-weight: 500; }
@media (max-width: 900px) { .tbl { table-layout: auto; min-width: 760px; } .content:has(.tbl) { overflow-x: auto; } }
