:root {
  --bg: #ffffff;
  --ink: #172b4d;
  --muted: #626f86;
  --line: #dcdfe4;
  --card: #ffffff;
  --accent: #0c66e4;
  --accent-ink: #ffffff;
  --warn: #ae2e24;
  --flash: #e9f2ff;
  --shadow: 0 1px 1px rgba(9, 30, 66, 0.08);
  --nav: #f7f8f9;
  --top: #ffffff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.45 "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); }
h1, h2 { line-height: 1.25; }
h1 { margin: 0; font-size: 1.5rem; font-weight: 600; }
h2 { margin: 0 0 0.7rem; font-size: 0.95rem; font-weight: 600; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.app-top {
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr) auto auto auto;
  align-items: center;
  gap: 0.45rem 0.55rem;
  padding: 0.4rem 0.85rem;
  background: var(--top);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.app-top a, .app-top summary { color: inherit; }
.top-search { position: relative; min-width: 0; width: 100%; margin: 0; display: flex; align-items: center; }
.top-search input,
.app-top .top-search input {
  width: 100%;
  max-width: none;
  height: 36px;
  padding: 0 0.85rem 0 2.35rem;
  background: #f1f2f4;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}
.app-top .top-search input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px #0c66e4;
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid #626f86;
  border-radius: 999px;
  pointer-events: none;
}
.search-icon::after {
  content: "";
  position: absolute;
  left: 0.48rem;
  top: 0.55rem;
  width: 0.38rem;
  height: 2px;
  background: #626f86;
  transform: rotate(45deg);
}
.switcher, .create-menu { position: relative; }
.switcher summary, .create-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  background: transparent;
  font-weight: 600;
}
.switcher summary.app-switch {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}
.switcher summary:hover { background: #f1f2f4; }
.waffle {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  gap: 2.5px;
}
.waffle span {
  width: 3px;
  height: 3px;
  border-radius: 1px;
  background: #44546f;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.4rem 0.15rem 0.15rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}
.brand-lockup:hover { background: #f1f2f4; }
.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-module { font-weight: 500; color: var(--muted); }
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.auth-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}
.create-menu { margin-left: 0; }
.create-menu summary,
.create-btn {
  background: var(--accent);
  color: white;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font: inherit;
}
.switcher summary::-webkit-details-marker, .create-menu summary::-webkit-details-marker { display: none; }
.switcher-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  z-index: 20;
  min-width: 180px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem;
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.create-menu .switcher-menu { left: auto; right: 0; }
.switcher-menu a { display: block; padding: 0.4rem 0.6rem; text-decoration: none; border-radius: 6px; color: var(--ink); }
.switcher-menu a:hover { background: #f1f2f4; }
.top-user { text-decoration: none; padding: 0.3rem 0.5rem; color: var(--ink); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-chip { display: grid; place-items: center; }
.user-chip .avatar { width: 2rem; height: 2rem; }
.user-panel {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 30;
  width: 280px; background: white; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.45rem; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.user-panel-head { display: flex; gap: 0.6rem; align-items: center; padding: 0.45rem 0.55rem 0.7rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.user-panel-head p { margin: 0; color: var(--muted); font-size: 0.78rem; word-break: break-all; }
.user-panel a, .user-panel button.linkish, .theme-menu summary {
  display: block; width: 100%; text-align: left; text-decoration: none; color: var(--ink);
  padding: 0.45rem 0.55rem; border-radius: 6px; background: transparent;
}
.user-panel a:hover, .user-panel button.linkish:hover, .theme-menu summary:hover { background: #f1f2f4; }
.theme-menu { margin: 0; }
.theme-menu summary { list-style: none; cursor: pointer; }
.theme-menu summary::-webkit-details-marker { display: none; }
.theme-menu button.on { background: #e9f2ff; color: #0c66e4; font-weight: 600; }
.profile-hero { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.4rem; }
.profile-avatar { width: 4.2rem; height: 4.2rem; font-size: 1.3rem; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; align-items: start; }
.profile-side { border-top: 1px solid var(--line); padding-top: 0.4rem; }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 52px); }
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.7rem 1rem;
  background: var(--nav);
  color: var(--ink);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.nav-group { display: grid; gap: 0.1rem; min-width: 0; }
.nav-group summary { cursor: pointer; padding: 0.4rem 0.65rem; border-radius: 6px; color: var(--ink); }
.nav-group a { margin-left: 0.35rem; font-size: 0.88rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 0.4rem 0.65rem; border-radius: 6px; }
.nav-ico { display: flex; align-items: center; gap: 0.45rem; }
.nav-ico::before { width: 1rem; text-align: center; color: var(--muted); font-size: 0.85rem; }
.ico-home::before { content: "⌂"; }
.ico-recent::before { content: "◷"; }
.ico-star::before { content: "☆"; }
.ico-apps::before { content: "▦"; }
.ico-filter::before { content: "☰"; }
.ico-board::before { content: "▣"; }
.nav-label {
  margin: 0.45rem 0.65rem 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-group > summary.nav-ico { display: flex; }
.nav a[aria-current="page"] { background: #e9f2ff; color: #0c66e4; font-weight: 600; }
.nav a:hover { background: #f1f2f4; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.nav-key {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #dfe1e6;
  color: #44546f;
  border-radius: 3px;
  padding: 0.08rem 0.3rem;
}
.nav-item[aria-current="page"] .nav-key { background: #cce0ff; color: #0c66e4; }
.nav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.nav-more { color: var(--muted); font-size: 0.82rem; }
.nav a.ext::after { content: " ↗"; font-size: 0.75rem; color: var(--muted); }
.brand { font-size: 1.1rem; margin-bottom: 1rem; }
.nav-foot { margin-top: auto; display: grid; gap: 0.3rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.nav-space {
  margin: 0.85rem 0.65rem 0.2rem;
  font-weight: 700;
  font-size: 0.92rem;
}
.tree-q {
  width: 100%;
  margin: 0.15rem 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font: inherit;
  background: white;
}
.nav-tree {
  list-style: none;
  margin: 0;
  padding: 0 0 0.2rem 0.35rem;
  max-height: 42vh;
  overflow: auto;
}
.nav-tree ul { list-style: none; margin: 0; padding-left: 0.75rem; }
.nav-tree a {
  display: block;
  font-size: 0.86rem;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-tree a[aria-current="page"] { background: #e9f2ff; color: #0c66e4; font-weight: 600; }
.nav-empty { margin: 0.2rem 0.65rem; font-size: 0.82rem; }
.nav-create {
  margin: 0.2rem 0.35rem 0.6rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  font-weight: 600;
}
.nav-create:hover { background: #f1f2f4; }
.nav-foot a, .nav-foot button { color: var(--muted); }
.content { padding: 1.4rem 2rem 2rem; background: white; min-width: 0; max-width: 100%; }
.solo { padding: 1.5rem; max-width: 440px; margin: 8vh auto; }
.page-head, .stats, .split, .board, .doc { margin-bottom: 1.2rem; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.eyebrow { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.75rem; }
.muted, .meta { color: var(--muted); }
.card, .task-card, .stats article, .cards a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.card { padding: 1rem; }
.auth h1 { margin-bottom: 0.3rem; }
.sso-callout { background: #e7f3ee; border: 1px solid #b7d8cc; border-radius: 10px; padding: 0.75rem 0.85rem; margin: 0.8rem 0; }
.sso-callout p { margin: 0.25rem 0 0; }
.sso-button { display: block; text-align: center; background: #232f3e; color: white; text-decoration: none; border-radius: 8px; padding: 0.7rem 0.8rem; margin-bottom: 0.9rem; font-weight: 650; }
.sso-button:hover { background: #1b242f; }
.cognito-button { display: block; text-align: center; background: white; color: var(--ink); text-decoration: none; border: 1px solid #cfc4b4; border-radius: 8px; padding: 0.7rem 0.8rem; margin-bottom: 0.9rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.stats article { padding: 0.9rem 1rem; }
.stats strong { display: block; font-size: 1.6rem; }
.split { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1rem; align-items: start; }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.board-page { margin: -0.4rem; }
.board-top { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 0.8rem; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 0.15rem; border-bottom: 1px solid var(--line); margin-bottom: 0.85rem; }
.view-tabs a { text-decoration: none; color: var(--muted); padding: 0.45rem 0.65rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.view-tabs a[aria-current="page"] { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.board-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; margin-bottom: 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem; }
.board-filters label { margin: 0; min-width: 120px; }
.board-filters input[name="q"] { min-width: 180px; }
.title-row { display: flex; align-items: center; gap: 0.45rem; }
.work-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0.75rem 0 1rem; }
.work-toolbar form { margin: 0; }
.work-toolbar input[name="q"] {
  width: min(100%, 280px); min-width: 180px; height: 32px; border: 1px solid var(--line); border-radius: 6px;
  background: #f7f8f9; padding: 0 0.6rem;
}
.people-filter { display: flex; align-items: center; }
.people-filter .avatar { margin-left: -0.3rem; border: 2px solid white; text-decoration: none; width: 1.85rem; height: 1.85rem; }
.people-filter .avatar:first-child { margin-left: 0; }
.people-filter .avatar.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-pop { position: relative; }
.filter-pop summary {
  list-style: none; cursor: pointer; border: 1px solid var(--line); background: white;
  border-radius: 6px; padding: 0.32rem 0.7rem; color: var(--ink); font-weight: 500;
}
.filter-pop summary::-webkit-details-marker { display: none; }
.filter-pop summary::after { content: " ▾"; color: var(--muted); font-size: 0.75rem; }
.filter-pop summary.on { background: #e9f2ff; border-color: #85b8ff; color: #0c66e4; }
.people-filter .avatar.av-none { background: #dfe1e6; color: #44546f; }
.clear-filters {
  color: var(--accent); text-decoration: none; font-weight: 600;
  padding: 0.32rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: white;
}
.filter-pop[open] summary { border-color: var(--accent); }
.filter-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 180px;
  background: white; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12); padding: 0.35rem;
}
.filter-menu a {
  display: flex; align-items: center; gap: 0.45rem; text-decoration: none; color: var(--ink);
  padding: 0.4rem 0.55rem; border-radius: 6px;
}
.filter-menu a:hover, .filter-menu a[aria-current="true"] { background: #f1f2f4; }
.menu-note { margin: 0.2rem 0.55rem 0.15rem; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.clear-filters { color: var(--accent); text-decoration: none; font-weight: 600; padding: 0.3rem 0.2rem; }
.type-mark, .work-kind {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  flex: 0 0 auto;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 0;
  clip-path: none;
  box-shadow: none;
}
.type-mark::before, .type-mark::after,
.work-kind::before, .work-kind::after { content: none; display: none; }
.t-epic, .work-kind.t-epic { background-image: url("/static/type-epic.svg"); }
.t-bug, .work-kind.t-bug { background-image: url("/static/type-bug.svg"); }
.t-story, .work-kind.t-story { background-image: url("/static/type-story.svg"); }
.t-task, .work-kind.t-task { background-image: url("/static/type-task.svg"); }
.t-subtask, .work-kind.t-subtask { background-image: url("/static/type-subtask.svg"); width: 1rem; height: 1rem; }
.type-menu { position: relative; min-width: 0; }
.type-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  max-width: 100%;
  background: #f1f2f4;
  color: #172b4d;
  border-radius: 6px;
  padding: 0.28rem 0.5rem;
  font-weight: 650;
}
.type-menu-btn:hover { background: #ebecf0; }
.type-menu-list {
  position: absolute;
  z-index: 24;
  top: calc(100% + 4px);
  left: 0;
  min-width: 168px;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.14);
  padding: 0.25rem 0;
}
.type-menu-list button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: transparent;
  color: #172b4d;
  text-align: left;
  border-radius: 0;
  padding: 0.45rem 0.85rem;
  font-weight: 500;
}
.type-menu-list button:hover { background: #f7f8f9; }
.type-menu-list button[aria-selected="true"] { background: #e9f2ff; color: #0c66e4; font-weight: 650; }
.type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border: 0;
  margin: 0 0 0.7rem;
  padding: 0;
}
.type-picker legend { font-size: 0.92rem; margin-bottom: 0.3rem; padding: 0; }
.type-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 0.85rem;
}
.type-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-choice:has(input:checked) {
  border-color: #0c66e4;
  background: #e9f2ff;
  box-shadow: 0 0 0 1px #0c66e4;
}
.create-dialog {
  width: min(560px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 16px 40px rgba(9, 30, 66, 0.18);
}
.create-dialog::backdrop { background: rgba(9, 30, 66, 0.45); }
.create-dialog form { padding: 1rem 1.1rem 1.1rem; }
.create-dialog header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.8rem;
}
.create-dialog h2 { margin: 0; font-size: 1.15rem; }
.create-dialog footer {
  display: flex; gap: 0.5rem; align-items: center; margin-top: 0.6rem;
}
.create-dialog footer a { margin-left: auto; font-size: 0.85rem; }
.lane { margin-bottom: 0.85rem; border: 0; }
.lane > summary.lane-title { list-style: none; cursor: pointer; display: flex; gap: 0.45rem; align-items: baseline; }
.lane > summary.lane-title::-webkit-details-marker { display: none; }
.lane-title { font-size: 0.92rem; margin: 0 0 0.45rem; font-weight: 650; }
.lane-title::before { content: "▸"; color: var(--muted); display: inline-block; width: 0.9rem; }
.lane[open] > .lane-title::before { content: "▾"; }
.lane-title span { color: var(--muted); font-weight: 500; }
.kanban {
  /* One equal-width column per workflow status, in a single row (scrolls sideways when narrow). */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}
.column { background: #f1f2f4; border-radius: 8px; padding: 0.55rem; min-height: 72vh; display: flex; flex-direction: column; }
.column header {
  border-top: 3px solid #42526e;
  padding-top: 0.35rem;
  margin-top: -0.15rem;
}
.column[data-category="todo"] header { border-top-color: #42526e; }
.column[data-category="in_progress"] header { border-top-color: #0c66e4; }
.column[data-category="done"] header { border-top-color: #22a06b; }
.board-project-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.board-project-head .space-mark {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.85rem;
  flex: 0 0 auto;
  margin-top: 0.35rem;
}
.board-sub { margin: 0.2rem 0 0; font-size: 0.85rem; }
.task-card .move-form {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.task-card { position: relative; }
.column header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.column h3 { margin: 0; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.column.drop-target { outline: 2px dashed var(--accent); }
.create-box { margin-top: auto; }
.create-box summary {
  cursor: pointer; color: var(--muted); text-align: center;
  border: 1px dashed #c1c7d0; border-radius: 8px; padding: 0.35rem;
}
.create-box summary:hover { background: #fafbfc; color: var(--accent); }
.create-box[open] {
  background: white;
  border: 2px solid #0c66e4;
  border-radius: 8px;
  padding: 0.55rem 0.6rem 0.5rem;
  box-shadow: 0 0 0 1px #0c66e4;
}
.create-box[open] > summary { display: none; }
.quick-create { display: grid; gap: 0.55rem; }
.quick-title, .quick-create .quick-title {
  border: 0;
  padding: 0.15rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  background: transparent;
  box-shadow: none;
}
.quick-title::placeholder { color: #6b778c; }
.quick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.quick-type, .quick-due, .quick-assignee, .quick-parent {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
}
.quick-type select, .quick-assignee select, .quick-parent select, .quick-due input {
  width: auto;
  min-width: 0;
  max-width: 7.5rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.78rem;
  background: #f1f2f4;
  border-radius: 6px;
}
.quick-due { position: relative; }
.quick-due input { width: 1.8rem; color: transparent; cursor: pointer; }
.due-ico {
  width: 1rem;
  height: 1rem;
  border: 1.5px solid #626f86;
  border-radius: 3px;
  position: relative;
  pointer-events: none;
}
.due-ico::after {
  content: "";
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  top: 0.35rem;
  border-top: 1.5px solid #626f86;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: #f1f2f4;
}
.status-pill.s-todo { background: #f1f2f4; }
.status-pill.s-blocked { background: #ffeceb; }
.status-pill.s-in_progress { background: #e9f2ff; color: #1d4e89; }
.status-pill.s-in_review { background: #f3e9ff; }
.status-pill.s-done { background: #dcfff1; }
.quick-go {
  margin-left: auto;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border-radius: 999px;
  background: #f1f2f4;
  color: #626f86;
  font-size: 0.95rem;
  line-height: 1;
}
.quick-go:hover { background: #e9f2ff; color: #0c66e4; }
.dev-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: #44546f;
  font-size: 0.82rem;
  margin: 0.35rem 0 0.55rem;
}
.dev-list { list-style: none; padding: 0; margin: 0 0 0.7rem; display: grid; gap: 0.35rem; }
.dev-list li { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.55rem; }
.dev-actions button { width: auto; flex: 1 1 8rem; }
.card-title { color: var(--ink); font-weight: 650; text-decoration: none; display: block; }
.epic-lozenge {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #efe4ff; color: #5b3d91; border-radius: 3px; padding: 0.05rem 0.35rem; font-size: 0.72rem;
}
.logged {
  color: #c9372c;
  font-size: 0.72rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-weight: 600;
}
.logged::before {
  content: "";
  width: 0.68rem;
  height: 0.68rem;
  border: 1.6px solid #c9372c;
  border-radius: 999px;
  box-sizing: border-box;
}
.prio-ico {
  position: relative;
  width: 0.7rem;
  height: 0.85rem;
  flex: 0 0 auto;
  display: inline-block;
}
.prio-ico::before, .prio-ico::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border-left: 0.35rem solid transparent;
  border-right: 0.35rem solid transparent;
}
.prio-ico.p-expedite::before { top: 0; border-bottom: 0.38rem solid #c9372c; }
.prio-ico.p-expedite::after { top: 0.32rem; border-bottom: 0.38rem solid #c9372c; }
.prio-ico.p-high::before { top: 0.18rem; border-bottom: 0.48rem solid #e56910; }
.prio-ico.p-medium::before { top: 0.08rem; border-bottom: 0.38rem solid #e2b203; }
.prio-ico.p-medium::after { top: 0.42rem; border-top: 0.38rem solid #e2b203; }
.prio-ico.p-low::before { top: 0.22rem; border-top: 0.48rem solid #0c66e4; }
.time-track p { margin: 0.2rem 0 0; font-size: 0.82rem; }
.time-bar {
  height: 6px;
  background: #dcdfe4;
  border-radius: 4px;
  overflow: hidden;
}
.time-logged { display: block; height: 100%; background: #1d7afc; }
.estimate-wrap { min-width: 0; }
.estimate-pill {
  display: inline-block;
  background: #f1f2f4;
  color: #44546f;
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}
button.estimate-pill {
  width: auto;
  background: #f1f2f4;
  color: #44546f;
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
}
button.estimate-pill.is-empty {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  padding-left: 0;
}
.estimate-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.3rem;
  align-items: center;
}
.estimate-form input {
  width: 100%;
  min-width: 0;
  padding: 0.3rem 0.4rem;
}
.estimate-form button { width: auto; padding: 0.3rem 0.55rem; }
button[hidden],
form[hidden] {
  display: none;
}
button.time-open {
  display: block;
  width: 100%;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  border-radius: 8px;
}
.time-inline {
  display: grid;
  grid-template-columns: auto minmax(2.2rem, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  color: #626f86;
  font-size: 0.75rem;
}
.time-inline .time-bar {
  height: 4px;
  margin: 0;
  min-width: 2.2rem;
}
.time-capsule {
  display: grid;
  gap: 0.28rem;
  width: 100%;
}
.time-capsule-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #626f86;
  font-size: 0.75rem;
}
.time-dialog {
  width: min(420px, 94vw);
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 16px 40px rgba(9, 30, 66, 0.22);
}
.time-dialog::backdrop { background: rgba(9, 30, 66, 0.45); }
.time-dialog form { padding: 1.05rem 1.15rem 1.1rem; }
.time-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}
.time-dialog h2 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.time-dialog header .linkish {
  font-size: 1.3rem;
  line-height: 1;
  color: #44546f;
  padding: 0.15rem 0.4rem;
}
.time-capsule-dialog { background: transparent; padding: 0; margin-bottom: 0.85rem; }
.time-capsule-dialog .time-bar { height: 8px; border-radius: 6px; }
.time-original { margin: 0 0 0.9rem; color: #44546f; }
.time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}
.time-fields label { margin: 0; }
.time-fields input:focus { border-color: #0c66e4; box-shadow: 0 0 0 1px #0c66e4; }
.time-info {
  display: inline-grid;
  place-items: center;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: 0.15rem;
  border: 1px solid #8590a2;
  border-radius: 999px;
  color: #44546f;
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  vertical-align: 1px;
}
.time-help-title { margin: 0 0 0.35rem; color: #44546f; }
.time-help {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  color: #44546f;
}
.time-help li { margin: 0.1rem 0; }
.time-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin: 0;
}
.time-dialog footer button { width: auto; min-width: 4.5rem; }
.time-dialog footer .secondary { color: #44546f; }
.tf-0 { width: 0%; } .tf-1 { width: 10%; } .tf-2 { width: 20%; } .tf-3 { width: 30%; }
.tf-4 { width: 40%; } .tf-5 { width: 50%; } .tf-6 { width: 60%; } .tf-7 { width: 70%; }
.tf-8 { width: 80%; } .tf-9 { width: 90%; } .tf-10 { width: 100%; }
.move-form { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.label-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.35rem 0; }
.label-pill { background: #efe4ff; color: #5b3d91; border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.75rem; }
.task-card footer { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.45rem; }
.task-card footer a { font-size: 0.82rem; }
.priority-mark { font-size: 0.72rem; margin-right: auto; }
.p-expedite { color: #9a3412; }
.p-high { color: #b45309; }
.p-medium { color: #a16207; }
.p-low { color: #3f6212; }
.avatar { width: 1.7rem; height: 1.7rem; border-radius: 999px; display: inline-grid; place-items: center; color: white; font-size: 0.68rem; font-weight: 700; }
.av-0 { background: #0f6e56; }
.av-1 { background: #1d4e89; }
.av-2 { background: #7c3f12; }
.av-3 { background: #6b3fa0; }
.av-4 { background: #9f1239; }
.av-5 { background: #3f6212; }
.task-card form { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
.task-card select, .task-card form button { font-size: 0.78rem; padding: 0.25rem 0.4rem; }
.empty-col { margin: 0.4rem; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: 12px; }
.board section { background: rgba(255, 255, 255, 0.35); border-radius: 12px; padding: 0.7rem; }
.task-card { padding: 0.7rem; margin-bottom: 0.6rem; }
.task-card p { margin: 0.3rem 0; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.cards a { display: grid; padding: 0.9rem 1rem; text-decoration: none; color: inherit; }
.cards strong { color: var(--accent); }
.plain { list-style: none; padding: 0; }
.plain li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.pill {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
label { display: grid; gap: 0.25rem; margin-bottom: 0.7rem; font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
button, .button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
button[hidden],
form[hidden] {
  display: none;
}
button.secondary, button.linkish { background: transparent; color: inherit; }
button.linkish { padding: 0.4rem 0.5rem; text-align: left; }
.search { display: flex; gap: 0.4rem; align-items: center; }
.search input { width: 240px; }
.inline-form { display: grid; grid-template-columns: 1.4fr 0.6fr 0.8fr auto; gap: 0.6rem; align-items: end; }
.inline-form .wide { grid-column: 1 / -1; }
.tree { list-style: none; padding-left: 0.8rem; margin: 0.2rem 0; }
.tree a { text-decoration: none; }
.tree a[aria-current="page"] { font-weight: 700; }
.doc article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}
.page-toc {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  background: #f7f8fa;
  border-radius: 8px;
}
.page-toc strong { display: block; margin-bottom: 0.35rem; }
.page-toc ul { margin: 0; padding-left: 1.2rem; }
.page-toc li { margin: 0.15rem 0; }
.editor-tools { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: end; margin-bottom: 0.4rem; }
.editor-tools label { margin: 0; width: auto; }
.editor-tools select, .editor-tools input { width: auto; }
.editor-tools button {
  background: white;
  color: var(--ink);
  border: 1px solid #cfc4b4;
}
.file-tool input { max-width: 220px; }
.card.drop-target { outline: 2px dashed var(--accent); outline-offset: 3px; }
.prose { margin-top: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 1.4rem 0 0.5rem; }
.prose h3 { font-size: 1.12rem; margin: 1.1rem 0 0.4rem; }
.prose p { margin: 0.65rem 0; }
.prose img, .comment-editor img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.6rem 0;
  border-radius: 8px;
  background: #f4f5f7;
}
.prose img, .comment-editor img, .attach-list img { cursor: zoom-in; }
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 1.2rem 1.2rem;
  background: rgba(9, 30, 66, 0.78);
}
.image-preview img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  cursor: default;
}
.image-preview-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: auto;
  background: white;
  color: #172b4d;
}
.prose :not(pre) > code {
  background: #f4f5f7;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.92em;
}
.prose ol {
  margin: 0.8rem 0;
  padding: 0.7rem 0.8rem 0.7rem 2.1rem;
  background: #f4f5f7;
  border-radius: 8px;
}
.prose ol li { margin: 0.35rem 0; }
.prose ol li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote {
  margin: 1rem 0;
  padding: 0.55rem 0.9rem;
  background: #e7f3ee;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.prose .codehilitetable {
  width: 100%;
  margin: 1rem 0;
  background: #f4f5f7;
  border-collapse: collapse;
  border-radius: 8px;
  display: block;
  overflow: auto;
}
.prose .codehilitetable td { border: 0; padding: 0; vertical-align: top; }
.prose td.linenos {
  width: 1%;
  background: #ebecf0;
  color: #6b778c;
  user-select: none;
  padding: 0.75rem 0.55rem;
}
.prose td.linenos pre, .prose .codehilite pre {
  margin: 0;
  background: transparent;
  padding: 0.75rem 0.85rem;
  overflow: auto;
}
.prose td.linenos pre { padding: 0.75rem 0.35rem; color: #6b778c; }
.prose .codehilite { background: #f4f5f7; }
.prose .codehilite .hll { background-color: #ffffcc }
.prose .codehilite .c, .prose .codehilite .ch, .prose .codehilite .cm, .prose .codehilite .cpf, .prose .codehilite .c1, .prose .codehilite .cs { color: #3D7B7B; font-style: italic }
.prose .codehilite .k, .prose .codehilite .kc, .prose .codehilite .kd, .prose .codehilite .kn, .prose .codehilite .kr { color: #008000; font-weight: bold }
.prose .codehilite .kp { color: #008000 }
.prose .codehilite .kt { color: #B00040 }
.prose .codehilite .o, .prose .codehilite .m, .prose .codehilite .mb, .prose .codehilite .mf, .prose .codehilite .mh, .prose .codehilite .mi, .prose .codehilite .mo, .prose .codehilite .il { color: #666 }
.prose .codehilite .s, .prose .codehilite .sa, .prose .codehilite .sb, .prose .codehilite .sc, .prose .codehilite .dl, .prose .codehilite .s2, .prose .codehilite .sh, .prose .codehilite .s1 { color: #BA2121 }
.prose .codehilite .n { color: #1e1a16 }
.prose .codehilite .w { color: #bbb }
.error { color: var(--warn); }
.flash { background: var(--flash); padding: 0.6rem 0.8rem; border-radius: 8px; }
.narrow { max-width: 460px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.comment p { white-space: pre-wrap; }
.comment-head { display: flex; gap: 0.65rem; align-items: center; margin-bottom: 0.45rem; }
.comment-head .meta { margin: 0; }
.comment-actions { margin-left: auto; display: flex; gap: 0.15rem; align-items: center; }
.comment-actions form, .attach-row form { display: inline; margin: 0; }
.comment-actions button, .attach-row button {
  width: auto;
  background: transparent;
  color: #1d4e89;
  padding: 0.15rem 0.45rem;
  font-size: 0.85rem;
}
button.danger, .comment-actions button.danger, .attach-row button.danger { color: #ae2e24; }
.attach-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.comment-edit { margin-top: 0.55rem; }
.composer {
  position: relative;
  padding: 0;
  margin: 0.35rem 0 1rem;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
}
.composer:focus-within { border-color: #0f6e56; }
.description-box .comment-editor { min-height: 220px; }
.description-view {
  min-height: 2.6rem;
  margin: 0.2rem 0 0.8rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  cursor: text;
}
.description-view:hover { background: rgba(255, 255, 255, 0.75); outline: 1px solid #dfe1e6; }
.description-view .muted { margin: 0.2rem 0; }
.composer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  align-items: center;
  padding: 0.25rem 0.35rem;
  border-bottom: 1px solid #ebecf0;
}
.composer-tools button {
  width: auto;
  min-width: 2rem;
  background: transparent;
  color: #44546f;
  border: 0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-weight: 650;
}
.composer-tools button:hover, .composer-tools button[aria-expanded="true"] { background: #e9f2ff; color: #1d4e89; }
.comment-editor {
  min-height: 140px;
  padding: 0.85rem 0.95rem 1rem;
  outline: none;
  font-size: 15px;
  line-height: 1.55;
}
.comment-editor:empty:before { content: attr(data-placeholder); color: #6b778c; }
.comment-editor h1, .prose h1 { font-size: 1.6rem; margin: 0.4rem 0; }
.comment-editor h2, .prose h2 { font-size: 1.35rem; }
.comment-editor h3 { font-size: 1.15rem; margin: 0.4rem 0; }
.comment-editor ul, .comment-editor ol { margin: 0.4rem 0; padding-left: 1.3rem; }
.comment-editor pre, .comment-editor .code-snippet {
  background: #f4f5f7;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  overflow: auto;
}
.composer-actions { display: flex; gap: 0.45rem; padding: 0 0.7rem 0.75rem; }
.composer.is-collapsed {
  margin-bottom: 0.8rem;
}
.composer.is-collapsed .composer-tools,
.composer.is-collapsed .composer-actions,
.composer.is-collapsed .composer-status {
  display: none;
}
.composer.is-collapsed .comment-editor {
  min-height: 2.6rem;
  padding: 0.7rem 0.9rem;
}
.comment-menu {
  position: fixed;
  z-index: 40;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(9, 30, 66, 0.16);
  min-width: 220px;
  max-width: 320px;
  max-height: 340px;
  overflow: auto;
  padding: 0.35rem;
}
.comment-menu button, .comment-menu .menu-item {
  display: block;
  width: 100%;
  background: transparent;
  color: #172b4d;
  border: 0;
  border-radius: 4px;
  text-align: left;
  padding: 0.42rem 0.6rem;
  font-weight: 500;
}
.comment-menu .menu-item:hover, .comment-menu .upload:hover { background: #f1f2f4; }
.comment-menu .swatch:hover { outline: 2px solid #1d4e89; outline-offset: 1px; }
.comment-menu .upload {
  margin-top: 0.35rem;
  background: white;
  color: #1d4e89;
  border: 1px solid #1d7afc;
  border-radius: 8px;
  text-align: center;
  font-weight: 650;
}
.comment-menu .menu-note { margin: 0.35rem 0.55rem 0.2rem; color: #6b778c; font-size: 0.82rem; }
.comment-menu .tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid #ebecf0; margin-bottom: 0.4rem; }
.comment-menu .tabs button[aria-selected="true"] { color: #1d4e89; box-shadow: inset 0 -2px 0 #1d7afc; border-radius: 0; }
.comment-menu .swatches { display: grid; grid-template-columns: repeat(7, 1.55rem); gap: 0.4rem; padding: 0.55rem 0.45rem 0.7rem; }
.comment-menu .swatch {
  width: 1.55rem;
  height: 1.55rem;
  min-width: 1.55rem;
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(9, 30, 66, 0.28);
  display: block;
}
.comment-menu .swatch-0 { background: #172b4d; }
.comment-menu .swatch-1 { background: #1d4e89; }
.comment-menu .swatch-2 { background: #0f6e56; }
.comment-menu .swatch-3 { background: #216e4e; }
.comment-menu .swatch-4 { background: #a54800; }
.comment-menu .swatch-5 { background: #ae2e24; }
.comment-menu .swatch-6 { background: #5e4db2; }
.comment-menu .swatch-7 { background: #626f86; }
.comment-menu .swatch-8 { background: #1d7afc; }
.comment-menu .swatch-9 { background: #1d9aaa; }
.comment-menu .swatch-10 { background: #22a06b; }
.comment-menu .swatch-11 { background: #e56910; }
.comment-menu .swatch-12 { background: #e34935; }
.comment-menu .swatch-13 { background: #8270db; }
.comment-menu .swatch-14 { background: #758195; }
.comment-menu .swatch-15 { background: #3d6cb3; }
.comment-menu .swatch-16 { background: #1d7a8c; }
.comment-menu .swatch-17 { background: #1f7a4d; }
.comment-menu .swatch-18 { background: #8a6d00; }
.comment-menu .swatch-19 { background: #c45c55; }
.comment-menu .swatch-20 { background: #6e5dc6; }
.issue-page .content { padding: 0.9rem 1.25rem 2rem; overflow-x: hidden; }
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); text-decoration: underline; }
.type-name {
  font-weight: 650;
  color: #44546f;
}
.parent-chip { margin: 0 0 0.35rem; font-size: 0.85rem; color: var(--muted); }
.issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 17.5rem);
  gap: 1.25rem;
  align-items: start;
  max-width: 100%;
}
.issue-title {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 1.55rem;
  font-weight: 600;
  padding: 0.1rem 0;
  margin: 0;
}
.issue-title:hover, .issue-title:focus { background: #f7f8f9; border-radius: 6px; padding-left: 0.25rem; }
.issue-main { min-width: 0; max-width: 100%; }
.issue-main .prose,
.issue-main .composer,
.issue-main .comment-editor { max-width: 100%; }
.issue-block { margin-top: 1.35rem; }
.issue-block h2, .activity h2, .details h2 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.issue-block h2 span { color: var(--muted); font-weight: 500; }
.issue-fold { margin: 0; }
.issue-fold > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.issue-main .description-view.prose { margin-top: 0; }
.issue-main .prose h2 { font-size: 1.05rem; margin: 0.35rem 0 0.45rem; }
.attach-drop {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 72px;
  margin-top: 0.5rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fafbfc;
}
.attach-drop label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.attach-drop input { display: none; }
.add-toggle summary {
  list-style: none;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  padding: 0.25rem 0;
}
.add-toggle summary::-webkit-details-marker { display: none; }
.add-toggle[open] summary { margin-bottom: 0.4rem; }
.issue-side {
  position: sticky;
  top: 0.8rem;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}
.issue-side input,
.issue-side select,
.issue-side textarea {
  max-width: 100%;
  min-width: 0;
}
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.8rem 0.7rem;
  background: white;
}
.side-card summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  padding: 0.2rem 0;
}
.side-card summary::-webkit-details-marker { display: none; }
.side-card summary::before { content: "▾ "; color: var(--muted); }
.side-card:not([open]) summary::before { content: "▸ "; }
.side-card[open] summary { margin-bottom: 0.55rem; }
.issue-dates { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.status-row { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.status-select { width: auto; min-width: 0; flex: 1; font-weight: 600; background: #f1f2f4; border-radius: 8px; }
.side-save { width: auto; padding: 0.4rem 0.7rem; }
.status-select.s-todo { background: #f1f2f4; }
.status-select.s-blocked { background: #ffeceb; }
.status-select.s-in_progress { background: #e9f2ff; }
.status-select.s-in_review { background: #f3e9ff; }
.status-select.s-done { background: #dcfff1; }
.status-pill.s-cat-todo,
.status-select.s-cat-todo { background: #f1f2f4; color: #44546f; }
.status-pill.s-cat-in_progress,
.status-select.s-cat-in_progress { background: #e9f2ff; color: #0c66e4; }
.status-pill.s-cat-done,
.status-select.s-cat-done { background: #dcfff1; color: #216e4e; }
.details { padding: 0.85rem 0.9rem; border-radius: 8px; }
.person-field { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.person-field select { flex: 1; min-width: 0; }
.person-field .avatar { width: 1.4rem; height: 1.4rem; font-size: 0.62rem; }
.field-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.55rem;
}
.field-row > span { color: var(--muted); font-size: 0.78rem; }
.field-row p { margin: 0; }
.field-row input, .field-row select {
  padding: 0.35rem 0.45rem;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}
.field-row .estimate-form input {
  width: auto;
  flex: 1 1 5rem;
}
.side-fold { border: 0; border-radius: 0; padding: 0.35rem 0 0.2rem; background: transparent; }
.side-fold + .side-fold { border-top: 1px solid var(--line); }
.side-fold summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 0.82rem; list-style: none; }
.side-fold summary::-webkit-details-marker { display: none; }
.side-fold summary::before { content: "▸ "; color: var(--muted); }
.side-fold[open] summary::before { content: "▾ "; }
.side-fold[open] summary { margin-bottom: 0.55rem; }
.attach-list { list-style: none; padding: 0; margin: 0.7rem 0 0; display: grid; gap: 0.45rem; }
.attach-list img, .attach-list video { max-width: 280px; border-radius: 8px; }
.activity { margin-top: 0.4rem; }
.activity-tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.2rem 0 0.8rem; }
.activity-tabs button {
  width: auto;
  background: transparent;
  color: #44546f;
  border: 1px solid transparent;
}
.activity-tabs button[aria-selected="true"] { background: #e9f2ff; color: #1d4e89; }
.subtask-list, .link-list, .history-list, .work-list { list-style: none; padding: 0; margin: 0.35rem 0 0.7rem; }
.subtask-list li, .link-list li, .history-list li, .work-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.subtask-list form, .link-list form, .work-list form { margin: 0; }
.inline-add { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.35rem 0 1rem; min-width: 0; }
.inline-add input, .inline-add select { width: auto; flex: 1 1 8rem; min-width: 0; max-width: 100%; }
.inline-add button { width: auto; }
.branch-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; word-break: break-all; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1.8rem); gap: 0.1rem; padding: 0.2rem; }
.emoji-grid button { width: 1.8rem; min-width: 0; text-align: center; padding: 0.15rem; font-size: 1.15rem; }
.mention-search { margin-bottom: 0.35rem; }
.prose .c0, .comment-editor .c0 { color: #172b4d; }
.prose .c1, .comment-editor .c1 { color: #1d4e89; }
.prose .c2, .comment-editor .c2 { color: #0f6e56; }
.prose .c3, .comment-editor .c3 { color: #216e4e; }
.prose .c4, .comment-editor .c4 { color: #a54800; }
.prose .c5, .comment-editor .c5 { color: #ae2e24; }
.prose .c6, .comment-editor .c6 { color: #5e4db2; }
.prose .c7, .comment-editor .c7 { color: #626f86; }
.prose .c8, .comment-editor .c8 { color: #1d7afc; }
.prose .c9, .comment-editor .c9 { color: #1d9aaa; }
.prose .c10, .comment-editor .c10 { color: #22a06b; }
.prose .c11, .comment-editor .c11 { color: #e56910; }
.prose .c12, .comment-editor .c12 { color: #e34935; }
.prose .c13, .comment-editor .c13 { color: #8270db; }
.prose .c14, .comment-editor .c14 { color: #626f86; }
.prose .c15, .comment-editor .c15 { color: #3d6cb3; }
.prose .c16, .comment-editor .c16 { color: #1d7a8c; }
.prose .c17, .comment-editor .c17 { color: #1f7a4d; }
.prose .c18, .comment-editor .c18 { color: #8a6d00; }
.prose .c19, .comment-editor .c19 { color: #c45c55; }
.prose .c20, .comment-editor .c20 { color: #6e5dc6; }
.prose .mention, .comment-editor .mention { background: #e9f2ff; color: #1d4e89; border-radius: 4px; padding: 0 0.25rem; }
.prose .panel-info, .comment-editor .panel-info { background: #e9f2ff; border-left: 4px solid #1d7afc; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.prose .panel-note, .comment-editor .panel-note { background: #f3f0ff; border-left: 4px solid #6e5dc6; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.prose .panel-warning, .comment-editor .panel-warning { background: #fff7d6; border-left: 4px solid #cf9f02; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.prose .panel-success, .comment-editor .panel-success { background: #dcfff1; border-left: 4px solid #22a06b; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.prose .panel-error, .comment-editor .panel-error { background: #ffeceb; border-left: 4px solid #c9372c; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.layout-2, .layout-3 { display: grid; gap: 0.85rem; margin: 0.7rem 0; }
.layout-2 { grid-template-columns: 1fr 1fr; }
.layout-3 { grid-template-columns: 1fr 1fr 1fr; }
.layout-col { border: 1px dashed #dfe1e6; border-radius: 8px; padding: 0.55rem 0.7rem; min-height: 4rem; }
.page-tabs { display: grid; gap: 0.65rem; margin: 0.8rem 0; }
.page-tab-panel { border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.85rem; }
.expand-block { border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.75rem; margin: 0.6rem 0; }
.expand-block summary { cursor: pointer; font-weight: 650; }
.status-lozenge {
  display: inline-block;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #dfe1e6;
  color: #44546f;
}
.status-blue { background: #e9f2ff; color: #0c66e4; }
.status-green { background: #dcfff1; color: #216e4e; }
.status-yellow { background: #fff7d6; color: #974f0c; }
.status-red { background: #ffeceb; color: #ae2e24; }
.status-gray { background: #f1f2f4; color: #44546f; }
.status-purple { background: #f3f0ff; color: #5e4db2; }
.wiki-date { background: #f1f2f4; border-radius: 4px; padding: 0.05rem 0.4rem; }
.prose table.wiki-db th, .comment-editor table.wiki-db th { background: #e9f2ff; }
.prose table.wiki-diagram th, .comment-editor table.wiki-diagram th { background: #e7f3ee; }
.page-composer { margin: 0.4rem 0 1rem; border: 0; overflow: visible; }
.page-composer .composer-tools {
  position: sticky;
  top: 0;
  z-index: 8;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.page-composer .comment-editor { min-height: 520px; padding: 0.4rem 0.2rem 3rem; }
.page-composer .comment-menu { min-width: 300px; max-height: 460px; }
.page-edit { max-width: 980px; margin: 0 auto; }
.page-title-input {
  display: block;
  width: 100%;
  border: 0;
  font: 700 2rem/1.25 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  padding: 0.35rem 0.2rem 0.8rem 2.6rem;
  background: transparent;
}
.page-title-input:focus { outline: none; }
.page-parent { margin: 0 auto; font-size: 0.82rem; color: var(--muted); }
.page-parent select { width: auto; min-width: 12rem; margin: 0; }
.page-canvas { position: relative; padding-left: 2.6rem; min-height: 520px; }
.inline-insert {
  position: absolute;
  left: 0.1rem;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #dfe1e6;
  background: #f1f2f4;
  color: #44546f;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  z-index: 6;
}
.inline-insert:hover, .inline-insert[aria-expanded="true"] { background: #e9f2ff; color: #0c66e4; }
.block-toolbar {
  position: absolute;
  z-index: 12;
  display: none;
  flex-wrap: wrap;
  gap: 0.1rem;
  background: white;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(9, 30, 66, 0.14);
  padding: 0.2rem;
}
.block-toolbar:not([hidden]) { display: flex; }
.block-toolbar button {
  background: transparent;
  color: #172b4d;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
}
.block-toolbar button:hover { background: #f1f2f4; }
.wiki-body table, .comment-editor table:not(.codehilitetable) {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 1.2rem;
  background: white;
}
.wiki-body th, .wiki-body td,
.comment-editor table:not(.codehilitetable) th,
.comment-editor table:not(.codehilitetable) td {
  border: 1px solid #dfe1e6;
  padding: 0.65rem 0.8rem;
  min-width: 7rem;
  vertical-align: top;
}
.wiki-body th, .comment-editor table:not(.codehilitetable) th {
  background: #f7f8f9;
  font-weight: 650;
}
.comment-editor td.cell-on, .comment-editor th.cell-on {
  outline: 2px solid #0c66e4;
  outline-offset: -2px;
  background: #f7fbff;
}
.comment-editor .media-on {
  outline: 2px solid #0c66e4;
  outline-offset: 2px;
}
.comment-editor a.file-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
}
.comment-menu .menu-hint { display: block; color: #6b778c; font-size: 0.75rem; font-weight: 400; }
.prose .panel-decision, .comment-editor .panel-decision { background: #e7f3ee; border-left: 4px solid #0f6e56; padding: 0.55rem 0.75rem; border-radius: 4px; margin: 0.5rem 0; }
.prose a.file-card, .comment-editor a.file-card { display: inline-flex; margin: 0.25rem 0; padding: 0.35rem 0.65rem; background: #f4f5f7; border: 1px solid #dfe1e6; border-radius: 8px; text-decoration: none; }
.prose ul.task-list, .comment-editor ul.task-list { list-style: none; padding-left: 0.15rem; }
.prose .task-item input, .comment-editor .task-item input { width: auto; margin-right: 0.4rem; }
.prose video, .comment-editor video {
  display: block;
  max-width: 100%;
  max-height: 360px;
  margin: 0.8rem 0;
  border-radius: 8px;
  background: #111;
}
.composer.drop-target { outline: 2px dashed var(--accent); outline-offset: 3px; }
.home-head { margin-bottom: 1.6rem; }
.home-spaces { margin-bottom: 1.8rem; }
.home-spaces-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.home-spaces-head h2 { margin: 0; font-size: 1.05rem; }
.home-spaces-head a { font-size: 0.9rem; }
.space-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 160px)); gap: 0.75rem; }
.space-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.85rem 0.9rem;
  background: #f7f8f9;
  border: 0;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 108px;
}
.space-card:hover { background: #f1f2f4; }
.space-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  background: #1868db;
}
.space-0 { background: #1868db; }
.space-1 { background: #2898bd; }
.space-2 { background: #5e4db2; }
.space-3 { background: #e56910; }
.space-4 { background: #22a06b; }
.space-5 { background: #c9372c; }
.space-grid-projects {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  margin-top: 0.25rem;
}
.space-tile { display: grid; gap: 0.2rem; }
.space-tile .space-card { min-height: 118px; background: #fff; border: 1px solid #dfe1e6; }
.space-tile .space-card:hover { border-color: #0c66e4; background: #f7f8f9; }
.space-tile .space-meta { line-height: 1.35; }
.space-admin { margin: 0 0.2rem; }
.space-admin button { width: auto; font-size: 0.78rem; padding: 0.15rem 0.35rem; }
.spaces-layout.split { align-items: start; }
.spaces-directory { min-width: 0; }
.space-card.wiki .space-mark { background: #1d7a4d; }
.space-card strong { font-size: 0.92rem; }
.space-card span, .space-card em { color: var(--muted); font-size: 0.78rem; font-style: normal; }
.for-you { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0.4rem 0 0.55rem; }
.for-you h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.home-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; border: 0; }
.home-tabs a {
  text-decoration: none;
  color: #44546f;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #f1f2f4;
  font-size: 0.875rem;
}
.home-tabs a[aria-current="page"] {
  background: #ffffff;
  color: #0c66e4;
  border-color: #0c66e4;
  font-weight: 600;
}
.tab-count {
  display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem;
  margin-left: 0.15rem; padding: 0 0.3rem; border-radius: 999px;
  background: #0c66e4; color: #ffffff; font-size: 0.72rem; font-weight: 700;
}
.work-group { margin-bottom: 1.1rem; }
.work-group h2 { color: var(--muted); font-size: 0.82rem; font-weight: 600; margin-bottom: 0.15rem; }
.work-feed { list-style: none; padding: 0; margin: 0; }
.work-feed li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) 1.7rem 7.2rem;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.4rem;
  border-bottom: 0;
}
.work-feed li:hover { background: #f7f8f9; border-radius: 6px; }
.work-feed div { min-width: 0; }
.work-feed a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-feed a:hover { color: var(--accent); text-decoration: underline; }
.work-feed p.meta { margin: 0.12rem 0 0; font-size: 0.78rem; }
.work-kind { width: 1.15rem; height: 1.15rem; }
.work-kind.page, .work-kind.t-page {
  background-image: none;
  background: #1d7a4d;
  border-radius: 3px;
}
.work-feed .avatar { width: 1.55rem; height: 1.55rem; font-size: 0.62rem; }
.star-btn {
  width: auto;
  min-width: 2rem;
  background: transparent;
  color: #8993a4;
  padding: 0.2rem 0.4rem;
}
.star-btn:hover { color: #e2b203; }
.title-row { display: flex; gap: 0.5rem; align-items: center; min-width: 0; }
.title-row .issue-title { flex: 1; min-width: 0; }
.work-feed .when { white-space: nowrap; color: var(--muted); font-size: 0.82rem; text-align: right; }
:focus-visible { outline: 3px solid #0c66e4; outline-offset: 2px; }
html.theme-dark,
html.theme-system {
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  html.theme-system { color-scheme: light; }
}
html.theme-dark {
  --bg: #1d2125;
  --ink: #c7d1db;
  --muted: #8c9bab;
  --line: #38414a;
  --card: #22272b;
  --nav: #1d2125;
  --top: #22272b;
  --flash: #1c2b41;
  --shadow: none;
}
@media (prefers-color-scheme: dark) {
  html.theme-system {
    --bg: #1d2125;
    --ink: #c7d1db;
    --muted: #8c9bab;
    --line: #38414a;
    --card: #22272b;
    --nav: #1d2125;
    --top: #22272b;
    --flash: #1c2b41;
    --shadow: none;
  }
}
html.theme-dark .top-search input,
html.theme-dark .user-panel,
html.theme-dark .switcher-menu,
html.theme-dark .filter-menu { background: #2c333a; color: var(--ink); }
html.theme-dark .switcher summary:hover,
html.theme-dark .brand-lockup:hover { background: #2c333a; }
html.theme-dark .waffle span { background: #8c9bab; }
html.theme-dark .app-top .top-search input:focus { background: #22272b; }
html.theme-dark .home-tabs a { background: #2c333a; color: var(--muted); }
html.theme-dark .home-tabs a[aria-current="page"] { background: #1c2b41; color: #85b8ff; border-color: #85b8ff; }
html.theme-dark .work-feed li:hover { background: #2c333a; }
html.theme-dark .user-panel a:hover,
html.theme-dark .switcher-menu a:hover { background: #38414a; }
.nav .nav-create {
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 600;
}
.nav .nav-create:hover { background: #f1f2f4; }
.button.ghost, button.ghost {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.ghost:hover, button.ghost:hover { background: #f1f2f4; }
.wiki-page { max-width: 980px; margin: 0 auto; padding: 0.4rem 0 3rem; }
.wiki-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}
.wiki-published { margin: 0 auto 0 0; color: var(--muted); font-size: 0.85rem; }
.wiki-title { text-align: center; font-size: 2rem; margin: 1.6rem 0 0.9rem; font-weight: 700; }
.wiki-byline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  margin: 0 0 1.6rem;
  flex-wrap: wrap;
}
.wiki-views::before { content: "👁 "; }
.wiki-reacts { display: flex; gap: 0.2rem; }
.react-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  font-size: 0.88rem;
}
.react-btn:hover, .react-btn.on { background: #f1f2f4; border-color: var(--line); }
.wiki-body { margin: 0 auto 2rem; max-width: none; }
.wiki-empty { text-align: center; }
.wiki-related { margin: 2rem 0 1.2rem; }
.wiki-related h2 { margin-bottom: 0.8rem; }
.wiki-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.wiki-card {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  text-decoration: none;
  color: inherit;
  min-height: 4.4rem;
}
.wiki-card:hover { background: #f7f8f9; }
.wiki-card-icon {
  grid-row: 1 / span 2;
  width: 1.15rem;
  height: 1.3rem;
  margin-top: 0.15rem;
  border: 1.5px solid #8590a2;
  border-radius: 2px;
  background:
    linear-gradient(#8590a2, #8590a2) 4px 5px / 8px 1.5px no-repeat,
    linear-gradient(#8590a2, #8590a2) 4px 8px / 8px 1.5px no-repeat;
}
.wiki-card strong { font-size: 0.92rem; }
.wiki-card span { color: var(--muted); font-size: 0.8rem; }
.wiki-foot {
  display: flex;
  gap: 1.2rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.wiki-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.wiki-foot a:hover { color: var(--accent); }
.wiki-labels { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1.5rem; }
.label-chip {
  background: #f1f2f4;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
}
.label-add { display: flex; gap: 0.35rem; align-items: center; }
.label-add input { width: 10rem; margin: 0; }
.label-add button { padding: 0.35rem 0.55rem; }
.wiki-comments h2 { margin-bottom: 0.8rem; }
.wiki-comment { display: flex; gap: 0.7rem; margin-bottom: 1rem; }
.wiki-comment-form textarea { width: 100%; min-height: 5.5rem; }
html.theme-dark .wiki-card:hover,
html.theme-dark .react-btn:hover,
html.theme-dark .react-btn.on,
html.theme-dark .label-chip { background: #2c333a; }
html.theme-dark .tree-q { background: #22272b; color: var(--ink); }
html.theme-dark .button.ghost, html.theme-dark button.ghost { background: #22272b; }
.board-type-pick {
  margin: 0 0 0.9rem;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.board-type-pick legend { font-weight: 650; margin-bottom: 0.45rem; grid-column: 1 / -1; }
.board-card {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0.7rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}
.board-card input { margin: 0 0 0.25rem; }
.board-card strong { font-size: 0.95rem; }
.board-card:has(input:checked) {
  border-color: var(--accent);
  background: #e9f2ff;
  box-shadow: 0 0 0 1px #0c66e4;
}
.cards li { display: grid; gap: 0.35rem; }
.board-switch { margin: 0 0.9rem 0.7rem; }
.board-switch button { width: auto; }
.sprint-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  background: #e9f2ff;
  border-radius: 8px;
}
.sprint-banner form { display: flex; gap: 0.45rem; align-items: center; margin: 0; }
.sprint-banner select { width: auto; }
.scrum-empty { padding: 1.1rem; }
.scrum-backlog { display: grid; gap: 0.75rem; }
.backlog-sprint {
  margin: 0;
  padding: 0.55rem 0.7rem 0.4rem;
  background: #f7f8f9;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
}
.backlog-sprint.is-active { background: #f1f2f4; }
.sprint-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.15rem 0.15rem 0.45rem;
}
.sprint-title { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: baseline; }
.sprint-title strong { font-size: 0.95rem; }
.sprint-span, .sprint-count { color: var(--muted); font-size: 0.82rem; }
.sprint-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.sprint-points { display: flex; gap: 0.25rem; }
.pt {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.28rem;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #dfe1e6;
  color: #44546f;
}
.pt-doing { background: #cce0ff; color: #0c66e4; }
.pt-done { background: #bae0cb; color: #216e4e; }
.complete-sprint, .sprint-dates { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.complete-sprint select, .sprint-dates input { width: auto; min-width: 0; }
.sprint-goal { margin: 0 0.15rem 0.4rem; }
.backlog-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; }
.backlog-row {
  display: grid;
  grid-template-columns: 1.1rem 6.4rem minmax(8rem, 1fr) auto auto 1.6rem 1.7rem auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border-bottom: 1px solid #f1f2f4;
}
.backlog-row:last-child { border-bottom: 0; }
.backlog-key { font-weight: 650; text-decoration: none; color: #44546f; white-space: nowrap; }
.backlog-title { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backlog-row .epic-lozenge { max-width: 10rem; }
.backlog-status { margin: 0; }
.backlog-status .status-select {
  width: 7.6rem;
  flex: none;
  font-size: 0.75rem;
  padding: 0.12rem 0.4rem;
  height: 1.7rem;
}
.backlog-points { color: var(--muted); font-size: 0.78rem; text-align: center; }
.backlog-row .avatar, .work-list .avatar { width: 1.45rem; height: 1.45rem; font-size: 0.58rem; }
.avatar.av-none { background: #dfe1e6; color: #44546f; }
.sprint-move { margin: 0; }
.sprint-move select { width: auto; min-width: 7rem; font-size: 0.75rem; padding: 0.12rem 0.3rem; height: 1.7rem; }
.create-sprint-bar { display: flex; justify-content: flex-end; margin: 0.15rem 0 0; }
.create-sprint-bar button { width: auto; }
.scrum-backlog .inline-add { margin: 0.45rem 0 0.15rem; }
.work-list { width: 100%; border-collapse: collapse; }
.work-list th, .work-list td { text-align: left; padding: 0.45rem 0.55rem; border-bottom: 1px solid #f1f2f4; vertical-align: middle; }
.work-list th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.work-cell { display: flex; gap: 0.4rem; align-items: center; min-width: 16rem; }
.person-cell { display: inline-flex; gap: 0.35rem; align-items: center; }
.list-create { padding: 0.4rem 0.55rem 0.7rem; }
.summary-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 0.85rem; }
.summary-cards article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.summary-kicker { margin: 0; color: var(--muted); font-size: 0.78rem; }
.summary-cards strong { display: block; font-size: 1.45rem; margin: 0.15rem 0; }
.summary-panels { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.7rem; }
.summary-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.status-overview { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin-top: 0.6rem; }
.status-donut { width: 9.5rem; height: 9.5rem; }
.status-donut .donut-total { font-size: 13px; font-weight: 700; fill: #172b4d; }
.status-donut .donut-caption { font-size: 8px; fill: #626f86; }
.status-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.status-legend li { display: flex; gap: 0.4rem; align-items: center; }
.legend-swatch { width: 0.7rem; height: 0.7rem; border-radius: 3px; background: #85b8ff; }
.sw-todo { background: #85b8ff; }
.sw-blocked { background: #f87168; }
.sw-in_progress { background: #579dff; }
.sw-in_review { background: #c0b6f2; }
.sw-done { background: #f5a05c; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin-bottom: 0.7rem; }
.cal-nav h2 { margin: 0; }
.cal-nav a.secondary, a.secondary {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.28rem 0.7rem;
  background: #fff;
}
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.cal-grid th, .cal-grid td { border: 1px solid #dcdfe4; vertical-align: top; }
.cal-grid th { padding: 0.35rem; color: var(--muted); font-size: 0.75rem; font-weight: 600; text-align: center; }
.cal-grid td { height: 7.2rem; padding: 0.3rem; }
.cal-grid td.out { background: #f7f8f9; color: #8590a2; }
.cal-grid td.today { box-shadow: inset 0 0 0 2px #0c66e4; }
.cal-num { display: block; font-weight: 650; margin-bottom: 0.2rem; }
.cal-item {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--ink);
  background: #e9f2ff;
  border-radius: 4px;
  padding: 0.08rem 0.28rem;
  margin-bottom: 0.15rem;
}
.timeline-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.timeline-grid { border-collapse: collapse; min-width: 720px; width: 100%; }
.timeline-grid th, .timeline-grid td { border-bottom: 1px solid #f1f2f4; padding: 0.35rem 0.4rem; font-size: 0.78rem; }
.timeline-grid thead th { color: var(--muted); font-weight: 600; text-align: left; }
.timeline-grid tbody th { min-width: 16rem; text-align: left; font-weight: 500; white-space: nowrap; }
.timeline-title { color: var(--muted); margin-left: 0.3rem; }
.tl-bar { background: #cce0ff; color: #0c66e4; border-radius: 4px; font-weight: 650; text-align: center; }
.tl-bar.s-done { background: #bae0cb; color: #216e4e; }
.tl-bar.s-todo { background: #dfe1e6; color: #44546f; }
.tl-bar.s-blocked { background: #ffd5d2; color: #ae2e24; }
.tl-bar.s-in_review { background: #e8deff; color: #5b3d91; }
.scrum-report .time-capsule { max-width: 28rem; margin: 0.6rem 0 0.8rem; }
@media (max-width: 1100px) {
  .issue { grid-template-columns: minmax(0, 1fr); }
  .issue-side { position: static; }
  .summary-cards, .summary-panels { grid-template-columns: 1fr 1fr; }
  .backlog-row { grid-template-columns: 1.1rem 6rem minmax(6rem, 1fr) auto auto; }
  .backlog-row .sprint-move, .backlog-row .epic-lozenge { display: none; }
}
@media (max-width: 900px) {
  .shell, .split, .doc, .board, .stats, .inline-form, .issue, .profile-grid { display: block; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-foot { margin-top: 0; }
  .search input, .content { width: auto; }
  .app-top { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; }
  .brand-name { font-size: 0.95rem; }
  .work-feed li { grid-template-columns: 1.4rem minmax(0, 1fr) auto; }
  .work-feed .when { grid-column: 2; text-align: left; }
  .wiki-cards { grid-template-columns: 1fr; }
  .wiki-title { font-size: 1.55rem; }
  .layout-2, .layout-3 { display: block; }
  .summary-cards, .summary-panels { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- notifications */
.notif-menu { position: relative; }
.notif-menu > summary { list-style: none; cursor: pointer; }
.notif-menu > summary::-webkit-details-marker { display: none; }
.notif-bell {
  position: relative; display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 999px; color: var(--muted);
}
.notif-bell:hover, .notif-menu[open] .notif-bell { background: #f1f2f4; }
.bell-icon {
  position: relative; width: 0.95rem; height: 0.95rem;
  border: 2px solid currentColor; border-bottom: 0; border-radius: 0.6rem 0.6rem 0.15rem 0.15rem;
}
.bell-icon::before {
  content: ""; position: absolute; left: -0.3rem; right: -0.3rem; bottom: -2px;
  height: 2px; background: currentColor; border-radius: 2px;
}
.bell-icon::after {
  content: ""; position: absolute; left: 50%; bottom: -0.38rem; width: 0.32rem; height: 0.18rem;
  transform: translateX(-50%); background: currentColor; border-radius: 0 0 0.2rem 0.2rem;
}
.notif-badge {
  position: absolute; top: 0.05rem; right: -0.1rem; min-width: 1.1rem; height: 1.1rem; padding: 0 0.25rem;
  display: grid; place-items: center; border-radius: 999px;
  background: #c9372c; color: #fff; font-size: 0.66rem; font-weight: 700; line-height: 1;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 30;
  width: min(380px, calc(100vw - 2rem)); max-height: 70vh; overflow: auto;
  background: white; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.45rem; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.notif-panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.55rem 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem;
}
.notif-panel-head form { margin: 0; }
.notif-panel-head .linkish { font-size: 0.82rem; color: var(--accent); }
.notif-item {
  position: relative; display: grid; gap: 0.15rem;
  padding: 0.55rem 0.6rem 0.55rem 1.3rem; border-radius: 6px;
  color: var(--ink); text-decoration: none;
}
.notif-item:hover { background: #f1f2f4; }
.notif-item.unread::before {
  content: ""; position: absolute; left: 0.5rem; top: 0.95rem;
  width: 0.45rem; height: 0.45rem; border-radius: 999px; background: var(--accent);
}
.notif-item.unread .notif-title { font-weight: 600; }
.notif-body {
  color: var(--muted); font-size: 0.85rem;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.notif-when { color: var(--muted); font-size: 0.78rem; }
.notif-empty { margin: 0; padding: 1rem 0.6rem; color: var(--muted); }
.notif-all {
  display: block; margin-top: 0.3rem; padding: 0.55rem; border-top: 1px solid var(--line);
  text-align: center; text-decoration: none; font-weight: 600;
}
.notif-list { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 820px; }
.notif-list li { border-bottom: 1px solid var(--line); }
.notif-list .notif-item { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0.7rem; border-radius: 0; }
.notif-list .notif-kind { grid-row: span 2; align-self: start; }
.notif-list .notif-title { grid-column: 2; }
.notif-list .notif-body { grid-column: 2; }
.notif-list .notif-when { grid-column: 3; grid-row: 1; white-space: nowrap; }
.notif-kind {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem; border-radius: 4px; background: #e9f2ff; color: #0055cc;
}
.notif-kind.k-mention { background: #f3f0ff; color: #5e4db2; }
.notif-kind.k-assigned { background: #dcfff1; color: #216e4e; }
.notif-kind.k-status { background: #fff7d6; color: #7f5f01; }
.notif-pref { margin-bottom: 1.2rem; }
.notif-pref .check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; }
.notif-pref .check input { width: auto; margin-top: 0.2rem; }
.watch-btn { white-space: nowrap; }
.watch-count {
  display: inline-block; min-width: 1.2rem; padding: 0 0.3rem; margin-left: 0.2rem;
  border-radius: 999px; background: #f1f2f4; color: var(--muted); font-size: 0.75rem; text-align: center;
}
button.ghost.on { background: #e9f2ff; color: #0c66e4; border-color: #85b8ff; }

/* ---------------------------------------------------------------- page history */
.wiki-version { color: var(--muted); font-size: 0.85rem; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th, .history-table td {
  padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.history-table th { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.history-table .avatar { vertical-align: middle; margin-right: 0.3rem; }
.history-actions { white-space: nowrap; text-align: right; }
.history-actions form { display: inline; margin: 0 0 0 0.8rem; }
.history-actions .linkish { color: var(--accent); }
.current-pill { margin-left: 0.4rem; background: #dcfff1; color: #216e4e; }
.version-banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem;
  padding: 0.75rem 1rem; margin-bottom: 0.5rem; border-radius: 8px;
  background: #fff7d6; color: #533f04; border: 1px solid #f5cd47;
}
.version-banner p { margin: 0; }
.version-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.version-actions form { margin: 0; }
.compare-pick { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.compare-pick label { display: grid; gap: 0.2rem; }
.compare-heads { display: grid; gap: 0.2rem; margin-bottom: 0.8rem; color: var(--muted); }
.compare-heads p { margin: 0; }
.diff-key { display: inline-block; padding: 0 0.35rem; border-radius: 4px; font-weight: 700; font-size: 0.8rem; }
.diff-key.del { background: #ffeceb; color: #ae2e24; }
.diff-key.add { background: #dcfff1; color: #216e4e; }
.diff-title del { background: #ffeceb; color: #ae2e24; }
.diff-title ins { background: #dcfff1; color: #216e4e; text-decoration: none; }
.diff {
  list-style: none; margin: 0 0 0.8rem; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; font-size: 0.92rem;
}
.diff li { padding: 0.3rem 0.75rem 0.3rem 2rem; position: relative; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff li + li { border-top: 1px solid var(--line); }
.diff li::before { position: absolute; left: 0.7rem; font-family: ui-monospace, monospace; color: var(--muted); }
.diff .d-add { background: #dcfff1; }
.diff .d-add::before { content: "+"; color: #216e4e; }
.diff .d-del { background: #ffeceb; text-decoration: line-through; text-decoration-color: rgba(174, 46, 36, 0.45); }
.diff .d-del::before { content: "−"; color: #ae2e24; }
.diff .d-gap { color: var(--muted); font-style: italic; background: var(--nav); }
.diff-note { font-size: 0.82rem; }
@media (max-width: 640px) {
  .history-table thead { display: none; }
  .history-table td { display: block; border: 0; padding: 0.2rem 0; text-align: left; }
  .history-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .history-actions form { margin-left: 0.6rem; }
}

/* dark theme */
html.theme-dark .notif-panel { background: #2c333a; color: var(--ink); }
html.theme-dark .notif-item:hover,
html.theme-dark .notif-bell:hover,
html.theme-dark .notif-menu[open] .notif-bell { background: #38414a; }
html.theme-dark .watch-count { background: #38414a; }
html.theme-dark button.ghost.on { background: #1c2b41; color: #85b8ff; border-color: #85b8ff; }
html.theme-dark .version-banner { background: #332e1b; color: #f8e6a0; border-color: #7f5f01; }
html.theme-dark .diff .d-add, html.theme-dark .diff-key.add, html.theme-dark .diff-title ins, html.theme-dark .current-pill { background: #1c3329; color: #7ee2b8; }
html.theme-dark .diff .d-del, html.theme-dark .diff-key.del, html.theme-dark .diff-title del { background: #42221f; color: #fd9891; }
html.theme-dark .notif-kind { background: #1c2b41; color: #85b8ff; }
@media (prefers-color-scheme: dark) {
  html.theme-system .notif-panel { background: #2c333a; color: var(--ink); }
  html.theme-system .notif-item:hover,
  html.theme-system .notif-bell:hover { background: #38414a; }
  html.theme-system .version-banner { background: #332e1b; color: #f8e6a0; border-color: #7f5f01; }
  html.theme-system .diff .d-add, html.theme-system .current-pill { background: #1c3329; color: #7ee2b8; }
  html.theme-system .diff .d-del { background: #42221f; color: #fd9891; }
}

/* ---------------------------------------------------------------- management actions */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.ghost-btn {
  display: inline-grid; place-items: center; min-width: 2.2rem; height: 2.2rem; padding: 0 0.5rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink);
  font-weight: 700; letter-spacing: 0.05em; line-height: 1;
}
.ghost-btn:hover, .more-menu[open] > .ghost-btn { background: #f1f2f4; }
.more-panel {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 25;
  width: min(300px, calc(100vw - 2rem)); padding: 0.45rem; display: grid; gap: 0.2rem;
  background: white; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.more-panel form { margin: 0; }
.more-panel > form > .linkish {
  display: block; width: 100%; text-align: left; padding: 0.45rem 0.55rem; border-radius: 6px; color: var(--ink);
}
.more-panel > form > .linkish:hover { background: #f1f2f4; }
.more-panel > form > .linkish.danger { color: var(--warn); }
.more-move { display: grid; gap: 0.4rem; padding: 0.45rem 0.55rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more-move label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.more-move select { width: 100%; }
.more-note { margin: 0; padding: 0.45rem 0.55rem; color: var(--muted); font-size: 0.85rem; }
.settings-card { max-width: 640px; margin-bottom: 1rem; }
.settings-card form { display: grid; gap: 0.7rem; }
.settings-card label { display: grid; gap: 0.25rem; }
.settings-card .muted { margin: -0.3rem 0 0; font-size: 0.85rem; }
.key-input { text-transform: uppercase; max-width: 12rem; }
.danger-zone { border-color: #f87168; }
.danger-zone h2 { color: var(--warn); }
button.danger:not(.linkish) { background: #c9372c; color: #fff; border-color: #c9372c; }
button.danger:not(.linkish):hover { background: #ae2e24; }
.status-table td { vertical-align: middle; }
.status-edit { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0; }
.status-edit input { max-width: 14rem; }
.status-actions { white-space: nowrap; }
.status-actions > form, .status-actions > details { display: inline-block; margin: 0 0.15rem; vertical-align: middle; }
.status-actions button[disabled] { opacity: 0.35; cursor: default; }
.status-delete { position: relative; }
.status-delete > summary { list-style: none; cursor: pointer; color: var(--warn); }
.status-delete > summary::-webkit-details-marker { display: none; }
.status-delete form {
  position: absolute; right: 0; top: calc(100% + 0.3rem); z-index: 20; width: 240px;
  display: grid; gap: 0.5rem; padding: 0.75rem; white-space: normal;
  background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.status-delete label { display: grid; gap: 0.25rem; }
.wiki-comment-main { min-width: 0; flex: 1; }
.wiki-comment-actions { display: flex; gap: 0.9rem; align-items: flex-start; margin-top: 0.25rem; font-size: 0.85rem; }
.wiki-comment-actions form { margin: 0; }
.wiki-comment-actions .danger { color: var(--warn); }
.comment-edit-box > summary { list-style: none; cursor: pointer; color: var(--accent); }
.comment-edit-box > summary::-webkit-details-marker { display: none; }
.comment-edit-box[open] { flex-basis: 100%; }
.comment-edit-box form { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.role-form { display: flex; gap: 0.35rem; align-items: center; margin: 0; }
html.theme-dark .more-panel, html.theme-dark .status-delete form { background: #2c333a; color: var(--ink); }
html.theme-dark .ghost-btn:hover, html.theme-dark .more-panel > form > .linkish:hover { background: #38414a; }
@media (prefers-color-scheme: dark) {
  html.theme-system .more-panel, html.theme-system .status-delete form { background: #2c333a; color: var(--ink); }
}

/* ---------------------------------------------------------------- search, filters, dashboards */
.small { font-size: 0.8rem; }
.nowrap { white-space: nowrap; }
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.search-head { align-items: flex-start; flex-wrap: wrap; }
.search-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.search-actions form { margin: 0; }
.save-pop { position: relative; }
.save-pop > summary { list-style: none; cursor: pointer; display: inline-block; }
.save-pop > summary::-webkit-details-marker { display: none; }
.save-form {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 25; width: min(340px, calc(100vw - 2rem));
  display: grid; gap: 0.6rem; padding: 0.9rem; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.save-form label { display: grid; gap: 0.25rem; }
label.check { display: flex; gap: 0.45rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 0.2rem; flex: none; }
.search-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0 0 0.8rem; }
.search-bar .search-text { flex: 1 1 220px; min-width: 0; max-width: 360px; }
.search-bar select { width: auto; }
.sort-pick { display: inline-flex; gap: 0.35rem; align-items: center; color: var(--muted); font-size: 0.85rem; }
.search-clear { font-size: 0.85rem; }
.chip-pop { position: relative; }
.chip-pop > summary { list-style: none; cursor: pointer; }
.chip-pop > summary::-webkit-details-marker { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 0.3rem; height: 2.15rem; padding: 0 0.7rem;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font-weight: 500;
}
.chip::after { content: "▾"; font-size: 0.7rem; color: var(--muted); }
.chip:hover { background: #f1f2f4; }
.chip.on { background: #e9f2ff; border-color: #85b8ff; color: #0c66e4; }
.chip-menu {
  position: absolute; left: 0; top: calc(100% + 0.3rem); z-index: 25; min-width: 220px; max-height: 320px; overflow: auto;
  display: grid; gap: 0.15rem; padding: 0.55rem; background: white; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}
.chip-menu .check { padding: 0.25rem 0.3rem; border-radius: 4px; }
.chip-menu .check:hover { background: #f1f2f4; }
.chip-menu-wide { width: min(560px, calc(100vw - 2rem)); max-height: 70vh; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; align-items: start; }
.chip-group { border: 0; margin: 0; padding: 0; display: grid; gap: 0.1rem; max-height: 220px; overflow: auto; }
.chip-group legend { font-weight: 600; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.2rem; padding: 0; }
.criteria-chips { list-style: none; padding: 0; margin: 0 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.criteria-chips li { padding: 0.2rem 0.55rem; border-radius: 999px; background: #f1f2f4; font-size: 0.82rem; }
.result-count { color: var(--muted); margin: 0 0 0.5rem; font-size: 0.85rem; }
.search-results td.overdue { color: var(--warn); font-weight: 600; }
.pager { display: flex; gap: 0.5rem; justify-content: center; margin: 1rem 0; }
.list-search { margin: 0 0 0.8rem; max-width: 320px; }
.dash-edit { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 1rem; }
.dash-edit .save-form { left: 0; right: auto; }
.dash-edit > form { margin: 0 0 0 auto; }
.dash-edit .danger { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.dash-col { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.dash-empty { margin: 0; color: var(--muted); font-size: 0.85rem; }
.gadget { padding: 0.9rem 1rem; min-width: 0; }
.gadget-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.gadget-head h2 { margin: 0; font-size: 0.95rem; }
.gadget-tools { display: flex; gap: 0.1rem; }
.gadget-tools form { margin: 0; }
.gadget-tools button[disabled] { opacity: 0.35; cursor: default; }
.gadget-tools .danger { color: var(--warn); }
.gadget-config { margin: 0 0 0.6rem; position: relative; }
.gadget-config > summary { list-style: none; cursor: pointer; color: var(--accent); font-size: 0.85rem; }
.gadget-config > summary::-webkit-details-marker { display: none; }
.gadget-config .save-form { position: static; width: auto; box-shadow: none; margin-top: 0.4rem; }
.gadget-error { margin: 0; padding: 0.6rem 0.75rem; border-radius: 6px; background: #fff7d6; color: #533f04; }
.gadget-list { list-style: none; padding: 0; margin: 0; }
.gadget-list li {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 0.45rem; align-items: center;
  padding: 0.4rem 0; border-bottom: 1px solid var(--line);
}
.gadget-list .gadget-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.gadget-list .gadget-title:hover { text-decoration: underline; }
.gadget-list .avatar { width: 1.45rem; height: 1.45rem; font-size: 0.58rem; }
.gadget-foot { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.82rem; }
.swatch { width: 0.7rem; height: 0.7rem; flex: none; }
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th, .stats-table td { padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--line); text-align: left; }
.stats-table th { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.stats-table .num { text-align: right; width: 4rem; }
.stats-table tfoot td { font-weight: 600; border-bottom: 0; }
.bar-cell { display: flex; align-items: center; gap: 0.45rem; }
.bar { flex: 1; height: 0.5rem; min-width: 60px; }
.bar-bg { fill: #f1f2f4; }
.bar-fill { fill: #579dff; }
.pct { width: 2.6rem; text-align: right; color: var(--muted); font-size: 0.8rem; }
.gadget-activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.gadget-activity li { display: flex; gap: 0.55rem; align-items: flex-start; }
.gadget-activity p { margin: 0; }
.gadget-activity .avatar { flex: none; }
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .save-form { right: auto; left: 0; }
}
html.theme-dark .save-form, html.theme-dark .chip-menu { background: #2c333a; color: var(--ink); }
html.theme-dark .chip:hover, html.theme-dark .chip-menu .check:hover { background: #38414a; }
html.theme-dark .chip.on { background: #1c2b41; color: #85b8ff; border-color: #85b8ff; }
html.theme-dark .criteria-chips li { background: #2c333a; }
html.theme-dark .bar-bg { fill: #38414a; }
html.theme-dark .gadget-error { background: #332e1b; color: #f8e6a0; }
@media (prefers-color-scheme: dark) {
  html.theme-system .save-form, html.theme-system .chip-menu { background: #2c333a; color: var(--ink); }
  html.theme-system .criteria-chips li { background: #2c333a; }
  html.theme-system .bar-bg { fill: #38414a; }
}

/* ---------------------------------------------------------------- ranking and releases */
.backlog-row[draggable="true"] { cursor: grab; }
.backlog-row.dragging { opacity: 0.45; }
.backlog-row.drop-above { box-shadow: inset 0 2px 0 #0c66e4; }
.backlog-row.drop-below { box-shadow: inset 0 -2px 0 #0c66e4; }
.backlog-list.list-drop { outline: 2px dashed #85b8ff; outline-offset: 2px; border-radius: 6px; }
.drag-handle { color: var(--muted); font-size: 0.8rem; letter-spacing: -0.12em; cursor: grab; user-select: none; }
.rank-menu .ghost-btn { min-width: 1.8rem; height: 1.8rem; font-size: 0.7rem; }
.rank-menu .more-panel { width: 220px; }
.rank-hint { font-size: 0.8rem; margin: 0.4rem 0 0; }
.version-pill {
  display: inline-block; padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.version-pill.vs-unreleased { background: #e9f2ff; color: #0055cc; }
.version-pill.vs-released { background: #dcfff1; color: #216e4e; }
.version-pill.vs-archived { background: #f1f2f4; color: #44546f; }
.version-pill.vs-overdue { background: #ffeceb; color: #ae2e24; }
.release-table td.overdue { color: var(--warn); font-weight: 600; }
.progress-cell { min-width: 150px; }
.progress-bar { display: block; width: 100%; max-width: 220px; height: 0.5rem; margin-bottom: 0.15rem; }
.progress-wide { max-width: none; flex-basis: 100%; height: 0.6rem; }
.pb-todo { fill: #dcdfe4; }
.pb-doing { fill: #579dff; }
.pb-done { fill: #22a06b; }
.release-create { margin-top: 1rem; flex-wrap: wrap; }
.archived-versions { margin-top: 0.8rem; }
.archived-versions summary { cursor: pointer; color: var(--muted); }
.release-stats { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-items: center; margin: 0 0 1rem; }
.release-stats .stat { display: grid; }
.release-stats .stat strong { font-size: 1.4rem; }
.release-stats .stat span { color: var(--muted); font-size: 0.8rem; }
.release-notes { margin-top: 1rem; }
.release-notes h3 { margin: 0.8rem 0 0.3rem; font-size: 0.9rem; }
.release-notes ul { margin: 0; padding-left: 1.2rem; }
.notes-copy { display: grid; gap: 0.3rem; margin-top: 1rem; color: var(--muted); font-size: 0.85rem; }
.notes-copy textarea { font-family: ui-monospace, monospace; font-size: 0.82rem; }
.version-pick .chip { height: auto; min-height: 2rem; padding: 0.25rem 0.6rem; text-align: left; }
.version-pick .chip-menu { left: auto; right: 0; }
html.theme-dark .pb-todo { fill: #38414a; }
html.theme-dark .version-pill.vs-unreleased { background: #1c2b41; color: #85b8ff; }
html.theme-dark .version-pill.vs-released { background: #1c3329; color: #7ee2b8; }
html.theme-dark .version-pill.vs-archived { background: #2c333a; color: #8c9bab; }
html.theme-dark .version-pill.vs-overdue { background: #42221f; color: #fd9891; }
@media (prefers-color-scheme: dark) {
  html.theme-system .pb-todo { fill: #38414a; }
}

/* ---------------------------------------------------------------- sprint charts */
.report-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.8rem; }
.report-bar .home-tabs { margin: 0; }
.report-pick { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0; }
.report-pick label { display: inline-flex; gap: 0.35rem; align-items: center; color: var(--muted); font-size: 0.85rem; }
.report-pick select { width: auto; }
.chart-card { margin-bottom: 1rem; }
.chart { display: block; width: 100%; height: auto; max-height: 340px; }
.chart .grid { stroke: #ebecf0; stroke-width: 1; }
.chart .axis { stroke: #8590a2; stroke-width: 1; }
.chart .tick { font-size: 11px; fill: #626f86; }
.chart .guide { fill: none; stroke: #8590a2; stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .remaining { fill: none; stroke: #c9372c; stroke-width: 2.2; stroke-linejoin: round; }
.chart .now { stroke: #0c66e4; stroke-width: 1; stroke-dasharray: 2 3; }
.chart .avg { stroke: #6e5dc6; stroke-width: 1.5; stroke-dasharray: 6 4; }
.bar-committed { fill: #b3b9c4; }
.bar-completed { fill: #22a06b; }
.lg-remaining { fill: #c9372c; }
.lg-guide { fill: #8590a2; }
.lg-avg { fill: #6e5dc6; }
.chart-legend { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--muted); }
.chart-legend li { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-note { margin: 0.5rem 0; padding: 0.5rem 0.7rem; border-radius: 6px; background: #fff7d6; color: #533f04; font-size: 0.85rem; }
td.num, th.num { text-align: right; }
tr.ev-completed td:nth-child(4) { color: #216e4e; font-weight: 600; }
tr.ev-added td:nth-child(4), tr.ev-reopened td:nth-child(4) { color: #ae2e24; font-weight: 600; }
tr.ev-start td, tr.ev-end td { font-weight: 600; }
html.theme-dark .chart .grid { stroke: #2c333a; }
html.theme-dark .chart .tick { fill: #8c9bab; }
html.theme-dark .chart-note { background: #332e1b; color: #f8e6a0; }
@media (prefers-color-scheme: dark) {
  html.theme-system .chart .grid { stroke: #2c333a; }
  html.theme-system .chart .tick { fill: #8c9bab; }
}

/* ---------------------------------------------------------------- bulk change */
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.result-bar .result-count { margin: 0; }
.bulk-pop .save-form { width: min(380px, calc(100vw - 2rem)); max-height: 75vh; overflow: auto; }
.bulk-buttons { display: flex; justify-content: space-between; gap: 0.5rem; }
.bulk-count { font-weight: 600; }
.search-results th.pick, .search-results td.pick { width: 2rem; padding-right: 0; }
.search-results td.pick input, .search-results th.pick input { width: auto; margin: 0; }
.list-tools { margin: 0 0 0.5rem; font-size: 0.85rem; text-align: right; }

/* ---------------------------------------------------------------- page templates */
.gallery-head { margin: 1.2rem 0 0.6rem; font-size: 1rem; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.8rem; }
.template-card {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.template-card.is-focus { border-color: #85b8ff; box-shadow: 0 0 0 1px #85b8ff; }
.template-card h3 { margin: 0; font-size: 0.95rem; }
.template-card p { margin: 0; }
.template-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: auto; padding-top: 0.5rem; }
.template-actions form { margin: 0; }
.template-actions .danger { color: var(--warn); }
.more-link { font-size: 0.85rem; }
.more-panel > .more-link { display: block; padding: 0.45rem 0.55rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.more-panel > .more-link:hover { background: #f1f2f4; }
.template-meta { display: grid; gap: 0.6rem; margin: 0.8rem 0; max-width: 720px; }
.template-meta label { display: grid; gap: 0.25rem; }
.template-meta p { margin: 0; }
.template-note { margin-top: 0.5rem; }
html.theme-dark .more-panel > .more-link:hover { background: #38414a; }

/* ---------------------------------------------------------------- API and webhooks */
.token-list li { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; }
.token-list form { margin: 0 0 0 auto; }
.token-list .danger { color: var(--warn); }
.token-form { display: grid; gap: 0.5rem; margin-bottom: 1.2rem; }
.secret-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; width: 100%; }
.code-sample {
  background: #f7f8f9; border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.75rem;
  font-size: 0.8rem; overflow-x: auto; white-space: pre; max-width: 100%;
}
.api-docs h2 { margin-top: 1.2rem; }
.api-table td:first-child { white-space: nowrap; font-weight: 600; }
.hook-url { margin: 0; word-break: break-all; }
.ok-text { color: #216e4e; font-weight: 600; }
.bad-text { color: var(--warn); font-weight: 600; }
.payload-view { display: inline-block; }
.payload-view > summary { list-style: none; cursor: pointer; color: var(--accent); display: inline; }
.payload-view > summary::-webkit-details-marker { display: none; }
.payload-view[open] .code-sample { position: absolute; right: 1rem; z-index: 20; max-width: min(640px, 90vw); max-height: 60vh; overflow: auto; background: var(--card); box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12); }
html.theme-dark .code-sample { background: #22272b; }

/* ---------------------------------------------------------------- cumulative flow */
.chart-card .report-bar h2 { margin: 0; }
.cfd-band { stroke: #ffffff; stroke-width: 0.6; }
.cfd-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 0.4rem 0 0.6rem; }
.cfd-stats .stat { display: grid; }
.cfd-stats .stat strong { font-size: 1.3rem; }
.cfd-stats .stat span { color: var(--muted); font-size: 0.8rem; }
.cfd-table { margin-top: 0.6rem; max-width: 420px; }
html.theme-dark .cfd-band { stroke: #22272b; }

/* ---------------------------------------------------------------- CSV import */
.import-map select { min-width: 14rem; }
.import-options { margin-top: 1rem; }
.import-options form, .import-options { display: grid; gap: 0.6rem; }
.import-run { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1rem; }
.import-rows p { margin: 0; }
.import-rows tr.row-error td { background: #fff5f4; }
.import-rows tr.row-warn td { background: #fffbeb; }
html.theme-dark .import-rows tr.row-error td { background: #3a2422; }
html.theme-dark .import-rows tr.row-warn td { background: #33301e; }

/* ---------------------------------------------------------------- error page */
.error-page { max-width: 520px; margin: 12vh auto; padding: 0 1rem; text-align: center; }
.error-page h1 { margin-bottom: 0.6rem; }
