/* ---- Chino theme: tokens override Bootstrap's, light and dark ---- */
:root {
  --bs-body-font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --g-accent: #1F5FD1;  /* fills: buttons, active chips, selected rows (same in light and dark) */
  --g-ink: #FFFFFF;     /* text on top of --g-accent */
  /* control heights, the only ones: md buttons, chips and value buttons, sm buttons, dense table rows */
  --g-h-md: 2.25rem; --g-h-chip: 2rem; --g-h-sm: 1.75rem; --g-h-row: 1.5rem;
}
[data-bs-theme=light] {
  --bs-tertiary-bg: #F3F6FC;      /* page */
  --bs-body-bg: #FFFFFF;          /* cards, navbar */
  --bs-secondary-bg: #EAF0FA;
  --bs-body-color: #0F1B33;
  --bs-secondary-color: #566683;
  --bs-border-color: #D9E1F0;
  --g-line2: #B5C3DE;
  --g-acct: #1F5FD1;
  --g-ring: #1F5FD1;
  --g-late: #C2253F;
  --g-soon: #B7791F;  /* tomorrow */
  --g-week: #1E8449;  /* rest of this week */
  --g-dash: #B5C3DE;
  --g-shadow: rgba(20, 40, 80, .18);
  --c-p3-bg: #FFE1E7; --c-p3-fg: #A3162F; --c-p3-dot: #E0334F;
  --c-p2-bg: #FFEBC7; --c-p2-fg: #7A4B00; --c-p2-dot: #E39200;
  --c-p1-bg: #D5F1F7; --c-p1-fg: #0B5A6B; --c-p1-dot: #1CA3BC;
}
[data-bs-theme=dark] {
  --bs-tertiary-bg: #0A1120;
  --bs-body-bg: #111A2E;
  --bs-secondary-bg: #182540;
  --bs-body-color: #E9EFFC;
  --bs-secondary-color: #94A3C2;
  --bs-border-color: #22314F;
  --g-line2: #3B4F78;
  --g-acct: #5B9BFF;
  --g-ring: #5B9BFF;
  --g-late: #FF8FA3;
  --g-soon: #F2C94C;
  --g-week: #5FD38D;
  --g-dash: #3A4C72;
  --g-shadow: rgba(0, 0, 0, .5);
  --c-p3-bg: #3A1B27; --c-p3-fg: #FF9DB0; --c-p3-dot: #FF5C7A;
  --c-p2-bg: #3A2C12; --c-p2-fg: #FFC86F; --c-p2-dot: #FFB020;
  --c-p1-bg: #12313B; --c-p1-fg: #74D9EA; --c-p1-dot: #2DC4DD;
}
/* ---- palettes: set on <html data-pal=...> (settings > Appearance). No data-pal (or "classic")
   keeps the blue above. Each one gives the same roles: page, card, raised, ink, grey, line, accent.
   The priority and "late" colours stay red / amber / cyan in all of them. ---- */
[data-pal][data-bs-theme] {
  --g-line2: color-mix(in srgb, var(--bs-border-color) 55%, var(--bs-secondary-color));
  --g-acct: var(--g-accent); --g-ring: var(--g-accent);
}
/* Chino: the colours of chino.io (navy #252E53, dodger blue #4D8EE2, greys of the site) */
[data-pal=chino][data-bs-theme=dark] { --g-chrome: #0B0E18; --bs-tertiary-bg: #141827; --bs-body-bg: #1E243D; --bs-secondary-bg: #252E53; --bs-border-color: #323C66; --bs-body-color: #F3F6FA; --bs-secondary-color: #A9B0C9; --g-accent: #4D8EE2; --g-ink: #08122A; }
[data-pal=chino][data-bs-theme=light] { --g-chrome: #DCE2EF; --bs-tertiary-bg: #F3F6FA; --bs-body-bg: #FFFFFF; --bs-secondary-bg: #E6EBF4; --bs-border-color: #D5D9E6; --bs-body-color: #141827; --bs-secondary-color: #6A7084; --g-accent: #252E53; --g-ink: #FFFFFF; }
[data-pal=salvia][data-bs-theme=dark] { --g-chrome: #050A07; --bs-tertiary-bg: #131E18; --bs-body-bg: #1B2A22; --bs-secondary-bg: #26382E; --bs-border-color: #30463A; --bs-body-color: #F0F7F3; --bs-secondary-color: #B3C5BB; --g-accent: #6FCF9B; --g-ink: #06130C; }
[data-pal=salvia][data-bs-theme=light] { --g-chrome: #CBDBD2; --bs-tertiary-bg: #EAF1EC; --bs-body-bg: #FFFFFF; --bs-secondary-bg: #E1EBE5; --bs-border-color: #C3D3C9; --bs-body-color: #0F1B15; --bs-secondary-color: #4A5F54; --g-accent: #1E7A52; --g-ink: #FFFFFF; }
[data-pal=inchiostro][data-bs-theme=dark] { --g-chrome: #04070E; --bs-tertiary-bg: #121B30; --bs-body-bg: #1A2742; --bs-secondary-bg: #25345A; --bs-border-color: #30406A; --bs-body-color: #F1F5FD; --bs-secondary-color: #AAB8D4; --g-accent: #6AA5FF; --g-ink: #061226; }
[data-pal=inchiostro][data-bs-theme=light] { --g-chrome: #C8D5EA; --bs-tertiary-bg: #E8EEF8; --bs-body-bg: #FFFFFF; --bs-secondary-bg: #DFE7F4; --bs-border-color: #C2CFE4; --bs-body-color: #0E1726; --bs-secondary-color: #4B5A75; --g-accent: #1F5FD1; --g-ink: #FFFFFF; }
[data-pal=lampone][data-bs-theme=dark] { --g-chrome: #090608; --bs-tertiary-bg: #1A1319; --bs-body-bg: #241B23; --bs-secondary-bg: #31262F; --bs-border-color: #3F323D; --bs-body-color: #F8F2F5; --bs-secondary-color: #BEADB7; --g-accent: #F0558A; --g-ink: #1F0610; }
[data-pal=lampone][data-bs-theme=light] { --g-chrome: #DFCBD4; --bs-tertiary-bg: #F4ECEF; --bs-body-bg: #FFFFFF; --bs-secondary-bg: #EBDFE4; --bs-border-color: #D9C8D0; --bs-body-color: #1C1217; --bs-secondary-color: #66535D; --g-accent: #C7285F; --g-ink: #FFFFFF; }
[data-pal=carbone][data-bs-theme=dark] { --g-chrome: #050505; --bs-tertiary-bg: #151515; --bs-body-bg: #1E1E1E; --bs-secondary-bg: #2A2A2A; --bs-border-color: #343434; --bs-body-color: #F4F4F4; --bs-secondary-color: #B0B0B0; --g-accent: #F4F4F4; --g-ink: #0E0E0E; }
[data-pal=carbone][data-bs-theme=light] { --g-chrome: #D0D0CB; --bs-tertiary-bg: #EDEDEA; --bs-body-bg: #FFFFFF; --bs-secondary-bg: #E3E3DF; --bs-border-color: #CFCFCA; --bs-body-color: #121212; --bs-secondary-color: #55554F; --g-accent: #161616; --g-ink: #FFFFFF; }
body { background: var(--bs-tertiary-bg); letter-spacing: -.005em; }
.navbar { background: var(--bs-body-bg); }
.navbar-brand { font-weight: 800; letter-spacing: -.02em; }
.btn-primary { --bs-btn-bg: var(--g-accent); --bs-btn-border-color: var(--g-accent); --bs-btn-color: var(--g-ink);
  --bs-btn-hover-bg: var(--g-accent); --bs-btn-hover-border-color: var(--g-accent); --bs-btn-hover-color: var(--g-ink); }
:focus-visible { outline: 2px solid var(--g-ring); outline-offset: 2px; }

/* ---- buttons: one system. Heights come from --g-h-* (md 36, chip/value 32, sm 28, dense row 24).
   Primary: one per screen. Add: secondary with a "+". Close: .g-icon-btn with an x, top right.
   Delete: danger. Chips and segments (.chip, .seg) only filter or switch views, never act. ---- */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--g-h-md); padding: 0 1rem;
  border: 1px solid var(--g-line2); border-radius: .6rem; background: var(--bs-body-bg); color: var(--bs-body-color);
  font-size: .875rem; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .12s, border-color .12s; }
.g-btn:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.g-btn:disabled, .g-btn.disabled { opacity: .55; cursor: default; pointer-events: none; }
.g-btn--sm { min-height: var(--g-h-sm); padding: 0 .75rem; font-size: .8125rem; border-radius: .5rem; gap: .4rem; }
.g-btn--primary { background: var(--g-accent); border-color: var(--g-accent); color: var(--g-ink); }
.g-btn--primary:hover { background: var(--g-accent); color: var(--g-ink); filter: brightness(1.1); }
.g-btn--secondary { }
.g-btn--ghost { background: transparent; border-color: transparent; color: var(--bs-secondary-color); }
.g-btn--ghost:hover { color: var(--bs-body-color); }
.g-btn--danger { background: transparent; border-color: var(--g-late); color: var(--g-late); }
.g-btn--danger:hover { background: color-mix(in srgb, var(--g-late) 12%, transparent); color: var(--g-late); }
.g-btn--danger.g-btn--sm { border-color: transparent; }
.g-btn--done { background: color-mix(in srgb, var(--g-week) 16%, var(--bs-body-bg)); border-color: var(--g-week); color: var(--g-week); }
.g-btn--done:hover { background: color-mix(in srgb, var(--g-week) 24%, var(--bs-body-bg)); color: var(--g-week); }
.g-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--g-h-md); height: var(--g-h-md); flex: none; padding: 0;
  border: 0; border-radius: .6rem; background: transparent; color: var(--bs-secondary-color); cursor: pointer; transition: background .12s, color .12s; }
.g-icon-btn:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.g-icon-btn--sm { width: var(--g-h-sm); height: var(--g-h-sm); border-radius: .5rem; }
.g-icon-btn.text-danger:hover, .g-icon-btn--danger:hover { color: var(--g-late); }
.alert .g-btn--ghost { color: inherit; text-decoration: underline; font-weight: 800; }
/* the tick circle of a task: a bare icon button (the JS and the animations hook on .check) */
.check { padding: 0; border: 0; background: none; color: var(--bs-secondary-color); cursor: pointer; }
.check:hover { color: var(--g-acct); }

/* ---- filter bar: buttons, not dropdowns ---- */
.filter-bar { margin: .5rem 1rem 0; padding: .75rem 1rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: .6rem; display: flex; flex-direction: column; gap: .6rem; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.filter-label { width: 5.5rem; flex: none; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-secondary-color); }
.filter-row .filter-label + .seg, .vsep + .filter-label { width: auto; }
.vsep { width: 1px; height: 1.5rem; background: var(--bs-border-color); margin: 0 .75rem; }
.chip { display: inline-flex; align-items: center; gap: .55rem; min-height: var(--g-h-chip); padding: 0 1rem; border: 1px solid var(--bs-border-color);
  border-radius: 999px; color: var(--bs-body-color); text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .12s; }
.chip:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.chip .n { font-size: .75rem; font-weight: 700; color: var(--bs-secondary-color); }
.chip.on { background: var(--g-accent); border-color: transparent; color: var(--g-ink); }
.chip.on .n { color: var(--g-ink); opacity: .75; }
.clear-link { color: var(--g-acct); font-weight: 700; font-size: .9rem; text-decoration: none; padding: 0 .5rem; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .8rem; }
.seg-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: var(--g-h-sm); padding: 0 1rem; border-radius: .6rem; text-decoration: none;
  color: var(--bs-secondary-color); font-weight: 600; font-size: .9rem; }
.seg-btn:hover { color: var(--bs-body-color); }
.seg-btn.on { background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 0 0 1px var(--bs-border-color); }
.seg-btn.on .bi { color: var(--g-acct); }
.btn-check:checked + .seg-btn { background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 0 0 1px var(--bs-border-color); }
.btn-check:focus-visible + .seg-btn { outline: 2px solid var(--g-ring); outline-offset: 2px; }
.search { display: flex; align-items: center; gap: .5rem; min-height: var(--g-h-chip); padding: 0 .9rem; min-width: 14rem; border: 1px solid var(--bs-border-color);
  border-radius: .8rem; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.search:focus-within { border-color: var(--g-ring); }
.search input[type=search] { background: none; border: 0; outline: 0; flex: 1; min-width: 0; color: var(--bs-body-color); }

/* ---- board (columns) ---- */
.board { display: flex; gap: 1rem; padding: 1.5rem 1rem; overflow-x: auto; align-items: flex-start; min-height: calc(100vh - 60px); }
.section-col { flex: 0 0 310px; max-width: 310px; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 1rem; padding: .85rem; }
.section-col.add-section { background: transparent; border-style: dashed; }
.section-col h2 { font-weight: 800; letter-spacing: -.01em; }
.count-pill { font-size: .75rem; font-weight: 700; color: var(--bs-secondary-color); background: var(--bs-secondary-bg); border-radius: 999px; padding: .1rem .55rem; margin-left: .25rem; }
.section-drag, .drag { cursor: grab; }
.task-list { min-height: 2rem; }
.task-card.movable { cursor: grab; }  /* the whole card drags */
.task-card.movable :is(button, a, label, select) { cursor: pointer; }
.task-card.sortable-chosen { cursor: grabbing; }
.task-card { background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); border-left-width: 4px; border-radius: .7rem; padding: .65rem .75rem; margin-bottom: .5rem; }
.task-card:hover { border-color: var(--g-line2); }
.task-card.p0 { border-left-color: var(--bs-border-color); }
.task-card.p1 { border-left-color: var(--c-p1-dot); }
.task-card.p2 { border-left-color: var(--c-p2-dot); }
.task-card.p3 { border-left-color: var(--c-p3-dot); }
.task-card.editing { background: var(--bs-body-bg); }
.task-card.done .title, li.done .title { text-decoration: line-through; color: var(--bs-secondary-color); }
.task-card .check { color: var(--bs-secondary-color); line-height: 1; display: flex; align-items: center; justify-content: center; }  /* button (own task) and span (not yours) look the same */
.task-card span.check { border: var(--bs-border-width) solid transparent; }  /* the button has one */
.task-card .check:hover { color: var(--g-acct); }
.task-card.done .check { color: var(--g-acct); }

/* feedback when ticking a task: the circle pops and fills, the row flashes green and fades */
.completing:not(.done) .check, .completing:not(.done) .check:hover { color: var(--g-week); }
.completing .check i { display: inline-block; animation: g-pop .4s ease; }
.completing:not(.done) > .title, .completing:not(.done) .title { text-decoration: line-through; color: var(--bs-secondary-color); }
.task-card.completing:not(.done) { animation: g-complete .6s ease forwards; }
/* a card somebody else changed, after the board was read again */
@keyframes g-flash { 0% { background-color: color-mix(in srgb, var(--g-accent) 38%, transparent); } 100% { background-color: transparent; } }
.task-card.flash { animation: g-flash 2.2s ease-out; }
@keyframes g-pop { 0% { transform: scale(1); } 40% { transform: scale(1.55); } 100% { transform: scale(1); } }
@keyframes g-complete {
  0% { background-color: transparent; opacity: 1; }
  30% { background-color: color-mix(in srgb, var(--g-week) 22%, transparent); opacity: 1; }
  100% { background-color: color-mix(in srgb, var(--g-week) 10%, transparent); opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
  .completing .check i, .task-card.completing:not(.done) { animation: none; }
}
.task-card .actions { opacity: 0; transition: opacity .1s; white-space: nowrap; }
.task-card:hover .actions, .task-card:focus-within .actions, li:hover > .actions { opacity: 1; }
@media (hover: none) { .task-card .actions { opacity: 1; } }
.subtasks { margin: .4rem 0 0 1.4rem; font-size: .9rem; }
.ghost { opacity: .4; }
.min-w-0 { min-width: 0; overflow-wrap: anywhere; }
#toast { position: fixed; bottom: 1rem; right: calc(1rem + var(--panel-push, 0px)); z-index: 1080; }

/* ---- in-place edit: title, priority pill, due button ---- */
.title-btn { background: none; border: 0; padding: .1rem .35rem; margin-left: -.35rem; text-align: left; font-weight: 600; color: inherit; border-radius: .4rem; }
.title-btn:hover { background: var(--bs-tertiary-bg); }
.title-form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: .45rem; min-height: var(--g-h-chip); padding: 0 .75rem; border: 1px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .78rem; white-space: nowrap; }
.pill:hover { filter: brightness(1.12); }
.prio-pill.p3 { background: var(--c-p3-bg); color: var(--c-p3-fg); }
.prio-pill.p2 { background: var(--c-p2-bg); color: var(--c-p2-fg); }
.prio-pill.p1 { background: var(--c-p1-bg); color: var(--c-p1-fg); }
.prio-pill.p0, .dbtn.due-none { background: transparent; border: 1px dashed var(--g-dash); color: var(--bs-secondary-color); opacity: .45; }  /* quiet but there: click to set */
.task-card:hover .prio-pill.p0, .task-card:hover .dbtn.due-none, .prio-pill.p0:focus-visible, .dbtn.due-none:focus-visible,
.dropdown.show .prio-pill.p0, .dropdown.show .dbtn.due-none { opacity: 1; }
@media (hover: none) { .prio-pill.p0, .dbtn.due-none { opacity: 1; } }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; flex: none; background: var(--bs-secondary-color); }
.dot.p3 { background: var(--c-p3-dot); } .dot.p2 { background: var(--c-p2-dot); } .dot.p1 { background: var(--c-p1-dot); }
.dot.p0 { background: transparent; border: 1.5px dashed var(--g-dash); }
.dbtn { display: inline-flex; align-items: center; gap: .4rem; min-height: var(--g-h-chip); padding: 0 .6rem; background: none; border: 1px solid transparent; border-radius: .5rem;
  font-weight: 600; font-size: .8rem; color: var(--bs-body-color); white-space: nowrap; }
.dbtn:hover { background: var(--bs-tertiary-bg); }
.dbtn.due-late { color: var(--g-late); }
.dbtn.due-today { color: var(--g-acct); }
.dbtn.due-tomorrow { color: var(--g-soon); }
.dbtn.due-week { color: var(--g-week); }
.dbtn.due-later { color: var(--bs-secondary-color); }
.dropdown-menu { --bs-dropdown-zindex: 1050;  /* above the task side panel (offcanvas, 1045), or menus open behind it */
  --bs-dropdown-border-radius: .8rem; --bs-dropdown-padding-x: .35rem; --bs-dropdown-padding-y: .35rem; box-shadow: 0 18px 40px var(--g-shadow); min-width: 12rem; }
.dropdown-item { border-radius: .5rem; min-height: 2.25rem; font-weight: 600; font-size: .9rem; }
.dropdown-item.active { background: var(--bs-secondary-bg); color: var(--bs-body-color); }

/* ---- toolbar: filters stay hidden until the bar is clicked ---- */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; padding: .35rem 1rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); }
.toolbar--sticky { position: sticky; top: 0; z-index: 35; }  /* My tasks only: the project page has its own sticky header */
.toolbar-toggle { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; padding: .2rem .4rem; border-radius: .4rem;
  font-size: .8rem; font-weight: 600; color: var(--bs-secondary-color); }
.toolbar-toggle:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.toolbar-chev { font-size: .65rem; transition: transform .15s; }
.toolbar-toggle[aria-expanded=true] .toolbar-chev { transform: rotate(180deg); }
.count-pill.on { background: var(--g-accent); color: var(--g-ink); margin-left: 0; }
.toolbar .clear-link { font-size: .8rem; }
.filter-bar .chip { min-height: var(--g-h-sm); padding: 0 .75rem; font-size: .8rem; }
.filter-bar .seg-btn { padding: 0 .75rem; font-size: .8rem; }
.filter-bar .search { min-height: var(--g-h-sm); font-size: .8rem; }

/* ---- list view: dense table, one thin row per task (Asana style) ---- */
.navbar { min-height: 44px; padding-top: .25rem; padding-bottom: .25rem; }  /* compact top bar */
.list-view, .list-head { --cols: 1rem 1.35rem minmax(0, 50%) minmax(9.5rem, 1fr) minmax(6.5rem, 1fr) minmax(8rem, 2fr) minmax(7rem, 1.5fr) 1.75rem; }
.list-head .sort-link { color: inherit; text-decoration: none; border-radius: .3rem; padding: .1rem .25rem; margin: 0 -.25rem; }
.list-head .sort-link:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.list-head .sort-link.on { color: var(--bs-body-color); }
.list-head { display: grid; grid-template-columns: var(--cols); column-gap: .5rem; padding: .25rem 1rem; margin-top: .5rem; font-size: .72rem;
  font-weight: 600; color: var(--bs-secondary-color); border-top: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.board.list-view { flex-direction: column; align-items: stretch; overflow-x: visible; gap: 0; padding: 0 0 2rem; min-height: 0; }
.list-view .section-col { flex: none; max-width: none; background: transparent; border: 0; border-radius: 0; padding: 0; }
.list-view .section-col > header { margin: 0 !important; padding: .7rem 1rem .25rem; }
.list-view .section-col h2 { font-size: .95rem !important; font-weight: 700; }
.list-view .count-pill { font-size: .68rem; padding: 0 .4rem; background: transparent; }
.list-view .task-list { border: 0; border-top: 1px solid var(--bs-border-color); border-radius: 0; background: var(--bs-body-bg); min-height: 0; }
.list-view .task-list:empty { display: none; }
.list-view .task-card.task-row { background: transparent; border: 0; border-bottom: 1px solid var(--bs-border-color); border-radius: 0; margin: 0; padding: 0 1rem; }
.list-view .task-card.task-row:hover { background: var(--bs-secondary-bg); }
.task-line { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: .5rem; min-height: var(--g-h-sm); font-size: .85rem; }
.task-line .drag { font-size: .8rem; opacity: 0; }
.task-row:hover .drag, .task-row:focus-within .drag { opacity: 1; }
.task-line .check { font-size: .95rem; }
.task-line .title-btn { font-weight: 500; padding: 0 .3rem; line-height: 1.5; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-line .badge { font-size: .65rem; padding: .1rem .35rem; }
.task-line .pill { min-height: var(--g-h-row); padding: 0 .5rem; font-size: .7rem; gap: .3rem; }
.task-line .dbtn { min-height: var(--g-h-row); padding: 0 .3rem; font-size: .8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-line .dbtn .bi { display: none; }
.task-line .dbtn.due-none::before { content: ""; }
.task-line .dbtn.due-none, .task-line .prio-pill.p0 { border-style: solid; border-color: transparent; }
.list-view .subtasks { margin: 0 0 .25rem 3.1rem; font-size: .8rem; }
.list-view .add-task-form { margin: 0 !important; padding: 0 1rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg); }
.list-view .add-task-form input { border: 0; background: transparent; box-shadow: none; font-size: .85rem; padding: .2rem 0 .2rem 2.1rem; height: 1.75rem; }
.list-view .add-task-form input::placeholder { color: var(--bs-secondary-color); }
.list-view .add-section { padding: .75rem 1rem; }
.group-chev i { transition: transform .15s; display: inline-block; }
.group-chev.collapsed i { transform: rotate(-90deg); }
@media (max-width: 720px) {
  .filter-label { width: 100%; }
  .list-view, .list-head { --cols: 1rem 1.35rem minmax(5rem, 1fr) fit-content(7.5rem) 1.5rem; }
  .list-head span:nth-child(5), .list-head span:nth-child(6), .list-head span:nth-child(7) { display: none; }
  .task-line .col-prio, .task-line .col-tags, .task-line .col-proj, .task-line .col-sync { display: none; }
}

/* ---- task side panel (offcanvas) ---- */
#task-panel { --bs-offcanvas-width: min(var(--panel-width, 520px), 100vw); --bs-offcanvas-bg: var(--bs-body-bg); box-shadow: -18px 0 40px var(--g-shadow); }
/* wide screens: the open panel is part of the page, the table shrinks to stay visible */
body { transition: padding-right .3s ease-in-out; }
@media (min-width: 1400px) {  /* narrower screens: the panel floats over the list */
  body.panel-open { --panel-push: var(--panel-width, 520px); padding-right: var(--panel-push); }
  #task-panel { box-shadow: none; border-left: 1px solid var(--bs-border-color); }
  /* the table is narrower now: keep only what identifies the task (title, due date, assignee), drop the rest */
  body.panel-open:not(.panel-expanded) .list-view, body.panel-open:not(.panel-expanded) .list-head { --cols: 1rem 1.35rem minmax(6rem, 1fr) fit-content(7.5rem) 1.75rem; }
  body.panel-open:not(.panel-expanded) .list-view.with-owner, body.panel-open:not(.panel-expanded) .list-head.with-owner { --cols: 1rem 1.35rem minmax(6rem, 1fr) fit-content(7.5rem) 1.6rem 1.75rem; }
  body.panel-open:not(.panel-expanded) .task-line .col-prio, body.panel-open:not(.panel-expanded) .task-line .col-tags, body.panel-open:not(.panel-expanded) .task-line .col-proj, body.panel-open:not(.panel-expanded) .task-line .col-sync { display: none; }
  body.panel-open:not(.panel-expanded) .list-head span:nth-child(5), body.panel-open:not(.panel-expanded) .list-head span:nth-child(6) { display: none; }
  body.panel-open:not(.panel-expanded) .list-head:not(.with-owner) span:nth-child(7) { display: none; }
  body.panel-open:not(.panel-expanded) .col-owner .text-truncate { display: none; }
}
/* expanded: a centred modal (80% of the window) over a dimmed page, content fills it */
#task-panel { transition: transform .3s ease-in-out; }
#task-panel.expanded.show { top: 5vh; bottom: 5vh; left: 10vw; right: 10vw; width: auto; height: auto; max-width: none; transform: none;
  border: 1px solid var(--bs-border-color); border-radius: 1rem; box-shadow: 0 24px 80px rgba(0,0,0,.45); overflow: hidden; }
#task-panel.expanded .offcanvas-body { height: 100%; overflow-y: auto; }
#panel-backdrop { position: fixed; inset: 0; z-index: 1044; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
body.panel-expanded #panel-backdrop { opacity: 1; pointer-events: auto; }
body.panel-open.panel-expanded { padding-right: 0; --panel-push: 0px; }
@media (prefers-reduced-motion: reduce) { body, #task-panel { transition: none; } }
/* the left edge of the panel is a handle: drag it to make the panel wider, the width is remembered */
#panel-resize { position: absolute; top: 0; bottom: 0; left: -4px; width: 9px; z-index: 5; cursor: col-resize; touch-action: none; }
#panel-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: var(--g-acct); opacity: 0; transition: opacity .15s; }
#panel-resize:hover::after, #panel-resize:focus-visible::after, body.panel-resizing #panel-resize::after { opacity: .7; }
#panel-resize:focus-visible { outline: none; }
#task-panel.expanded #panel-resize { display: none; }
body.panel-resizing { cursor: col-resize; user-select: none; }
body.panel-resizing, body.panel-resizing #task-panel { transition: none; }
body.panel-resizing #task-panel iframe { pointer-events: none; }  /* the editor must not swallow the drag */
@media (max-width: 575.98px) { #panel-resize { display: none; } }
#task-panel .offcanvas-body { padding: 0 1.5rem 2rem; transition: opacity .12s ease; }
#task-panel .offcanvas-body.is-loading { opacity: .35; pointer-events: none; }
.panel-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem; margin: 0 -1.5rem 1rem; padding: .85rem 1.5rem;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--bs-border-color); }
#panel-status { transition: opacity .3s; }
.task-card.selected, .task-card.multi { border-color: var(--g-ring); box-shadow: 0 0 0 1px var(--g-ring) inset; background: color-mix(in srgb, var(--g-ring) 14%, var(--bs-secondary-bg)); }
.list-view .task-card.task-row.selected, .list-view .task-card.task-row.multi { background: color-mix(in srgb, var(--g-ring) 14%, var(--bs-secondary-bg)); }
.panel-title { width: 100%; border: 1px solid transparent; border-radius: .6rem; background: transparent; color: var(--bs-body-color);
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; padding: .25rem .5rem; margin: 0 0 1.25rem -.5rem;
  display: block; resize: none; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; }
.panel-title:hover { border-color: var(--bs-border-color); }
.panel-title:focus { outline: 0; border-color: var(--g-ring); background: var(--bs-tertiary-bg); }
/* properties: a quiet table, label on the left, the value is a ghost button that looks like the ones of the board */
.panel-props { display: flex; flex-direction: column; gap: .15rem; margin-bottom: 1.5rem; }
.panel-field { display: flex; align-items: center; flex-wrap: wrap; column-gap: .75rem; row-gap: .15rem; min-height: 2.4rem; }
.panel-label { width: 7.5rem; flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.panel-field > div:not(.pick) { flex: 1 1 0; min-width: 0; }
.panel-hint { flex-basis: 100%; margin-left: 8.25rem; font-size: .75rem; color: var(--bs-secondary-color); }
.panel-popover .panel-hint { margin-left: 0; margin-top: .4rem; }
.panel-hint-row { margin: -.5rem 0 .75rem; }
/* the properties of a task, as chips: each says its value, the popover edits it */
.panel-desc { margin-top: 0; padding-top: 0; border-top: 0; }
.panel-desc .panel-section-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }  /* the textarea has its placeholder */
.panel-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1rem; }
.g-value, .panel-chips .pick-btn { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; min-height: var(--g-h-chip); padding: 0 .7rem;
  border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); color: var(--bs-body-color);
  font-size: .85rem; font-weight: 700; cursor: pointer; transition: background .12s, border-color .12s; }
.g-value:hover:not(:disabled), .panel-chips .pick-btn:hover:not(:disabled) { background: var(--bs-secondary-bg); }
.g-value[aria-expanded=true], .panel-chips .pick-btn[aria-expanded=true] { border-color: var(--g-ring); background: var(--bs-secondary-bg); }
.g-value:disabled, .panel-chips .pick-btn:disabled, .g-value.pick-static { cursor: default; opacity: 1; }
.g-value .bi { color: var(--bs-secondary-color); }
.chip-key { font-weight: 600; color: var(--bs-secondary-color); }
.chip-text { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.panel-chips .pick-btn .pick-chev { opacity: .6; }
.panel-popover { width: min(21rem, calc(100vw - 2rem)); padding: .85rem; }
.panel-popover .panel-label { display: block; width: auto; margin-bottom: .35rem; }
/* the calendar is white on the white popover: give it an edge and keep it above the other chips */
.flatpickr-calendar { border: 1px solid var(--bs-border-color); box-shadow: 0 12px 28px var(--g-shadow); z-index: 1100; }
.flatpickr-calendar.static { margin-top: .35rem; }
/* the bulk bar sits at the bottom of the screen: open the calendar upwards, not below the viewport */
.bulk-bar .flatpickr-calendar.static { top: auto; bottom: 100%; margin: 0 0 .35rem; }
.bulk-bar .flatpickr-calendar.static.arrowTop::before, .bulk-bar .flatpickr-calendar.static.arrowTop::after { display: none; }
.panel-pop-row { display: flex; flex-direction: column; margin-bottom: .6rem; }
.panel-more { margin-bottom: .5rem; }
.panel-more .more-chev { transition: transform .15s; font-size: .7rem; }
.panel-more [aria-expanded=true] .more-chev { transform: rotate(90deg); }
.panel-more .panel-props { margin: .5rem 0 0; }
.panel-keys { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; padding-top: .75rem; border-top: 1px solid var(--bs-border-color); font-size: .75rem; color: var(--bs-secondary-color); }
.panel-keys kbd, .comment-hint kbd { padding: 0 .35rem; margin-right: .15rem; border: 1px solid var(--g-line2); border-radius: .3rem; background: var(--bs-body-bg); color: var(--bs-body-color); font: inherit; font-weight: 700; }
.pick { min-width: 0; }
.pick-btn, .panel-date { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; min-height: var(--g-h-chip); padding: 0 .6rem; border: 1px solid transparent;
  border-radius: .5rem; background: none; color: var(--bs-body-color); font-size: .88rem; font-weight: 600; transition: background .12s, border-color .12s; }
.pick-btn:hover:not(:disabled), .panel-date:hover:not(:disabled) { background: var(--bs-secondary-bg); }
.pick-btn[aria-expanded=true], .panel-date:focus { background: var(--bs-secondary-bg); border-color: var(--g-ring); outline: 0; }
.pick-btn:disabled, .panel-date:disabled, .pick-static { opacity: 1; color: var(--bs-body-color); padding-left: .6rem; }
.pick-btn:disabled { cursor: default; }
.pick-chev { font-size: .65rem; color: var(--bs-secondary-color); opacity: 0; transition: opacity .12s, transform .15s; }
.pick-btn:hover .pick-chev, .pick-btn[aria-expanded=true] .pick-chev { opacity: 1; }
.pick-btn[aria-expanded=true] .pick-chev { transform: rotate(180deg); }
.pick-label, .pick-opt { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.pick .dropdown-item { display: flex; align-items: center; gap: .5rem; }
.pick .pick-check { visibility: hidden; color: var(--g-acct); }
.pick .dropdown-item.active .pick-check { visibility: visible; }
.pick .dropdown-menu { max-height: 18rem; overflow-y: auto; }
.panel-date { font-family: inherit; color-scheme: light dark; }
.panel-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--bs-border-color); }
.panel-section-title { display: block; margin-bottom: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.panel-notes-view { min-height: 4rem; padding: .6rem .75rem; border: 1px solid transparent; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); line-height: 1.5; overflow-wrap: anywhere; cursor: text; transition: border-color .12s; }
.panel-notes-view:hover { border-color: var(--bs-border-color); }
.panel-notes-view.is-disabled { cursor: default; }
.panel-notes-view:empty::before { content: attr(data-placeholder); color: var(--bs-secondary-color); }
.panel-notes-view > :last-child { margin-bottom: 0; }
.panel-notes-view p { margin: 0 0 .6rem; }
.panel-notes-view h2 { font-size: 1.15rem; margin: .8rem 0 .3rem; }
.panel-notes-view h3 { font-size: 1rem; margin: .7rem 0 .3rem; }
.panel-notes-view img { max-width: 100%; height: auto; }
.panel-notes-view a { cursor: pointer; }
.panel-notes-view blockquote { border-left: 3px solid #8884; margin-left: 0; padding-left: .8rem; }
.panel-notes-view pre { background: #8882; padding: .5rem; border-radius: .4rem; }
.panel-notes { resize: vertical; min-height: 8rem; border-color: transparent; background: var(--bs-tertiary-bg); transition: border-color .12s, background .12s; }
.panel-notes:hover { border-color: var(--bs-border-color); }
.panel-notes:focus { border-color: var(--g-ring); box-shadow: none; background: var(--bs-body-bg); }
.panel-add, #task-comments textarea { border-color: transparent; background: var(--bs-tertiary-bg); }
.panel-add:focus, #task-comments textarea:focus { border-color: var(--g-ring); box-shadow: none; background: var(--bs-body-bg); }
.chip-sm { min-height: var(--g-h-sm); padding: 0 .65rem; font-size: .8rem; background: transparent; }
.prio-radio .pill { cursor: pointer; opacity: .5; }
.prio-radio .pill:hover { opacity: .85; filter: none; }
.prio-radio .btn-check:checked + .pill { opacity: 1; box-shadow: 0 0 0 2px var(--g-ring); }
.prio-radio .btn-check:focus-visible + .pill { outline: 2px solid var(--g-ring); outline-offset: 2px; }
.prio-radio .prio-pill.p0 { opacity: .5; }
.prio-radio .btn-check:checked + .prio-pill.p0 { opacity: 1; }
.panel-subtasks li.done .title { text-decoration: line-through; color: var(--bs-secondary-color); }

/* ---- tags: colored labels, a column in the list, managed in Settings ---- */
/* outline only (the color is the border), so they stay quiet next to the title */
.tag { display: inline-block; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .4rem; border-radius: .3rem;
  border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-secondary-color);
  font-size: .68rem; font-weight: 500; line-height: 1.15rem; }
.tag-dot { width: .7rem; height: .7rem; border-radius: 50%; flex: none; }
.tagbtn { display: flex; align-items: center; gap: .25rem; width: 100%; min-height: var(--g-h-row); padding: 0; background: none; border: 0; overflow: hidden; text-align: left; }
.tagbtn .tag-add { color: var(--bs-secondary-color); opacity: 0; font-size: .8rem; padding: 0 .3rem; }
.task-row:hover .tag-add, .tagbtn:focus-visible .tag-add { opacity: 1; }
.col-tags { min-width: 0; }
.task-card .tag { flex: none; }
/* the picker: a search / create box over the list of tags (in the list and in the panel) */
.tag-menu { min-width: 13rem; max-height: 18rem; overflow-y: auto; }
.tag-search-row { padding: 0 .5rem .35rem; }
.tag-menu .tag-opt .dropdown-item, .tag-menu .tag-create .dropdown-item { font-size: .85rem; }
.tag-chip { display: inline-flex; align-items: center; gap: .15rem; max-width: 12rem; padding-right: .1rem; }
.tag-x { display: inline-flex; align-items: center; padding: 0 .1rem; background: none; border: 0; color: inherit; opacity: .6; line-height: 1; }
.tag-x:hover, .tag-x:focus-visible { opacity: 1; color: var(--bs-danger); }
.tag-add-btn { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .4rem; background: none; border: 1px dashed var(--bs-border-color); border-radius: .3rem;
  color: var(--bs-secondary-color); font-size: .68rem; line-height: 1.15rem; }
.tag-add-btn:hover, .tag-add-btn:focus-visible { border-color: var(--bs-secondary-color); color: var(--bs-body-color); }
.tag-admin li { margin-bottom: .4rem; }
.tag-admin .form-control-color { width: 2.25rem; padding: .15rem; flex: none; }

.task-card { cursor: pointer; }

.bulk-bar { position: fixed; left: calc((100% - var(--panel-push, 0px)) / 2); bottom: 1rem; transform: translateX(-50%); z-index: 1060; display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap; width: max-content; max-width: calc(100vw - 2rem); padding: .5rem .75rem; background: var(--bs-body-bg);
  border: 1px solid var(--g-ring); border-radius: .8rem; box-shadow: 0 10px 30px var(--g-shadow); }
.bulk-bar.d-none { display: none !important; }

/* project (Asana) / list (Google) the task lives in: quiet text */
.col-proj { min-width: 0; display: flex; gap: .5rem; overflow: hidden; }
.col-sync { display: flex; justify-content: center; }
.place { color: var(--bs-secondary-color); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.task-card:not(.task-row) .place { max-width: 9rem; }

/* ---- projects: sidebar shell, project header, owner chips, comments ---- */
.g-shell { display: flex; align-items: flex-start; }
.g-content { flex: 1; min-width: 0; }
.g-sidebar { flex: 0 0 15rem; width: 15rem; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto;
  padding: 1rem .75rem; background: transparent; min-height: calc(100vh - 64px); }
.g-sidebar .offcanvas-body { display: flex; gap: .15rem; }
@media (max-width: 767.98px) {
  .g-sidebar { position: fixed; padding: 0; min-height: 0; max-height: none; width: 17rem; border-right: 0; }
}
.side-link { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: .6rem; text-decoration: none; color: var(--bs-secondary-color);
  font-weight: 500; font-size: .92rem; }
.side-link:hover { background: var(--bs-body-bg); color: var(--bs-body-color); }
.side-link.active { background: var(--bs-secondary-bg); color: var(--bs-body-color); font-weight: 700; }
.side-top { justify-content: flex-end; margin-bottom: .25rem; }
.side-link { position: relative; }
/* collapsed (wide screens): a column of icons that opens over the page while the mouse is on it */
@media (min-width: 768px) {
  /* sticky makes it a layer of its own: it needs a z-index to open over the positioned cards of the board view */
  html.side-collapsed .g-sidebar { flex: 0 0 3.5rem; width: 3.5rem; padding: 0; overflow: visible; min-height: 0; height: calc(100vh - 64px); z-index: 40; }
  html.side-collapsed .g-sidebar .offcanvas-body { position: absolute; inset: 0 auto 0 0; width: 3.5rem; padding: 1rem .5rem; overflow: hidden;
    background-color: var(--g-chrome, var(--bs-body-bg)) !important; /* same tone as the open menu; Bootstrap makes an offcanvas-md body transparent */
    border-right: 1px solid var(--bs-border-color); z-index: 40; transition: width .15s ease; }
  html.side-collapsed .g-sidebar .offcanvas-body:hover, html.side-collapsed .g-sidebar .offcanvas-body:focus-within {
    width: 15rem; overflow-y: auto; padding: 1rem .75rem; box-shadow: .5rem 0 1.5rem rgb(0 0 0 / .12); }
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) { align-items: center; }
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-link { justify-content: center; padding: .45rem; width: 2.5rem; }
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-link > :not(i):not(.notif-badge):not(.project-emoji),
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-link > .shared-mark,
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-head > *,
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-top { display: none !important; }
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .side-head { width: 1.75rem; margin: .6rem 0; border-top: 1px solid var(--bs-border-color); }
  html.side-collapsed .g-sidebar .offcanvas-body:not(:hover):not(:focus-within) .notif-badge.on { position: absolute; top: .2rem; right: .2rem; min-width: .55rem; height: .55rem; padding: 0; font-size: 0; line-height: 0; }
}
.panel-pop-sep { margin: .6rem 0; opacity: .15; }
.project-emoji { font-size: 1.05em; line-height: 1; }
.emoji-input { width: 4.5rem; text-align: center; font-size: 1.1rem; }
.emoji-grid { margin-top: .25rem; }
.emoji-grid .icon-opt { background: none; padding: 0; }
.project-icon { font-size: 1.1rem; opacity: .7; margin-right: .15rem; }
/* the icon picker of the project dialog */
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .25rem; }
.icon-opt { display: flex; align-items: center; justify-content: center; height: 2.1rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; cursor: pointer; font-size: 1.05rem; }
.icon-opt:hover { background: var(--bs-secondary-bg); }
.side-link .n { font-size: .75rem; font-weight: 700; color: var(--bs-secondary-color); }
.side-link.active .n { color: var(--bs-secondary-color); }
.side-head { display: flex; align-items: center; justify-content: space-between; margin: 1.25rem .6rem .25rem; font-size: .8125rem; font-weight: 500;
  color: var(--bs-secondary-color); }
.project-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.25rem 1rem .5rem;
  /* sticky: keeps the project context visible while scrolling; below the collapsed sidebar (40) and panels, above the cards and the Views dropdown stays usable */
  position: sticky; top: 0; z-index: 35; background: var(--bs-tertiary-bg); }
.avatars { display: inline-flex; }
.avatars .owner-chip { margin-left: -.35rem; border: 2px solid var(--bs-tertiary-bg); }
.avatars .owner-chip:first-child { margin-left: 0; }
.owner-chip { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; flex: none; border-radius: 50%;
  background: var(--bs-secondary-bg); color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); font-size: .7rem; font-weight: 800; }
.owner-chip.unassigned { border-style: dashed; background: transparent; font-size: .8rem; }
.owner-chip.me { background: var(--g-accent); color: var(--g-ink); border-color: transparent; }
.view-tab-drag { cursor: grab; padding-inline: .25rem; }
.view-tab-drag:active { cursor: grabbing; }
.view-tab-author { font-size: .7em; opacity: .6; margin-left: .15rem; }
.comment { padding: .6rem 0; border-bottom: 1px solid var(--bs-border-color); }
.comment-body { margin-top: .25rem; font-size: .9rem; overflow-wrap: anywhere; }
.comment-rich p, .comment-rich ul, .comment-rich ol, .comment-rich blockquote, .comment-rich pre { margin-bottom: .4rem; }
.comment-rich > :last-child { margin-bottom: 0; }
.comment-rich ul, .comment-rich ol { padding-left: 1.4rem; }
.comment-rich h2, .comment-rich h3 { font-size: 1rem; margin: .5rem 0 .25rem; }
.comment-rich blockquote { border-left: 3px solid var(--bs-border-color); padding-left: .8rem; color: var(--bs-secondary-color); }
.comment-rich img { max-width: 100%; height: auto; border-radius: .3rem; }
/* comment box (TinyMCE without toolbar): looks like the old textarea */
.tox.tox-tinymce.comment-editor { margin-bottom: .5rem; border: 1px solid transparent; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
.tox.tox-tinymce.comment-editor:focus-within { border-color: var(--g-ring); background: var(--bs-body-bg); }
.tox.tox-tinymce.comment-editor .tox-edit-area__iframe { background: transparent; }
.panel-fold > summary { display: flex; align-items: center; cursor: pointer; list-style: none; margin-bottom: 0; }
.panel-fold > summary::-webkit-details-marker { display: none; }
.panel-fold[open] > summary .fold-caret { transform: rotate(180deg); }
.fold-caret { transition: transform .15s; }
.activity-item { display: flex; gap: .5rem; padding: .3rem 0; }
.activity-icon { color: var(--bs-secondary-color); margin-top: .1rem; }
.activity-body { color: var(--bs-secondary-color); overflow-wrap: anywhere; }

/* ---- kanban cards: small, title on top, owner / due date / priority underneath ---- */
.board:not(.list-view) .section-col { flex-basis: 310px; max-width: 310px; padding: .65rem; }
/* the board fills the window under the top bar: every column scrolls inside, the horizontal scrollbar stays at the bottom of the window */
.g-content:has(> #board-area > .board:not(.list-view)) { display: flex; flex-direction: column; height: calc(100vh - 3.5rem); }
.g-content:has(> #board-area > .board:not(.list-view)) > #board-area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board:not(.list-view) { flex: 1; min-height: 0; align-items: stretch; padding-bottom: .75rem; }
.board:not(.list-view) .section-col { display: flex; flex-direction: column; min-height: 0; }
.board:not(.list-view) .section-col.add-section { align-self: flex-start; }
.board:not(.list-view) .section-col > header { flex: none; }
.board:not(.list-view) .section-col > .collapse.show { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.board:not(.list-view) .task-list { flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.board:not(.list-view) .add-task-form { flex: none; }
.board:not(.list-view) .task-card { padding: .5rem .6rem; margin-bottom: .4rem; border-radius: .6rem; font-size: .85rem; }
.board:not(.list-view) .task-card .title-btn { font-size: .88rem; line-height: 1.25; }
.board:not(.list-view) .task-card .drag { opacity: 0; transition: opacity .1s; }
.board:not(.list-view) .task-card:hover .drag { opacity: 1; }
.card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0 1.7rem; }
.card-foot .dbtn, .card-foot .pill { min-height: var(--g-h-row); font-size: .72rem; padding: 0 .5rem; }
.card-foot .dbtn.due-none, .card-foot .prio-pill.p0 { opacity: 1; }  /* always there: click to set */
.board:not(.list-view) .subtasks { margin: .3rem 0 0 1.7rem; font-size: .8rem; }

.list-view.with-owner, .list-head.with-owner { --cols: 1rem 1.35rem minmax(0, 46%) minmax(9.5rem, 1fr) minmax(6.5rem, 1fr) minmax(7rem, 1.5fr) minmax(8rem, 1.5fr) 1.75rem; }
.col-owner { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .8rem; }
.owner-chip.avatar { object-fit: cover; padding: 0; }

.synced-icon { color: var(--g-week); }

/* ---- top bar: user menu ---- */
.user-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .15rem .5rem .15rem .25rem; border: 1px solid transparent; border-radius: 2rem;
  background: transparent; color: var(--bs-body-color); font-size: .85rem; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--bs-secondary-bg); }
.user-avatar { position: relative; display: inline-flex; }
.user-avatar .owner-chip { width: 1.85rem; height: 1.85rem; font-size: .8rem; }
.sync-flag { position: absolute; right: -.35rem; bottom: -.25rem; display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem;
  border-radius: 50%; background: var(--bs-body-bg); color: var(--bs-danger); font-size: .75rem; }
.sync-flag.setup { color: var(--bs-secondary-color); }
.user-menu { min-width: 15rem; }
.user-menu form { margin: 0; }
.owner-menu { display: inline-flex; }
.owner-btn { display: inline-flex; padding: 0; border: 0; background: none; border-radius: 50%; line-height: 1; cursor: pointer; }
.owner-btn:hover .owner-chip { box-shadow: 0 0 0 2px var(--g-ring); }
.owner-menu .dropdown-menu .owner-chip { width: 1.3rem; height: 1.3rem; }
.shared-mark { font-size: .7rem; opacity: .6; }
.side-ghost { opacity: .4; }
#project-list { display: flex; flex-direction: column; gap: .15rem; }

/* brand wordmark */
.g-wordmark { font-family: 'Manrope', system-ui, sans-serif; font-weight: 800; letter-spacing: -.02em; color: #E86D53; line-height: 1; font-size: 1.6rem; }
.g-wordmark-lg { font-size: 3rem; }
.g-logo { box-sizing: content-box; background: #131A2A; border-radius: 50%; padding: .25rem; }
.g-logo-lg { padding: 1.5rem; }

/* ---- notifications: sidebar badge and the recap page ---- */
.notif-badge.on { min-width: 1.35rem; padding: 0 .4rem; border-radius: 1rem; text-align: center; font-size: .72rem; font-weight: 700; line-height: 1.35rem;
  background: var(--g-late); color: #fff; }
.side-link .n.due-badge, .side-link.active .n.due-badge { min-width: 1.35rem; padding: 0 .4rem; border-radius: 1rem; text-align: center; line-height: 1.35rem;
  background: var(--g-late); color: #fff; margin-left: .2rem; }
.side-link .n.due-badge:not(.due-badge--late) { background: color-mix(in srgb, var(--g-late) 60%, transparent); }
.notif-page { max-width: none; padding: 1rem 1rem 3rem; }
.notif-group { margin: 1rem 0 .15rem; padding: 0 .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.notif-list { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .7rem; overflow: hidden; }
.notif-card + .notif-card { border-top: 1px solid var(--bs-border-color); }
.notif-card > .notif { position: relative; }
.notif-card > .notif::before { content: ""; position: absolute; left: 1.05rem; top: 0; bottom: 0; width: 2px; background: var(--bs-border-color); }
.notif-card > .notif:last-child::before { bottom: 50%; }
.notif-head { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; font-size: .92rem; background: color-mix(in srgb, var(--g-accent) 11%, var(--bs-body-bg)); cursor: pointer; list-style: none; user-select: none; }
.notif-head::-webkit-details-marker { display: none; }
.notif-head:hover { background: color-mix(in srgb, var(--g-accent) 18%, var(--bs-body-bg)); }
.notif-card[open] > .notif-head { border-bottom: 1px solid var(--bs-border-color); }
.notif-chev { flex: none; width: 1rem; font-size: .7rem; color: var(--bs-secondary-color); transition: transform .12s; }
.notif-card[open] .notif-chev { transform: rotate(90deg); }
.notif-head > .bi:not(.notif-chev) { color: var(--bs-secondary-color); }
.notif-title { font-weight: 700; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
a.notif-title:hover { text-decoration: underline; }
button.notif-title, button.notif-main { margin: 0; padding: 0; border-radius: 0; text-align: left; }
button.notif-title:hover, button.notif-main:hover { background: none; }
button.notif-title:hover { text-decoration: underline; }
button.notif-title-wide { flex: 1 1 auto; align-self: stretch; padding: .1rem 0; }
button.notif-main { width: 100%; font-weight: inherit; }
.notif-count { flex: none; font-size: .75rem; color: var(--bs-secondary-color); }
.notif-new { flex: none; padding: 0 .45rem; border-radius: 1rem; font-size: .68rem; font-weight: 700; line-height: 1.2rem; background: var(--g-accent); color: var(--g-ink); }
.notif-head .notif-time { margin-left: auto; }
.notif { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) auto .65rem; align-items: center; gap: .6rem; padding: .22rem .6rem .22rem 1.9rem; font-size: .82rem; }
.notif:hover { background: var(--bs-secondary-bg); }
.notif .avatar, .notif .owner-chip { transform: scale(.8); transform-origin: left center; }
.notif-dot { width: .6rem; height: .6rem; padding: 0; border-radius: 50%; border: 1.5px solid var(--bs-border-color); background: transparent; }
.notif.unread .notif-dot { background: var(--g-accent); border-color: var(--g-accent); }
.notif-main { min-width: 0; display: grid; grid-template-columns: minmax(12rem, 24rem) minmax(0, 1fr); gap: .75rem; align-items: baseline; text-decoration: none; color: inherit; }
.notif-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif:not(.unread) .notif-line { color: var(--bs-secondary-color); }
.notif:not(.unread) .notif-line strong { font-weight: 600; }
.notif-icon { margin-right: .4rem; color: var(--g-acct); }
.notif-icon.success { color: var(--g-week); }
.notif-icon.warning { color: var(--g-soon); }
.notif-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bs-secondary-color); }
.notif-time { font-size: .73rem; color: var(--bs-secondary-color); white-space: nowrap; }
@media (max-width: 700px) { .notif-main { grid-template-columns: 1fr; gap: 0; } .notif-desc { font-size: .75rem; } }

/* light theme: columns one step darker than the page, cards and rows white (same palette, no new greys) */
[data-bs-theme="light"] .notif-list { background: var(--bs-secondary-bg); border: 0; border-radius: .7rem; padding: .3rem; }
[data-bs-theme="light"] .notif-card + .notif-card { border-top: 0; margin-top: .45rem; }
[data-bs-theme="light"] .notif-head { background: var(--bs-border-color); border-radius: .5rem; }
[data-bs-theme="light"] .notif-head:hover { background: var(--g-line2); }
[data-bs-theme="light"] .notif-card[open] > .notif-head { border-bottom: 0; margin-bottom: .25rem; }
[data-bs-theme="light"] .notif-card > .notif { background: var(--bs-body-bg); border-radius: .5rem; margin: 0 0 .2rem 1.1rem; box-shadow: 0 0 0 1px var(--bs-border-color); padding-left: .6rem; }
[data-bs-theme="light"] .notif-card > .notif::before { display: none; }
[data-bs-theme="light"] .notif-card > .notif:hover { background: var(--bs-tertiary-bg); }
[data-bs-theme="light"] .board:not(.list-view) .section-col:not(.add-section) { background: var(--bs-secondary-bg); border-color: transparent; }
[data-bs-theme="light"] .board:not(.list-view) .task-card:not(.selected):not(.multi) { background: var(--bs-body-bg); }

/* ---- settings: a page with a side menu, every control saves by itself ---- */
.settings-page { display: flex; align-items: flex-start; gap: 2rem; max-width: 62rem; padding: 1.5rem 1rem 3rem; }
.settings-nav { flex: 0 0 11rem; display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 1rem; }
.settings-nav-title { margin: 0 0 .5rem .6rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.settings-content { flex: 1; min-width: 0; padding: 1.25rem 1.5rem .5rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .9rem; }
.settings-content > .settings-row:first-of-type { border-top: 0; }
.settings-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.settings-head h2 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.settings-saved { margin-left: auto; font-size: .85rem; font-weight: 700; color: var(--g-week); }
.settings-intro { color: var(--bs-secondary-color); font-size: .9rem; }
.settings-group { margin: 1.75rem 0 .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-secondary-color); }
.settings-row { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--bs-border-color); }
.settings-row-text { flex: 1; min-width: 0; }
.settings-row-title { display: block; margin: 0; font-weight: 700; font-size: .95rem; }
.settings-row-help { max-width: 34rem; font-size: .85rem; color: var(--bs-secondary-color); }
.settings-control { flex: none; min-width: 11rem; }
.settings-row .form-switch { flex: none; font-size: 1.15rem; margin: 0; }
.settings-content .modal-body { padding: 0; }
.tag-color { flex: none; }
.tag-color-btn { width: 1.9rem; height: 1.9rem; padding: 0; border: 2px solid var(--bs-border-color); border-radius: 50%; cursor: pointer; }
.tag-color-btn:hover, .tag-color-btn[aria-expanded="true"] { border-color: var(--bs-body-color); }
.tag-popup { width: 14rem; }
.tag-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tag-swatch { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.tag-swatch:hover { transform: scale(1.15); }
.tag-swatch.is-selected { border-color: var(--bs-body-color); box-shadow: inset 0 0 0 1px var(--bs-body-bg); }
@media (max-width: 720px) {
  .settings-page { flex-direction: column; gap: 1rem; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; position: static; flex-basis: auto; width: 100%; }
  .settings-nav-title { width: 100%; }
  .settings-row { flex-wrap: wrap; gap: .75rem; }
}

/* description editor (TinyMCE): looks like the old textarea */
.tox.tox-tinymce.panel-notes-editor { border: 1px solid transparent; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); transition: border-color .12s, background .12s; }
.tox.tox-tinymce.panel-notes-editor:hover { border-color: var(--bs-border-color); }
.tox.tox-tinymce.panel-notes-editor:focus-within { border-color: var(--g-ring); background: var(--bs-body-bg); }
.tox.tox-tinymce.panel-notes-editor { isolation: isolate; }  /* its sticky toolbar must not climb over the panel header */
.tox.tox-tinymce.panel-notes-editor .tox-edit-area__iframe { background: transparent; }
.tox.tox-tinymce.panel-notes-editor .tox-toolbar-overlord, .tox.tox-tinymce.panel-notes-editor .tox-toolbar__primary { background: transparent; }
.tox.tox-tinymce.is-disabled .tox-editor-header { display: none; }
.tox.tox-tinymce.panel-notes-editor .tox-statusbar { background: transparent; border-top: 0; }

/* two people changed the same field: the bar above the form asks which one stays */
.panel-conflict { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: 0 0 .75rem; padding: .55rem .75rem; border: 1px solid var(--c-p2-dot); border-radius: .6rem; background: color-mix(in srgb, var(--c-p2-dot) 12%, transparent); font-size: .85rem; }
.panel-conflict-text { display: flex; gap: .5rem; align-items: center; flex: 1 1 14rem; }
.panel-conflict-actions { display: flex; gap: .4rem; }
.panel-conflict-theirs { flex: 1 0 100%; }
.panel-conflict-theirs summary { cursor: pointer; color: var(--bs-secondary-color); }
.panel-conflict-theirs .conflict-theirs { margin-top: .4rem; padding: .5rem .65rem; border-radius: .5rem; background: var(--bs-body-bg); max-height: 12rem; overflow: auto; white-space: pre-wrap; }

/* who else has the task open, and a note that it changed while typing */
.panel-presence { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; padding: .35rem .65rem; border-radius: .5rem; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); font-size: .8rem; }
.panel-presence[hidden] { display: none; }
/* somebody else holds the editing lock: red bar on top, red border on the offcanvas, fields read-only */
.panel-lock-bar { margin: 0 -1.5rem .75rem; padding: .5rem 1.5rem; background: #dc3545; color: #fff; font-weight: 600; font-size: .9rem; }
.panel-lock-bar[hidden] { display: none; }
#task-panel.is-locked { border-left: 4px solid #dc3545; }

/* which installation this is (ENV_LABEL / DEBUG): nothing on production */
.env-badge { padding: .05rem .45rem; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; color: var(--c-p2-dot); border: 1px solid currentColor; line-height: 1.5; }
.env-badge--debug { color: var(--c-p3-dot); }

/* who follows the task, and the button to stop */
.panel-followers { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .25rem; min-width: 0; }
.panel-followers .panel-section-title { margin: 0; white-space: nowrap; }
.panel-followers .avatars .owner-chip { width: 1.5rem; height: 1.5rem; font-size: .7rem; }
.panel-followers .followers-names { min-width: 0; }

/* comments in the list: a bubble with the number, highlighted while there are new ones from others */
.comment-badge { display: inline-flex; align-items: center; gap: .25rem; margin-left: .45rem; padding: 0 .4rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.5; color: var(--bs-secondary-color); white-space: nowrap; vertical-align: middle; }
.comment-badge.unread { color: var(--g-acct); background: color-mix(in srgb, var(--g-acct) 14%, transparent); font-weight: 800; }
.dup-badge { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .45rem; border: 0; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.5; white-space: nowrap; color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); cursor: pointer; }
.dup-badge.keep { color: var(--bs-secondary-color); background: var(--bs-secondary-bg); }
.comment-badge.unread::after { content: ""; width: .4rem; height: .4rem; margin-left: .05rem; border-radius: 50%; background: currentColor; }

/* ---- Bullet journal: dotted paper, handwriting for the entries, the usual controls around them ---- */
[data-bs-theme=light] { --j-paper: #FFFFFF; --j-dot: #C3CBDA; --j-rule: #E3E8F2; --j-pen: #0F1B33; --j-pen2: #566683; --j-done: #A9B3C7; }
[data-bs-theme=dark]  { --j-paper: #131B2D; --j-dot: #2D3C5E; --j-rule: #22304F; --j-pen: #F1F5FF; --j-pen2: #8794B3; --j-done: #5F6E91; }
.journal { padding: 1rem 1.25rem; }
.j-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.j-head .g-btn.on { background: var(--bs-secondary-bg); }
.j-range { font-weight: 700; }
.j-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .75rem; }
.j-legend b { font-size: 1rem; color: var(--j-pen); margin-right: .15rem; }
.j-legend .j-hint { margin-left: auto; }
.j-legend kbd { padding: 0 .3rem; border: 1px solid var(--g-line2); border-radius: .3rem; background: var(--bs-body-bg); color: var(--bs-body-color); }
.j-banner { display: block; margin-bottom: .75rem; padding: .5rem .85rem; border: 1px dashed var(--g-late); border-radius: .6rem; color: var(--g-late); text-decoration: none; font-weight: 600; }
.j-banner b { font-size: 1.05rem; }
.j-intro { font-size: .9rem; color: var(--j-pen2); }

/* the page: dots on paper */
.j-day, .j-page {
  background-color: var(--j-paper); color: var(--j-pen);
  border: 1px solid var(--j-rule); border-radius: .5rem; box-shadow: 0 1px 0 var(--j-rule), 0 6px 14px -10px var(--g-shadow);
}
.j-day { padding: .6rem .85rem .75rem; }
.j-page { padding: .85rem 1.1rem 1rem; }
.j-day.today { border-color: var(--g-accent); box-shadow: 0 0 0 1px var(--g-accent), 0 6px 14px -10px var(--g-shadow); }
.j-day-head { display: flex; align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--j-rule); margin-bottom: .25rem; padding-bottom: .15rem; }
.j-dom { font-size: 1.5rem; line-height: 1; font-weight: 700; }
.j-dow { color: var(--j-pen2); text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.j-today { margin-left: .25rem; font-size: .68rem; font-weight: 700; color: var(--g-ink); background: var(--g-accent); border-radius: 1rem; padding: 0 .5rem; }
.j-page-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 .35rem; border-bottom: 1px solid var(--j-rule); }
.j-page-title small { font-size: .9rem; font-weight: 500; color: var(--j-pen2); }

.j-daily { display: grid; gap: .85rem; }
.j-day3 { display: grid; grid-template-columns: minmax(180px, 3fr) minmax(0, 6fr) minmax(180px, 3fr); gap: .85rem; align-items: start; }  /* the day, with the one before and the one after */
.j-side { opacity: .8; min-width: 0; }
.j-side:hover, .j-side:focus-within { opacity: 1; }
.j-side-link { display: block; margin-bottom: .3rem; font-size: .8rem; font-weight: 600; color: var(--j-pen2); text-decoration: none; }
.j-side--after .j-side-link { text-align: right; }
.j-side-link:hover { color: var(--j-pen); }
body.panel-open .j-day3 { grid-template-columns: minmax(0, 1fr); }  /* the panel takes the room: just the day */
body.panel-open .j-side { display: none; }
@media (max-width: 900px) { .j-day3 { grid-template-columns: minmax(0, 1fr); } .j-main { order: -1; } }
.j-month { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .85rem; align-items: start; }
.j-future { display: grid; grid-template-columns: repeat(6, minmax(260px, 1fr)); gap: .6rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }  /* wide columns, sideways scroll */
.j-review { display: grid; gap: .85rem; }
@media (max-width: 900px) { .j-month { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) {  /* phone: nothing may be wider than the screen */
  .j-head > * { min-width: 0; }
  .j-head .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .j-head .seg-btn { flex: none; }
  .j-head .ms-auto { margin-left: 0 !important; flex-wrap: wrap; }
  .j-day-head { flex-wrap: wrap; row-gap: .35rem; }
  .j-day-head .ms-auto { margin-left: 0 !important; }
}
@media (max-width: 760px) { .j-future { grid-template-columns: 1fr; } .j-legend .j-hint { display: none; } }

/* entries */
.j-list { list-style: none; margin: 0; padding: 0; min-height: 1.6rem; }
.j-entry { display: flex; align-items: baseline; gap: .15rem; font-size: .85rem; line-height: 1.55; position: relative; }
.j-entry:hover { background: color-mix(in srgb, var(--g-accent) 7%, transparent); }
.j-sig { width: .9rem; text-align: right; color: var(--g-late); flex: none; }
.j-bullet { flex: none; width: 1.4rem; font-size: 1.15rem; line-height: 1; text-align: center; border: 0; background: none; padding: 0; color: var(--j-pen); font: inherit; cursor: pointer; }
.j-bullet.static { cursor: default; }
button.j-bullet:hover { color: var(--g-accent); }
.j-text { flex: 0 1 auto; min-width: 0; text-align: left; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.j-text.title-btn { margin-left: 0; padding: 0; font-weight: inherit; border-radius: 0; }
.j-text.title-btn:hover { background: none; text-decoration: underline dotted; }
.j-time { color: var(--j-pen2); font-weight: 600; margin-right: .15rem; }
.j-mig { flex: none; margin-left: .4rem; color: var(--g-soon); font-weight: 800; letter-spacing: -.1em; cursor: help; }
.j-entry:not(.done) .j-text { font-weight: 500; }
/* done: clearly out of the way (pale text, a green ×); struck out: pale and crossed */
.j-entry.done .j-text, .j-entry.done .j-time, .j-entry.done .j-date { color: var(--j-done); font-weight: 400; }
.j-entry.done:not(.cancelled) .j-bullet { color: var(--g-week); font-weight: 800; }
.j-entry.cancelled .j-text, .j-entry.cancelled .j-bullet { text-decoration: line-through; color: var(--j-done); }
/* past: today, sorted by time, already started (set by journal.js) */
.j-entry.past .j-text, .j-entry.past .j-time, .j-entry.past .j-bullet { color: var(--j-done); }
.j-entry.late .j-text, .j-entry.late .j-time, .j-entry.late .j-bullet { color: var(--g-late); }
.j-entry.k-note .j-text { font-style: italic; }
.j-menu { position: absolute; right: 0; top: .1rem; background: var(--j-paper); border-radius: .4rem; font-family: var(--bs-body-font-family); font-size: .9rem; flex: none; }
.j-menu > .g-icon-btn { opacity: .45; }
.j-entry:hover .j-menu > .g-icon-btn, .j-entry:focus-within .j-menu > .g-icon-btn, .j-menu > .g-icon-btn.show { opacity: 1; }
/* an open menu (or "Close day") goes over the days and pages that follow */
.j-day:has(.dropdown-menu.show), .j-page:has(.dropdown-menu.show), .j-cal-row:has(.dropdown-menu.show) { position: relative; z-index: 30; }
.j-now { display: flex; align-items: center; height: 1.1rem; margin: .1rem 0; list-style: none; pointer-events: none; }
.j-now[hidden] { display: none; }
.j-now-dot { flex: none; width: .6rem; height: .6rem; margin: 0 .25rem 0 .55rem; border-radius: 50%; background: #C2410C; }
.j-now-label { flex: none; padding: 0 .5rem; border-radius: 1rem; background: #C2410C; color: #fff; font-size: .68rem; font-weight: 700; line-height: 1.1rem; }
.j-now::after { content: ""; flex: 1 1 auto; height: 2px; margin-left: .25rem; background: #C2410C; }
.j-prog { display: flex; align-items: center; gap: .5rem; margin: .1rem 0 .3rem 1.4rem; font-size: .72rem; color: var(--j-pen2); }
.j-prog-bar { position: relative; flex: 1 1 auto; height: 5px; border-radius: 3px; background: var(--j-rule); overflow: hidden; }
.j-prog-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: #C2410C; }
.j-glyph { display: inline-block; width: 1rem; font-size: 1rem; line-height: 1; }
.j-ghost { opacity: .4; }
.j-empty { color: var(--j-pen2); font-size: .9rem; }
.j-clear { text-align: center; padding: 2rem 0; font-size: 1.1rem; }

.j-add { margin: .15rem 0 0 1.35rem; }
.j-input { font-family: inherit; width: 100%; border: 0; border-bottom: 1px dashed transparent; background: transparent; color: var(--j-pen); font-size: .85rem; padding: .1rem .15rem; outline: none; }
.j-input::placeholder { color: var(--j-pen2); opacity: .55; }
.j-day:hover .j-input, .j-page:hover .j-input, .j-input:focus { border-bottom-color: var(--g-line2); }
.j-input:focus { border-bottom-style: solid; border-bottom-color: var(--g-accent); }

.j-cal-row { display: flex; align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--j-rule); min-height: 1.9rem; }
.j-cal-row.today { background: color-mix(in srgb, var(--g-accent) 10%, transparent); }
.j-cal-row.weekend .j-cal-day { color: var(--j-pen2); }
.j-cal-day { flex: none; width: 3.2rem; white-space: nowrap; font-size: .85rem; }
.j-cal-day b { display: inline-block; min-width: 1.4rem; text-align: right; }
.j-cal-row .j-list { flex: 1 1 auto; min-width: 0; }
.j-cal-row .j-entry { font-size: .85rem; }
.j-cal-add { opacity: 0; color: var(--j-pen2); text-decoration: none; }
.j-cal-row:hover .j-cal-add { opacity: 1; }

.j-guide { display: grid; gap: 1rem; }
.j-guide section { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .9rem 1.1rem; }
.j-guide h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; }
.j-guide p, .j-guide li { font-size: .95rem; }
.j-guide table { width: 100%; font-size: .93rem; }
.j-guide td, .j-guide th { padding: .3rem .6rem .3rem 0; vertical-align: top; border-bottom: 1px solid var(--bs-border-color); }
.j-guide th { color: var(--bs-secondary-color); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.j-guide code, .j-guide kbd { padding: .05rem .35rem; border: 1px solid var(--g-line2); border-radius: .3rem; background: var(--bs-tertiary-bg); color: var(--bs-body-color); font-size: .88em; }
.j-guide .j-sym { font-weight: 700; font-size: 1.1rem; display: inline-block; min-width: 1.4rem; text-align: center; }

.j-date { flex: none; margin: 0 .35rem 0 .1rem; padding: 0 .4rem; border-radius: .4rem; background: var(--bs-secondary-bg); color: var(--j-pen2); font-size: .72rem; font-weight: 700; line-height: 1.4; letter-spacing: .02em; white-space: nowrap; align-self: center; }
.j-sort .seg-btn { white-space: nowrap; }
.journal.events-hidden .j-entry.k-event { display: none; }
.journal.done-hidden .j-entry.done { display: none; }
.j-banner--info { border-color: var(--g-accent); color: var(--g-accent); }

/* ---- statistics page (admins) ---- */
.stats-page { padding: 1rem 1rem 3rem; }
.stats-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.stats-tile { padding: .7rem .9rem; border: 1px solid var(--bs-border-color); border-radius: .7rem; background: var(--bs-body-bg); }
.stats-num { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stats-label { font-size: .75rem; color: var(--bs-secondary-color); }
.stats-h { margin: 1.5rem 0 .4rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); }
.stats-box { border: 1px solid var(--bs-border-color); border-radius: .7rem; background: var(--bs-body-bg); overflow: hidden; }
.stats-days { padding: .7rem .9rem; }
.stats-legend { font-size: .75rem; color: var(--bs-secondary-color); margin-bottom: .5rem; }
.stats-legend .k { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin: 0 .2rem 0 .6rem; }
.stats-legend .k:first-child { margin-left: 0; }
.k-created { background: var(--g-accent); }
.k-done { background: #3f9d6b; }
.k-comments { background: #6b8fd6; }
.stats-chart { display: flex; gap: 3px; align-items: flex-end; height: 9rem; }
.stats-day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: .6rem; color: var(--bs-secondary-color); }
.stats-day .bars { flex: 1; width: 100%; display: flex; gap: 1px; align-items: flex-end; }
.stats-day .bars i { flex: 1; min-height: 1px; border-radius: 2px 2px 0 0; }

/* ---- palette picker (settings > Appearance) ---- */
.settings-row--stack { flex-direction: column; align-items: stretch; }
.pal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .6rem; }
.pal-card { display: flex; flex-direction: column; gap: .5rem; padding: .5rem; border-radius: .8rem; background: var(--bs-tertiary-bg); cursor: pointer; outline: 2px solid transparent; }
.pal-card:hover { background: var(--bs-secondary-bg); }
.btn-check:checked + .pal-card { outline-color: var(--g-accent); }
.btn-check:focus-visible + .pal-card { outline: 2px solid var(--g-ring); outline-offset: 2px; }
.pal-swatch { display: flex; height: 2.4rem; border-radius: .5rem; overflow: hidden; }
.pal-swatch i { flex: 1; background: var(--s1); }
.pal-swatch i:nth-child(2) { background: var(--s2); }
.pal-swatch i:nth-child(3) { background: var(--s3); flex: .5; }
.pal-name { font-size: .875rem; font-weight: 700; }
.pal-name small { display: block; font-weight: 400; color: var(--bs-secondary-color); font-size: .8125rem; }
[data-bs-theme=dark] .pal-card[data-pal-preview=chino] { --s1: #141827; --s2: #1E243D; --s3: #4D8EE2; }
[data-bs-theme=light] .pal-card[data-pal-preview=chino] { --s1: #F3F6FA; --s2: #FFFFFF; --s3: #252E53; }
[data-bs-theme=dark] .pal-card[data-pal-preview=salvia] { --s1: #131E18; --s2: #1B2A22; --s3: #6FCF9B; }
[data-bs-theme=light] .pal-card[data-pal-preview=salvia] { --s1: #EAF1EC; --s2: #FFFFFF; --s3: #1E7A52; }
[data-bs-theme=dark] .pal-card[data-pal-preview=inchiostro] { --s1: #121B30; --s2: #1A2742; --s3: #6AA5FF; }
[data-bs-theme=light] .pal-card[data-pal-preview=inchiostro] { --s1: #E8EEF8; --s2: #FFFFFF; --s3: #1F5FD1; }
[data-bs-theme=dark] .pal-card[data-pal-preview=lampone] { --s1: #1A1319; --s2: #241B23; --s3: #F0558A; }
[data-bs-theme=light] .pal-card[data-pal-preview=lampone] { --s1: #F4ECEF; --s2: #FFFFFF; --s3: #C7285F; }
[data-bs-theme=dark] .pal-card[data-pal-preview=carbone] { --s1: #151515; --s2: #1E1E1E; --s3: #F4F4F4; }
[data-bs-theme=light] .pal-card[data-pal-preview=carbone] { --s1: #EDEDEA; --s2: #FFFFFF; --s3: #161616; }
[data-bs-theme=dark] .pal-card[data-pal-preview=classic] { --s1: #0A1120; --s2: #111A2E; --s3: #5B9BFF; }
[data-bs-theme=light] .pal-card[data-pal-preview=classic] { --s1: #F3F6FC; --s2: #FFFFFF; --s3: #1F5FD1; }
/* the Overdue button of the toolbar: a count that is red while something is late, grey at zero */
.chip--late .n { color: var(--g-late); font-weight: 700; }
.chip--late.zero .n { color: var(--bs-secondary-color); font-weight: 500; }

/* ---- new design: panels on the page ground, one radius scale, firmer contrast ----
   radius: 14px panels (sections, dialogs, filter bar), 9px rows and controls, full pills for chips.
   A section of the list is a panel one tone above the page; rows are rounded and only change tone on hover. */
:root { --g-r-panel: .9rem; --g-r-row: .6rem; }
.navbar { background: transparent; }
.navbar.border-bottom { border-bottom-color: transparent !important; }
.toolbar { background: var(--bs-tertiary-bg); border-bottom: 0; padding: .6rem 1rem; }
.board.list-view { gap: .9rem; padding: .25rem 1rem 2rem; }
.list-view .section-col { background: var(--bs-body-bg); border-radius: var(--g-r-panel); padding: .3rem .5rem .5rem; }
.list-view .section-col > header { padding: .6rem .75rem .35rem; }
.list-view .task-list { border-top: 0; background: transparent; }
.list-view .task-card.task-row { border-bottom: 0; border-radius: var(--g-r-row); padding: 0 .5rem; }
.list-view .task-card.task-row:hover { background: var(--bs-secondary-bg); }
.list-view .add-task-form { padding: 0 .5rem; border-bottom: 0; background: transparent; border-radius: var(--g-r-row); }
.list-view .add-task-form:focus-within { background: var(--bs-secondary-bg); }
.list-view .add-section { padding: .75rem .5rem; }
.list-head { margin: .5rem 1rem 0; padding: .35rem 1rem; border: 0; background: transparent; }
.filter-bar { border: 0; border-radius: var(--g-r-panel); }
.project-head { padding-left: 1rem; padding-right: 1rem; }
.chip { border-color: var(--g-line2); }
.chip.on { border-color: transparent; }
.search { border-color: var(--g-line2); background: var(--bs-body-bg); }
.g-btn { border-color: var(--g-line2); border-radius: .7rem; }
.g-btn--primary { border-color: var(--g-accent); }
.g-btn--ghost { border-color: transparent; }
.form-control, .form-select { border-radius: .7rem; background-color: var(--bs-body-bg); border-color: var(--g-line2); color: var(--bs-body-color); }
.form-control::placeholder { color: var(--bs-secondary-color); opacity: 1; }
.modal-content { border-radius: 1.1rem; border-color: transparent; }
.dropdown-menu { border-color: var(--bs-border-color); }
.side-link.active { background: var(--bs-body-bg); }
.side-link:hover { background: color-mix(in srgb, var(--bs-body-bg) 60%, transparent); }
.count-pill { color: var(--bs-secondary-color); }
.prio-pill.p0, .dbtn.due-none { opacity: .7; }
.list-head .sort-link, .toolbar-toggle { border-radius: .5rem; }
@media (max-width: 767.98px) {
  .board.list-view { padding: .25rem .5rem 2rem; }
  .list-head { margin: .5rem .5rem 0; }
}

/* Journal on the palette: its paper, ink and rules come from the page tokens, pages are panels, banners are tinted not dashed */
[data-pal] { --j-paper: var(--bs-body-bg); --j-dot: var(--g-line2); --j-rule: var(--bs-border-color); --j-pen: var(--bs-body-color);
  --j-pen2: var(--bs-secondary-color); --j-done: color-mix(in srgb, var(--bs-secondary-color) 65%, var(--bs-body-bg)); }
.j-day, .j-page { border: 0; border-radius: var(--g-r-panel); box-shadow: none; }
.j-banner { border: 0; background: color-mix(in srgb, var(--g-late) 13%, var(--bs-body-bg)); border-radius: var(--g-r-row); }
.j-menu { border-radius: .6rem; }
.j-date { border-radius: .5rem; }

/* task panel: rounded edge, raised fields with a visible edge, labels in sentence case */
#task-panel:not(.expanded) { border-radius: 1.1rem 0 0 1.1rem; border-left-color: var(--bs-border-color); overflow: hidden; }
.panel-notes, .panel-add, #task-comments textarea, .panel-notes-view { background: var(--bs-secondary-bg); border-color: var(--bs-border-color); }
.panel-notes:hover, .panel-notes-view:hover { border-color: var(--g-line2); }
.panel-label, .panel-section-title { font-size: .8125rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.panel-section { border-top-color: var(--bs-border-color); }
.g-btn--sm { border-radius: .6rem; }
/* the rich text editors take the page tones instead of the skin's own */
.tox.tox-tinymce { border: 1px solid var(--bs-border-color) !important; border-radius: .7rem !important; }
.tox .tox-edit-area__iframe, .tox .tox-editor-header, .tox .tox-toolbar-overlord, .tox .tox-toolbar__primary, .tox .tox-statusbar,
.tox .tox-toolbar, .tox .tox-toolbar__group { background-color: var(--bs-secondary-bg) !important; }

/* chrome: the top bar and the sidebar sit on their own tone, the page is a rounded sheet on it */
[data-pal] body { background: var(--g-chrome); }
[data-pal] .g-content { background: var(--bs-tertiary-bg); border-radius: 1.1rem; margin: 0 .6rem .6rem 0; min-height: calc(100vh - 44px - .6rem); }
[data-pal] .side-link.active { background: var(--bs-tertiary-bg); }
[data-pal] .side-link:hover { background: color-mix(in srgb, var(--bs-tertiary-bg) 55%, transparent); }
@media (max-width: 767.98px) { [data-pal] .g-content { margin: 0; border-radius: 1rem 1rem 0 0; } }

/* Custom palette: two colours picked in Settings (--u-accent, --u-base, --u-ink set on <html> by board.js / base.html);
   page, panel and greys are derived from the base tint. */
[data-pal=custom] { --g-accent: var(--u-accent, #6FCF9B); --g-ink: var(--u-ink, #06130C); }
[data-pal=custom][data-bs-theme=dark] { --u-b: var(--u-base, #5E8C73); --g-chrome: color-mix(in oklab, var(--u-b) 7%, #030303);
  --bs-tertiary-bg: color-mix(in oklab, var(--u-b) 13%, #060606); --bs-body-bg: color-mix(in oklab, var(--u-b) 20%, #0a0a0a);
  --bs-secondary-bg: color-mix(in oklab, var(--u-b) 28%, #0e0e0e); --bs-border-color: color-mix(in oklab, var(--u-b) 32%, #0e0e0e);
  --bs-body-color: color-mix(in oklab, var(--u-b) 6%, #fff); --bs-secondary-color: color-mix(in oklab, var(--u-b) 28%, #d4d4d4); }
[data-pal=custom][data-bs-theme=light] { --u-b: var(--u-base, #5E8C73); --g-chrome: color-mix(in oklab, var(--u-b) 26%, #fff);
  --bs-tertiary-bg: color-mix(in oklab, var(--u-b) 14%, #fff); --bs-body-bg: #fff;
  --bs-secondary-bg: color-mix(in oklab, var(--u-b) 9%, #fff); --bs-border-color: color-mix(in oklab, var(--u-b) 24%, #fff);
  --bs-body-color: color-mix(in oklab, var(--u-b) 10%, #0c0c0c); --bs-secondary-color: color-mix(in oklab, var(--u-b) 30%, #444); }
.pal-card[data-pal-preview=custom] { --s1: color-mix(in oklab, var(--u-base, #5E8C73) 12%, #060606); --s2: color-mix(in oklab, var(--u-base, #5E8C73) 18%, #0a0a0a); --s3: var(--u-accent, #6FCF9B); }
[data-bs-theme=light] .pal-card[data-pal-preview=custom] { --s1: color-mix(in oklab, var(--u-base, #5E8C73) 14%, #fff); --s2: #fff; }
.pal-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: .75rem; }
.pal-pick label { display: inline-flex; align-items: center; gap: .6rem; font-size: .875rem; font-weight: 600; }
.pal-pick input[type=color] { width: 2.6rem; height: 2.1rem; padding: 0; border: 1px solid var(--g-line2); border-radius: .6rem; background: var(--bs-body-bg); cursor: pointer; }

/* ---- Today: head, the list and the day strip side by side ---- */
.today-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.5rem .75rem 1.5rem; }
.today-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
.today-finding { margin: .35rem 0 0; color: var(--bs-secondary-color); }
.today-finding strong { color: var(--g-late); font-weight: 700; }
.today-cols { display: grid; grid-template-columns: minmax(0, 1fr) clamp(24rem, 42%, 38rem); gap: 0; align-items: start; padding-right: 1rem; }
.today-cols > div:first-child { min-width: 0; }
.today-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; }
body.today-done-hidden .today-cols .task-card.done { display: none; }
.today-empty { margin: 0; padding: .5rem 1.25rem 1rem; color: var(--bs-secondary-color); font-size: .9rem; }
.day-strip { background: var(--bs-body-bg); border-radius: var(--g-r-panel, .9rem); padding: .4rem 1rem 1rem; margin-top: .25rem; position: sticky; top: .75rem; }
.day-strip-title { display: flex; justify-content: space-between; font-size: .95rem; font-weight: 700; padding: .7rem 0 .75rem; margin: 0; }
.day-strip-title span { font-weight: 400; color: var(--bs-secondary-color); }
.day-grid { position: relative; }
.day-hour { position: absolute; left: 0; font-size: .75rem; color: var(--bs-secondary-color); transform: translateY(-.5rem); }
.day-line { position: absolute; left: 3rem; right: 0; height: 1px; background: var(--bs-border-color); }
.day-block { position: absolute; z-index: 1; display: flex; flex-direction: column; text-align: left; overflow: hidden; padding: .3rem .6rem; border: 0; border-radius: .55rem;
  background: color-mix(in srgb, var(--g-accent) 22%, var(--bs-body-bg)); color: var(--bs-body-color); font-size: .8125rem; line-height: 1.25; }
.day-block:hover { background: color-mix(in srgb, var(--g-accent) 32%, var(--bs-body-bg)); }
.day-block small { color: var(--bs-secondary-color); font-size: .75rem; }
.day-block.late { background: color-mix(in srgb, var(--g-late) 18%, var(--bs-body-bg)); }
.day-block.late .day-block-title, .day-block.late small { color: var(--g-late); }
.day-block.event { z-index: 0; background: color-mix(in srgb, var(--bs-secondary-color) 16%, var(--bs-body-bg)); }
.day-block.event:hover { background: color-mix(in srgb, var(--bs-secondary-color) 24%, var(--bs-body-bg)); }
.day-block.event.over { opacity: .55; }
.day-allday { margin: .5rem 0 0; font-size: .8125rem; color: var(--bs-secondary-color); }
.day-allday button { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.day-block.done { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.day-block.done .day-block-title { text-decoration: line-through; }
.day-block-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-now { position: absolute; z-index: 2; left: 3rem; right: 0; height: 2px; background: var(--g-accent); pointer-events: none; }
.day-now::before { content: attr(data-time); position: absolute; left: -3rem; top: -.55rem; font-size: .75rem; font-weight: 700; color: var(--g-accent); }
.day-next { margin: .9rem 0 0; font-size: .875rem; color: var(--bs-secondary-color); }
.day-next strong { color: var(--bs-body-color); font-weight: 600; }
@media (max-width: 1099.98px) { .today-cols { grid-template-columns: 1fr; padding-right: 0; } .day-strip { position: static; margin: 0 1rem 1rem; } }
@media (max-width: 767.98px) { .today-head { padding: 1rem 1rem .5rem; } }
/* Today is narrower than My tasks: no tags and project columns, the title takes the room */
@media (min-width: 721px) { .today-cols .list-view { --cols: 1rem 1.35rem minmax(0, 1fr) 9.5rem 6.5rem 1.75rem; } }  /* on a phone the list keeps its own 5 columns */
.today-cols .col-tags, .today-cols .col-proj { display: none; }
.day-block.short { flex-direction: row; align-items: center; gap: .5rem; padding-top: 0; padding-bottom: 0; }
.day-block.short small { flex: none; }

/* ---- Journal, rethought: a two-level header, a wide day with its neighbours in a rail, filled inputs, accent for "now" ---- */
.journal { padding: 1.25rem 1.5rem 2rem; }
.j-head { display: block; margin-bottom: 1rem; }
.j-head-top { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; }
.j-title-h { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0 .5rem 0 0; }
.j-head-bar { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; }
.j-range { font-weight: 600; color: var(--bs-secondary-color); }
.j-notices { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.j-notices:empty { display: none; }
.j-banner { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .4rem .9rem; border-radius: 999px; font-size: .875rem; font-weight: 600; }
.j-banner--info { background: color-mix(in srgb, var(--g-accent) 16%, var(--bs-body-bg)); color: var(--bs-body-color); }
/* open tasks with no day are in no log: it must be impossible to miss, in both themes */
.j-banner--alert { flex: 1 1 100%; padding: .7rem 1.1rem; background: #C2253F; color: #fff; font-size: 1rem; font-weight: 700; border-radius: .6rem; box-shadow: 0 0 0 2px color-mix(in srgb, #C2253F 35%, transparent); }
.j-banner--alert:hover { background: #A81D35; color: #fff; }
.j-banner--alert i { font-size: 1.15rem; }
.j-day3 { grid-template-columns: minmax(0, 1fr) 22rem; gap: 1rem; }
.j-rail { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.j-side { opacity: 1; }
.j-side .j-day { padding: .8rem 1rem .9rem; }
.j-side .j-dom { font-size: 1.4rem; }
.j-side .j-day-head .g-btn, .j-side .j-day-head .dropdown, .j-side .j-prog { display: none; }
.j-side-link { margin-bottom: .4rem; font-size: .8125rem; font-weight: 600; }
.j-day { padding: 1.1rem 1.4rem 1.2rem; }
.j-day.today { border: 0; box-shadow: inset 0 0 0 2px var(--g-accent); }
.j-day-head { align-items: center; gap: .6rem; border-bottom: 0; margin-bottom: .5rem; padding-bottom: 0; }
.j-dom { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.j-dow { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 600; color: var(--bs-secondary-color); }
.j-today { font-size: .75rem; }
.j-entry { padding: .2rem .5rem; border-radius: .6rem; font-size: .85rem; }  /* the size of the rows of the lists */
.j-entry:hover { background: var(--bs-secondary-bg); }
.j-menu { background: transparent; right: .4rem; }
.j-add { margin: .5rem 0 0; }
.j-input { background: var(--bs-secondary-bg); border: 0; border-radius: .6rem; padding: .55rem .8rem; }
.j-day:hover .j-input, .j-page:hover .j-input, .j-input:focus { border-bottom-color: transparent; }
.j-input:focus { outline: 2px solid var(--g-accent); outline-offset: 0; }
.j-now-dot, .j-now-label, .j-prog-fill { background: var(--g-accent); }
.j-now-label { color: var(--g-ink); }
.j-now::after { background: var(--g-accent); }
.j-daily { grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); align-items: start; gap: 1rem; }
.j-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 1.5rem 0 0; font-size: .8125rem; color: var(--bs-secondary-color); }
.j-page-title { border-bottom: 0; }
.j-cal-row { border-bottom: 0; border-radius: .5rem; padding: 0 .4rem; }
.j-cal-row:hover { background: var(--bs-secondary-bg); }
.j-guide section { border: 0; border-radius: var(--g-r-panel); }
.j-guide th { text-transform: none; letter-spacing: 0; font-size: .875rem; }
@media (max-width: 1099.98px) { .j-day3 { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .journal { padding: 1rem; } .j-title-h { font-size: 1.4rem; } }
.j-day { min-width: 0; }
.j-day-head { flex-wrap: wrap; }
.j-daily .j-day-head .g-btn { padding: 0 .6rem; }

/* sidebar text: near the full ink instead of the soft grey, so it reads on the chrome tone */
.side-link { color: color-mix(in srgb, var(--bs-body-color) 88%, var(--g-chrome, var(--bs-tertiary-bg))); font-weight: 600; }
.side-link:hover, .side-link.active { color: var(--bs-body-color); }
.side-link .n, .side-link.active .n { color: color-mix(in srgb, var(--bs-body-color) 70%, var(--g-chrome, var(--bs-tertiary-bg))); }
.side-head { color: color-mix(in srgb, var(--bs-body-color) 68%, var(--g-chrome, var(--bs-tertiary-bg))); font-weight: 600; }
.side-top .g-icon-btn, .side-head .g-icon-btn { color: color-mix(in srgb, var(--bs-body-color) 75%, var(--g-chrome, var(--bs-tertiary-bg))); }
.g-sidebar .text-secondary { color: color-mix(in srgb, var(--bs-body-color) 68%, var(--g-chrome, var(--bs-tertiary-bg))) !important; }

/* ---- phone ---- */
@media (max-width: 767.98px) {
  /* the menu is a drawer: it needs its own opaque tone */
  .g-sidebar { background: var(--g-chrome, var(--bs-body-bg)); border-radius: 0 1.1rem 1.1rem 0; box-shadow: 0 0 40px var(--g-shadow);
    --bs-offcanvas-width: min(17rem, 85vw); height: 100vh; height: 100dvh; max-height: none; overflow-y: auto; }
  .g-sidebar .offcanvas-header { padding: 1rem 1rem .25rem; }
  .g-sidebar .offcanvas-body { padding: .5rem .75rem 1rem !important; }
  .navbar { flex-wrap: nowrap !important; gap: .5rem !important; }
  .navbar .navbar-brand { min-width: 0; margin-right: 0; }
  .navbar .env-badge { font-size: .6rem; padding: 0 .35rem; }
  .navbar .g-wordmark { font-size: 1.15rem; }
  .navbar .dropdown { flex: none; }
  .toolbar .search { order: 9; flex: 1 1 100%; margin-left: 0 !important; }
  .j-head-bar { flex-wrap: wrap; }
  .j-sort { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .j-sort .seg-btn { flex: none; }
}
@media (max-width: 575.98px) { #task-panel:not(.expanded) { border-radius: 0; } }

/* ---- by the width the page really has (data-w on .g-content, see board.js): the panel and the sidebar eat into it ---- */
.g-content[data-w=medium] .today-cols, .g-content[data-w=narrow] .today-cols { grid-template-columns: 1fr; padding-right: 0; }
.g-content[data-w=medium] .day-strip, .g-content[data-w=narrow] .day-strip { position: static; margin: .25rem 1rem 1rem; }
.g-content[data-w=narrow] .list-view, .g-content[data-w=narrow] .list-head { --cols: 1rem 1.35rem minmax(5rem, 1fr) fit-content(7.5rem) 1.5rem; }
.g-content[data-w=narrow] .list-head span:nth-child(5), .g-content[data-w=narrow] .list-head span:nth-child(6), .g-content[data-w=narrow] .list-head span:nth-child(7) { display: none; }
.g-content[data-w=narrow] .task-line .col-prio, .g-content[data-w=narrow] .task-line .col-tags, .g-content[data-w=narrow] .task-line .col-proj,
.g-content[data-w=narrow] .task-line .col-sync { display: none; }
.g-content[data-w=narrow] .today-head { padding: 1rem 1rem .5rem; }
/* the label of the present time covers the hour label when they meet (16:00 under 16:15) */
.day-now::before { background: var(--bs-body-bg); padding: 0 .2rem; margin-left: -.2rem; }

/* Week: the seven days stay in one row and the page scrolls sideways when they do not fit */
.j-daily.j-daily--week { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(19rem, 1fr); overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x proximity; }
.j-daily--week > .j-day { scroll-snap-align: start; }

/* ---- Planning: every open task by day, drag a row to another day (the days are journal pages: paper, rules, plain rows) ---- */
.pl-intro { margin: 0 0 .9rem; color: var(--j-pen2); font-size: .95rem; }
.pl-board { display: flex; gap: 1rem; align-items: flex-start; overflow-x: auto; padding: .1rem .1rem 1rem; scroll-snap-type: x proximity; }
.pl-col { flex: 0 0 17rem; scroll-snap-align: start; padding: .6rem .85rem .75rem; background-color: var(--j-paper); color: var(--j-pen);
  border: 1px solid var(--j-rule); border-radius: .5rem; box-shadow: 0 1px 0 var(--j-rule), 0 6px 14px -10px var(--g-shadow); }
.pl-col.today { border-color: var(--g-accent); box-shadow: inset 0 0 0 1px var(--g-accent), 0 6px 14px -10px var(--g-shadow); }
.pl-col.over { box-shadow: inset 0 0 0 2px var(--g-accent); }
.pl-head { display: flex; align-items: baseline; gap: .5rem; border-bottom: 1px solid var(--j-rule); margin-bottom: .25rem; padding-bottom: .15rem; }
.pl-dom { font-size: 1.5rem; line-height: 1; font-weight: 700; }
.pl-dow { color: var(--j-pen2); text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.pl-sub { color: var(--j-pen2); font-size: .75rem; }
.pl-col.today .pl-dow { color: var(--g-accent); }
.pl-col.late .pl-dow { color: var(--g-late); }
.pl-count { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--j-pen2); }
.pl-list { list-style: none; margin: 0; padding: 0; min-height: 2.2rem; }
.pl-card { display: flex; align-items: baseline; gap: .15rem; padding: .2rem .5rem; font-size: .85rem; line-height: 1.55; cursor: grab; border-radius: .6rem; }
.pl-card:hover { background: color-mix(in srgb, var(--g-accent) 7%, transparent); }
.pl-card.event { cursor: default; color: var(--j-pen2); }
.pl-bullet { flex: none; width: 1.4rem; font-size: 1.15rem; line-height: 1; text-align: center; }
.pl-title { flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; text-align: left; color: inherit; font: inherit; }
.pl-card.task .pl-title { font-weight: 500; }
.pl-title b { color: var(--j-pen2); font-weight: 600; }
.pl-sig { flex: none; font-weight: 700; color: var(--g-late); }
.pl-meta { flex: none; font-size: .72rem; color: var(--j-pen2); white-space: nowrap; }
.pl-meta .pl-mig { color: var(--g-late); font-weight: 700; }
.pl-ghost { opacity: .4; }
.pl-empty { margin: 0; padding: .35rem .3rem; color: var(--j-done); font-size: .85rem; font-style: italic; }
.pl-col:not(.is-empty) .pl-empty { display: none; }

/* Planning fills the height of the screen like the kanban boards: a long column scrolls inside itself */
.g-content:has(> .journal-planning) { display: flex; flex-direction: column; height: calc(100vh - 3.5rem); }
.journal-planning { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.journal-planning .j-legend { display: none; }
.journal-planning .pl-board { flex: 1; min-height: 0; align-items: stretch; padding-bottom: .75rem; }
.journal-planning .pl-col { display: flex; flex-direction: column; min-height: 0; position: relative; }
.journal-planning .pl-head { flex: none; }
.journal-planning .pl-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }  /* the whole column takes a drop */
.journal-planning .pl-empty { position: absolute; top: 3.1rem; left: .85rem; right: .85rem; pointer-events: none; }
