:root {
  --bg: #f4efe6;
  --surface: #fffcf7;
  --ink: #24304a;
  --subtle: #6d7690;
  --line: rgba(36, 48, 74, 0.12);
  --accent: #e0703a;
  --navy: #2b3652;
  --red: #c94b5a;
  --green: #2c8f68;
  --shadow: 0 1px 2px rgba(36, 48, 74, 0.06), 0 8px 24px rgba(36, 48, 74, 0.06);
  --sans: "Manrope", "Segoe UI", sans-serif;
  --gold: #f3e2b0; --gold-ink: #6d5310;
  --c-green: #d7efe4; --c-green-ink: #1d6b4a;
  --amber: #f6e3b8; --amber-ink: #8a5a10;
  --blue: #d9e2f8; --blue-ink: #2a448f;
  --sky: #d5eef6; --sky-ink: #0f6174;
  --c-red: #f8d6da; --c-red-ink: #9d3040;
  --c-navy: #d9deea; --c-navy-ink: #2b3652;
  --slate: #e4e7ee; --slate-ink: #4c556b;
  --mint: #d8f3ea; --mint-ink: #1d6b4a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(1200px 480px at 10% -10%, rgba(224, 112, 58, 0.16), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.011em;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h2 { font-size: 13px; margin: 0 0 8px; }
.hidden { display: none !important; }
.muted { color: var(--subtle); font-size: 12px; }
.error { color: var(--red); }
.hint { color: rgba(244, 239, 230, 0.62); font-size: 12px; margin: 0; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
}
.btn.primary { background: var(--accent); color: white; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.light { color: inherit; border-color: rgba(255, 255, 255, 0.2); }

.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card, .panel label, .login-card label { display: grid; gap: 6px; }
.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 8px 0 0; font-size: 28px; }
.login-card label, .panel label { font-size: 12px; color: var(--subtle); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 10px 12px;
}
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  padding: 0;
  flex: none;
  accent-color: var(--navy);
}
select {
  appearance: none;
  padding-right: 40px;
  background-color: white;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'><path d='M4.5 6.5 8 10l3.5-3.5' stroke='%236d7690' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
textarea { resize: vertical; }

.shell { min-height: 100%; display: flex; flex-direction: column; }
.mast {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  background: rgba(255, 252, 247, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 6;
  backdrop-filter: blur(12px);
}
.mast-brand, .mast-user, .project-btn { display: flex; align-items: center; gap: 10px; }
.project-switch { position: relative; }
.project-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 6px 12px;
  text-align: left;
  min-width: 180px;
}
.project-btn strong { display: block; font-size: 14px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  border: 0;
  background: transparent;
  color: var(--subtle);
  border-radius: 9px;
  padding: 8px 12px;
  font-weight: 650;
}
.tab.active { background: var(--navy); color: white; }
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.tab.active .tab-count { background: white; color: var(--navy); }
.mast-user { margin-left: auto; }
.mast-user .avatar { margin: 0; width: 28px; height: 28px; }
.menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 300px;
  background: white;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 12;
  display: grid;
  gap: 4px;
}
.menu button.item, .menu .item {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  width: 100%;
}
.menu button.item.active, .menu button.item:hover { background: rgba(36, 48, 74, 0.06); }
.menu form { display: grid; gap: 6px; padding: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px 2px;
  flex-wrap: wrap;
}
.tool-rule { width: 1px; height: 22px; background: var(--line); flex: none; }
.tool-filters, .tool-create { display: flex; align-items: center; gap: 8px; }
.tool-create {
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(36, 48, 74, 0.06);
}
.tool-create:not(:has(.btn:not(.hidden))) { display: none; }
.tool-create .btn {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 0 12px;
  height: 30px;
  font-weight: 700;
}
.tool-create .btn:hover { background: rgba(255, 255, 255, 0.72); }
.tool-create .btn.primary { background: var(--accent); color: white; }
.tool-create .btn.primary:hover { background: #c85f2e; }
#epic-filter { width: auto; min-width: 168px; height: 36px; padding-top: 0; padding-bottom: 0; background-color: white; }
.sidebar { display: none; }
.sidebar .muted { color: rgba(244, 239, 230, 0.62); }
.side-brand { display: flex; gap: 10px; align-items: center; }
.side-brand strong { display: block; }
.nav { display: grid; gap: 4px; margin: 8px 0; }
.nav-btn, .epic {
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 8px 10px;
}
.nav-btn.active, .nav-btn:hover, .epic.active, .epic:hover { background: rgba(255, 255, 255, 0.08); }
.nav-btn.active { box-shadow: inset 3px 0 0 var(--accent); }
.side-label {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.48);
}
.epic-list { display: grid; gap: 2px; overflow: auto; }
.epic { display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: start; }
.swatch { width: 8px; height: 8px; border-radius: 99px; margin-top: 6px; }
.epic small { display: block; color: rgba(244, 239, 230, 0.55); }
.epic .count { font-variant-numeric: tabular-nums; color: rgba(244, 239, 230, 0.75); }
#epic-block { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-user {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border-radius: 12px;
  padding: 8px;
}
.side-user:hover { background: rgba(255, 255, 255, 0.1); }
.side-user-copy { display: grid; min-width: 0; }
.side-user-copy strong, .side-user .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user .avatar { margin: 0; width: 32px; height: 32px; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(244, 239, 230, 0.9);
  backdrop-filter: blur(12px);
}
.top-copy { min-width: 140px; }
.top-copy h1 { margin: 0; font-size: 22px; letter-spacing: -0.03em; line-height: 1.15; }
.top-copy p { margin: 2px 0 0; }
.board-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.filters {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 36px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(36, 48, 74, 0.06);
}
.chip {
  border: 0;
  background: transparent;
  color: var(--subtle);
  border-radius: 9px;
  height: 30px;
  padding: 0 11px;
  font-weight: 700;
}
.chip:hover { color: var(--ink); }
.chip.active { background: white; color: var(--ink); box-shadow: 0 1px 2px rgba(36, 48, 74, 0.08); }
.stuck {
  border: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(201, 75, 90, 0.1);
  color: var(--red);
  font-weight: 700;
}
.stuck.active { box-shadow: inset 0 0 0 1.5px var(--red); }
.search-field { position: relative; width: 200px; margin-left: auto; }
.search-field input { width: 100%; height: 36px; padding: 0 34px 0 12px; }
kbd {
  font: 650 11px/1 var(--sans);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  background: var(--bg);
  color: var(--subtle);
}
.search-field kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search-field:focus-within kbd,
.search-field input:not(:placeholder-shown) + kbd { opacity: 0; }
.btn kbd {
  margin-left: 8px;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}
.banner {
  margin: 0 16px 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(166, 124, 18, 0.14);
  color: #6d5310;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.banner-actions { display: flex; gap: 8px; flex: none; }

.board { display: flex; gap: 14px; padding: 4px 16px 24px; overflow-x: auto; align-items: stretch; min-height: calc(100vh - 140px); }
.column {
  width: 280px;
  flex: 0 0 280px;
  background: transparent;
  padding: 0 2px 8px;
}
.column.drop { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 12px; }
.column-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.column-title { display: flex; gap: 8px; align-items: center; }
.column-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.column-head h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #c5cad6;
  flex: none;
}
.column.doing .column-head h2::before { background: var(--accent); }
.column.blocked .column-head h2::before { background: var(--red); }
.column.review .column-head h2::before { background: #3a5bb0; }
.column.done .column-head h2::before { background: var(--green); }
.count-pill {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(36, 48, 74, 0.08);
  color: var(--subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.column-actions { display: flex; align-items: center; gap: 10px; }
.column-head .quiet-action {
  border: 0;
  background: transparent;
  padding: 0 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--subtle);
  cursor: pointer;
}
.column-head .quiet-action:hover { color: var(--ink); text-decoration: underline; }
.column-head .add {
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.cards { display: grid; gap: 8px; min-height: 36px; }
.card {
  background: var(--surface);
  border: 0;
  border-left: 3px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  text-align: left;
  width: 100%;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(36, 48, 74, 0.1); }
.card.dragging { opacity: 0.45; }
.card .title { font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.card.is-done { background: rgba(255, 252, 247, 0.55); box-shadow: none; }
.card.is-done .title { color: var(--subtle); font-weight: 550; }
.card.tone-gold { border-left-color: #c2921c; }
.card.tone-green, .card.tone-mint { border-left-color: var(--green); }
.card.tone-amber { border-left-color: #c2921c; }
.card.tone-blue { border-left-color: #3a5bb0; }
.card.tone-sky { border-left-color: #0f6174; }
.card.tone-red { border-left-color: var(--red); }
.card.tone-navy { border-left-color: var(--navy); }
.card.tone-slate { border-left-color: #64708a; }
.card-epic, .type-pill, .due, .prio, .key {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 7px;
  display: inline-block;
}
.card .card-epic {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--subtle);
}
.card.tone-gold .card-epic, .card.tone-amber .card-epic { color: #8a6810; }
.card.tone-green .card-epic, .card.tone-mint .card-epic { color: #1d6b4a; }
.card.tone-blue .card-epic { color: #2a448f; }
.card.tone-sky .card-epic { color: #0f6174; }
.card.tone-red .card-epic { color: #9d3040; }
.card.tone-navy .card-epic { color: var(--navy); }
.card.tone-slate .card-epic { color: #4c556b; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.card-author, .row-author {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink);
}
.card-author { max-width: 11em; font-size: 12px; }
.row-author { font-size: 12.5px; }
.card .key, .card .due, .card .quiet {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--subtle);
  font-weight: 650;
}
.card .due.late { color: var(--red); background: transparent; }
.prio.high, .prio.urgent, .type-pill.bug, .type-pill.blocker {
  background: var(--c-red);
  color: var(--c-red-ink);
}
.key { background: var(--slate); color: var(--slate-ink); font-variant-numeric: tabular-nums; }
.empty { color: var(--subtle); font-size: 12px; padding: 6px 2px; }
.avatar {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  background: var(--navy);
  color: white;
  font-size: 11px;
  margin-left: auto;
}

.list, .epic-grid { padding: 8px 16px 32px; display: grid; gap: 12px; }
.group, .epic-card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.group { padding: 0; overflow: hidden; border-left: 4px solid var(--line); }
.group .empty { padding: 4px 16px 14px; }
.epic-card { padding: 12px 14px; }
.group.tone-gold, .group.tone-amber { border-left-color: #c2921c; }
.group.tone-green, .group.tone-mint { border-left-color: var(--green); }
.group.tone-blue { border-left-color: #3a5bb0; }
.group.tone-sky { border-left-color: #0f6174; }
.group.tone-red { border-left-color: var(--red); }
.group.tone-navy { border-left-color: var(--navy); }
.group.tone-slate { border-left-color: #64708a; }
.group.tone-gold .epic-head, .group.tone-amber .epic-head { background: rgba(194, 146, 28, 0.1); }
.group.tone-green .epic-head, .group.tone-mint .epic-head { background: rgba(44, 143, 104, 0.1); }
.group.tone-blue .epic-head { background: rgba(58, 91, 176, 0.1); }
.group.tone-sky .epic-head { background: rgba(15, 97, 116, 0.1); }
.group.tone-red .epic-head { background: rgba(201, 75, 90, 0.1); }
.group.tone-navy .epic-head { background: rgba(43, 54, 82, 0.08); }
.group.tone-slate .epic-head { background: rgba(100, 112, 138, 0.1); }
.group .epic-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
}
.group .epic-head:hover { background: rgba(36, 48, 74, 0.03); }
.epic-key, .row-key {
  font-size: 12px;
  font-weight: 700;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.epic-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epic-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.epic-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
button.lane-head.epic-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
button.lane-head.epic-head:hover strong { text-decoration: underline; }
.back-row {
  width: 100%;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(0, 132px) 26px 72px auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 10px 16px;
}
.back-row:hover { background: rgba(36, 48, 74, 0.035); }
.back-row { cursor: pointer; }
.back-row.with-status { grid-template-columns: 68px minmax(0, 1fr) 100px minmax(0, 132px) 26px 72px; }
.back-row.with-action { grid-template-columns: 68px minmax(0, 1fr) 100px minmax(0, 132px) 26px 72px auto; }
.backlog-note {
  margin: 0 0 14px;
  color: var(--subtle);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.45;
}
.take {
  justify-self: end;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #c85f2e;
  cursor: pointer;
}
.take:hover { text-decoration: underline; }
.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.row-title .type-pill { flex: none; }
.row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--subtle);
  white-space: nowrap;
}
.row-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
  flex: none;
}
.row-status.doing { color: #c2612d; }
.row-status.blocked { color: var(--red); }
.row-status.review { color: #3a5bb0; }
.row-status.done { color: var(--green); }
.row-due {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--subtle);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row-due.late { color: var(--red); }
.back-row .avatar { margin-left: 0; width: 22px; height: 22px; }
.row-who { width: 22px; height: 22px; }
.row {
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 8px 0;
}
.bar { height: 6px; border-radius: 99px; background: var(--slate); overflow: hidden; margin: 8px 0; }
.bar span { display: block; height: 100%; background: var(--accent); }
.epic-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.epic-card { text-align: left; border: 0; cursor: pointer; }
.epic-card h3 { margin: 8px 0 0; font-size: 16px; }

.c-gold { background: var(--gold); color: var(--gold-ink); }
.c-green { background: var(--c-green); color: var(--c-green-ink); }
.c-amber { background: var(--amber); color: var(--amber-ink); }
.c-blue { background: var(--blue); color: var(--blue-ink); }
.c-sky { background: var(--sky); color: var(--sky-ink); }
.c-red { background: var(--c-red); color: var(--c-red-ink); }
.c-navy { background: var(--c-navy); color: var(--c-navy-ink); }
.c-slate { background: var(--slate); color: var(--slate-ink); }
.c-mint { background: var(--mint); color: var(--mint-ink); }
.swatch.c-gold { background: #c2921c; }
.swatch.c-green, .swatch.c-mint { background: var(--green); }
.swatch.c-amber { background: #c2921c; }
.swatch.c-blue { background: #3a5bb0; }
.swatch.c-sky { background: #0f6174; }
.swatch.c-red { background: var(--red); }
.swatch.c-navy { background: var(--navy); }
.swatch.c-slate { background: #64708a; }

.scrim { position: fixed; inset: 0; background: rgba(36, 48, 74, 0.35); z-index: 20; }
.panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(480px, 100%);
  background: var(--surface);
  z-index: 21;
  overflow: auto;
  padding: 18px 18px 40px;
  display: grid;
  gap: 12px;
  align-content: start;
  box-shadow: -12px 0 40px rgba(36, 48, 74, 0.12);
}
.panel-head, .panel-actions, .inline-form { display: flex; gap: 8px; align-items: center; }
.panel-head { justify-content: space-between; }
.panel-author {
  margin: -4px 0 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-author.is-empty { color: var(--subtle); font-weight: 600; }
.panel-created { margin: -8px 0 0; color: var(--subtle); font-size: 13px; font-weight: 600; }
.panel-created:empty { display: none; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history-row { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 2px 12px; padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; line-height: 1.35; }
.history-head { display: flex; flex-direction: column; gap: 1px; }
.history-head strong { font-size: 12px; }
.history-head time { color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.history-text { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .history-row { grid-template-columns: 1fr; }
  .history-head { flex-direction: row; gap: 8px; }
}
.comment-to { margin: -2px 0 0; color: var(--subtle); font-size: 13px; font-weight: 650; }
.comment-to:empty { display: none; }
.panel-id { display: flex; gap: 8px; align-items: center; min-width: 0; }
.panel-title {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.25;
}
.panel-title:focus, .panel-body:focus { outline: none; }
.panel-meta {
  display: grid;
  gap: 8px 10px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--line);
}
.panel-meta select, .panel-meta input {
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  background-color: var(--bg);
  border-color: transparent;
  font-size: 13px;
}
.panel-body {
  width: 100%;
  min-height: 96px;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
}
.panel section { display: grid; gap: 8px; }
.panel section h2 {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#comment-form { display: grid; gap: 8px; }
#comment-form textarea { background: var(--bg); border-color: transparent; }
#comment-form .btn { justify-self: start; }
.mention-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.mention-list.hidden { display: none; }
.mention-list button {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: baseline;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
}
.mention-list button.active,
.mention-list button:hover { background: var(--bg); }
.mention-list .mention-mail {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment .mention { font-weight: 700; color: #c2612d; }
#panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  gap: 0;
}
#panel .panel-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 28px;
  display: grid;
  gap: 12px;
  align-content: start;
}
#panel-archive { margin-left: auto; }
#panel .panel-actions {
  position: static;
  flex: none;
  flex-wrap: wrap;
  margin: 0;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#checks, #comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.check, .comment { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.check span { flex: 1; min-width: 0; line-height: 1.35; text-align: left; }
.check.done span { text-decoration: line-through; color: var(--subtle); }
.check-remove {
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
}
.check-remove:hover { color: var(--red); }
.comment { display: block; }
.comment strong { font-size: 12px; }
.settings {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 8px 20px 48px;
  display: grid;
  gap: 16px;
}
.settings-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
}
.settings-card h2 { font-size: 16px; letter-spacing: -0.02em; }
.settings-card p { margin: -4px 0 0; }
.settings-card form, .invite-row { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.invite-row input { width: auto; flex: 1; min-width: 180px; }
.invite-row select { width: auto; flex: 0 0 150px; }
.settings-card form .btn { width: auto; }
.settings-card label { display: grid; gap: 6px; font-size: 12px; color: var(--subtle); flex: 1; min-width: 180px; }
.person-row, .invite-row-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 150px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.person-copy { display: grid; min-width: 0; }
.person-copy strong, .person-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .avatar { margin: 0; width: 32px; height: 32px; }
.settings-card select, .settings-card input { background-color: white; }
.readonly-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.readonly-grid div { display: grid; gap: 2px; }
.readonly-grid strong { font-size: 14px; color: var(--ink); }

.files { display: grid; gap: 8px; }
.file-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.file-thumb { position: relative; width: 84px; height: 84px; }
.file-thumb .thumb {
  width: 84px;
  height: 84px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(36, 48, 74, 0.72);
  color: white;
  line-height: 1;
}
.file-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
}
.file-row a { color: inherit; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .muted { margin-left: auto; flex: none; }
.panel label.file-add { display: inline-flex; position: relative; width: fit-content; align-items: center; }
.file-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.gallery {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(18, 22, 32, 0.92);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: 64px minmax(0, 1fr);
  color: white;
}
.gallery .gallery-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  margin-right: 16px;
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}
.gallery-nav {
  grid-row: 2;
  border: 0;
  background: transparent;
  color: white;
  font-size: 48px;
  line-height: 1;
}
.gallery-nav.is-single { visibility: hidden; }
#gallery-prev { grid-column: 1; }
#gallery-next { grid-column: 3; }
.gallery figure {
  grid-column: 2;
  grid-row: 2;
  margin: 0 0 24px;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
}
.gallery img {
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 12px;
}
.gallery figcaption { font-size: 13px; color: rgba(255, 255, 255, 0.82); text-align: center; }

.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 50;
}

.report, .timeline { padding: 8px 16px 40px; display: grid; gap: 14px; }
.report-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr); gap: 14px; align-items: start; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat { padding: 16px 18px 14px; background: transparent; }
.stat + .stat { box-shadow: inset 1px 0 0 var(--line); }
.stat b {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--subtle); font-size: 12px; font-weight: 650; }
.stat span::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--navy); }
.stat.done span::before { background: var(--green); }
.stat.late span::before { background: var(--red); }
.stat.block span::before { background: var(--accent); }
.chart-card, .deadline-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow);
}
.chart-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.chart-card h2, .deadline-card h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.03em; }
.chart-kicker { margin: 6px 0 0; color: var(--subtle); font-size: 13px; font-weight: 600; }
.chart-kicker b {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}
.chart-kicker .behind { color: #c2612d; font-weight: 700; }
.chart-kicker .ahead { color: var(--green); font-weight: 700; }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 650; color: var(--subtle); padding-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch-line { width: 16px; height: 2px; border-radius: 99px; display: inline-block; }
.swatch-line.fact { background: var(--accent); }
.swatch-line.plan { background: repeating-linear-gradient(90deg, #9aa3b5 0 3px, transparent 3px 7px); }
.deadline-card { padding: 16px 10px 10px; }
.deadline-card > h2, .meter-head h2 { margin: 0; }
.meter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 8px 8px; flex-wrap: wrap; }
.due-row, .meter {
  width: 100%;
  display: grid;
  align-items: center;
  border: 0;
  background: transparent;
  border-radius: 12px;
  text-align: left;
}
.due-row { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 7px 8px; }
.due-row:hover, .meter:hover { background: rgba(36, 48, 74, 0.04); }
.due-date { display: grid; justify-items: center; line-height: 1; min-height: 32px; }
.due-date.repeat { visibility: hidden; }
.due-date b { font-size: 18px; font-weight: 700; letter-spacing: -0.04em; }
.due-date span { margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--subtle); }
.due-date.late b, .due-date.late span { color: var(--red); }
.due-copy { display: grid; gap: 1px; min-width: 0; }
.due-copy .row-name { font-weight: 650; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 8px; }
.meter-title {
  font-weight: 650;
  letter-spacing: -0.02em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meter-count { color: var(--subtle); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.stack { grid-column: 1 / -1; display: flex; height: 8px; gap: 3px; }
.stack i { display: block; min-width: 6px; border-radius: 99px; }
.stack i.done { background: var(--green); }
.stack i.review { background: #3a5bb0; }
.stack i.doing { background: var(--accent); }
.stack i.blocked { background: var(--red); }
.stack i.todo { background: #d7dce6; }
.stack i.backlog { background: #cfc6b8; }
.stack-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; font-weight: 700; color: var(--subtle); }
.stack-legend i { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.stack-legend i.done { background: var(--green); }
.stack-legend i.review { background: #3a5bb0; }
.stack-legend i.doing { background: var(--accent); }
.stack-legend i.blocked { background: var(--red); }
.stack-legend i.todo { background: #d7dce6; }
.stack-legend i.backlog { background: #cfc6b8; }
.lane-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }

.timeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.timeline-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.roadmap {
  --road-side: 280px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.roadmap-inner { min-width: 860px; }
.roadmap-scale, .roadmap-row {
  display: grid;
  grid-template-columns: var(--road-side) minmax(0, 1fr);
}
.roadmap-scale {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
}
.roadmap-corner {
  padding: 12px 16px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}
.roadmap-axis { position: relative; height: 42px; }
.scale-tick {
  position: absolute;
  top: 14px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.today-pill {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.roadmap-body { position: relative; }
.today-rule {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(224, 112, 58, 0.7);
  pointer-events: none;
  z-index: 1;
}
.roadmap-row { border-top: 1px solid var(--line); }
.roadmap-row:hover { background: rgba(36, 48, 74, 0.025); }
.road-epic {
  display: grid;
  gap: 2px;
  align-content: start;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border: 0;
  border-left: 3px solid var(--line);
  background: transparent;
  text-align: left;
}
.road-epic.tone-gold, .road-epic.tone-amber { border-left-color: #c2921c; }
.road-epic.tone-green, .road-epic.tone-mint { border-left-color: var(--green); }
.road-epic.tone-blue { border-left-color: #3a5bb0; }
.road-epic.tone-sky { border-left-color: #0f6174; }
.road-epic.tone-red { border-left-color: var(--red); }
.road-epic.tone-navy { border-left-color: var(--navy); }
.road-epic.tone-slate { border-left-color: #64708a; }
.road-epic strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.road-epic .key { width: fit-content; }
.roadmap-track { position: relative; margin: 0 8px; }
.scale-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(36, 48, 74, 0.06);
  pointer-events: none;
}
.epic-span {
  position: absolute;
  top: 20px;
  height: 14px;
  border-radius: 99px;
  min-width: 10px;
}
.road-undated {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.epic-span.c-gold, .epic-span.c-amber { background: #e0b44a; }
.epic-span.c-green, .epic-span.c-mint { background: #7dcaa8; }
.epic-span.c-blue { background: #8aa4e0; }
.epic-span.c-sky { background: #7ec4d4; }
.epic-span.c-red { background: #e39aa3; }
.epic-span.c-navy { background: #8b97b5; }
.epic-span.c-slate { background: #b7becc; }
.when-chip {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  height: auto;
  min-height: 26px;
  padding: 5px 8px;
  align-items: flex-start;
  line-height: 1.25;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(36, 48, 74, 0.05);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
}
.when-chip .key {
  flex: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--subtle);
  font-weight: 700;
  white-space: nowrap;
}
.when-chip .when-title {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.when-chip.late, .when-chip.late .key { border-color: rgba(201, 75, 90, 0.45); color: var(--red); }
.when-chip.done, .when-chip.done .key { color: var(--subtle); }
.roadmap-rest { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.roadmap-rest h3 { margin: 0 0 8px; color: var(--subtle); font-size: 12px; font-weight: 700; }
.rest-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 650;
}

.feed { width: min(760px, 100%); margin: 0 auto; padding: 16px 24px 56px; display: grid; gap: 28px; }
.feed h2 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.04em; }
.feed > .muted { margin: -18px 0 0; max-width: 46em; }
.feed-block { display: grid; gap: 4px; }
.feed-block > h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.feed-day { display: grid; }
.feed-day h3 { margin: 18px 0 2px; font-size: 12px; font-weight: 700; color: var(--subtle); }
.feed-list { display: grid; }
.feed-row {
  width: 100%;
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 14px 8px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border-radius: 14px;
}
.feed-list .feed-row:first-child { border-top: 0; }
button.feed-row { cursor: pointer; }
button.feed-row:hover { background: rgba(255, 252, 247, 0.72); }
.feed-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--navy);
  color: white;
  font-size: 13px;
  font-weight: 700;
}
.feed-id { display: grid; min-width: 0; }
.feed-id strong { font-size: 13px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-time { color: var(--subtle); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; }
.feed-top { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.feed-kind { font-size: 12px; font-weight: 700; color: var(--subtle); }
.feed-kind.comment { color: #c2612d; }
.feed-kind.file_added, .feed-kind.file_removed { color: #0f6174; }
.feed-kind.task_deleted, .feed-kind.epic_deleted, .feed-kind.member_removed { color: var(--red); }
.feed-subject { font-size: 15px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.35; }
.feed-detail {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid rgba(36, 48, 74, 0.18);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.feed-row.fresh .feed-avatar { box-shadow: 0 0 0 3px rgba(224, 112, 58, 0.28); }

/* "Мне": only what concerns the signed-in person. Waiting mentions are loud on purpose. */
.me .me-block { gap: 10px; }
.me-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.me-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.me-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-left: 3px solid transparent;
}
.me-card.waiting { border-left-color: var(--accent); }
.me-card:not(.waiting):not(.unread) { background: transparent; box-shadow: none; border-left-color: transparent; padding-block: 10px; }
.me-card:not(.waiting):not(.unread) .me-card-line { color: var(--subtle); }
.me-card.unread { border-left-color: var(--navy); }
.me-card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-card-top .feed-avatar { width: 28px; height: 28px; font-size: 12px; }
.me-card-top > .muted { margin-left: auto; font-size: 12px; }
.me-card-line { font-size: 13px; line-height: 1.35; min-width: 0; }
.me-card-line strong { font-weight: 700; }
.me-subject {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
}
.me-subject:hover { text-decoration: underline; }
.me-subject .row-key { margin-right: 4px; }
.me-quote {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(224, 112, 58, 0.08);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.me-card:not(.waiting) .me-quote { background: rgba(36, 48, 74, 0.05); font-size: 13px; }
.me-quote .mention { font-weight: 700; color: #c2612d; }
.me-actions { display: flex; gap: 8px; margin-top: 2px; }
.me-task {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
}
.me-task:hover { background: rgba(255, 252, 247, 0.72); }
.me-task-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-task-side { display: flex; gap: 6px; align-items: center; }
.me-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.me-task.late .me-task-title { color: var(--red); }
.me-all { border-top: 1px solid var(--line); padding-top: 14px; }
.me-all > summary { cursor: pointer; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--subtle); }
.me-all[open] > summary { margin-bottom: 8px; }
.feed-all { display: grid; gap: 20px; }
.card .ping {
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.inbox-banner { background: rgba(224, 112, 58, 0.14); color: #8a3f17; font-weight: 600; }

@media (max-width: 800px) {
  .mast, .toolbar { align-items: stretch; flex-direction: column; }
  .tabs { overflow-x: auto; }
  .mast-user { margin-left: 0; }
  .search-field, #epic-filter { margin-left: 0; width: 100%; }
  .tool-rule { display: none; }
  .tool-create { width: 100%; }
  .tool-create .btn.primary { flex: 1; }
  .split, .row, .person-row, .stat-row, .report-split, .feed-row { grid-template-columns: 1fr; }
  .me-task { grid-template-columns: auto minmax(0, 1fr); }
  .me-task-side { grid-column: 1 / -1; }
}

.panel-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.task-ref {
  font-weight: 600;
  color: var(--slate-ink);
  background: var(--slate);
  border-radius: 6px;
  padding: 0 5px;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.task-ref:hover { text-decoration: underline; }
.body-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; font-size: 13px; }
.body-refs.hidden { display: none; }
.body-refs-label { color: var(--subtle); }

/* ---------------------------------------------------------------------------
   Visual refresh (2026-11): calmer lanes, cleaner cards, readable footers.
   Layered on top of the base rules above; later rules win on purpose.
   --------------------------------------------------------------------------- */
:root {
  --card: #ffffff;
  --lane: rgba(36, 48, 74, 0.045);
  --line-soft: rgba(36, 48, 74, 0.08);
  --shadow-card: 0 1px 1px rgba(36, 48, 74, 0.04), 0 2px 6px rgba(36, 48, 74, 0.05);
  --shadow-lift: 0 2px 4px rgba(36, 48, 74, 0.06), 0 14px 32px rgba(36, 48, 74, 0.12);
  --ring: 0 0 0 3px rgba(224, 112, 58, 0.22);
}
body {
  background-color: #f2ede4;
  background-image:
    radial-gradient(900px 420px at 0% -8%, rgba(224, 112, 58, 0.14), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(58, 91, 176, 0.08), transparent 60%);
}
:focus-visible { outline: none; box-shadow: var(--ring); }

/* Header */
.mast {
  gap: 20px;
  padding: 10px 20px;
  background: rgba(255, 253, 250, 0.82);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.brand-mark {
  background: linear-gradient(140deg, #f08a4f, #d65f2a);
  box-shadow: 0 4px 12px rgba(214, 95, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.project-btn {
  border-color: var(--line-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.project-btn:hover { border-color: rgba(36, 48, 74, 0.2); box-shadow: var(--shadow-card); }
.tabs {
  flex: 0 1 auto;
  padding: 4px;
  gap: 2px;
  border-radius: 13px;
  background: rgba(36, 48, 74, 0.05);
}
.tab { padding: 7px 14px; transition: color 0.15s ease, background 0.15s ease; }
.tab:hover:not(.active) { color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.tab.active { box-shadow: 0 2px 8px rgba(43, 54, 82, 0.28); }
.btn { transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { border-color: rgba(36, 48, 74, 0.22); }
.btn.primary { box-shadow: 0 2px 8px rgba(224, 112, 58, 0.3); }
.btn.primary:hover { background: #d0612d; }
.btn.ghost:hover { background: rgba(36, 48, 74, 0.05); }

/* Toolbar */
.toolbar { padding: 14px 20px 6px; }
#epic-filter, .search-field input { border-color: var(--line-soft); box-shadow: var(--shadow-card); }
.search-field { width: 240px; }
.search-field input {
  padding-left: 34px;
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236d7690' stroke-width='1.6' stroke-linecap='round'><circle cx='7' cy='7' r='4.5'/><path d='m10.5 10.5 3 3'/></svg>") no-repeat 11px center / 15px;
}
.filters, .tool-create { background: rgba(36, 48, 74, 0.05); }
.stuck { transition: background 0.15s ease; }
.stuck:hover { background: rgba(201, 75, 90, 0.16); }

/* Board lanes */
.board { gap: 14px; padding: 10px 20px 28px; }
.column {
  flex: 1 1 280px;
  width: auto;
  min-width: 272px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  padding: 10px 8px 10px;
  border-radius: 18px;
  background: var(--lane);
  border: 1px solid rgba(36, 48, 74, 0.04);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.column.drop {
  outline: 0;
  background: rgba(224, 112, 58, 0.08);
  box-shadow: inset 0 0 0 2px rgba(224, 112, 58, 0.55);
}
.column-head { padding: 2px 6px 10px; margin-bottom: 2px; }
.column-head h2 { font-size: 13.5px; letter-spacing: -0.005em; }
.column-head h2::before { width: 9px; height: 9px; box-shadow: 0 0 0 3px rgba(197, 202, 214, 0.35); }
.column.doing .column-head h2::before { box-shadow: 0 0 0 3px rgba(224, 112, 58, 0.2); }
.column.blocked .column-head h2::before { box-shadow: 0 0 0 3px rgba(201, 75, 90, 0.2); }
.column.review .column-head h2::before { box-shadow: 0 0 0 3px rgba(58, 91, 176, 0.2); }
.column.done .column-head h2::before { box-shadow: 0 0 0 3px rgba(44, 143, 104, 0.2); }
.count-pill { background: white; color: var(--subtle); font-weight: 700; box-shadow: var(--shadow-card); }
.column-head .add {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  color: var(--subtle);
  transition: background 0.15s ease, color 0.15s ease;
}
.column-head .add:hover { background: white; color: var(--ink); box-shadow: var(--shadow-card); }
.cards { gap: 8px; flex: 1; align-content: start; }
.empty {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1.5px dashed rgba(36, 48, 74, 0.13);
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}

/* Cards */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 12px 14px 11px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.card[class*="tone-"] { border-left-color: var(--line-soft); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: rgba(36, 48, 74, 0.14); }
.card:active { transform: translateY(0); }
.card.dragging { opacity: 0.5; transform: rotate(1.5deg); }
.card .title { font-size: 14.5px; font-weight: 650; line-height: 1.35; letter-spacing: -0.018em; }
.card.kind-blocker { border-color: rgba(201, 75, 90, 0.35); box-shadow: inset 3px 0 0 var(--red), var(--shadow-card); }
.card.kind-blocker:hover { box-shadow: inset 3px 0 0 var(--red), var(--shadow-lift); }
.card.is-done { background: rgba(255, 255, 255, 0.55); border-color: transparent; box-shadow: none; }

/* Epic label: a soft tinted tag with a colour dot instead of a thick side bar */
.card .card-epic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin: 0 0 7px;
  padding: 2px 8px 2px 7px;
  border-radius: 999px;
  background: var(--slate);
  color: var(--slate-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .card-epic::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; flex: none; }
.card.tone-gold .card-epic { background: var(--gold); color: var(--gold-ink); }
.card.tone-amber .card-epic { background: var(--amber); color: var(--amber-ink); }
.card.tone-green .card-epic { background: var(--c-green); color: var(--c-green-ink); }
.card.tone-mint .card-epic { background: var(--mint); color: var(--mint-ink); }
.card.tone-blue .card-epic { background: var(--blue); color: var(--blue-ink); }
.card.tone-sky .card-epic { background: var(--sky); color: var(--sky-ink); }
.card.tone-red .card-epic { background: var(--c-red); color: var(--c-red-ink); }
.card.tone-navy .card-epic { background: var(--c-navy); color: var(--c-navy-ink); }
.card.tone-slate .card-epic { background: var(--slate); color: var(--slate-ink); }
.card.is-done .card-epic { opacity: 0.7; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 8px; min-width: 0; }
.card .key { font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em; color: #8a92a8; }
.card .card-author { max-width: 13em; font-size: 12px; font-weight: 600; color: var(--subtle); }
.card .type-pill, .card .prio { font-weight: 700; padding: 1px 8px; }
.card .ping { box-shadow: 0 2px 6px rgba(224, 112, 58, 0.35); }

.card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}
.card-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 0; }
.stat-ico {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-ico svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
.stat-ico.ico-check.full { color: var(--green); }
.stat-ico.ico-due.late {
  padding: 1px 7px 1px 6px;
  border-radius: 99px;
  background: rgba(201, 75, 90, 0.1);
  color: var(--red);
}

/* Avatars: one tint per person */
.avatar {
  font-weight: 700;
  box-shadow: 0 0 0 2px white;
  flex: none;
}
.card .avatar { width: 24px; height: 24px; margin-left: auto; }
.avatar.tone-navy { background: #2b3652; }
.avatar.tone-blue { background: #3a5bb0; }
.avatar.tone-sky { background: #1b7f95; }
.avatar.tone-green { background: #2c8f68; }
.avatar.tone-amber { background: #c0841c; }
.avatar.tone-red { background: #c24d5c; }
.avatar.tone-slate { background: #64708a; }
.mast-user .avatar { width: 32px; height: 32px; font-size: 13px; }

.group { box-shadow: var(--shadow-card); border-top: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* Side panel */
.scrim { background: rgba(26, 33, 50, 0.32); backdrop-filter: blur(2px); }
.panel { box-shadow: -20px 0 60px rgba(36, 48, 74, 0.18); border-radius: 18px 0 0 18px; }

/* Shared surfaces on other views get the same softer edge */
.epic-card, .settings-card, .chart-card, .deadline-card, .stat-row, .roadmap, .me-card:is(.waiting, .unread) {
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

@media (max-width: 800px) {
  .tabs { flex: none; }
  .search-field { width: 100%; }
  .column { flex: 0 0 86vw; max-width: none; }
  .panel { border-radius: 0; }
}

/* ---------------------------------------------------------------------------
   Visual refresh, pass 2: status colour, depth, glow.
   --------------------------------------------------------------------------- */
:root {
  --st-todo: #7b86a3;
  --st-doing: #ec7a3f;
  --st-blocked: #d9475c;
  --st-review: #4a6fd8;
  --st-done: #2fa877;
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(36, 48, 74, 0.06),
    0 4px 10px -2px rgba(36, 48, 74, 0.08),
    0 12px 24px -12px rgba(36, 48, 74, 0.14);
  --shadow-lift:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 8px -2px rgba(36, 48, 74, 0.1),
    0 22px 40px -14px rgba(36, 48, 74, 0.28);
}

body {
  background-color: #f1ebe2;
  background-image:
    radial-gradient(1100px 520px at -5% -10%, rgba(236, 122, 63, 0.22), transparent 60%),
    radial-gradient(900px 520px at 105% -5%, rgba(74, 111, 216, 0.16), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(47, 168, 119, 0.1), transparent 60%);
}

/* Header: frosted glass with a warm hairline underneath */
.mast {
  background: rgba(255, 253, 250, 0.7);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 0;
  box-shadow: 0 1px 0 rgba(36, 48, 74, 0.06), 0 8px 24px -16px rgba(36, 48, 74, 0.25);
}
.mast::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--st-doing), #f2b25c 30%, var(--st-review) 70%, var(--st-done));
  opacity: 0.55;
}
.brand-mark { border-radius: 11px; }
.tab.active {
  background: linear-gradient(160deg, #3a4870, #222c45);
  box-shadow: 0 6px 14px -4px rgba(34, 44, 69, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.tab-count { background: linear-gradient(140deg, #f08a4f, #d65f2a); box-shadow: 0 2px 6px rgba(214, 95, 42, 0.4); }
.btn.primary, .tool-create .btn.primary {
  background: linear-gradient(160deg, #f28c50, #d9602b);
  box-shadow: 0 6px 16px -6px rgba(217, 96, 43, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover, .tool-create .btn.primary:hover { background: linear-gradient(160deg, #f5975e, #e06a33); }
.filters, .tool-create { background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(36, 48, 74, 0.06); }
.chip.active { box-shadow: 0 2px 6px rgba(36, 48, 74, 0.12); }
.stuck {
  background: linear-gradient(160deg, rgba(217, 71, 92, 0.14), rgba(217, 71, 92, 0.08));
  box-shadow: inset 0 0 0 1px rgba(217, 71, 92, 0.18);
}
.banner { box-shadow: var(--shadow-card); border: 1px solid rgba(255, 255, 255, 0.6); }
.inbox-banner { background: linear-gradient(100deg, rgba(236, 122, 63, 0.2), rgba(242, 178, 92, 0.14)); }

/* Status colour for each lane */
.column { --st: var(--st-todo); }
.column.doing { --st: var(--st-doing); }
.column.blocked { --st: var(--st-blocked); }
.column.review { --st: var(--st-review); }
.column.done { --st: var(--st-done); }
.column {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--st) 13%, transparent), transparent 220px),
    rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 2px rgba(36, 48, 74, 0.04), 0 18px 40px -24px rgba(36, 48, 74, 0.3);
  backdrop-filter: blur(8px);
}
.column::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--st), color-mix(in srgb, var(--st) 40%, white));
}
.column-head h2 { color: color-mix(in srgb, var(--st) 55%, var(--ink)); }
.column-head h2::before,
.column.doing .column-head h2::before,
.column.blocked .column-head h2::before,
.column.review .column-head h2::before,
.column.done .column-head h2::before {
  background: var(--st);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 22%, transparent), 0 0 10px color-mix(in srgb, var(--st) 60%, transparent);
}
.count-pill {
  background: color-mix(in srgb, var(--st) 16%, white);
  color: color-mix(in srgb, var(--st) 70%, var(--ink));
  box-shadow: none;
}
.column.drop {
  background: color-mix(in srgb, var(--st) 14%, rgba(255, 255, 255, 0.6));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--st) 60%, transparent), 0 18px 40px -20px color-mix(in srgb, var(--st) 60%, transparent);
}
.empty { border-color: color-mix(in srgb, var(--st, #7b86a3) 30%, transparent); background: rgba(255, 255, 255, 0.35); }

/* Cards: layered shadow, epic colour as a soft glow on the top edge */
.card { --epic: #9aa3b8; border-color: rgba(36, 48, 74, 0.07); }
.card.tone-gold, .card.tone-amber { --epic: #d9a22a; }
.card.tone-green, .card.tone-mint { --epic: #2fa877; }
.card.tone-blue { --epic: #4a6fd8; }
.card.tone-sky { --epic: #1a9ab5; }
.card.tone-red { --epic: #d9475c; }
.card.tone-navy { --epic: #3a4870; }
.card.tone-slate { --epic: #7b86a3; }
.card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--epic) 7%, white), white 46px);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 14px; right: 14px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--epic);
  opacity: 0.85;
}
.card:hover {
  border-color: color-mix(in srgb, var(--epic) 35%, transparent);
  box-shadow: var(--shadow-lift), 0 0 0 3px color-mix(in srgb, var(--epic) 12%, transparent);
}
.card .card-epic {
  background: color-mix(in srgb, var(--epic) 15%, white);
  color: color-mix(in srgb, var(--epic) 75%, #1c2438);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--epic) 22%, transparent);
}
.card .card-epic::before { background: var(--epic); box-shadow: 0 0 6px var(--epic); }
.card.kind-blocker {
  background: linear-gradient(180deg, rgba(217, 71, 92, 0.08), white 60px);
  border-color: rgba(217, 71, 92, 0.3);
  box-shadow: inset 3px 0 0 var(--st-blocked), var(--shadow-card);
}
.card.kind-blocker:hover { box-shadow: inset 3px 0 0 var(--st-blocked), var(--shadow-lift), 0 0 0 3px rgba(217, 71, 92, 0.12); }
.card.is-done { background: rgba(255, 255, 255, 0.6); box-shadow: 0 1px 2px rgba(36, 48, 74, 0.05); }
.card.is-done::before { opacity: 0.3; }
.card.is-done .card-epic { opacity: 0.75; }
.card.is-done .title { color: #7f889d; }

.card .type-pill.blocker, .card .type-pill.bug, .card .prio.high, .card .prio.urgent {
  background: linear-gradient(160deg, #fbe0e4, #f6cdd3);
  color: #a52f43;
  box-shadow: inset 0 0 0 1px rgba(217, 71, 92, 0.18);
}
.card .prio.urgent { background: linear-gradient(160deg, #e2546a, #c43a50); color: white; }
.card .ping {
  background: linear-gradient(160deg, #f28c50, #d9602b);
  animation: ping-glow 2.2s ease-in-out infinite;
}
@keyframes ping-glow {
  0%, 100% { box-shadow: 0 2px 6px rgba(217, 96, 43, 0.35); }
  50% { box-shadow: 0 2px 6px rgba(217, 96, 43, 0.35), 0 0 0 4px rgba(236, 122, 63, 0.18); }
}
.card .meta { border-top: 1px dashed rgba(36, 48, 74, 0.1); }
.stat-ico.ico-due.late { background: linear-gradient(160deg, #fde6e9, #f9d6db); }
.stat-ico.ico-check.full {
  padding: 1px 7px 1px 6px;
  border-radius: 99px;
  background: rgba(47, 168, 119, 0.12);
}

/* Avatars: glossy gradient discs */
.avatar { box-shadow: 0 0 0 2px white, 0 3px 8px -2px rgba(36, 48, 74, 0.35); }
.avatar.tone-navy { background: linear-gradient(150deg, #4a5a86, #222c45); }
.avatar.tone-blue { background: linear-gradient(150deg, #6d8ff0, #3355b8); }
.avatar.tone-sky { background: linear-gradient(150deg, #3cc0d8, #137a91); }
.avatar.tone-green { background: linear-gradient(150deg, #4cc795, #23845d); }
.avatar.tone-amber { background: linear-gradient(150deg, #f1b545, #c27f12); }
.avatar.tone-red { background: linear-gradient(150deg, #ef6f82, #b83349); }
.avatar.tone-slate { background: linear-gradient(150deg, #97a1ba, #5b6680); }

@media (prefers-reduced-motion: reduce) {
  .card, .card .ping { transition: none; animation: none; }
}

/* ---------------------------------------------------------------------------
   Pass 3: no edge stripes anywhere. Colour lives in headers, tags and surfaces.
   --------------------------------------------------------------------------- */
.column::before, .card::before { content: none; display: none; }
.card, .card[class*="tone-"], .card.is-done { border-left-width: 1px; }

/* Lane header: the status name sits in a tinted capsule */
.column-head { padding: 2px 4px 10px; }
.column-head h2 {
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--st) 14%, white);
  color: color-mix(in srgb, var(--st) 72%, var(--ink));
  box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--st) 70%, transparent);
}
.column-head h2::before,
.column.doing .column-head h2::before,
.column.blocked .column-head h2::before,
.column.review .column-head h2::before,
.column.done .column-head h2::before {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 25%, transparent);
}
.count-pill { background: rgba(255, 255, 255, 0.85); }
.column {
  background:
    radial-gradient(120% 260px at 50% -40px, color-mix(in srgb, var(--st) 14%, transparent), transparent 70%),
    rgba(255, 255, 255, 0.42);
}

/* Cards: plain white, colour comes from the epic tag; hover glows in the epic colour */
.card { background: white; }
.card:hover { box-shadow: var(--shadow-lift), 0 0 0 3px color-mix(in srgb, var(--epic) 14%, transparent); }

/* Blockers: whole card tinted with a soft red ring instead of a side bar */
.card.kind-blocker {
  background: linear-gradient(160deg, #fff5f6, #ffeef0);
  border-color: rgba(217, 71, 92, 0.28);
  box-shadow: var(--shadow-card), 0 0 0 3px rgba(217, 71, 92, 0.07);
}
.card.kind-blocker:hover { box-shadow: var(--shadow-lift), 0 0 0 3px rgba(217, 71, 92, 0.16); }
.card.is-done { background: rgba(255, 255, 255, 0.6); }
.mast::after { content: none; display: none; }

/* No side stripes on the other views either */
.group, .group[class*="tone-"] { border-left: 1px solid var(--line-soft); }
.road-epic, .road-epic[class*="tone-"] { border-left: 0; }
.me-card, .me-card.waiting, .me-card.unread { border-left: 0; }
.me-card.waiting { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--card)), var(--card)); box-shadow: var(--shadow-card), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.me-card.unread { box-shadow: var(--shadow-card), 0 0 0 1px color-mix(in srgb, var(--navy) 18%, transparent); }
.feed-detail { border-left: 0; padding: 6px 10px; border-radius: 10px; background: rgba(36, 48, 74, 0.05); }

/* ---------------------------------------------------------------------------
   Colour schemes. Picked per viewer in Settings, stored in this browser,
   applied as <html data-theme="…">. "warm" is the default.
   --------------------------------------------------------------------------- */
:root {
  --page: #f1ebe2;
  --glow-1: rgba(236, 122, 63, 0.22);
  --glow-2: rgba(74, 111, 216, 0.16);
  --glow-3: rgba(47, 168, 119, 0.1);
  --brand-a: #f28c50;
  --brand-b: #d9602b;
  --brand-glow: rgba(217, 96, 43, 0.6);
  --nav-a: #3a4870;
  --nav-b: #222c45;
  --glass: rgba(255, 253, 250, 0.7);
  --lane-glass: rgba(255, 255, 255, 0.42);
  --field: #ffffff;
}
[data-theme="ocean"] {
  --page: #e8eff2;
  --glow-1: rgba(26, 154, 181, 0.24);
  --glow-2: rgba(74, 111, 216, 0.18);
  --glow-3: rgba(47, 168, 160, 0.12);
  --brand-a: #2bb3c8; --brand-b: #127b93; --brand-glow: rgba(18, 123, 147, 0.55);
  --nav-a: #24506e; --nav-b: #12293d;
  --accent: #1a9ab5; --navy: #1d3a52;
  --glass: rgba(250, 253, 254, 0.72);
}
[data-theme="forest"] {
  --page: #ebeee4;
  --glow-1: rgba(47, 168, 119, 0.22);
  --glow-2: rgba(194, 146, 28, 0.14);
  --glow-3: rgba(26, 154, 181, 0.1);
  --brand-a: #46b885; --brand-b: #23845b; --brand-glow: rgba(35, 132, 91, 0.55);
  --nav-a: #345244; --nav-b: #1b2e25;
  --accent: #2fa877; --navy: #24392f;
  --glass: rgba(252, 253, 249, 0.72);
}
[data-theme="lavender"] {
  --page: #eeebf5;
  --glow-1: rgba(123, 92, 224, 0.2);
  --glow-2: rgba(226, 104, 160, 0.14);
  --glow-3: rgba(74, 111, 216, 0.12);
  --brand-a: #9c7ff2; --brand-b: #6a4bd1; --brand-glow: rgba(106, 75, 209, 0.55);
  --nav-a: #463d78; --nav-b: #26204a;
  --accent: #7b5ce0; --navy: #322a5c;
  --glass: rgba(253, 252, 255, 0.72);
}
[data-theme="night"] {
  color-scheme: dark;
  --page: #121722;
  --glow-1: rgba(236, 122, 63, 0.14);
  --glow-2: rgba(74, 111, 216, 0.16);
  --glow-3: rgba(47, 168, 119, 0.08);
  --bg: #1a2030;
  --surface: #1d2433;
  --card: #222a3c;
  --field: #1a2030;
  --ink: #e7eaf3;
  --subtle: #98a1b8;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.07);
  --navy: #3a4870;
  --glass: rgba(20, 25, 37, 0.78);
  --lane-glass: rgba(255, 255, 255, 0.035);
  --nav-a: #4a5a8a; --nav-b: #2c3658;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 6px 12px rgba(0, 0, 0, 0.3), 0 24px 44px -14px rgba(0, 0, 0, 0.6);
  --slate: #2c3447; --slate-ink: #b8c0d4;
}

/* Wire the tokens into the surfaces that pass 1-3 coloured directly */
body {
  background-color: var(--page);
  background-image:
    radial-gradient(1100px 520px at -5% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 520px at 105% -5%, var(--glow-2), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, var(--glow-3), transparent 60%);
}
.mast { background: var(--glass); }
.brand-mark, .tab-count { background: linear-gradient(140deg, var(--brand-a), var(--brand-b)); box-shadow: 0 4px 12px -2px var(--brand-glow); }
.btn.primary, .tool-create .btn.primary, .card .ping {
  background: linear-gradient(160deg, var(--brand-a), var(--brand-b));
  box-shadow: 0 6px 16px -6px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover, .tool-create .btn.primary:hover { background: linear-gradient(160deg, var(--brand-a), var(--brand-a)); }
.tab.active { background: linear-gradient(160deg, var(--nav-a), var(--nav-b)); }
.tab.active .tab-count { background: white; color: var(--nav-b); }
.column {
  background:
    radial-gradient(120% 260px at 50% -40px, color-mix(in srgb, var(--st) 14%, transparent), transparent 70%),
    var(--lane-glass);
}
.column-head h2 { background: color-mix(in srgb, var(--st) 15%, var(--card)); }
.count-pill { background: color-mix(in srgb, var(--card) 85%, transparent); }
.card { background: var(--card); }
.card .card-epic { background: color-mix(in srgb, var(--epic) 15%, var(--card)); }
.card.is-done { background: color-mix(in srgb, var(--card) 60%, transparent); }
.mention, .comment .mention, .me-quote .mention, .take { color: var(--brand-b); }

/* Night: dark fields and popovers */
[data-theme="night"] input, [data-theme="night"] select, [data-theme="night"] textarea,
[data-theme="night"] .project-btn, [data-theme="night"] .menu, [data-theme="night"] .mention-list,
[data-theme="night"] .when-chip, [data-theme="night"] #epic-filter,
[data-theme="night"] .settings-card select, [data-theme="night"] .settings-card input {
  background-color: var(--field);
  border-color: var(--line);
  color: var(--ink);
}
[data-theme="night"] .search-field input { background-color: var(--field); }
[data-theme="night"] .chip.active { background: var(--card); color: var(--ink); }
[data-theme="night"] .filters, [data-theme="night"] .tool-create, [data-theme="night"] .tabs { background: rgba(255, 255, 255, 0.05); }
[data-theme="night"] .tool-create .btn:hover, [data-theme="night"] .tab:hover:not(.active) { background: rgba(255, 255, 255, 0.08); }
[data-theme="night"] .column { border-color: rgba(255, 255, 255, 0.05); }
[data-theme="night"] .column-head h2 { color: color-mix(in srgb, var(--st) 60%, white); }
[data-theme="night"] .card .card-epic { color: color-mix(in srgb, var(--epic) 55%, white); }
[data-theme="night"] .card.kind-blocker { background: linear-gradient(160deg, #3a2430, #2e2230); border-color: rgba(217, 71, 92, 0.4); }
[data-theme="night"] .card .type-pill.blocker, [data-theme="night"] .card .type-pill.bug,
[data-theme="night"] .card .prio.high { background: rgba(217, 71, 92, 0.2); color: #ff9aaa; box-shadow: none; }
[data-theme="night"] .stat-ico.ico-due.late { background: rgba(217, 71, 92, 0.18); color: #ff8b9c; }
[data-theme="night"] .card .due.late, [data-theme="night"] .row-due.late { color: #ff8b9c; }
[data-theme="night"] .avatar { box-shadow: 0 0 0 2px var(--card), 0 3px 8px -2px rgba(0, 0, 0, 0.5); }
[data-theme="night"] .banner { background: rgba(194, 146, 28, 0.14); color: #f0d48a; border-color: rgba(255, 255, 255, 0.06); }
[data-theme="night"] .inbox-banner { background: rgba(236, 122, 63, 0.16); color: #ffc29e; }
[data-theme="night"] .btn { background: var(--card); border-color: var(--line); }
[data-theme="night"] .btn.ghost { background: transparent; }
[data-theme="night"] .btn.primary { background: linear-gradient(160deg, var(--brand-a), var(--brand-b)); color: white; }
[data-theme="night"] .empty { background: rgba(255, 255, 255, 0.02); }
[data-theme="night"] kbd { background: rgba(255, 255, 255, 0.06); }
[data-theme="night"] .check, [data-theme="night"] .comment, [data-theme="night"] .file-row { background: var(--field); }
[data-theme="night"] .scrim { background: rgba(0, 0, 0, 0.5); }

/* Settings: scheme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-option {
  display: grid;
  gap: 8px;
  padding: 8px 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.theme-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.theme-option.active { box-shadow: var(--shadow-card), 0 0 0 2px var(--accent); }
.theme-swatch {
  position: relative;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  gap: 5px;
  align-items: flex-end;
  padding: 8px;
}
.theme-swatch i { display: block; width: 18px; height: 18px; border-radius: 99px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.theme-swatch i:first-child { width: 34px; border-radius: 6px; }
.theme-option span { padding: 0 2px; }
/* Epic tags follow the epic colour in every scheme (beats the old per-tone fills) */
.card[class] .card-epic {
  background: color-mix(in srgb, var(--epic) 15%, var(--card));
  color: color-mix(in srgb, var(--epic) 75%, var(--ink));
}
[data-theme="night"] .card[class] .card-epic {
  background: color-mix(in srgb, var(--epic) 22%, var(--card));
  color: color-mix(in srgb, var(--epic) 55%, white);
}
:root:not([data-theme="night"]) .inbox-banner {
  background: linear-gradient(100deg, color-mix(in srgb, var(--brand-a) 22%, transparent), color-mix(in srgb, var(--brand-a) 8%, transparent));
  color: color-mix(in srgb, var(--brand-b) 70%, var(--ink));
}

/* "Что нового" popup */
.whats-new {
  width: min(480px, calc(100% - 32px));
  max-height: min(640px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20, 26, 40, 0.45), 0 8px 24px -8px rgba(20, 26, 40, 0.2);
  overflow: hidden;
}
.whats-new[open] { display: flex; flex-direction: column; animation: wn-in 0.22s ease-out; }
.whats-new::backdrop { background: rgba(20, 26, 40, 0.38); backdrop-filter: blur(3px); }
@keyframes wn-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.wn-hero {
  padding: 22px 24px 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand-a) 30%, transparent), transparent 60%),
    radial-gradient(120% 140% at 100% 0%, var(--glow-2), transparent 60%);
}
.wn-hero h2 { margin: 8px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.035em; }
.wn-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: linear-gradient(160deg, var(--brand-a), var(--brand-b));
  color: white;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 4px 12px -4px var(--brand-glow);
}
.wn-body { padding: 6px 24px 4px; overflow: auto; display: grid; gap: 18px; }
.wn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wn-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.wn-date { color: var(--subtle); font-size: 12px; font-weight: 650; white-space: nowrap; }
.wn-list { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.wn-list li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.wn-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.wn-actions { padding: 16px 24px 20px; display: flex; justify-content: flex-end; }
.wn-actions .btn { min-width: 120px; }

/* ---------------------------------------------------------------------------
   Task window. Phone: one column in the old field order. Desktop: a centred
   window one screen tall - title, text, checklist, files on the left; author,
   fields and comments on the right; each column scrolls on its own.
   --------------------------------------------------------------------------- */
.panel-grid, .panel-main, .panel-side { display: contents; }
#panel-author { order: 1; }
#field-title { order: 2; }
.panel-side .panel-meta { order: 3; }
#field-body { order: 4; }
#body-refs { order: 5; }
#panel .panel-scroll > .panel-head { order: 0; }
#panel section { order: 6; }

@media (min-width: 1000px) {
  #panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(1240px, calc(100vw - 64px));
    height: min(920px, calc(100vh - 48px));
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    transform: translate(-50%, -50%);
    box-shadow: 0 40px 100px -30px rgba(20, 26, 40, 0.5), 0 12px 32px -12px rgba(20, 26, 40, 0.25);
    animation: task-in 0.18s ease-out;
  }
  #panel .panel-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding: 18px 24px 0;
  }
  .panel-grid {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    gap: 20px;
  }
  .panel-main, .panel-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow: auto;
    padding-bottom: 20px;
  }
  .panel-main { padding-right: 4px; }
  .panel-side {
    padding: 16px 16px 20px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--ink) 4%, var(--card));
  }
  .panel-side .panel-meta { padding-top: 0; }
  .panel-side .panel-meta select, .panel-side .panel-meta input { background-color: var(--card); }
  .panel-side #comment-form textarea, .panel-side .comment { background: var(--card); }
  #panel .panel-title { font-size: 26px; padding-top: 4px; }
  #panel .panel-body { flex: none; min-height: 200px; font-size: 15px; }
  #panel section { flex: none; }
  #panel > .panel-actions { padding: 12px 24px 14px; border-radius: 0 0 22px 22px; }

  #epic-panel {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(620px, calc(100vw - 64px));
    max-height: calc(100vh - 48px);
    border-radius: 22px;
    transform: translate(-50%, -50%);
    animation: task-in 0.18s ease-out;
  }
}
@keyframes task-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { #panel, #epic-panel { animation: none; } }
/* The head's own button group is not the footer: no rule above it */
#panel .panel-head .panel-actions { padding: 0; border-top: 0; background: transparent; }

/* "Что создаём?" - asked by "+" and "Новая задача" */
.kind-picker {
  width: min(520px, calc(100% - 32px));
  padding: 22px 22px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20, 26, 40, 0.45), 0 8px 24px -8px rgba(20, 26, 40, 0.2);
}
.kind-picker[open] { animation: wn-in 0.18s ease-out; }
.kind-picker::backdrop { background: rgba(20, 26, 40, 0.32); backdrop-filter: blur(3px); }
.kind-picker h2 { margin: 0 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.kind-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kind-option {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--card);
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.kind-option strong { font-size: 16px; letter-spacing: -0.02em; }
.kind-option > span:last-child { color: var(--subtle); font-size: 13px; line-height: 1.35; }
.kind-option:hover, .kind-option:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.kind-option[data-kind="task"]:hover, .kind-option[data-kind="task"]:focus-visible { border-color: color-mix(in srgb, var(--st-review) 45%, transparent); }
.kind-option[data-kind="bug"]:hover, .kind-option[data-kind="bug"]:focus-visible { border-color: color-mix(in srgb, var(--st-blocked) 45%, transparent); }
.kind-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.kind-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kind-ico.task { background: color-mix(in srgb, var(--st-review) 14%, var(--card)); color: var(--st-review); }
.kind-ico.bug { background: color-mix(in srgb, var(--st-blocked) 14%, var(--card)); color: var(--st-blocked); }
.kind-keys { margin: 12px 0 0; font-size: 12px; }
@media (max-width: 520px) { .kind-options { grid-template-columns: 1fr; } }

/* Bug report form inside the task window */
.bug-form {
  order: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  padding: 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--st-blocked) 5%, var(--card));
  border: 1px solid color-mix(in srgb, var(--st-blocked) 14%, transparent);
}
.bug-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--subtle); min-width: 0; }
.bug-form .bug-wide { grid-column: 1 / -1; }
.bug-form textarea, .bug-form input, .bug-form select {
  background-color: var(--card);
  border-color: var(--line-soft);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.bug-form textarea { resize: none; overflow: hidden; min-height: 44px; line-height: 1.45; }
.bug-form select, .bug-form input { height: 38px; padding-top: 0; padding-bottom: 0; }
.bug-hint { grid-column: 1 / -1; margin: 0; color: var(--subtle); font-size: 12.5px; font-weight: 600; }
@media (max-width: 640px) { .bug-form { grid-template-columns: 1fr; } }
#panel .bug-form { flex: none; }

/* Task brief: same frame as the bug form, in the review blue instead of red */
.task-form {
  background: color-mix(in srgb, var(--st-review) 5%, var(--card));
  border-color: color-mix(in srgb, var(--st-review) 14%, transparent);
}
.plat-field { display: grid; gap: 8px; }
.plat-label { font-size: 12px; font-weight: 700; color: var(--subtle); }
.plat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plat-chip {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  background: var(--card);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.plat-chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--st-review) 35%, transparent); }
.plat-chip.on {
  background: linear-gradient(160deg, color-mix(in srgb, var(--st-review) 85%, white), var(--st-review));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--st-review) 70%, transparent);
}
.plat-note { margin: 0; font-size: 12.5px; font-weight: 600; color: #b26a12; }
[data-theme="night"] .plat-note { color: #f2c072; }

/* Platform tags on cards */
.card .plat-tag {
  padding: 1px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 6%, var(--card));
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}

/* ── Login: brand block, spacing, glyph inside brand marks ───────────── */
.brand-mark svg { width: 20px; height: 20px; fill: currentColor; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; }
.brand-mark.big svg { width: 30px; height: 30px; }
.login-card { gap: 14px; padding: 36px 32px 32px; }
.login-brand { display: grid; justify-items: start; gap: 0; margin-bottom: 10px; }
.login-card .login-brand h1 { margin: 20px 0 0; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; }
.login-tagline {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, var(--brand-a, var(--accent)), var(--brand-b, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card .btn.primary { margin-top: 12px; padding: 13px 16px; font-size: 16px; }

/* Shown until boot() knows whether there is a session. The spinner fades in after a
   beat, so a fast reload goes straight to the board without a flicker. */
.boot-loader { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 50; }
.boot-loader.hidden { display: none; }
.boot-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(36, 48, 74, 0.14);
  border-top-color: var(--accent);
  opacity: 0;
  animation: boot-in 0.2s ease 0.25s forwards, boot-spin 0.8s linear infinite;
}
@keyframes boot-in { to { opacity: 1; } }
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* ---------------- Workspace (0022): sprints, releases, labels, links, templates ---------------- */
/* No coloured edge stripes: state is shown with pills, dots and fills. */

.label-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--slate);
  color: var(--slate-ink);
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.label-chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.label-chips:empty { display: none; }
.points-pill {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 6px;
  background: var(--c-navy);
  color: var(--c-navy-ink);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.points-pill.empty { background: transparent; color: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.parent-tag, .wait-tag { font-size: 11px; font-weight: 700; color: var(--subtle); }
.wait-tag { color: var(--red); }
.row-title .label-chip, .row-title .points-pill { margin-left: 6px; flex: none; }

.count-pill.wip-full { background: var(--amber); color: var(--amber-ink); }
.count-pill.wip-over { background: var(--c-red); color: var(--c-red-ink); font-weight: 750; }

.board-wrap { display: grid; gap: 10px; }
.board-wrap .board { min-height: calc(100vh - 200px); }
.sprint-strip {
  margin: 4px 16px 0;
  padding: 12px 16px;
  background: var(--card, var(--surface));
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.sprint-copy { display: grid; gap: 2px; min-width: 220px; flex: 1; }
.sprint-goal { font-size: 13px; color: var(--ink); }
.sprint-goal.pad { padding: 0 16px 6px; margin: 0; color: var(--subtle); }
.sprint-meter { display: grid; gap: 2px; min-width: 200px; }
.sprint-meter .bar { margin: 0; width: 220px; }

.plan-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.plan-head .backlog-note { flex: 1; margin: 0; }
.group.sprint-group, .group.plan-group { border-left: 0; }
.plan-group-head {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  cursor: default;
}
.plan-group-head .epic-title { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.plan-group-head .epic-meta { color: var(--subtle); font-size: 12px; }
.plan-tools { margin-left: auto; display: flex; gap: 6px; }
.plan-tools .btn { padding: 5px 10px; font-size: 12.5px; }
.sprint-group.is-active .plan-group-head { background: rgba(224, 112, 58, 0.08); }
.sprint-state {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--slate);
  color: var(--slate-ink);
}
.sprint-state.active { background: var(--gold); color: var(--gold-ink); }

.releases { gap: 12px; }
.release-card {
  background: var(--card, var(--surface));
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}
.release-card.state-released { box-shadow: none; background: rgba(255, 252, 247, 0.55); }
.release-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.release-top select { width: auto; }
.release-title { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.release-title h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.release-title .late { color: var(--red); }
.release-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--slate); color: var(--slate-ink); }
.release-pill.testing { background: var(--blue); color: var(--blue-ink); }
.release-pill.released { background: var(--c-green); color: var(--c-green-ink); }
.release-card .bar { margin: 2px 0; }
.release-card .bar span { background: var(--green); }
.release-notes { margin: 0; white-space: pre-wrap; font-size: 13px; }
.release-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.release-actions .btn { padding: 5px 10px; font-size: 12.5px; }

.rel-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.rel-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(36, 48, 74, 0.035);
  font-size: 13px;
  min-width: 0;
}
.rel-word { color: var(--subtle); font-size: 12px; font-weight: 650; white-space: nowrap; }
.rel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-row .row-status { flex: none; }
.rel-warn { font-size: 12.5px; color: var(--red); font-weight: 650; padding: 2px 2px 4px; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--subtle);
  font: inherit;
  font-size: 12.5px;
  padding: 0 4px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.panel-parent { margin: 0 0 6px; font-size: 12.5px; color: var(--subtle); }
.labels-field { margin-top: 6px; }
#link-form select { width: auto; flex: none; }

.kind-templates { margin-top: 12px; }
.kind-templates.hidden + .kind-keys { margin-top: 12px; }
.form-dialog form { display: grid; gap: 10px; min-width: min(420px, 82vw); }
.form-dialog label { display: grid; gap: 6px; font-size: 12px; color: var(--subtle); }
.form-dialog .check-label, .settings-card .check-label {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
}
.field-hint { font-size: 11.5px; color: var(--subtle); }
.form-dialog .wn-actions { display: flex; gap: 8px; justify-content: flex-end; }

.column-row {
  display: grid !important;
  grid-template-columns: minmax(140px, 1.4fr) minmax(120px, 1fr) minmax(100px, 0.8fr) 90px auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.column-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.column-tools .btn { padding: 5px 9px; font-size: 12.5px; }
.icon-btn { min-width: 30px; }
.template-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.admin-row { grid-template-columns: 36px minmax(0, 1fr) auto; cursor: pointer; }
.danger-zone { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.danger-zone p { flex: 1; margin: 0; }

.menu-archive { padding: 6px 8px; }
.menu-archive summary { cursor: pointer; padding: 4px 4px; }
.preset-about { margin: -2px 0 2px; font-size: 12px; line-height: 1.35; }

.chart-scope { width: auto; margin-left: 10px; font-size: 13px; padding: 3px 8px; vertical-align: middle; }
.bars-card { display: grid; gap: 6px; }
.bars-card > p { margin: 0; }
.bars { display: flex; gap: 10px; align-items: stretch; height: 170px; padding: 8px 4px 0; }
.bar-col { flex: 1; display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
.bar-stack { display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.bar-v {
  position: relative;
  flex: 1;
  max-width: 26px;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: var(--slate);
}
.bar-v.done { background: var(--green); }
.bar-v.plan { background: #b9c0cf; }
.bar-v b {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--subtle);
  font-weight: 700;
}
.bar-label { font-size: 11px; color: var(--subtle); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch-bar { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch-bar.done { background: var(--green); }
.swatch-bar.plan { background: #b9c0cf; }

.people-card { display: grid; gap: 8px; }
.people-card > p { margin: 0; }
.people-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.people-table th { text-align: right; font-size: 11.5px; color: var(--subtle); font-weight: 650; padding: 4px 8px; }
.people-table th:first-child { text-align: left; }
.people-table td { text-align: right; padding: 7px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.people-table td.who { text-align: left; display: flex; gap: 8px; align-items: center; font-weight: 650; }
.people-table td.who .avatar { margin: 0; width: 24px; height: 24px; }
.people-table td.late { color: var(--red); font-weight: 700; }
.people-table td.warn { color: #c2612d; font-weight: 700; }
.people-table tr:not(:first-child) { cursor: pointer; }
.people-table tr:not(:first-child):hover td { background: rgba(36, 48, 74, 0.03); }

.search-dialog {
  border: 0;
  border-radius: 18px;
  padding: 20px;
  width: min(620px, 92vw);
  background: var(--card, var(--surface));
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(20, 26, 40, 0.25);
}
.search-dialog::backdrop { background: rgba(20, 26, 40, 0.32); backdrop-filter: blur(3px); }
.search-dialog h2 { font-size: 17px; margin: 0 0 10px; }
.search-dialog textarea { width: 100%; font-family: var(--sans); }
.search-results { list-style: none; margin: 10px 0 6px; padding: 0; max-height: 50vh; overflow: auto; display: grid; gap: 2px; }
.search-hit {
  width: 100%;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
}
.search-hit .row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit.active, .search-hit:hover { background: rgba(224, 112, 58, 0.1); }
#search-all { white-space: nowrap; }
#search-all kbd { margin-left: 4px; }

[data-theme="night"] .release-card, [data-theme="night"] .sprint-strip, [data-theme="night"] .search-dialog { background: var(--card, var(--surface)); }
[data-theme="night"] .rel-row { background: rgba(255, 255, 255, 0.04); }

@media (max-width: 760px) {
  .column-row { grid-template-columns: 1fr 1fr; }
  .column-tools { grid-column: 1 / -1; }
  .people-table th:nth-child(5), .people-table td:nth-child(5), .people-table th:nth-child(6), .people-table td:nth-child(6) { display: none; }
  #search-all { display: none; }
  .sprint-meter .bar { width: 160px; }
}

/* New project window */
.np-add { font-weight: 700; color: var(--accent); }
/* Fixed size: switching presets scrolls the preview inside, the window never resizes. */
.np-dialog { width: min(920px, calc(100% - 32px)); height: min(780px, calc(100vh - 48px)); max-height: none; overflow: hidden; }
.np-dialog[open] { display: flex; flex-direction: column; }
.np-form { display: grid; gap: 16px; flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); grid-auto-rows: auto; }
.np-form .np-error:empty { display: none; }
.np-grid { min-height: 0; height: 100%; }
.np-presets { max-height: 100%; overflow: auto; padding: 2px; }
.np-side { min-height: 0; height: 100%; grid-template-rows: auto auto auto auto auto minmax(0, 1fr); }
.np-side > .field-hint { margin-top: -8px; }
.np-preview-wrap { min-height: 0; overflow: auto; border-radius: 14px; }
.np-head h2 { margin: 0 0 4px; }
.np-head p { margin: 0; }
.np-grid { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.np-presets { display: grid; gap: 8px; }
.np-preset {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card, var(--surface));
  transition: border-color 0.12s ease, background 0.12s ease;
}
.np-preset strong { font-size: 14.5px; letter-spacing: -0.01em; }
.np-preset span { font-size: 12px; color: var(--subtle); }
.np-preset:hover { border-color: rgba(36, 48, 74, 0.25); }
.np-preset.active { border-color: var(--accent); background: rgba(224, 112, 58, 0.08); box-shadow: 0 0 0 1px var(--accent); }
.np-side { display: grid; gap: 12px; }
.np-side label { display: grid; gap: 6px; font-size: 12px; color: var(--subtle); }
.np-side .split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.np-dates-hint { margin-top: -6px; }
.np-preview { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(36, 48, 74, 0.04); }
.np-preview h3 { margin: 0; font-size: 15px; }
.np-preview > p { margin: -4px 0 0; }
.np-facts, .np-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.np-fact { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--c-navy); color: var(--c-navy-ink); }
.np-section { display: grid; gap: 6px; }
.np-label { font-size: 11.5px; font-weight: 700; color: var(--subtle); }
.np-col, .np-tpl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--card, var(--surface));
  box-shadow: inset 0 0 0 1px var(--line);
}
.np-col::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #c5cad6; }
.np-col.doing::before { background: var(--accent); }
.np-col.blocked::before { background: var(--red); }
.np-col.review::before { background: #3a5bb0; }
.np-col.done::before { background: var(--green); }
.np-tpl { cursor: help; }
.np-note { margin: 0; }
.np-error { margin: 0; }
.np-form .wn-actions { display: flex; gap: 8px; justify-content: flex-end; }
[data-theme="night"] .np-preview { background: rgba(255, 255, 255, 0.04); }
@media (max-width: 720px), (max-height: 600px) {
  .np-dialog { height: auto; max-height: calc(100vh - 24px); overflow: auto; }
  .np-dialog[open] { display: block; }
  .np-form, .np-grid, .np-side { height: auto; grid-template-rows: none; }
  .np-preview-wrap { overflow: visible; }
}
@media (max-width: 720px) {
  .np-grid { grid-template-columns: 1fr; }
  .np-presets { grid-template-columns: 1fr 1fr; }
}

/* Project settings form: one field per row, pairs side by side */
.settings-card form.project-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  align-items: start;
}
.settings-card form.project-form label { min-width: 0; }
.project-form .pf-wide { grid-column: 1 / -1; }
.project-form label.is-off { opacity: 0.45; }
.project-form > .field-hint { margin-top: -8px; }
.pf-toggles { display: grid; gap: 8px; }
.settings-card .pf-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(36, 48, 74, 0.035);
  cursor: pointer;
  color: var(--ink);
  font-size: 13.5px;
}
.pf-toggle input { margin-top: 2px; flex: none; }
.pf-toggle-copy { display: grid; gap: 2px; }
.pf-toggle-copy span { font-size: 12px; color: var(--subtle); }
.pf-actions { display: flex; justify-content: flex-end; }
.danger-zone .btn { flex: none; }

/* Columns: a compact list; editing happens in a small window */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.card-head .btn { padding: 6px 12px; }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.col-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  padding: 2px 6px 2px 2px;
  transition: background 0.12s ease;
}
.col-item:hover { background: rgba(36, 48, 74, 0.04); }
.col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  font: inherit;
}
.col-dot { width: 9px; height: 9px; border-radius: 99px; flex: none; }
.col-name { font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-meta { font-size: 12px; color: var(--subtle); white-space: nowrap; }
.col-limit { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); }
.col-item.is-backlog .col-name { color: var(--subtle); }
.col-tools { display: flex; gap: 2px; opacity: 0.35; transition: opacity 0.12s ease; }
.col-item:hover .col-tools, .col-tools:focus-within { opacity: 1; }
.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: rgba(36, 48, 74, 0.08); color: var(--ink); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.danger:hover:not(:disabled) { color: var(--red); background: var(--c-red); }
@media (hover: none) { .col-tools { opacity: 1; } }
@media (max-width: 560px) {
  .settings-card form.project-form { grid-template-columns: 1fr; }
  .col-meta { display: none; }
}

/* ---------------------------------------------------------------------------
   Sticky lane headers.
   A horizontally scrolling .board is a scroll container on both axes, so a
   sticky header inside it can never stick to the window. Instead the board
   itself scrolls vertically and fills the viewport from its own top edge
   (published as --board-top by app.js), so the page does not scroll and the
   lane headers stay pinned at the board's top.
   --------------------------------------------------------------------------- */
.board {
  overflow: auto;
  height: calc(100vh - var(--board-top, 200px));
  height: calc(100dvh - var(--board-top, 200px));
  min-height: 0;
  overscroll-behavior-x: contain;
  /* Grid instead of flex: one auto row as tall as the tallest lane, stretched to
     the board when all lanes are short, so every lane, and with it every sticky
     header, runs the full scroll height. minmax(100%, auto) does not work here:
     Chrome resolves it to exactly 100% and clips the long lanes. Tracks grow to
     420px when there is room, like the old flex. */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(272px, 420px);
  grid-template-rows: auto;
  align-items: stretch;
}
.board-wrap .board { min-height: 0; }
.board > .column {
  min-width: 0;
  max-width: none;
  /* overflow: hidden from the lane theme makes the lane a scroll container, which
     would pin the sticky header to the lane instead of the board. clip still
     trims the rounded corners without that side effect. */
  overflow: clip;
}
.column-head {
  position: sticky;
  /* Cancel the board's 10px top padding so no card peeks out above the header. */
  top: -10px;
  z-index: 3;
  /* Bleed to the lane edges so cards scrolling underneath are fully covered. */
  margin: -10px -8px 2px;
  padding: 12px 12px 10px;
  border-radius: 18px 18px 0 0;
  /* Lane tint over the page colour: opaque, so card text never shows through. */
  background: linear-gradient(var(--lane-glass), var(--lane-glass)), var(--page);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
