@import url("https://fonts.googleapis.com/css?family=Nunito:300,400,600,700&subset=latin-ext");

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-muted: #F4F8FB;
  --line: #E1ECF4;
  --line-strong: #D6E2EB;
  --text: #3B566E;
  --muted: #6F8BA4;
  --faint: #8299AC;
  --blue: #3B566E;
  --blue-strong: #2D4357;
  --primary: #FE6346;
  --primary-strong: #FE4E2D;
  --heading: #3B566E;
  --orange: #FE6346;
  --orange-strong: #FE4E2D;
  --warm: #C88719;
  --highlight: #FF9E8C;
  --sky: #FE6346;
  --sky-strong: #FE4E2D;
  --meadow: #FFF8F7;
  --moss: #FE6346;
  --capture-accent: #FE6346;
  --capture-accent-strong: #FE4E2D;
  --capture-accent-soft: #FFF8F7;
  --capture-accent-surface: #FE6346;
  --capture-accent-border: #FFB4A6;
  --link: #FE6346;
  --link-dark: #6F8BA4;
  --active-route: #FFF8F7;
  --nav-hover: #F7FAFD;
  --disabled-bg: #F4F8FB;
  --disabled-text: #9AAEBD;
  --quick-add-line: #E1ECF4;
  --quick-add-muted: #6F8BA4;
  --green: #2E7D5B;
  --amber: #C88719;
  --red: #B54747;
  --violet: #8B74D6;
  --sidebar: #FFFFFF;
  --page-canvas: #FFFFFF;
  --shadow: 0 2px 48px rgba(0, 0, 0, 0.08);
  --radius: 5px;
  --topbar: 44px;
  --sidebar-width: 239px;
  font-family: "Nunito", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.form-label {
  color: var(--text);
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

.add-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}
.add-action svg {
  width: 18px;
  height: 18px;
}
.add-action:hover,
.add-action:focus-visible {
  color: var(--primary-strong);
  text-decoration: none;
}

.supporting-text,
.supporting-text-placeholder::placeholder,
.empty-state p {
  color: var(--faint);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
}
.supporting-text-placeholder::placeholder { opacity: 1; }

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  color: var(--disabled-text);
  background: var(--disabled-bg);
  border-color: var(--line-strong);
  cursor: not-allowed;
}

.topbar a:not(.brand) {
  color: var(--link-dark);
}

.workspace a:not(.nav-item):not(.brand),
.quick-add a,
.side-panel a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 8px;
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid #F5F5F5;
  box-shadow: 0 2px 28px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 146px;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--heading);
}

.topbar-search {
  flex: 0 1 188px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--surface-muted);
  border: 1px solid #EEEEEE;
  border-radius: 4px;
}

.topbar-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.topbar-search input::placeholder { color: var(--muted); }

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}

.new-item-control {
  position: relative;
  flex: 0 0 auto;
}

.new-item-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 70;
  width: 172px;
  padding: 4px;
  border: 1px solid #EEEEEE;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.new-item-menu[hidden] { display: none; }

.new-item-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 400;
}

.new-item-menu button:hover,
.new-item-menu button:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
  outline: 0;
}

.new-item-menu button svg { width: 16px; height: 16px; }

[dir="rtl"] .new-item-menu {
  right: 0;
  left: auto;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 70;
  width: 156px;
  padding: 4px;
  border: 1px solid #d9dde2;
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 26, 37, 0.16);
}

.settings-dropdown[hidden] {
  display: none;
}

.settings-dropdown button {
  width: 100%;
  min-height: 29px;
  display: block;
  padding: 5px 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.settings-dropdown button:hover,
.settings-dropdown button:focus-visible {
  background: var(--nav-hover);
  color: var(--capture-accent-strong);
  outline: 0;
}

[dir="rtl"] .settings-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .settings-dropdown button {
  text-align: right;
}

.workspace-switcher,
.topbar-new,
.topbar-link {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 400;
}

.workspace-switcher,
.topbar-new {
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.topbar-new {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

.topbar-link {
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.topbar-link.strong {
  color: var(--heading);
}

.topbar-link:hover,
.workspace-switcher:hover,
.topbar-new:hover {
  filter: brightness(0.96);
}

.sidebar {
  grid-column: 1;
  grid-row: 2;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  box-shadow: 2px 0 28px rgba(0, 0, 0, 0.035);
}

.sidebar-resizer {
  --sidebar-resizer-y: 50%;
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  width: 9px;
  height: 100%;
  margin-inline-end: -4px;
  cursor: none;
  touch-action: none;
  z-index: 12;
  position: relative;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 4px;
  width: 1px;
  background: transparent;
  z-index: 0;
  transition: background-color 120ms ease, width 120ms ease;
}

.sidebar-resizer-handle {
  position: absolute;
  top: var(--sidebar-resizer-y);
  left: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: var(--accent);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease;
}

.sidebar-resizer-handle svg {
  display: block;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  overflow: visible;
}

.sidebar-resizer:hover .sidebar-resizer-handle,
.sidebar-resizer:focus-visible .sidebar-resizer-handle,
.sidebar-resizer.is-dragging .sidebar-resizer-handle {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.sidebar-resizer:hover::after,
.sidebar-resizer:focus-visible::after,
.sidebar-resizer.is-dragging::after {
  width: 2px;
  background: var(--accent);
}

body.is-resizing-sidebar,
body.is-resizing-sidebar * {
  cursor: none !important;
  user-select: none !important;
}

[dir="rtl"] .sidebar {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.nav-section.compact {
  min-height: 64px;
}

.nav-heading {
  margin: 3px 8px 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.8px;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3px 8px 7px;
}

.sidebar-projects-heading {
  display: block;
  margin: 0;
  text-decoration: none;
}

.sidebar-projects-heading:hover,
.sidebar-projects-heading:focus-visible,
.sidebar-projects-heading.active {
  color: var(--primary);
}

.reference-heading {
  display: block;
  text-decoration: none;
}

.reference-heading:hover,
.reference-heading:focus-visible,
.reference-heading.active {
  color: var(--primary);
}

.sidebar-project-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  box-shadow: none;
}

.sidebar-project-add svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.sidebar-project-add:hover,
.sidebar-project-add:focus-visible {
  border: 0;
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.sidebar-project-list {
  display: grid;
}

.sidebar-reference-list {
  display: grid;
}

.sidebar-project-item {
  min-height: 28px;
}

.sidebar-project-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-reference-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-item strong {
  max-width: 48px;
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-empty {
  margin: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: default;
}

[dir="rtl"] .sidebar-project-empty { text-align: right; }

.nav-item {
  min-height: 28px;
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 15px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
  font-weight: 400;
}

[dir="rtl"] .nav-item { text-align: right; }

.nav-item:hover { background: var(--nav-hover); }
.nav-item.active {
  background: var(--active-route);
  color: var(--primary);
  box-shadow: inset 2px 0 0 var(--primary);
}

.nav-item[href="#capture"].active {
  color: var(--primary);
  background: var(--active-route);
  box-shadow: inset 3px 0 0 var(--primary);
}

[dir="rtl"] .nav-item[href="#capture"].active {
  box-shadow: inset -3px 0 0 var(--blue);
}

.nav-item[href="#capture"]:focus-visible {
  color: var(--primary);
  background: var(--active-route);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

[dir="rtl"] .nav-item.active {
  box-shadow: inset -3px 0 0 var(--blue);
}

.nav-item strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-item svg.icon {
  color: var(--muted);
}

.nav-item[href="#next"] svg.icon { color: var(--primary); }
.nav-item[data-view="waiting"] svg.icon { color: var(--warm); }
.nav-item[href="#scheduled"] svg.icon { color: var(--sky); }
.nav-item[href="#someday"] svg.icon { color: var(--blue); }
.nav-item[href="#tickler"] svg.icon { color: var(--violet); }
.nav-item[href="#focus"] svg.icon { color: var(--amber); }

.nav-empty {
  display: block;
  padding: 3px 8px 3px 21px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 36px 30px;
  overflow: auto;
  background: var(--bg);
}

body.capture-route,
body.workflow-route,
body.perspective-route {
  background: var(--page-canvas);
}

body.capture-route .app-shell,
body.workflow-route .app-shell,
body.perspective-route .app-shell {
  background: var(--page-canvas);
}

body.capture-route .workspace {
  padding: 20px 12px 32px;
  background: var(--page-canvas);
}

body.workflow-route .workspace,
.workflow-page {
  background: var(--page-canvas);
}

body.workflow-route .workspace {
  padding: 36px clamp(20px, 3vw, 56px);
}

body.perspective-route .workspace,
.perspective-page {
  background: var(--page-canvas);
}

.page[data-current-page="inbox"] {
  max-width: none;
  min-height: calc(100vh - var(--topbar) - 52px);
}

.workspace:focus {
  outline: none;
}

.perspective-page { max-width: 1180px; }
.perspective-page.projects-page { max-width: none; }
.perspective-header { margin-bottom: 24px; }
.perspective-levels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 20px;
}
.perspective-levels button {
  min-height: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.perspective-levels button:last-child { border-right: 0; }
.perspective-levels button span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--surface-muted);
  font-size: 11px;
}
.perspective-levels button.active {
  color: var(--surface);
  background: var(--primary);
}
.perspective-levels button.active span {
  color: var(--primary);
  background: var(--surface);
}
.alignment-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 20px;
  padding: 13px 16px;
  margin-bottom: 20px;
  border: 1px solid #E7C77D;
  border-left: 4px solid var(--amber);
  background: #FFF9E9;
  color: #704E09;
}
.alignment-panel strong { display: flex; gap: 7px; align-items: center; }
.alignment-panel strong svg { width: 17px; }
.alignment-panel div { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.alignment-panel small { grid-column: 2; }
.perspective-content,
.relationship-browser {
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 20px;
}
.perspective-section-heading,
.relationship-browser > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.perspective-section-heading h2,
.relationship-browser h2 { margin: 0; font-size: 19px; }
.perspective-section-heading p,
.relationship-browser p { margin: 4px 0 0; color: var(--muted); }
.perspective-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.perspective-form label,
.perspective-filters label {
  display: grid;
  gap: 8px;
}
.perspective-form input,
.perspective-form select,
.perspective-form textarea,
.perspective-filters select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
}
.perspective-form textarea { resize: vertical; line-height: 1.5; }
.purpose-form textarea:first-of-type { font-size: 18px; }
.form-note { display: flex; align-items: center; gap: 7px; color: var(--green); }
.form-note svg { width: 17px; }
.purpose-form .primary-button { justify-self: end; }
.inline-editor {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  align-items: end;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.inline-form-actions { display: flex; gap: 8px; }
.perspective-row {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  min-height: 92px;
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid var(--line);
}
.perspective-row:last-child { border-bottom: 0; }
.perspective-color { align-self: stretch; }
.perspective-row h3 { margin: 0; font-size: 16px; }
.perspective-row p { margin: 5px 0; color: var(--muted); }
.relationship-count {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--link);
  text-decoration: underline;
}
.perspective-actions { display: flex; gap: 6px; }
.perspective-actions button {
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: 12px;
}
.perspective-actions .danger-link { color: var(--red); }
.perspective-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.relationship-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 18px 20px 24px;
}
.relationship-results > div { display: grid; gap: 7px; }
.relationship-results strong { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.relationship-results span { color: var(--muted); }
.purpose-view { max-width: 1050px; }
.purpose-statement-card {
  position: relative;
  min-height: 163px;
  padding: 28px 42px 58px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: var(--surface);
}
.purpose-statement-card > p {
  margin: 0;
  color: var(--text);
  font-size: clamp(16px, 1.8vw, 21px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
}
.purpose-statement-card > p.purpose-empty {
  color: #94A3B8;
  font-size: 18px;
}
.purpose-statement-card > textarea {
  width: 100%;
  min-height: 76px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(16px, 1.8vw, 21px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
}
.purpose-statement-card > textarea:focus-visible {
  outline: 0;
  caret-color: var(--primary);
}
.purpose-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.purpose-card-actions {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: flex;
  gap: 3px;
}
.purpose-card-actions .icon { width: 18px; height: 18px; }
.principles-section { margin-top: 92px; }
.principles-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
.principles-heading h2 {
  margin: 0;
  color: var(--heading);
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.principle-add {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748B;
}
.principle-add svg { width: 18px; height: 18px; }
.principles-divider {
  height: 1px;
  margin-top: 12px;
  background: #CBD5E1;
}
.principles-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.principles-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  height: 34px;
  padding: 2px 3px 2px 16px;
  border-bottom: 1px solid #E2E8F0;
  color: #475569;
}
.principles-list li > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.principles-list button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #94A3B8;
}
.principles-list button:hover { color: var(--red); }
.principles-list svg { width: 15px; height: 15px; }
.principles-empty { padding: 18px 16px; margin: 0; }
.principle-entry {
  height: 34px;
  padding: 0 16px;
}
.principle-entry input {
  width: 100%;
  height: 34px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #475569;
  font: inherit;
}
.principle-entry input:focus {
  outline: 0;
  caret-color: var(--primary);
}
.vision-editing-header { margin-bottom: 54px; }
.vision-view,
.vision-editor-view {
  max-width: 1050px;
}
.vision-list {
  margin-top: 24px;
  border-top: 1px solid #CBD5E1;
}
.vision-list.is-empty { border-top: 0; }
.vision-list-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid #E2E8F0;
}
.vision-item-main {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 14px 96px 14px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.vision-item-main:hover,
.vision-item-main:focus-visible {
  background: var(--bg);
  outline: 0;
}
.vision-item-main strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vision-item-main > span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vision-item-main small {
  color: var(--faint);
  text-transform: capitalize;
}
.vision-item-actions {
  position: absolute;
  right: 10px;
  display: flex;
  gap: 2px;
}
.vision-item-actions button {
  border: 0;
  background: transparent;
}
.vision-item-actions button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--faint);
}
.vision-item-actions button:hover:first-child { color: var(--primary); }
.vision-item-actions button:hover:last-child { color: var(--red); }
.vision-item-actions svg { width: 17px; height: 17px; }
.vision-add {
  margin-top: 14px;
}
.vision-empty {
  margin: 0;
  padding: 22px 16px;
  color: var(--faint);
}
.vision-form {
  display: grid;
  gap: 24px;
}
.vision-title-field {
  display: grid;
  gap: 8px;
}
.vision-title-field input,
.vision-form textarea {
  width: 100%;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.vision-title-field input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  color: #000000;
  font-weight: 400;
}
.vision-title-field input:focus,
.vision-form textarea:focus {
  outline: 0;
  box-shadow: none;
  caret-color: var(--primary);
}
.vision-description-field {
  display: grid;
  gap: 8px;
  margin-top: 0;
}
.vision-description-field > span[aria-hidden="true"] {
  display: block;
  width: 100%;
  height: 0.5px;
  background: #CBD5E1;
}
.vision-form textarea {
  min-height: 180px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}
.vision-form-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 0.5px solid #CBD5E1;
}
.goals-page {
  min-height: 100%;
  background: var(--surface);
}
.goals-view {
  width: 100%;
  max-width: 1050px;
  color: var(--text);
  font-weight: 400;
}
.shared-page-header {
  margin-bottom: 36px;
}
.shared-page-context {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.shared-page-context svg {
  width: 15px;
  height: 15px;
}
.shared-page-title {
  margin: 0;
  color: var(--heading);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
}
.shared-page-description {
  max-width: 720px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.shared-page-action {
  margin: 11px 0 0;
}
.shared-page-action:empty { display: none; }

.next-page {
  width: 100%;
  max-width: none;
  color: var(--text);
  font-weight: 400;
}

.next-page .shared-page-header {
  margin-bottom: 30px;
}

.next-page .shared-page-action {
  margin-top: 16px;
}

.next-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border-block: 1px solid var(--line);
}

.next-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 20px;
  border-inline-end: 1px solid var(--line);
}

.next-summary > div:first-child {
  padding-inline-start: 0;
}

.next-summary > div:last-child {
  border-inline-end: 0;
}

.next-summary strong {
  color: var(--heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}

.next-summary span {
  color: var(--muted);
  font-size: 12px;
}

.next-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.next-contexts,
.next-toolbar-actions,
.next-task-actions {
  display: flex;
  align-items: center;
}

.next-contexts {
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
}

.waiting-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.waiting-filter-dropdown {
  position: relative;
  display: inline-flex;
}

.waiting-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  max-width: 210px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
}

.waiting-filter-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waiting-filter-trigger svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

.waiting-filter-trigger:hover,
.waiting-filter-trigger:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.waiting-filter-trigger.active {
  border-color: var(--line);
  background: #FFFFFF;
  color: var(--heading);
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

.waiting-filter-menu {
  position: absolute;
  z-index: 35;
  inset-block-start: calc(100% + 5px);
  inset-inline-start: 0;
  display: grid;
  width: max-content;
  min-width: 180px;
  max-width: min(320px, 80vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
}

.waiting-filter-menu button {
  min-height: 32px;
  padding: 6px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waiting-filter-menu button:hover,
.waiting-filter-menu button:focus-visible,
.waiting-filter-menu button[aria-checked="true"] {
  background: var(--surface-muted);
  color: var(--heading);
}

.waiting-filter-menu-label {
  padding: 7px 8px 4px;
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
}

.next-context,
.next-icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.next-context {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
}

.next-context:hover,
.next-context:focus-visible,
.next-context.active {
  background: #FFF8F7;
  color: var(--primary);
}

.next-context.active {
  border-color: var(--line);
  background: #FFFFFF;
  color: var(--heading);
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

.next-no-context {
  width: 32px;
  padding: 0;
}

.next-no-context svg {
  width: 14px;
  height: 14px;
}

.next-toolbar-actions {
  position: relative;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
}

.next-icon-button {
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 4px;
}

.next-icon-button svg {
  width: 16px;
  height: 16px;
}

.next-icon-button:hover,
.next-icon-button:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.next-icon-button.active {
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--heading);
}

.next-view-buttons {
  display: inline-flex;
  margin-inline-start: 4px;
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--line);
}

.next-overflow-menu {
  position: absolute;
  z-index: 30;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 76px;
  width: 184px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
}

.next-overflow-menu button {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: start;
}

.next-overflow-menu button:hover,
.next-overflow-menu button:focus-visible {
  background: var(--surface-muted);
  color: var(--heading);
}

.next-overflow-menu svg,
.next-menu-check {
  width: 14px;
  height: 14px;
}

.next-statistics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
  border-block: 1px solid var(--line);
}

.next-statistics > div {
  display: grid;
  gap: 2px;
  padding: 10px 16px;
  border-inline-end: 1px solid var(--line);
}

.next-statistics > div:first-child { padding-inline-start: 8px; }
.next-statistics > div:last-child { border-inline-end: 0; }

.next-statistics strong {
  color: var(--heading);
  font-size: 17px;
  font-weight: 500;
}

.next-statistics span {
  color: var(--muted);
  font-size: 11px;
}

.next-list {
  border-top: 1px solid var(--capture-accent-border);
}

.next-task-list {
  border-top: 1px solid var(--line);
}

.next-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 8px 9px;
  border-bottom: 0;
}

.next-list-header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  font-weight: 400;
}

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

.next-list-header > span {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.logbook-page .shared-page-header { margin-bottom: 30px; }

.logbook-route .new-item-control { display: none; }

.logbook-toolbar { justify-content: flex-end; }
.logbook-toolbar .next-toolbar-actions { flex: 1 1 100%; }

.logbook-overflow-anchor { position: relative; display: inline-flex; margin-inline-start: auto; }
.logbook-overflow-menu { inset-inline-end: 0; }

.logbook-grouping-options {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.logbook-grouping-options button {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.logbook-grouping-options button:hover,
.logbook-grouping-options button:focus-visible { background: var(--surface-muted); color: var(--heading); }
.logbook-grouping-options button.active { background: var(--capture-accent-soft); color: var(--primary); }

.logbook-grouping-separator {
  color: var(--line-strong);
  pointer-events: none;
  user-select: none;
}

.logbook-groups {
  border-top: 1px solid var(--capture-accent-border);
}

.logbook-group { border-bottom: 1px solid var(--line); }

.logbook-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 46px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--heading);
  font: inherit;
  text-align: start;
}

.logbook-group-heading:hover,
.logbook-group-heading:focus-visible { background: var(--surface-muted); }

.logbook-group-heading > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logbook-group-heading strong { font-size: 14px; font-weight: 500; }
.logbook-group-heading > span:last-child { color: var(--faint); font-size: 11px; }
.logbook-group-heading svg { width: 14px; height: 14px; transition: transform 150ms ease; }
.logbook-group.is-collapsed .logbook-group-heading svg { transform: rotate(-90deg); }
[dir="rtl"] .logbook-group.is-collapsed .logbook-group-heading svg { transform: rotate(90deg); }

.logbook-task-list { border-top: 1px solid var(--line); }
.logbook-task-row .next-task-open { color: var(--muted); }
.canonical-task-list .logbook-task-row .task-row-check,
.canonical-task-list .logbook-task-row .task-row-check:checked {
  border: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E7D5B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  box-shadow: none;
}
.canonical-task-list .logbook-task-row:hover .task-row-check,
.canonical-task-list .logbook-task-row .task-row-check:focus-visible { background-color: var(--surface-muted); }

.logbook-standalone {
  color: var(--faint);
  font-size: 11px;
}

.logbook-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 72px 20px;
  color: var(--muted);
  text-align: center;
}
.logbook-empty > svg { width: 28px; height: 28px; color: var(--faint); }
.logbook-empty h2 { margin: 4px 0 0; color: var(--heading); font-size: 16px; font-weight: 500; }
.logbook-empty p { max-width: 390px; margin: 0; font-size: 13px; }

.next-task-row {
  transition: background-color 150ms ease;
}

.next-task-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 33px;
  padding: 2px 0;
}

.next-task-row:hover,
.next-task-row:focus-within {
  background: var(--surface-muted);
}

.next-task-content {
  min-width: 0;
}

.next-focus {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #A8B0BA;
}

.next-focus svg { width: 15px; height: 15px; }
.next-focus.active { color: #E9B000; }
.next-focus.active svg { fill: currentColor; }

.next-title-line {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.next-task-open {
  margin: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
  text-align: start;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  line-height: 1.2;
}

.next-task-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.next-task-meta > span { white-space: nowrap; }

.next-description {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-title-line > .next-notes-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #B7C2CC;
  cursor: pointer;
}

.next-title-line > .next-notes-icon:hover { color: var(--primary); }

.next-notes-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.75;
}

.next-project {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-project:hover,
.next-project:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--capture-accent-border);
  text-underline-offset: 2px;
}

.waiting-for-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-empty {
  margin: 0;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.next-project-group + .next-project-group {
  margin-top: 12px;
}

.waiting-page {
  width: 100%;
  max-width: none;
  color: var(--text);
  font-weight: 400;
}

.waiting-page .shared-page-header {
  margin-bottom: 30px;
}

.waiting-page .shared-page-action {
  margin-top: 16px;
}

.waiting-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border-block: 1px solid var(--line);
}

.waiting-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 20px;
  border-inline-end: 1px solid var(--line);
}

.waiting-summary > div:first-child {
  padding-inline-start: 0;
}

.waiting-summary > div:last-child {
  border-inline-end: 0;
}

.waiting-summary strong {
  color: var(--heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}

.waiting-summary span {
  color: var(--muted);
  font-size: 12px;
}

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

.waiting-filters,
.waiting-row-actions {
  display: flex;
  align-items: center;
}

.waiting-filters {
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.waiting-filter,
.waiting-tool-button,
.waiting-action,
.waiting-more {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.waiting-filter {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.waiting-filter:hover,
.waiting-filter:focus-visible,
.waiting-filter.active {
  background: #FFF8F7;
  color: var(--primary);
}

.waiting-filter.active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.waiting-tool-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.waiting-tool-button svg,
.waiting-more svg {
  width: 16px;
  height: 16px;
}

.waiting-tool-button:hover,
.waiting-tool-button:focus-visible,
.waiting-more:hover,
.waiting-more:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.waiting-list {
  border-top: 1px solid var(--line);
}

.waiting-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 10px 12px;
  border-bottom: 1px solid var(--line);
}

.waiting-list-header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  font-weight: 400;
}

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

.waiting-list-header > span {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.waiting-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 86px;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease;
}

.waiting-row:hover,
.waiting-row:focus-within {
  background: var(--surface-muted);
}

.waiting-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #F1F6FA;
  color: var(--muted);
  font-size: 10px;
}

.waiting-content {
  min-width: 0;
}

.waiting-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.waiting-title-line h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.waiting-star {
  flex: 0 0 auto;
  color: var(--primary);
}

.waiting-star svg {
  width: 14px;
  height: 14px;
  fill: #FFF8F7;
}

.waiting-content > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.waiting-content > p strong {
  color: var(--text);
  font-weight: 400;
}

.waiting-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.waiting-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.waiting-meta svg {
  width: 13px;
  height: 13px;
}

.waiting-status {
  color: var(--green);
}

.waiting-status.is-soon { color: var(--amber); }
.waiting-status.is-due,
.waiting-status.is-overdue { color: var(--red); }

.waiting-row-actions {
  gap: 3px;
}

.waiting-action {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.waiting-action:hover,
.waiting-action:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.waiting-more {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 4px;
}

.scheduled-page {
  width: 100%;
  max-width: none;
  color: var(--text);
  font-weight: 400;
}

.scheduled-page .shared-page-header {
  margin-bottom: 30px;
}

.scheduled-page .shared-page-action {
  margin-top: 16px;
}

.scheduled-groups {
  border-top: 1px solid var(--capture-accent-border);
}

.scheduled-actions-header {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.scheduled-overflow-menu {
  inset-inline-end: 0;
}

.scheduled-group + .scheduled-group {
  margin-top: 20px;
}

.scheduled-task-body {
  grid-template-columns: minmax(0, 1fr);
}

.scheduled-date-badge {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 3px 7px;
  border: 1px solid #DDE3EA;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.scheduled-date-badge.is-overdue {
  border-color: #F0C8C8;
  background: #FFF5F5;
  color: #B54747;
}

.someday-page {
  width: 100%;
  max-width: 1080px;
  color: var(--text);
  font-weight: 400;
}

.someday-page .shared-page-header { margin-bottom: 30px; }
.someday-page .shared-page-action { margin-top: 16px; }

.someday-page .next-statistics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.someday-overflow-menu {
  inset-inline-end: 0;
}

.someday-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border-block: 1px solid var(--line);
}

.someday-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 20px;
  border-inline-end: 1px solid var(--line);
}

.someday-summary > div:first-child { padding-inline-start: 0; }
.someday-summary > div:last-child { border-inline-end: 0; }

.someday-summary strong {
  color: var(--heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
}

.someday-summary span {
  color: var(--muted);
  font-size: 12px;
}

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

.someday-filters,
.someday-row-actions {
  display: flex;
  align-items: center;
}

.someday-filters {
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.someday-filter,
.someday-tool-button,
.someday-action,
.someday-more {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.someday-filter {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.someday-filter:hover,
.someday-filter:focus-visible,
.someday-filter.active {
  background: #FFF8F7;
  color: var(--primary);
}

.someday-filter.active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.someday-tool-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.someday-tool-button svg,
.someday-more svg {
  width: 16px;
  height: 16px;
}

.someday-tool-button:hover,
.someday-tool-button:focus-visible,
.someday-more:hover,
.someday-more:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.someday-list {
  border-top: 1px solid var(--line);
}

.someday-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 10px 12px;
  border-bottom: 1px solid var(--line);
}

.someday-list-header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  font-weight: 400;
}

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

.someday-list-header > span {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.someday-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 74px;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease;
}

.someday-row:hover,
.someday-row:focus-within {
  background: var(--surface-muted);
}

.someday-kind {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--faint);
}

.someday-kind svg {
  width: 17px;
  height: 17px;
}

.someday-row.is-project .someday-kind {
  color: var(--primary);
}

.someday-content {
  min-width: 0;
}

.someday-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.someday-content h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.someday-star {
  flex: 0 0 auto;
  color: var(--primary);
}

.someday-star svg {
  width: 14px;
  height: 14px;
  fill: #FFF8F7;
}

.someday-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.someday-meta > span:not(.someday-review)::before {
  content: "·";
  margin-inline-end: 12px;
  color: var(--line-strong);
}

.someday-review { color: var(--green); }
.someday-review.is-soon { color: var(--amber); }
.someday-review.is-due { color: var(--red); }

.someday-row-actions {
  gap: 3px;
}

.someday-action {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.someday-action:hover,
.someday-action:focus-visible,
.someday-action.is-primary {
  background: #FFF8F7;
  color: var(--primary);
}

.someday-more {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 4px;
}

.perspective-page .perspective-action-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #CBD5E1;
  opacity: 1;
}
.perspective-page .perspective-action-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.perspective-page .perspective-action-icon:hover,
.perspective-page .perspective-action-icon:focus-visible,
.perspective-page .perspective-action-icon.is-achieved,
.perspective-page .perspective-action-icon.is-disabled {
  background: transparent;
  color: var(--primary);
  opacity: 1;
}
.goals-filter {
  display: grid;
  grid-template-columns: auto 210px;
  align-items: center;
  justify-content: start;
  gap: 10px;
  margin-bottom: 14px;
}
.goals-filter select {
  width: 210px;
  min-height: 34px;
  padding: 6px 30px 6px 9px;
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.goals-filter select option:hover,
.goals-filter select option:focus,
.goals-filter select option:checked {
  background: var(--primary);
  color: #FFFFFF;
}
.goal-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.goal-group-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: transform 120ms ease, color 120ms ease;
}
.goal-group-toggle:hover svg,
.goal-group-toggle:focus-visible svg {
  color: var(--primary);
}
.goal-group-toggle.is-collapsed svg {
  transform: rotate(-90deg);
}
.goal-group-divider {
  width: 100%;
  height: 1px;
  background: #E2E8F0;
}
.goal-list {
  width: 100%;
}
.goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-height: 62px;
  border-bottom: 1px solid #E2E8F0;
}
.goal-row-content {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px 16px 10px 8px;
  border: 0;
  background: transparent;
  text-align: left;
}
.goal-row-content:hover h2,
.goal-row-content:focus-visible h2 {
  color: var(--primary);
}
.goal-row-content h2 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-row-content p {
  overflow: hidden;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-completion-column {
  display: grid;
  place-items: center;
}
.goal-completion-column button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #CBD5E1;
}
.goal-completion-column button:hover,
.goal-completion-column button:focus-visible {
  color: var(--primary);
}
.goal-completion-column button.is-achieved {
  color: var(--primary);
}
.goal-completion-column svg {
  width: 18px;
  height: 18px;
}
.goal-achieved-section {
  margin-top: 42px;
}
.goals-filter-empty {
  margin: 0;
  padding: 16px 8px;
  border-bottom: 1px solid #E2E8F0;
}
.goal-achieved-empty {
  margin: 0;
  padding: 12px 23px;
}
.goal-editor-view {
  width: 100%;
  max-width: 1050px;
}
.goal-form {
  display: grid;
  gap: 24px;
}
.goal-form label {
  display: grid;
  gap: 8px;
}
.goal-title-field input,
.goal-form select,
.goal-form input[type="date"],
.goal-form textarea {
  width: 100%;
  color: #000000;
  font-weight: 400;
}
.goal-title-field input,
.goal-form select,
.goal-form input[type="date"] {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  background: var(--surface);
}
.goal-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.45fr);
  gap: 18px;
}
.goal-date-field {
  position: relative;
  display: block;
}
.goal-date-placeholder {
  display: none;
}
.goal-date-field.is-empty .goal-date-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 9px 42px 9px 12px;
  color: var(--faint);
  pointer-events: none;
}
.goal-date-field.is-empty:focus-within .goal-date-placeholder {
  display: none;
}
.goal-date-field.is-empty input:not(:focus) {
  color: transparent;
}
.goal-date-field.is-empty input:not(:focus)::-webkit-datetime-edit {
  color: transparent;
}
.goal-description-field textarea {
  min-height: 160px;
  padding: 12px;
  border: 0;
  border-top: 0.5px solid #CBD5E1;
  border-bottom: 0.5px solid #CBD5E1;
  border-radius: 0;
  background: transparent;
  line-height: 1.5;
  outline: 0;
  resize: vertical;
}
.goal-title-field input:focus,
.goal-form select:focus,
.goal-form input[type="date"]:focus,
.goal-description-field textarea:focus {
  outline: 0;
  box-shadow: none;
  border-color: var(--primary);
}
.goal-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.goal-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin-left: auto;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 400;
}
.goal-delete svg {
  width: 16px;
  height: 16px;
}
.areas-page {
  min-height: 100%;
  background: var(--surface);
}
.areas-view {
  width: 100%;
  max-width: 1050px;
  color: var(--text);
  font-weight: 400;
}
.area-list {
  width: 100%;
}
.area-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-height: 62px;
  border-bottom: 1px solid #E2E8F0;
}
.area-row-content {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 10px 16px 10px 8px;
  border: 0;
  background: transparent;
  text-align: left;
}
.area-row-content:hover h2,
.area-row-content:focus-visible h2 {
  color: var(--primary);
}
.area-row-content h2 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.area-row-content p {
  overflow: hidden;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.area-control-column {
  display: grid;
  place-items: center;
}
.area-control-column button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #CBD5E1;
}
.area-control-column button:hover,
.area-control-column button:focus-visible,
.area-control-column button.is-disabled {
  color: var(--primary);
}
.area-control-column svg {
  width: 18px;
  height: 18px;
}
.area-disabled-section {
  margin-top: 42px;
}
.area-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.area-section-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: transform 120ms ease, color 120ms ease;
}
.area-section-toggle:hover svg,
.area-section-toggle:focus-visible svg {
  color: var(--primary);
}
.area-section-toggle.is-collapsed svg {
  transform: rotate(-90deg);
}
.area-section-divider {
  width: 100%;
  height: 1px;
  background: #E2E8F0;
}
.areas-empty,
.areas-disabled-empty {
  margin: 0;
  padding: 14px 8px;
  border-bottom: 1px solid #E2E8F0;
}
.area-editor-view {
  width: 100%;
  max-width: 1050px;
}
.area-form {
  display: grid;
  gap: 24px;
}
.area-form label {
  display: grid;
  gap: 8px;
}
.area-name-field input,
.area-form textarea {
  width: 100%;
  color: #000000;
  font-weight: 400;
}
.area-name-field input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 2px;
  background: var(--surface);
}
.area-description-field textarea {
  min-height: 160px;
  padding: 12px;
  border: 0;
  border-top: 0.5px solid #CBD5E1;
  border-bottom: 0.5px solid #CBD5E1;
  border-radius: 0;
  background: transparent;
  line-height: 1.5;
  outline: 0;
  resize: vertical;
}
.area-name-field input:focus,
.area-description-field textarea:focus {
  outline: 0;
  box-shadow: none;
  border-color: var(--primary);
}
.area-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perspective-project,
.perspective-action {
  display: grid;
  gap: 20px;
  align-items: center;
  min-height: 92px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.perspective-project {
  grid-template-columns: minmax(0, 1fr) minmax(210px, 300px);
  border-left: 4px solid var(--line-strong);
}
.perspective-action {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}
.perspective-project:last-child,
.perspective-action:last-child { border-bottom: 0; }
.perspective-project h3,
.perspective-action h3 { margin: 0 0 8px; font-size: 16px; }
.perspective-action p { margin: 0 0 7px; color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; gap: 6px; }
.project-links span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}
.project-progress { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; align-items: center; }
.project-progress strong { grid-row: 1 / 3; font-size: 20px; color: var(--green); }
.project-progress > span { color: var(--muted); font-size: 12px; }
.project-progress .progress { height: 5px; }
.inline-warning { margin: 8px 0 0; color: var(--amber); font-size: 12px; font-weight: 700; }

.page {
  max-width: 1480px;
  margin: 0;
}

.page.workflow-page:is(.focus-page, .next-page, .waiting-page, .scheduled-page, .tickler-page, .someday-page, .logbook-page, .reference-page) {
  width: 100%;
  max-width: none;
}

.reference-item-row {
  grid-template-columns: minmax(0, 1fr);
}

.reference-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
}

.reference-search label {
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  max-width: 720px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.reference-search label .icon { width: 17px; height: 17px; color: var(--muted); }
.reference-search input { width: 100%; border: 0; outline: 0; padding: 8px; background: transparent; }

.reference-attachment-links { display: grid; gap: 5px; margin-top: 10px; }
.reference-attachment-links a { display: flex; align-items: center; gap: 7px; color: var(--primary); text-decoration: none; }
.reference-attachment-links .icon { width: 15px; height: 15px; }
.reference-attachment-links small { color: var(--muted); text-transform: capitalize; }

.reference-form { display: grid; gap: 18px; max-width: 980px; }
.reference-form .form-label { display: grid; gap: 8px; }
.reference-form input,
.reference-form textarea,
.reference-form select { width: 100%; border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; background: var(--surface); color: var(--text); font: inherit; }
.reference-form input:focus,
.reference-form input:focus-visible,
.reference-form textarea:focus,
.reference-form textarea:focus-visible,
.reference-form select:focus,
.reference-form select:focus-visible {
  border-color: var(--primary);
  outline: 0;
  box-shadow: none;
}
.reference-form textarea { resize: vertical; }
.reference-form .reference-tags-field,
.reference-form .reference-folder-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
}
.reference-tags-field .icon,
.reference-folder-field .icon { flex: 0 0 auto; width: 17px; height: 17px; color: var(--muted); }
.reference-form .reference-tags-field input { min-width: 0; padding-inline: 0; border: 0; background: transparent; }
.reference-form .reference-folder-field select { min-width: 0; flex: 1 1 auto; padding-inline: 0; border: 0; background: transparent; }
.reference-form .reference-folder-field input { min-width: 120px; flex: 1 1 45%; padding-block: 6px; border-width: 0 0 0 1px; }
.reference-form .reference-tags-field:focus-within,
.reference-form .reference-folder-field:focus-within { border-color: var(--primary); }
.reference-form .reference-tags-field input:focus,
.reference-form .reference-tags-field input:focus-visible,
.reference-form .reference-folder-field select:focus,
.reference-form .reference-folder-field select:focus-visible { border: 0; outline: 0; box-shadow: none; }
.reference-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.reference-attachments-editor { display: grid; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.reference-attachments-editor > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.reference-attachments-editor h2 { margin: 0 0 4px; font-size: 16px; }
.reference-attachments-editor p { margin: 0; color: var(--muted); font-size: 12px; }
.reference-attachment-editor { display: grid; grid-template-columns: minmax(130px, .4fr) minmax(220px, 1.3fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; padding: 12px; border: 1px solid var(--line); }
.reference-attachment-editor legend { padding: 0 5px; color: var(--muted); font-size: 12px; }
.reference-form-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.reference-form-actions .danger { margin-left: auto; color: var(--danger); }
.reference-form-status { min-height: 20px; margin: 0; color: var(--danger); }

@media (max-width: 760px) {
  .reference-search { flex-wrap: wrap; }
  .reference-form-grid,
  .reference-attachment-editor { grid-template-columns: 1fr; }
  .reference-attachments-editor > header { align-items: stretch; flex-direction: column; }
}

.focus-state-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 64px;
}

.page-header.quiet {
  margin-bottom: 62px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--warm);
  font-weight: 760;
  font-size: 12px;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--heading);
}

.page-subtitle {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.35;
}

.header-actions,
.toolbar,
.filter-row,
.page-tabs,
.task-meta,
.card-actions,
.pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel,
.task-list,
.detail-card,
.empty-state,
.project-card,
.reference-card,
.state-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.panel {
  padding: 16px;
}

.panel h2,
.detail-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--orange);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
}

.filter-row {
  margin-bottom: 12px;
}

.chip,
.status-chip,
.tab,
.mini-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 680;
}

.chip.active,
.tab.active {
  border-color: var(--line-strong);
  background: var(--line-strong);
  color: var(--text);
}

.status-chip.green { color: var(--green); background: #eaf7f1; border-color: #b8e4d1; }
.status-chip.amber { color: var(--amber); background: #fff4df; border-color: #f0cf94; }
.status-chip.red { color: var(--red); background: #fff0ee; border-color: #f0beb9; }
.status-chip.violet { color: var(--violet); background: #f3f1ff; border-color: #d5cef9; }

.task-list {
  overflow: hidden;
}

.task-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--bg); }

.check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}

.task-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-weight: 760;
  line-height: 1.35;
}

.task-title span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.starred { color: var(--orange); }

.icon-button,
.primary-button,
.secondary-button,
.ghost-button {
  min-height: 34px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 760;
}

.icon-button {
  position: relative;
  width: 34px;
  padding: 0;
  background: rgba(255,255,255,0.15);
  color: inherit;
}

.icon-button:hover { background: rgba(255,255,255,0.25); }
.workspace .icon-button,
.quick-add .icon-button,
.side-panel .icon-button {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.primary-button {
  padding: 0 13px;
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.primary-button:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: var(--surface);
}
.secondary-button {
  padding: 0 12px;
  background: var(--surface);
  color: var(--sky-strong);
  border-color: var(--sky);
}
.ghost-button {
  padding: 0 11px;
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.notification-dot {
  width: 8px;
  height: 8px;
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffcf4a;
  border-radius: 50%;
}

.notification-dot.inline {
  position: static;
  width: 4px;
  height: 4px;
  background: var(--highlight);
}

.detail-stack {
  display: grid;
  gap: 12px;
}

.detail-card {
  padding: 16px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  color: var(--muted);
}

.project-grid,
.reference-grid,
.state-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card,
.reference-card,
.state-card {
  padding: 16px;
}

.project-card h3,
.reference-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--heading);
}

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

.state-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.state-card-heading,
.state-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.state-card-heading h2 {
  margin: 0;
  font-size: 16px;
}

.state-card p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.state-card-footer {
  justify-content: space-between;
  margin-top: auto;
}

.state-icon {
  color: var(--orange);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.project-card p,
.reference-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.progress {
  height: 8px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--moss);
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 28px;
}

.empty-state h2 {
  margin: 0;
  font-size: 20px;
  color: var(--heading);
}

.empty-state p {
  margin: 0;
  max-width: 620px;
}

.capture-inbox {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px;
  background: #fff;
}

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

.capture-list-label {
  display: block;
  padding: 8px 4px 7px;
}

.capture-quick-add-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  border-top: 1px solid var(--quick-add-line);
  background: var(--surface);
}

.canonical-task-list + .capture-quick-add .capture-quick-add-row {
  border-top: 0;
}

.capture-task-list li:last-child {
  border-bottom-color: var(--quick-add-line);
}

.canonical-task-list .task-row-check {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236F8BA4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.1 2.182a10 10 0 0 1 3.8 0'/%3E%3Cpath d='M13.9 21.818a10 10 0 0 1-3.8 0'/%3E%3Cpath d='M17.609 3.721a10 10 0 0 1 2.69 2.7'/%3E%3Cpath d='M2.182 13.9a10 10 0 0 1 0-3.8'/%3E%3Cpath d='M20.279 17.609a10 10 0 0 1-2.7 2.69'/%3E%3Cpath d='M21.818 10.1a10 10 0 0 1 0 3.8'/%3E%3Cpath d='M3.721 6.391a10 10 0 0 1 2.7-2.69'/%3E%3Cpath d='M6.391 20.279a10 10 0 0 1-2.69-2.7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
}

.canonical-task-list .task-row-check:hover {
  background-color: var(--surface-muted);
}

.canonical-task-list .task-row-check:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.canonical-task-list .task-row-check:checked {
  border: 2px solid var(--primary);
  border-color: var(--primary);
  background-image: none;
  background: var(--primary);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.canonical-task-list .task-row-check:disabled {
  border-color: var(--disabled-text);
  background: var(--disabled-bg);
}

.capture-quick-add-check {
  position: relative;
  width: 48px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--quick-add-muted);
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}

.capture-quick-add-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.capture-quick-add-check:hover {
  color: var(--muted);
}

.capture-quick-add-check:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 50%;
}

.capture-quick-add-check:disabled .icon {
  color: var(--disabled-text);
}

.capture-quick-add-row input[name="title"] {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.capture-quick-add-row input[name="title"]::placeholder {
  color: var(--quick-add-muted);
  opacity: 1;
}

.capture-quick-add-row:focus-within {
  box-shadow: inset 3px 0 var(--primary);
  background: var(--surface);
}

.canonical-task-list .task-list-row:focus-within {
  box-shadow: inset 3px 0 var(--primary);
  background: var(--surface-muted);
}

.capture-quick-add-row input[name="title"]:disabled {
  background: transparent;
}

.capture-quick-add-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin-right: 7px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--surface);
  font-size: 12px;
  font-weight: 400;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

.capture-quick-add-row:focus-within .capture-quick-add-save {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.capture-quick-add-save:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.capture-quick-add-save .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.capture-quick-add-save:disabled {
  opacity: 1;
}

.capture-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 70px 20px;
  color: var(--muted);
  text-align: center;
}

.canonical-task-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.canonical-task-list .task-list-row {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 34px;
  border-bottom: 1px solid var(--line);
}

.capture-task-open {
  display: grid;
  align-content: center;
  gap: 1px;
  min-height: 33px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.capture-task-open small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}
.project-detail-task-list .task-list-row.is-completed .task-row-check,
.project-detail-task-list .task-list-row.is-completed .task-row-check:checked {
  border-color: #94A3B8;
  background: transparent;
  box-shadow: none;
}
.project-detail-task-list .task-list-row.is-completed .task-row-check:hover,
.project-detail-task-list .task-list-row.is-completed .task-row-check:focus-visible { border-color: #64748B; }
.project-detail-task-list .task-list-row.is-completed .capture-task-open,
.project-detail-task-list .task-list-row.is-completed .capture-task-open small,
.project-detail-task-list .task-list-row.is-completed .task-important {
  color: var(--muted);
}
.project-detail-task-list .task-list-row.is-completed:focus-within {
  box-shadow: inset 3px 0 #94A3B8;
  background: var(--surface-muted);
}
.project-detail-task-list .task-list-row.is-completed .capture-task-open:hover,
.project-detail-task-list .task-list-row.is-completed .capture-task-open:focus-visible {
  color: #64748B;
}
.task-important { margin-right: 7px; color: #f2b705; }

.capture-editor-star {
  color: var(--line-strong);
  line-height: 1;
}

.capture-editor-star svg {
  width: 19px;
  height: 19px;
  fill: none;
}

button.capture-editor-star {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.capture-editor-star.active { color: #f2b705; }
.capture-editor-star.active svg { fill: currentColor; }

.capture-editor {
  padding: 30px 52px;
  border: 0;
  background: #fff;
}

.verify-page .capture-editor,
.edit-action-page .capture-editor {
  padding-inline: 0;
}

.actionable-workflow {
  padding: 0 0 30px;
}

.actionable-task {
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
  padding: 15px 18px;
  border: 0;
  border-block: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.actionable-task > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.actionable-task p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.actionable-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.actionable-heading > span {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--capture-accent-soft);
  color: var(--primary);
}

.actionable-heading svg {
  width: 19px;
  height: 19px;
}

.actionable-heading h2 {
  margin: 0 0 4px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
}

.actionable-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.actionable-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: start;
  gap: 18px;
}

.tickler-page {
  width: 100%;
  max-width: none;
  color: var(--text);
  font-weight: 400;
}

.tickler-page .shared-page-header { margin-bottom: 30px; }
.tickler-page .shared-page-action { margin-top: 16px; }

.tickler-page .next-statistics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tickler-overflow-menu {
  inset-inline-end: 0;
}

.tickler-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border-block: 1px solid var(--line);
}

.tickler-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 20px;
  border-inline-end: 1px solid var(--line);
}

.tickler-summary > div:first-child { padding-inline-start: 0; }
.tickler-summary > div:last-child { border-inline-end: 0; }

.tickler-summary strong {
  overflow: hidden;
  color: var(--heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tickler-summary span {
  color: var(--muted);
  font-size: 12px;
}

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

.tickler-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tickler-filter,
.tickler-tool-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}

.tickler-filter {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.tickler-filter:hover,
.tickler-filter:focus-visible,
.tickler-filter.active {
  background: #FFF8F7;
  color: var(--primary);
}

.tickler-filter.active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.tickler-tool-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.tickler-tool-button svg {
  width: 16px;
  height: 16px;
}

.tickler-tool-button:hover,
.tickler-tool-button:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}

.tickler-list {
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.tickler-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 10px 12px;
  border-bottom: 1px solid var(--line);
}

.tickler-list-header h2 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  font-weight: 400;
}

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

.tickler-list-header > span {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.tickler-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.tickler-open {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tickler-open:hover,
.tickler-open:focus-visible {
  background: var(--surface-muted);
  outline: 0;
}

.tickler-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--primary);
  color: var(--primary);
  font-size: 12px;
}

.tickler-date .icon {
  width: 17px;
  height: 17px;
}

.tickler-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tickler-copy b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.tickler-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
}

.tickler-actions .icon-button {
  color: var(--muted);
}

.tickler-reschedule input {
  width: 132px;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.tickler-reschedule input:focus {
  border-color: var(--primary);
  outline: 2px solid var(--capture-accent-soft);
}

.tickler-empty {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 32px 10px;
  color: var(--muted);
}

.tickler-empty > svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.tickler-empty h2 {
  margin: 0;
  color: var(--heading);
  font-size: 15px;
  font-weight: 400;
}

.tickler-empty p {
  max-width: 560px;
  margin: 0;
  font-size: 12px;
}

.actionable-group {
  display: grid;
  align-content: start;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(59, 86, 110, 0.07);
}

.actionable-group > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.actionable-group > header > span {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--primary);
}

.actionable-group > header svg {
  width: 17px;
  height: 17px;
}

.actionable-group h3 {
  margin: 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 400;
}

.actionable-options {
  display: grid;
}

.actionable-option {
  display: grid;
  gap: 11px;
  min-height: 68px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.actionable-option:last-child {
  border-bottom: 0;
}

.actionable-option-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.actionable-option-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted);
}

.actionable-option-icon svg {
  width: 17px;
  height: 17px;
}

.actionable-option-summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.actionable-options b {
  color: var(--heading);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.actionable-options small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.actionable-option-actions {
  display: flex;
  gap: 8px;
  padding-left: 45px;
}

.actionable-option-actions button {
  min-height: 30px;
  padding: 6px 14px;
  font-size: 12px;
}

.actionable-cancel {
  margin-top: 18px;
  min-width: 92px;
}

.verify-page .capture-title,
.edit-action-page .capture-title {
  position: relative;
  display: block;
}

.verify-page .capture-editor-star,
.edit-action-page .capture-editor-star {
  position: absolute;
  inset-inline-start: -25px;
  top: 50%;
  transform: translateY(-50%);
}

.verify-page .capture-tags,
.edit-action-page .capture-tags {
  margin: 0 0 11px;
}

.verify-page .capture-description,
.verify-page .capture-form,
.edit-action-page .capture-description,
.edit-action-page .capture-form {
  margin-inline: 0;
}

.capture-title {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 11px;
}

.capture-title.is-focus-disabled {
  grid-template-columns: minmax(0, 1fr);
}

.capture-title-field {
  width: 100%;
  height: 43px;
  padding: 0 10px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: 14px;
  outline: 0;
  appearance: none;
}

.capture-title-field::placeholder,
.capture-description textarea::placeholder {
  color: var(--faint);
  opacity: 1;
}

.capture-title-field:focus,
.capture-title-field:focus-visible,
.capture-description textarea:focus,
.capture-description textarea:focus-visible {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
}

.capture-description {
  display: block;
  margin-left: 27px;
}

.capture-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 39px;
  margin: 0 0 11px 27px;
  padding: 5px 8px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  cursor: text;
}

.capture-tags input {
  flex: 1 1 120px;
  min-width: 90px;
  height: 27px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.capture-tags:focus-within {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
}

.capture-tags input:focus,
.capture-tags input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.capture-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 25px;
  padding: 2px 4px 2px 9px;
  border: 1px solid #DDE3EA;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.capture-context-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-context-chip button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.capture-context-chip button:hover,
.capture-context-chip button:focus-visible {
  background: #E8EDF2;
  color: var(--heading);
}

.capture-context-chip button svg {
  width: 11px;
  height: 11px;
}

.capture-context-chip.is-selected {
  border-color: var(--primary);
  background: #FFF8F7;
  box-shadow: 0 0 0 1px var(--primary);
}

.capture-description textarea {
  display: block;
  width: 100%;
  min-height: 200px;
  padding: 11px 10px;
  border: 1px solid #EEEEEE;
  border-radius: 4px 4px 0 0;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  outline: 0;
  resize: vertical;
}

.capture-form {
  position: relative;
  display: grid;
  gap: 0;
  max-width: none;
  margin-left: 27px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.capture-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0;
  border: 1px solid #EEEEEE;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: var(--surface-muted);
}

.capture-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

.capture-tabs button .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.capture-tabs button.active {
  background: #FFF8F7;
  color: var(--primary);
}

.capture-tabs button.capture-date-invalid {
  background: #FFF8F7;
  color: var(--primary);
}

.capture-tabs button:hover {
  background: var(--nav-hover);
  color: var(--capture-accent-strong);
}

.capture-tabs button:disabled,
.capture-tabs button:disabled:hover {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
  opacity: 0.72;
}

.capture-tabs button:disabled svg {
  color: var(--disabled-text);
}

.capture-context-control,
.capture-waiting-for-control {
  display: flex;
  align-items: center;
  flex: 0 1 168px;
  width: 168px;
  min-width: min(140px, 100%);
  max-width: 100%;
  padding: 4px 0;
}

@media (max-width: 560px) {
  .capture-context-control,
  .capture-waiting-for-control {
    flex: 1 1 168px;
    width: auto;
  }
}

.capture-context-control input,
.capture-waiting-for-control input {
  width: 168px;
  max-width: 100%;
}

.capture-context-control input,
.capture-waiting-for-control input {
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #DDE3EA;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: 0;
}

.capture-tabs .capture-context-display,
.capture-tabs .capture-waiting-display {
  width: 100%;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0 9px;
  border: 1px solid #DDE3EA;
  border-radius: 4px;
  background: #F7FAFD;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-tabs .capture-context-display {
  width: auto;
  max-width: min(220px, 100%);
  background: var(--capture-accent-soft);
  border-color: var(--capture-accent-border);
  color: var(--capture-accent-strong);
}

.capture-context-control:has(.capture-context-display:not([hidden])) {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
}

.capture-tabs .capture-context-display:hover,
.capture-tabs .capture-context-display:focus-visible,
.capture-tabs .capture-waiting-display:hover,
.capture-tabs .capture-waiting-display:focus-visible {
  border-color: var(--primary);
  background: #F7FAFD;
  color: var(--text);
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
  outline: 0;
}

.capture-context-control [hidden],
.capture-waiting-for-control [hidden] {
  display: none;
}

.capture-context-control input::placeholder,
.capture-waiting-for-control input::placeholder {
  color: var(--faint);
  opacity: 1;
}

.capture-context-control input:focus,
.capture-context-control input:focus-visible,
.capture-waiting-for-control input:focus,
.capture-waiting-for-control input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
}

.capture-detail {
  min-height: 0;
  padding: 16px 6px;
  color: var(--muted);
}
.capture-popup {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: min(310px, calc(100vw - 40px));
  padding: 8px 0;
}
.capture-project-state .capture-time-menu,
.capture-status-state .capture-time-menu {
  max-height: 260px;
  overflow-y: auto;
}
.capture-project-menu {
  position: relative;
  overflow: visible !important;
}
.capture-project-menu .capture-project-group {
  grid-template-columns: 18px 1fr auto;
}
.capture-project-chevron {
  color: var(--faint);
  font-size: 18px;
  line-height: 1;
}
.capture-project-submenu {
  position: absolute;
  top: -5px;
  left: calc(100% + 6px);
  width: min(260px, calc(100vw - 40px));
  max-height: 260px;
  overflow-y: auto;
}
.capture-project-submenu.opens-left {
  right: calc(100% + 6px);
  left: auto;
}
.capture-popup.is-up .capture-project-submenu {
  top: auto;
  bottom: -5px;
}
.capture-project-empty {
  margin: 0;
  padding: 9px 10px;
  color: var(--faint);
  font-size: 12px;
}

.capture-project-add-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.capture-project-add-option {
  color: var(--muted) !important;
}

.capture-project-add-option:hover,
.capture-project-add-option:focus-visible {
  color: var(--primary) !important;
}

.capture-project-add-option .icon {
  width: 15px;
  height: 15px;
}

.capture-project-quick-add {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.capture-project-quick-add label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.capture-project-quick-add input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: 0;
}

.capture-project-quick-add input:focus {
  border-color: var(--capture-accent-border);
  box-shadow: 0 0 0 2px var(--capture-accent-soft);
}

.capture-project-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.capture-project-quick-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.capture-file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.capture-file-picker button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
}
.capture-file-picker button:hover,
.capture-file-picker button:focus-visible {
  border-color: var(--capture-accent-border);
  background: #FFF8F7;
  color: var(--primary);
}

.google-drive-picker {
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.google-drive-picker header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.google-drive-picker header strong {
  flex: 1;
  color: var(--text);
  font-size: 14px;
}

.google-drive-picker header button,
.google-drive-picker > button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.google-drive-file-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.google-drive-file-list li {
  border-bottom: 1px solid var(--line);
}

.google-drive-file-list button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.google-drive-file-list button:hover,
.google-drive-file-list button:focus-visible {
  background: var(--surface-muted);
  color: var(--primary);
}

.google-drive-file-list small {
  flex: 0 0 auto;
  color: var(--muted);
}

.capture-file-meta {
  display: grid;
  width: 100%;
  gap: 10px;
}

.capture-selected-file {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}

.capture-selected-file > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--muted);
}

.capture-selected-file > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-file-meta .capture-file-title {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: 0;
}

.capture-file-meta .capture-file-title:focus,
.capture-file-meta .capture-file-title:focus-visible {
  border-color: var(--capture-accent-border);
  outline: 0;
  box-shadow: 0 0 0 2px var(--capture-accent-soft);
}

.capture-file-meta .capture-choose-file {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.capture-file-meta .capture-choose-file:hover,
.capture-file-meta .capture-choose-file:focus-visible {
  border-color: var(--capture-accent-border);
  color: var(--primary);
}

.capture-attachment-review {
  display: grid;
  gap: 16px;
}

.capture-attached-files {
  padding: 0;
  margin: 0 0 12px;
  list-style: none;
  border-top: 1px solid var(--line);
}

.capture-attached-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 32px;
  padding: 1px 3px 1px 8px;
  border-bottom: 1px solid var(--line);
  color: #475569;
}

.capture-attached-file-details {
  display: grid;
  min-width: 0;
  gap: 0;
}

.capture-attachment-title {
  width: min(360px, 100%);
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.capture-attachment-title[readonly] {
  border-color: transparent;
  padding-left: 0;
}

.capture-attachment-status {
  color: var(--muted);
  font-size: 12px;
}

.capture-attached-filename.is-scanning { color: var(--muted); }

.capture-attachment-status.status-available { color: #15803d; }
.capture-attachment-status.status-rejected,
.capture-attachment-status.status-scan_failed,
.capture-attachment-status.status-expired { color: var(--red); }

.capture-file-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.capture-file-row-actions > button:not(.capture-remove-file) {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.capture-attached-filename {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-attached-file-primary {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.capture-attached-file-icon {
  display: inline-grid;
  flex: 0 0 16px;
  place-items: center;
  color: var(--link);
}

.capture-attached-file-icon svg {
  width: 16px;
  height: 16px;
}

.capture-remove-file {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
}

.capture-remove-file svg {
  width: 15px;
  height: 15px;
}

.capture-remove-file:hover,
.capture-remove-file:focus-visible {
  color: var(--red);
}

.capture-no-files {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.capture-attachment-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.capture-attachment-review-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.capture-attachment-review-actions svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 480px) {
  .capture-selected-file {
    align-items: center;
    flex-wrap: wrap;
    padding: 8px;
  }

  .capture-selected-file > span {
    flex-basis: calc(100% - 28px);
  }

  .capture-selected-file .capture-choose-file {
    width: 100%;
  }

  .capture-attachment-review-actions button {
    width: 100%;
  }

}

.capture-time-state,
.capture-energy-state {
  padding-top: 8px;
}

.capture-time-menu {
  width: min(230px, 100%);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.capture-time-menu button {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
}

.capture-time-menu button:hover,
.capture-time-menu button:focus-visible {
  background: var(--nav-hover);
  color: var(--capture-accent-strong);
  outline: 0;
}

.capture-time-menu .capture-project-quick-actions button {
  width: auto;
  min-height: 32px;
  display: inline-flex;
  grid-template-columns: none;
  justify-content: center;
  padding: 0 10px;
  font-size: 12px;
  text-align: center;
}

.capture-time-menu .capture-project-quick-actions .primary-button {
  background: var(--primary);
  color: #FFFFFF;
}

.capture-time-menu .capture-project-quick-actions .primary-button:hover,
.capture-time-menu .capture-project-quick-actions .primary-button:focus-visible {
  background: var(--primary-strong);
  color: #FFFFFF;
}

.capture-time-menu .capture-project-quick-actions .ghost-button {
  color: var(--muted);
}

.capture-time-menu .capture-project-quick-actions .ghost-button:hover,
.capture-time-menu .capture-project-quick-actions .ghost-button:focus-visible {
  background: var(--nav-hover);
  color: var(--primary);
}

.capture-time-check {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.capture-time-check .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.capture-due-state {
  padding-top: 8px;
}

.capture-due-panel {
  width: min(310px, 100%);
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.capture-date-field,
.capture-scheduled-time {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.capture-due-panel input {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: 0;
}

.capture-due-panel input:focus,
.capture-due-panel input:focus-visible {
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
}

.capture-due-current {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.capture-due-current strong {
  color: var(--text);
}

.capture-due-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.capture-due-actions button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
}

.capture-due-actions button:hover:not(:disabled) {
  background: var(--nav-hover);
  color: var(--capture-accent-strong);
}

.capture-due-actions button:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
}

.capture-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding-top: 14px;
  border-top: 0;
}

.capture-actions .primary-button {
  min-width: 115px;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

.capture-actions .primary-button:hover {
  background: var(--capture-accent-strong);
  border-color: var(--capture-accent-strong);
  color: var(--surface);
}

.capture-actions .ghost-button {
  min-width: 112px;
  background: var(--surface);
  border-color: #EEEEEE;
  color: var(--text);
}


.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 37, 0.42);
  z-index: 40;
}

.confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 26, 37, 0.52);
}

.confirmation-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(15, 26, 37, 0.24);
  text-align: center;
}

.confirmation-dialog-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff0ed;
  color: #c43d2f;
}

.confirmation-dialog-icon svg { width: 22px; height: 22px; }
.confirmation-dialog h2 { margin: 0; font-size: 21px; color: var(--text); }
.confirmation-dialog p { margin: 10px 0 22px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.confirmation-dialog p strong { color: var(--text); }

.confirmation-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirmation-dialog-actions button { min-width: 104px; min-height: 42px; }
.confirmation-dialog-actions .danger-button { border-color: #c43d2f; background: #c43d2f; color: #fff; }
.confirmation-dialog-actions .danger-button:hover { border-color: #a83227; background: #a83227; }

@media (max-width: 480px) {
  .confirmation-dialog-actions { flex-direction: column-reverse; }
  .confirmation-dialog-actions button { width: 100%; }
}

.quick-add,
.side-panel {
  position: fixed;
  z-index: 50;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.quick-add {
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 28px));
  border-radius: 10px;
  padding: 18px;
}

.quick-add header,
.quick-add footer,
.side-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-add h2,
.side-panel h2 {
  margin: 0;
  font-size: 20px;
  color: var(--orange);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
}

.field textarea { resize: vertical; }

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

.interpretation {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--sky-strong);
}

.interpretation p { margin: 0; line-height: 1.45; }

.side-panel {
  top: var(--topbar);
  right: 0;
  width: min(420px, 100vw);
  height: calc(100vh - var(--topbar));
  padding: 18px;
  overflow: auto;
}

[dir="rtl"] .side-panel {
  right: auto;
  left: 0;
}

.panel-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.panel-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.panel-item strong { display: block; margin-bottom: 4px; }
.panel-item span { color: var(--muted); font-size: 12px; }

.preference-field {
  display: grid;
  gap: 8px;
}

.preference-field select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: 0;
}

.preference-field select:focus,
.preference-field select:focus-visible {
  border-color: var(--line);
  outline: 0;
  box-shadow: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--heading);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

svg.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2;
}

/* Jirono-inspired visual system
   Applies Jirono's typography, palette, controls, and surface finish without
   changing DoGTD's information architecture or page layouts. */
::selection {
  color: #FFFFFF;
  background: var(--primary);
}

button,
a,
input,
select,
textarea {
  transition: color 0.3s ease, background-color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

.settings-dropdown {
  border-color: #EEEEEE;
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.settings-dropdown button {
  font-weight: 400;
}

.topbar-new:hover,
.topbar-new:focus-visible {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: #FFFFFF;
  filter: none;
}

.workspace-switcher:hover,
.workspace-switcher:focus-visible,
.topbar-link:hover,
.topbar-link:focus-visible {
  color: var(--primary);
  filter: none;
}

.nav-heading {
  color: var(--muted);
  font-weight: 400;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--primary);
}

.workspace .icon-button,
.quick-add .icon-button,
.side-panel .icon-button {
  border-color: #EEEEEE;
  border-radius: 5px;
}

.workspace .icon-button:hover,
.quick-add .icon-button:hover,
.side-panel .icon-button:hover {
  color: var(--primary);
  border-color: var(--capture-accent-border);
  background: #FFF8F7;
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 5px;
  font-weight: 400;
}

.primary-button {
  box-shadow: 0 4px 8px rgba(254, 99, 70, 0.2);
}

.primary-button:hover,
.primary-button:focus-visible {
  box-shadow: 0 5px 12px rgba(254, 78, 45, 0.26);
}

.secondary-button {
  color: var(--primary);
  border-color: var(--primary);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  color: var(--primary-strong);
  border-color: var(--primary-strong);
  background: #FFF8F7;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  color: var(--primary);
  border-color: var(--capture-accent-border);
  background: #FFF8F7;
}

.metric,
.panel,
.task-list,
.detail-card,
.empty-state,
.project-card,
.reference-card,
.state-card,
.perspective-content,
.relationship-browser,
.purpose-statement-card {
  border-color: #EEEEEE;
}

.metric,
.panel,
.detail-card,
.empty-state,
.project-card,
.reference-card,
.state-card,
.purpose-statement-card {
  box-shadow: var(--shadow);
}

.perspective-levels {
  border-color: #EEEEEE;
  border-radius: 5px;
  overflow: hidden;
}

.perspective-levels button {
  border-color: #EEEEEE;
  font-weight: 400;
}

.perspective-form input,
.perspective-form select,
.perspective-form textarea,
.perspective-filters select,
.vision-title-field input,
.goal-title-field input,
.goal-form select,
.goal-form input[type="date"],
.area-name-field input,
.goals-filter select,
.preference-field select,
.capture-tags input,
.capture-file-meta input,
.capture-due-panel input {
  border-color: #EEEEEE;
  border-radius: 4px;
  background: #FFFFFF;
}

.perspective-form input:focus,
.perspective-form select:focus,
.perspective-form textarea:focus,
.perspective-filters select:focus,
.vision-title-field input:focus,
.goal-title-field input:focus,
.goal-form select:focus,
.goal-form input[type="date"]:focus,
.area-name-field input:focus,
.goals-filter select:focus,
.preference-field select:focus,
.capture-tags input:focus,
.capture-file-meta input:focus,
.capture-due-panel input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
  outline: 0;
}

.purpose-statement-card > textarea:focus-visible,
.vision-form textarea:focus,
.goal-description-field textarea:focus,
.area-description-field textarea:focus {
  box-shadow: none;
}

.vision-title-field input,
.goal-title-field input,
.goal-form select,
.goal-form input[type="date"],
.area-name-field input {
  color: var(--text);
}

.goals-page,
.areas-page {
  background: transparent;
}

.principles-divider,
.goal-group-divider,
.area-group-divider {
  border-color: var(--line);
  background-color: var(--line);
}

.vision-list {
  border-color: var(--line);
  background: transparent;
}

.vision-list-item,
.principles-list li,
.goal-row,
.area-row,
.goals-filter-empty,
.areas-empty,
.areas-disabled-empty {
  border-color: var(--line);
}

.goal-completion-column button,
.area-control-column button {
  color: #D6E2EB;
}

.add-action,
.workspace a:not(.nav-item):not(.brand),
.quick-add a,
.side-panel a {
  color: var(--primary);
}

.add-action:hover,
.add-action:focus-visible,
.workspace a:not(.nav-item):not(.brand):hover,
.quick-add a:hover,
.side-panel a:hover {
  color: var(--primary-strong);
}

.toast {
  color: #FFFFFF;
  background: var(--heading);
}

/* Projects */
.projects-page { background: transparent; }
.projects-view,
.project-editor-view,
.project-detail-view {
  width: 100%;
  max-width: none;
  color: var(--text);
  font-weight: 400;
}
.projects-page-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.projects-header-actions { margin-inline-start: auto; }
.project-overflow-menu { inset-inline-end: 0; }
.project-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.project-form label {
  display: grid;
  gap: 8px;
}
.project-filter-dropdown {
  position: relative;
  display: inline-flex;
  min-width: 0;
}
.project-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: min(280px, 70vw);
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
}
.project-filter-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-filter-trigger svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}
.project-filter-trigger.active {
  border-color: var(--line);
  background: #FFFFFF;
  color: var(--heading);
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}
.project-filter-trigger:hover,
.project-filter-trigger:focus-visible {
  background: #FFF8F7;
  color: var(--primary);
}
.project-filter-menu {
  position: absolute;
  z-index: 35;
  inset-block-start: calc(100% + 5px);
  inset-inline-start: 0;
  display: grid;
  width: max-content;
  min-width: 160px;
  max-width: min(320px, 80vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
}
.project-filter-menu button {
  min-height: 32px;
  padding: 6px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-filter-menu button:hover,
.project-filter-menu button:focus-visible,
.project-filter-menu button[aria-checked="true"] { background: var(--surface-muted); color: var(--heading); }
.project-filter-divider { height: 1px; margin: 4px 3px; background: var(--line); }
.project-filters-clear {
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.project-filters-clear:hover,
.project-filters-clear:focus-visible {
  color: var(--primary);
}
.project-form input,
.project-form select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
}
.project-form input:focus,
.project-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
  outline: 0;
}
.project-list {
  width: 100%;
  border-top: 1px solid var(--line);
}
.project-section { width: 100%; }
.projects-empty {
  margin: 0;
  padding: 14px 8px;
  border-top: 1px solid var(--line);
}
.completed-projects-section { margin-top: 18px; }
.completed-projects-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}
.completed-projects-toggle svg { width: 15px; height: 15px; color: var(--muted); }
.completed-projects-toggle:hover,
.completed-projects-toggle:focus-visible { background: #FFF8F7; color: var(--primary); }
.project-groups { display: grid; gap: 18px; }
.project-group .next-list-header { margin-bottom: 0; }
.project-statistics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 4px 0 8px;
  border-bottom: 1px solid var(--line);
}
.project-completion-checkbox {
  appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  border: 1px solid #D8DEE5;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}
.project-completion-checkbox:hover,
.project-completion-checkbox:focus-visible {
  border-color: var(--primary);
}
.project-completion-checkbox:checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px #FFFFFF;
}
.project-row.is-completed .project-action-count {
  background: #94A3B8;
}
.project-row.is-completed .project-row-title,
.project-row.is-completed .project-options summary {
  color: var(--muted);
}
.project-row.is-completed .project-completion-checkbox:checked {
  border-color: #94A3B8;
  background: #94A3B8;
}
.project-row.is-completed .project-completion-checkbox:hover,
.project-row.is-completed .project-completion-checkbox:focus-visible { border-color: #64748B; }
.project-row.is-completed .project-row-content:hover .project-row-title,
.project-row.is-completed .project-row-content:focus-visible .project-row-title,
.project-row.is-completed .project-options summary:hover { color: #64748B; }
.project-action-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.project-row-content {
  display: block;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.project-row-content:hover .project-row-title,
.project-row-content:focus-visible .project-row-title { color: var(--primary); }
.project-row-title {
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-options {
  display: grid;
  place-items: center;
  border-left: 0;
}
.project-options summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--faint);
  cursor: pointer;
  list-style: none;
}
.project-options summary::-webkit-details-marker { display: none; }
.project-options summary:hover { color: var(--primary); }
.project-options > div {
  position: absolute;
  top: 40px;
  right: 4px;
  z-index: 15;
  width: 190px;
  padding: 5px;
  border: 1px solid #EEEEEE;
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.project-options > div button {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  text-align: left;
}
.project-options > div button:hover { color: var(--primary); background: #FFF8F7; }
.project-options > div .danger-link { color: var(--red); }
.project-status-section { margin-top: 34px; }
.project-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 400;
}
.project-section-toggle svg { width: 16px; color: var(--faint); }
.project-section-toggle.is-collapsed svg { transform: rotate(-90deg); }
.project-section-divider { height: 1px; background: var(--line); }
.project-section-empty,
.projects-empty { margin: 0; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.project-form { display: grid; gap: 24px; }
.project-description-field textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-weight: 400;
  line-height: 1.5;
  resize: vertical;
}
.project-description-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(254, 99, 70, 0.1);
  outline: 0;
}
.project-perspective-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.project-perspective-fields legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}
.project-form-grid {
  display: grid;
  grid-template-columns: 1fr minmax(170px, 0.35fr);
  gap: 18px;
}
.project-date-control {
  position: relative;
  display: flex;
  align-items: center;
}
.project-date-control > svg {
  position: absolute;
  left: 10px;
  width: 16px;
  color: var(--muted);
  pointer-events: none;
}
.project-date-control input { padding-left: 34px; padding-right: 38px; }
.project-date-control button {
  position: absolute;
  right: 5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
}
.project-date-control button:hover { color: var(--primary); }
.project-date-control button svg { width: 15px; height: 15px; }
.project-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.project-detail-view { display: grid; gap: 26px; }
.project-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.project-detail-kicker {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.project-detail-heading h2 { margin: 0; color: var(--heading); font-size: 24px; font-weight: 400; }
.project-detail-actions { display: flex; align-items: center; gap: 8px; }
.project-edit-button { display: inline-flex; align-items: center; gap: 7px; }
.project-edit-button svg { width: 16px; height: 16px; }
.project-detail-description { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }
.project-detail-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--line);
}
.project-detail-metadata > div { padding: 14px 16px; background: var(--surface); }
.project-detail-metadata dt { margin-bottom: 5px; color: var(--faint); font-size: 12px; }
.project-detail-metadata dd { margin: 0; color: var(--text); }
.project-related-actions { display: grid; gap: 10px; }
.project-closed-actions { display: grid; gap: 10px; margin-top: 24px; }
.project-closed-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.project-closed-actions-toggle svg { width: 15px; height: 15px; color: var(--muted); }
.project-closed-actions-toggle:hover,
.project-closed-actions-toggle:focus-visible { background: var(--surface-muted); color: #64748B; }
.workflow-closed-actions { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); }
.workflow-closed-actions-list { display: grid; gap: 12px; }
.workflow-closed-task-list .task-list-row.is-completed .task-row-check,
.workflow-closed-task-list .task-list-row.is-completed .task-row-check:checked {
  border: 2px solid #94A3B8;
  background: transparent;
  background-image: none;
  box-shadow: none;
}
.workflow-closed-task-list .task-list-row.is-completed .task-row-check:hover,
.workflow-closed-task-list .task-list-row.is-completed .task-row-check:focus-visible { border-color: #64748B; }
.workflow-closed-task-list .task-list-row.is-completed .next-task-open,
.workflow-closed-task-list .task-list-row.is-completed .next-focus,
.workflow-closed-task-list .task-list-row.is-completed .next-task-meta { color: var(--muted); }
.project-detail-section-heading { display: flex; align-items: center; justify-content: space-between; }
.project-detail-section-heading h3 { margin: 0; color: var(--heading); font-size: 16px; font-weight: 400; }
.project-detail-empty { margin: 0; padding: 16px 8px; border-top: 1px solid var(--line); }
.project-detail-add-task {
  width: 100%;
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
  padding: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  color: var(--quick-add-muted);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
}
.project-detail-add-task:hover,
.project-detail-add-task:focus-visible {
  color: var(--muted);
  background: var(--surface);
}
.project-detail-add-task > span:last-child {
  padding-right: 12px;
}
.project-detail-task-list {
  width: 100%;
}
.project-detail-task-rows {
  display: block;
  width: 100%;
}
.project-detail-quick-add {
  width: 100%;
}
.project-detail-task-list li {
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
}
.capture-project-field {
  margin-top: 15px;
}
.capture-project-field select {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #EEEEEE;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
.someday-project-row .secondary-button { min-height: 30px; font-size: 12px; }

@media (max-width: 760px) {
  .project-perspective-fields,
  .project-form-grid { grid-template-columns: 1fr; }
  .projects-page-header { flex-wrap: wrap; }
  .project-filters { align-items: stretch; }
  .project-filter-dropdown { max-width: 100%; }
  .project-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-statistics > div { border-bottom: 1px solid var(--line); }
  .project-statistics > div:nth-child(2n) { border-inline-end: 0; }
  .project-statistics > div:last-child { border-bottom: 0; }
  .project-row { grid-template-columns: 18px auto minmax(0, 1fr) 34px; gap: 6px; }
  .project-form-actions { align-items: stretch; flex-direction: column; }
  .project-form-actions button { width: 100%; }
  .project-detail-heading { flex-direction: column; }
  .project-detail-actions { align-items: stretch; flex-direction: column; width: 100%; }
  .project-detail-actions button { justify-content: center; width: 100%; }
  .project-detail-metadata { grid-template-columns: 1fr; }
}

.mobile-menu { display: none; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .project-grid,
  .reference-grid,
  .state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

  .topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .brand {
    min-width: auto;
    font-size: 16px;
    letter-spacing: 4px;
  }
  .workspace-switcher { display: none; }
  .topbar-search { display: none; }
  .topbar-actions {
    gap: 10px;
    margin-left: auto;
  }
  .topbar-link span:not(.notification-dot):not([data-icon]) { display: none; }
  .topbar-new span:nth-child(2) { display: none; }
  .mobile-menu { display: inline-flex; }

  .sidebar {
    position: fixed;
    inset: var(--topbar) auto 0 0;
    z-index: 60;
    width: min(82vw, var(--sidebar-width));
    transform: translateX(-105%);
    transition: transform 160ms ease;
    box-shadow: var(--shadow);
  }

  [dir="rtl"] .sidebar {
    inset: var(--topbar) 0 0 auto;
    transform: translateX(105%);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-resizer { display: none; }

  .workspace {
    grid-column: 1;
    padding: 28px 16px;
  }

  body.workflow-route .workspace {
    padding: 28px 16px;
  }

body.capture-route .workspace {
    padding: 12px;
  }

  .capture-editor {
    padding: 22px 16px;
  }

  .verify-page .capture-editor,
  .edit-action-page .capture-editor {
    padding-inline: 0;
  }

  .actionable-choices {
    grid-template-columns: minmax(0, 340px);
  }

  .tickler-row,
  .tickler-open {
    grid-template-columns: 1fr;
  }

  .tickler-open {
    gap: 5px;
  }

  .tickler-actions {
    padding: 0 10px 10px;
  }

  .actionable-task {
    margin-bottom: 22px;
  }

  .actionable-option {
    padding-inline: 11px;
  }

  .actionable-option-actions {
    padding-left: 43px;
  }

  .capture-description,
  .capture-form {
    margin-left: 0;
  }

  .capture-title {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .page-header {
    grid-template-columns: 1fr;
  }

  .metrics,
  .project-grid,
  .reference-grid,
  .state-grid,
  .form-grid,
  .capture-file-meta {
    grid-template-columns: 1fr;
  }

  .task-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .task-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .page-title { font-size: 23px; }

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

  .next-summary > div {
    padding-inline: 12px;
  }

  .next-summary > div:nth-child(2) {
    border-inline-end: 0;
  }

  .next-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .next-summary > div:nth-child(3) {
    padding-inline-start: 0;
  }

  .next-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .next-toolbar-actions {
    justify-content: flex-end;
  }

  .next-task-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .next-task-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px 12px;
  }

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

  .next-statistics > div:nth-child(2) { border-inline-end: 0; }
  .next-statistics > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }

  .next-overflow-menu {
    inset-inline-end: 76px;
  }

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

  .waiting-summary > div {
    padding-inline: 12px;
  }

  .waiting-summary > div:nth-child(2) {
    border-inline-end: 0;
  }

  .waiting-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .waiting-summary > div:nth-child(3) {
    padding-inline-start: 0;
  }

  .waiting-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .waiting-tool-button {
    align-self: flex-end;
  }

  .waiting-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .waiting-row-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

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

  .someday-summary > div {
    padding-inline: 12px;
  }

  .someday-summary > div:nth-child(2) {
    border-inline-end: 0;
  }

  .someday-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .someday-summary > div:nth-child(3) {
    padding-inline-start: 0;
  }

  .someday-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .someday-tool-button {
    align-self: flex-end;
  }

  .someday-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .someday-row-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

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

  .tickler-summary > div {
    padding-inline: 12px;
  }

  .tickler-summary > div:nth-child(2) {
    border-inline-end: 0;
  }

  .tickler-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .tickler-summary > div:nth-child(3) {
    padding-inline-start: 0;
  }

  .tickler-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .tickler-tool-button {
    align-self: flex-end;
  }

  .capture-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

}

@media (max-width: 860px) {
  .perspective-levels,
  .perspective-filters,
  .inline-editor { grid-template-columns: 1fr 1fr; }
  .perspective-row { grid-template-columns: 5px minmax(0, 1fr); }
  .perspective-project { grid-template-columns: 1fr; }
  .perspective-row > .status-chip,
  .perspective-actions { grid-column: 2; }
  .alignment-panel { grid-template-columns: 1fr; }
  .alignment-panel small { grid-column: 1; }
}

@media (max-width: 560px) {
  .perspective-levels,
  .perspective-filters,
  .inline-editor,
  .goal-form-grid,
  .relationship-results { grid-template-columns: 1fr; }
}

.taxonomy-selector { position: relative; }
.taxonomy-options {
  position: absolute;
  z-index: 80;
  inset-inline-start: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  max-width: min(360px, calc(100vw - 32px));
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, #fff);
  box-shadow: 0 12px 28px rgb(15 23 42 / 14%);
}
.taxonomy-options[hidden] { display: none; }
.taxonomy-options button,
.taxonomy-empty { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: start; }
.taxonomy-options button:hover,
.taxonomy-options button:focus-visible { background: var(--soft, #f3f5f7); outline: none; }
.taxonomy-add-choice { color: var(--accent, #9a5b18) !important; font-weight: 650; }
.taxonomy-clear-choice { border-top: 1px solid var(--line) !important; border-radius: 0 0 7px 7px !important; color: var(--muted) !important; }
.taxonomy-empty { color: var(--muted); font-size: .84rem; }
.taxonomy-contact-options { inset-inline-start: auto; inset-inline-end: 0; }

.tags-settings { gap: 14px; }
.tags-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--soft, #f3f5f7); }
.tags-tabs button { flex: 1; padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.tags-tabs button[aria-selected="true"] { background: var(--surface, #fff); color: var(--text); box-shadow: 0 1px 3px rgb(15 23 42 / 10%); }
.tags-settings-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tags-settings-toolbar p { margin: 0; color: var(--muted); font-size: .85rem; }
.tags-settings-toolbar .primary-button { flex: 0 0 auto; }
.tags-management-list { display: grid; gap: 2px; }
.tags-management-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 6px 4px 6px 10px; border-bottom: 1px solid var(--line); }
.tags-management-row > span { display: grid; gap: 2px; }
.tags-management-row small { color: var(--muted); }
.tags-management-row .project-options summary { display: grid; place-items: center; width: 34px; height: 34px; }
.tags-done { justify-self: start; margin-top: 6px; }

@media (max-width: 560px) {
  .tags-settings-toolbar { align-items: stretch; flex-direction: column; }
  .tags-settings-toolbar .primary-button { align-self: start; }
}
.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page-canvas, #fff);
}

.auth-gate[hidden] { display: none; }

.auth-card {
  width: min(390px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line, #dce3ea);
  border-radius: 6px;
  background: #fff;
}

.auth-card h1,
.auth-card p { margin: 0; }

.auth-card label {
  display: grid;
  gap: 6px;
}

.auth-card input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line, #dce3ea);
  border-radius: 5px;
  font: inherit;
}

.auth-error { color: var(--red, #b91c1c); }
