:root {
  --bg: #f5f6f3;
  --panel: #fbfbf8;
  --panel-strong: #ffffff;
  --line: #dfe3dc;
  --text: #202625;
  --muted: #6d7774;
  --soft: #eef2ed;
  --green: #3a8f73;
  --teal: #0c7f91;
  --blue: #4d75ad;
  --amber: #c88a2c;
  --red: #c95f4a;
  --purpose: #526aa3;
  --purpose-soft: #eef2fb;
  --perspective: #6e629f;
  --perspective-soft: #f2eff9;
  --next: #2f9278;
  --next-soft: #edf7f2;
  --someday: #b57a2a;
  --someday-soft: #fbf4e8;
  --issue: #bd594e;
  --issue-soft: #fff0ed;
  --reference: #4f718c;
  --reference-soft: #eef4f7;
  --done: #557764;
  --done-soft: #eef5ef;
  --shadow: 0 18px 48px rgba(37, 49, 45, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 246, 243, 0.78)),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 320px;
  min-height: 100vh;
}

.sidebar,
.inspector {
  background: rgba(251, 251, 248, 0.92);
  border-right: 1px solid var(--line);
  padding: 22px 18px;
}

.inspector {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.app-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbe9e2, #e8eff5);
  box-shadow: inset 0 0 0 1px rgba(58, 143, 115, 0.22);
}

.app-mark span {
  width: 20px;
  height: 20px;
  border: 2px solid var(--green);
  border-left-color: var(--blue);
  transform: rotate(45deg);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 17px;
  line-height: 1.2;
}

.brand-row p,
.side-panel p,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
}

.nav-section {
  display: grid;
  gap: 6px;
  margin-bottom: 28px;
}

.nav-item,
.project-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border-radius: 7px;
  background: transparent;
  color: #39413f;
  padding: 8px 10px;
  text-align: left;
}

.nav-item.active,
.project-pill.selected {
  background: var(--soft);
  color: #143f34;
  box-shadow: inset 0 0 0 1px rgba(58, 143, 115, 0.14);
}

.side-panel {
  margin-top: 18px;
}

.compact {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.section-title {
  color: #53615d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.focus-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e6df;
  margin-bottom: 10px;
}

.focus-meter span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar > div:first-child {
  min-width: 0;
  max-width: 100%;
}

.topbar h2 {
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.topbar h2 span {
  display: inline;
}

.toolbar {
  display: flex;
  gap: 8px;
}

.tool-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(37, 49, 45, 0.06);
}

.control-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ebefe9;
}

.segment {
  min-width: 88px;
  min-height: 30px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.segment.active {
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(37, 49, 45, 0.08);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4a5451;
  font-size: 13px;
}

.toggle input {
  display: none;
}

.toggle span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d1d8d2;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease;
}

.toggle input:checked + span {
  background: var(--green);
}

.toggle input:checked + span::after {
  transform: translateX(16px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: min(220px, 100%);
  max-width: 420px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.sync-status {
  min-height: 26px;
  border: 1px solid rgba(79, 113, 140, 0.22);
  border-radius: 999px;
  background: #eef4f7;
  color: #45677f;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.sync-status[data-mode="synced"] {
  border-color: rgba(58, 143, 115, 0.24);
  background: #edf7f1;
  color: #1f5b49;
}

.sync-status[data-mode="saving"] {
  border-color: rgba(200, 138, 44, 0.24);
  background: #fbf4e8;
  color: #8c611d;
}

.sync-status[data-mode="offline"] {
  border-color: rgba(201, 95, 74, 0.24);
  background: #fff3f0;
  color: #9e3f31;
}

.planner-grid {
  --task-column-width: 40%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  grid-template-rows: 42px minmax(520px, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.grid-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f7f8f5;
  color: #51605c;
  font-size: 12px;
  font-weight: 700;
}

.task-header {
  padding-left: 16px;
}

.timeline-header {
  display: none;
  background:
    linear-gradient(to right, rgba(223, 227, 220, 0.45) 1px, transparent 1px),
    #f7f8f5;
  background-size: 25% 100%;
}

.task-list,
.timeline {
  position: relative;
  overflow: auto;
  min-height: 0;
}

.timeline {
  display: none;
}

.task-list {
  border-right: 0;
}

.split-handle {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--task-column-width);
  z-index: 8;
  width: 18px;
  cursor: col-resize;
  touch-action: none;
  transform: translateX(-9px);
}

.split-handle::before,
.split-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 2px;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.split-handle::before {
  background: transparent;
}

.split-handle::after {
  background: transparent;
}

.split-handle:hover::after,
.planner-grid.resizing .split-handle::after {
  background: rgba(58, 143, 115, 0.62);
  box-shadow: 0 0 0 4px rgba(58, 143, 115, 0.1);
}

.planner-grid.resizing {
  user-select: none;
}

.task-row,
.bar-row {
  height: 46px;
}

.dense .task-row,
.dense .bar-row {
  height: 36px;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #edf0eb;
}

.task-row.issue-detail-row {
  height: auto;
  min-height: 62px;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.bar-row.issue-detail-row {
  min-height: 62px;
}

.task-main {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.issue-detail-row .task-main {
  align-items: center;
}

.task-select-checkbox {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--green);
  cursor: pointer;
  margin: 0 2px 0 0;
  padding: 0;
}

.task-row button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.row-drag-handle {
  display: none !important;
}

.task-row .row-conflict-action {
  width: auto;
  min-width: 70px;
  height: 26px;
  border: 1px solid rgba(189, 89, 78, 0.28);
  border-radius: 999px;
  background: #fff4f1;
  color: #9a463c;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.task-row .row-conflict-action:hover {
  border-color: rgba(189, 89, 78, 0.44);
  background: #ffecea;
}

.task-title-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 32px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  overflow: hidden;
  color: #24302d;
  font-size: 14px;
  line-height: 1.2;
  outline: 0;
  padding: 4px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-title-input.issue-title-editor {
  min-height: 42px;
  height: auto;
  overflow: hidden;
  resize: none;
  color: #8f3f37;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.45;
  padding: 7px 6px;
  text-overflow: clip;
  white-space: normal;
}

.issue-detail-row .row-conflict-action,
.issue-detail-row .row-priority-button {
  align-self: center;
}

.task-title-input.summary {
  font-weight: 700;
}

.template-section .task-title-input {
  font-weight: 800;
}

.template-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--section-color);
  opacity: 0.72;
}

.section-purpose {
  --section-color: var(--purpose);
  --section-soft: var(--purpose-soft);
}

.section-perspective {
  --section-color: var(--perspective);
  --section-soft: var(--perspective-soft);
}

.section-next {
  --section-color: var(--next);
  --section-soft: var(--next-soft);
}

.section-someday {
  --section-color: var(--someday);
  --section-soft: var(--someday-soft);
}

.section-issue {
  --section-color: var(--issue);
  --section-soft: var(--issue-soft);
}

.section-reference {
  --section-color: var(--reference);
  --section-soft: var(--reference-soft);
}

.section-done {
  --section-color: var(--done);
  --section-soft: var(--done-soft);
}

.template-section .template-title {
  color: var(--section-color);
}

.template-section .status-dot {
  background: var(--section-color);
}

.template-section:not(.selected):not(.multi-selected) {
  background: linear-gradient(90deg, var(--section-soft), transparent 54%);
}

.task-title-input:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(58, 143, 115, 0.16);
}

.task-title-input:focus {
  border-color: rgba(58, 143, 115, 0.46);
  background: white;
  box-shadow: 0 0 0 3px rgba(58, 143, 115, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.waiting {
  background: var(--amber);
}

.status-dot.paused {
  background: var(--red);
}

.status-dot.done {
  background: var(--blue);
}

.row-priority-button {
  display: inline-grid !important;
  place-items: center;
  width: 30px !important;
  height: 26px !important;
  opacity: 0.98;
}

.row-priority-button.inherited {
  opacity: 0.55;
}

.row-priority-button:hover {
  background: #f3f8f5 !important;
}

.task-row.drag-source {
  opacity: 0.42;
}

.task-row.drop-before::before,
.task-row.drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 6;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(58, 143, 115, 0.12);
}

.task-row.drop-before::before {
  top: -2px;
}

.task-row.drop-after::after {
  bottom: -2px;
}

.task-row.drop-inside {
  background: #edf5f0;
  box-shadow:
    inset 0 0 0 2px rgba(58, 143, 115, 0.28),
    inset 4px 0 0 var(--green);
}

.task-row.drop-inside .task-title-input {
  color: #1f6a55;
}

.task-row.selected {
  background: #edf5f0;
  box-shadow: inset 3px 0 0 var(--green);
}

.task-row.reveal-pulse {
  animation: revealPulse 1.2s ease-out;
}

@keyframes revealPulse {
  0% {
    background: #dcefe7;
    box-shadow:
      inset 3px 0 0 var(--green),
      0 0 0 3px rgba(58, 143, 115, 0.22);
  }
  100% {
    background: #edf5f0;
    box-shadow: inset 3px 0 0 var(--green);
  }
}

.task-row.multi-selected:not(.selected) {
  background: #f4faf6;
  box-shadow: inset 3px 0 0 rgba(58, 143, 115, 0.36);
}

.bar-row {
  position: relative;
  border-bottom: 1px solid #edf0eb;
  background-image:
    linear-gradient(to right, rgba(223, 227, 220, 0.42) 1px, transparent 1px);
  background-size: 25% 100%;
}

.bar-row.no-progress {
  background-image:
    linear-gradient(to right, rgba(223, 227, 220, 0.18) 1px, transparent 1px);
}

.bar {
  position: absolute;
  top: 12px;
  overflow: visible;
  height: 20px;
  border: 0;
  border-radius: 5px;
  background: #ff4b57;
  box-shadow: 0 5px 12px rgba(30, 102, 118, 0.18);
  color: #19302b;
  cursor: default;
  padding: 0;
  text-align: left;
  touch-action: none;
}

.bar.summary {
  height: 16px;
  top: 14px;
  border-radius: 5px;
  background: #9dadba;
}

.bar.critical {
  background: #ff4653;
}

.dense .bar {
  top: 8px;
}

.dense .bar.summary {
  top: 10px;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  min-width: 0;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #73a9f0, #6ed1b0);
  pointer-events: none;
}

.bar.critical .bar-fill {
  background: linear-gradient(90deg, #f2b85f, #72c59c);
}

.bar.summary .bar-fill {
  background: linear-gradient(90deg, #7ea6d9, #79bda6);
}

.bar.section-next {
  background: #d8e9e2;
}

.bar.section-next .bar-fill {
  background: linear-gradient(90deg, #72b79f, var(--next));
}

.bar.section-someday {
  background: #f4dfbd;
}

.bar.section-someday .bar-fill {
  background: linear-gradient(90deg, #e2b35f, var(--someday));
}

.bar.section-issue {
  background: #f2c8c2;
}

.bar.section-issue .bar-fill {
  background: linear-gradient(90deg, #dc7b70, var(--issue));
}

.progress-handle {
  position: absolute;
  left: var(--progress);
  bottom: -15px;
  width: 28px;
  height: 24px;
  cursor: ew-resize;
  transform: translateX(-14px);
  touch-action: none;
  z-index: 3;
}

.progress-handle::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 0;
  height: 0;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  border-bottom: 7px solid #2f413b;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.progress-handle:hover::after,
.bar.dragging .progress-handle::after {
  border-bottom-color: #101c18;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.24));
}

.bar.dragging {
  box-shadow: 0 7px 18px rgba(30, 102, 118, 0.24);
}

.progress-label {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.bar-fill + .progress-handle + .progress-label {
  mix-blend-mode: normal;
}

.inspector-top {
  margin-bottom: 22px;
}

.inspector h3 {
  margin-top: 4px;
  font-size: 19px;
}

.field-block {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-block label {
  color: #586561;
  font-size: 12px;
  font-weight: 700;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--text);
  outline: 0;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.structure-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.structure-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #2d3a36;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 49, 45, 0.05);
}

.structure-actions button:first-child {
  grid-column: 1 / -1;
  background: #edf7f1;
  border-color: rgba(58, 143, 115, 0.28);
  color: #1f5b49;
}

.structure-actions .active-action {
  border-color: rgba(58, 143, 115, 0.42);
  background: #e4f4eb;
  color: #1f5b49;
}

.structure-actions .danger-action {
  border-color: rgba(201, 95, 74, 0.28);
  color: #9e3f31;
}

.structure-actions .danger-action:hover {
  border-color: rgba(201, 95, 74, 0.44);
  background: #fff3f0;
}

.structure-actions .trash-action {
  border-color: rgba(79, 113, 140, 0.28);
  color: #45677f;
}

.structure-actions .trash-action span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 999px;
  background: #eef4f7;
  font-size: 11px;
}

.structure-actions button:hover {
  border-color: rgba(58, 143, 115, 0.34);
  background: #f3f8f5;
}

.structure-actions p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.trash-panel {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #dbe5e8;
  border-radius: 8px;
  background: #f8fbfb;
  margin: -6px 0 16px;
  padding: 10px;
}

.trash-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.trash-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e3ebe9;
  border-radius: 7px;
  background: white;
  padding: 8px;
}

.trash-item-title {
  overflow: hidden;
  color: #2d3a36;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-item-meta {
  color: var(--muted);
  font-size: 11px;
}

.trash-restore {
  min-height: 30px;
  border: 1px solid rgba(58, 143, 115, 0.24);
  border-radius: 7px;
  background: #edf7f1;
  color: #1f5b49;
  font-size: 12px;
  font-weight: 800;
  padding: 0 9px;
}

.undo-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(58, 143, 115, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(37, 49, 45, 0.18);
  padding: 11px 12px 11px 14px;
  color: #26322f;
}

.undo-toast span {
  overflow: hidden;
  color: #2d3a36;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.undo-toast button {
  min-height: 32px;
  border: 1px solid rgba(58, 143, 115, 0.28);
  border-radius: 8px;
  background: #edf7f1;
  color: #1f5b49;
  font-size: 13px;
  font-weight: 800;
  padding: 0 11px;
}

.undo-toast .undo-dismiss {
  width: 32px;
  padding: 0;
  border-color: rgba(109, 119, 116, 0.22);
  background: #f6f8f6;
  color: var(--muted);
}

.action-library {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf8;
  margin-bottom: 16px;
}

.action-library .field-block:last-child {
  margin-bottom: 0;
}

.insight-box {
  padding: 12px;
  border: 1px solid #d7e3db;
  border-radius: 8px;
  background: #f1f7f3;
  margin-bottom: 16px;
}

.insight-box p {
  color: #31554a;
  font-size: 13px;
  line-height: 1.55;
}

.tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-stack span {
  border-radius: 999px;
  background: #edf1ec;
  color: #4c5b56;
  font-size: 12px;
  padding: 6px 9px;
}

.icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.icon-map {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-map::after,
.icon-calendar::after,
.icon-pulse::after,
.icon-plus::before,
.icon-plus::after,
.icon-focus::before,
.icon-density::before,
.icon-density::after,
.icon-search::before {
  content: "";
  position: absolute;
}

.icon-map::after {
  inset: 3px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
}

.icon-calendar {
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-calendar::after {
  left: 2px;
  right: 2px;
  top: 4px;
  border-top: 2px solid currentColor;
}

.icon-pulse::after {
  left: 1px;
  right: 1px;
  top: 7px;
  border-top: 2px solid currentColor;
  box-shadow: 5px -4px 0 -1px currentColor, 10px 4px 0 -1px currentColor;
}

.icon-people {
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px currentColor,
    9px 5px 0 -4px currentColor;
}

.icon-plus::before {
  left: 7px;
  top: 2px;
  width: 2px;
  height: 12px;
  background: currentColor;
}

.icon-plus::after {
  left: 2px;
  top: 7px;
  width: 12px;
  height: 2px;
  background: currentColor;
}

.icon-focus::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-density::before,
.icon-density::after {
  left: 2px;
  right: 2px;
  border-top: 2px solid currentColor;
}

.icon-density::before {
  top: 4px;
}

.icon-density::after {
  bottom: 4px;
}

.icon-search::before {
  left: 2px;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 6px;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.hidden {
  display: none !important;
}

.action-dashboard,
.issue-dashboard,
.perspective-dashboard {
  min-height: 562px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  padding: 18px;
}

.action-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.action-dashboard-header h3 {
  margin-top: 4px;
  font-size: 18px;
}

.action-dashboard-header > span {
  border-radius: 999px;
  background: #edf7f1;
  color: #2f715e;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.issue-dashboard-header > span {
  background: #fff0ed;
  color: #9a463c;
}

.perspective-dashboard-header > span {
  background: var(--perspective-soft);
  color: var(--perspective);
}

.importance-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.importance-picker {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf8;
  padding: 10px;
}

.importance-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.importance-picker-head label {
  color: #586561;
  font-size: 12px;
  font-weight: 800;
}

.inherit-priority {
  min-height: 24px;
  border: 1px solid #dbe3dd;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 0 9px;
}

.inherit-priority.active {
  border-color: rgba(58, 143, 115, 0.28);
  background: #edf7f1;
  color: #1f5b49;
}

.priority-button-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.priority-button-group button {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid #dfe6df;
  border-radius: 7px;
  background: white;
}

.priority-button-group button.active {
  border-color: rgba(58, 143, 115, 0.4);
  background: #edf7f1;
  box-shadow: inset 0 0 0 1px rgba(58, 143, 115, 0.12);
}

.priority-mark {
  display: inline-flex;
  position: relative;
  align-items: end;
  justify-content: center;
  gap: 2px;
  width: 18px;
  min-width: 18px;
  height: 16px;
  vertical-align: middle;
}

.priority-mark[data-tooltip]::before,
.priority-mark[data-tooltip]::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  z-index: 30;
}

.priority-mark[data-tooltip]::before {
  top: calc(100% + 4px);
  border: 5px solid transparent;
  border-bottom-color: rgba(38, 50, 47, 0.94);
  content: "";
}

.priority-mark[data-tooltip]::after {
  top: calc(100% + 13px);
  width: max-content;
  max-width: 220px;
  border-radius: 6px;
  background: rgba(38, 50, 47, 0.94);
  box-shadow: 0 10px 22px rgba(38, 50, 47, 0.18);
  color: white;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  padding: 6px 8px;
  white-space: nowrap;
}

.priority-mark[data-tooltip]:hover::before,
.priority-mark[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.priority-mark i {
  display: block;
  width: 3px;
  min-height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.priority-mark i:nth-child(2) {
  min-height: 11px;
}

.priority-mark i:nth-child(3) {
  min-height: 15px;
}

.mark-high {
  color: #c95f4a;
}

.mark-mid {
  color: #c88a2c;
}

.mark-low {
  color: #6f8798;
}

.project-priority.mark-high,
.action-priority.mark-high,
.issue-priority.mark-high {
  color: #c95f4a;
}

.project-priority.mark-mid,
.action-priority.mark-mid,
.issue-priority.mark-mid {
  color: #b57a2a;
}

.project-priority.mark-low,
.action-priority.mark-low,
.issue-priority.mark-low {
  color: #78909c;
}

.muted-priority {
  opacity: 0.48;
}

.importance-action-group {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.importance-action-group + .importance-action-group {
  margin-top: 14px;
}

.importance-action-group.importance-one {
  border-color: rgba(189, 89, 78, 0.24);
}

.importance-action-group.importance-two {
  border-color: rgba(58, 143, 115, 0.22);
}

.importance-action-group.importance-three {
  border-color: rgba(79, 113, 140, 0.2);
}

.compact-priority-group {
  background: #fbfcfa;
}

.compact-priority-group.importance-one {
  border-color: rgba(201, 95, 74, 0.18);
}

.compact-priority-group.importance-two {
  border-color: rgba(200, 138, 44, 0.18);
}

.compact-priority-group.importance-three {
  border-color: rgba(79, 113, 140, 0.16);
}

.importance-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7faf7;
  padding: 12px 14px;
}

.compact-priority-group .importance-action-header {
  padding: 10px 14px;
  background: #fbfcfa;
}

.compact-priority-group .importance-action-header > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.importance-action-header h4 {
  margin: 0;
  color: #24302d;
  font-size: 15px;
}

.importance-action-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.importance-action-header > span {
  border-radius: 999px;
  background: #edf7f1;
  color: #2f715e;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.importance-action-group.importance-one .importance-action-header {
  background: #fff4f1;
}

.compact-priority-group.importance-one .importance-action-header {
  background: #fffaf8;
}

.importance-action-group.importance-one .importance-action-header > span,
.importance-chip.importance-one {
  background: #ffe8e3;
  color: #a44a40;
}

.importance-action-group.importance-three .importance-action-header {
  background: #f3f7f9;
}

.compact-priority-group.importance-three .importance-action-header {
  background: #fbfcfd;
}

.importance-action-group.importance-three .importance-action-header > span,
.importance-chip.importance-three {
  background: #eef4f7;
  color: #4f718c;
}

.importance-chip.importance-two {
  background: #e7f4ee;
  color: #2f715e;
}

.action-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  overflow: visible;
}

.next-action-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.action-card.importance-one {
  box-shadow: inset 4px 0 0 rgba(189, 89, 78, 0.74);
}

.action-card.importance-two {
  box-shadow: inset 4px 0 0 rgba(58, 143, 115, 0.7);
}

.action-card.importance-three {
  box-shadow: inset 4px 0 0 rgba(79, 113, 140, 0.58);
}

.next-action-card {
  background: white;
  box-shadow: none !important;
}

.next-action-card.importance-one {
  border-color: rgba(201, 95, 74, 0.18);
}

.next-action-card.importance-two {
  border-color: rgba(200, 138, 44, 0.16);
}

.next-action-card.importance-three {
  border-color: rgba(79, 113, 140, 0.14);
}

.next-action-open {
  display: grid;
  gap: 9px;
  width: 100%;
  min-height: 118px;
  background: linear-gradient(180deg, #ffffff, #fbfcfa);
  color: inherit;
  padding: 13px 14px;
  text-align: left;
}

.next-action-meta,
.next-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.next-action-project {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-signal-pair {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.next-action-title {
  display: -webkit-box;
  overflow: hidden;
  color: #24302d;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.next-action-footer small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-project {
  display: grid;
  gap: 4px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #eef7f3, #fbfcfa);
  color: #24302d;
  padding: 12px;
  text-align: left;
}

.action-project span {
  font-size: 15px;
  font-weight: 800;
}

.action-project small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.issue-card {
  border-color: #eadbd5;
}

.issue-project {
  background: linear-gradient(90deg, #fff0ed, #fbfcfa);
  padding: 10px 12px;
}

.issue-project span {
  color: #27332f;
  font-size: 13px;
  font-weight: 760;
}

.issue-project small {
  font-size: 11px;
}

.perspective-card {
  border-color: rgba(110, 98, 159, 0.22);
  background: #fdfcff;
}

.perspective-project {
  background: linear-gradient(90deg, var(--perspective-soft), #fbfcfa);
}

.perspective-project span {
  color: #302a48;
}

.perspective-items {
  display: grid;
}

.perspective-item {
  width: 100%;
  min-height: 56px;
  border-bottom: 1px solid #ece8f4;
  background: white;
  color: #26322f;
  padding: 13px 14px;
  text-align: left;
}

.perspective-item:last-child {
  border-bottom: 0;
}

.perspective-item:hover {
  background: #faf7ff;
  color: var(--perspective);
}

.perspective-item span {
  display: block;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.55;
  white-space: normal;
}

.action-items {
  display: grid;
}

.action-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid #edf0eb;
  background: white;
  color: #2f3a37;
  padding: 9px 12px;
  text-align: left;
}

.action-item:last-child {
  border-bottom: 0;
}

.action-item:hover {
  background: #f4faf6;
}

.issue-item:hover {
  background: #fff7f5;
}

.issue-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 86px;
  padding: 0;
}

.issue-item.importance-one {
  box-shadow: inset 3px 0 0 rgba(201, 95, 74, 0.48);
}

.issue-item.importance-two {
  box-shadow: inset 3px 0 0 rgba(200, 138, 44, 0.42);
}

.issue-item.importance-three {
  box-shadow: inset 3px 0 0 rgba(111, 135, 152, 0.28);
}

.issue-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 8px;
  width: 100%;
  min-height: 86px;
  background: transparent;
  color: inherit;
  cursor: copy;
  padding: 12px 0 12px 14px;
  text-align: left;
}

.action-item-title {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-item-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.importance-chip {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 7px;
  white-space: nowrap;
}

.importance-pair {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.action-importance-chip {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.issue-item .action-item-title {
  display: block;
  overflow: visible;
  color: #26322f;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.45;
  text-overflow: unset;
  user-select: text;
  white-space: normal;
}

.issue-toggle:hover .issue-title {
  color: #9a463c;
}

.issue-item-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.issue-item.expanded .action-item-title {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.conflict-action {
  align-self: end;
  min-height: 30px;
  margin-bottom: 12px;
  margin-right: 10px;
  border: 1px solid rgba(189, 89, 78, 0.28);
  border-radius: 999px;
  background: #fff4f1;
  color: #9a463c;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
  white-space: nowrap;
}

.conflict-action:hover {
  border-color: rgba(189, 89, 78, 0.44);
  background: #ffecea;
}

.empty-action {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-size: 13px;
}

.action-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
}

.action-empty h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.action-empty p {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
    overflow-x: hidden;
    width: 100vw;
  }

  .sidebar {
    display: none;
  }

  .workspace,
  .inspector {
    padding: 10px 12px 16px;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .topbar > div:first-child {
    display: none;
  }

  .toolbar {
    gap: 8px;
  }

  .tool-button {
    width: 42px;
    height: 42px;
  }

  .control-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
  }

  .control-strip > .segmented {
    display: grid !important;
    grid-column: 1 / -1;
    grid-template-columns: 0.8fr 1.22fr 0.8fr 0.8fr;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }

  .control-strip > .segmented > .segment {
    flex: none !important;
    overflow: hidden;
    min-width: 0 !important;
    min-height: 36px;
    width: auto !important;
    font-size: 13px;
    line-height: 1.12;
    padding: 0 4px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toggle {
    grid-column: 1;
    gap: 6px;
    min-height: 30px;
    font-size: 12px;
  }

  .toggle span {
    width: 34px;
    height: 20px;
  }

  .toggle span::after {
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
  }

  .toggle input:checked + span::after {
    transform: translateX(14px);
  }

  .search-box {
    grid-column: 2;
    flex: none;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 36px;
    height: 36px;
    padding: 0 9px;
    font-size: 13px;
  }

  .search-box input {
    min-width: 0;
  }

  .sync-status {
    grid-column: 3;
    min-height: 24px;
    margin-left: auto;
    padding: 4px 9px;
    font-size: 11px;
  }

  .planner-grid {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    grid-template-columns: minmax(280px, 1fr);
    grid-template-rows: 42px minmax(420px, 1fr);
  }

  .action-dashboard,
  .issue-dashboard,
  .perspective-dashboard {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .action-card-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .action-item {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .action-item-meta,
  .importance-pair {
    justify-content: flex-start;
  }

  .split-handle {
    display: none;
  }

  .task-header,
  .task-list {
    border-right: 0;
  }

  .timeline-header {
    grid-row: 3;
  }

  .timeline {
    grid-row: 4;
  }
}
