@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 44px;
  --screen: #0b0b0b;
  --surface: #141414;
  --surface-raised: #1a1a19;
  --ink: #f2f1ed;
  --muted: #92928b;
  --line: #353532;
  --line-strong: #53534e;
  --focus-neutral: #6d6d68;
  --accent: #ff5908;
  --accent-soft: #2d160d;
  --do-color: #6ea8fe;
  --do-soft: #172945;
  --schedule-color: #55d6be;
  --delegate-color: #f4b942;
  --eliminate-color: #ff6b6b;
  --eliminate-soft: #35191a;
  --done-color: #70d394;
  --done-soft: #153325;
  --ring: #ff5908;
  --resize-dur: 300ms;
  --resize-ease: cubic-bezier(.22, 1, .36, 1);
  --metal-shadow: #6c6d6d;
  --metal-mid: #aeb1b2;
  --metal-highlight: #e2e4e4;
  --toggle-dur: 350ms;
  --toggle-travel: 14px;
  --toggle-ov1: 1px;
  --toggle-ov2: 0px;
  --toggle-track: 160ms;
  --toggle-ease: cubic-bezier(.34, 1.35, .64, 1);
}

* { box-sizing: border-box; margin: 0; }
html { min-width: 320px; background: var(--screen); }
body {
  min-height: 100dvh;
  padding: 0;
  background: var(--screen);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; }
#phone-shell { display: contents; }

#console {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: clamp(22px, 3.3vw, 44px);
  overflow: auto;
  border-radius: 0;
  background: var(--screen);
  box-shadow: none;
  -webkit-app-region: drag;
}
#console.scatter-mode {
  overflow: hidden;
}
#console::before {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 28px;
  content: "";
  -webkit-app-region: drag;
}

#console > :not(.ascii-canvas) {
  position: relative;
  z-index: 1;
}
#console > .app-identity { z-index: 4; }
.ascii-canvas {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
}
.app-identity {
  position: relative;
  z-index: 4;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 34px;
  margin: 0 0 14px;
  color: var(--ink);
  -webkit-app-region: drag;
}
.app-mark {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: contain;
}
.app-brand {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  min-width: 0;
  white-space: nowrap;
}
.app-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--ink);
  border-radius: 6px;
  -webkit-app-region: no-drag;
  transition: color .16s ease, opacity .16s ease, transform .16s ease;
}
.github-link svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.github-link:hover {
  color: #fff;
  transform: translateY(-1px);
}
.github-link:focus-visible {
  outline: 2px solid var(--focus-neutral);
  outline-offset: 2px;
}
.header-actions {
  position: static;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  -webkit-app-region: no-drag;
}
.view-switch {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(20, 20, 20, .86);
  -webkit-app-region: no-drag;
}
.scatter-names-button {
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(20, 20, 20, .86);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  -webkit-app-region: no-drag;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.scatter-names-button:hover,
.scatter-names-button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-raised);
}
.scatter-names-button:focus-visible {
  outline: 2px solid var(--focus-neutral);
  outline-offset: 2px;
}
.scatter-names-button[hidden] { display: none; }
.view-switch-pill {
  position: absolute;
  z-index: 0;
  top: 2px;
  left: 0;
  height: 28px;
  width: 0;
  border-radius: 7px;
  background: var(--surface-raised);
  transform: translateX(0);
  transition: transform 250ms cubic-bezier(.22, 1, .36, 1), width 250ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform, width;
  pointer-events: none;
}
.view-button {
  position: relative;
  z-index: 1;
  min-width: 68px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  -webkit-app-region: no-drag;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.archive-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.archive-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.view-button:hover { color: var(--ink); }
.view-button.is-active {
  color: var(--ink);
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}
.view-button.is-active:hover {
  background: transparent;
}
.view-button:focus-visible {
  outline: 2px solid var(--focus-neutral);
  outline-offset: 2px;
}
.settings-wrap {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  -webkit-app-region: no-drag;
}
.settings-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(20, 20, 20, .86);
  cursor: pointer;
  place-items: center;
  -webkit-app-region: no-drag;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.settings-toggle:hover,
.settings-toggle[aria-expanded="true"] { color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); }
.settings-toggle:focus-visible { outline: 2px solid var(--focus-neutral); outline-offset: 2px; }
.settings-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.settings-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  width: 218px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(20, 20, 20, .98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .32);
  -webkit-app-region: no-drag;
}
.settings-panel[hidden] { display: none; }
.settings-panel h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
}
.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.settings-option input {
  width: 34px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  appearance: none;
  background: var(--surface);
  cursor: pointer;
  transition: background-color var(--toggle-track) ease, border-color .16s ease;
}
.settings-option input::after {
  display: block;
  width: 14px;
  height: 14px;
  margin: 2px;
  border-radius: 50%;
  content: "";
  background: var(--muted);
  translate: 0 0;
  will-change: translate;
}
.settings-option input[data-on="true"] { border-color: var(--do-color); background: var(--do-soft); }
.settings-option input[data-on="true"]::after { background: var(--do-color); translate: var(--toggle-travel) 0; }
.settings-option input.is-init[data-on="true"]::after { animation: settings-toggle-on var(--toggle-dur) var(--toggle-ease) both; }
.settings-option input.is-init[data-on="false"]::after { animation: settings-toggle-off var(--toggle-dur) var(--toggle-ease) both; }
@keyframes settings-toggle-on {
  0% { translate: 0 0; }
  55% { translate: calc(var(--toggle-travel) + var(--toggle-ov1)) 0; }
  80% { translate: calc(var(--toggle-travel) - var(--toggle-ov2)) 0; }
  100% { translate: var(--toggle-travel) 0; }
}
@keyframes settings-toggle-off {
  0% { translate: var(--toggle-travel) 0; }
  55% { translate: calc(0px - var(--toggle-ov1)) 0; }
  80% { translate: var(--toggle-ov2) 0; }
  100% { translate: 0 0; }
}
.settings-option input:focus-visible { outline: 2px solid var(--focus-neutral); outline-offset: 2px; }
.settings-option + .settings-option { margin-top: 12px; }
.settings-divider {
  height: 1px;
  margin: 14px 0 12px;
  background: var(--line);
}
.settings-action {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
  transition: color .16s ease;
}
.settings-action:hover,
.settings-action:focus-visible { color: var(--ink); }
.settings-action:focus-visible { outline: 2px solid var(--focus-neutral); outline-offset: 3px; }
.settings-action:disabled { cursor: wait; opacity: .5; }
.settings-action svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.settings-help {
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.settings-demo-help { margin-top: 4px; }
.settings-eliminate-help { margin: 6px 0 0; }

.app-status {
  min-height: 16px;
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  text-align: right;
}
.app-status[data-state="success"] { color: var(--done-color); }
.app-status[data-state="error"] { color: var(--eliminate-color); }
.app-status[hidden] { display: none; }

.capture-panel {
  align-items: center;
  padding: 0;
  -webkit-app-region: no-drag;
}
.capture-control {
  display: flex;
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.capture-panel .capture-control { width: 100%; }
#quick-add {
  min-width: 0;
  flex: 1;
  padding: 15px 16px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}
#quick-add::placeholder { color: #696963; }
#quick-add:disabled { opacity: .55; }
.capture-control:focus-within {
  border-color: var(--focus-neutral);
  box-shadow: 0 0 0 1px var(--focus-neutral);
}
#quick-add:focus-visible { box-shadow: none; }
.enter-key {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 116px;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}
.enter-key::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  content: "";
  background:
    linear-gradient(115deg, var(--metal-shadow) 0%, var(--metal-mid) 28%, var(--metal-highlight) 46%, var(--metal-shadow) 66%, var(--metal-mid) 100%) border-box;
  background-position: 0 50%;
  background-size: 180% 100%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .72;
  pointer-events: none;
  transition: opacity .22s ease, background-position .48s cubic-bezier(.22, 1, .36, 1);
}
.capture-control:focus-within .enter-key::before,
.enter-key:hover::before {
  background-position: 100% 50%;
  opacity: .95;
}
@media (prefers-reduced-motion: reduce) {
  .enter-key::before { transition: opacity .22s ease; }
}
.enter-arrow {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#layout {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(250px, .45fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin: 28px 0 0;
  -webkit-app-region: no-drag;
}
#matrix {
  display: contents;
  min-height: 0;
  min-width: 0;
}
#done { grid-column: 1; grid-row: 1; }
#layout.hide-eliminate-quadrant > .eliminate-section { display: none !important; }
#layout.hide-eliminate-quadrant:not(.original-layout) #done { grid-row: 1 / -1; }
.eliminate-section {
  grid-column: 1;
  grid-row: 2;
  min-height: 96px;
  padding-block: 14px;
}
#matrix > .quadrant[data-quadrant="do"] { grid-column: 2; grid-row: 1 / -1; }
#matrix > .quadrant[data-quadrant="schedule"] { grid-column: 3; grid-row: 1; }
#matrix > .quadrant[data-quadrant="delegate"] { grid-column: 3; grid-row: 2; }
#layout.original-layout {
  grid-template-columns: minmax(250px, .45fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
#layout.original-layout #done { grid-column: 1; grid-row: 1 / -1; }
#layout.original-layout #matrix > .quadrant[data-quadrant="do"] { grid-column: 2; grid-row: 1; }
#layout.original-layout #matrix > .quadrant[data-quadrant="schedule"] { grid-column: 3; grid-row: 1; }
#layout.original-layout #matrix > .quadrant[data-quadrant="delegate"] { grid-column: 2; grid-row: 2; }
#layout.original-layout.hide-eliminate-quadrant #matrix > .quadrant[data-quadrant="delegate"] { grid-column: 2 / -1; }
#layout.original-layout .eliminate-section {
  grid-column: 3;
  grid-row: 2;
  min-height: 0;
  padding-block: 18px;
}
#layout.original-layout .eliminate-section .cards-frame { max-height: none; }
#layout.scatter-mode #matrix { display: none; }
#layout.scatter-mode .eliminate-section,
#layout.archive-mode .eliminate-section { display: none; }
#layout.scatter-mode {
  grid-template-columns: minmax(230px, .45fr) minmax(0, 1.55fr);
  grid-template-rows: minmax(0, 1fr);
}
#layout.scatter-mode #done { grid-column: 1; grid-row: 1; }
#layout.scatter-mode #scatter-view { grid-column: 2; grid-row: 1; }
#layout.archive-mode {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  flex: 0 0 auto;
}
#layout.archive-mode #archive-view { grid-column: 1; }
#layout.archive-mode #matrix[hidden],
#layout.archive-mode #done[hidden],
#layout.archive-mode #scatter-view[hidden] { display: none !important; }
#scatter-view {
  display: none;
  grid-column: 2;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}
#scatter-view:not([hidden]) { display: flex; }
.archive-view {
  display: none;
  grid-column: 1 / -1;
  align-self: start;
  flex-direction: column;
  min-width: 0;
  min-height: auto;
  overflow: visible;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 11, 11, .78);
}
.archive-view:not([hidden]) { display: flex; }
.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.archive-heading > div {
  min-width: 0;
}
.archive-delete-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  min-height: 28px;
  margin-inline-start: auto;
}
.archive-delete-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: color .18s ease, opacity .18s ease;
}
.archive-delete-actions button:hover,
.archive-delete-actions button:focus-visible {
  color: var(--ink);
  background: transparent;
  outline: none;
}
.archive-delete-actions .archive-delete { opacity: .58; }
.archive-delete-actions .archive-delete:hover,
.archive-delete-actions .archive-delete:focus-visible { opacity: 1; }
.archive-delete-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: stroke-width .18s ease;
}
.archive-delete-actions .archive-delete:hover svg,
.archive-delete-actions .archive-delete:focus-visible svg { stroke-width: 2.25; }
.archive-delete-actions .delete-actions { display: flex; gap: 2px; }
.archive-delete-actions .delete-actions[hidden] { display: none; }
.archive-delete-actions .delete-actions button:hover,
.archive-delete-actions .delete-actions button:focus-visible { font-weight: 750; }
.archive-delete-actions .delete-approve { color: var(--ink); }
.archive-heading h1 {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 10px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.archive-heading h1 span {
  display: grid;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  place-items: center;
}
#archive-view .archive-cards-frame {
  flex: none;
  width: 100%;
  min-height: auto;
  max-height: none;
  overflow: visible;
}
.archive-cards-frame .cards-fade {
  display: none;
}
#archive-view .archive-cards {
  flex: none;
  width: 100%;
  min-height: auto;
  align-self: stretch;
  overflow: visible;
}
.archive-item {
  display: flex;
  min-width: 0;
  width: 100%;
  align-self: stretch;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color .18s ease, background-color .18s ease;
}
.archive-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}
.archive-item-content {
  flex: 1;
  min-width: 0;
}
.archive-item .archive-actions {
  flex: none;
  margin-inline-start: 8px;
  margin-inline-end: -4px;
}
.archive-item:hover .archive-actions,
.archive-item:focus-within .archive-actions {
  opacity: 1;
}
.archive-item .archive-restore {
  opacity: .62;
}
.archive-item .archive-restore:hover,
.archive-item .archive-restore:focus-visible {
  opacity: 1;
  color: var(--done-color);
}
.archive-item .archive-restore:focus-visible { outline: 2px solid var(--focus-neutral); outline-offset: 2px; }
.archive-item .title {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.archive-item .when {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
  line-height: 1.3;
}
.scatter-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 0;
}
.scatter-chart-shell {
  display: grid;
  grid-template-columns: 78px auto;
  grid-template-rows: minmax(0, 1fr) 28px;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  height: 100%;
  margin-inline: auto;
  min-width: 0;
  min-height: 0;
}
.scatter-plot {
  --plot-inset: 16px;
  position: relative;
  align-self: center;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  justify-self: start;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(11, 11, 11, .76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
  isolation: isolate;
}
.scatter-zones {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: inherit;
}
.scatter-zone {
  position: relative;
  min-width: 0;
  min-height: 0;
}
.scatter-zone-label {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 14px;
  color: var(--zone-color);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
  pointer-events: none;
}
.zone-delegate {
  --zone-color: var(--delegate-color);
  grid-column: 1;
  grid-row: 2;
  background: rgba(244, 185, 66, .055);
}
.zone-do {
  --zone-color: var(--do-color);
  grid-column: 1;
  grid-row: 1;
  background: rgba(110, 168, 254, .075);
}
.zone-eliminate {
  --zone-color: var(--eliminate-color);
  grid-column: 2;
  grid-row: 2;
  background: rgba(255, 107, 107, .055);
}
.zone-schedule {
  --zone-color: var(--schedule-color);
  grid-column: 2;
  grid-row: 1;
  background: rgba(85, 214, 190, .06);
}
.scatter-plot::before,
.scatter-plot::after {
  position: absolute;
  z-index: 2;
  content: "";
  pointer-events: none;
}
.scatter-plot::before {
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px dashed rgba(242, 241, 237, .18);
}
.scatter-plot::after {
  top: 50%;
  right: 0;
  left: 0;
  border-top: 1px dashed rgba(242, 241, 237, .18);
}
.scatter-grid {
  position: absolute;
  z-index: 3;
  inset: var(--plot-inset);
  background-image:
    linear-gradient(to right, rgba(242, 241, 237, .11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242, 241, 237, .11) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 5% 5%;
  pointer-events: none;
}
.scatter-tasks {
  position: absolute;
  z-index: 4;
  inset: var(--plot-inset);
  pointer-events: none;
}
.scatter-task {
  position: absolute;
  left: var(--scatter-x);
  top: var(--scatter-y);
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--task-color);
  background: transparent;
  cursor: grab;
  pointer-events: auto;
  place-items: center;
  touch-action: none;
  transform: translate(-50%, -50%);
  z-index: 5;
  transition: filter .14s ease, opacity .14s ease;
}
.scatter-task::before {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  content: "";
  background: currentColor;
  box-shadow: none;
  transition: opacity .14s ease;
}
.scatter-task:hover::before {
  opacity: .78;
}
.scatter-task-label {
  position: absolute;
  z-index: 10;
  display: block;
  box-sizing: border-box;
  width: max-content;
  width: min(320px, var(--scatter-label-max, 320px));
  max-width: min(320px, var(--scatter-label-max, 320px));
  min-width: 0;
  padding: 8px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(20, 20, 20, .96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  text-align: left;
  overflow-wrap: anywhere;
  text-overflow: clip;
  visibility: hidden;
  white-space: normal;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .16s ease;
}
.scatter-task.is-frontmost { z-index: 30; }
.scatter-task.is-frontmost .scatter-task-label {
  z-index: 40;
  max-width: min(380px, var(--scatter-label-max, 380px));
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}
.scatter-task[data-tooltip-placement="below-left"] .scatter-task-label {
  top: calc(100% + 5px);
  right: calc(100% - 16px);
  transform: translateY(-4px);
}
.scatter-task[data-tooltip-placement="below-center"] .scatter-task-label {
  top: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, -4px);
}
.scatter-task[data-tooltip-placement="below-right"] .scatter-task-label {
  top: calc(100% + 5px);
  left: calc(100% - 16px);
  transform: translateY(-4px);
}
.scatter-task[data-tooltip-placement="above-left"] .scatter-task-label {
  right: calc(100% - 16px);
  bottom: calc(100% + 5px);
  transform: translateY(4px);
}
.scatter-task[data-tooltip-placement="above-center"] .scatter-task-label {
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, 4px);
}
.scatter-task[data-tooltip-placement="above-right"] .scatter-task-label {
  right: auto;
  bottom: calc(100% + 5px);
  left: calc(100% - 16px);
  transform: translateY(4px);
}
.scatter-task:hover .scatter-task-label.is-positioned,
.scatter-task:focus-visible .scatter-task-label.is-positioned,
.scatter-task.is-dragging .scatter-task-label.is-positioned,
#scatter-view.names-visible .scatter-task-label.is-positioned {
  transform: none;
}
.scatter-task:hover .scatter-task-label,
.scatter-task:focus-visible .scatter-task-label,
.scatter-task.is-dragging .scatter-task-label,
#scatter-view.names-visible .scatter-task-label {
  opacity: 1;
  transform: translate(0, 0);
  visibility: visible;
}
.scatter-task[data-tooltip-placement="below-center"]:hover .scatter-task-label,
.scatter-task[data-tooltip-placement="below-center"]:focus-visible .scatter-task-label,
.scatter-task[data-tooltip-placement="below-center"].is-dragging .scatter-task-label,
.scatter-task[data-tooltip-placement="above-center"]:hover .scatter-task-label,
.scatter-task[data-tooltip-placement="above-center"]:focus-visible .scatter-task-label,
.scatter-task[data-tooltip-placement="above-center"].is-dragging .scatter-task-label,
#scatter-view.names-visible .scatter-task[data-tooltip-placement="below-center"] .scatter-task-label,
#scatter-view.names-visible .scatter-task[data-tooltip-placement="above-center"] .scatter-task-label {
  transform: translate(-50%, 0);
}
.scatter-task.is-dragging {
  cursor: grabbing;
}
.scatter-task:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.scatter-task-label.is-positioned {
  right: auto !important;
  bottom: auto !important;
  left: 0 !important;
  top: 0 !important;
  transform: translate3d(var(--scatter-label-left, 0px), var(--scatter-label-top, 0px), 0) !important;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .16s ease;
  will-change: auto;
}
.scatter-task-label.is-reactive {
  transition-duration: .28s, .16s;
  will-change: transform;
}
.scatter-task.is-dragging .scatter-task-label.is-positioned {
  transition-duration: .18s, .12s;
}
.scatter-task-label.is-measuring {
  visibility: hidden !important;
  transition: none !important;
}
.scatter-empty {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 18px;
  left: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  transform: translateY(-50%);
}
.scatter-axis {
  color: var(--muted);
  font-size: 11px;
}
.scatter-axis-y {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  width: 78px;
  justify-self: end;
  padding: 2px 0;
  text-align: right;
}
.scatter-axis-y strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.scatter-axis-x {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.scatter-axis-x strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}
.scatter-axis-x span:last-child { text-align: right; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.quadrant {
  --q: var(--line-strong);
  --q-soft: var(--surface-raised);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 11, 11, .78);
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.quadrant[data-quadrant="do"] { --q: var(--do-color); --q-soft: var(--do-soft); }
.quadrant[data-quadrant="schedule"] { --q: var(--schedule-color); --q-soft: #102b27; }
.quadrant[data-quadrant="delegate"] { --q: var(--delegate-color); --q-soft: #30250e; }
.quadrant[data-quadrant="eliminate"] { --q: var(--eliminate-color); --q-soft: var(--eliminate-soft); }
.quadrant:hover { border-color: var(--line-strong); }
.quadrant.drop-target {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.quadrant.drop-target h2 { color: var(--ink); }
.quadrant.drop-target h2 .dot { filter: brightness(1.18) saturate(1.08); }
.eliminate-section .cards-frame {
  max-height: 34px;
  opacity: 1;
  transition: max-height .28s var(--resize-ease), opacity .18s ease;
}
.eliminate-section.is-populated,
.eliminate-section.is-drop-ready {
  min-height: 150px;
}
.eliminate-section.is-populated .cards-frame,
.eliminate-section.is-drop-ready .cards-frame {
  min-height: calc(44px * 3 + 10px * 2 + 4px);
  max-height: calc(44px * 3 + 10px * 2 + 4px);
}
.eliminate-section.is-populated h2,
.eliminate-section.is-drop-ready h2 { margin-bottom: 18px; }
.eliminate-section.is-populated .cards,
.eliminate-section.is-drop-ready .cards { padding-block-start: 4px; }
.eliminate-drop-copy {
  max-height: 0;
  margin: -8px 0 0;
  overflow: hidden;
  color: var(--q);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
  opacity: 0;
  transition: max-height .22s var(--resize-ease), margin .22s var(--resize-ease), opacity .16s ease;
}
.eliminate-section.is-drop-ready .eliminate-drop-copy {
  max-height: 20px;
  margin: -5px 0 8px;
  opacity: 1;
}
.eliminate-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  height: auto;
  min-height: 26px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: default;
  font-size: 11px;
}
.eliminate-empty strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.eliminate-empty span { color: var(--muted); }
.eliminate-empty.hidden { display: none; }
.eliminate-section .cards-fade { display: block; }

/* On wide desktop the eliminate rail shares the full second grid row. Keep
   its scroll/fade surface tied to the rail's actual bottom edge instead of
   stopping after the first few task heights. Compact layouts retain their
   bounded three-row treatment below. */
@media (min-width: 1041px) {
  .eliminate-section.is-populated .cards-frame,
  .eliminate-section.is-drop-ready .cards-frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
}
.quadrant h2 {
  font-family: var(--font-display);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  row-gap: 1px;
  align-items: center;
  margin-bottom: 16px;
  padding-right: 42px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.quadrant h2 .dot {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--q);
}
.quadrant-name {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.quadrant h2 small {
  font-family: var(--font-body);
  grid-column: 2;
  grid-row: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.quadrant h2 .count {
  font-family: var(--font-body);
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 23px;
  min-width: 23px;
  height: 23px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  place-items: center;
  align-self: start;
  transform: translateZ(0);
  transition:
    color .18s cubic-bezier(.2, 0, 0, 1),
    background-color .18s cubic-bezier(.2, 0, 0, 1),
    border-color .18s cubic-bezier(.2, 0, 0, 1),
    box-shadow .18s cubic-bezier(.2, 0, 0, 1),
    transform .18s cubic-bezier(.2, 0, 0, 1);
}
.quadrant h2 .count.value-flash,
.archive-heading h1 span.value-flash {
  transform: scale(1.06);
}
.quadrant h2 .count.value-flash-up,
.archive-heading h1 span.value-flash-up {
  color: var(--done-color);
  border-color: var(--done-color);
  background: color-mix(in srgb, var(--done-color) 12%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--done-color) 18%, transparent);
}
.quadrant h2 .count.value-flash-down,
.archive-heading h1 span.value-flash-down {
  color: var(--eliminate-color);
  border-color: var(--eliminate-color);
  background: color-mix(in srgb, var(--eliminate-color) 10%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--eliminate-color) 16%, transparent);
}
.cards-frame {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(44px * 4 + 10px * 3 + 32px);
  overflow: hidden;
}
#matrix > .quadrant .cards-frame {
  flex: 1 1 auto;
  max-height: none;
}
.cards {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  list-style: none;
  flex-direction: column;
  gap: 10px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}
.cards.has-overflow:not(.at-bottom) {
  -webkit-mask-image: none;
  mask-image: none;
}
.cards-fade {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(24px, 10%, 34px);
  border-radius: 0;
  content: "";
  background: linear-gradient(to bottom, rgba(11, 11, 11, 0), rgba(11, 11, 11, .025) 28%, rgba(11, 11, 11, .14) 54%, rgba(11, 11, 11, .5) 82%, rgba(11, 11, 11, .78) 100%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .12) 24%, rgba(0, 0, 0, .62) 68%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .12) 24%, rgba(0, 0, 0, .62) 68%, #000 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  visibility: hidden;
}
.cards-frame.has-overflow:not(.at-bottom) .cards-fade {
  opacity: 1;
  visibility: visible;
}
.cards::-webkit-scrollbar { width: 8px; }
.cards::-webkit-scrollbar-track { background: transparent; }
.cards::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--line-strong); }
.empty {
  display: block;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
}
.empty.hidden { display: none; }
.card {
  display: flex;
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
  cursor: grab;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color .15s, background .15s, transform .15s;
}
.card.t-resize {
  overflow: hidden;
  transition:
    height var(--resize-dur) var(--resize-ease),
    border-color .15s ease,
    background-color .15s ease;
  will-change: height;
}
@media (prefers-reduced-motion: reduce) {
  .card.t-resize {
    transition: border-color .15s ease, background-color .15s ease;
    will-change: auto;
  }
  .settings-option input::after { animation: none !important; }
}
.card:hover { border-color: var(--line-strong); background: var(--surface-raised); transform: none; }
.card.dragging {
  opacity: .45;
  transform: scale(.985);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .26);
}
.card.drop-settle {
  animation: card-settle .34s cubic-bezier(.22, 1, .36, 1);
}
.card.card-entered {
  animation: card-enter .24s cubic-bezier(.23, 1, .32, 1) both;
}
@keyframes card-enter {
  from { opacity: .25; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes card-settle {
  0% { opacity: .72; border-color: var(--line-strong); background: var(--surface-raised); }
  65% { opacity: 1; border-color: var(--line-strong); background: var(--surface-raised); }
  100% { opacity: 1; border-color: var(--line); background: var(--surface); }
}
.card .check {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  appearance: none;
}
.card .check:hover { background: var(--q-soft); }
.card .check:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.card.done .check { border-color: var(--line-strong); background: var(--line-strong); }
/* Done cards only carry the archive button, so they need far less action
   reserve: the freed space keeps titles on one line much longer. */
.card.done .card-actions { min-width: 28px; }
.card-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  margin-right: -4px;
  min-width: 60px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: auto;
  transition: opacity .15s;
}
.card:hover .card-actions, .card:focus-within .card-actions { opacity: 1; }
.card-actions button {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: opacity .18s ease, font-weight .18s ease;
}
.card-actions button[hidden] { display: none !important; }
.card-actions .delete { opacity: .58; }
.card-actions .delete:hover, .card-actions .delete:focus-visible {
  opacity: 1;
  border-color: transparent;
  background: transparent;
  transform: none;
}
.card-actions .eliminate-task { opacity: .5; }
.card-actions .eliminate-task:hover,
.card-actions .eliminate-task:focus-visible {
  opacity: 1;
  border-color: transparent;
  background: transparent;
  transform: none;
}
.card-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: stroke-width .18s ease;
}
.card-actions .delete:hover svg, .card-actions .delete:focus-visible svg { stroke-width: 2.35; }
.card-actions .eliminate-task:hover svg,
.card-actions .eliminate-task:focus-visible svg { stroke-width: 2.2; }
.delete-actions { display: flex; gap: 4px; }
.delete-actions[hidden] { display: none; }
.delete-actions:not([hidden]) { animation: delete-actions-in .18s ease-out both; }
.delete-actions button { font-size: 16px; font-weight: 500; line-height: 1; }
.delete-actions button:hover, .delete-actions button:focus-visible {
  border-color: transparent;
  color: inherit;
  background: transparent;
  font-weight: 750;
  outline: none;
  transform: none;
}
.delete-actions .delete-approve { color: var(--ink); }
@keyframes delete-actions-in {
  from { opacity: 0; transform: translateX(3px) scale(.94); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.card .content { flex: 1; min-width: 0; cursor: text; }
.card.done { opacity: .6; }
.card.done .title { color: var(--muted); text-decoration: line-through; }
.card .title, .card .note { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
.card .title { font-weight: 600; }
.card .note { margin-top: 3px; color: var(--muted); font-size: 12px; }
.card .when { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.done-section .card.done {
  min-height: 72px;
  padding-block: 9px;
  gap: 8px;
}
.done-section .card.done .content {
  min-width: 0;
}
.done-section .card.done .title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.25;
  text-overflow: ellipsis;
}
.done-section .card.done .when {
  overflow: hidden;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card.editing { border-color: var(--q); box-shadow: none; cursor: default; }
.card.editing .note { display: block; overflow: visible; }
.card input, .card textarea {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  color: var(--ink);
  background: transparent;
}
.card input { font-weight: 600; }
.card textarea[hidden] { display: none !important; }
.card textarea { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 12px; }
.card input::placeholder, .card textarea::placeholder { color: #66665f; }
.card input:focus-visible, .card textarea:focus-visible { box-shadow: 0 1px 0 var(--q); }
.done-section { --q: var(--done-color); --q-soft: var(--done-soft); min-height: 0; }
.done-delete-actions {
  position: absolute;
  top: 0;
  right: 29px;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 23px;
}
.done-delete-actions button {
  display: grid;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: color .18s ease, opacity .18s ease, font-weight .18s ease;
}
.done-delete-actions button:hover,
.done-delete-actions button:focus-visible {
  color: var(--ink);
  background: transparent;
  outline: none;
}
.done-delete-actions .done-delete { opacity: .5; }
.done-delete-actions .done-delete:hover,
.done-delete-actions .done-delete:focus-visible { opacity: 1; }
.done-delete-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: stroke-width .18s ease;
}
.done-delete-actions .done-delete:hover svg,
.done-delete-actions .done-delete:focus-visible svg { stroke-width: 2.35; }
.done-delete-actions .delete-actions { display: flex; gap: 2px; }
.done-delete-actions .delete-actions[hidden] { display: none; }
.done-delete-actions .delete-actions button:hover,
.done-delete-actions .delete-actions button:focus-visible { font-weight: 750; }
.done-delete-actions .delete-approve { color: var(--ink); }
.quadrant h2 .done-delete-actions + * { z-index: 1; }
.done-section.drop-target {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
#done .cards-frame {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }

/* Compact desktop rule: keep all four working quadrants in one stable 2×2
   grid. The Done panel gets a short third row, so completed history yields
   space before Do, Schedule, or Delegate become unreadable. `#matrix` is
   deliberately flattened here; nesting its own grid inside #layout is what
   caused the old original-layout overlap at narrow desktop widths. */
@media (min-width: 721px) and (max-width: 1040px) {
  #console.matrix-mode {
    overflow: hidden;
  }
  #layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(190px, 1.15fr) minmax(150px, .9fr) minmax(108px, .55fr);
    gap: 12px;
    width: 100%;
    overflow: hidden;
  }
  #layout.original-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(190px, 1.15fr) minmax(150px, .9fr) minmax(108px, .55fr);
  }
  #matrix {
    display: contents;
  }
  #done {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    max-height: none;
  }
  .eliminate-section {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  #layout > #matrix > .quadrant,
  #layout > .quadrant {
    min-height: 0;
    overflow: hidden;
  }
  #layout .eliminate-section.is-populated .cards-frame,
  #layout .eliminate-section.is-drop-ready .cards-frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 156px;
  }
  #layout #done .cards-frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  #matrix > .quadrant[data-quadrant="do"] { grid-column: 1; grid-row: 1; }
  #matrix > .quadrant[data-quadrant="schedule"] { grid-column: 2; grid-row: 1; }
  #matrix > .quadrant[data-quadrant="delegate"] { grid-column: 1; grid-row: 2; }
  #layout.original-layout #matrix > .quadrant[data-quadrant="do"] { grid-column: 1; grid-row: 1; }
  #layout.original-layout #matrix > .quadrant[data-quadrant="schedule"] { grid-column: 2; grid-row: 1; }
  #layout.original-layout #matrix > .quadrant[data-quadrant="delegate"] { grid-column: 1; grid-row: 2; }
  #layout.hide-eliminate-quadrant #matrix > .quadrant[data-quadrant="delegate"] { grid-column: 1 / -1; }
  #layout.original-layout #done {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  #layout.original-layout .eliminate-section {
    grid-column: 2;
    grid-row: 2;
  }
  #scatter-view { grid-column: 1 / -1; grid-row: 1 / -1; }
  #layout.scatter-mode {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  #layout.scatter-mode #done { display: none; }
  #layout.scatter-mode #scatter-view {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  #layout.scatter-mode .scatter-chart-shell {
    width: min(100%, 720px);
    height: 100%;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto 28px;
    min-height: 0;
  }
  #layout.scatter-mode .scatter-axis-y { width: 58px; font-size: 10px; }
  #layout.scatter-mode .scatter-plot {
    width: 100%;
    height: auto;
    max-height: 100%;
  }
}
@media (max-width: 720px) {
  body { min-height: 100dvh; overflow-x: hidden; }
  #console {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-radius: 0;
  }
  .app-identity {
    display: block;
    min-height: 0;
    margin-bottom: var(--space-4);
  }
  .app-brand {
    width: max-content;
    max-width: 100%;
    margin-inline: 0 auto;
    gap: 10px;
  }
  .header-actions {
    position: static;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    margin-top: var(--space-3);
    transform: none;
  }
  .view-switch { flex: 1 1 100%; }
  .view-button { flex: 1 1 0; min-width: 0; }
  .capture-control { width: 100%; min-height: 50px; }
  #quick-add {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    scroll-margin-block: 16px;
  }
  .enter-key {
    min-width: 92px;
    padding: 0 10px;
    font-size: 11px;
    letter-spacing: .02em;
  }
  #layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    align-content: start;
    gap: 12px;
    margin-top: 16px;
    overflow: hidden;
  }
  #layout.original-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  #layout > #done,
  #layout > .eliminate-section,
  #layout > #matrix {
    grid-column: 1;
    grid-row: auto;
  }
  #layout > #matrix {
    order: 1;
  }
  #layout > .eliminate-section {
    order: 2;
  }
  #layout > #done {
    order: 3;
  }
  #layout.original-layout > #done,
  #layout.original-layout > .eliminate-section,
  #layout.original-layout > #matrix {
    grid-column: 1;
    grid-row: auto;
  }
  #layout.scatter-mode {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }
  #layout.scatter-mode #done { display: none; }
  #layout.scatter-mode #scatter-view {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #matrix {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
  }
  #matrix > .quadrant[data-quadrant="do"],
  #matrix > .quadrant[data-quadrant="schedule"],
  #matrix > .quadrant[data-quadrant="delegate"],
  #matrix > .quadrant[data-quadrant="eliminate"] {
    grid-column: auto;
    grid-row: auto;
  }
  #layout.original-layout #matrix > .quadrant[data-quadrant="do"],
  #layout.original-layout #matrix > .quadrant[data-quadrant="schedule"],
  #layout.original-layout #matrix > .quadrant[data-quadrant="delegate"] {
    grid-column: auto;
    grid-row: auto;
  }
  #matrix > .quadrant[data-quadrant="eliminate"] { min-height: 96px; }
  #matrix > .quadrant[data-quadrant="eliminate"].is-populated,
  #matrix > .quadrant[data-quadrant="eliminate"].is-drop-ready { min-height: 150px; }
  #matrix > .quadrant[data-quadrant="eliminate"].is-populated .cards-frame,
  #matrix > .quadrant[data-quadrant="eliminate"].is-drop-ready .cards-frame {
    max-height: calc(60px * 3 + 8px * 2 + 4px);
  }
  .quadrant, .done-section {
    min-height: 0;
    max-height: 360px;
    padding: 16px;
    border-radius: 13px;
  }
  .eliminate-section { min-height: 96px; }
  .quadrant h2 {
    margin-bottom: 12px;
    font-size: 16px;
  }
  .quadrant h2 small {
    font-size: 13px;
    letter-spacing: 0;
  }
  .quadrant h2 .count {
    width: 24px;
    min-width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .cards-frame {
    max-height: calc(60px * 4 + 8px * 3 + 32px);
    min-height: 0;
  }
  #done .cards-frame {
    flex: 0 1 auto;
    max-height: calc(60px * 3 + 8px * 2 + 32px);
  }
  .cards {
    gap: 8px;
  }
  .card {
    gap: 8px;
    min-height: 60px;
    padding: 8px 12px;
    touch-action: manipulation;
  }
  .card .check {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-left: -12px;
    border: 0;
    background: transparent;
  }
  .card .check::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    content: "";
    transform: translate(-50%, -50%);
  }
  .card .check:hover { background: var(--q-soft); }
  .card.done .check {
    border-color: transparent;
    background: transparent;
  }
  .card.done .check::after {
    border-color: var(--line-strong);
    background: var(--line-strong);
  }
  .card .title { font-size: 14px; }
  .card .note { font-size: 13px; }
  .card .when { font-size: 11px; }
  .card-actions {
    gap: 4px;
    margin-left: 4px;
    margin-right: -8px;
    opacity: 1;
  }
  .card-actions button {
    width: 44px;
    height: 44px;
  }
  .card-actions svg { width: 16px; height: 16px; }
  #scatter-view { gap: 14px; }
  .archive-view {
    gap: 14px;
    padding: 16px;
    border-radius: 13px;
  }
  .archive-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .scatter-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .scatter-chart-shell {
    grid-template-columns: 72px minmax(0, 1fr);
    width: 100%;
    grid-template-rows: auto 28px;
    width: 100%;
    height: auto;
    gap: 6px 8px;
  }
  .scatter-axis-y { width: 72px; }
  .scatter-plot {
    width: 100%;
    height: auto;
    max-height: none;
  }
}
@media (max-width: 440px) {
  .enter-key { min-width: 84px; padding: 0 8px; font-size: 10px; }
  .quadrant { padding: 15px; border-radius: 13px; }
}
@media (pointer: coarse) {
  .card-actions { opacity: 1; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .card.drop-settle { animation: none !important; }
  .card.card-entered { animation: none !important; }
  .delete-actions:not([hidden]) { animation: none !important; }
  .card:hover { transform: none; }
}

/* Direct, annotatable iPhone 16 Pro preview: ?iphone=1 */
html.iphone-preview {
  min-width: 390px;
  background: #1a1a1a;
}
html.iphone-preview body {
  display: flex;
  min-height: 100dvh;
  padding: 24px 0;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  background: #1a1a1a;
}
html.iphone-preview #phone-shell {
  display: block;
  position: relative;
  flex: none;
  width: 402px;
  height: 856px;
  overflow: hidden;
  border: 6px solid #292929;
  border-radius: 50px;
  background: var(--screen);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}
html.iphone-preview #phone-shell::before {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 50%;
  width: 126px;
  height: 37px;
  border-radius: 999px;
  content: "";
  background: #020202;
  box-shadow: inset 0 0 0 1px #090909, 0 1px 4px rgba(0, 0, 0, .45);
  pointer-events: none;
  transform: translateX(-50%);
}
html.iphone-preview #console {
  position: relative;
  display: block;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 58px 15px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 44px;
}
html.iphone-preview .capture-control { width: 100%; min-height: 50px; }
html.iphone-preview #quick-add {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  scroll-margin-block: 16px;
}
html.iphone-preview .enter-key {
  min-width: 84px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: .02em;
}
html.iphone-preview #layout {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}
html.iphone-preview #done { order: 2; }
html.iphone-preview #matrix {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: none;
  order: 1;
  gap: 12px;
}
html.iphone-preview #matrix > .quadrant[data-quadrant="do"],
html.iphone-preview #matrix > .quadrant[data-quadrant="schedule"],
html.iphone-preview #matrix > .quadrant[data-quadrant="delegate"],
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"] {
  grid-column: auto;
  grid-row: auto;
}
html.iphone-preview #layout.original-layout #matrix > .quadrant[data-quadrant="do"],
html.iphone-preview #layout.original-layout #matrix > .quadrant[data-quadrant="schedule"],
html.iphone-preview #layout.original-layout #matrix > .quadrant[data-quadrant="delegate"] {
  grid-column: auto;
  grid-row: auto;
}
html.iphone-preview #layout.original-layout #done,
html.iphone-preview #layout.original-layout .eliminate-section {
  grid-column: auto;
  grid-row: auto;
}
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"] { min-height: 96px; }
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"].is-populated,
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"].is-drop-ready { min-height: 150px; }
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"].is-populated .cards-frame,
html.iphone-preview #matrix > .quadrant[data-quadrant="eliminate"].is-drop-ready .cards-frame {
  max-height: calc(60px * 3 + 8px * 2 + 4px);
}
html.iphone-preview .quadrant,
html.iphone-preview .done-section {
  min-height: 0;
  padding: 15px;
  border-radius: 13px;
}
html.iphone-preview .eliminate-section { min-height: 96px; }
html.iphone-preview .quadrant h2 {
  margin-bottom: 12px;
  font-size: 16px;
}
html.iphone-preview .quadrant h2 small { font-size: 13px; letter-spacing: 0; }
html.iphone-preview .quadrant h2 .count {
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 10px;
}
html.iphone-preview .cards-frame {
  max-height: calc(60px * 4 + 8px * 3 + 32px);
  min-height: 0;
}
html.iphone-preview #done .cards-frame {
  flex: 0 1 auto;
  max-height: calc(60px * 3 + 8px * 2 + 32px);
}
html.iphone-preview .cards {
  gap: 8px;
}
html.iphone-preview .card {
  gap: 8px;
  min-height: 60px;
  padding: 8px 12px;
  touch-action: manipulation;
}
html.iphone-preview .card .check {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin-left: -12px;
  border: 0;
  background: transparent;
}
html.iphone-preview .card .check::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}
html.iphone-preview .card .check:hover { background: var(--q-soft); }
html.iphone-preview .card.done .check {
  border-color: transparent;
  background: transparent;
}
html.iphone-preview .card.done .check::after {
  border-color: var(--line-strong);
  background: var(--line-strong);
}
html.iphone-preview .card .title { font-size: 14px; }
html.iphone-preview .card .note { font-size: 13px; }
html.iphone-preview .card .when { font-size: 11px; }
html.iphone-preview .card-actions {
  gap: 4px;
  margin-left: 4px;
  margin-right: -8px;
  opacity: 1;
}
html.iphone-preview .card-actions button { width: 44px; height: 44px; }
html.iphone-preview .card-actions svg { width: 16px; height: 16px; }

/* Completed-task check: the supplied Transitions.dev dash-offset pattern,
   adapted only to the existing circular task-control class. */
:root {
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: cubic-bezier(.22, 1, .36, 1);
  --check-len: 15;
}
.card .check {
  display: grid;
  place-items: center;
  transition:
    background var(--check-box) var(--check-ease),
    box-shadow var(--check-box) var(--check-ease);
}
.card .check > svg {
  display: block;
  width: 11px;
  height: 11px;
  overflow: visible;
  pointer-events: none;
  fill: none;
}
.card .check svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--check-len, 15);
  stroke-dashoffset: var(--check-len, 15);
  transition: stroke-dashoffset var(--check-uncheck) var(--check-ease);
}
.card .check[aria-checked="true"] {
  background: var(--done-color);
  border-color: var(--done-color);
  color: var(--screen);
}
.card .check[aria-checked="true"] svg path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--check-draw) var(--check-ease) var(--check-delay);
}
.card .check:hover { background: transparent; }
.card .check[aria-checked="true"]:hover,
.card.done .check[aria-checked="true"]:hover { background: var(--done-color); }

/* Keep the existing larger mobile hit area, while the visible circle stays 18px. */
@media (max-width: 640px) {
  .card .check,
  .card.done .check,
  html.iphone-preview .card .check,
  html.iphone-preview .card.done .check {
    border-color: transparent;
    background: transparent;
  }
  .card .check[aria-checked="true"],
  .card.done .check[aria-checked="true"],
  html.iphone-preview .card .check[aria-checked="true"],
  html.iphone-preview .card.done .check[aria-checked="true"] {
    color: var(--screen);
    background: transparent;
  }
  .card .check:hover,
  .card.done .check:hover,
  html.iphone-preview .card .check:hover,
  html.iphone-preview .card.done .check:hover { background: transparent; }
  .card .check[aria-checked="true"]::after,
  .card.done .check[aria-checked="true"]::after,
  html.iphone-preview .card .check[aria-checked="true"]::after,
  html.iphone-preview .card.done .check[aria-checked="true"]::after {
    border-color: var(--done-color);
    background: var(--done-color);
  }
}
@media (prefers-reduced-motion: reduce) {
  .card .check,
  .card .check svg path { transition: none !important; }
}

/* Local metal frame: same layered rim/inner-shadow structure as the referenced
   component, kept as a thin border around the existing Enter → Do control. */
.enter-key {
  background: #272727;
  color: #f8f8f8;
  border-radius: 0 10px 10px 0;
}
.enter-key::before {
  inset: 0;
  border: 1px solid transparent;
  border-radius: 0 10px 10px 0;
  background:
    linear-gradient(115deg,
      var(--metal-shadow) 0%,
      var(--metal-mid) 28%,
      var(--metal-highlight) 46%,
      var(--metal-shadow) 66%,
      var(--metal-mid) 100%) border-box;
  box-shadow: inset 0 0 50px 0 rgba(255, 255, 255, .02);
  background-size: 180% 100%;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .86;
  transition: opacity .22s ease, background-position .48s cubic-bezier(.22, 1, .36, 1);
}
.enter-key::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  content: "";
  pointer-events: none;
}
.capture-control:focus-within .enter-key::before,
.enter-key:hover::before {
  background-position: 100% 50%;
  opacity: 1;
}

/* WebGL metal surface (metal-shader.js): an absolutely positioned canvas
   inside the Enter → Do control, painted below the text and arrow. It never
   changes layout, never intercepts pointer or keyboard input, and stays
   hidden with the CSS rim restored whenever WebGL is unavailable. */
.enter-key-metal {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.enter-key.metal-active::before {
  opacity: 0;
}

/* Calendar view: a month grid with a dated quick-add capture. Layout mirrors
   the archive panel so the calendar reads as one quiet sheet over the board. */
#console > .capture-panel { z-index: 2; }
/* The calendar page has its own inline capture. The shared top bar collapses
   on this view so the calendar sheet moves up into the former capture slot. */
#console.calendar-mode .capture-panel .capture-control { display: none; }
#layout.calendar-mode {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
}
#layout.calendar-mode .eliminate-section { display: none; }
#layout.calendar-mode #matrix[hidden],
#layout.calendar-mode #done[hidden],
#layout.calendar-mode #scatter-view[hidden],
#layout.calendar-mode #archive-view[hidden] { display: none !important; }
.calendar-view {
  position: relative;
  display: none;
  grid-column: 1 / -1;
  align-self: stretch;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 11, 11, .78);
}
.calendar-view:not([hidden]) { display: flex; }
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.calendar-heading h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.calendar-nav-button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: color .18s ease, border-color .18s ease;
}
.calendar-today-button {
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease;
}
.calendar-nav-button:hover,
.calendar-nav-button:focus-visible,
.calendar-today-button:hover,
.calendar-today-button:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
  outline: none;
}
.calendar-nav-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.calendar-capture {
  display: flex;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.calendar-capture:focus-within {
  border-color: var(--focus-neutral);
  box-shadow: 0 0 0 1px var(--focus-neutral);
}
#calendar-quick-add {
  min-width: 0;
  flex: 1;
  padding: 15px 16px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}
#calendar-quick-add::placeholder { color: #696963; }
#calendar-quick-add:disabled { opacity: .55; }
#calendar-quick-add:focus-visible { box-shadow: none; }
.calendar-date-wrap {
  position: relative;
  display: flex;
}
.calendar-date-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease;
}
.calendar-date-button:hover,
.calendar-date-button:focus-visible,
.calendar-date-button[aria-expanded="true"] {
  color: var(--accent);
  outline: none;
}
.calendar-date-button.is-empty { color: var(--muted); }
.calendar-date-button.is-empty:hover,
.calendar-date-button.is-empty:focus-visible { color: var(--ink); }
.calendar-date-button svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.calendar-date-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  width: 264px;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.calendar-date-popover[hidden] { display: none; }
.date-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.date-popover-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.date-popover-nav {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: color .18s ease;
}
.date-popover-nav:hover,
.date-popover-nav:focus-visible { color: var(--ink); outline: none; }
.date-popover-nav svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.date-popover-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.date-popover-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: center;
}
.date-popover-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.date-popover-day {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  place-items: center;
  transition: background .14s ease, color .14s ease;
}
.date-popover-day:hover,
.date-popover-day:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
.date-popover-day.is-outside { color: #5b5b56; }
.date-popover-day.is-today::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}
.date-popover-day.is-selected,
.date-popover-day.is-selected:hover {
  color: #0b0b0b;
  background: var(--accent);
  font-weight: 650;
}
.date-popover-day.is-selected.is-today::after { background: rgba(11, 11, 11, .6); }
.calendar-capture:focus-within .enter-key::before {
  background-position: 100% 50%;
  opacity: 1;
}

/* Card due chip: a date marker resting over the action-button slot. On hover
   the action buttons fade in and the chip slides left of them; a hairline
   divider travels with it. Click the chip to change the date. */
.card-due {
  position: absolute;
  top: 50%;
  right: 14px;
  flex: none;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-50%);
  transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.card-due:hover,
.card-due:focus-visible {
  color: var(--ink);
  border-color: var(--line-strong);
  outline: none;
}
.card:is(:hover, :focus-within) .card-due { transform: translate(-64px, -50%); }
.card.done .card-due { display: none; }
@media (prefers-reduced-motion: reduce) {
  .card-due { transition: color .18s ease, border-color .18s ease; }
}
.calendar-board {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
}
.calendar-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.calendar-day {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  padding: 6px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .14s ease;
}
.calendar-day:hover { background: rgba(255, 255, 255, .02); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-child(n+36) { border-bottom: 0; }
.calendar-day.is-outside { background: rgba(255, 255, 255, .015); }
.calendar-day.is-outside .calendar-day-number { color: #5b5b56; }
.calendar-day.is-picked { background: rgba(255, 89, 8, .07); }
.calendar-day.is-picked:not(.is-today) .calendar-day-number { color: var(--accent); }
.calendar-day-number {
  display: grid;
  align-self: flex-end;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  place-items: center;
}
.calendar-day.is-today .calendar-day-number {
  color: #0b0b0b;
  background: var(--accent);
  font-weight: 650;
}
.calendar-day-tasks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}
.calendar-task {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, .05);
  font-size: 11px;
  line-height: 1.3;
}
.calendar-task[draggable="true"] { cursor: grab; }
.calendar-task.is-dragging { opacity: .45; }
.calendar-day.is-drop-target {
  background: rgba(255, 89, 8, .07);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.calendar-task-bar {
  flex: none;
  align-self: stretch;
  width: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}
.calendar-task[data-quadrant="do"] .calendar-task-bar { background: var(--do-color); }
.calendar-task[data-quadrant="schedule"] .calendar-task-bar { background: var(--schedule-color); }
.calendar-task[data-quadrant="delegate"] .calendar-task-bar { background: var(--delegate-color); }
.calendar-task[data-quadrant="eliminate"] .calendar-task-bar { background: var(--eliminate-color); }
.calendar-task-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-task.is-done { opacity: .55; }
.calendar-task.is-done .calendar-task-title { text-decoration: line-through; }
/* Day overlay: a smaller, scrollable sibling of a matrix quadrant. It shows
   every live task attached to the selected day and floats next to its cell. */
.calendar-day-popover {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 300px;
  max-width: calc(100% - 24px);
  max-height: 340px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(11, 11, 11, .94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.calendar-day-popover[hidden] { display: none; }
.calendar-day-popover-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid var(--line);
}
.calendar-day-popover-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.calendar-day-popover-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  place-items: center;
}
.calendar-day-popover-close {
  display: grid;
  width: 26px;
  height: 26px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
  transition: color .18s ease;
}
.calendar-day-popover-close:hover,
.calendar-day-popover-close:focus-visible { color: var(--ink); outline: none; }
.calendar-day-popover-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.calendar-day-popover-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px 12px 14px;
  overflow-y: auto;
}
.calendar-day-popover-list .card { cursor: default; }
.calendar-day-popover-list .card:hover { transform: none; }
.calendar-day-popover-list .card-due { display: none; }
.calendar-day-popover-list .card[data-quadrant="do"] { --q: var(--do-color); --q-soft: var(--do-soft); }
.calendar-day-popover-list .card[data-quadrant="schedule"] { --q: var(--schedule-color); --q-soft: #102b27; }
.calendar-day-popover-list .card[data-quadrant="delegate"] { --q: var(--delegate-color); --q-soft: #30250e; }
.calendar-day-popover-list .card[data-quadrant="eliminate"] { --q: var(--eliminate-color); --q-soft: var(--eliminate-soft); }
.card-date-popover {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 60;
}

/* Cloud account block in the settings panel. */
.settings-cloud-status {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.settings-cloud .settings-action + .settings-action { margin-top: 6px; }
.settings-cloud .settings-action[hidden] { display: none; }
.calendar-more {
  padding: 2px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
@media (max-width: 720px) {
  .calendar-view { padding: 16px; }
  .calendar-day { padding: 4px; }
  .calendar-task { padding: 2px 5px; font-size: 10px; }
  .calendar-capture .enter-key { min-width: 84px; padding: 0 8px; font-size: 10px; }
  .calendar-date-popover { width: 240px; }
}

/* Five second Undo next to the destination quadrant's count. Same quiet gray
   as the subtext under each quadrant name. */
.quadrant-undo {
  position: absolute;
  top: 0;
  right: 30px;
  display: inline-flex;
  height: 23px;
  align-items: center;
}
.quadrant-undo[hidden] { display: none; }
.quadrant-undo-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .03em;
  cursor: pointer;
  transition: color .16s ease;
}
.quadrant-undo-button:hover,
.quadrant-undo-button:focus-visible { color: var(--ink); outline: none; }

/* Eliminate cards get the same breathing room as Done: two lines maximum,
   then an ellipsis, instead of four cramped ones. */
.eliminate-section .card .title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
  text-overflow: ellipsis;
}

/* Day-overlay rows drag onto other days, like the grid chips. */
.calendar-day-popover-list .card { cursor: grab; }
.calendar-day-popover .card.is-dragging { opacity: .45; }
