@font-face {
  font-family: Archivo;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/archivo-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: Archivo;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/archivo-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
}

:root {
  --ink: #1d1930;
  --muted: #625e75;
  --faint: #716b85;
  --page: #f6f5fa;
  --sheet: #f9f8fc;
  --sheet-2: #fff;
  --rule: #dedbe8;
  --rule-soft: #ebe8f1;
  --chrome: #19142c;
  --chrome-2: #302748;
  --chrome-ink: #fff;
  --chrome-sub: #c3bad5;
  --blue: #6337cb;
  --blue-ink: #5127b3;
  --lila: #663ace;
  --lila-ink: #5029ac;
  --lila-bg: #f0eafe;
  --paper: #fff;
  --paper-edge: #dedbe8;
  --ok: #17684d;
  --warn: #a56a11;
  --bad: #b52e47;
  --focus: #8056dd;
  --board: #5b48c5;
  --c-blau: #325dbb; --c-lila: #7045c2; --c-gruen: #23734d; --c-gelb: #f1c752; --c-orange: #ad4b19;
  --c-rot: #b52e47; --c-tuerkis: #16717b; --c-grau: #6a6479; --c-rosa: #a93972; --c-braun: #845638;
  --sans: Archivo, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --top-height: 66px;
  --elevation: 0 16px 48px rgba(32, 18, 60, .15), 0 3px 8px rgba(32, 18, 60, .07);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--page); color: var(--ink); font: 400 14px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.boot { padding: 40px; color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 13px; border: 1px solid var(--rule); background: var(--sheet-2); border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--sheet); border-color: #bfb6d3; }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.lila { background: var(--lila); border-color: var(--lila); color: #fff; }
.btn.primary:hover, .btn.lila:hover { background: var(--lila-ink); border-color: var(--lila-ink); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.quiet { background: transparent; border-color: transparent; }
.btn.quiet:hover, .iconbtn:hover { background: var(--lila-bg); color: var(--lila-ink); }
.btn.small { min-height: 32px; padding: 0 9px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: inherit; position: relative; }
input[type=text], input[type=search], input[type=date], input[type=time], input[type=number], select, textarea { border: 1px solid var(--rule); background: var(--sheet-2); border-radius: 8px; padding: 7px 10px; min-height: 38px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
label.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--lila); margin: 0; }

/* Navigation */
.top { height: var(--top-height); display: flex; align-items: center; gap: 10px; padding: 0 clamp(16px, 3vw, 42px); background: var(--chrome); color: var(--chrome-ink); position: sticky; top: 0; z-index: 30; }
.mark, .entry-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; font-size: 17px; letter-spacing: -.025em; }
.mark { margin-right: 18px; }
.brand-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #9b75ff, #653cd0 78%); box-shadow: inset 0 1px 0 #ffffff45; flex: none; }
.brand-icon svg { width: 19px; height: 19px; }
.top nav { display: flex; gap: 3px; min-width: 0; }
.top nav a { display: flex; align-items: center; gap: 6px; color: var(--chrome-sub); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.top nav a:hover, .top nav a.on, .top .iconbtn:hover, .me:hover { color: #fff; background: var(--chrome-2); }
.top nav a.on svg { color: #c9abff; }
.top .grow { flex: 1; }
.count { display: inline-block; min-width: 18px; padding: 1px 5px; background: var(--lila); color: #fff; font: 500 11px/16px var(--mono); text-align: center; border-radius: 20px; }
.top .iconbtn .count { position: absolute; top: 0; right: -3px; }
.search { position: relative; width: clamp(150px, 19vw, 280px); }
.search input { background: #251e3a; border-color: #423754; color: #fff; padding-left: 35px; padding-right: 30px; }
.search input::placeholder { color: var(--chrome-sub); }
.search svg { position: absolute; left: 11px; top: 11px; color: var(--chrome-sub); pointer-events: none; }
.search kbd { position: absolute; right: 9px; top: 9px; font: 400 11px/17px var(--mono); color: var(--chrome-sub); border: 1px solid #55466d; padding: 0 5px; border-radius: 4px; pointer-events: none; }
.me { display: grid; place-items: center; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 3px; border-radius: 50%; }
.me .av.s { width: 29px; height: 29px; }
.av { width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 500; color: #fff; background: var(--blue); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.s { width: 23px; height: 23px; font-size: 10px; }
.av.l { width: 44px; height: 44px; font-size: 16px; }
.avs { display: flex; }
.avs .av { margin-left: -4px; box-shadow: 0 0 0 2px var(--paper); }
.avs .av:first-child { margin-left: 0; }

.pop { position: absolute; z-index: 120; background: var(--sheet-2); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--elevation); min-width: 240px; max-width: min(420px, calc(100vw - 16px)); }
.pop header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 15px; border-bottom: 1px solid var(--rule-soft); font-weight: 700; }
.pop .body { padding: 12px 14px; max-height: 60vh; overflow: auto; }
.pop .menu { padding: 5px; }
.pop .menu button, .pop .menu a { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: 7px; background: none; border: 0; cursor: pointer; color: var(--ink); text-decoration: none; }
.pop .menu button:hover, .pop .menu a:hover, .note:hover, .result:hover, .result.sel { background: var(--lila-bg); }
.pop .menu hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 4px 0; }
.pop .menu .danger { color: var(--bad); }
.pop .hint { color: var(--muted); font-size: 13px; }
.notes, .results { width: 400px; }
.note { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); }
.note .dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; }
.note.new .dot { background: var(--lila); }
.note small { display: block; color: var(--muted); font-size: 12px; }
.result { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--rule-soft); }
.result small { color: var(--muted); font-size: 12px; }
.result .n { font: 400 12px/1 var(--mono); color: var(--faint); margin-right: 6px; }

/* Board directory */
.page { max-width: 1250px; margin: 0 auto; padding: clamp(28px, 5vw, 66px) clamp(18px, 4vw, 48px) 65px; }
.page h1 { font-size: clamp(32px, 4vw, 49px); line-height: 1.06; letter-spacing: -.037em; margin: 0 0 9px; overflow-wrap: anywhere; }
.page .lead { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.home-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding: clamp(24px, 4vw, 44px); border: 1px solid #e8defc; border-radius: 20px; background: radial-gradient(ellipse at 98% 0%, #e1d3ff, transparent 70%), linear-gradient(120deg, #fff, #f3edfe); }
.home-header .lead { margin: 0; }
.home-header .btn { min-height: 43px; padding-inline: 16px; }
.sec-h { display: flex; align-items: center; gap: 14px; margin: 31px 0 13px; font-size: 15px; font-weight: 700; }
.sec-h::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.sec-h:first-child { margin-top: 0; }
.empty { color: var(--muted); background: #ffffff9e; padding: 27px 18px; border: 1px dashed #c9c1d9; border-radius: 12px; text-align: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--rule); border-radius: 15px; position: relative; box-shadow: 0 2px 6px #21132f08; transition: box-shadow .18s, border-color .18s; }
.tile:hover, .tile:focus-within { border-color: color-mix(in srgb, var(--board) 45%, white); box-shadow: 0 8px 20px #21132f10; }
.tile-link { display: grid; align-content: end; grid-template-columns: 1fr auto; gap: 9px 7px; height: 100%; padding: 19px; text-decoration: none; color: inherit; border-radius: inherit; }
.tile-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: color-mix(in srgb, var(--board) 12%, white); color: var(--board); }
.tile-symbol svg { width: 21px; height: 21px; }
.tile-title { grid-column: 1 / -1; margin-top: 6px; font-size: 18px; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tile .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.tile .meta .mine { color: var(--lila-ink); font-weight: 500; }
.tile .flags { position: absolute; top: 13px; right: 13px; display: flex; align-items: center; gap: 4px; color: var(--muted); }
.tile-arrow { align-self: center; color: var(--board); }
.b-blau { --board: #345abd; } .b-lila { --board: #7045c2; } .b-petrol { --board: #1a707f; }
.b-gruen { --board: #297255; } .b-rot { --board: #a13d56; } .b-grau { --board: #625e75; }

/* Board workspace */
.boardpage { position: fixed; inset: var(--top-height) 0 0; display: flex; flex-direction: column; background: linear-gradient(160deg, color-mix(in srgb, var(--board) 9%, white), var(--page) 66%); }
.bbar { display: flex; align-items: center; gap: 8px; padding: 17px clamp(16px, 3vw, 42px); color: var(--ink); background: #ffffffed; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.board-heading { display: flex; gap: 12px; align-items: center; min-width: 0; }
.board-heading .tile-symbol { flex: none; }
.board-name { min-width: 0; }
.board-name > a { display: block; width: max-content; color: var(--muted); font-size: 12px; text-decoration: none; }
.board-name > a:hover { color: var(--lila-ink); text-decoration: underline; }
.bbar h1 { margin: 1px 0 0; font-size: clamp(20px, 2.4vw, 29px); line-height: 1.12; letter-spacing: -.032em; overflow-wrap: anywhere; }
.bbar h1.editable { cursor: text; }
.bbar h1.editable:hover { color: var(--board); }
.bbar .sep { width: 1px; height: 22px; background: var(--rule); margin: 0 3px; }
.bbar .vis { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: 20px; }
.bbar .vis.archived { color: #80510b; background: #fff3da; }
.bbar .filteron { background: var(--lila-bg); color: var(--lila-ink); }
.bbar input.title-edit { font-size: 20px; font-weight: 700; max-width: 100%; }
.star.on svg { fill: #f3c04b; stroke: #946200; }
.lanes { flex: 1; min-height: 0; display: flex; align-items: flex-start; gap: 16px; padding: 24px clamp(16px, 3vw, 42px); overflow-x: auto; overflow-y: hidden; }
.lane, .newlane { flex: none; width: clamp(248px, 17.5vw, 316px); }
.lane { max-height: 100%; display: flex; flex-direction: column; background: color-mix(in srgb, var(--board) 7%, #faf9fc); border-radius: 15px; border: 1px solid color-mix(in srgb, var(--board) 13%, #eeebf3); }
.lane.ghost-lane { opacity: .35; }
.tape { display: flex; align-items: center; gap: 7px; padding: 11px 9px 9px 12px; cursor: grab; touch-action: none; user-select: none; }
.tape .name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.tape .name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--board); flex: none; }
.tape .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; cursor: text; }
.tape .n { color: var(--muted); font: 400 11px/19px var(--mono); padding: 0 6px; background: #fff; border-radius: 20px; white-space: nowrap; }
.tape .n.over { color: var(--bad); background: #fcebf0; }
.tape .iconbtn { width: 28px; height: 28px; color: var(--muted); }
.cards { flex: 1; overflow-y: auto; padding: 2px 9px 5px; min-height: 9px; display: flex; flex-direction: column; gap: 8px; }
.cards::-webkit-scrollbar, .lanes::-webkit-scrollbar { width: 8px; height: 10px; }
.cards::-webkit-scrollbar-thumb, .lanes::-webkit-scrollbar-thumb { background: #c7bfd8; border: 2px solid transparent; background-clip: padding-box; border-radius: 20px; }
.addcard { margin: 2px 8px 8px; }
.addcard > button, .newlane > button { width: 100%; display: flex; gap: 7px; align-items: center; padding: 9px; background: transparent; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; text-align: left; }
.addcard > button:hover, .newlane > button:hover { background: #fff; color: var(--lila-ink); }
.composer textarea { min-height: 66px; }
.composer .row { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.newlane > button { padding: 14px; border: 1px dashed #c6bcd8; background: #ffffff79; border-radius: 13px; }
.newlane form { padding: 10px; background: #fff; border-radius: 12px; }
.card { position: relative; flex: none; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 11px; box-shadow: 0 2px 3px #2413380a; cursor: pointer; user-select: none; touch-action: manipulation; color: var(--ink); text-decoration: none; display: block; }
.card:hover, .card:focus-within { border-color: #b39fda; }
.card:hover .quick, .card:focus-within .quick { opacity: 1; }
.card.mine { box-shadow: inset 3px 0 0 #9166e7, 0 2px 3px #2413380a; padding-left: 14px; }
.card .cover { height: 26px; margin: -10px -11px 9px; border-radius: 9px 9px 0 0; }
.card.mine .cover { margin-left: -14px; }
.card .lbls { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; padding-right: 30px; }
.lbl { display: inline-block; height: 6px; width: 27px; border-radius: 20px; }
.lbls.open .lbl { height: auto; width: auto; min-width: 28px; padding: 3px 7px; font-size: 11px; line-height: 1; color: #fff; }
.card .t { font-size: 14px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.card:has(.quick) .t { padding-right: 25px; }
.card .num { font: 400 11px/1 var(--mono); color: var(--faint); margin-right: 5px; }
.card .badges { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.card .badges:empty { display: none; }
.card .badges .b { display: inline-flex; gap: 3px; align-items: center; }
.card .badges .b svg { width: 13px; height: 13px; }
.card .badges .avs { margin-left: auto; }
.due { display: inline-flex; gap: 4px; align-items: center; padding: 3px 7px; border: 1px solid var(--rule); border-radius: 20px; font-size: 11px; font-weight: 500; line-height: 1; color: var(--muted); background: var(--sheet); }
.due svg { width: 13px; height: 13px; }
.due.soon { border-color: #f0d7a2; color: #80510b; background: #fff3da; }
.due.over { border-color: #f1c5cf; color: #9c1937; background: #fce9ee; }
.due.done { border-color: #c6e7d8; color: var(--ok); background: #e7f7ef; }
.checkb.done { color: var(--ok); }
.card .quick { position: absolute; top: 4px; right: 4px; opacity: 0; width: 28px; height: 28px; background: var(--paper); }
.card .quick:hover { background: var(--lila-bg); }
.card.dragging { opacity: .35; }
.card.placeholder { background: #dcd4ed; border: 1px dashed #a796c3; box-shadow: none; cursor: default; }
.drag-ghost, .lane-ghost { position: fixed; z-index: 200; pointer-events: none; box-shadow: var(--elevation); }
.lane.drop-hint { outline: 2px dashed var(--focus); outline-offset: -2px; }
body.dragging-any, body.dragging-any * { cursor: grabbing !important; }
.hidden-by-filter { display: none !important; }
.filterbar { display: flex; gap: 8px; align-items: center; padding: 9px clamp(16px, 3vw, 42px); background: var(--sheet); border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.filterbar .chip { display: inline-flex; gap: 6px; align-items: center; background: var(--lila-bg); color: var(--lila-ink); padding: 3px 5px 3px 9px; border-radius: 20px; }
.filterbar .chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 2px; }

/* side drawer: activity */
.drawer { position: fixed; top: var(--top-height); right: 0; bottom: 0; width: 360px; max-width: 100vw; background: var(--sheet); border-left: 1px solid var(--rule); z-index: 40; display: flex; flex-direction: column; box-shadow: -6px 0 18px rgba(0,0,0,.18); }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--rule); font: 700 14px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.drawer .body { flex: 1; overflow: auto; padding: 4px 14px 20px; }
.act { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 13px; }
.act small { display: block; font: 400 11px/1.4 var(--mono); color: var(--faint); margin-top: 2px; }
.act a { color: var(--blue-ink); }

/* card sheet (detail) ---------------------------------------------------------------------------- */
.veil { position: fixed; inset: 0; background: rgba(25, 16, 43, .58); z-index: 80; overflow-y: auto; padding: 48px 16px 60px; }
.sheet { position: relative; max-width: 930px; margin: 0 auto; background: var(--paper); border-radius: 16px; box-shadow: var(--elevation); }
.sheet .cover { height: 58px; border-radius: 16px 16px 0 0; }
.sheet .close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,.94); }
.sheet .head { padding: 24px 58px 9px 26px; border-bottom: 1px solid var(--rule-soft); }
.sheet .head .ref { font: 500 12px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
.sheet .head textarea.title { font: 700 27px/1.2 var(--sans); border: 1px solid transparent; background: transparent; padding: 4px 6px; margin: 6px 0 2px -7px; min-height: 0; resize: none; overflow: hidden; }
.sheet .head textarea.title:hover { border-color: var(--rule-soft); }
.sheet .head textarea.title:focus { background: #fff; }
.sheet .head .where { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.sheet .head .where b { font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; cursor: pointer; }
.sheet .archived-note { background: #f3e2c6; color: #6c4a0f; padding: 8px 26px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.sheet .grid { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 26px; padding: 24px 26px 26px; }
.sheet .facts { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-bottom: 22px; }
.fact h4, .blk h3 { margin: 0 0 7px; font: 700 12px/1 var(--sans); letter-spacing: .02em; color: var(--muted); }
.fact .row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.fact .add { width: 28px; height: 28px; border: 1px dashed var(--rule); background: transparent; border-radius: 6px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.fact .add:hover { border-color: var(--muted); color: var(--ink); }
.fact .lbl { height: 28px; width: auto; min-width: 44px; padding: 0 9px; display: inline-flex; align-items: center; font: 600 12px/1 var(--sans); color: #fff; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.fact .due { height: 28px; padding: 0 8px; font-size: 12px; cursor: pointer; }
.fact .dueline { display: flex; gap: 8px; align-items: center; }
.blk { margin-bottom: 26px; }
.blk h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.blk h3 .grow { flex: 1; }
.desc { cursor: text; min-height: 40px; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; }
.desc:hover { border-color: var(--rule-soft); background: var(--sheet); }
.desc.empty-desc { color: var(--muted); background: var(--sheet); }
.md p { margin: 0 0 .7em; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { font-family: var(--sans); margin: .8em 0 .4em; line-height: 1.2; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 22px; }
.md code { font: 400 12.5px/1.4 var(--mono); background: var(--lila-bg); padding: 1px 4px; border-radius: 6px; }
.md pre { background: #1d2333; color: #e7e9ef; padding: 10px 12px; border-radius: 9px; overflow-x: auto; }
.md pre code { background: none; color: inherit; padding: 0; }
.md blockquote { margin: 0 0 .7em; border-left: 3px solid var(--rule); padding-left: 10px; color: var(--muted); }
.md .mention { color: var(--lila-ink); font-weight: 500; background: var(--lila-bg); padding: 0 3px; border-radius: 6px; }
.md a { overflow-wrap: anywhere; }
.editor .row { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.editor .row .hint { color: var(--faint); font-size: 12px; margin-left: auto; }

.cl { margin-bottom: 18px; }
.cl .bar { height: 6px; background: var(--rule-soft); border-radius: 1px; margin: 4px 0 8px 32px; position: relative; }
.cl .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 1px; }
.cl .bar.full i { background: var(--ok); }
.cl .pct { font: 500 11px/1 var(--mono); color: var(--muted); width: 30px; display: inline-block; }
.cl .barrow { display: flex; align-items: center; }
.cl .barrow .bar { flex: 1; margin-left: 2px; }
.item { display: flex; gap: 10px; align-items: flex-start; padding: 5px 4px; border-radius: 6px; }
.item:hover { background: var(--sheet); }
.item:hover .iconbtn, .item:focus-within .iconbtn { opacity: 1; }
.item .iconbtn { opacity: 0; width: 24px; height: 24px; }
.item input[type=checkbox] { margin-top: 3px; }
.item .tx { flex: 1; cursor: text; overflow-wrap: anywhere; }
.item.done .tx { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.item .by { font: 400 11px/1.8 var(--mono); color: var(--faint); }

.files { display: grid; gap: 8px; }
.file { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 6px; border: 1px solid var(--rule-soft); border-radius: 9px; background: var(--sheet); }
.file .thumb { width: 72px; height: 52px; border-radius: 6px; background: var(--lila-bg) center/cover no-repeat; display: grid; place-items: center; font: 600 12px/1 var(--mono); color: var(--muted); text-transform: uppercase; }
.file .nm { overflow-wrap: anywhere; font-weight: 500; }
.file small { display: block; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.drop-files { border: 2px dashed var(--lila); background: var(--lila-bg); border-radius: 9px; padding: 18px; text-align: center; color: var(--lila-ink); font-weight: 500; }

.comment-new { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-bottom: 16px; }
.cmt { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-bottom: 14px; }
.cmt .who { font-weight: 500; }
.cmt .who small { font: 400 11px/1 var(--mono); color: var(--faint); margin-left: 6px; }
.cmt .txt { background: var(--sheet); border: 1px solid var(--rule-soft); padding: 8px 10px; border-radius: 9px; margin-top: 4px; }
.cmt .acts { display: flex; gap: 10px; margin-top: 3px; font-size: 12px; }
.cmt .acts button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cmt.act-line { color: var(--muted); font-size: 13px; }
.cmt.act-line .txt { background: none; border: 0; padding: 2px 0; margin: 0; }
.tabs-mini { display: flex; gap: 2px; margin-left: auto; }
.tabs-mini button { border: 1px solid var(--rule); background: transparent; padding: 3px 8px; font: 500 12px/1 var(--sans); cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--muted); }
.tabs-mini button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.side h4 { margin: 0 0 7px; font: 700 12px/1 var(--sans); letter-spacing: .02em; color: var(--muted); }
.side .btn { width: 100%; margin-bottom: 6px; justify-content: flex-start; background: var(--sheet); border-color: var(--rule); }
.side .btn:hover { background: var(--lila-bg); }
.side .group { margin-bottom: 18px; }
.side .meta { font: 400 11px/1.6 var(--mono); color: var(--faint); margin-top: 14px; }

/* pickers */
.pick { display: grid; gap: 4px; }
.pick button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px; border: 0; background: transparent; cursor: pointer; border-radius: 6px; text-align: left; }
.pick button:hover { background: var(--sheet); }
.pick .sw { flex: 1; height: 30px; border-radius: 6px; color: #fff; font: 600 12px/30px var(--sans); letter-spacing: .05em; text-transform: uppercase; padding: 0 10px; }
.pick .tick { width: 18px; color: var(--lila); }
.pick .edit { width: 28px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.swatches button { height: 30px; border: 0; border-radius: 6px; cursor: pointer; }
.swatches button.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.boardsw { grid-template-columns: repeat(6, 1fr); }
.form-row { margin-bottom: 12px; }
.form-row > label { display: block; font: 600 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.form-row .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pop .actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 10px; }
.radio-line { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.radio-line input { margin-top: 3px; accent-color: var(--lila); }
.radio-line small { display: block; color: var(--muted); }

/* dialog (modal forms) */
.dialog { position: relative; max-width: 560px; margin: 6vh auto 0; background: var(--sheet-2); border-radius: 16px; box-shadow: var(--elevation); }
.dialog > header { padding: 16px 20px 12px; border-bottom: 1px solid var(--rule-soft); font: 700 19px/1.2 var(--sans); display: flex; justify-content: space-between; align-items: center; }
.dialog > .body { padding: 16px 20px; }
.dialog > footer { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--rule-soft); }
.memberlist { display: grid; gap: 2px; max-height: 260px; overflow: auto; border: 1px solid var(--rule-soft); border-radius: 9px; padding: 4px; background: #fff; }
.memberlist label { display: flex; gap: 10px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.memberlist label:hover { background: var(--sheet); }

/* "my cards" ------------------------------------------------------------------------------------- */
.mine-list { background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 9px; }
.mine-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 200px; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); text-decoration: none; color: var(--ink); align-items: center; }
.mine-row:last-child { border-bottom: 0; }
.mine-row:hover { background: var(--sheet); }
.mine-row .where { color: var(--muted); font-size: 13px; }
.mine-row .t .num { font: 400 12px/1 var(--mono); color: var(--faint); margin-right: 6px; }

/* administration --------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--lila); }
.tabs a:hover { color: var(--ink); }
.table { width: 100%; border-collapse: collapse; background: var(--sheet-2); border: 1px solid var(--rule); }
.table th { text-align: left; font: 700 11px/1 var(--sans); letter-spacing: .02em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--sheet); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .who { display: flex; gap: 10px; align-items: center; }
.table .who small, .mono-s { font: 400 11px/1.4 var(--mono); color: var(--faint); display: block; }
.table select { width: auto; min-height: 28px; padding: 3px 6px; }
.table .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.state { display: inline-flex; gap: 6px; align-items: center; font: 500 12px/1 var(--mono); }
.state::before { content: ""; width: 8px; height: 8px; background: var(--faint); }
.state.aktiv::before { background: var(--ok); }
.state.wartend::before { background: var(--lila); }
.state.gesperrt::before { background: var(--bad); }
.request { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px; background: var(--sheet-2); border: 1px solid var(--rule); border-left: 4px solid var(--lila); border-radius: 9px; margin-bottom: 10px; }
.request .nm { font-weight: 500; font-size: 15px; }
.request .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.addform { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; background: var(--sheet-2); border: 1px solid var(--rule); padding: 12px; border-radius: 9px; }
.addform .form-row { margin: 0; }
.chief-tag { font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--lila); padding: 3px 5px 2px; border-radius: 6px; }
.scopebtn { background: none; border: 1px solid var(--rule); border-radius: 9px; padding: 4px 8px; cursor: pointer; text-align: left; font-size: 13px; }
.scopebtn:hover { border-color: var(--muted); }
.logrow td { font-size: 13px; }
.kind { font: 500 11px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--rule); border-radius: 6px; color: var(--muted); }

.matrix td:nth-child(2), .matrix td:nth-child(3), .matrix th:nth-child(2), .matrix th:nth-child(3) { text-align: center; width: 110px; }
.matrix tfoot td { background: var(--sheet); font-weight: 500; }
.switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #a8a0b7; border-radius: 6px; cursor: pointer; transition: background .12s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 1px; transition: transform .12s; box-shadow: 0 1px 1px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--lila); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.notice { padding: 10px 14px; border: 1px solid var(--rule); background: #fff5e3; border-radius: 9px; margin-bottom: 14px; font-size: 13px; }
.notice.lila { background: var(--lila-bg); border-color: #cbbde9; }

/* Entry */
.entry { min-height: 100svh; display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); background: #fff; padding: 18px; }
.entry-content { display: grid; grid-template-rows: auto 1fr; min-width: 0; padding: 24px clamp(22px, 5vw, 78px); }
.entry-brand { justify-self: start; font-size: 20px; }
.entry-brand .brand-icon { width: 40px; height: 40px; }
.tcard { width: min(100%, 430px); align-self: center; justify-self: center; padding: 45px 0 72px; }
.tcard .ref { font-size: 13px; color: var(--lila-ink); font-weight: 500; }
.tcard h1 { font-size: clamp(42px, 6vw, 78px); line-height: 1; letter-spacing: -.046em; margin: 0 0 19px; overflow-wrap: anywhere; }
.tcard .stamp + h1, .tcard .ref + h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.07; letter-spacing: -.04em; margin-top: 12px; }
.tcard p { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; margin: 0 0 28px; max-width: 33ch; }
.tcard .btn { min-height: 50px; padding: 0 18px; font-size: 15px; }
.tcard .btn.lila { width: min(100%, 320px); box-shadow: 0 5px 13px #572ab52b; }
.tcard .btn svg { width: 19px; height: 19px; }
.tcard .err { background: #fcebf0; color: #861b37; border: 1px solid #f0cdd6; border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; }
.tcard .idline { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 14px; margin: 0 0 20px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: 10px; overflow-wrap: anywhere; }
.tcard .idline span { color: var(--muted); }
.tcard .idline code { font: 400 12px/1.5 var(--mono); }
.tcard footer { margin-top: 20px; color: var(--faint); font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.tcard footer svg { width: 14px; height: 14px; }
.stamp { display: inline-flex; background: var(--lila-bg); color: var(--lila-ink); border-radius: 20px; font-weight: 500; font-size: 13px; padding: 5px 10px; }
.entry-visual {
  position: relative; display: grid; place-items: center; overflow: hidden; min-height: 520px; isolation: isolate;
  border-radius: 24px; padding: 30px clamp(22px, 4vw, 64px);
  background: radial-gradient(ellipse at 86% 13%, #8459ef 0, transparent 56%),
              radial-gradient(ellipse at 0% 100%, #5839a0 0, transparent 70%),
              linear-gradient(147deg, #261846 9%, #3c247c 72%, #2c1b50);
}
.entry-visual::before { content: ""; z-index: -1; position: absolute; inset: 0; background-image: linear-gradient(#ffffff16 1px, transparent 1px), linear-gradient(90deg, #ffffff16 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 58% 47%, #000 12%, transparent 76%); }
.preview { width: min(100%, 595px); min-width: 0; padding: 15px; border-radius: 19px; color: #f6f1ff; background: #241939e8; border: 1px solid #e6d9ff55; box-shadow: 0 32px 86px #170e3680, inset 0 1px 0 #ffffff19; transform: rotate(-4deg); }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 13px; font-size: 13px; }
.preview-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #8d68e3; }
.preview-members { display: flex; margin-left: auto; padding-left: 6px; }
.preview-members i, .preview-task span i { width: 17px; height: 17px; border-radius: 50%; background: #b48dff; border: 2px solid #2e2048; margin-left: -5px; }
.preview-members i:nth-child(2) { background: #ffd28b; }
.preview-members i:nth-child(3) { background: #95dbc6; }
.preview-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preview-lane { background: #f1e9ff12; padding: 8px; border-radius: 10px; --preview-color: #b999fb; }
.preview-lane:nth-child(2) { --preview-color: #ffd18e; }
.preview-lane:nth-child(3) { --preview-color: #90e2c6; }
.preview-lane-head { display: flex; gap: 5px; align-items: center; margin: 0 0 8px; font-size: clamp(9px, 1vw, 12px); font-weight: 500; }
.preview-lane-head i { width: 6px; height: 6px; border-radius: 50%; background: var(--preview-color); flex: none; }
.preview-lane-head small { margin-left: auto; color: #d7c6f5; font: 400 10px/1 var(--mono); }
.preview-task { padding: 8px; margin-bottom: 5px; display: grid; gap: 6px; background: #2a1e42; border: 1px solid #ffffff20; border-radius: 7px; box-shadow: 0 2px 5px #140b252b; }
.preview-task:last-child { margin-bottom: 0; }
.preview-task > i { height: 4px; width: 19px; border-radius: 20px; background: var(--preview-color); }
.preview-task b { font-size: clamp(9px, 1vw, 12px); line-height: 1.2; min-height: 2.4em; overflow-wrap: anywhere; }
.preview-task span { display: flex; align-items: center; gap: 4px; color: var(--preview-color); }
.preview-task span svg { width: 11px; height: 11px; }
.preview-task span i { width: 13px; height: 13px; border: 0; margin-left: auto; background: var(--preview-color); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 300; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }
.toast button { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 2px; padding: 3px 8px; cursor: pointer; }
.livebadge { font: 500 11px/1 var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.livebadge::before { content: ""; width: 6px; height: 6px; background: #2e9966; border-radius: 50%; }
.livebadge.off::before { background: #e0a23a; }

/* label & cover colours */
.bg-blau { background: var(--c-blau); } .bg-lila { background: var(--c-lila); } .bg-gruen { background: var(--c-gruen); }
.bg-gelb { background: var(--c-gelb); } .bg-orange { background: var(--c-orange); } .bg-rot { background: var(--c-rot); }
.bg-tuerkis { background: var(--c-tuerkis); } .bg-grau { background: var(--c-grau); } .bg-rosa { background: var(--c-rosa); }
.bg-braun { background: var(--c-braun); }
.bg-gelb.lbl, .fact .bg-gelb, .pick .bg-gelb { color: #3a2c04; }

.sheet .grid > *, .cmt > *, .comment-new > *, .file > * { min-width: 0; }
.sheet .grid .md, .mine-row .t, .request .nm { overflow-wrap: anywhere; }
.sheet .facts { padding-bottom: 18px; border-bottom: 1px solid var(--rule-soft); }
.side .btn { min-height: 34px; }
.fact .lbl, .pick .sw { text-transform: none; letter-spacing: 0; }
.dialog footer { flex-wrap: wrap; }
.state::before { border-radius: 50%; }
.switch span { border-radius: 20px; }
.switch span::after { border-radius: 50%; }
.lbls.open .bg-gelb { color: #3a2c04; }
@media (max-width: 760px) { .sheet .cover { border-radius: 0; } }
.top .only-mobile { display: none; }
@media (max-width: 950px) {
  .entry { grid-template-columns: 1fr 1fr; }
  .entry-content { padding-inline: clamp(15px, 3.5vw, 35px); }
  .entry-visual { padding-inline: 20px; }
  .mark { margin-right: 5px; }
  .sheet .grid { grid-template-columns: minmax(0, 1fr) 168px; gap: 18px; }
}
@media (max-width: 760px) {
  :root { --top-height: 58px; }
  .top { gap: 5px; padding: 0 10px; }
  .mark b, .top nav a .lbl-long, .livebadge, .bbar .sep { display: none; }
  .mark .brand-icon { width: 30px; height: 30px; }
  .top nav a { padding: 7px 8px; }
  .search { display: none; }
  .search.open { display: block; position: absolute; left: 8px; right: 8px; top: 10px; width: auto; z-index: 5; }
  .top .only-mobile { display: inline-grid; }
  .entry { grid-template-columns: minmax(0, 1fr); align-content: start; padding: 14px; }
  .entry-content { padding: 12px 10px 0; }
  .tcard { padding: clamp(38px, 8vh, 68px) 0 34px; }
  .entry-visual { min-height: 265px; padding: 25px; border-radius: 16px; }
  .preview { width: min(100%, 360px); padding: 10px; border-radius: 13px; }
  .preview-lanes { gap: 5px; }
  .preview-lane { padding: 5px; }
  .preview-task { padding: 5px; }
  .bbar { gap: 5px; padding: 10px 14px; }
  .board-heading { width: calc(100% - 39px); }
  .board-heading .tile-symbol { width: 36px; height: 36px; }
  .boardpage { bottom: env(safe-area-inset-bottom, 0); }
  .lanes { scroll-snap-type: x proximity; gap: 10px; padding: 14px 12px; scroll-padding-inline: 12px; }
  .lane, .newlane { width: min(calc(100vw - 42px), 332px); scroll-snap-align: start; }
  .veil { padding: 0; }
  .sheet { border-radius: 0; min-height: 100svh; }
  .sheet .head { padding: 18px 49px 7px 16px; }
  .sheet .grid { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 28px; }
  .side { border-top: 1px solid var(--rule-soft); padding-top: 17px; }
  .side .group { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .side .group h4 { grid-column: 1 / -1; margin: 0; }
  .side .btn { margin: 0; }
  .dialog { width: calc(100% - 24px); margin-block: 18px; }
  .tabs { overflow-x: auto; white-space: nowrap; }
  .table:not(.matrix) thead { display: none; }
  .table:not(.matrix) tr { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .table:not(.matrix) td { border: 0; padding: 4px 12px; overflow-wrap: anywhere; }
  .matrix th, .matrix td { padding: 8px 5px; }
  .matrix th { white-space: normal; }
  .matrix td:nth-child(2), .matrix td:nth-child(3), .matrix th:nth-child(2), .matrix th:nth-child(3) { width: 26%; }
  .table .acts { justify-content: flex-start; }
  .request { grid-template-columns: 44px minmax(0, 1fr); }
  .request .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .card .quick { opacity: 1; }
  .item .iconbtn { opacity: 1; }
  .drawer { width: 100vw; }
  .notes, .results { width: calc(100vw - 16px); }
  .mine-row, .mine-row[style] { grid-template-columns: minmax(0, 1fr) !important; gap: 5px; }
}
@media (max-width: 360px) {
  .top { gap: 3px; padding-inline: 6px; }
  .top nav a { padding-inline: 5px; }
  .top nav a[href="/"] svg, .top nav a[href="/meine"] svg { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

