:root {
  color-scheme: dark;
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface-0: #313244;
  --surface-1: #45475a;
  --text: #cdd6f4;
  --muted: #a6adc8;
  --subtle: #6c7086;
  --blue: #89b4fa;
  --accent: #cba6f7;
  --green: #a6e3a1;
  --red: #f38ba8;
  --flamingo: #eba0ac;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--base);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-mono);
}

[data-idle-hide] {
  transition: opacity 220ms ease, visibility 0s linear;
}

body.is-idle {
  cursor: none;
}

body.is-idle [data-idle-hide] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

button,
a {
  font: inherit;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.home {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-content {
  width: max-content;
  max-width: 100%;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 5vw, 2rem);
}

p {
  margin: 0.5rem 0;
  color: var(--muted);
  line-height: 1.7;
}

.directory {
  width: 100%;
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 5vw, 3rem);
}

.directory-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.directory-column h2 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.social-column h2,
.social-column a {
  color: var(--blue);
}

.tools-column h2,
.tools-column a {
  color: var(--accent);
}

.dashboards-column h2,
.dashboards-column a {
  color: var(--green);
}

.tool-shell {
  width: min(100%, 1280px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-rows: auto 1fr;
}

.tool-header {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  color: var(--muted);
}

.wordmark-short {
  display: none;
}

.tool-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tool-switcher a {
  text-underline-offset: 0.25em;
}

.tool-switcher [aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.clock-panel {
  align-self: center;
  min-width: 0;
  padding: 4rem 0;
  text-align: center;
}

.clock {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-size: clamp(3.25rem, 14vw, 9rem);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1;
}

.clock.eastern-time,
.clock.eastern-time .clock-seconds,
.clock.eastern-time .clock-period {
  color: var(--blue);
}

.clock:not(.eastern-time) .clock-seconds,
.clock:not(.eastern-time) .clock-period {
  color: var(--text);
}

.clock-suffix {
  position: absolute;
  left: 100%;
  bottom: 0.08em;
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.clock-seconds,
.clock-period {
  color: var(--accent);
  font-size: 0.42em;
  letter-spacing: -0.04em;
}

.clock-period {
  margin-left: 0.3em;
}

.analog-clock {
  --pacific-hour-angle: 0deg;
  --eastern-hour-angle: 0deg;
  --minute-angle: 0deg;
  --second-angle: 0deg;
  position: relative;
  width: clamp(16rem, 48vw, 27rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--surface-1);
  border-radius: 50%;
  background: var(--mantle);
}

.clock-notch {
  position: absolute;
  inset: 0.45rem;
  z-index: 1;
  transform: rotate(calc(var(--notch-index) * 6deg));
}

.clock-notch-mark {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.35rem;
  border-radius: 999px;
  background: var(--subtle);
  transform: translateX(-50%);
}

.hour-notch .clock-notch-mark {
  width: 2px;
  height: 0.7rem;
  background: var(--text);
}

.clock-number {
  position: absolute;
  inset: 1.35rem;
  z-index: 2;
  color: var(--muted);
  font-size: clamp(0.65rem, 1.7vw, 0.9rem);
  font-variant-numeric: tabular-nums;
  text-align: center;
  transform: rotate(calc(var(--clock-index) * 30deg));
}

.clock-number > span {
  display: inline-block;
  transform: rotate(calc(var(--clock-index) * -30deg));
}

.clock-number:nth-child(3n + 1) {
  color: var(--text);
  font-weight: 700;
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  z-index: 3;
  display: block;
  border-radius: 999px;
  transform-origin: 50% 100%;
}

.hour-hand {
  width: 0.38rem;
  height: 27%;
  background: var(--text);
  transform: translateX(-50%) rotate(var(--pacific-hour-angle));
}

.eastern-hour-hand {
  width: 0.2rem;
  height: 25%;
  background: var(--blue);
  transform: translateX(-50%) rotate(var(--eastern-hour-angle));
}

.minute-hand {
  width: 0.25rem;
  height: 37%;
  background: var(--muted);
  transform: translateX(-50%) rotate(var(--minute-angle));
}

.second-hand {
  width: 0.12rem;
  height: 41%;
  background: var(--accent);
  transform: translateX(-50%) rotate(var(--second-angle));
}

.clock-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 0.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.clock-date {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.clock-zones {
  margin-top: 0.35rem;
  display: grid;
  justify-content: center;
  gap: 0.25rem;
}

.clock-zone {
  display: grid;
  grid-template-columns: 1.25rem 19ch max-content auto;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.clock-zone[aria-pressed="false"] {
  opacity: 0.42;
}

.pacific-zone[aria-pressed="true"] {
  color: var(--text);
}

.eastern-zone[aria-pressed="true"] {
  color: var(--blue);
}

.zone-separator {
  margin-left: 0.4rem;
  text-align: center;
}

.zone-name {
  margin-left: 0.4rem;
}

.zone-marker {
  width: 0.85rem;
  height: 2px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.pacific-marker {
  background: var(--text);
}

.eastern-marker {
  background: var(--blue);
}

.clock-controls {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.control-button,
.calendar-button {
  border: 1px solid var(--surface-1);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.control-button {
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
}

.control-button:hover,
.control-button[aria-pressed="true"],
.calendar-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.timer-panel {
  align-self: center;
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 4rem 0;
  text-align: center;
}

.timer-modes {
  margin-bottom: clamp(2.5rem, 8vh, 5rem);
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.timer-mode,
.timer-button {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--surface-1);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.timer-mode:hover,
.timer-mode[aria-selected="true"],
.timer-button:hover,
.timer-button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.timer-display {
  min-height: 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: clamp(3.25rem, 14vw, 8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1;
}

.timer-display.countdown-display {
  min-height: 9em;
  font-size: clamp(1.05rem, 2.8vw, 1.85rem);
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.countdown-duration {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-values {
  display: grid;
  grid-template-columns: minmax(2ch, max-content) max-content;
  justify-content: center;
  column-gap: 0.55em;
  row-gap: 0.08em;
}

.countdown-value {
  color: var(--text);
  text-align: right;
}

.countdown-unit {
  color: var(--muted);
  text-align: left;
}

.countdown-until {
  max-width: min(80vw, 34rem);
  margin-top: 0.65em;
  color: var(--accent);
  text-align: center;
  overflow-wrap: anywhere;
}

.timer-display.is-complete {
  color: var(--green);
  animation: timer-complete-pulse 1.8s ease-in-out infinite;
}

@keyframes timer-complete-pulse {
  50% {
    opacity: 0.58;
  }
}

.timer-options {
  min-height: 6rem;
  margin-top: clamp(2rem, 7vh, 4rem);
}

.timer-option-panel,
.pomodoro-styles,
.pomodoro-presets,
.pomodoro-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

#timer-options-pomodoro {
  display: grid;
  grid-template-rows: 2rem 1.25rem 2rem 2rem;
  align-items: center;
  justify-items: center;
  gap: 0.75rem;
}

.pomodoro-styles {
  grid-row: 1;
}

.pomodoro-phase {
  grid-row: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.pomodoro-presets {
  grid-row: 3;
}

.pomodoro-controls {
  grid-row: 4;
}

.countdown-form {
  width: min(100%, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(13rem, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  text-align: left;
}

.countdown-form label {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
}

.countdown-form label > span {
  color: var(--subtle);
  font-size: 0.68rem;
}

.countdown-form input {
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--surface-1);
  border-radius: 6px;
  outline: none;
  background: var(--mantle);
  color: var(--text);
  caret-color: var(--accent);
  font: inherit;
  font-size: 0.75rem;
  color-scheme: dark;
}

.countdown-form input:focus {
  border-color: var(--accent);
}

.countdown-form input::placeholder {
  color: var(--subtle);
}

.calendar-panel {
  align-self: center;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 3rem 0;
}

.calendar-heading {
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.calendar-heading > .calendar-button {
  justify-self: start;
}

.calendar-actions {
  justify-self: end;
  display: flex;
  gap: 0.5rem;
}

.calendar-title {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.8rem);
  text-align: center;
}

.calendar-button {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.15rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.weekday,
.calendar-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-variant-numeric: tabular-nums;
}

.weekday {
  color: var(--accent);
  font-size: clamp(0.63rem, 2vw, 0.75rem);
  text-transform: lowercase;
}

.weekday:first-child,
.weekday:nth-child(7) {
  color: var(--blue);
}

.calendar-day {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(0.78rem, 2.4vw, 1rem);
}

.calendar-day:hover {
  border-color: var(--surface-1);
}

.calendar-day.other-month {
  color: var(--surface-1);
}

.calendar-day.today {
  color: var(--accent);
  font-weight: 700;
}

.calendar-day.selected {
  border-color: var(--accent);
}

.calendar-day.selected:hover {
  border-color: var(--accent);
}

.diff-panel {
  align-self: start;
  width: 100%;
  min-width: 0;
  padding: clamp(3rem, 8vh, 6rem) 0 2rem;
}

.diff-editors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.diff-input {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
}

.diff-input > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.diff-input:first-child > span {
  color: var(--red);
}

.diff-input:last-child > span {
  color: var(--green);
}

.diff-input textarea {
  width: 100%;
  min-height: 15rem;
  padding: 0.85rem;
  resize: vertical;
  border: 1px solid var(--surface-0);
  border-radius: 7px;
  outline: none;
  background: var(--mantle);
  color: var(--text);
  caret-color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.5;
  tab-size: 2;
}

.diff-input textarea:focus {
  border-color: var(--accent);
}

.diff-input textarea::placeholder {
  color: var(--subtle);
}

.diff-output {
  margin-top: 1.25rem;
  padding: 0.35rem 0;
  overflow: auto;
  border: 1px solid var(--surface-0);
  border-radius: 7px;
  background: var(--mantle);
}

.diff-row {
  min-width: 40rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diff-side {
  min-width: 0;
  min-height: 1.65rem;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  align-items: center;
}

.diff-line-number {
  min-height: 1.65rem;
  padding: 0.12rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--subtle);
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: right;
  user-select: none;
}

.diff-line-text {
  min-width: max-content;
  padding: 0.12rem 0.7rem;
  display: block;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: pre;
}

.diff-delete {
  background: rgba(243, 139, 168, 0.1);
}

.diff-delete .diff-line-number {
  color: var(--red);
}

.diff-insert {
  background: rgba(166, 227, 161, 0.1);
}

.diff-insert .diff-line-number {
  color: var(--green);
}

.diff-token-delete {
  background: rgba(243, 139, 168, 0.28);
  color: var(--text);
}

.diff-token-insert {
  background: rgba(166, 227, 161, 0.28);
  color: var(--text);
}

.diff-blank {
  background: transparent;
}

.diff-message {
  margin: 0;
  padding: 4rem 1rem;
  color: var(--subtle);
  font-size: 0.8rem;
  text-align: center;
}

.diff-identical {
  color: var(--green);
}

.colors-panel {
  align-self: center;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 3rem 0;
}

.palette-tabs {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
}

.palette-tab {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--surface-1);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
}

.palette-tab:hover,
.palette-tab[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.palette-grid {
  display: grid;
  grid-template-rows: repeat(14, minmax(2.7rem, auto));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 5rem);
}

.palette-color {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0 0.45rem;
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--surface-0);
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.palette-color:hover {
  background: var(--mantle);
}

.palette-color.is-copied {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.palette-swatch {
  width: 1.25rem;
  height: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
  border-radius: 999px;
}

.palette-name {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-hex {
  color: var(--muted);
  font: inherit;
}

.calendar-reset {
  color: var(--accent);
}

.calendar-reset[hidden] {
  display: none;
}

.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;
}

.tasks-panel {
  align-self: start;
  width: 100%;
  padding: clamp(3rem, 8vh, 6rem) 0 2rem;
}

.task-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.task-lane {
  --lane-color: var(--flamingo);
  min-width: 0;
  min-height: 22rem;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--surface-0);
  border-top: 2px solid var(--lane-color);
  border-radius: 8px;
  background: var(--mantle);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.task-lane[data-lane="next"] {
  --lane-color: var(--accent);
}

.task-lane[data-lane="later"] {
  --lane-color: var(--blue);
}

.task-lane.drag-over {
  border-color: var(--lane-color);
  box-shadow: 0 0 0 1px var(--lane-color);
}

.task-lane-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-lane-header h2 {
  margin: 0;
  color: var(--lane-color);
  font-size: 1rem;
  font-weight: 500;
}

.task-count {
  margin-right: auto;
  color: var(--subtle);
  font-size: 0.7rem;
}

.task-lane-tools {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.task-lane-control {
  position: relative;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
}

.task-lane-control::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.4rem);
  right: 0;
  width: max-content;
  max-width: 12rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--surface-1);
  border-radius: 4px;
  background: var(--crust);
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-0.15rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.task-lane-control:not(:disabled):hover::after,
.task-lane-control:not(:disabled):focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.task-lane-control:hover,
.task-lane-control:focus-visible,
.task-lane-control.is-active {
  outline: none;
  background: var(--surface-0);
  color: var(--lane-color);
}

.task-lane-control:disabled {
  opacity: 0.28;
  cursor: default;
}

.task-visibility-icon {
  position: relative;
  width: 0.95rem;
  height: 0.58rem;
  border: 1px solid currentColor;
  border-radius: 50% / 62%;
}

.task-visibility-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.task-visibility-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.toggle-completed.is-active .task-visibility-icon::after {
  opacity: 1;
}

.task-clear-icon {
  position: relative;
  width: 0.52rem;
  height: 0.58rem;
  border: 1px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
  transform: translateY(0.15rem);
}

.task-clear-icon::before {
  content: "";
  position: absolute;
  top: -0.17rem;
  left: -0.1rem;
  width: 0.62rem;
  border-top: 1px solid currentColor;
}

.task-clear-icon::after {
  content: "";
  position: absolute;
  top: -0.29rem;
  left: 50%;
  width: 0.22rem;
  height: 0.11rem;
  border: 1px solid currentColor;
  border-bottom: 0;
  transform: translateX(-50%);
}

.clear-lane:hover,
.clear-lane:focus-visible {
  color: var(--red);
}

.clear-lane.is-armed {
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
}

.task-add {
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  gap: 0.4rem;
}

.task-add input,
.task-edit-form input {
  min-width: 0;
  border: 1px solid var(--surface-1);
  border-radius: 5px;
  outline: none;
  background: var(--base);
  color: var(--text);
  font: inherit;
}

.task-add input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.75rem;
}

.task-add input::placeholder {
  color: var(--subtle);
}

.task-add input:focus,
.task-edit-form input:focus {
  border-color: var(--lane-color);
  box-shadow: 0 0 0 1px var(--lane-color);
}

.task-add button,
.task-icon-button {
  padding: 0;
  border: 1px solid var(--surface-1);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.task-add button:hover,
.task-icon-button:hover {
  border-color: var(--lane-color);
  color: var(--lane-color);
}

.task-list {
  flex: 1;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.task-item {
  min-height: 3.25rem;
  padding: 0.7rem 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-0) 45%, transparent);
  font-size: 0.78rem;
  line-height: 1.45;
}

.task-item.completion-separator {
  border-bottom-color: var(--surface-1);
}

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

.task-item input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--lane-color);
  cursor: pointer;
}

.task-item.dragging {
  opacity: 0.35;
}

.task-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-item.completed .task-text {
  color: var(--subtle);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.task-actions {
  display: flex;
  gap: 0.3rem;
  opacity: 0;
  transform: translateX(0.2rem);
  transition: opacity 220ms ease, transform 140ms ease, visibility 0s linear;
}

.task-item:hover .task-actions,
.task-item:focus-within .task-actions {
  opacity: 1;
  transform: translateX(0);
}

body.is-idle .task-actions {
  visibility: hidden;
  opacity: 0 !important;
  transition: opacity 220ms ease, transform 140ms ease, visibility 0s linear 220ms;
}

.task-icon-button {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.8rem;
  line-height: 1;
}

.task-icon-button.delete-task:hover {
  border-color: var(--red);
  color: var(--red);
}

.task-edit-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.65rem 1.65rem;
  gap: 0.3rem;
}

.task-edit-form input {
  width: 100%;
  padding: 0.3rem 0.45rem;
  font-size: 0.75rem;
}

.notes-panel {
  min-width: 0;
  min-height: 0;
  padding: clamp(2rem, 6vh, 4rem) 0 2rem;
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}

.notes-sidebar {
  --note-tab-height: 2.75rem;
  min-width: 0;
  min-height: 0;
  padding-right: 1rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--surface-0);
}

.note-tabs {
  min-height: 0;
  flex: 0 1 auto;
  overflow-y: auto;
}

.note-tab-row {
  min-width: 0;
  height: var(--note-tab-height);
  min-height: var(--note-tab-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-left: 2px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-0) 45%, transparent);
}

.note-tab-row.selected {
  border-left-color: var(--accent);
  background: var(--mantle);
}

.note-tab {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0.7rem 0.45rem 0.7rem 0.7rem;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.note-tab-row.selected .note-tab,
.note-tab:hover {
  color: var(--text);
}

.note-tab-actions {
  height: 100%;
  padding-right: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  opacity: 0;
  transform: translateX(0.15rem);
  transition: opacity 140ms ease, transform 140ms ease;
}

.note-tab-row:hover .note-tab-actions,
.note-tab-row:focus-within .note-tab-actions {
  opacity: 1;
  transform: translateX(0);
}

.note-tab-row:hover,
.note-tab-row:focus-within {
  position: relative;
  z-index: 3;
}

.note-icon-button {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.note-tab-actions .note-icon-button {
  position: relative;
}

.note-tab-actions .note-icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.4rem);
  right: 0;
  width: max-content;
  max-width: 12rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--surface-1);
  border-radius: 4px;
  background: var(--crust);
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-0.15rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.note-tab-actions .note-icon-button:hover::after,
.note-tab-actions .note-icon-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.note-icon-button:hover {
  background: var(--surface-0);
  color: var(--accent);
}

.note-icon-button.close-note:hover {
  color: var(--red);
}

.note-icon-button.close-note.is-armed {
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
}

.note-rename-form {
  min-width: 0;
  height: 100%;
  grid-column: 1 / -1;
  padding: 0.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.7rem 1.7rem;
  align-items: center;
  gap: 0.2rem;
}

.note-rename-form input,
.note-add input {
  min-width: 0;
  border: 1px solid var(--surface-1);
  border-radius: 5px;
  outline: none;
  background: var(--base);
  color: var(--text);
  font: inherit;
}

.note-rename-form input {
  width: 100%;
  padding: 0.3rem 0.4rem;
  font-size: 0.7rem;
}

.note-rename-form input:focus,
.note-add input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.note-create {
  position: relative;
  z-index: 1;
  height: var(--note-tab-height);
  min-height: var(--note-tab-height);
  border-left: 2px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-0) 45%, transparent);
}

.note-create-trigger {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0.7rem;
  border: 0;
  background: transparent;
  color: var(--subtle);
  text-align: left;
  cursor: pointer;
}

.note-create-trigger:hover {
  color: var(--accent);
}

.note-add {
  height: 100%;
  min-height: 0;
  padding: 0.35rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.7rem 1.7rem;
  align-items: center;
  gap: 0.2rem;
}

.note-add input {
  width: 100%;
  padding: 0.3rem 0.4rem;
  font-size: 0.7rem;
}

.note-add input::placeholder {
  color: var(--subtle);
}

.note-editor {
  min-width: 0;
  width: 100%;
  min-height: clamp(26rem, 72vh, 54rem);
  padding: 0.65rem 0.8rem;
  resize: none;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  background: transparent;
  color: var(--text);
  caret-color: var(--accent);
  font: inherit;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  line-height: 1.75;
}

.note-editor:focus {
  border-color: var(--surface-0);
}

.note-editor::placeholder {
  color: var(--subtle);
}

.note-editor:disabled {
  cursor: default;
  opacity: 1;
}

@media (max-width: 520px) {
  .home {
    padding: 1.5rem;
  }

  .directory {
    gap: 0.75rem;
  }

  .directory-column,
  .directory-column h2 {
    font-size: 0.8rem;
  }

  .wordmark-full {
    display: none;
  }

  .wordmark-short {
    display: inline;
  }

  .tool-shell {
    padding: 1.25rem;
  }

  .calendar-grid {
    gap: 0.15rem;
  }

  .tool-switcher {
    column-gap: 0.55rem;
    row-gap: 0.35rem;
    font-size: 0.78rem;
  }

  .tool-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .clock-zone {
    grid-template-columns: 1rem 19ch max-content auto;
    font-size: 0.65rem;
  }

  .zone-name {
    margin-left: 0.3rem;
  }

  .zone-separator {
    margin-left: 0.3rem;
  }

  .timer-modes {
    gap: 0.35rem;
  }

  .timer-mode,
  .timer-button {
    padding-inline: 0.5rem;
    font-size: 0.68rem;
  }

  .countdown-form {
    grid-template-columns: 1fr;
  }

  .palette-tabs {
    gap: 0.35rem;
  }

  .palette-tab {
    padding-inline: 0.45rem;
    font-size: 0.68rem;
  }

  .palette-grid {
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
  }

  .notes-panel {
    grid-template-columns: minmax(7.5rem, 9rem) minmax(0, 1fr);
    gap: 0.55rem;
  }

  .notes-sidebar {
    padding-right: 0.55rem;
  }

  .note-tab-actions {
    padding-right: 0.1rem;
  }

  .note-tab {
    padding-left: 0.45rem;
    font-size: 0.72rem;
  }

  .note-add input {
    padding: 0.3rem;
    font-size: 0.68rem;
  }

  .note-editor {
    padding-right: 0;
  }
}

@media (max-width: 780px) {
  .diff-editors {
    grid-template-columns: 1fr;
  }

  .task-lanes {
    grid-template-columns: 1fr;
  }

  .task-lane {
    min-height: 12rem;
  }
}

@media (hover: none) {
  .task-actions {
    opacity: 1;
    transform: none;
  }

  .note-tab-actions {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
