/* CBSE.CLUB — plain CSS, no framework. Tokens first. */
:root {
  --primary: #3B3FD8; --primary-hover: #2F33B8; --primary-tint: #ECEDFD; --on-primary: #fff;
  --bg: #f6f6fb; --surface: #fff; --surface-2: #f0f0f8; --ink: #1d1d2b; --muted: #6a6a82; --line: #e1e1ee;
  --danger: #c93a3a; --warn: #b7791f; --gold: #e6a800; --gold-bg: #fff6d6;
  --shadow: 0 1px 2px rgb(20 20 50 / .06), 0 4px 14px rgb(20 20 50 / .06);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --c-indigo: #dfe0fb; --c-indigo-ink: #23247a;
  --c-sun: #ffe9a3;    --c-sun-ink: #6a4b00;
  --c-coral: #ffd0c6;  --c-coral-ink: #7a2a18;
  --c-mint: #c4f0dc;   --c-mint-ink: #0f5a3b;
  --c-sky: #cde8fd;    --c-sky-ink: #0f4a7a;
  --c-lilac: #e6dbff;  --c-lilac-ink: #4a2a8a;
  --c-rose: #ffd6e8;   --c-rose-ink: #8a1f55;
  --c-sand: #efe2c7;   --c-sand-ink: #5a4521;
  --c-slate: #dde3ea;  --c-slate-ink: #34414f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --primary: #8B8EF5; --primary-hover: #a3a6f8; --primary-tint: #26274d; --on-primary: #11112a;
    --bg: #12121c; --surface: #1b1b2a; --surface-2: #232336; --ink: #ececf6; --muted: #9a9ab5; --line: #2e2e46;
    --gold-bg: #3a3010; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .35);
    --c-indigo: #2b2d63; --c-indigo-ink: #c9caff; --c-sun: #5a4710; --c-sun-ink: #ffe9a3; --c-coral: #5f2b20; --c-coral-ink: #ffd0c6;
    --c-mint: #1b4a38; --c-mint-ink: #c4f0dc; --c-sky: #1c3f5c; --c-sky-ink: #cde8fd; --c-lilac: #3d2d63; --c-lilac-ink: #e6dbff;
    --c-rose: #5c2542; --c-rose-ink: #ffd6e8; --c-sand: #4a3f27; --c-sand-ink: #efe2c7; --c-slate: #2e3946; --c-slate-ink: #dde3ea; }
}
:root[data-theme="dark"] { color-scheme: dark;
  --primary: #8B8EF5; --primary-hover: #a3a6f8; --primary-tint: #26274d; --on-primary: #11112a;
  --bg: #12121c; --surface: #1b1b2a; --surface-2: #232336; --ink: #ececf6; --muted: #9a9ab5; --line: #2e2e46;
  --gold-bg: #3a3010; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 14px rgb(0 0 0 / .35);
  --c-indigo: #2b2d63; --c-indigo-ink: #c9caff; --c-sun: #5a4710; --c-sun-ink: #ffe9a3; --c-coral: #5f2b20; --c-coral-ink: #ffd0c6;
  --c-mint: #1b4a38; --c-mint-ink: #c4f0dc; --c-sky: #1c3f5c; --c-sky-ink: #cde8fd; --c-lilac: #3d2d63; --c-lilac-ink: #e6dbff;
  --c-rose: #5c2542; --c-rose-ink: #ffd6e8; --c-sand: #4a3f27; --c-sand-ink: #efe2c7; --c-slate: #2e3946; --c-slate-ink: #dde3ea; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2em 0 .4em; line-height: 1.2; } h2 { font-size: 1.15rem; margin: 0 0 .6em; } h3 { font-size: 1rem; margin: 0 0 .4em; } h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .4em; }
p { margin: 0 0 .8em; } hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.muted { color: var(--muted); } .spacer { flex: 1; } [hidden] { display: none !important; }
.icon { vertical-align: -3px; flex: none; }
.narrow { max-width: 640px; margin: 0 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.list { list-style: none; padding: 0; margin: 0 0 1rem; } .list li { padding: .5rem 0; border-bottom: 1px solid var(--line); } .list--tight li { padding: .25rem 0; border: 0; font-size: .9rem; }
.inline { display: inline; margin: 0; }

/* buttons & forms */
.btn, button.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); } .btn--primary:hover { background: var(--primary-hover); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn--gold { background: var(--gold-bg); border-color: var(--gold); }
.btn--sm { padding: .3rem .6rem; font-size: .85rem; } .btn--lg { padding: .8rem 1.4rem; font-size: 1.05rem; } .btn--block { width: 100%; justify-content: center; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; } .link:hover { text-decoration: underline; }
.link--small { font-size: .8rem; } .link--danger { color: var(--danger); }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; } .icon-btn:hover { background: var(--surface-2); color: var(--ink); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .5rem .65rem; max-width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible, .tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
label { display: block; font-weight: 600; font-size: .9rem; } label input:not([type=checkbox]):not([type=radio]), label select { display: block; width: 100%; margin-top: .25rem; font-weight: 400; }
label small { display: block; font-weight: 400; color: var(--muted); margin-top: .2rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; } .check input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 9px; padding: .75rem; } legend { font-weight: 600; padding: 0 .3rem; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .25rem .75rem; margin-top: .5rem; }
.stack { display: grid; gap: .9rem; } .stack--tight { gap: .5rem; }
.addrow { display: flex; gap: .4rem; margin-top: .4rem; } .addrow input { flex: 1; min-width: 0; }

/* topbar */
.topbar { display: flex; align-items: center; gap: .9rem; padding: .55rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 800; font-size: 1.2rem; color: var(--primary); letter-spacing: -.02em; } .brand span { color: var(--ink); font-weight: 600; } .brand:hover { text-decoration: none; }
.brand--big { font-size: 1.8rem; display: block; margin-bottom: 1rem; }
.topbar__nav { display: flex; gap: .2rem; } .topbar__nav a { display: inline-flex; gap: .35rem; align-items: center; padding: .4rem .65rem; border-radius: 8px; color: var(--ink); font-weight: 600; } .topbar__nav a:hover { background: var(--surface-2); text-decoration: none; }
.search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: .4rem; background: var(--surface-2); border-radius: 9px; padding: 0 .65rem; margin-left: auto; color: var(--muted); }
.search input { border: 0; background: none; flex: 1; padding: .45rem 0; min-width: 0; } .search input:focus { outline: none; } .search:focus-within { outline: 2px solid var(--primary); }
.bell { position: relative; color: var(--ink); padding: .4rem; border-radius: 8px; } .bell:hover { background: var(--surface-2); }
.bell__count { position: absolute; top: -2px; right: -2px; background: var(--danger); color: #fff; font-size: .7rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.main { padding: 1rem; max-width: 1800px; margin: 0 auto; }
.flash, .banner { margin: .75rem 1rem 0; padding: .65rem .9rem; border-radius: 10px; background: var(--primary-tint); } .flash--alert, .banner--alert { background: #fde4e4; color: #7a1f1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flash--alert, :root:not([data-theme="light"]) .banner--alert { background: #4a2020; color: #ffd0d0; } }
:root[data-theme="dark"] .flash--alert, :root[data-theme="dark"] .banner--alert { background: #4a2020; color: #ffd0d0; }

/* menus */
.menu { position: relative; } .menu > summary { list-style: none; cursor: pointer; } .menu > summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; display: grid; gap: .15rem; }
.menu:not(.menu--right) .menu__panel { left: 0; right: auto; }
.menu__panel a, .menu__panel .link, .menu__panel button.link { display: block; padding: .4rem .6rem; border-radius: 7px; color: var(--ink); text-align: left; width: 100%; } .menu__panel a:hover, .menu__panel .link:hover { background: var(--surface-2); text-decoration: none; }
.menu__panel--row { display: flex; flex-wrap: wrap; min-width: 0; width: max-content; max-width: 260px; }
.menu__who { padding: .4rem .6rem; margin: 0; border-bottom: 1px solid var(--line); } .menu__row { display: flex; gap: .5rem; }
.usermenu .menu__panel { right: 0; left: auto; }

/* avatars */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; color: #fff; background: hsl(var(--h, 230) 55% 45%); object-fit: cover; flex: none; }
.avatar--xs { width: 22px; height: 22px; font-size: .62rem; } .avatar--sm { width: 30px; height: 30px; font-size: .75rem; } .avatar--md { width: 38px; height: 38px; }
.hue-0 { --h: 0 } .hue-1 { --h: 30 } .hue-2 { --h: 60 } .hue-3 { --h: 90 } .hue-4 { --h: 130 } .hue-5 { --h: 170 } .hue-6 { --h: 200 } .hue-7 { --h: 230 } .hue-8 { --h: 260 } .hue-9 { --h: 290 } .hue-10 { --h: 320 } .hue-11 { --h: 345 }
.avatars { display: inline-flex; } .avatars .avatar { margin-left: -6px; border: 2px solid var(--surface); } .avatars .avatar:first-child { margin-left: 0; }

/* column colours */
.c-indigo { --cc: var(--c-indigo); --ci: var(--c-indigo-ink); } .c-sun { --cc: var(--c-sun); --ci: var(--c-sun-ink); } .c-coral { --cc: var(--c-coral); --ci: var(--c-coral-ink); }
.c-mint { --cc: var(--c-mint); --ci: var(--c-mint-ink); } .c-sky { --cc: var(--c-sky); --ci: var(--c-sky-ink); } .c-lilac { --cc: var(--c-lilac); --ci: var(--c-lilac-ink); }
.c-rose { --cc: var(--c-rose); --ci: var(--c-rose-ink); } .c-sand { --cc: var(--c-sand); --ci: var(--c-sand-ink); } .c-slate { --cc: var(--c-slate); --ci: var(--c-slate-ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; } .swatch { display: inline-block; position: relative; } .swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--cc); border: 2px solid transparent; } .swatch input:checked + span { border-color: var(--ink); } .swatch input:focus-visible + span { outline: 2px solid var(--primary); }

/* board */
.board__head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; } .board__head h1 { margin: 0; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 2px; } .seg a { padding: .25rem .65rem; border-radius: 7px; color: var(--ink); font-size: .85rem; font-weight: 600; } .seg a.on { background: var(--surface); box-shadow: var(--shadow); } .seg a:hover { text-decoration: none; }
.lanes { display: flex; gap: .75rem; align-items: flex-start; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x proximity; min-height: 60vh; }
.lane { flex: 0 0 292px; background: var(--surface-2); border-radius: var(--radius); padding: .6rem; scroll-snap-align: start; border: 2px solid transparent; max-height: calc(100vh - 150px); display: flex; flex-direction: column; }
.lane--side { flex-basis: 240px; background: transparent; border: 2px dashed var(--line); } .lane--triage { background: var(--primary-tint); }
.lane--column { border-top: 6px solid var(--cc); } .lane--add { flex-basis: 220px; background: transparent; border: 2px dashed var(--line); }
.lane.drag-over { border-color: var(--primary); background: var(--primary-tint); }
.lane__title { display: flex; align-items: center; gap: .4rem; font-size: .95rem; margin: .1rem .2rem .6rem; }
.lane__title--colored .lane__name { color: var(--ci); } .lane__title .menu { margin-left: auto; }
.count { background: var(--surface); border-radius: 99px; font-size: .75rem; padding: 0 .5rem; color: var(--muted); font-weight: 600; }
.lane__cards { display: grid; gap: .5rem; overflow-y: auto; min-height: 40px; align-content: start; }
.lane__more { display: block; text-align: center; padding: .5rem; font-size: .85rem; }
.composer { margin-bottom: .6rem; } .composer summary { list-style: none; } .composer summary::-webkit-details-marker { display: none; }
.composer__form { display: flex; gap: .4rem; margin-top: .5rem; } .composer__form input { flex: 1; min-width: 0; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.tile { position: relative; background: var(--surface); border-radius: 10px; padding: .6rem .7rem; box-shadow: var(--shadow); border-left: 5px solid var(--cc, var(--c-indigo)); cursor: grab; transition: opacity .2s, filter .2s; }
.lane--column .tile, .tile { --bgc: var(--cc, var(--c-indigo)); }
.tile.dragging { opacity: .4; }
.tile__title { display: block; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; } .tile__title:hover { text-decoration: none; color: var(--primary); }
.tile__num { color: var(--muted); font-weight: 500; font-size: .85em; margin-right: .2rem; }
.tile__cover { width: 100%; max-height: 120px; object-fit: cover; border-radius: 7px; margin-top: .4rem; }
.tile__meta { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; margin-top: .45rem; font-size: .78rem; color: var(--muted); }
.meta { display: inline-flex; align-items: center; gap: 2px; } .meta .icon { width: 13px; height: 13px; } .meta--overdue { color: var(--danger); font-weight: 700; }
.tile__gold { position: absolute; top: -7px; right: 8px; color: var(--gold); background: var(--gold-bg); border-radius: 99px; padding: 1px 4px; display: grid; }
.tile.is-golden { box-shadow: 0 0 0 2px var(--gold), 0 6px 18px rgb(230 168 0 / .25); }
.tile.is-closed .tile__title { text-decoration: line-through; color: var(--muted); }
.tag { display: inline-block; background: var(--surface-2); border-radius: 99px; padding: 0 .5rem; font-size: .78rem; color: var(--ink); } .tag--btn { border: 0; cursor: pointer; font: inherit; font-size: .78rem; }
.pill { display: inline-block; background: var(--surface-2); border-radius: 99px; padding: 0 .55rem; font-size: .72rem; font-weight: 700; color: var(--muted); }
.pill--warn { background: #fff0d4; color: var(--warn); } .pill--fade { background: var(--surface-2); color: var(--muted); } .pill--gold { background: var(--gold-bg); color: var(--warn); }
/* entropy: cards drift towards Not Now */
.tile[data-entropy="5"] { opacity: .95; } .tile[data-entropy="6"] { opacity: .9; filter: saturate(.85); } .tile[data-entropy="7"] { opacity: .85; filter: saturate(.75); }
.tile[data-entropy="8"] { opacity: .78; filter: saturate(.6); } .tile[data-entropy="9"] { opacity: .7; filter: saturate(.5); } .tile[data-entropy="10"] { opacity: .62; filter: saturate(.4); }
.tile.is-golden[data-entropy] { opacity: 1; filter: none; }

/* home */
.section { margin-bottom: 2rem; } .section__head { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; } .section__head h2, .section__head h1 { margin: 0; flex: 1; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.board-tile { display: grid; gap: .2rem; background: var(--surface); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); color: var(--ink); border-top: 5px solid var(--primary); } .board-tile:hover { text-decoration: none; transform: translateY(-1px); }
.day { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.2rem 0 .4rem; }
.event { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; } .event__body { display: grid; } .event__body a { color: var(--ink); font-weight: 500; }

/* card page */
.cardpage { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); border-top: 6px solid var(--cc, var(--c-indigo)); max-width: 1100px; margin: 0 auto; }
.cardpage--modal { box-shadow: none; max-width: none; }
.crumbs { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.titleinput { width: 100%; font-size: 1.5rem; font-weight: 700; border: 1px solid transparent; background: transparent; padding: .2rem .3rem; border-radius: 8px; } .titleinput:hover, .titleinput:focus { border-color: var(--line); background: var(--surface); }
.cardpage__bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .75rem 0 1.25rem; }
.cardpage__cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.5rem; }
.cardpage__side section { margin-bottom: 1.25rem; } .people { display: grid; gap: .3rem; margin-bottom: .4rem; } .person { display: flex; align-items: center; gap: .4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.description { margin-bottom: 1.25rem; } .editor-toggle > summary { cursor: pointer; display: inline-block; margin-top: .4rem; }
.rich img { max-width: 100%; height: auto; border-radius: 8px; } .rich a { text-decoration: underline; } .rich pre { background: var(--surface-2); padding: .6rem; border-radius: 8px; overflow: auto; } .rich blockquote { border-left: 3px solid var(--line); margin: .5rem 0; padding-left: .8rem; color: var(--muted); }
.rich a.mention { background: var(--primary-tint); border-radius: 6px; padding: 0 .3rem; text-decoration: none; font-weight: 600; }
.steplist { list-style: none; padding: 0; margin: 0 0 .4rem; } .steplist li { display: flex; align-items: center; justify-content: space-between; padding: .25rem 0; } .steplist .done { text-decoration: line-through; color: var(--muted); }
.reactions-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.25rem; align-items: center; }
.react { background: var(--surface-2); border: 1px solid transparent; border-radius: 99px; padding: .1rem .55rem; cursor: pointer; font: inherit; font-size: .85rem; list-style: none; } .react--mine { border-color: var(--primary); background: var(--primary-tint); } .react--add { color: var(--muted); }
.logline { color: var(--muted); font-size: .85rem; display: flex; gap: .5rem; align-items: center; margin: .3rem 0; } .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.comment { display: flex; gap: .7rem; margin: 1rem 0; } .comment__body { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 12px; padding: .6rem .8rem; }
.comment__who { margin: 0 0 .2rem; } .comment__foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .3rem; }
.comment-form { margin-top: 1.25rem; } trix-editor { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; min-height: 90px; } trix-toolbar .trix-button-group { border-color: var(--line); }
.stamps { font-size: .82rem; }

/* dialogs & toasts */
.dialog { border: 0; border-radius: var(--radius); padding: 1.25rem; background: var(--surface); color: var(--ink); max-width: min(92vw, 520px); box-shadow: 0 20px 60px rgb(0 0 0 / .35); } .dialog::backdrop { background: rgb(10 10 30 / .55); }
.dialog--card { width: min(96vw, 1100px); max-width: none; padding: 0; max-height: 92vh; overflow: auto; } .dialog--card .cardpage { border-radius: 0; }
.keys { display: grid; grid-template-columns: 90px 1fr; gap: .3rem .75rem; } .keys dt { font-family: var(--mono); font-weight: 700; } .keys dd { margin: 0; }
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; }
.toast { background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; box-shadow: var(--shadow); } .toast--alert { background: var(--danger); color: #fff; }

/* lists */
.filters-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; } .filters { background: var(--surface); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); align-self: start; }
.pager { display: flex; gap: .5rem; margin: 1rem 0; }
.notifs, .results { list-style: none; padding: 0; margin: 0; } .notif { display: flex; gap: .6rem; padding: .6rem; border-radius: 10px; align-items: flex-start; } .notif--unread { background: var(--primary-tint); }
.notif__form { flex: 1; } .notif__btn { all: unset; cursor: pointer; display: grid; gap: .1rem; width: 100%; }
.results li { padding: .7rem 0; border-bottom: 1px solid var(--line); } mark { background: #ffe58a; color: #222; border-radius: 3px; padding: 0 2px; }

/* auth / marketing */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.auth-card { width: min(100%, 420px); background: var(--surface); padding: 2rem; border-radius: 16px; box-shadow: var(--shadow); }
.hero { text-align: center; padding: 5rem 1rem 3rem; max-width: 760px; margin: 0 auto; } .hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.03em; } .hero__lead { font-size: 1.2rem; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; max-width: 1000px; margin: 0 auto 3rem; padding: 0 1rem; } .features article { background: var(--surface); padding: 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.footer { text-align: center; padding: 2rem; }

@media (max-width: 800px) {
  .topbar__nav span { display: none; } .search { max-width: none; } .cardpage__cols, .filters-layout { grid-template-columns: 1fr; }
  .lane { flex-basis: 84vw; } .lane--side { flex-basis: 70vw; } .main { padding: .6rem; }
}
@media print { .topbar, .cardpage__bar, .toasts { display: none; } }

/* extras */
.person-row { display: flex; align-items: center; gap: .7rem; } .person-row__main { flex: 1; display: grid; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; } .table th, .table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); } .table th { font-size: .8rem; color: var(--muted); }
.qr svg { max-width: 220px; height: auto; } progress { width: 100%; height: 10px; }
.mentions { position: static; min-width: 180px; width: max-content; margin-top: 4px; } code { font-family: var(--mono); background: var(--surface-2); padding: 0 .3rem; border-radius: 5px; } pre { background: var(--surface-2); padding: .8rem; border-radius: 9px; overflow: auto; font-size: .85rem; }

/* ===== Kanban v2: soft columns, status pills, richer cards, collapsible lanes ===== */
.btn--pill { border-radius: 999px; }
.board__head { gap: .5rem; } .board__head h1 { font-size: 1.35rem; letter-spacing: -.02em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); display: inline-block; }
.menu__panel--pop { min-width: 210px; transform-origin: top right; animation: pop-in .14s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.menu__label { margin: .3rem .6rem .1rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.menu__panel a.on { background: var(--primary-tint); color: var(--primary); font-weight: 700; }
.menu__panel .check { padding: .3rem .6rem; border-radius: 7px; cursor: pointer; } .menu__panel .check:hover { background: var(--surface-2); }

.lanes { gap: 1rem; padding: .25rem .1rem 1.2rem; }
.lane { flex: 0 0 280px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: .5rem;
  transition: flex-basis .28s cubic-bezier(.4, 0, .2, 1), background-color .15s, border-color .15s, box-shadow .15s, opacity .2s; overflow: hidden; }
.lane--column { border-top: 1px solid var(--line); }
.lane--side { flex-basis: 260px; background: transparent; border: 1px dashed var(--line); }
.lane--triage { background: var(--primary-tint); border-color: transparent; }
.lane--add { flex-basis: 220px; border: 1px dashed var(--line); background: transparent; }
.lane.drag-over { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.lane__title { gap: .45rem; margin: .15rem .1rem .55rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.lane__title .icon { width: 15px; height: 15px; }
.lane__name { display: inline-block; font-weight: 700; padding: 3px 9px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.lane--column .lane__title--colored .lane__name { background: var(--cc); color: var(--ci); border-color: transparent; }
.lane--side .lane__name, .lane--triage .lane__name { background: transparent; border-color: transparent; padding-left: 0; }
.count { background: none; padding: 0; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane__fold { margin-left: auto; border: 0; background: none; color: var(--muted); padding: 3px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .15s, background-color .15s, transform .28s; }
.lane__title .menu { margin-left: 0; }
.lane:hover .lane__fold, .lane__fold:focus-visible { opacity: 1; } .lane__fold:hover { background: var(--surface); color: var(--ink); }
.lane__cards { gap: .6rem; padding: 2px; }

/* collapsed lane = slim vertical strip */
.lane.is-collapsed { flex-basis: 52px; padding: .5rem .35rem; cursor: pointer; align-items: center; }
.lane.is-collapsed .lane__cards, .lane.is-collapsed .composer, .lane.is-collapsed .lane__more, .lane.is-collapsed .menu { display: none; }
.lane.is-collapsed .lane__title { flex-direction: column; margin: 0; gap: .6rem; }
.lane.is-collapsed .lane__name { writing-mode: vertical-rl; transform: rotate(180deg); padding: 10px 6px; }
.lane.is-collapsed .lane__fold { margin: 0; opacity: 1; transform: rotate(180deg); order: -1; }
.lane.is-collapsed .lane__title > .icon { display: none; }
.lane.is-collapsed:hover { background: var(--surface); }
.lane.is-hidden { display: none; }

.addtask { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .88rem; cursor: pointer; border: 1px dashed transparent; transition: background-color .15s, color .15s, border-color .15s; }
.addtask:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }
.composer[open] .composer__form { animation: pop-in .16s ease-out; }

/* cards */
.tile { background: var(--surface); border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 12px; padding: .7rem .75rem .6rem; box-shadow: 0 1px 2px rgb(20 20 50 / .04);
  display: grid; gap: .5rem; animation: tile-in .35s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 28ms);
  transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s, border-color .15s, opacity .2s, filter .2s; }
@keyframes tile-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(20 20 50 / .1); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.tile:active { cursor: grabbing; }
.tile.dragging { opacity: .55; transform: rotate(2deg) scale(1.02); box-shadow: 0 16px 34px rgb(20 20 50 / .22); animation: none; }
.tile__title { font-size: .9rem; line-height: 1.3; }
.tile__tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.tag { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 .4rem; font-size: .72rem; font-weight: 500; }
.tile__who { display: flex; align-items: center; gap: .55rem; }
.tile__who .avatars .avatar { border-color: var(--surface); }
.tile__name { display: grid; line-height: 1.15; min-width: 0; flex: 1; } .tile__name b { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tile__name small { font-size: .7rem; color: var(--muted); }
.tile__name--none small { font-style: italic; }
.tile__who:has(.tile__name--none):not(:has(.ring)) { display: none; }
.ring { --size: 30px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p, 0) * 1%), var(--line) 0); transition: background .6s ease; }
.ring i { font-style: normal; width: calc(var(--size) - 6px); height: calc(var(--size) - 6px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: var(--ink); }
.tile__meta { margin-top: 0; gap: .15rem .8rem; font-size: .75rem; padding-top: .1rem; }
.tile__meta .icon { width: 14px; height: 14px; } .meta { gap: 4px; }
.tile.is-golden { box-shadow: 0 0 0 2px var(--gold), 0 6px 18px rgb(230 168 0 / .25); }
.tile.is-golden:hover { box-shadow: 0 0 0 2px var(--gold), 0 10px 26px rgb(230 168 0 / .35); }
.tile__gold { animation: gold-pulse 2.6s ease-in-out infinite; } @keyframes gold-pulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .tile, .lane, .tile__gold, .menu__panel--pop, .composer__form { animation: none !important; transition: none !important; } }
@media (max-width: 700px) { .lane { flex-basis: 84vw; } .lane.is-collapsed { flex-basis: 52px; } }

/* ---- admin console ---- */
.banner--info { background: var(--surface-2); color: var(--ink); }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.topbar__nav a.is-current { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .6rem; margin: .8rem 0; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
a.stat:hover { background: var(--surface-2); text-decoration: none; }
.stat b { font-size: 1.5rem; line-height: 1.1; } .stat span { font-size: .8rem; color: var(--muted); }
.stat--bad { border-color: var(--danger); }
.admin-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.admin-chart { margin: 0; padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-bars { display: flex; align-items: flex-end; gap: 2px; height: 5rem; margin-top: .5rem; }
.admin-bars span { flex: 1; background: var(--primary); border-radius: 2px 2px 0 0; min-height: 3px; opacity: .85; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1.5rem; }
.admin-filters { flex-wrap: wrap; align-items: center; } .admin-filters input[type=search] { max-width: 18rem; }
.table-wrap { overflow-x: auto; }
.admin-pager { margin: .6rem 0; }
.admin-form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin: .4rem 0 1rem; }
.admin-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.admin-form label.check { flex-direction: row; align-items: center; gap: .4rem; }
.admin-form--wide { flex-direction: column; align-items: stretch; max-width: 42rem; }
.admin-form--wide .setting { display: flex; flex-direction: column; gap: .25rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.admin-form--wide .setting input:not([type=checkbox]), .admin-form--wide textarea, .admin-form--wide select { width: 100%; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: .4rem .7rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.admin-tabs a.is-current { color: var(--ink); border-bottom-color: var(--primary); font-weight: 600; }
.admin-actions { white-space: nowrap; } .admin-actions form { margin-right: .4rem; }
