:root {
  --app-bg: #f7f7f5;
  --sidebar-bg: #f7f6f3;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #20242a;
  --ink-soft: #414852;
  --muted: #747c87;
  --line: #e1e5e8;
  --line-strong: #ccd3d9;
  --primary: #3f6ad8;
  --primary-hover: #2852b8;
  --create: #ff6f61;
  --create-hover: #e85d51;
  --teal: #0f766e;
  --green: #258052;
  --amber: #b26b11;
  --red: #b42318;
  --lavender: #6d5bd0;
  --shadow-soft: 0 1px 2px rgba(17, 24, 39, .06), 0 14px 32px rgba(17, 24, 39, .08);
  --sidebar-width: 256px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  background: var(--app-bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
  margin: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

.app-frame {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
  padding: 16px 12px;
  position: sticky;
  top: 0;
}

.brand-lockup {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 11px;
  padding: 4px 8px 10px;
}

.brand-lockup:hover {
  color: var(--ink);
}

.brand-mark {
  align-items: center;
  background: #20242a;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: .9rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: .98rem;
  font-weight: 800;
}

.brand-lockup small {
  color: var(--muted);
  font-size: .78rem;
  margin-top: 1px;
}

.sidebar-create {
  align-items: center;
  background: var(--create);
  border: 1px solid var(--create-hover);
  border-radius: 7px;
  color: #fff;
  display: flex;
  font-size: .9rem;
  font-weight: 780;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
}

.sidebar-create:hover {
  background: var(--create-hover);
  color: #fff;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.nav-section-label {
  color: #8a8f98;
  display: block;
  font-size: .72rem;
  font-weight: 780;
  margin: 10px 8px 4px;
  text-transform: uppercase;
}

.side-nav a {
  align-items: center;
  border-radius: 7px;
  color: var(--ink-soft);
  display: flex;
  font-size: .94rem;
  font-weight: 650;
  gap: 10px;
  min-height: 34px;
  padding: 6px 8px;
}

.side-nav a:hover {
  background: #ebe9e5;
  color: var(--ink);
}

.side-nav-secondary {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
}

.side-nav-secondary a {
  color: var(--muted);
  font-size: .88rem;
  min-height: 32px;
  padding-left: 10px;
}

.nav-glyph {
  align-items: center;
  background: #edf1f5;
  border: 1px solid #dbe2e8;
  border-radius: 6px;
  color: #56606c;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.nav-dot {
  background: #c8ccd2;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}

.app-main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.global-search {
  flex: 1 1 auto;
  max-width: 640px;
}

.global-search input {
  background: #f3f4f6;
  border-color: transparent;
  border-radius: 7px;
  min-height: 36px;
  padding-left: 14px;
  width: 100%;
}

.global-search input:focus {
  background: var(--surface);
  border-color: #aab7c7;
}

.topbar strong,
.topbar-label {
  display: block;
}

.topbar strong {
  font-size: .98rem;
  font-weight: 760;
}

.topbar-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.topbar-action {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 700;
  padding: 8px 12px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.topbar-create {
  background: var(--create);
  border: 1px solid var(--create-hover);
  border-radius: 7px;
  color: #fff;
  font-size: .88rem;
  font-weight: 760;
  padding: 8px 12px;
}

.topbar-create:hover {
  background: var(--create-hover);
  color: #fff;
}

.topbar-action:hover {
  background: #eef2f6;
  color: var(--ink);
}

.content-shell {
  margin: 0 auto;
  max-width: 1380px;
  padding: 14px 18px 42px;
}

.page-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.asana-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding-bottom: 10px;
}

.header-kicker {
  color: var(--muted);
  display: block;
  font-size: .74rem;
  font-weight: 780;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.page-head h1 {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
}

.hero-copy {
  color: var(--muted);
  font-size: .95rem;
  margin: 5px 0 0;
}

.header-tabs,
.bucket-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.header-tabs a,
.bucket-tabs a {
  border-radius: 6px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 720;
  padding: 7px 10px;
}

.header-tabs a:hover,
.bucket-tabs a:hover {
  background: #ebeef3;
  color: var(--ink);
}

.header-tabs a.active,
.bucket-tabs a.active {
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--create);
  color: var(--ink);
}

.quick-capture,
.inline-form,
.stack-form,
.clarify-form {
  display: grid;
  gap: 10px;
}

.quick-capture {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(260px, 1fr) auto;
  padding: 10px;
  width: min(560px, 100%);
}

.quick-capture textarea {
  grid-column: 1 / -1;
  min-height: 58px;
}

.inline-form {
  grid-template-columns: minmax(220px, 1fr) auto;
  width: min(470px, 100%);
}

input,
textarea,
select {
  background: #fff;
  border: 1px solid #cfd6de;
  border-radius: 7px;
  color: var(--ink);
  min-height: 40px;
  outline: none;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

button,
.button {
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 7px;
  color: #fff;
  font-weight: 750;
  min-height: 40px;
  padding: 8px 13px;
}

button:hover,
.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
}

.metric-card:hover {
  border-color: #b9c4cf;
  box-shadow: 0 8px 20px rgba(17, 24, 39, .06);
  color: var(--ink);
}

.metric-card span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}

.metric-card strong {
  font-size: 1.55rem;
  font-weight: 820;
  line-height: 1;
}

.work-grid,
.split-grid,
.review-grid,
.calendar-layout {
  display: grid;
  gap: 14px;
}

.work-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .82fr);
}

.split-grid,
.calendar-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.list-layout {
  display: grid;
  gap: 0;
  margin: 0 auto;
  max-width: 1060px;
}

.list-layout.has-inspector {
  align-items: start;
  grid-template-columns: minmax(480px, 1fr) minmax(420px, 560px);
  max-width: 100%;
}

.list-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  min-width: 0;
  padding: 0 16px 12px;
}

.list-layout:not(.has-inspector) .list-surface {
  border-radius: 8px;
}

.pane-header {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 12px 4px 0;
}

.pane-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.pane-title-row h1 {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0;
}

.pane-count,
.list-toolbar {
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}

.list-toolbar {
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 40px;
}

.task-composer {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(240px, 1fr) 128px 172px auto;
  padding: 8px 0;
}

.list-layout.has-inspector .task-composer input[aria-label="Context"],
.list-layout.has-inspector .task-composer input[aria-label="Due date"] {
  display: none;
}

.view-controls {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 128px 128px auto;
  padding: 8px 0;
}

.view-controls input,
.view-controls select,
.view-controls button {
  min-height: 32px;
  padding: 5px 9px;
}

.view-controls button {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.task-table-head {
  border-bottom: 1px solid var(--line);
  color: #8a8f98;
  display: grid;
  font-size: .72rem;
  font-weight: 780;
  grid-template-columns: minmax(0, 1fr) 180px 86px;
  min-height: 34px;
  padding: 9px 0 7px 24px;
  text-transform: uppercase;
}

.task-composer input,
.task-composer textarea,
.task-composer select {
  min-height: 34px;
  padding: 6px 9px;
}

.task-composer button {
  min-height: 34px;
  padding: 6px 12px;
}

.list-layout.has-inspector .task-composer,
.list-layout.has-inspector .view-controls {
  grid-template-columns: minmax(0, 1fr) auto;
}

.list-layout.has-inspector .task-composer input[aria-label="Task title"],
.list-layout.has-inspector .view-controls input {
  grid-column: 1 / -1;
}

.list-layout.has-inspector .task-composer button,
.list-layout.has-inspector .view-controls button {
  grid-column: 2;
}

.list-layout.has-inspector .task-details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-composer select,
.task-composer input[type="number"] {
  font-size: .86rem;
}

.task-details {
  grid-column: 1 / -1;
}

.task-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 720;
  padding: 1px 0;
}

.archive-strip {
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  min-height: 46px;
  padding: 8px 0;
}

.archive-strip strong {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 820;
}

.task-details-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 180px 150px 120px 110px 150px 112px 190px 130px;
  padding-top: 8px;
}

.task-details-grid textarea {
  min-height: 38px;
}

.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.project-card,
.clarify-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-primary {
  box-shadow: var(--shadow-soft);
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -2px 0 10px;
  padding-bottom: 10px;
}

.panel h2,
.panel-head h2 {
  color: var(--ink);
  font-size: .96rem;
  font-weight: 800;
  margin: 0;
}

.panel-head a,
.panel-head span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.empty,
.status-note {
  color: var(--muted);
  margin: 0;
}

.status-note {
  font-size: .93rem;
}

.item-card {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  min-height: 44px;
  padding: 8px 0;
}

.list-surface > .item-card {
  grid-template-columns: 16px minmax(0, 1fr) minmax(76px, auto);
  margin-left: -4px;
  margin-right: -4px;
  padding-left: 4px;
  padding-right: 4px;
}

.list-surface > .item-card:hover {
  background: #fbfbfa;
}

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

.task-list-row {
  cursor: pointer;
  transition: background .1s ease, color .1s ease, opacity .18s ease, transform .18s ease;
}

.task-list-row.selected .task-title {
  color: var(--ink);
}

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

.task-selection-marker {
  align-self: stretch;
  background: transparent;
  border-radius: 999px;
  display: block;
  margin: 5px 0;
  width: 4px;
}

.task-list-row.selected .task-selection-marker {
  background: var(--primary);
}

.item-card:not(.task-list-row) .task-selection-marker {
  background: #d6dde6;
  height: 18px;
  margin-top: 4px;
  width: 4px;
}

.item-card strong,
.project-card strong,
.project-row strong,
.clarify-card strong {
  color: var(--ink);
  display: block;
  font-size: .94rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.task-title {
  color: var(--ink);
  display: block;
  font-size: .94rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.item-card.is-unread .task-title,
.item-card[data-unread="true"] .task-title,
.mail-row.is-unread .mail-title,
.mail-row[data-unread="true"] .mail-title,
.calendar-chip.is-unread .calendar-item-title,
.calendar-chip[data-unread="true"] .calendar-item-title {
  font-weight: 760;
}

.task-title:hover {
  color: var(--primary);
}

.item-code {
  background: #eef2f7;
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  color: #465269;
  display: inline-flex;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 820;
  letter-spacing: .02em;
  line-height: 1;
  margin-right: 6px;
  padding: 3px 5px;
  vertical-align: 1px;
  white-space: nowrap;
}

.inspector-head .item-code,
.detail-toolbar .item-code,
.mail-main .item-code,
.calendar-chip .item-code {
  color: #465269;
  display: inline-flex;
  font-size: .72rem;
  letter-spacing: .02em;
  margin-bottom: 0;
  text-transform: none;
  vertical-align: 1px;
}

.item-card p,
.project-card p,
.clarify-card p {
  color: var(--muted);
  font-size: .84rem;
  margin: 2px 0 4px;
  white-space: pre-wrap;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.meta-line span,
.risk-pill {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: .74rem;
  font-weight: 680;
  line-height: 1.25;
  min-height: 18px;
  padding: 0;
}

.meta-line span:not(:last-child)::after {
  color: #a0a7af;
  content: "•";
  margin-left: 5px;
}

.meta-line .priority-chip {
  font-weight: 820;
}

.priority-chip.p1 {
  color: #dc2626;
}

.priority-chip.p2 {
  color: #ea580c;
}

.priority-chip.p3 {
  color: #2563eb;
}

.priority-chip.p4 {
  color: var(--muted);
}

.planned-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.planned-row:last-child {
  border-bottom: 0;
}

.planned-row .item-card {
  border-bottom: 0;
}

.planned-row > form {
  align-self: start;
  margin-top: 8px;
}

.planned-row > form button {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  font-size: .78rem;
  min-height: 28px;
  padding: 4px 8px;
}

.my-day-panel {
  background: #fbfcff;
}

.risk-pill {
  align-self: start;
  background: #fff8e8;
  border: 1px solid #f0d9a8;
  color: var(--amber);
  padding: 3px 8px;
  white-space: nowrap;
}

.icon-button {
  align-items: center;
  background: var(--green-soft);
  border-color: #b7e4c7;
  color: var(--green);
  display: inline-flex;
  font-size: .76rem;
  font-weight: 760;
  gap: 6px;
  justify-content: center;
  min-height: 34px;
  min-width: 64px;
  padding: 0 11px;
  position: relative;
  width: auto;
}

.icon-button::before {
  color: var(--green);
  content: "✓";
  font-size: .94rem;
  font-weight: 900;
  line-height: 1;
}

.icon-button:hover {
  background: #dcfce7;
  border-color: #86d39f;
  color: #166534;
}

.task-complete-button {
  border-radius: 999px;
  white-space: nowrap;
}

.task-complete-button:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 128, 82, .18);
}

.task-row-actions {
  align-items: center;
  display: flex;
  gap: 7px;
  opacity: .76;
}

.item-card:hover .task-row-actions {
  opacity: 1;
}

.row-action {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 760;
}

.row-action:hover {
  color: var(--primary);
}

.task-inspector {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  box-shadow: -12px 0 24px rgba(17, 24, 39, .04);
  max-height: calc(100vh - 96px);
  overflow: auto;
  position: sticky;
  top: 72px;
}

.inspector-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 12px;
}

.inspector-head span,
.inspector-form label span {
  color: var(--muted);
  display: block;
  font-size: .74rem;
  font-weight: 780;
  letter-spacing: .01em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.inspector-head strong {
  color: var(--ink);
  display: block;
  font-size: .98rem;
  font-weight: 520;
  max-width: 280px;
  overflow-wrap: anywhere;
}

.inspector-head .inspector-title {
  color: var(--ink);
  display: block;
  font-size: .98rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.25;
  max-width: 280px;
  overflow-wrap: anywhere;
  text-transform: none;
}

.inspector-top-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.inspector-top-actions form {
  margin: 0;
}

.inspector-top-actions button {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  font-size: .78rem;
  min-height: 30px;
  padding: 5px 9px;
}

.inspector-head a {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 760;
  padding-top: 5px;
}

.inspector-form {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.inspector-form input,
.inspector-form textarea,
.inspector-form select {
  min-height: 36px;
  padding: 7px 9px;
}

.inspector-form textarea {
  min-height: 116px;
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inspector-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 12px;
}

.inspector-actions a {
  color: var(--muted);
  font-weight: 720;
}

.snooze-panel {
  background: #f8fbff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 12px 16px;
}

.snooze-panel strong {
  color: var(--ink);
  display: block;
  font-size: .82rem;
  font-weight: 760;
  margin-bottom: 2px;
}

.snooze-panel [data-snooze-status] {
  color: var(--muted);
  display: block;
  font-size: .8rem;
}

.snooze-actions {
  display: grid;
  gap: 8px;
}

.snooze-actions form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.snooze-actions button {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  font-size: .78rem;
  min-height: 32px;
  padding: 5px 10px;
}

.snooze-actions button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.snooze-custom-form label {
  display: grid;
  gap: 3px;
  min-width: 190px;
}

.snooze-custom-form label span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 760;
  text-transform: uppercase;
}

.snooze-custom-form input {
  min-height: 32px;
  padding: 5px 8px;
}

.unsnooze-form button {
  background: #fff8e8;
  border-color: #f0d9a8;
  color: var(--amber);
}

.subtask-panel {
  border-top: 1px solid var(--line);
  padding: 14px 16px 16px;
}

.subtask-panel.subtask-panel-stale {
  color: var(--muted);
  opacity: .62;
  pointer-events: none;
}

.subtask-panel.subtask-panel-stale::after {
  color: var(--muted);
  content: "Checklist refreshes after saving or opening this task.";
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-top: 8px;
}

.subtask-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.subtask-head strong {
  color: var(--ink);
  font-size: .94rem;
  font-weight: 820;
}

.subtask-head span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}

.subtask-add {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.subtask-add input,
.subtask-add button {
  min-height: 34px;
  padding: 6px 9px;
}

.subtask-list {
  display: grid;
  gap: 2px;
}

.subtask-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 22px minmax(0, 1fr);
  margin: 0;
  min-height: 30px;
}

.subtask-row button {
  background: #fff;
  border: 1px solid #b9c4cf;
  border-radius: 999px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 900;
  height: 18px;
  min-height: 18px;
  padding: 0;
  width: 18px;
}

.subtask-row span {
  color: var(--ink-soft);
  font-size: .88rem;
}

.subtask-row.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.project-card {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 10px;
  padding: 13px;
}

.project-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.project-row:last-child {
  border-bottom: 0;
}

.project-row span {
  color: var(--muted);
}

.clarify-card {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px;
}

.clarify-form {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.clarify-form textarea,
.clarify-form select,
.clarify-form .checkbox-row,
.clarify-form button {
  grid-column: span 2;
}

.checkbox-row {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-weight: 650;
  gap: 8px;
  margin: 0;
}

.checkbox-row input {
  min-height: auto;
  width: auto;
}

.compact-check {
  min-height: 34px;
}

.check-field .checkbox-row {
  border: 1px solid #cfd6de;
  border-radius: 7px;
  min-height: 36px;
  padding: 7px 9px;
}

.review-list {
  color: var(--ink-soft);
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.review-complete textarea {
  min-height: 130px;
}

.integration-panel {
  background: #fbfbff;
}

.calendar-grid {
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.day-cell {
  background: #fff;
  min-height: 126px;
  padding: 8px;
}

.day-cell.muted {
  background: #f3f5f6;
  color: var(--muted);
}

.day-number {
  color: var(--muted);
  display: block;
  font-size: .82rem;
  font-weight: 760;
  margin-bottom: 7px;
}

.calendar-chip {
  background: #eef5ff;
  border-left: 3px solid var(--primary);
  border-radius: 5px;
  color: #27446b;
  font-size: .74rem;
  font-weight: 680;
  margin-bottom: 5px;
  overflow: hidden;
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-chip.tickler {
  background: #fff8e8;
  border-color: var(--amber);
  color: #6d4a12;
}

.calendar-chip.waiting {
  background: #f4f1ff;
  border-color: var(--lavender);
  color: #50428f;
}

.calendar-command-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
}

.calendar-surface {
  min-width: 0;
}

.calendar-week-row {
  color: var(--muted);
  display: grid;
  font-size: .74rem;
  font-weight: 780;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0 0 6px;
  text-transform: uppercase;
}

.calendar-week-row span {
  padding: 0 8px;
}

.day-cell.today {
  box-shadow: inset 0 0 0 2px #bad2ff;
}

.day-cell.today .day-number {
  color: var(--primary);
  font-weight: 840;
}

a.calendar-chip {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.calendar-chip span {
  color: inherit;
  font-size: .68rem;
  font-weight: 820;
  opacity: .78;
}

.calendar-chip strong {
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-chip .calendar-item-title {
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.2;
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-chip:hover {
  background: #e3efff;
  color: #1e3f69;
}

.calendar-chip.selected {
  background: #dce9ff;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(36, 84, 198, .18);
  color: #143d83;
}

.calendar-side-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.calendar-inspector {
  border-left: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-inspector .inspector-head small {
  color: var(--muted);
  display: block;
  font-size: .78rem;
  font-weight: 680;
  margin-top: 4px;
}

.calendar-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calendar-compose-panel textarea {
  min-height: 96px;
}

.danger-button,
.inspector-actions button[type="button"][data-edit-bucket-submit="Trash"] {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
}

.danger-button:hover,
.inspector-actions button[type="button"][data-edit-bucket-submit="Trash"]:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.inspector-actions button[type="button"] {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.inspector-actions button[type="button"]:hover {
  background: var(--blue-soft);
  border-color: #b8c8f2;
  color: var(--primary);
}

.form-alert {
  background: #fff4f4;
  border: 1px solid #f3c5c5;
  border-radius: 7px;
  color: var(--red);
  font-size: .88rem;
  font-weight: 650;
  margin: 10px 0;
  padding: 9px 11px;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.transition-notice {
  align-items: center;
  background: #f0fdf8;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
  margin: 10px 0;
  padding: 9px 11px;
}

.transition-notice span {
  font-size: .88rem;
  font-weight: 760;
}

.transition-notice a {
  color: #14532d;
  font-size: .82rem;
  font-weight: 820;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gmail-row.is-transitioning-out,
.task-list-row.is-transitioning-out,
.item-card.is-transitioning-out {
  background: #f8fafc;
  opacity: .48;
  pointer-events: none;
  position: relative;
  transform: translateX(12px);
}

.gmail-row.is-transitioning-out::after,
.task-list-row.is-transitioning-out::after,
.item-card.is-transitioning-out::after {
  color: var(--muted);
  content: "Working...";
  font-size: .74rem;
  font-weight: 820;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  text-transform: uppercase;
}

form.is-submitting button,
form.is-submitting input,
form.is-submitting select,
form.is-submitting textarea {
  cursor: progress;
}

form.is-submitting button[type="submit"],
form.is-submitting button[data-bucket-submit],
form.is-submitting button[data-edit-bucket-submit] {
  opacity: .68;
  pointer-events: none;
}

form.is-submitting[data-transition-label]::before {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1d4ed8;
  content: attr(data-transition-label);
  display: block;
  font-size: .82rem;
  font-weight: 800;
  padding: 8px 10px;
}

@media (prefers-reduced-motion: reduce) {
  .gmail-row,
  .task-list-row,
  .icon-button {
    transition: none;
  }

  .gmail-row.is-transitioning-out,
  .task-list-row.is-transitioning-out,
  .item-card.is-transitioning-out {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: auto;
    position: static;
  }

  .sidebar-create {
    max-width: 180px;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .side-nav-secondary a {
    padding-left: 10px;
  }

  .nav-section-label {
    flex: 0 0 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .work-grid,
  .split-grid,
  .task-composer,
  .view-controls,
  .task-details-grid,
  .review-grid,
  .calendar-layout,
  .list-layout.has-inspector {
    grid-template-columns: 1fr;
  }

  .task-inspector {
    border-left: 1px solid var(--line);
    border-radius: 8px;
    max-height: none;
    position: static;
  }

  .list-surface {
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  .content-shell {
    padding: 18px 14px 32px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 14px;
  }

  .global-search {
    max-width: none;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .page-head {
    align-items: stretch;
    display: grid;
  }

  .quick-capture,
  .inline-form,
  .clarify-form,
  .task-composer,
  .task-table-head,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .quick-capture textarea,
  .clarify-form textarea,
  .clarify-form select,
  .clarify-form .checkbox-row,
  .clarify-form button {
    grid-column: auto;
  }

  .item-card,
  .project-card {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .item-card form,
  .risk-pill {
    grid-column: 2;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-week-row {
    display: none;
  }

  .day-cell {
    min-height: auto;
  }

  .calendar-field-grid {
    grid-template-columns: 1fr;
  }
}

/* 2026-06 UI polish: operator-first GTD command surface. */
:root {
  --app-bg: #f4f6f8;
  --sidebar-bg: #f9fafb;
  --surface-soft: #f6f8fb;
  --ink: #17202c;
  --ink-soft: #354052;
  --muted: #667085;
  --line: #e3e8ef;
  --line-strong: #cbd5e1;
  --primary: #2454c6;
  --primary-hover: #183f9c;
  --create: #0f766e;
  --create-hover: #0b5f59;
  --blue-soft: #eaf1ff;
  --green-soft: #ecfdf3;
  --amber-soft: #fff7e6;
  --red-soft: #fff1f0;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05);
  --sidebar-width: 272px;
}

html {
  font-size: 16px;
}

body {
  line-height: 1.5;
}

.app-sidebar {
  gap: 14px;
  padding: 18px 14px;
}

.brand-lockup {
  min-height: 48px;
}

.brand-mark {
  background: var(--ink);
}

.sidebar-create,
.topbar-create {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-height: 44px;
}

.sidebar-create span,
.topbar-create span {
  font-size: 1.1rem;
  font-weight: 860;
  line-height: 1;
}

.side-nav a {
  min-height: 40px;
  padding: 7px 9px;
  position: relative;
}

.side-nav a:hover {
  background: #edf2f7;
}

.side-nav a.active {
  background: var(--blue-soft);
  color: var(--primary);
  font-weight: 790;
}

.side-nav a.active::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  height: 22px;
  left: -7px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
}

.side-nav-secondary a {
  min-height: 38px;
}

.nav-glyph {
  background: #eef2f7;
  border-color: #d8e0ea;
}

.nav-glyph::before {
  background: currentColor;
  content: "";
  display: block;
  height: 11px;
  width: 11px;
}

.nav-glyph.home::before {
  clip-path: polygon(50% 5%, 95% 42%, 84% 42%, 84% 95%, 58% 95%, 58% 64%, 42% 64%, 42% 95%, 16% 95%, 16% 42%, 5% 42%);
}

.nav-glyph.tasks::before {
  clip-path: polygon(0 8%, 100% 8%, 100% 28%, 0 28%, 0 40%, 100% 40%, 100% 60%, 0 60%, 0 72%, 100% 72%, 100% 92%, 0 92%);
}

.nav-glyph.inbox::before {
  clip-path: polygon(10% 18%, 90% 18%, 90% 72%, 70% 72%, 62% 86%, 38% 86%, 30% 72%, 10% 72%);
}

.nav-glyph.calendar::before {
  clip-path: polygon(12% 18%, 88% 18%, 88% 90%, 12% 90%, 12% 18%, 24% 18%, 24% 4%, 36% 4%, 36% 18%, 64% 18%, 64% 4%, 76% 4%, 76% 18%, 88% 18%, 88% 34%, 12% 34%);
}

.nav-dot.project { background: var(--primary); }
.nav-dot.waiting { background: var(--lavender); }
.nav-dot.tickler { background: var(--amber); }
.nav-dot.someday { background: #64748b; }
.nav-dot.reference { background: var(--teal); }
.nav-dot.read { background: #c2410c; }
.nav-dot.review { background: var(--green); }
.nav-dot.settings { background: #475467; }

.topbar {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .92);
  min-height: 62px;
}

.global-search input {
  background: #f3f6fa;
  border-radius: 8px;
  min-height: 42px;
}

.topbar-action,
.topbar-create {
  min-height: 42px;
}

.content-shell {
  padding: 20px 22px 48px;
}

.command-head {
  align-items: start;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 52%, #eef6f4 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 18px;
}

.command-copy {
  flex: 1 1 360px;
  min-width: 280px;
}

.page-head h1 {
  font-size: 2rem;
}

.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.signal-strip a {
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  display: inline-flex;
  gap: 8px;
  min-height: 42px;
  padding: 7px 10px;
}

.signal-strip strong {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 840;
}

.signal-strip span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 730;
}

.header-tabs a,
.bucket-tabs a {
  min-height: 38px;
  padding: 8px 10px;
}

.header-tabs a.active,
.bucket-tabs a.active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

input,
textarea,
select {
  border-radius: 8px;
  min-height: 44px;
  padding: 9px 11px;
}

input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 84, 198, .16);
  outline: none;
}

label span,
.field-label {
  color: var(--muted);
  display: block;
  font-size: .73rem;
  font-weight: 780;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

button,
.button {
  cursor: pointer;
  min-height: 44px;
  padding: 9px 14px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:active,
.button:active,
.metric-card:active {
  transform: translateY(1px);
}

.quick-capture {
  align-self: start;
  padding: 12px;
  width: min(600px, 100%);
}

.quick-capture .capture-notes {
  grid-column: 1 / -1;
}

.inline-form {
  align-items: end;
}

.inline-form label {
  min-width: 0;
}

.metric-grid {
  gap: 10px;
}

.metric-card {
  gap: 7px;
  min-height: 104px;
  padding: 17px 13px 13px;
  position: relative;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.metric-card::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 13px;
  position: absolute;
  right: 13px;
  top: 9px;
}

.metric-card.inbox::before { background: var(--create); }
.metric-card.next::before { background: var(--primary); }
.metric-card.waiting::before { background: var(--lavender); }
.metric-card.tickler::before { background: var(--amber); }
.metric-card.someday::before { background: #64748b; }
.metric-card.reference::before { background: var(--teal); }
.metric-card.readreview::before { background: #c2410c; }
.metric-card.calendar::before { background: var(--green); }

.metric-card:hover {
  box-shadow: var(--shadow-card), 0 12px 28px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}

.metric-card em {
  color: var(--muted);
  font-size: .76rem;
  font-style: normal;
  font-weight: 650;
}

.panel,
.project-card,
.clarify-card,
.calendar-grid {
  box-shadow: var(--shadow-card);
}

.panel-head {
  min-height: 42px;
}

.view-controls,
.task-composer {
  align-items: end;
}

.view-controls label,
.task-composer label,
.task-details-grid label,
.clarify-form label,
.stack-form label {
  min-width: 0;
}

.view-controls {
  grid-template-columns: minmax(220px, 1fr) 140px 140px auto;
}

.view-controls input,
.view-controls select,
.view-controls button,
.task-composer input,
.task-composer textarea,
.task-composer select,
.task-composer button {
  min-height: 38px;
}

.task-composer {
  grid-template-columns: minmax(240px, 1fr) 148px 188px auto;
}

.list-layout.has-inspector .task-composer .composer-context,
.list-layout.has-inspector .task-composer .composer-date {
  display: none;
}

.list-layout.has-inspector .task-composer label:first-of-type,
.list-layout.has-inspector .view-controls label:first-of-type {
  grid-column: 1 / -1;
}

.task-details-grid {
  grid-template-columns: minmax(220px, 1.2fr) 180px 150px 120px 110px 150px 112px 190px 130px;
}

.task-details-grid .details-notes {
  min-width: 220px;
}

.item-card {
  border-radius: 7px;
  min-height: 48px;
  padding: 9px 0;
}

.list-surface > .item-card {
  padding-bottom: 9px;
  padding-top: 9px;
}

.list-surface > .item-card:hover {
  background: #f8fafc;
}

.task-selection-marker {
  margin-top: 3px;
}

.task-row-actions {
  min-height: 34px;
}

.icon-button {
  min-height: 34px;
  min-width: 64px;
  width: auto;
}

.planned-row > form button {
  min-height: 32px;
}

.risk-pill {
  background: var(--amber-soft);
}

.clarify-form {
  align-items: end;
}

.clarify-form .clarify-notes,
.clarify-form .checkbox-row,
.clarify-form button {
  grid-column: span 2;
}

.checkbox-row {
  min-height: 38px;
}

.calendar-chip {
  white-space: normal;
}

@media (max-width: 1180px) {
  .content-shell {
    padding: 18px 16px 42px;
  }

  .view-controls,
  .task-composer,
  .task-details-grid {
    grid-template-columns: 1fr;
  }

  .list-layout.has-inspector .task-composer label:first-of-type,
  .list-layout.has-inspector .view-controls label:first-of-type {
    grid-column: auto;
  }
}

@media (min-width: 1181px) {
  .command-head {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 600px);
  }

  .command-head .header-tabs {
    align-self: end;
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .command-head .quick-capture {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .command-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  }

  .command-head .header-tabs {
    grid-column: 1 / -1;
    order: 3;
  }

  .quick-capture {
    width: 100%;
  }
}

@media (max-width: 760px) {
  html,
  body,
  .app-frame,
  .app-main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-sidebar {
    display: grid;
    gap: 10px;
    min-height: auto;
    overflow: hidden;
    padding: 12px 14px;
  }

  .brand-lockup {
    min-height: 42px;
    padding: 0;
  }

  .sidebar-create {
    min-height: 40px;
  }

  .nav-section-label,
  .side-nav.side-nav-secondary {
    display: none;
  }

  .side-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    max-width: 100%;
    overflow-x: auto;
    padding: 0 0 4px;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    white-space: nowrap;
  }

  .side-nav a.active::before {
    bottom: 2px;
    height: 3px;
    left: 12px;
    right: 12px;
    top: auto;
    transform: none;
    width: auto;
  }

  .topbar {
    min-height: auto;
  }

  .page-head h1 {
    font-size: 1.65rem;
  }

  .command-head {
    padding: 14px;
  }

  .signal-strip a {
    flex: 1 1 120px;
  }

  .quick-capture .capture-notes,
  .clarify-form .clarify-notes,
  .clarify-form .checkbox-row,
  .clarify-form button {
    grid-column: auto;
  }

  .quick-capture textarea {
    min-height: 48px;
  }
}

/* Compact Gmail-like bucket lists. */
.compact-pane-header {
  gap: 0;
  padding: 10px 0 8px;
}

.compact-pane-header .pane-title-row {
  gap: 12px;
}

.compact-pane-header .header-kicker {
  margin-bottom: 2px;
}

.compact-view-controls {
  align-items: end;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 128px 128px auto;
  padding: 8px 0;
}

.compact-add-drawer {
  border-bottom: 1px solid var(--line);
}

.compact-add-drawer > summary {
  color: var(--primary);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 780;
  list-style: none;
  min-height: 38px;
  padding: 9px 0;
}

.compact-add-drawer > summary::-webkit-details-marker {
  display: none;
}

.compact-task-composer {
  border-bottom: 0;
  grid-template-columns: minmax(220px, 1fr) 140px 172px auto;
  padding: 0 0 10px;
}

.list-layout.has-inspector .compact-task-composer {
  grid-template-columns: minmax(220px, 1fr) 128px 160px auto;
}

.list-layout.has-inspector .compact-task-composer label:first-of-type {
  grid-column: auto;
}

.list-layout.has-inspector .compact-task-composer button {
  grid-column: auto;
}

.list-surface > .task-list-row {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 54px;
  padding: 8px 0;
}

.list-surface > .task-list-row p {
  font-size: .8rem;
  margin: 1px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-surface > .task-list-row .meta-line {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.list-surface > .task-list-row .task-row-actions {
  min-height: 28px;
}

.list-surface > .task-list-row:first-of-type {
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .compact-view-controls,
  .compact-task-composer,
  .list-layout.has-inspector .compact-task-composer {
    grid-template-columns: 1fr;
  }
}

/* Gmail-like Inbox triage. */
.inbox-head {
  align-items: end;
}

.inbox-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inbox-count-pill {
  background: #eef4ff;
  border: 1px solid #d8e5ff;
  border-radius: 999px;
  color: var(--primary);
  font-size: .84rem;
  font-weight: 760;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.inbox-capture {
  align-items: end;
}

.inbox-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(480px, 1.25fr);
  height: calc(100dvh - 168px);
  min-height: 520px;
  overflow: hidden;
}

.inbox-list-pane {
  background: #fbfcfe;
  border-right: 1px solid var(--line);
  min-width: 0;
  overflow: auto;
}

.inbox-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.inbox-toolbar div {
  display: grid;
  gap: 1px;
}

.inbox-toolbar strong {
  color: var(--ink);
  font-size: .98rem;
  font-weight: 820;
}

.inbox-toolbar span,
.inbox-toolbar a,
.detail-toolbar span,
.detail-toolbar a {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 720;
}

.gmail-list {
  display: grid;
}

.gmail-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 8px 14px;
  transition: background .1s ease, color .1s ease, opacity .18s ease, transform .18s ease;
}

.gmail-row:hover {
  background: #f4f7fb;
  color: var(--ink);
}

.gmail-row.selected {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--primary);
  color: var(--ink);
}

/* Selection / status indicator — NOT a checkbox.
   The inbox triages one item at a time (no bulk actions), so this is a
   round "which item is open / unread" dot, not a tickable square. */
.mail-status {
  align-self: center;
  background: #fff;
  border: 2px solid #c4ccd6;
  border-radius: 999px;
  height: 11px;
  width: 11px;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.gmail-row:hover .mail-status {
  border-color: #94a3b8;
}

.gmail-row.selected .mail-status {
  background: var(--brand-1, var(--primary));
  border-color: var(--brand-1, var(--primary));
  box-shadow: 0 0 0 3px rgba(47, 91, 208, .16);
}

.mail-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.mail-main strong {
  color: var(--ink);
  font-size: .94rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-main .mail-title {
  color: var(--ink);
  font-size: .94rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-main span {
  color: var(--muted);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-row time {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 760;
  white-space: nowrap;
}

.inbox-detail-pane {
  background: var(--surface);
  min-width: 0;
  overflow: auto;
}

.detail-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.back-link::before {
  content: "< ";
}

.detail-toolbar-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.detail-trash-button {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
  font-size: .8rem;
  min-height: 34px;
  padding: 5px 10px;
}

.detail-trash-button:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.gmail-detail-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.mail-detail-head {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) auto;
}

.bucket-move-field select {
  border-color: #aab7c7;
  font-weight: 720;
}

.bucket-shortcuts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bucket-shortcuts span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.bucket-shortcuts button {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--ink-soft);
  font-size: .82rem;
  min-height: 34px;
  padding: 5px 10px;
}

.bucket-shortcuts button:hover {
  background: var(--blue-soft);
  border-color: #b8c8f2;
  color: var(--primary);
}

.bucket-rule-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
  margin: -4px 0 0;
  padding: 8px 10px;
}

.gmail-detail-form textarea {
  min-height: 150px;
}

.detail-field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-create-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.project-create-strip summary {
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 760;
}

.project-create-strip > div {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.inbox-empty {
  color: var(--muted);
  display: grid;
  gap: 4px;
  padding: 28px 16px;
  text-align: center;
}

.inbox-empty strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 820;
}

.detail-empty {
  align-content: center;
  min-height: 360px;
}

@media (max-width: 1180px) {
  .inbox-workspace {
    grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr);
  }

  .mail-detail-head,
  .detail-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .inbox-workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }

  .inbox-list-pane {
    border-right: 0;
    overflow: visible;
  }

  .inbox-workspace.has-selection .inbox-list-pane {
    max-height: 260px;
    overflow: auto;
  }

  .gmail-row {
    grid-template-columns: 20px minmax(0, 1fr);
    min-height: 58px;
  }

  .gmail-row time {
    grid-column: 2;
  }

  .detail-toolbar {
    position: static;
  }

  .bucket-shortcuts button {
    flex: 1 1 120px;
  }
}

/* 2026-06 full-site UX pass: consistent operator workboard behavior. */
.skip-link {
  background: var(--ink);
  border-radius: 0 0 8px 8px;
  color: #fff;
  font-weight: 800;
  left: 18px;
  padding: 10px 14px;
  position: fixed;
  top: -48px;
  z-index: 1000;
}

.skip-link:focus {
  color: #fff;
  top: 0;
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.secondary-button:hover {
  background: var(--blue-soft);
  border-color: #b8c8f2;
  color: var(--primary);
}

.topbar {
  backdrop-filter: blur(10px);
}

.global-search input::placeholder {
  color: #858e9b;
}

.pane-subtitle {
  color: var(--muted);
  font-size: .84rem;
  margin: 3px 0 0;
  max-width: 680px;
}

.list-rule-strip {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 740;
  margin-top: 8px;
  padding: 7px 9px;
}

.list-layout .archive-strip {
  margin-bottom: 2px;
}

.inspector-top-actions button[data-edit-bucket-submit="Next"] {
  background: var(--green-soft);
  border-color: #b7e4c7;
  color: var(--green);
}

.inspector-top-actions button[data-edit-bucket-submit="Next"]:hover {
  background: #dcfce7;
  border-color: #86d39f;
  color: #166534;
}

.health-pill {
  align-self: start;
  background: var(--green-soft);
  border: 1px solid #b7e4c7;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: .74rem;
  font-weight: 780;
  line-height: 1.2;
  padding: 4px 8px;
  white-space: nowrap;
}

.project-card {
  min-height: 76px;
}

.project-card .meta-line span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 2px 7px;
}

.project-card .meta-line span::after {
  content: none;
}

.review-command-grid {
  align-items: stretch;
}

.review-step {
  display: grid;
  gap: 12px;
  position: relative;
}

.review-step-number {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid #c8d8ff;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: .86rem;
  font-weight: 860;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.review-step h2 {
  font-size: 1.02rem;
}

.review-step-link {
  align-self: end;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: .86rem;
  font-weight: 790;
  padding-top: 10px;
}

.review-log-panel {
  margin-top: 14px;
}

.review-log-panel label span,
.stack-form label span {
  color: var(--muted);
  display: block;
  font-size: .76rem;
  font-weight: 780;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.error-panel {
  margin-top: 14px;
  max-width: 720px;
}

.error-panel h3 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 820;
  margin: 0 0 8px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.error-actions .button {
  display: inline-flex;
}

.content-shell > .text-danger {
  max-width: 760px;
}

.content-shell > h1.text-danger {
  color: var(--red) !important;
  font-size: 1.8rem;
  margin-top: 10px;
}

.content-shell > h2.text-danger {
  color: var(--ink) !important;
  font-size: 1.1rem;
  font-weight: 760;
}

@media (max-width: 1180px) {
  .review-command-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    gap: 8px;
    padding: 8px 14px;
  }

  .global-search {
    max-width: none;
  }

  .topbar-create {
    display: none;
  }

  .topbar-action {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .content-shell {
    padding: 12px 14px 36px;
  }

  .today-head.command-head {
    gap: 12px;
    padding: 12px;
  }

  .command-copy .hero-copy {
    display: none;
  }

  .quick-capture {
    box-shadow: var(--shadow-card);
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px;
  }

  .quick-capture .capture-notes {
    display: none;
  }

  .signal-strip {
    gap: 6px;
  }

  .signal-strip a {
    min-height: 58px;
    padding: 9px;
  }

  .pane-subtitle {
    font-size: .8rem;
  }

  .list-rule-strip {
    font-size: .76rem;
  }

  .inspector-head {
    align-items: stretch;
    display: grid;
  }

  .inspector-top-actions {
    flex-wrap: wrap;
  }

  .review-step,
  .error-panel {
    padding: 14px;
  }
}

/* ============================================================
   2026-06-09 Vitality layer — personality, depth, and delight.
   Purely additive. Overrides only color/texture/motion, never
   the working layout grid, spacing system, or component logic.
   ============================================================ */

:root {
  /* Brand identity: modern operator palette with distinct, useful color roles. */
  --app-bg: #f5f7fb;
  --sidebar-bg: #f8fafc;
  --surface-soft: #f3f7fb;
  --ink: #182230;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #d9e2ec;
  --line-strong: #b8c7d8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --create: #f97316;
  --create-hover: #ea580c;
  --teal: #0f766e;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --lavender: #7c3aed;
  --brand-1: #2563eb;
  --brand-2: #06b6d4;
  --brand-3: #14b8a6;
  --brand-4: #f59e0b;
  --brand-grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 48%, #14b8a6 100%);
  --brand-hot-grad: linear-gradient(135deg, #f97316 0%, #f59e0b 48%, #14b8a6 100%);
  --aurora: radial-gradient(1180px 520px at 4% -10%, rgba(20, 184, 166, .16), transparent 58%),
            radial-gradient(980px 460px at 100% 0%, rgba(37, 99, 235, .13), transparent 56%),
            radial-gradient(720px 360px at 50% 110%, rgba(245, 158, 11, .09), transparent 62%);
  --font-display: "Sora", "Inter", "Segoe UI", sans-serif;
  --ring: 0 0 0 3px rgba(37, 99, 235, .2);
  --lift: 0 12px 28px -12px rgba(15, 38, 92, .3);
}

@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}

/* Warm, alive page canvas instead of flat gray. */
body {
  background:
    var(--aurora),
    var(--app-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(248, 250, 252, .96)),
    radial-gradient(260px 220px at 10% 0%, rgba(6, 182, 212, .16), transparent 70%),
    var(--sidebar-bg);
}

.topbar {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}

/* Display typeface for headings gives a confident, branded voice. */
.page-head h1,
.pane-title-row h1,
.brand-lockup strong {
  font-family: var(--font-display);
  letter-spacing: 0;
}

/* --- Brand mark: glance-able identity, subtle gradient + glow --- */
.brand-mark {
  background: var(--brand-grad);
  border-radius: 11px;
  box-shadow: 0 9px 18px -8px rgba(37, 99, 235, .7);
  position: relative;
  overflow: hidden;
}
.brand-mark::before {
  background: rgba(255, 255, 255, .92);
  border-radius: 5px;
  box-shadow: 5px 5px 0 rgba(255, 255, 255, .28);
  content: "";
  height: 15px;
  left: 9px;
  position: absolute;
  top: 9px;
  width: 15px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  background: transparent;
  border-bottom: 3px solid #0f766e;
  border-left: 3px solid #0f766e;
  height: 7px;
  left: 12px;
  top: 14px;
  transform: rotate(-45deg);
  width: 12px;
}

/* --- Capture buttons get the brand gradient + tactile press --- */
.sidebar-create,
.topbar-create {
  background: var(--brand-grad);
  border: 0;
  box-shadow: 0 8px 18px -10px rgba(47, 91, 208, .7);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.sidebar-create:hover,
.topbar-create:hover {
  background: var(--brand-grad);
  filter: saturate(1.08) brightness(1.03);
  box-shadow: 0 12px 26px -10px rgba(47, 91, 208, .85);
  transform: translateY(-1px);
}
.sidebar-create:active,
.topbar-create:active { transform: translateY(0); }

/* Active nav item: accent rail uses brand, glyph tints to match. */
.side-nav a.active::before { background: var(--brand-1); }
.side-nav a.active .nav-glyph {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(37, 99, 235, .28);
  color: var(--brand-1);
}

.side-nav a:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, .08), rgba(6, 182, 212, .06));
}

.nav-glyph.home { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.nav-glyph.tasks { background: #ecfeff; border-color: #a5f3fc; color: #0891b2; }
.nav-glyph.inbox { background: #fff7ed; border-color: #fed7aa; color: #ea580c; }
.nav-glyph.calendar { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }

.nav-dot.project { background: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.nav-dot.waiting { background: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12); }
.nav-dot.tickler { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .14); }
.nav-dot.someday { background: #64748b; box-shadow: 0 0 0 3px rgba(100, 116, 139, .12); }
.nav-dot.reference { background: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .13); }
.nav-dot.read { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, .14); }
.nav-dot.review { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .13); }
.nav-dot.done { background: #059669; box-shadow: 0 0 0 3px rgba(5, 150, 105, .13); }
.nav-dot.trash { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.nav-dot.settings { background: #475467; box-shadow: 0 0 0 3px rgba(71, 84, 103, .12); }

/* --- Today hero: a real command-center banner, not a flat box --- */
.command-head {
  background:
    radial-gradient(620px 240px at 92% -40%, rgba(6, 182, 212, .2), transparent 60%),
    radial-gradient(520px 220px at 4% 0%, rgba(245, 158, 11, .12), transparent 64%),
    linear-gradient(135deg, #ffffff 0%, #f3f7ff 48%, #ecfeff 100%);
  border-color: rgba(37, 99, 235, .16);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 40px -28px rgba(37, 99, 235, .42);
  position: relative;
  overflow: hidden;
}
.command-head::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--brand-grad);
  opacity: .07;
  pointer-events: none;
}
.header-kicker {
  color: var(--brand-1);
  position: relative;
  padding-left: 16px;
}
.header-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(58, 166, 160, .18);
}

/* Signal pills: lively, tappable, with a hairline accent + lift. */
.signal-strip a {
  background: rgba(255, 255, 255, .9);
  border-color: rgba(47, 91, 208, .14);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.signal-strip a:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 91, 208, .32);
  box-shadow: var(--lift);
}
.signal-strip strong {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Metric cards: colored numerals, gradient accent, gentle rise --- */
.metric-grid { perspective: 1000px; }
.metric-card {
  background:
    radial-gradient(180px 110px at 100% 0%, rgba(6, 182, 212, .08), transparent 68%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s ease, border-color .2s ease;
}
.metric-card::before { height: 5px; border-radius: 0 0 999px 999px; left: 0; right: 0; top: 0; }
.metric-card.inbox::before { background: #f97316; }
.metric-card.next::before { background: #2563eb; }
.metric-card.waiting::before { background: #7c3aed; }
.metric-card.tickler::before { background: #f59e0b; }
.metric-card.someday::before { background: #64748b; }
.metric-card.reference::before { background: #14b8a6; }
.metric-card.readreview::before { background: #f97316; }
.metric-card.calendar::before { background: #16a34a; }
.metric-card strong {
  font-family: var(--font-display);
  background: linear-gradient(180deg, #172554 0%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric-card:hover { transform: translateY(-3px); box-shadow: var(--lift); }

/* --- Panels: subtle gradient top, refined shadow, hover warmth --- */
.panel,
.project-card,
.clarify-card {
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.panel-primary {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(37, 99, 235, .07), transparent 62%),
    linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 16px 36px -26px rgba(37, 99, 235, .36);
}
.panel:hover { box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 16px 34px -22px rgba(15, 38, 92, .22); }
.my-day-panel {
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(20, 184, 166, .12), transparent 60%),
    radial-gradient(360px 160px at 0% 0%, rgba(245, 158, 11, .08), transparent 62%),
    linear-gradient(180deg, #ffffff, #fbfdff);
}

/* Section headings get the same accent-dot language as the hero. */
.panel-head h2 {
  position: relative;
  padding-left: 14px;
}
.panel-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand-grad);
}

/* --- Delightful empty states: iconographic, not a sad gray line --- */
.empty,
.status-note,
.inbox-empty,
.detail-empty {
  position: relative;
}
.panel .empty {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 10px 0 6px;
  color: var(--muted);
}
.panel .empty::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 38%, rgba(58, 166, 160, .9), rgba(47, 91, 208, .85));
  -webkit-mask: var(--empty-glyph, none) center / 18px 18px no-repeat;
  mask: var(--empty-glyph, none) center / 18px 18px no-repeat;
  opacity: .9;
}
/* generic check-circle glyph for empty states */
.panel .empty {
  --empty-glyph: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.1 14.2-4-4 1.4-1.4 2.6 2.6 5.4-5.4 1.4 1.4-6.8 6.8Z'/></svg>");
}
.inbox-empty::before,
.detail-empty::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(47, 91, 208, .14), rgba(58, 166, 160, .18));
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 5h-5a3 3 0 0 1-6 0H4V6h16v3Z'/></svg>") center / 30px 30px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm0 5h-5a3 3 0 0 1-6 0H4V6h16v3Z'/></svg>") center / 30px 30px no-repeat;
  background-clip: padding-box;
}

/* --- Task rows: smoother hover + selected accent uses brand --- */
.task-list-row.selected {
  background: linear-gradient(90deg, rgba(37, 99, 235, .11), rgba(6, 182, 212, .055));
  box-shadow: inset 3px 0 0 var(--brand-1);
}
.gmail-row.selected { box-shadow: inset 3px 0 0 var(--brand-1); }
.list-surface > .item-card:hover,
.gmail-row:hover { transition: background .14s ease; }

/* Single-row done button: explicit action, not a multi-select checkbox. */
.icon-button {
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.icon-button:hover { transform: scale(1.06); box-shadow: 0 6px 14px -8px rgba(22, 101, 52, .6); }
.icon-button:active { transform: scale(.94); }

/* Priority chips get a soft tinted pill so urgency reads instantly. */
.priority-chip.p1 { color: #c81e1e; }
.priority-chip.p2 { color: #c2410c; }

/* Calendar: today cell gets a branded glow ring. */
.day-cell.today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .55);
  background:
    radial-gradient(180px 90px at 100% 0%, rgba(20, 184, 166, .1), transparent 64%),
    linear-gradient(180deg, rgba(37, 99, 235, .055), transparent);
}

/* Review step number badge: branded gradient. */
.review-step-number {
  background: var(--brand-grad);
  border: 0;
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(47, 91, 208, .7);
}

/* Topbar: a hairline brand line so the chrome feels intentional. */
.topbar { border-bottom-color: rgba(47, 91, 208, .12); }

/* Focus ring uses brand color consistently. */
input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  box-shadow: var(--ring);
  border-color: var(--brand-1);
}

/* --- Motion: entrance choreography for first-paint vitality --- */
@media (prefers-reduced-motion: no-preference) {
  .metric-card,
  .signal-strip a {
    animation: vitality-rise .5s cubic-bezier(.2, .8, .2, 1) both;
  }
  .metric-grid .metric-card:nth-child(1) { animation-delay: .02s; }
  .metric-grid .metric-card:nth-child(2) { animation-delay: .06s; }
  .metric-grid .metric-card:nth-child(3) { animation-delay: .1s; }
  .metric-grid .metric-card:nth-child(4) { animation-delay: .14s; }
  .metric-grid .metric-card:nth-child(5) { animation-delay: .18s; }
  .metric-grid .metric-card:nth-child(6) { animation-delay: .22s; }
  .metric-grid .metric-card:nth-child(7) { animation-delay: .26s; }
  .metric-grid .metric-card:nth-child(8) { animation-delay: .3s; }
  .signal-strip a:nth-child(1) { animation-delay: .04s; }
  .signal-strip a:nth-child(2) { animation-delay: .09s; }
  .signal-strip a:nth-child(3) { animation-delay: .14s; }
  .signal-strip a:nth-child(4) { animation-delay: .19s; }

  .panel,
  .command-head {
    animation: vitality-fade .45s ease both;
  }

  @keyframes vitality-rise {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes vitality-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Selection color carries the brand. */
::selection {
  background: rgba(6, 182, 212, .22);
}

/* Custom scrollbar so even overflow feels considered. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, .32) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, .26);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(20, 184, 166, .45); background-clip: content-box; }

/* 2026-06-11 interaction polish: copyable tiles, drag-to-list, modern inspector. */
[data-copyable-text],
.task-title,
.item-card p,
.mail-title,
.mail-main span,
.inspector-title {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.task-title,
.mail-title {
  align-items: center;
  display: flex;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.task-title .item-code,
.mail-title .item-code {
  flex: 0 0 auto;
}

.task-title-scroll {
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(0);
  white-space: nowrap;
  will-change: transform;
}

.mail-title .task-title-scroll {
  color: inherit;
  font-size: inherit;
}

.task-list-row.selected.title-overflows .task-title,
.gmail-row.selected.title-overflows .mail-title {
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent 100%);
}

.task-list-row.selected.title-overflows .task-title-scroll,
.gmail-row.selected.title-overflows .task-title-scroll {
  animation: gtd-selected-title-pan var(--title-scroll-duration, 9s) ease-in-out .45s infinite alternate;
  overflow: visible;
  text-overflow: clip;
}

.task-list-row.selected.title-overflows .task-title:hover .task-title-scroll,
.task-list-row.selected.title-overflows .task-title:focus-within .task-title-scroll,
.gmail-row.selected.title-overflows .mail-title:hover .task-title-scroll,
.gmail-row.selected.title-overflows .mail-title:focus-within .task-title-scroll {
  animation-play-state: paused;
}

@keyframes gtd-selected-title-pan {
  0%,
  16% {
    transform: translateX(0);
  }

  84%,
  100% {
    transform: translateX(calc(-1 * var(--title-pan, 0px)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-list-row.selected.title-overflows .task-title-scroll,
  .gmail-row.selected.title-overflows .task-title-scroll {
    animation: none;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

.task-drag-handle,
.mail-drag-handle {
  cursor: grab;
  outline: none;
  position: relative;
}

.task-selection-marker.task-drag-handle,
.mail-status.mail-drag-handle {
  align-self: flex-start;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(148, 163, 184, .66);
  border-radius: 8px;
  box-shadow: 0 8px 18px -16px rgba(15, 23, 42, .65);
  flex: 0 0 28px;
  height: 28px;
  margin: 1px 10px 0 0;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  width: 28px;
}

.gmail-row .mail-status.mail-drag-handle {
  margin-top: 3px;
}

.task-list-row.selected .task-selection-marker.task-drag-handle,
.gmail-row.selected .mail-status.mail-drag-handle {
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(20, 184, 166, .1));
  border-color: rgba(37, 99, 235, .46);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1), 0 10px 22px -18px rgba(37, 99, 235, .75);
}

.item-card:hover .task-selection-marker.task-drag-handle,
.gmail-row:hover .mail-status.mail-drag-handle,
.is-task-dragging .task-selection-marker.task-drag-handle,
.is-task-dragging .mail-status.mail-drag-handle {
  border-color: rgba(37, 99, 235, .52);
  transform: translateY(-1px);
}

.task-drag-handle:active,
.mail-drag-handle:active {
  cursor: grabbing;
}

.task-drag-handle::after,
.mail-drag-handle::after {
  background-image: radial-gradient(currentColor 1px, transparent 1.5px);
  background-size: 4px 4px;
  color: rgba(52, 64, 84, .66);
  content: "";
  height: 16px;
  left: 50%;
  opacity: .72;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity .16s ease;
  width: 10px;
}

.item-card:hover .task-drag-handle::after,
.gmail-row:hover .mail-drag-handle::after,
.is-task-dragging .task-drag-handle::after,
.is-task-dragging .mail-drag-handle::after {
  opacity: 1;
}

.item-card.is-dragging,
.gmail-row.is-dragging {
  opacity: .52;
  transform: scale(.992);
}

[data-drop-bucket] {
  position: relative;
}

[data-drop-bucket].drag-over {
  background: linear-gradient(90deg, rgba(37, 99, 235, .14), rgba(20, 184, 166, .12));
  box-shadow: inset 3px 0 0 var(--brand-2), 0 8px 22px -16px rgba(37, 99, 235, .65);
  color: var(--ink);
}

.is-task-dragging [data-drop-bucket] {
  outline: 1px dashed rgba(37, 99, 235, .22);
  outline-offset: -3px;
}

.task-inspector,
.inbox-detail-pane {
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(6, 182, 212, .1), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .96));
}

.inspector-head,
.detail-toolbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 246, 255, .9)),
    radial-gradient(360px 160px at 100% 0%, rgba(20, 184, 166, .13), transparent 66%);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(37, 99, 235, .14);
}

.inspector-head .inspector-title,
.mail-detail-head input[name="Clarify.Title"] {
  color: #172554;
  font-family: var(--font-display);
  font-weight: 720;
}

.inspector-form,
.gmail-detail-form {
  gap: 16px;
}

.inspector-form > label,
.gmail-detail-form > label,
.project-create-strip,
.field-grid,
.detail-field-grid,
.snooze-panel,
.subtask-panel {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(184, 199, 216, .64);
  border-radius: 12px;
  box-shadow: 0 10px 26px -24px rgba(15, 38, 92, .42);
}

.inspector-form > label,
.gmail-detail-form > label {
  padding: 11px 12px;
}

.field-grid,
.detail-field-grid {
  padding: 12px;
}

.field-grid label,
.detail-field-grid label {
  background: transparent;
  border: 0;
  padding: 0;
}

.inspector-form label span,
.gmail-detail-form label span,
.mail-detail-head label span {
  color: #475467;
  font-size: .72rem;
  font-weight: 840;
  text-transform: uppercase;
}

.inspector-form input,
.inspector-form textarea,
.inspector-form select,
.gmail-detail-form input,
.gmail-detail-form textarea,
.gmail-detail-form select,
.snooze-custom-form input,
.subtask-add input {
  background: #f8fbff;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  color: var(--ink);
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.inspector-form textarea[name="EditItem.Notes"],
.gmail-detail-form textarea[name="Clarify.Notes"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .92)),
    radial-gradient(420px 180px at 100% 0%, rgba(20, 184, 166, .055), transparent 64%);
  color: #40516b;
  font-family: var(--font-body);
  font-size: .96rem;
  font-weight: 420;
  letter-spacing: 0;
  line-height: 1.64;
  min-height: 154px;
  padding: 15px 16px;
}

.inspector-form textarea[name="EditItem.Notes"]::placeholder,
.gmail-detail-form textarea[name="Clarify.Notes"]::placeholder {
  color: #8a98aa;
}

.inspector-form input:hover,
.inspector-form textarea:hover,
.inspector-form select:hover,
.gmail-detail-form input:hover,
.gmail-detail-form textarea:hover,
.gmail-detail-form select:hover,
.snooze-custom-form input:hover,
.subtask-add input:hover {
  background: #ffffff;
  border-color: #a9bcd3;
}

.inspector-form input:focus,
.inspector-form textarea:focus,
.inspector-form select:focus,
.gmail-detail-form input:focus,
.gmail-detail-form textarea:focus,
.gmail-detail-form select:focus,
.snooze-custom-form input:focus,
.subtask-add input:focus {
  background: #ffffff;
  border-color: var(--brand-1);
  box-shadow: var(--ring), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.inspector-form select,
.gmail-detail-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #2563eb 50%),
    linear-gradient(135deg, #2563eb 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.inspector-top-actions button,
.detail-trash-button,
.bucket-shortcuts button,
.snooze-actions button {
  border-radius: 999px;
  font-weight: 820;
}

.inspector-actions {
  background: rgba(248, 251, 255, .86);
  border: 1px solid rgba(184, 199, 216, .64);
  border-radius: 12px;
  padding: 12px;
}

.inspector-actions button,
.mail-detail-head button[type="submit"] {
  background: var(--brand-grad);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 20px -14px rgba(37, 99, 235, .8);
}

.inspector-actions button:hover,
.mail-detail-head button[type="submit"]:hover {
  filter: saturate(1.08) brightness(1.03);
}

.mail-detail-head .detail-save-button {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #ffffff;
}

.mail-detail-head .detail-save-button.is-emphasized {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 14px 26px -16px rgba(37, 99, 235, .72);
}

.mail-detail-head .detail-move-button {
  background: #eef4ff;
  border: 1px solid #cbd8e8;
  box-shadow: none;
  color: #24406f;
}

.mail-detail-head .detail-move-button:hover {
  background: #e5eefc;
}

.detail-save-state {
  color: #667085;
  font-size: .78rem;
  font-weight: 650;
  margin: -8px 2px 0;
}

.gmail-detail-form.has-unsaved-changes .detail-save-state {
  color: #a15c07;
}

.bucket-shortcuts {
  background: rgba(239, 246, 255, .68);
  border: 1px solid rgba(191, 219, 254, .74);
  border-radius: 12px;
  padding: 10px;
}

.mail-detail-head {
  background:
    radial-gradient(320px 120px at 100% 0%, rgba(6, 182, 212, .12), transparent 68%),
    linear-gradient(135deg, rgba(255, 255, 255, .88), rgba(239, 246, 255, .82));
  border: 1px solid rgba(184, 199, 216, .66);
  border-radius: 14px;
  box-shadow: 0 12px 30px -24px rgba(15, 38, 92, .46);
  padding: 12px;
}

.mail-detail-head label {
  margin: 0;
}

.bucket-rule-note {
  background: linear-gradient(90deg, rgba(255, 247, 237, .9), rgba(236, 254, 255, .78));
  border-color: rgba(245, 158, 11, .24);
}

@media (max-width: 760px) {
  .field-grid,
  .detail-field-grid {
    padding: 10px;
  }
}

/* ============================================================
   2026-06-12 Flair layer — motion, sheen, and cross-page polish.
   Purely additive: no layout, spacing, or interaction logic is
   changed. All motion is gated on prefers-reduced-motion.
   ============================================================ */

/* --- Cross-page view transitions: soft MPA crossfade --- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root) {
    animation: gtd-page-out .14s ease both;
  }

  ::view-transition-new(root) {
    animation: gtd-page-in .2s ease both;
  }

  @keyframes gtd-page-out {
    to { opacity: 0; }
  }

  @keyframes gtd-page-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* --- Topbar: animated brand hairline so the chrome feels alive --- */
.topbar {
  position: sticky;
}

.topbar::after {
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-4), var(--brand-1));
  background-size: 280% 100%;
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  opacity: .8;
  pointer-events: none;
  position: absolute;
  right: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .topbar::after {
    animation: gtd-hairline-drift 18s linear infinite;
  }

  @keyframes gtd-hairline-drift {
    from { background-position: 0% 0; }
    to   { background-position: 280% 0; }
  }
}

/* --- Capture buttons: light sheen sweeps across on hover --- */
.sidebar-create,
.topbar-create {
  overflow: hidden;
  position: relative;
}

.sidebar-create::after,
.topbar-create::after {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .42) 50%, transparent 62%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-110%);
}

@media (prefers-reduced-motion: no-preference) {
  .sidebar-create:hover::after,
  .topbar-create:hover::after {
    animation: gtd-sheen .7s ease;
  }

  @keyframes gtd-sheen {
    from { opacity: 1; transform: translateX(-110%); }
    to   { opacity: 1; transform: translateX(110%); }
  }
}

/* --- Brand mark: gentle glow + tilt greeting on hover --- */
@media (prefers-reduced-motion: no-preference) {
  .brand-mark {
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease;
  }

  .brand-lockup:hover .brand-mark {
    box-shadow: 0 10px 24px -8px rgba(6, 182, 212, .85);
    transform: rotate(-6deg) scale(1.06);
  }
}

/* --- Sidebar nav: glyphs and dots respond to the pointer --- */
@media (prefers-reduced-motion: no-preference) {
  .nav-glyph,
  .nav-dot {
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
  }

  .side-nav a:hover .nav-glyph {
    transform: scale(1.12) rotate(-4deg);
  }

  .side-nav a:hover .nav-dot {
    transform: scale(1.5);
  }
}

/* --- Global search: lifts and brightens when focused --- */
.global-search input {
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.global-search input:focus {
  box-shadow: var(--ring), 0 10px 24px -16px rgba(37, 99, 235, .55);
  transform: translateY(-1px);
}

/* --- List rows: staggered entrance on first paint --- */
@media (prefers-reduced-motion: no-preference) {
  .list-surface > .item-card,
  .gmail-row {
    animation: gtd-row-in .32s ease backwards;
  }

  .list-surface > .item-card:nth-child(1),  .gmail-row:nth-child(1)  { animation-delay: .02s; }
  .list-surface > .item-card:nth-child(2),  .gmail-row:nth-child(2)  { animation-delay: .05s; }
  .list-surface > .item-card:nth-child(3),  .gmail-row:nth-child(3)  { animation-delay: .08s; }
  .list-surface > .item-card:nth-child(4),  .gmail-row:nth-child(4)  { animation-delay: .11s; }
  .list-surface > .item-card:nth-child(5),  .gmail-row:nth-child(5)  { animation-delay: .14s; }
  .list-surface > .item-card:nth-child(6),  .gmail-row:nth-child(6)  { animation-delay: .17s; }
  .list-surface > .item-card:nth-child(7),  .gmail-row:nth-child(7)  { animation-delay: .2s; }
  .list-surface > .item-card:nth-child(8),  .gmail-row:nth-child(8)  { animation-delay: .23s; }
  .list-surface > .item-card:nth-child(9),  .gmail-row:nth-child(9)  { animation-delay: .26s; }
  .list-surface > .item-card:nth-child(10), .gmail-row:nth-child(10) { animation-delay: .29s; }

  @keyframes gtd-row-in {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* --- Transition notices: slide in with a brand accent rail --- */
.transition-notice {
  border-left: 3px solid var(--brand-2);
  box-shadow: 0 10px 24px -18px rgba(37, 99, 235, .55);
}

@media (prefers-reduced-motion: no-preference) {
  .transition-notice {
    animation: gtd-notice-in .34s cubic-bezier(.2, .8, .2, 1) backwards;
  }

  @keyframes gtd-notice-in {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
  }
}

/* --- Done button: satisfying pop on press --- */
@media (prefers-reduced-motion: no-preference) {
  .icon-button:active {
    animation: gtd-done-pop .26s cubic-bezier(.34, 1.56, .64, 1);
  }

  @keyframes gtd-done-pop {
    0%   { transform: scale(.86); }
    60%  { transform: scale(1.12); }
    100% { transform: scale(.94); }
  }
}

/* --- Inspector / detail panes: ease in from the right --- */
@media (prefers-reduced-motion: no-preference) {
  .task-inspector,
  .inbox-detail-pane {
    animation: gtd-pane-in .26s ease backwards;
  }

  @keyframes gtd-pane-in {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
  }
}

/* --- Metric cards: numerals brighten on hover for glanceability --- */
.metric-card:hover strong {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
