:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f8f9fc;
  --muted: #5c667a;
  --text: #1f2430;
  --line: #dfe4ef;
  --planned: #2f80ed;
  --in-progress: #7a5cff;
  --in-review: #0891b2;
  --at-risk: #f5a623;
  --blocked: #e74c3c;
  --done: #22a35a;
  --type-initiative: #2f80ed;
  --type-epic: #7a5cff;
  --type-story: #2f9a52;
  --accent: #2f80ed;
  --accent-strong: #2670d4;
  --accent-soft: #e8f1fd;
  --link: #1f5fc4;
  --muted-2: #8a94a6;
  --text-strong: #172033;
  --border: #e3e8f1;
  --border-strong: #d3dbe8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #f1f4f9;
  --danger: #c2322b;
  --danger-soft: #fdf0ef;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --control-h: 40px;
  --focus-ring: 0 0 0 3px rgba(47, 128, 237, 0.22);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}
.topbar-start {
  justify-self: start;
  min-width: 0;
}
.topbar-center {
  justify-self: center;
}
.topbar-end {
  justify-self: end;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.brand img {
  width: auto;
  height: 30px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f3f5f9;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
.hidden {
  display: none !important;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  background: #fff;
  color: #3a4a67;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.icon-btn:hover {
  background: #f8fafd;
  border-color: #d5deef;
}
.text-btn {
  border: none;
  background: transparent;
  color: #32528f;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 8px;
}
.text-btn:hover {
  text-decoration: underline;
}
.danger-text {
  color: #be2a2a;
}
.tab {
  border: none;
  background: transparent;
  color: #5c667a;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}
.tab.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.05);
}

.sync-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #fff4e5;
  color: #8a5a00;
  border-bottom: 1px solid #f0d9a8;
}
.sync-banner[data-kind="error"] {
  background: #fdecea;
  color: #b42318;
  border-bottom-color: #f3c1bc;
}
.primary-btn,
.danger-btn {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.primary-btn {
  background: #2f80ed;
  color: #fff;
  border-color: #2f80ed;
  box-shadow: 0 1px 2px rgba(47, 128, 237, 0.2), 0 4px 12px rgba(47, 128, 237, 0.16);
}
.primary-btn:hover {
  background: #2670d4;
  border-color: #2670d4;
}
.danger-btn {
  background: #fff5f5;
  border-color: #f3bcbc;
  color: #be2a2a;
}

.board-title { margin: 0 0 8px; font-size: 24px; }
.board-description { margin: 0 0 16px; color: var(--muted); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
  padding: 8px;
  background: #f3f5f9;
  border: 1px solid #e6eaf2;
  border-radius: 14px;
}
.filters > * {
  min-width: 0;
}
.search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  flex: 1 1 240px;
  min-width: 200px;
}
.nnl-empty {
  margin: 0;
  color: #8a94a6;
  font-size: 13px;
}
.type-pill {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
}
.type-pill.type-initiative {
  background: var(--type-initiative);
}
.type-pill.type-epic {
  background: var(--type-epic);
}
.type-pill.type-story {
  background: var(--type-story);
}
.card.dragging {
  opacity: 0.55;
}
.status-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}
.status-col {
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
  border: 1px solid #e8edf5;
  border-radius: 14px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.status-col.drag-over {
  box-shadow: inset 0 0 0 2px #9bb8ff;
  background: #eef4ff;
}
.status-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
}
.status-col-head h3 {
  margin: 0;
  font-size: 13px;
}
.status-count {
  font-size: 11px;
  color: #5c667a;
  background: #fff;
  border: 1px solid #d7deed;
  border-radius: 999px;
  padding: 2px 8px;
}
.status-col-body {
  padding: 0 10px 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  align-items: stretch;
  flex: 0 0 auto;
  min-height: 0;
}
.status-col-body .card {
  margin-bottom: 0;
  min-height: 0;
  height: auto;
}
.labels-fieldset {
  border: 1px solid #dce3f1;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}
.labels-editor {
  display: grid;
  gap: 8px;
}
.label-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}
.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #31405d;
  background: #eef3fb;
  border: 1px solid #d4ddef;
  border-radius: 999px;
  padding: 3px 8px;
}
.label-chip.compact {
  padding: 2px 8px;
}
.label-chip button {
  border: none;
  background: transparent;
  color: #5c667a;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 2px;
}
.labels-empty {
  color: #8a94a6;
  font-size: 12px;
}
.labels-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.labels-add-row input,
.labels-add-row button {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: #243047;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.labels-add-row button {
  cursor: pointer;
}
.nnl {
  display: none;
}
.nnl-col {
  display: none;
}
.search-wrap button {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #243047;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.filters input,
.filters select {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #243047;
  background: #fff;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filters input:focus,
.filters select:focus,
.project-switcher:focus {
  border-color: #9bb8ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}

.swimlane-grid {
  display: block;
}
.lane-count {
  font-size: 12px;
  color: #6a7893;
  font-weight: 500;
}
.drag-over {
  box-shadow: inset 0 0 0 2px #9bb8ff;
}

.roadmap-board {
  border: 1px solid #e8edf5;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}
.roadmap-axis {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid #e8edf5;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fc 100%);
}
.axis-left {
  padding: 12px;
  font-size: 12px;
  color: #53617a;
  font-weight: 600;
}
.axis-right {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.axis-cell {
  padding: 12px 8px;
  border-left: 1px dashed #dce4f5;
  text-align: center;
  font-size: 12px;
  color: #3a4a67;
  font-weight: 600;
}

.roadmap-lane-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-top: 1px solid #edf1f8;
  min-height: 92px;
}
.roadmap-lane-row:first-of-type {
  border-top: none;
}
.roadmap-lane-block {
  position: relative;
  color: #243047;
  padding: 14px 14px 14px 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  background: color-mix(in srgb, var(--lane-accent, #54c8dd) 10%, #fff);
  border-right: 1px solid #e8edf5;
}
.roadmap-lane-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--lane-accent, #54c8dd);
}
.roadmap-lane-block strong {
  font-size: 13px;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: color-mix(in srgb, var(--lane-accent, #54c8dd) 72%, #1f2430);
}
.assignee-chip {
  font-size: 11px;
  color: #475774;
  border: 1px solid #d4ddef;
  border-radius: 999px;
  padding: 2px 8px;
}
.roadmap-lane-tracks {
  position: relative;
  background: #fff;
  overflow-x: auto;
  min-height: 90px;
}
.roadmap-lane-tracks.drag-over {
  box-shadow: inset 0 0 0 2px #9bb8ff;
  background: #f5f8ff;
}
.lane-marker-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
}
.lane-marker-cell {
  border-left: 1px dashed #e2e7f2;
}
.lane-marker-cell:first-child {
  border-left: none;
}
.roadmap-item-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 48px;
}
.roadmap-bar {
  position: absolute;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--lane-accent, #54c8dd) 28%, #fff);
  border-radius: 12px;
  color: #1f2a3d;
  text-align: left;
  padding: 0 10px 0 14px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--lane-accent, #54c8dd) 18%, #fff) 0%,
    color-mix(in srgb, var(--lane-accent, #54c8dd) 28%, #fff) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 6px 16px color-mix(in srgb, var(--lane-accent, #54c8dd) 12%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.roadmap-bar:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 10px 20px color-mix(in srgb, var(--lane-accent, #54c8dd) 16%, transparent);
}
.roadmap-bar:active {
  cursor: grabbing;
}
.roadmap-bar.dragging {
  opacity: 0.55;
}
.roadmap-bar .bar-title {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  color: #1f2a3d;
}
.roadmap-bar .bar-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.roadmap-bar .bar-label {
  display: block;
  max-width: 100%;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #4b5a73;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roadmap-bar .issue-key {
  color: inherit;
  font-weight: 700;
}
.roadmap-bar .bar-status,
.roadmap-legend .bar-status {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.bar-status-planned {
  background: var(--planned);
  font-size: 13px;
}
.bar-status-done {
  background: var(--done);
}
.bar-status-in_progress {
  background: var(--in-progress);
  font-size: 11px;
}
.bar-status-in_review {
  background: var(--in-review);
  font-size: 11px;
}
.bar-status-blocked {
  background: var(--blocked);
}
.bar-status-at_risk {
  background: var(--at-risk);
  color: #1f2937;
}
.roadmap-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 14px 16px;
  border-top: 1px solid #e8edf5;
  margin-top: 4px;
  background: #fbfcfe;
}
.roadmap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5a73;
}
.roadmap-legend-item .bar-status {
  width: 20px;
  height: 20px;
}
.lane-empty {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #8492ad;
  font-size: 12px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 12px 12px 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--card-accent, var(--planned));
}
.card:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), 0 8px 20px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.priority {
  border-radius: 999px;
  border: 1px solid #d4ddef;
  color: #5a6782;
  padding: 3px 7px;
  font-size: 11px;
  height: fit-content;
}

.card h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}
.card-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  min-height: 34px;
}
.dep-line {
  font-size: 11px;
  color: #73819c;
}
.theme-chip {
  border-radius: 999px;
  border: 1px solid #d4ddef;
  color: #4f5f7c;
  padding: 2px 8px;
  font-size: 11px;
}
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.chip {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  border: 1px solid transparent;
}

.timeline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 0;
  border-top: 1px solid #edf1f7;
}

.timeline-row:first-child { border-top: none; }

.bar-wrap {
  background: #f4f6fb;
  border: 1px solid #e3e8f3;
  border-radius: 999px;
  height: 16px;
  position: relative;
}

.bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 999px;
  min-width: 8px;
}
.timeline-label {
  display: grid;
  gap: 2px;
}
.timeline-label span {
  color: var(--muted);
  font-size: 12px;
}

.plans-view {
  border: 1px solid #dce3f1;
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
}
.plans-view > .plans-header,
.plans-view .plans-row {
  min-width: 980px;
}
.plans-header,
.plans-row {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) 110px 110px 110px minmax(220px, 1fr);
  align-items: stretch;
}
.plans-header-assignee,
.plans-row-assignee {
  grid-template-columns: minmax(260px, 1.4fr) 140px 118px 118px 126px minmax(180px, 1fr);
}
.plans-header {
  background: #f8fafd;
  border-bottom: 1px solid #e2e8f3;
  font-size: 12px;
  font-weight: 600;
  color: #475774;
}
.plans-body {
  display: grid;
}
.plans-timeline-header {
  display: grid;
  grid-template-columns: repeat(var(--plans-col-count, 4), 1fr);
  padding: 0 !important;
  min-height: 100%;
}
.plans-period-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-left: 1px dashed #d7deed;
  font-size: 11px;
  font-weight: 600;
  color: #3a4a67;
  text-align: center;
}
.plans-period-label:first-child {
  border-left: none;
}
.plans-header > div,
.plans-row > div {
  padding: 8px;
  border-left: 1px solid #eef2f8;
}
.plans-header > div:first-child,
.plans-row > div:first-child {
  border-left: none;
}
.plans-row {
  border-top: 1px solid #edf1f8;
  font-size: 12px;
  background: #fff;
  border-left: 3px solid transparent;
}
.plans-row-initiative {
  background: #f3f8ff;
  border-left-color: #2f80ed;
}
.plans-row-epic {
  background: #f7f4ff;
  border-left-color: #7a5cff;
}
.plans-row-story {
  background: #f3faf5;
  border-left-color: #34a853;
}
.plans-row:hover {
  filter: brightness(0.985);
}
.plans-inline-control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 6px;
  border: 1px solid #d4ddef;
  border-radius: 6px;
  background: #fff;
  color: #1f2430;
  min-width: 0;
}
.plans-inline-control:focus {
  outline: 2px solid rgba(47, 128, 237, 0.25);
  border-color: #2f80ed;
}
.plans-assignee .plans-inline-control {
  max-width: 132px;
}
.plans-tree-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.plans-tree-cell[data-depth="1"] {
  padding-left: 22px;
}
.plans-tree-cell[data-depth="2"] {
  padding-left: 44px;
}
.plan-node-link {
  border: none;
  background: transparent;
  color: #1f2430;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
}
.plan-node-link:hover {
  text-decoration: underline;
}
.plan-toggle {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  color: #5c667a;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.plan-toggle-spacer {
  width: 16px;
  flex-shrink: 0;
}
.type-icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}
.type-icon.type-initiative {
  background: var(--type-initiative);
}
.type-icon.type-epic {
  background: var(--type-epic);
  border-radius: 3px;
}
.type-icon.type-story {
  background: var(--type-story);
  border-radius: 2px;
}
.plans-row-initiative .plan-node-link {
  font-weight: 600;
}
.plans-status {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid #d4ddef;
  width: fit-content;
}
.plans-status-select {
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
}
.plans-timeline-cell {
  position: relative;
  min-height: 34px;
}
.plans-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--plans-col-count, 4), 1fr);
  pointer-events: none;
}
.plans-grid > div {
  border-left: 1px dashed #e2e7f2;
}
.plans-grid > div:first-child {
  border-left: none;
}
.plans-bar {
  position: absolute;
  top: 8px;
  height: 18px;
  border-radius: 999px;
}

#node-stories-list li button {
  border: none;
  background: transparent;
  color: #32528f;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}

dialog.app-modal {
  position: fixed;
  inset: 0;
  width: fit-content;
  height: fit-content;
  margin: auto;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  outline: none;
  max-width: calc(100vw - 24px);
  max-height: min(920px, calc(100vh - 32px));
}
dialog.app-modal::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}
#item-dialog,
#node-dialog {
  width: min(920px, 96vw);
  max-height: min(920px, calc(100vh - 32px));
}
#item-form,
#node-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  max-height: min(920px, calc(100vh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  min-width: 0;
}
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f8;
}
.dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2430;
  flex: 1;
  min-width: 0;
}
.dialog-close-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin: -4px -6px 0 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #5c667a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dialog-close-btn:hover {
  background: #f3f5f9;
  border-color: #e6eaf2;
  color: #1f2430;
}
#item-form h2,
#node-form h2 {
  margin: 0;
  font-size: 18px;
}
#item-form > label,
#node-form > label,
.form-row > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  letter-spacing: 0.01em;
  min-width: 0;
}
.title-field {
  gap: 2px !important;
}
.description-field textarea {
  min-height: 72px;
  resize: vertical;
}
#item-form input,
#item-form textarea,
#item-form select,
#node-form input,
#node-form textarea,
#node-form select,
.assignee-add-select,
.labels-add-row input,
.labels-add-row button,
.file-picker-btn,
.secondary-btn {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  background: #fff;
  color: #243047;
  box-sizing: border-box;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#item-form input:focus,
#item-form textarea:focus,
#item-form select:focus,
#node-form input:focus,
#node-form textarea:focus,
#node-form select:focus,
.assignee-add-select:focus,
.labels-add-row input:focus {
  border-color: #9bb8ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
#item-title,
#node-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: #172b4d;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 44px;
  margin: 0;
  box-shadow: none;
}
#item-title:hover,
#node-title:hover {
  background: #f6f8fc;
}
#item-title:focus,
#node-title:focus {
  border-color: #9bb8ff;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
.dialog-breadcrumb {
  margin: -4px 0 0;
  font-size: 12px;
  color: #6b778c;
  line-height: 1.4;
}
.dialog-status-select,
.plans-status-select {
  font-weight: 600;
}
.dialog-status-select.status-planned,
.plans-status-select.status-planned,
.status-pill.status-planned {
  color: #1a5bb8;
  background: #e8f1fc;
  border-color: #9ec0ef;
}
.dialog-status-select.status-in_progress,
.plans-status-select.status-in_progress,
.status-pill.status-in_progress {
  color: #4a2fd4;
  background: #efeaff;
  border-color: #b8a6ff;
}
.dialog-status-select.status-in_review,
.plans-status-select.status-in_review,
.status-pill.status-in_review {
  color: #0e6f86;
  background: #e3f6fa;
  border-color: #8fd3e2;
}
.status-pill.status-at_risk {
  color: #9a6408;
  background: #fff4df;
  border-color: #f0c56a;
}
.status-pill.status-blocked {
  color: #b42318;
  background: #fde8e6;
  border-color: #f0a39a;
}
.dialog-status-select.status-done,
.plans-status-select.status-done,
.status-pill.status-done {
  color: #1b7a3d;
  background: #e6f7ec;
  border-color: #8ed4a8;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid transparent;
  padding: 3px 8px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}
#item-form textarea,
#node-form textarea {
  min-height: 64px;
  resize: vertical;
}
.form-row {
  display: grid;
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.form-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compact-fieldset {
  margin: 0;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #f8fafd;
}
.compact-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  letter-spacing: 0.01em;
  padding: 0 4px;
}
.field-hint {
  font-weight: 500;
  color: #8a94a6;
  font-size: 11px;
}
.secondary-btn {
  cursor: pointer;
  white-space: nowrap;
}
.secondary-btn:hover {
  background: #f5f8fc;
}
.file-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.file-picker-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}
.file-picker-name {
  font-size: 12px;
  color: #6b768a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
@media (max-width: 720px) {
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.deps-fieldset {
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  background: #f8fafd;
}
.deps-fieldset legend,
.hierarchy-fieldset legend,
.comments-fieldset legend,
.attachments-fieldset legend,
.people-fieldset legend,
.labels-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  padding: 0 4px;
}
.deps-field {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.deps-field:last-child {
  margin-bottom: 0;
}
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b778c;
  letter-spacing: 0.01em;
}
.deps-help {
  margin: 0 0 10px;
  font-size: 12px;
  color: #6b778c;
  line-height: 1.4;
}
.deps-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.deps-add-row button {
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  padding: 7px 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #172b4d;
}
.deps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.deps-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid #ebecf0;
  border-radius: 3px;
  padding: 6px 8px;
  font-size: 13px;
  color: #172b4d;
  background: #fff;
}
.deps-list button {
  border: none;
  background: transparent;
  color: #be2a2a;
  cursor: pointer;
  font-size: 12px;
}
.hierarchy-fieldset {
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  background: #f8fafd;
}
.hierarchy-actions {
  margin-bottom: 8px;
}
.hierarchy-actions button {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #243047;
  min-height: 36px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hierarchy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.hierarchy-empty {
  border: 1px dashed #e6eaf2 !important;
  border-radius: 10px;
  padding: 12px !important;
  color: #6b778c;
  font-size: 13px;
  font-style: italic;
  background: #fff;
  display: block !important;
}
.epic-list-row,
.hierarchy-list li.epic-list-row {
  display: grid;
  grid-template-columns: 20px 12px minmax(0, 1.6fr) auto minmax(90px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}
.epic-open-link {
  border: none;
  background: transparent;
  color: #0052cc;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 0;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epic-open-link:hover {
  text-decoration: underline;
}
.epic-meta {
  font-size: 12px;
  color: #6b778c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hierarchy-epic-actions {
  display: flex;
  gap: 8px;
}
.hierarchy-epic-actions button {
  border: none;
  background: transparent;
  color: #0052cc;
  cursor: pointer;
  font-size: 12px;
}
.story-list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 10px;
  display: grid;
  gap: 4px;
}
.story-list li {
  font-size: 12px;
  color: #475774;
  border-left: 2px solid #d9e2f2;
  padding-left: 8px;
}

@media (max-width: 1024px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: stretch;
  }
  .topbar-start,
  .topbar-center,
  .topbar-end {
    justify-self: stretch;
  }
  .topbar-center {
    display: flex;
    justify-content: center;
  }
  .actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .roadmap-axis,
  .roadmap-lane-row {
    grid-template-columns: 140px 1fr;
  }
}

.project-switcher {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #243047;
  background: #fff;
  max-width: 220px;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.issue-key {
  color: inherit;
  font-weight: 700;
  font-size: 0.92em;
  margin-right: 4px;
}
.reorder-actions {
  display: inline-flex;
  gap: 2px;
}
.reorder-actions button {
  border: 1px solid #e6eaf2;
  background: #fff;
  border-radius: 8px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: #3a4a67;
  line-height: 1;
}
.settings-create-project,
.settings-move-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f8;
}
.settings-create-project .settings-inline-add {
  grid-template-columns: 1.2fr 0.7fr auto;
}
.roadmap-bar .issue-key {
  color: inherit;
}
.loading {
  padding: 2rem;
  color: #5b6475;
}

.auth-gate {
  max-width: 420px;
  margin: 4rem auto;
  padding: 2rem;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.auth-gate-mark {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
}
.auth-gate h2 {
  margin: 0 0 0.75rem;
}

.auth-gate-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
}
.auth-gate .text-btn {
  display: block;
  margin: 10px auto 0;
}
.auth-gate p {
  margin: 0 0 1.25rem;
  color: #5b6475;
}

.project-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 4px;
}

dialog.settings-dialog {
  width: min(980px, calc(100vw - 32px));
  height: min(700px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
}
dialog.prompt-dialog {
  width: min(480px, calc(100vw - 32px));
}
#prompt-form {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
  box-sizing: border-box;
}
.prompt-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  letter-spacing: 0.01em;
}
#prompt-form input {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  background: #fff;
  color: #243047;
  box-sizing: border-box;
  min-height: 42px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#prompt-form input:focus {
  border-color: #9bb8ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
#prompt-form menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.settings-shell {
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #eef2f8;
}
.settings-header h2 {
  margin: 0;
  font-size: 18px;
}
.settings-subtitle {
  margin: 4px 0 0;
  color: #6b768a;
  font-size: 13px;
}
.settings-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  flex: 1;
  min-height: 0;
}
.settings-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px;
  background: #f8fafd;
  border-right: 1px solid #eef2f8;
  min-height: 0;
  overflow-y: auto;
}
.settings-nav-btn {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #3a4a67;
  font-size: 13px;
}
.settings-nav-btn:hover {
  background: #eef3fb;
}
.settings-nav-btn.active {
  background: #e8effc;
  color: #1f4fb8;
  font-weight: 600;
}
.settings-panels {
  padding: 18px 20px 24px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.settings-panel {
  min-width: 0;
}
.settings-panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
}
.settings-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #3a4a67;
}
.settings-field input,
.settings-field select,
.settings-inline-add input,
.settings-inline-add select,
.settings-list-row input,
.settings-list-row select {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #243047;
  background: #fff;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
}
.settings-field input:focus,
.settings-field select:focus,
.settings-inline-add input:focus,
.settings-inline-add select:focus,
.settings-list-row input:focus,
.settings-list-row select:focus {
  border-color: #9bb8ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
.settings-actions {
  margin-top: 8px;
}
.settings-note {
  margin: 14px 0 0;
  color: #7a8496;
  font-size: 12px;
}
.settings-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.settings-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e8edf6;
  border-radius: 12px;
  background: #fbfcfe;
}
.settings-list-row.member-row {
  grid-template-columns: 1fr 110px auto;
}
.settings-empty {
  color: #8a94a6;
  font-size: 13px;
  padding: 12px;
  border: 1px dashed #d7deed;
  border-radius: 12px;
}
.settings-inline-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.settings-inline-add.members-add {
  grid-template-columns: 1fr 110px;
}
.member-picker {
  display: grid;
  gap: 8px;
}
.member-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e2e8f3;
  border-radius: 12px;
  background: #fff;
}
.member-search-results[hidden] {
  display: none;
}
.member-search-hit {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
  font: inherit;
  color: inherit;
}
.member-search-hit:hover {
  background: #eef3fb;
}
.member-search-results .settings-empty {
  padding: 12px;
  margin: 0;
}
.priority-high { color: #be2a2a; }
.priority-medium { color: #b86e00; }
.priority-low { color: #3d6b3d; }

.story-table-head,
.story-line {
  display: grid;
  grid-template-columns: 24px minmax(120px, 1.8fr) minmax(90px, 1fr) minmax(110px, 1.1fr) 88px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.story-line > *,
.story-table-head > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-col-assignee,
.story-col-dates {
  font-size: 12px;
  color: #6b778c;
}
.drag-handle {
  cursor: grab;
  color: #8a94a6;
  font-size: 14px;
  user-select: none;
  text-align: center;
}
.hierarchy-epic-item.dragging,
.story-line.dragging {
  opacity: 0.5;
}
.hierarchy-epic-item.drop-target,
.story-line.drop-target {
  outline: 2px dashed #9bb8ff;
  outline-offset: 2px;
}
.settings-list-row.theme-row {
  grid-template-columns: 1fr auto auto auto;
}
.theme-usage {
  font-size: 11px;
  color: #6b768a;
  white-space: nowrap;
}
.story-table-head {
  font-size: 11px;
  font-weight: 600;
  color: #6b778c;
  padding: 4px 10px;
  margin-top: 6px;
}
.story-table-head.compact {
  margin-top: 2px;
}
.story-line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.story-line {
  border: 1px solid #ebecf0;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 13px;
  color: #172b4d;
  background: #fff;
}
.story-line.empty {
  display: grid;
  color: #6b778c;
  border-style: dashed;
  padding: 8px 12px;
  font-style: italic;
}
.story-line.empty > * {
  overflow: visible;
  text-overflow: unset;
}
.story-line-open,
.story-line-title {
  border: none;
  background: transparent;
  color: #0052cc;
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.story-line-open:hover {
  text-decoration: underline;
}

.comments-fieldset {
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  padding: 12px 14px;
  margin: 0;
  background: #fafbfc;
}
.comments-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.comment-item {
  border: 1px solid #ebecf0;
  border-radius: 3px;
  padding: 8px 10px;
  background: #fff;
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #6b778c;
  margin-bottom: 4px;
}
.comment-item p {
  margin: 0;
  font-size: 13px;
  white-space: pre-wrap;
}
.comment-empty {
  color: #6b778c;
  font-size: 12px;
}
.comment-compose {
  display: grid;
  gap: 8px;
}
.comment-compose textarea {
  width: 100%;
  resize: vertical;
}

.member-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #1f4fb8;
  background: #e8effc;
  border-radius: 6px;
  padding: 2px 6px;
}
.member-role-static {
  font-size: 13px;
  color: #3a4a67;
  padding: 8px 4px;
}
.plans-assignee {
  color: #475774;
  font-size: 12px;
}

.people-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 2px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
}
.people-chip {
  border: 1px solid #e6eaf2;
  background: #f8fafd;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #3a4a67;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.people-chip:hover {
  background: #fff;
  border-color: #d5deef;
}
.people-chip.active {
  background: #e8effc;
  border-color: #9bb8ff;
  color: #1f4fb8;
}
.people-fieldset,
.attachments-fieldset,
.labels-fieldset {
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  background: #f8fafd;
}
.hierarchy-fieldset,
.deps-fieldset,
.comments-fieldset {
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  background: #f8fafd;
}
.hierarchy-fieldset legend,
.deps-fieldset legend,
.comments-fieldset legend,
.attachments-fieldset legend,
.people-fieldset legend,
.labels-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  padding: 0 4px;
}
#item-form menu,
#node-form menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #eef2f8;
}
.assignee-picker {
  display: grid;
  gap: 8px;
}
.assignee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}
.assignee-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef3fb;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}
.assignee-pick-chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #5c667a;
  font-size: 14px;
  line-height: 1;
}
.assignee-empty {
  color: #8a94a6;
  font-size: 12px;
}
.attachments-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.attachment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.attachment-meta {
  color: #6b768a;
  font-size: 12px;
}
.attachments-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.rich-toolbar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.rich-toolbar button {
  border: 1px solid #d7deed;
  background: #fff;
  border-radius: 6px;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.rich-editor {
  min-height: 64px;
  max-height: 160px;
  border: 1px solid #dfe1e6;
  border-radius: 3px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: #172b4d;
  background: #fff;
  overflow: auto;
}
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: #6b778c;
  font-size: 13px;
}
.comment-body {
  font-size: 13px;
  line-height: 1.45;
  color: #172b4d;
  overflow-wrap: anywhere;
}
.comment-body a {
  color: #1f4fb8;
}

@media (max-width: 720px) {
  .settings-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .settings-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid #eef2f8;
  }
  .settings-inline-add,
  .settings-inline-add.members-add,
  .settings-list-row.member-row {
    grid-template-columns: 1fr;
  }
  .story-table-head,
  .story-line {
    grid-template-columns: 1fr 1fr;
  }
}

/* Focus tab */
.focus-view {
  display: grid;
  gap: 18px;
  padding: 8px 20px 32px;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
}
.focus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.focus-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.focus-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.focus-panel {
  border: 1px solid #e6eaf2;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 0;
}
.focus-panel-head h3 {
  margin: 0;
  font-size: 15px;
}
.focus-group h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b778c;
}
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.focus-empty {
  margin: 0;
  color: #8a94a6;
  font-size: 13px;
}
.focus-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: stretch;
}
.focus-row:not(.reminder-row) {
  grid-template-columns: 1fr;
}
.focus-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  text-align: left;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.focus-row-main:hover {
  border-color: #c9d6ef;
  background: #f8fbff;
}
.focus-row-title {
  flex: 1 1 180px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.focus-row-meta {
  flex: 1 1 100%;
  font-size: 12px;
  color: #6b778c;
}
.reminder-check {
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1.5px solid #9aa8c1;
  background: #fff;
  cursor: pointer;
  color: #1f7a3f;
  font-weight: 700;
  line-height: 1;
}
.reminder-row.is-completed .focus-row-title {
  text-decoration: line-through;
  color: #8a94a6;
  font-weight: 500;
}
.reminder-row.is-flagged .focus-row-main {
  border-color: #f0c3a0;
  background: #fffaf5;
}
.reminder-priority {
  color: #be2a2a;
  margin-right: 6px;
  font-weight: 700;
}
.focus-completed-toggle {
  display: flex;
  justify-content: flex-start;
}

#reminder-dialog {
  width: min(640px, 96vw);
  max-height: min(860px, calc(100vh - 32px));
}
#reminder-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  max-height: min(860px, calc(100vh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  min-width: 0;
}
#reminder-form > label,
#reminder-form .form-row > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5c667a;
  letter-spacing: 0.01em;
  min-width: 0;
}
#reminder-form input,
#reminder-form textarea,
#reminder-form select {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  background: #fff;
  color: #243047;
  box-sizing: border-box;
  min-height: 38px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#reminder-form input:focus,
#reminder-form textarea:focus,
#reminder-form select:focus {
  border-color: #9bb8ff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
#reminder-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  color: #172b4d;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
  min-height: 44px;
  margin: 0 -6px;
  box-shadow: none;
}
#reminder-title:hover {
  background: #f6f8fc;
}
#reminder-title:focus {
  border-color: #9bb8ff;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
#reminder-form textarea {
  min-height: 72px;
  resize: vertical;
}
#reminder-form menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid #eef2f8;
}
.reminder-flag-toggle {
  align-content: start;
}
.reminder-flag-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-size: 13px;
  font-weight: 500;
  color: #243047;
}
.reminder-flag-control input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  box-shadow: none;
}
@media (max-width: 960px) {
  .focus-columns {
    grid-template-columns: 1fr;
  }
  .focus-view {
    padding: 8px 16px 28px;
  }
}

/* Connected Docs & Code (Outline Cloud + Forgejo NAS 1-Click Navigation) */
.connected-links-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}
.connected-links-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 10px;
}
.connected-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.connected-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: #ffffff;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  font-size: 13px;
}
.connected-link-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.connected-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-outline {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.pill-forgejo {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.connected-link-anchor {
  font-weight: 500;
  color: #1d4ed8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.connected-link-anchor:hover {
  text-decoration: underline;
}
.connected-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.badge-outline {
  background: #eef2ff;
  color: #3730a3;
}
.badge-forgejo {
  background: #ecfdf5;
  color: #065f46;
}

.readiness-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.readiness-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}
.readiness-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}
.readiness-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.readiness-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.readiness-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}
.readiness-card.status-ready {
  border-color: #a7f3d0;
  background: #f0fdf4;
}
.readiness-card.status-ready .readiness-dot {
  background: #10b981;
}
.readiness-card.status-ready .readiness-badge {
  background: #d1fae5;
  color: #065f46;
}
.readiness-card.status-warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.readiness-card.status-warn .readiness-dot {
  background: #f59e0b;
}
.readiness-card.status-warn .readiness-badge {
  background: #fef3c7;
  color: #92400e;
}
.readiness-card.status-error {
  border-color: #fecaca;
  background: #fef2f2;
}
.readiness-card.status-error .readiness-dot {
  background: #ef4444;
}
.readiness-card.status-error .readiness-badge {
  background: #fee2e2;
  color: #991b1b;
}
.readiness-pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  overflow-x: auto;
  margin-top: 8px;
}
.settings-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 18px 0;
}



/* ==========================================================================
   Polish layer: one set of sizes, radii, colors, and states for every view,
   dialog, and settings panel. Keep this block last.
   ========================================================================== */

button,
input,
select,
textarea {
  font: inherit;
}
button:disabled,
.secondary-btn:disabled,
.primary-btn:disabled,
.danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
:where(button, a, [tabindex], summary):focus-visible,
.roadmap-bar:focus-visible,
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:where(input, select, textarea):focus-visible {
  outline: none;
  border-color: #9bb8ff;
  box-shadow: var(--focus-ring);
}
.file-picker:focus-within .file-picker-btn {
  border-color: #9bb8ff;
  box-shadow: var(--focus-ring);
}

/* Page frame ------------------------------------------------------------- */
#app {
  padding: 16px 24px 40px;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}
.focus-view {
  padding: 0;
  max-width: none;
}
.topbar {
  z-index: 50;
  padding: 10px 24px;
}
.sync-banner {
  position: relative;
  z-index: 60;
}

/* Buttons ---------------------------------------------------------------- */
.primary-btn,
.danger-btn,
.secondary-btn,
.file-picker-btn,
.search-wrap button,
.labels-add-row button,
.deps-add-row button,
.hierarchy-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-h);
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.secondary-btn,
.file-picker-btn,
.search-wrap button,
.labels-add-row button,
.deps-add-row button,
.hierarchy-actions button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #243047;
}
.secondary-btn:hover:not(:disabled),
.file-picker-btn:hover,
.search-wrap button:hover,
.labels-add-row button:hover,
.deps-add-row button:hover,
.hierarchy-actions button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.primary-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}
.primary-btn:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.danger-btn {
  background: var(--danger-soft);
  border: 1px solid #f1c0bc;
  color: var(--danger);
}
.danger-btn:hover:not(:disabled) {
  background: #fbe2df;
  border-color: #e9a59f;
}
.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
.text-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--link);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.text-btn:hover:not(:disabled) {
  text-decoration: none;
  background: var(--surface-3);
}
.danger-text {
  color: var(--danger);
}
.icon-btn {
  border-color: var(--border);
}

/* Form controls ---------------------------------------------------------- */
#item-form input:not([type="checkbox"]):not([type="file"]),
#item-form select,
#item-form textarea,
#node-form input:not([type="checkbox"]):not([type="file"]),
#node-form select,
#node-form textarea,
#reminder-form input:not([type="checkbox"]),
#reminder-form select,
#reminder-form textarea,
#prompt-form input,
.filters input,
.filters select,
.project-switcher,
.settings-field input,
.settings-field select,
.settings-inline-add input,
.settings-inline-add select,
.settings-list-row input,
.settings-list-row select,
.assignee-add-select,
.labels-add-row input,
.deps-add-row select {
  min-height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: #243047;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
  outline: none;
  width: 100%;
  min-width: 0;
}
.filters input,
.filters select,
.project-switcher {
  width: auto;
}
.search-wrap input {
  width: 100%;
}
#item-form textarea,
#node-form textarea,
#reminder-form textarea {
  padding: 10px 12px;
  min-height: 84px;
  line-height: 1.5;
}
#item-title,
#node-title,
#reminder-title {
  font-size: 20px !important;
  font-weight: 650 !important;
  min-height: 44px !important;
  padding: 0 10px !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: var(--text-strong) !important;
}
#item-title:placeholder-shown,
#node-title:placeholder-shown,
#reminder-title:placeholder-shown {
  border-color: var(--border) !important;
}
#item-title:hover,
#node-title:hover,
#reminder-title:hover {
  background: var(--surface-2) !important;
}
#item-title:focus,
#node-title:focus,
#reminder-title:focus {
  border-color: #9bb8ff !important;
  background: #fff !important;
  box-shadow: var(--focus-ring) !important;
}
.project-switcher {
  max-width: 240px;
  font-weight: 600;
}
.project-switcher:focus {
  outline: none;
}
.field-invalid {
  border-color: #e9a59f !important;
  box-shadow: 0 0 0 3px rgba(194, 50, 43, 0.12) !important;
}
.field-help {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}
input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

/* Dialogs: one frame, fixed sizes, sticky header and footer --------------- */
dialog.app-modal {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
}
#item-dialog,
#node-dialog {
  width: min(960px, calc(100vw - 32px));
  height: min(880px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
}
#reminder-dialog {
  width: min(640px, calc(100vw - 32px));
}
#item-form,
#node-form,
#reminder-form {
  height: 100%;
  max-height: inherit;
  padding: 0 24px;
  gap: 16px;
  align-content: start;
  overscroll-behavior: contain;
}
#reminder-form {
  max-height: calc(100vh - 48px);
}
#item-form,
#node-form,
#reminder-form {
  grid-template-rows: none;
  grid-auto-rows: max-content;
}
#prompt-form,
.confirm-form {
  padding: 0 24px 0;
  gap: 16px;
}
.app-modal .dialog-header {
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: center;
  margin: 0;
  padding: 18px 0 14px;
  background: #fff;
  border-bottom: 1px solid #eef2f8;
}
.app-modal .dialog-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
}
.dialog-close-btn {
  margin: 0;
  width: 34px;
  height: 34px;
}
#item-form menu,
#node-form menu,
#reminder-form menu,
#prompt-form menu,
.confirm-form menu {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 0 0;
  padding: 14px 0 18px;
  background: #fff;
  border-top: 1px solid #eef2f8;
}
#cancel-item-btn,
#node-cancel-btn,
#reminder-cancel-btn {
  margin-left: auto;
}
.dialog-breadcrumb {
  margin: 0;
  min-height: 30px;
  box-sizing: border-box;
  line-height: 18px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.confirm-dialog {
  width: min(460px, calc(100vw - 32px));
}
.confirm-form {
  display: grid;
}
.confirm-form .dialog-header {
  border-bottom: 0;
  padding: 22px 0 0;
}
.confirm-form menu {
  border-top: 0;
  padding-top: 4px;
  padding-bottom: 20px;
}
.confirm-form .danger-btn {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.confirm-form .danger-btn:hover {
  background: #a3241e;
  border-color: #a3241e;
}
.confirm-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #3a4a67;
}
#item-form > label,
#node-form > label,
.form-row > label,
#reminder-form > label,
#reminder-form .form-row > label,
.prompt-field {
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.title-field {
  gap: 4px !important;
}

/* Fieldsets: one look for every section in a dialog ---------------------- */
.hierarchy-fieldset,
.deps-fieldset,
.comments-fieldset,
.attachments-fieldset,
.people-fieldset,
.labels-fieldset,
.connected-links-fieldset,
.compact-fieldset {
  margin: 0;
  min-width: 0;
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.hierarchy-fieldset legend,
.deps-fieldset legend,
.comments-fieldset legend,
.attachments-fieldset legend,
.people-fieldset legend,
.labels-fieldset legend,
.connected-links-fieldset legend,
.compact-fieldset legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #3a4a67;
  letter-spacing: 0.01em;
}
.deps-help {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.hierarchy-actions,
.connected-links-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

/* Lists inside dialogs --------------------------------------------------- */
.list-empty,
.deps-empty,
.hierarchy-empty,
.story-line.empty {
  display: block !important;
  padding: 10px 12px !important;
  border: 1px dashed var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  background: #fff;
  color: var(--muted-2);
  font-size: 13px;
  font-style: normal !important;
  list-style: none;
}
.deps-list li,
.comment-item,
.story-line,
.epic-list-row,
.hierarchy-list li.epic-list-row,
.connected-link-row,
.attachment-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.deps-list li {
  padding: 6px 6px 6px 12px;
  min-height: 40px;
}
.deps-list li > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-row {
  padding: 6px 6px 6px 12px;
  min-height: 40px;
}
.attachment-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
}
.attachment-row a:hover {
  text-decoration: underline;
}
.epic-open-link,
.story-line-open {
  color: var(--link);
}
.story-line {
  padding: 8px 10px;
}
.status-pill {
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10.5px;
}
.comment-item {
  padding: 10px 12px;
}
.comments-list {
  max-height: 260px;
}
.rich-toolbar button {
  height: 30px;
  min-width: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #3a4a67;
}
.rich-toolbar button:hover {
  background: var(--surface-2);
}
.rich-editor {
  min-height: 84px;
  max-height: 200px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #243047;
  box-shadow: var(--shadow-sm);
}
.rich-editor:focus {
  outline: none;
  border-color: #9bb8ff;
  box-shadow: var(--focus-ring);
}
.comment-compose {
  justify-items: end;
}
.comment-compose .rich-toolbar,
.comment-compose .rich-editor {
  justify-self: stretch;
}
.connected-link-row {
  padding: 6px 6px 6px 10px;
  min-height: 40px;
}
.connected-link-main {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
}
.connected-link-anchor {
  min-width: 0;
  color: var(--link);
}
.connected-link-main .attachment-meta {
  flex-shrink: 0;
  white-space: nowrap;
}
.pill-outline,
.badge-outline {
  background: #eef1ff;
  color: #3b3fb6;
  border: 1px solid #cdd3fb;
}
.pill-forgejo,
.badge-forgejo {
  background: #eaf7ef;
  color: #1e6b3c;
  border: 1px solid #bfe5cd;
}
.connected-card-badge {
  padding: 2px 8px;
  line-height: 1.4;
}
.assignee-pick-chip {
  border: 1px solid #d4ddef;
  padding: 4px 6px 4px 10px;
  font-weight: 500;
}

/* Filters bar ------------------------------------------------------------ */
.filters {
  gap: 8px;
  padding: 10px;
  margin-bottom: 16px;
  border-color: var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-lg);
}
.filters > select,
.filters > input {
  flex: 0 0 auto;
}
#year-filter {
  width: 92px;
}
.search-wrap {
  flex: 1 1 280px;
}
.people-filter {
  border-color: var(--border);
}
.people-chip {
  min-height: 30px;
  border-color: var(--border);
}
.people-chip.active {
  background: var(--accent-soft);
  border-color: #9bb8ff;
  color: #1f4fb8;
}

/* Board cards ------------------------------------------------------------ */
.status-board {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}
.status-col {
  border-color: var(--border);
  max-height: calc(100vh - 230px);
}
.status-col-body {
  overflow-y: auto;
  flex: 1 1 auto;
}
.status-col-head h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a4a67;
}
.status-col[data-status="planned"] .status-col-head { box-shadow: inset 0 3px 0 var(--planned); border-radius: 14px 14px 0 0; }
.status-col[data-status="in_progress"] .status-col-head { box-shadow: inset 0 3px 0 var(--in-progress); border-radius: 14px 14px 0 0; }
.status-col[data-status="in_review"] .status-col-head { box-shadow: inset 0 3px 0 var(--in-review); border-radius: 14px 14px 0 0; }
.status-col[data-status="done"] .status-col-head { box-shadow: inset 0 3px 0 var(--done); border-radius: 14px 14px 0 0; }
.column-empty {
  margin: 0;
  padding: 18px 10px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}
.card {
  gap: 6px;
  padding: 12px 12px 12px 15px;
  border-color: var(--border);
}
.card-top {
  align-items: center;
}
.card .type-pill {
  margin: 0;
}
.card h4 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-strong);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-description {
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.meta {
  justify-content: flex-start;
  gap: 6px;
  margin-top: 2px;
}
.theme-chip {
  border: 1px solid color-mix(in srgb, var(--chip-color, #9aa3b2) 45%, #fff);
  background: color-mix(in srgb, var(--chip-color, #9aa3b2) 16%, #fff);
  color: color-mix(in srgb, var(--chip-color, #9aa3b2) 60%, #1f2430);
  font-weight: 600;
}
.theme-chip,
.assignee-chip,
.label-chip.compact,
.connected-card-badge,
.priority {
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 8px;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.priority {
  font-weight: 600;
}
.priority.priority-high { color: #b42318; border-color: #f1c0bc; background: #fdf0ef; }
.priority.priority-medium { color: #9a5b00; border-color: #f0d6a4; background: #fff7e8; }
.priority.priority-low { color: #2f6b3a; border-color: #c4e2cb; background: #eff8f1; }

/* Roadmap ---------------------------------------------------------------- */
.roadmap-board {
  border-color: var(--border);
  overflow-x: auto;
}
.roadmap-axis,
.roadmap-lane-row {
  grid-template-columns: 200px minmax(720px, 1fr);
}
.roadmap-lane-tracks {
  overflow: hidden;
}
.roadmap-lane-block strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lane-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.roadmap-lane-row.orphan .roadmap-lane-block {
  background: repeating-linear-gradient(135deg, #f7f8fa, #f7f8fa 8px, #f1f3f6 8px, #f1f3f6 16px);
}
.roadmap-legend {
  margin-top: 0;
}
.view-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.view-empty h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text-strong);
}
.view-empty p {
  margin: 0;
  font-size: 13px;
}

/* Plans ------------------------------------------------------------------ */
.plans-view {
  border-color: var(--border);
}
.plans-inline-control {
  min-height: 30px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border-color: var(--border);
}
.plans-inline-control:focus {
  outline: none;
  border-color: #9bb8ff;
  box-shadow: var(--focus-ring);
}
.plans-row > div {
  display: flex;
  align-items: center;
  min-width: 0;
}
.plans-row > .plans-timeline-cell {
  display: block;
}
.plan-node-link {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.plan-node-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.plans-bar-initiative { background: var(--type-initiative); }
.plans-bar-epic { background: var(--type-epic); }
.plans-bar-story { background: var(--type-story); }
/* Focus ------------------------------------------------------------------ */
.focus-panel {
  border-color: var(--border);
}
.focus-row-main {
  border-color: var(--border);
}
.reminder-check {
  margin-top: 6px;
}

/* Settings --------------------------------------------------------------- */
.settings-header {
  align-items: center;
  padding: 16px 24px;
}
.settings-header h2 {
  font-size: 17px;
  font-weight: 700;
}
.settings-subtitle {
  margin-top: 2px;
}
.settings-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}
.settings-nav {
  gap: 2px;
  padding: 14px 12px;
}
.settings-nav-group {
  display: block;
  padding: 12px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.settings-nav-group:first-child {
  padding-top: 2px;
}
.settings-nav-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: #3a4a67;
  width: 100%;
}
.settings-nav-btn.active {
  background: var(--accent-soft);
  color: #1f4fb8;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.settings-panels {
  padding: 20px 28px 28px;
}
.settings-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 760px;
}
.settings-panel-head h3,
.settings-panel h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}
.settings-panel-head .settings-note {
  margin: 4px 0 0;
}
.settings-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.settings-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.settings-field {
  margin: 0;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}
.settings-meta {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted);
}
.settings-section {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #eef2f8;
}
.settings-subhead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3a4a67;
}
.settings-callout {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: #3a4a67;
}
.settings-callout.warn {
  border-color: #f0d6a4;
  background: #fff8ea;
  color: #7a4d00;
}
.settings-callout.danger {
  border-color: #f1c0bc;
  background: var(--danger-soft);
  color: #8f241e;
}
.settings-empty-state {
  padding: 28px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
}
.settings-empty-state p,
.settings-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.settings-list {
  margin: 0;
  gap: 8px;
}
.settings-list-row {
  min-height: 56px;
  padding: 8px 12px;
  border-color: var(--border);
  border-radius: 12px;
  background: #fff;
  grid-template-columns: minmax(0, 1fr) auto;
}
.settings-list-row.member-row {
  grid-template-columns: minmax(0, 1fr) 120px auto;
}
.settings-list-row.theme-row {
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
}
.settings-inline-add {
  grid-template-columns: minmax(0, 1fr) auto;
}
.settings-inline-add.members-add {
  grid-template-columns: minmax(0, 1fr) 130px;
}
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.theme-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--chip-color, #9aa3b2);
}
.theme-usage {
  font-size: 12px;
  color: var(--muted);
}
.member-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.member-text {
  display: grid;
  min-width: 0;
}
.member-text strong,
.member-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-text strong {
  font-size: 13px;
  color: var(--text-strong);
}
.member-email {
  font-size: 12px;
  color: var(--muted);
}
.member-avatar {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: #1f4fb8;
  font-size: 12px;
  font-weight: 700;
}
.member-avatar.sm {
  width: 26px;
  height: 26px;
  font-size: 11px;
}
.member-badge {
  margin: 0 0 0 4px;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 600;
}
.member-picker {
  gap: 10px;
  padding-top: 6px;
}
.member-search-hit {
  border-radius: var(--radius-md);
}
.auth-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-slot {
  gap: 6px;
}

/* Integrations ----------------------------------------------------------- */
.readiness-cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.readiness-card {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 112px;
  padding: 14px 16px;
  border-radius: 12px;
  border-color: var(--border);
  background: #fff;
}
.readiness-card-head {
  flex-wrap: wrap;
  font-size: 12px;
}
.readiness-gate {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.readiness-title {
  font-size: 14px;
  color: var(--text-strong);
}
.readiness-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.readiness-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
}
.readiness-card.status-ready { border-color: #bfe5cd; background: #f6fcf8; }
.readiness-card.status-warn { border-color: #f0d6a4; background: #fffbf2; }
.readiness-card.status-error { border-color: #f1c0bc; background: #fdf6f5; }
.readiness-card.status-ready .readiness-dot { background: var(--done); }
.readiness-card.status-ready .readiness-badge { background: #dff3e6; color: #1e6b3c; }
.readiness-card.status-warn .readiness-badge { background: #fdefd2; color: #7a4d00; }
.readiness-card.status-error .readiness-badge { background: #fbe2df; color: #8f241e; }
.readiness-pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #111827;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}
.settings-panel code,
.readiness-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
}

/* Toasts ----------------------------------------------------------------- */
.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  gap: 8px;
  justify-items: end;
  pointer-events: none;
}
.toast {
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #1f2937;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-success { background: #14532d; }
.toast-error { background: #7f1d1d; }

/* Dropdowns: one look everywhere, replacing the cramped native control ---- */
select {
  -webkit-appearance: none;
  appearance: none;
  min-height: var(--control-h);
  padding-right: 34px !important;
  cursor: pointer;
  /* Important because status colours set the `background` shorthand. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%235c667a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
}
select:hover:not(:disabled) {
  border-color: #c3cede;
}
select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
select.plans-inline-control {
  min-height: 34px;
  padding-right: 26px !important;
  background-position: right 8px center !important;
}

/* Checkboxes must not inherit the height and shadow of text inputs. */
input[type="checkbox"] {
  flex: none;
  width: 16px !important;
  height: 16px;
  min-height: 0 !important;
  margin: 0;
  box-shadow: none !important;
  accent-color: var(--accent);
}

/* Account menu: opens on hover where available, and always on click or focus. */
.account-menu {
  position: relative;
}
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.account-trigger:hover,
.account-menu.open .account-trigger {
  border-color: var(--border);
  background: var(--surface-2);
}
.account-chevron {
  color: var(--muted);
  transition: transform 0.15s ease;
}
.account-menu.open .account-chevron {
  transform: rotate(180deg);
}
.account-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 20;
  display: none;
  min-width: 240px;
  padding-top: 6px; /* Bridges the gap so the menu stays open while the pointer moves down. */
}
.account-menu.open .account-dropdown,
.account-menu:has(:focus-visible) .account-dropdown {
  display: block;
}
@media (hover: hover) {
  .account-menu:hover .account-dropdown {
    display: block;
  }
}
.account-dropdown-panel {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.account-dropdown-head {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.account-dropdown-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
}
.account-menu-item {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: var(--surface-2);
}

/* Work type, stage, and flags --------------------------------------------- */
.status-col-body > .card {
  flex-shrink: 0;
}
.work-type-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.card-parents {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 2px 0 4px;
}
.card-parent-link {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 1px 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.card-parent-link:hover {
  color: var(--accent);
}
.card-parent-link .issue-key {
  flex: none;
  font-size: 11px;
}
.card-parent-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.progress-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.rollup-summary {
  margin: 0;
  color: #3a4a67;
  font-size: 12px;
  font-weight: 600;
}
.rollup-summary:empty {
  display: none;
}
.board-hint {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
}
.stage-chip,
.flag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.stage-chip.status-in_progress {
  color: #4a2fd4;
  background: #efeaff;
  border-color: #b8a6ff;
}
.stage-chip.status-in_review {
  color: #0e6f86;
  background: #e3f6fa;
  border-color: #8fd3e2;
}
.stage-chip.status-done {
  color: #1b7a3d;
  background: #e6f7ec;
  border-color: #8ed4a8;
}
.stage-chip.status-planned {
  color: #1a5bb8;
  background: #e8f1fc;
  border-color: #9ec0ef;
}
.flag-blocked {
  color: #fff;
  background: var(--blocked);
}
.flag-at-risk {
  color: #1f2937;
  background: var(--at-risk);
}
.plan-node-chips {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
}
.plan-node-chips:empty {
  display: none;
}
.work-flags {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}
.work-flags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  min-height: var(--control-h);
}
.flag-check {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px !important;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}
.flag-check input {
  width: auto;
  margin: 0;
}
.work-type-list {
  gap: 10px;
}
.work-type-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.work-type-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}
.work-type-head input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.work-type-head input:focus {
  border-color: #9bb8ff;
  box-shadow: var(--focus-ring);
}
.work-type-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) {
  .work-type-head,
  .work-type-stages {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Header: tabs stay centred when there is room, and never collide. */
.topbar {
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
}
.topbar .actions {
  flex-wrap: nowrap;
}
.auth-user-name,
#sign-out-btn {
  white-space: nowrap;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
  #app {
    padding: 12px 16px 32px;
  }
  .topbar {
    padding: 10px 16px;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "start end"
      "center center";
    row-gap: 10px;
  }
  .topbar-start { grid-area: start; }
  .topbar-end { grid-area: end; justify-self: end; }
  .topbar-center { grid-area: center; justify-content: flex-start; }
}
@media (max-width: 720px) {
  /* Brand, account, and settings share the first row; project and Add Item get the second. */
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "start"
      "end"
      "center";
  }
  .brand img {
    height: 26px;
  }
  .topbar-end {
    justify-self: stretch;
  }
  .topbar-end .actions {
    width: 100%;
    flex-wrap: nowrap;
  }
  .topbar-end .project-switcher {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
  .topbar-end #auth-slot {
    position: absolute;
    top: 10px;
    right: 16px;
  }
  .readiness-cards-grid {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    display: flex;
    gap: 4px;
  }
  .settings-nav-group {
    display: none;
  }
  .settings-nav-btn {
    width: auto;
    white-space: nowrap;
  }
  .settings-nav-btn.active {
    box-shadow: none;
  }
  .settings-panels {
    padding: 16px;
  }
  .settings-list-row.theme-row {
    grid-template-columns: 14px minmax(0, 1fr);
  }
  .settings-list-row.theme-row .theme-usage,
  .settings-list-row.theme-row .row-actions {
    grid-column: 2;
  }
  .epic-list-row,
  .hierarchy-list li.epic-list-row {
    grid-template-columns: 20px 12px minmax(0, 1fr) auto;
  }
  .epic-list-row .epic-meta,
  .epic-list-row .danger-text {
    grid-column: 3 / -1;
  }
  .story-table-head {
    display: none;
  }
  .story-line {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .story-line .story-col-assignee,
  .story-line .story-col-dates {
    display: none;
  }
  #item-form,
  #node-form,
  #reminder-form,
  #prompt-form,
  .confirm-form {
    padding: 0 16px;
  }
  #item-form menu,
  #node-form menu {
    flex-wrap: wrap;
  }
  .auth-user-name {
    display: none;
  }
}
