@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #17211f;
  --ink-soft: #5f6c68;
  --deep-teal: #123b38;
  --teal: #0b756c;
  --teal-soft: #dcefeb;
  --paper: #f3f5f0;
  --surface: #ffffff;
  --line: #d9ded8;
  --line-dark: #bac3bd;
  --coral: #d95e45;
  --coral-soft: #f9e8e3;
  --gold: #9d6b0a;
  --gold-soft: #f5edd6;
  --violet: #6757a6;
  --violet-soft: #ece9f8;
  --blue: #2d6697;
  --blue-soft: #e5eff6;
  --focus: #e2673f;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
select,
a,
input {
  outline: none;
}

button:focus-visible,
select:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button {
  cursor: pointer;
}

button:active,
a:active {
  opacity: 0.76;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

svg {
  display: block;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 22px 24px;
  color: #edf7f3;
  background: var(--deep-teal);
}

.brand-row,
.brand,
.primary-nav .nav-item,
.status-button,
.avatar-stack,
.list-heading,
.sort-note,
.task-topline,
.task-footer,
.task-person,
.detail-topbar,
.detail-meta-row,
.detail-assignee,
.comments,
.feedback,
.detail-footer {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
}

.brand {
  gap: 11px;
  color: #fff;
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  color: var(--deep-teal);
  background: #bdeade;
}

.brand-mark svg {
  width: 21px;
  fill: currentColor;
}

.workspace-badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #cce6df;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.workspace-copy {
  margin-top: 42px;
  padding: 0 10px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #8fada5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow.teal {
  color: var(--teal);
}

.workspace-name {
  margin: 0;
  color: #eff7f5;
  font-size: 14px;
  font-weight: 560;
}

.primary-nav {
  margin-top: 20px;
}

.nav-item {
  min-height: 48px;
  gap: 12px;
  padding: 0 12px;
  border-radius: 10px;
  color: #bed5cf;
  font-size: 14px;
  font-weight: 580;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.nav-count {
  min-width: 25px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--deep-teal);
  background: #bdeade;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-align: center;
}

.status-nav {
  margin-top: 38px;
}

.side-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 10px 10px;
  color: #8fada5;
}

.side-section-heading h2 {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.side-section-heading span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.status-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-button {
  width: 100%;
  min-height: 44px;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: #c3d5d0;
  background: transparent;
  font-size: 13px;
  text-align: left;
  transition: color 160ms ease, background 160ms ease;
}

.status-button:hover,
.status-button.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.status-button .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color);
}

.status-button .shortcut-count {
  margin-left: auto;
  color: #8fada5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.avatar-stack {
  padding-left: 6px;
}

.avatar,
.avatar-more {
  display: grid;
  width: 31px;
  height: 31px;
  margin-left: -6px;
  place-items: center;
  border: 2px solid var(--deep-teal);
  border-radius: 50%;
  color: #263532;
  font-size: 9px;
  font-weight: 700;
}

.avatar-coral { background: #f3a995; }
.avatar-lilac { background: #c6b9ec; }
.avatar-gold { background: #efd68e; }
.avatar-more { color: #deebe7; background: #31534f; }

.sidebar-footer p {
  margin: 10px 0 0;
  color: #91aaa3;
  font-size: 11px;
}

.main-content {
  width: 100%;
  max-width: 1210px;
  margin: 0 auto;
  padding: 53px clamp(32px, 5vw, 76px) 80px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 610;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.page-intro {
  max-width: 630px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.today-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  min-width: 134px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.today-block strong {
  margin: 0 8px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

.today-block span {
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 210px;
  gap: 12px;
  margin-top: 35px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
}

.toolbar label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.input-shell,
.select-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell > svg,
.select-shell > svg {
  position: absolute;
  z-index: 1;
  width: 18px;
  pointer-events: none;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.input-shell > svg { left: 15px; }
.select-shell > svg { right: 14px; }

.input-shell input,
.select-shell select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  transition: border-color 160ms ease;
}

.input-shell input:hover,
.select-shell select:hover {
  border-color: var(--line-dark);
}

.input-shell input {
  padding: 0 64px 0 45px;
}

.input-shell input::placeholder {
  color: #86908d;
}

.input-shell kbd {
  position: absolute;
  right: 12px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #7b8581;
  background: #f6f7f4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.select-shell select {
  appearance: none;
  padding: 0 42px 0 15px;
  cursor: pointer;
}

.list-section {
  margin-top: 33px;
}

.list-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.list-heading h2 {
  display: inline;
  margin: 0;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.list-heading > div p {
  display: inline;
  margin: 0 0 0 9px;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.sort-note {
  gap: 7px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.sort-note svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  min-height: 139px;
  padding: 20px 20px 17px 23px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 170ms ease, transform 170ms ease;
}

.task-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--status-color);
  content: "";
}

.task-card:hover {
  border-color: var(--line-dark);
  transform: translateY(-1px);
}

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

.task-topline {
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}

.project-label {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.priority-label {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--priority-ink);
  background: var(--priority-bg);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.open-item {
  display: inline-block;
  max-width: 100%;
  min-height: 32px;
  margin: -3px -5px 1px;
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  font-size: 17px;
  font-weight: 610;
  letter-spacing: -0.022em;
  line-height: 1.32;
  text-align: left;
}

.open-item:hover {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.task-summary {
  display: -webkit-box;
  max-width: 720px;
  margin: 5px 0 15px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-footer {
  flex-wrap: wrap;
  gap: 13px;
  color: var(--ink-soft);
  font-size: 11px;
}

.task-person {
  gap: 7px;
  color: #43504c;
  font-weight: 520;
}

.mini-avatar {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #263532;
  background: var(--avatar-bg);
  font-size: 8px;
  font-weight: 700;
}

.meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aab2ae;
}

.task-state {
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 38px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  gap: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--status-ink);
  background: var(--status-bg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-color);
  content: "";
}

.comments {
  gap: 5px;
  color: #75807c;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.comments svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.empty-state {
  padding: 70px 20px;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
}

.empty-icon svg {
  width: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.empty-state h3 {
  margin: 0;
  font-size: 18px;
}

.empty-state p {
  margin: 7px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state button,
.detail-footer button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 620;
  transition: background 160ms ease;
}

.empty-state button {
  padding: 0 17px;
}

.empty-state button:hover,
.detail-footer button:hover {
  background: #075e57;
}

.task-dialog {
  width: min(570px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line-dark);
  background: var(--surface);
  color: var(--ink);
}

.task-dialog::backdrop {
  background: rgba(16, 32, 29, 0.52);
  backdrop-filter: blur(2px);
}

.detail-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.detail-topbar {
  flex: 0 0 auto;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.close-detail {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease;
}

.close-detail:hover {
  border-color: var(--line-dark);
  background: var(--paper);
}

.close-detail svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.detail-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 39px 42px 42px;
  overscroll-behavior: contain;
}

.detail-project {
  margin: 0 0 11px;
  color: var(--teal);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-scroll h2 {
  max-width: 450px;
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 610;
  letter-spacing: -0.045em;
  line-height: 1.14;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 19px;
}

.detail-tag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fafbf9;
  font-size: 10px;
  font-weight: 550;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.detail-meta-row {
  min-height: 76px;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: #fbfcfa;
}

.detail-meta-row > span:first-child,
.status-field > label {
  color: var(--ink-soft);
  font-size: 11px;
}

.detail-meta-row > strong {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.detail-assignee {
  gap: 7px;
}

.detail-body {
  margin-top: 36px;
}

.detail-body h3,
.status-section h3 {
  margin: 0 0 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-body p {
  margin: 0 0 16px;
  color: #394541;
  font-size: 15px;
  line-height: 1.68;
}

.detail-body p:last-child {
  margin-bottom: 0;
  padding: 17px 18px;
  border-left: 3px solid var(--teal);
  background: #f0f7f5;
}

.status-section {
  margin-top: 38px;
  padding-top: 29px;
  border-top: 1px solid var(--line);
}

.status-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.status-field select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.feedback {
  min-height: 29px;
  gap: 7px;
  margin: 7px 0 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 550;
}

.feedback:empty {
  visibility: hidden;
}

.feedback svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.detail-footer {
  flex: 0 0 auto;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 14px 30px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.detail-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.detail-footer button {
  min-width: 106px;
  padding: 0 17px;
}

.load-error {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  max-width: 360px;
  padding: 17px 20px;
  border: 1px solid #d6a99f;
  border-radius: 10px;
  color: #6e2e21;
  background: var(--coral-soft);
  font-size: 13px;
}

.load-error[hidden] { display: none; }

body:has(dialog[open]) {
  overflow: hidden;
}

@media (max-width: 800px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    z-index: 2;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 68px;
    padding: 0 18px;
  }

  .workspace-copy,
  .primary-nav,
  .status-nav,
  .sidebar-footer {
    display: none;
  }

  .workspace-badge {
    margin-left: auto;
  }

  .brand-row {
    width: 100%;
  }

  .main-content {
    padding: 34px 18px 54px;
  }

  .page-header {
    align-items: start;
  }

  .today-block {
    min-width: 90px;
    grid-template-columns: 1fr auto;
  }

  .today-block span:first-child {
    display: none;
  }

  .today-block strong {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .page-header h1 {
    font-size: 38px;
  }

  .page-intro {
    max-width: 255px;
    font-size: 13px;
    line-height: 1.5;
  }

  .today-block {
    display: none;
  }

  .toolbar {
    grid-template-columns: 1fr;
    margin-top: 27px;
    padding: 10px;
  }

  .input-shell kbd {
    display: none;
  }

  .input-shell input {
    padding-right: 14px;
  }

  .list-section {
    margin-top: 27px;
  }

  .sort-note {
    display: none;
  }

  .task-card {
    display: block;
    min-height: 0;
    padding: 18px 17px 16px 20px;
  }

  .open-item {
    font-size: 16px;
  }

  .task-summary {
    -webkit-line-clamp: 3;
  }

  .task-state {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid #edf0ec;
  }

  .task-dialog {
    width: 100%;
    border-left: 0;
  }

  .detail-topbar {
    min-height: 64px;
    padding: 0 18px;
  }

  .detail-scroll {
    padding: 28px 20px 36px;
  }

  .detail-scroll h2 {
    font-size: 29px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

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

  .detail-footer {
    min-height: 72px;
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }

  .detail-footer p {
    display: none;
  }

  .detail-footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
