/* Lanewerk app chrome – Jurkovic Consulting tokens (aleas-board-research/design/tokens.css). */
:root {
  --jc-navy: #00234B; --jc-blue: #1376BF; --jc-cyan: #02BBEE; --jc-sky: #ADD8F4; --jc-mint: #00FFBA;
  --jc-text: #494949; --jc-bg: #F3F3F3; --jc-white: #FFFFFF; --muted: #5B6B7D; --line: #DDE5EC;
  --status-open: #1376BF; --status-done: #00C48C; --status-waiting: #F5A623; --status-cancelled: #D64545;
  --font-heading: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Roboto Flex", system-ui, sans-serif;
  --radius-pill: 50px; --radius-card: 14px; --shadow-card: 0 4px 16px rgba(0, 35, 75, 0.14);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: grid; grid-template-rows: 52px 48px 1fr; grid-template-columns: minmax(0, 1fr); background: var(--jc-bg); color: var(--jc-text); font: 14px/1.4 var(--font-body); overflow: hidden; }
[hidden] { display: none !important; }

button { font: 500 14px/1 var(--font-body); border-radius: var(--radius-pill); border: 2px solid var(--jc-cyan); background: var(--jc-white); color: var(--jc-blue); min-height: 36px; padding: 0 16px; cursor: pointer; }
button:hover { background: #E6F6FD; }
button.primary { background: var(--jc-blue); border-color: var(--jc-blue); color: var(--jc-white); }
button.primary:hover { background: #0F65A5; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--jc-cyan); outline-offset: 2px; }

/* top bar */
.bar { display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--jc-navy); color: var(--jc-white); min-width: 0; }
.brand { display: flex; align-items: center; }
.logo { display: block; height: 22px; width: auto; }
.board-name { min-width: 0; min-height: 32px; padding: 0 10px; margin-left: -10px; border: 0; border-radius: 8px; background: transparent; font: 500 15px/1 var(--font-heading); color: var(--jc-sky); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.board-name:hover { background: rgba(173, 216, 244, .14); }
.board-name-input { min-width: 0; width: min(360px, 40vw); min-height: 32px; padding: 0 10px; margin-left: -10px; border: 1.5px solid var(--jc-cyan); border-radius: 8px; background: rgba(255, 255, 255, .08); color: var(--jc-white); font: 500 15px var(--font-heading); }
.sync { flex: none; font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill); background: rgba(173, 216, 244, .16); color: var(--jc-sky); white-space: nowrap; }
.sync::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--jc-sky); vertical-align: 0; }
.sync[data-state="online"]::before { background: var(--jc-mint); }
.sync[data-state="offline"] { background: rgba(245, 166, 35, .2); color: #FFE2B0; }
.sync[data-state="offline"]::before { background: var(--status-waiting); }
.bar-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.bar-actions button { background: transparent; color: var(--jc-white); border-color: rgba(173, 216, 244, .5); }
.bar-actions button:hover { background: rgba(173, 216, 244, .14); }
.bar-actions button.primary { background: var(--jc-blue); border-color: var(--jc-blue); }

/* start page (board list) */
body.is-home .filters, body.is-home .stage, body.is-home .bar-actions > :not(.me), body.is-home .sync, body.is-home .ro-badge, body.is-home .board-name, body.is-home .filter-pop { display: none !important; }
body.is-signedout .bar-actions, body.is-signedout .views { display: none !important; }
.home { grid-row: 2 / 4; overflow: auto; min-height: 0; }
.home-inner { max-width: 1120px; margin: 0 auto; padding: 32px 16px 48px; display: grid; gap: 18px; }
.home-head { display: flex; align-items: baseline; gap: 14px; }
.home-head h1 { margin: 0; font: 550 32px/1.15 var(--font-heading); color: var(--jc-navy); }
.home-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.home-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.home-tools .search { flex: 1 1 260px; max-width: 360px; }
.home-tools .search input { background: var(--jc-white); }
.home-status:empty, .home-hint[hidden] { display: none; }
.home-status { margin: 0; color: var(--status-cancelled); }
.home-status.ok { color: var(--jc-navy); font-weight: 500; }
.home-hint { margin: 0; color: var(--muted); }
.tiles, .tiles-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tiles-list { display: contents; }
.tile { display: grid; align-content: start; gap: 8px; min-height: 140px; padding: 18px; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); color: inherit; text-decoration: none; border: 2px solid transparent; }
a.tile:hover { border-color: var(--jc-sky); }
a.tile:focus-visible { outline: 3px solid var(--jc-cyan); outline-offset: 2px; }
.tile-title { font: 550 18px/1.25 var(--font-heading); color: var(--jc-navy); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { font-size: 13px; color: var(--jc-text); }
.tile-when { margin-top: auto; font-size: 12px; color: var(--muted); }
.tile-new { border: 2px dashed var(--jc-cyan); box-shadow: none; background: rgba(255, 255, 255, .6); }
.tile-new .tile-title { color: var(--jc-blue); }
.tile-new button { justify-self: start; }

/* views nav (start page, my tasks) */
.views { display: none; gap: 4px; }
body.is-home .views { display: flex; }
.views a { padding: 7px 12px; border-radius: var(--radius-pill); color: var(--jc-sky); text-decoration: none; font: 500 14px/1 var(--font-body); }
.views a:hover { background: rgba(173, 216, 244, .14); }
.views a[aria-current="page"] { background: rgba(173, 216, 244, .2); color: var(--jc-white); }
.views a:focus-visible { outline: 3px solid var(--jc-cyan); outline-offset: 1px; }

/* my tasks */
.tasks-owner { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.task-list { display: grid; gap: 18px; }
.task-board { background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 6px 0 8px; }
.task-board-head { display: flex; align-items: baseline; gap: 12px; padding: 12px 18px 8px; }
.task-board-head h2 { margin: 0; font: 550 18px/1.25 var(--font-heading); color: var(--jc-navy); }
.task-board-open { margin-left: auto; font-size: 13px; color: var(--jc-blue); }
.task-rows { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: 12px 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 18px; color: var(--jc-navy); text-decoration: none; border-top: 1px solid var(--line); }
.task:hover { background: #F5F9FC; }
.task:focus-visible { outline: 3px solid var(--jc-cyan); outline-offset: -3px; }
.task-swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 35, 75, .18); }
.task .dot { margin: 0; }
.task-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-title.muted { color: var(--muted); font-style: italic; }
.task-points { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 8px; background: var(--jc-navy); color: var(--jc-white); font-size: 11px; font-weight: 600; line-height: 16px; vertical-align: 1px; }
.task-week { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.task-week.now { color: var(--jc-blue); font-weight: 600; }
.task-due { font-size: 12px; padding: 2px 8px; border-radius: 9px; background: var(--jc-bg); color: var(--jc-text); white-space: nowrap; }
.task-due.bad { background: var(--status-cancelled); color: var(--jc-white); }
@media (max-width: 760px) {
  .task { grid-template-columns: 12px 10px minmax(0, 1fr) auto; }
  .task-due { grid-column: 3 / 5; justify-self: start; }
}

/* filter bar */
.filters { display: flex; align-items: center; gap: 10px; padding: 0 16px; background: var(--jc-white); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.filters::-webkit-scrollbar { display: none; }
.search { position: relative; flex: 0 0 220px; }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 34px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); padding: 0 12px 0 32px; font: 14px var(--font-body); color: var(--jc-navy); background: var(--jc-bg); }
.search input:focus { background: var(--jc-white); border-color: var(--jc-cyan); }
.search input::placeholder { color: var(--muted); }
.filter-chips { display: flex; gap: 6px; flex: none; }
.filters .chip, .filter-btn, .filter-show, .filter-clear { flex: none; min-height: 30px; font-size: 13px; border-width: 1.5px; }
.filter-btn { padding: 0 12px; border-color: var(--line); color: var(--jc-navy); }
.filter-btn[data-active], .filter-select.active { border-color: var(--jc-blue); background-color: #E8F1F9; }
.filter-btn .badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 2px 5px; border-radius: 9px; background: var(--jc-blue); color: var(--jc-white); font-size: 11px; line-height: 14px; text-align: center; }
.filter-select { flex: none; min-height: 30px; border: 1.5px solid var(--line); border-radius: var(--radius-pill); padding: 0 30px 0 12px; font: 500 13px var(--font-body); color: var(--jc-navy); background: var(--jc-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235B6B7D' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 10px 6px; appearance: none; cursor: pointer; }
.filter-result { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter-show { padding: 0 12px; }
.filter-clear { padding: 0 12px; }
.filter-clear:disabled { border-color: var(--line); color: var(--muted); background: transparent; cursor: default; }
.filter-clear:not(:disabled) { background: var(--jc-blue); border-color: var(--jc-blue); color: var(--jc-white); }
.filter-pop { position: fixed; width: 260px; z-index: 20; }
.chip.owner-chip::before { display: none; }
.owner-chip { padding: 0 10px; font-weight: 600; letter-spacing: .02em; }

/* frame editor (side panel) */
.frame-editor { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100% - 24px)); overflow: auto; z-index: 6; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.fe-form { display: grid; gap: 14px; padding: 18px; }
.fe-title { margin: 0; font: 550 20px/1.2 var(--font-heading); color: var(--jc-navy); }
.fe-field { display: grid; gap: 6px; min-width: 0; }
.fe-group { display: grid; gap: 10px; margin: 0; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; min-width: 0; }
.fe-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fe-check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--jc-navy); }
.fe-check input { width: 18px; height: 18px; accent-color: var(--jc-blue); }
.fe-lanes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fe-lane { display: grid; grid-template-columns: minmax(0, 1fr) 68px repeat(3, 32px); gap: 4px; }
#fe-lanes .fe-lane { grid-template-columns: minmax(0, 1fr) 68px 64px repeat(3, 32px); }
.fe-cap { padding-left: 8px; padding-right: 4px; }
.fe-inline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fe-inline .fe-size { width: 76px; }
.fe-size { padding-left: 6px; padding-right: 4px; }
.fe-icon { min-height: 36px; padding: 0; border-width: 1.5px; border-color: var(--line); color: var(--jc-navy); border-radius: 8px; }
.fe-icon:disabled { opacity: .35; cursor: default; }
.fe-error { margin: 0; color: var(--status-cancelled); font-weight: 500; }
.fe-error:empty { display: none; }
.fe-actions { display: flex; gap: 8px; }

/* presence */
.bar-actions { align-items: center; }
.people { display: flex; align-items: center; margin-right: 2px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--jc-navy); box-shadow: 0 0 0 1px rgba(173, 216, 244, .55); margin-left: -5px; color: var(--jc-white); font: 600 9.5px/1 var(--font-body); }
.avatar:first-child { margin-left: 0; }
.avatar.more { background: rgba(173, 216, 244, .25); color: var(--jc-sky); }
.bar-actions button.me { width: 34px; min-height: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--jc-mint); font: 600 9.5px/1 var(--font-body); color: var(--jc-white); }
.me-pop { position: fixed; width: 260px; z-index: 20; }
.cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.cursor { position: absolute; left: 0; top: 0; will-change: transform; }
.cursor svg { display: block; width: 16px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.cursor-label { position: absolute; left: 12px; top: 16px; padding: 2px 7px; border-radius: 9px; color: var(--jc-white); font: 600 11px/1.4 var(--font-body); white-space: nowrap; }

/* stage */
.stage { position: relative; overflow: hidden; min-height: 0; }
#lw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; outline: none; }
.lasso { position: absolute; left: 0; top: 0; border: 1.5px solid var(--jc-cyan); background: rgba(2, 187, 238, .1); pointer-events: none; transform-origin: 0 0; }
.editor { position: absolute; left: 0; top: 0; transform-origin: 0 0; resize: none; border: 0; outline: 2px solid var(--jc-cyan); padding: 5px 6px; margin: 0; font: 12px/15px var(--font-body); color: var(--jc-navy); background: rgba(255, 255, 255, .92); border-radius: 0 0 4px 4px; }

.menu { position: absolute; left: 0; top: 0; width: 260px; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 12px; display: grid; gap: 12px; z-index: 5; }
.menu-section { display: grid; gap: 6px; }
.menu-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 30px; padding: 0 10px 0 8px; font-size: 13px; border-width: 1.5px; border-color: var(--line); color: var(--jc-navy); }
.chip::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--dot); }
.chip[aria-pressed="true"] { border-color: var(--jc-blue); background: #E8F1F9; }
.swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.swatch { min-height: 28px; padding: 0; border-radius: 6px; border: 1px solid rgba(0, 35, 75, .15); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--jc-blue); outline-offset: 1px; }
.field { font: 14px var(--font-body); color: var(--jc-navy); border: 1.5px solid var(--line); border-radius: 8px; min-height: 36px; padding: 0 10px; width: 100%; }
.menu-action { width: 100%; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.menu-action.danger { border-color: #F2B8B8; color: var(--status-cancelled); }
.menu-hint { font-size: 12px; color: var(--muted); }

.empty { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 28px; display: grid; gap: 12px; }
.empty h1 { margin: 0; font: 550 26px/1.2 var(--font-heading); color: var(--jc-navy); }
.empty p { margin: 0; }
.empty button { justify-self: start; }

.zoom { position: absolute; left: 16px; bottom: 16px; display: flex; align-items: center; gap: 6px; background: var(--jc-white); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); padding: 6px; }
.zoom button { min-height: 32px; padding: 0 12px; border-width: 1.5px; }
.zoom span { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; color: var(--jc-navy); }
.dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 12px; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 10px 14px; }
.pad { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 4px; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: grab; }
.pad:hover { transform: translateY(-2px); }
.ghost { position: fixed; left: 0; top: 0; border-radius: 4px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); pointer-events: none; opacity: .9; z-index: 10; }
.info { position: absolute; right: 16px; bottom: 16px; margin: 0; display: flex; gap: 14px; background: var(--jc-white); border-radius: var(--radius-pill); box-shadow: var(--shadow-card); padding: 10px 16px; }
.info div { display: flex; gap: 6px; align-items: baseline; }
.info dt { color: var(--muted); font-size: 12px; }
.info dd { margin: 0; font-weight: 600; color: var(--jc-navy); font-variant-numeric: tabular-nums; }
.info .total, .info .progress { padding-left: 14px; border-left: 1px solid var(--line); }
.info .progress dd { color: var(--status-done); }
.info .conflicts button { min-height: 0; padding: 0; border: 0; background: none; color: var(--status-cancelled); font: 600 12px var(--font-body); text-decoration: underline; text-underline-offset: 2px; }
.info .conflicts dd { color: var(--status-cancelled); }
.menu-hint.conflict { color: var(--status-cancelled); font-weight: 500; }
.chip.link-kind::before { display: none; }
.chip.link-kind { padding: 0 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot.open { background: var(--status-open); } .dot.done { background: var(--status-done); } .dot.waiting { background: var(--status-waiting); } .dot.cancelled { background: var(--status-cancelled); }
.boot { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: var(--muted); }
.boot.error { color: var(--status-cancelled); max-width: 520px; text-align: center; }

@media (max-width: 760px) {
  .bar-actions button:not(.primary):not(.me) { display: none; }
  .search { flex-basis: 160px; }
  .bar { gap: 10px; }
  .people { display: none; }
  .sync { font-size: 0; padding: 6px; }
  .sync::before { margin-right: 0; }
  .dock { bottom: 76px; }
  .info { display: none; }
  .dock { left: auto; right: 16px; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .pad:hover { transform: none; } }
.board-name.unnamed { color: rgba(173, 216, 244, .75); }
.board-name-input:focus-visible { outline: none; }

/* accounts: read-only boards, account menu, sign-in, people admin, sharing */
.ro-badge { flex: none; font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill); background: rgba(0, 255, 186, .14); color: var(--jc-mint); white-space: nowrap; }
body.is-readonly .dock, body.is-readonly #lw-undo, body.is-readonly #lw-redo, body.is-readonly #lw-add-frame { display: none !important; }
body.is-readonly .board-name { cursor: default; }
body.is-readonly .board-name:hover { background: transparent; }
.me-account { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.me-account a { color: var(--jc-blue); font-weight: 500; text-decoration: none; }
.me-account a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0, 35, 75, .55); }
.welcome { width: min(460px, 100%); }
.welcome h1 { font-size: 26px; }
.welcome button { justify-self: start; }

/* KI-Zugang (ai.ts) */
.home-inner.ai { max-width: 820px; }
.ai-lead { margin: 0; color: var(--jc-text); max-width: 70ch; }
.ai-section { gap: 12px; }
.ai-h2 { margin: 0; font: 550 18px/1.25 var(--font-heading); color: var(--jc-navy); }
.ai-new { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ai-tokens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ai-token { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--jc-bg); }
.ai-token-info { display: grid; gap: 2px; min-width: 0; }
.ai-token-info strong { color: var(--jc-navy); overflow-wrap: anywhere; }
.ai-step { margin: 4px 0 0; font-weight: 500; color: var(--jc-navy); }
.ai-code { position: relative; }
.ai-code pre { margin: 0; padding: 12px 14px; padding-right: 96px; border-radius: 10px; background: var(--jc-navy); color: #E6F6FD; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-code-copy { position: absolute; top: 8px; right: 8px; min-height: 28px; padding: 0 10px; font-size: 12px; background: transparent; color: var(--jc-sky); border-color: rgba(173, 216, 244, .5); }
.ai-code-copy:hover { background: rgba(173, 216, 244, .14); }
.me-ai { display: block; color: var(--jc-blue); font-weight: 500; text-decoration: none; padding: 4px 0; }
.me-ai:hover { text-decoration: underline; }
@media (max-width: 560px) { .ai-new { grid-template-columns: minmax(0, 1fr); } }
.home-inner.narrow { max-width: 560px; padding-top: 12vh; }
/* OAuth consent (connect.ts) */
.connect { gap: 14px; }
.connect-lead { font-size: 17px; color: var(--jc-text); }
.connect-lead strong { color: var(--jc-navy); }
.connect-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--jc-text); }
.connect-warn { padding: 10px 12px; border-radius: 10px; background: #FFF6E5; color: #7A4B00; font-size: 14px; }
.connect-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-page { background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 28px; display: grid; gap: 12px; }
.card-page h1 { margin: 0; font: 550 28px/1.2 var(--font-heading); color: var(--jc-navy); }
.card-page p { margin: 0; }
.card-error { color: var(--status-cancelled); font-weight: 500; }
.card-link { justify-self: start; color: var(--jc-blue); font-weight: 500; }

.pp-invite { display: grid; gap: 8px; padding: 16px 18px; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.pp-invite-row { display: grid; grid-template-columns: minmax(160px, 2fr) minmax(70px, 90px) minmax(160px, 2fr) auto auto; gap: 8px; align-items: center; }
.pp-link { display: grid; gap: 8px; padding: 14px 18px; border-radius: var(--radius-card); background: #E6FFF7; border: 1.5px solid var(--jc-mint); }
.pp-link p { margin: 0; color: var(--jc-navy); }
.pp-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pp-link-row .field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--jc-white); }
.pp-table-wrap { overflow-x: auto; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.pp-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.pp-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 8px; }
.pp-table th:first-child, .pp-table td:first-child { padding-left: 18px; width: 52px; }
.pp-table td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.pp-table td:last-child { padding-right: 18px; text-align: right; }
.pp-table td:nth-child(3) { width: 90px; }
.pp-table td:nth-child(5), .pp-table td:nth-child(6), .pp-table th:nth-child(5), .pp-table th:nth-child(6) { text-align: center; width: 96px; }
.pp-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--jc-blue); }
.pp-table td:nth-child(2) { display: flex; align-items: center; gap: 8px; }
.pp-table tr.off .field, .pp-table tr.off .avatar { opacity: .5; }
.pp-table .avatar { margin-left: 0; border-color: var(--jc-white); box-shadow: none; }
.pp-link-btn { min-height: 32px; font-size: 13px; border-width: 1.5px; white-space: nowrap; }
.pp-link-btn:disabled { opacity: .4; cursor: default; }
.pp-you { flex: none; padding: 2px 8px; border-radius: 9px; background: var(--jc-bg); color: var(--muted); font-size: 12px; }
@media (max-width: 760px) {
  .pp-invite-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .pp-invite-row .field[type="email"] { grid-column: 1 / -1; }
}

.share-head { display: flex; align-items: center; gap: 8px; }
.share-head .fe-title { flex: 1; }
.share-close { width: 36px; font-size: 20px; }
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.share-member { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.share-member:first-child { border-top: 0; }
.share-member .avatar { margin-left: 0; border-color: var(--jc-white); box-shadow: none; }
.share-name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--jc-navy); font-weight: 500; }
.share-role { font-size: 13px; color: var(--muted); }
.share-add-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.share-add-row button { grid-column: 1 / -1; justify-self: start; }

/* card details */
.details-panel { border-top: 8px solid var(--card, var(--jc-sky)); }
.details .d-title { min-height: 56px; padding: 8px 10px; resize: none; font: 500 15px/1.35 var(--font-body); }
.details .d-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; } /* owner + due, points below */
.field[aria-invalid="true"] { border-color: var(--status-cancelled); }
.details .d-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.details .d-open { color: var(--jc-blue); font-weight: 500; text-decoration: none; padding: 0 4px; }
.details .d-open:hover { text-decoration: underline; }
/* rich text description (rich.ts): own toolbar, Quill core editor */
.rt { display: grid; gap: 6px; min-width: 0; }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 3px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--jc-bg); }
.rt-btn { min-height: 28px; min-width: 26px; padding: 0 5px; border: 0; border-radius: 6px; background: transparent; color: var(--jc-navy); font: 600 13px/1 var(--font-body); display: inline-grid; place-items: center; }
.rt-btn:hover { background: var(--jc-white); }
.rt-btn[aria-pressed="true"] { background: var(--jc-white); color: var(--jc-blue); box-shadow: inset 0 0 0 1.5px var(--jc-cyan); }
.rt-btn.rt-h { font-family: var(--font-heading); font-size: 12.5px; }
.rt-btn.rt-i { font-style: italic; font-family: Georgia, serif; font-size: 15px; }
.rt-btn.rt-u { text-decoration: underline; }
.rt-btn.rt-s { text-decoration: line-through; }
.rt-sep { width: 1px; height: 18px; margin: 0 2px; background: var(--line); }
.rt-linkbox { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.rt-linkbox button { min-height: 32px; padding: 0 12px; }
.rt-status { margin: 0; font-size: 12.5px; color: var(--muted); }
.rt-status:empty { display: none; }
.rt-host { position: relative; border: 1.5px solid var(--line); border-radius: 8px; background: var(--jc-white); }
.rt-host:focus-within { border-color: var(--jc-cyan); box-shadow: 0 0 0 2px rgba(2, 187, 238, .25); }
.details .rt-host.ql-disabled { background: var(--jc-bg); }
.rt .ql-editor { min-height: 120px; max-height: min(52vh, 520px); overflow-y: auto; padding: 8px 10px; outline: none; font: 14px/1.45 var(--font-body); color: var(--jc-text); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; counter-reset: rt-list; }
.rt .ql-editor > * { cursor: text; }
.rt .ql-editor p, .rt .ql-editor ol, .rt .ql-editor blockquote, .rt .ql-editor h1, .rt .ql-editor h2, .rt .ql-editor h3 { margin: 0; padding: 0; }
.rt .ql-editor p, .rt .ql-editor h1, .rt .ql-editor h2, .rt .ql-editor h3, .rt .ql-editor blockquote { counter-set: rt-list; }
.rt .ql-editor h1, .rt .ql-editor h2, .rt .ql-editor h3 { font-family: var(--font-heading); color: var(--jc-navy); line-height: 1.25; }
.rt .ql-editor h1 { font-size: 18px; margin-top: 4px; }
.rt .ql-editor h2 { font-size: 15.5px; margin-top: 2px; }
.rt .ql-editor h3 { font-size: 14.5px; }
.rt .ql-editor blockquote { border-left: 3px solid var(--jc-sky); padding-left: 10px; color: var(--muted); }
.rt .ql-editor code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--jc-bg); border-radius: 4px; padding: 1px 4px; }
.rt .ql-editor a { color: var(--jc-blue); }
.rt .ql-editor img { max-width: 100%; height: auto; border-radius: 6px; vertical-align: bottom; }
.rt .ql-editor ol { padding-left: 4px; }
.rt .ql-editor li { list-style-type: none; position: relative; padding-left: 1.6em; }
.rt .ql-editor li > .ql-ui { position: absolute; left: 0; width: 1.3em; text-align: right; }
.rt .ql-editor li > .ql-ui::before { content: ""; }
.rt .ql-editor li[data-list="bullet"] > .ql-ui::before { content: "\2022"; color: var(--jc-blue); }
.rt .ql-editor li[data-list="ordered"] { counter-increment: rt-list; }
.rt .ql-editor li[data-list="ordered"] > .ql-ui::before { content: counter(rt-list) "."; color: var(--jc-blue); font-variant-numeric: tabular-nums; }
.rt .ql-editor li[data-list="checked"] > .ql-ui::before { content: "\2611"; color: var(--status-done); }
.rt .ql-editor li[data-list="unchecked"] > .ql-ui::before { content: "\2610"; color: var(--muted); }
.rt .ql-editor li[data-list="checked"] { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(91, 107, 125, .5); }
.rt .ql-container:not(.ql-disabled) li[data-list="checked"] > .ql-ui, .rt .ql-container:not(.ql-disabled) li[data-list="unchecked"] > .ql-ui { cursor: pointer; }
.rt .ql-editor.ql-blank::before { content: attr(data-placeholder); position: absolute; left: 10px; right: 10px; color: var(--muted); font-style: italic; pointer-events: none; }
.details .field:disabled, .details .chip:disabled, .details .swatch:disabled { opacity: .75; cursor: default; background-color: var(--jc-bg); }
.details #lw-d-week:empty { display: none; }
.chip.plain::before { display: none; }
.chip.plain { padding: 0 10px; }
.menu-edit { padding-top: 2px; }

/* short messages (export, clipboard) */
.toast { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); margin: 0; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--jc-navy); color: var(--jc-white); box-shadow: var(--shadow-card); font-size: 13px; z-index: 8; max-width: calc(100% - 32px); }
.toast.error { background: var(--status-cancelled); }
/* mid-size screens: zoom bar and infobar need the whole bottom edge, the dock moves up */
@media (max-width: 1240px) and (min-width: 761px) { .dock { bottom: 76px; } }
/* meeting timer (E4): top left on the board */
.timer { position: absolute; left: 12px; top: 12px; z-index: 7; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--jc-white); box-shadow: var(--shadow-card); }
.timer button { min-height: 32px; border: 0; background: transparent; color: var(--jc-navy); border-radius: var(--radius-pill); }
.timer button:hover:not(:disabled) { background: var(--jc-bg); }
.timer-open { width: 32px; padding: 0; display: grid; place-items: center; }
.timer-open svg { width: 17px; height: 17px; }
.timer-time { padding: 0 8px; font: 600 16px/1 var(--font-body); font-variant-numeric: tabular-nums; min-width: 64px; }
.timer-icon { width: 30px; padding: 0; font-size: 13px; }
.timer[data-state="paused"] .timer-time { color: var(--muted); }
.timer.over .timer-time { color: var(--status-cancelled); }
.timer[data-state="running"] { box-shadow: var(--shadow-card), 0 0 0 2px var(--jc-cyan); }
.timer.over[data-state="running"] { box-shadow: var(--shadow-card), 0 0 0 2px var(--status-cancelled); }
.timer-pop { position: absolute; left: 12px; top: 56px; z-index: 8; width: min(330px, calc(100% - 24px)); }
.timer-own { display: flex; gap: 8px; }
.timer-own .field { flex: 1; }
/* presentation mode (E3): a frame around the board, a banner at the top */
.stage.presenting::after, .stage.following::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; border: 4px solid var(--jc-cyan); }
.stage.following::after { border-width: 3px; border-color: rgba(2, 187, 238, .45); }
.present { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: var(--radius-pill); background: var(--jc-navy); color: var(--jc-white); box-shadow: var(--shadow-card); font-size: 13px; font-weight: 500; max-width: calc(100% - 32px); }
.present button { min-height: 30px; padding: 0 14px; border-color: rgba(255, 255, 255, .5); color: var(--jc-white); background: transparent; }
.present button:hover { background: rgba(255, 255, 255, .12); }
.avatar.presenter { box-shadow: 0 0 0 2px var(--jc-cyan); }
.bar-actions #lw-present-toggle[aria-pressed="true"] { background: var(--jc-cyan); border-color: var(--jc-cyan); color: var(--jc-navy); }

/* start page: tabs, favourites, tile actions, list view */
.tile-box { position: relative; display: grid; }
.tile-box .tile { padding-right: 64px; }
.tile-icon { position: absolute; top: 10px; min-height: 30px; width: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; }
.tile-icon:hover { background: var(--jc-bg); color: var(--jc-navy); }
.tile-star { right: 42px; }
.tile-more { right: 10px; font-weight: 700; }
.tile-box.fav .tile-star { color: var(--status-waiting); }
.tile-box.fav .tile { border-color: rgba(245, 166, 35, .45); }
.tile-menu { width: 240px; z-index: 30; }
button.danger-solid { background: var(--status-cancelled); border-color: var(--status-cancelled); color: var(--jc-white); }
button.danger-solid:hover { background: #B93838; }
button.plain-action { border-color: var(--line); color: var(--jc-navy); }
.tile-box.trashed .tile { border-style: dashed; border-color: var(--line); box-shadow: none; background: rgba(255, 255, 255, .7); }
.tile-box.trashed .tile-title { color: var(--muted); }
.tile-restore { justify-self: start; min-height: 32px; }
.tiles.as-list .tile-box.trashed .tile { grid-template-columns: minmax(0, 1fr) auto auto auto; padding-right: 18px; }
.tiles.as-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tiles.as-list .tile { min-height: 0; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 16px; padding: 12px 84px 12px 18px; }
.tiles.as-list .tile-title { -webkit-line-clamp: 1; font-size: 16px; }
.tiles.as-list .tile-when { margin-top: 0; white-space: nowrap; }
.tiles.as-list .tile-icon { top: 50%; transform: translateY(-50%); }
.tiles.as-list .tile-new { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; min-height: 0; }
.tiles.as-list .tile-new .tile-title { grid-column: 1 / -1; }
#lw-home-new select.field { min-height: 36px; }
.archived-badge { background: rgba(245, 166, 35, .18); color: #FFE2B0; }
body.is-home .archived-badge { display: none !important; }
.details .d-people { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.details .d-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; border-radius: var(--radius-pill); background: var(--jc-bg); color: var(--jc-navy); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.details .d-dot { width: 10px; height: 10px; border-radius: 50%; }
.details .d-person-x { min-height: 20px; width: 20px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; border-radius: 50%; }
.details .d-person-x:hover { background: var(--line); color: var(--jc-navy); }
.details #lw-d-person { max-width: 160px; text-transform: uppercase; }
.task-role { margin-left: 8px; padding: 1px 7px; border-radius: 9px; background: var(--jc-bg); color: var(--muted); font-size: 11px; font-weight: 600; }
.pad { color: rgba(0, 35, 75, .7); font: 700 10px/1 var(--font-body); letter-spacing: .03em; }

/* board map + fullscreen (B2) */
.map { position: absolute; left: 16px; bottom: 72px; padding: 6px; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); z-index: 3; }
.map canvas { display: block; border-radius: 8px; background: var(--jc-bg); cursor: pointer; touch-action: none; }
.map-views { width: 220px; display: grid; gap: 6px; margin-top: 8px; }
.views-head { display: flex; align-items: center; justify-content: space-between; }
.view-add { min-height: 26px; padding: 0 10px; font-size: 12px; }
.views-form { display: flex; gap: 6px; }
.views-form .field { flex: 1; min-width: 0; min-height: 32px; font-size: 13px; }
.views-form button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.views-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 180px; overflow: auto; }
.view-item { display: grid; grid-template-columns: minmax(0, 1fr) 26px 26px; align-items: center; gap: 2px; }
.view-item button { min-height: 28px; border: 0; background: transparent; color: var(--jc-navy); border-radius: 8px; }
.view-item button:hover:not(:disabled) { background: var(--jc-bg); }
.view-go { text-align: left; padding: 0 8px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-icon { padding: 0; font-size: 13px; }
.view-item.default .view-icon[aria-pressed="true"] { color: var(--status-waiting); }
.view-item button:disabled { opacity: .4; cursor: default; }
.map-views .menu-hint { margin: 0; font-size: 12px; }
.zoom button[aria-pressed="true"] { background: #E8F1F9; border-color: var(--jc-blue); }
@media (max-width: 760px) { .map { bottom: 128px; } #lw-fullscreen { display: none; } }

/* radar (F7/I2/X4): all boards on one week timeline */
.home-inner.wide { max-width: 1480px; }
.radar-range { font-size: 14px; font-weight: 600; color: var(--jc-navy); font-variant-numeric: tabular-nums; }
.radar-pick { display: flex; align-items: baseline; gap: 10px; }
.radar-pick .menu-title { flex: none; width: 78px; }
.filter-chips.wrap { flex-wrap: wrap; flex: 1; }
.radar-scroll { overflow-x: auto; background: var(--jc-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.radar-grid { display: grid; min-width: calc(180px + var(--weeks, 12) * 132px); }
.radar-row { display: grid; grid-template-columns: 180px repeat(var(--weeks, 12), minmax(132px, 1fr)); border-top: 1px solid var(--line); }
.radar-head { border-top: 0; position: sticky; top: 0; background: var(--jc-white); z-index: 1; }
.radar-label { padding: 10px 12px; font-weight: 600; color: var(--jc-navy); overflow-wrap: anywhere; display: flex; align-items: baseline; gap: 6px; justify-content: space-between; border-right: 1px solid var(--line); }
.radar-head .radar-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.radar-n { font-size: 12px; font-weight: 500; color: var(--muted); }
.radar-week { padding: 8px 10px; display: grid; gap: 2px; border-right: 1px solid var(--line); }
.radar-week strong { font-size: 13px; color: var(--jc-navy); }
.radar-week span { font-size: 11px; color: var(--muted); }
.radar-week.now { background: #E6F6FD; }
.radar-week.now strong { color: var(--jc-blue); }
.radar-cell { padding: 6px; display: grid; align-content: start; gap: 4px; border-right: 1px solid var(--line); min-height: 44px; }
.radar-cell.now { background: rgba(2, 187, 238, .05); }
.radar-load { display: grid; gap: 3px; padding: 2px 2px 4px; }
.radar-load-bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--load) var(--fill), rgba(0, 35, 75, .08) var(--fill)); }
.radar-load-text { font-size: 11px; font-weight: 600; color: var(--load); font-variant-numeric: tabular-nums; }
.radar-card { display: grid; gap: 2px; padding: 5px 7px 5px 9px; border-radius: 6px; background: var(--card); border-left: 4px solid var(--dot); color: var(--jc-text); text-decoration: none; box-shadow: 0 1px 2px rgba(0, 35, 75, .12); }
.radar-card:hover { outline: 2px solid var(--jc-sky); }
.radar-card:focus-visible { outline: 3px solid var(--jc-cyan); }
.radar-card.by-due { border-style: dashed; border-left-style: solid; outline: 1px dashed rgba(0, 35, 75, .3); outline-offset: -1px; }
.radar-card.closed { opacity: .6; }
.radar-title { font-size: 12.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.radar-meta { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* card history (C11) in the details panel */
.d-history { display: grid; gap: 6px; }
.d-history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.d-history-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 12.5px; }
.d-history-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-history-who { font-weight: 600; color: var(--jc-navy); white-space: nowrap; }
.d-history-what { color: var(--jc-text); overflow-wrap: anywhere; }

/* person colours (A4/K4) in the account menu */
.me-colors { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.me-colors .me-auto { grid-column: 1 / -1; justify-self: start; }
