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

@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #1e2421;
  --muted: #707771;
  --quiet: #969b96;
  --canvas: #f3f1eb;
  --paper: #fbfaf7;
  --white: #ffffff;
  --line: #dfdfd8;
  --line-soft: #ebe9e3;
  --green: #244e3a;
  --green-2: #336a51;
  --sage: #dce8dc;
  --coral: #dc705c;
  --amber: #d79a3c;
  --blue: #5e7598;
  --shadow: 0 18px 60px rgba(35, 42, 37, 0.13);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(77, 119, 94, 0.35);
  outline-offset: 2px;
}

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

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: 238px;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 24px;
  background: #ebe9e2;
  border-right: 1px solid #dedcd4;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.brand-mark,
.mini-mark {
  position: relative;
  width: 29px;
  height: 27px;
  display: inline-block;
}

.brand-mark span,
.mini-mark i {
  position: absolute;
  top: 3px;
  width: 15px;
  height: 21px;
  border-radius: 12px 12px 4px 12px;
  background: var(--green);
  transform: rotate(-34deg);
}

.brand-mark span:last-child,
.mini-mark i:last-child {
  right: 0;
  border-radius: 12px 12px 12px 4px;
  background: var(--coral);
  transform: rotate(34deg);
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 46px;
}

.nav-link {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 12px;
  color: #616762;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.nav-link svg,
.search-field svg,
.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.active {
  color: var(--green);
  background: #f8f7f2;
  box-shadow: 0 1px 2px rgba(26, 38, 31, 0.04);
}

.nav-count {
  min-width: 25px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--sage);
  font-size: 11px;
  text-align: center;
}

.sidebar-section {
  margin-top: 38px;
  padding: 0 10px;
}

.sidebar-label {
  margin: 0 0 15px;
  color: #8a8f8a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.people-stack,
.mobile-team {
  display: flex;
  align-items: center;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #ebe9e2;
  border-radius: 50%;
  color: #26362f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.people-stack .avatar + .avatar,
.mobile-team .avatar + .avatar { margin-left: -8px; }

.people-more {
  margin-left: 9px;
  color: #7b807b;
  font-size: 12px;
  font-weight: 600;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid #d7d5cd;
}

.workspace-avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-footer strong,
.sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer span { margin-top: 3px; color: #8b8f8a; font-size: 10px; }

.main {
  width: min(1036px, calc(100% - 298px));
  margin-left: max(268px, calc((100vw - 238px - 1036px) / 2 + 238px));
  padding: 54px 0 30px;
}

.mobile-header { display: none; }

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(42px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.intro-copy {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.overview {
  display: flex;
  align-items: center;
  padding-bottom: 2px;
}

.overview-item {
  min-width: 75px;
  padding: 2px 20px;
  border-left: 1px solid #d8d6ce;
}

.overview-item:first-child { padding-left: 0; border-left: 0; }
.overview-item:last-child { padding-right: 0; }
.overview-item strong,
.overview-item span { display: block; }
.overview-item strong { font-family: "DM Serif Display", Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1; }
.overview-item span { margin-top: 5px; color: var(--quiet); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.overview-item[data-status="blocked"] strong { color: #b95747; }

.inbox-panel {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #e2e0d9;
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(53, 58, 53, 0.04);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.search-field {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  flex: 1;
  color: #818681;
}

.search-field svg { position: absolute; left: 13px; width: 18px; pointer-events: none; }

.search-field input {
  width: 100%;
  height: 100%;
  padding: 0 45px 0 41px;
  color: var(--ink);
  background: #f3f2ed;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.search-field input::placeholder { color: #969b96; }
.search-field input:focus { background: var(--white); border-color: #91a899; box-shadow: 0 0 0 3px rgba(82, 124, 98, 0.1); }

.search-field kbd {
  position: absolute;
  right: 11px;
  min-width: 22px;
  padding: 3px 6px;
  color: #999d98;
  background: #e7e6e0;
  border: 0;
  border-radius: 5px;
  font: 11px "DM Sans", sans-serif;
  text-align: center;
  pointer-events: none;
}

.filter-field {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  color: #878c87;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
}

.filter-field span { font-weight: 600; }

.filter-field select {
  height: 40px;
  max-width: 135px;
  padding: 0 34px 0 0;
  appearance: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-weight: 700;
  cursor: pointer;
}

.filter-field svg {
  position: absolute;
  right: 10px;
  width: 16px;
  fill: none;
  stroke: #777d78;
  stroke-width: 1.8;
  pointer-events: none;
}

.filter-field:focus-within { border-color: #91a899; box-shadow: 0 0 0 3px rgba(82, 124, 98, 0.1); }

.list-heading {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: #f8f7f3;
  border-bottom: 1px solid var(--line-soft);
}

.list-heading > div { display: flex; align-items: baseline; gap: 9px; }
.list-heading h2 { margin: 0; font-size: 13px; }
.list-heading #resultCount,
.list-sort { color: var(--quiet); font-size: 11px; }

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px 115px 125px 22px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 13px 22px;
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  transition: background 140ms ease;
}

.task-row:last-child { border-bottom: 0; }
.task-row:hover,
.task-row:focus-within { background: #fff; }

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

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

.priority-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b7bbb7;
}

.priority-dot.high { background: var(--coral); }
.priority-dot.medium { background: var(--amber); }

.task-open {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.task-open::after { content: ""; position: absolute; inset: 0; }
.task-open:focus-visible { outline: none; }
.task-row:has(.task-open:focus-visible) { outline: 3px solid rgba(77, 119, 94, 0.28); outline-offset: -3px; }

.task-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 0 16px;
  color: #8a8f8a;
  font-size: 11px;
  white-space: nowrap;
}

.task-project { overflow: hidden; text-overflow: ellipsis; }
.task-subline .divider { width: 2px; height: 2px; flex: 0 0 auto; border-radius: 50%; background: #afb3af; }

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  color: #59605b;
  background: #ebece8;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill::before { content: ""; width: 6px; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.status-pill.in-progress { color: #3d6286; background: #e6edf5; }
.status-pill.in-progress::before { background: currentColor; border-color: currentColor; }
.status-pill.blocked { color: #a24e3f; background: #f8e7e2; }
.status-pill.blocked::before { border-radius: 2px; background: currentColor; border-color: currentColor; transform: rotate(45deg); }
.status-pill.done { color: #3d6b51; background: #e3eee5; }
.status-pill.done::before { background: currentColor; border-color: currentColor; box-shadow: inset 0 0 0 1.5px #e3eee5; }

.assignee-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.assignee-cell .avatar { width: 27px; height: 27px; border: 0; font-size: 8px; }
.assignee-cell span { overflow: hidden; color: #666d67; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.due-cell { color: #777d78; font-size: 11px; white-space: nowrap; }
.due-cell.overdue,
.due-cell.today { color: #bc5949; font-weight: 700; }

.row-arrow {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  color: #9ca09c;
  border-radius: 50%;
  transition: transform 140ms ease, color 140ms ease;
}

.row-arrow svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task-row:hover .row-arrow { color: var(--green); transform: translateX(2px); }

.empty-state {
  padding: 72px 20px 78px;
  text-align: center;
}

.empty-state[hidden] { display: none; }
.empty-state h2 { margin: 18px 0 5px; font: 28px "DM Serif Display", Georgia, serif; }
.empty-state p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }

.empty-illustration { position: relative; width: 64px; height: 48px; margin: auto; }
.empty-illustration span { position: absolute; width: 36px; height: 26px; border: 2px solid var(--green); border-radius: 18px 18px 5px 18px; transform: rotate(-25deg); }
.empty-illustration span:nth-child(2) { right: 0; border-color: var(--coral); border-radius: 18px 18px 18px 5px; transform: rotate(25deg); }
.empty-illustration span:nth-child(3) { bottom: 0; left: 22px; width: 20px; height: 20px; border-color: var(--amber); border-radius: 50%; transform: none; }

.button {
  min-height: 39px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.button.secondary { color: var(--green); background: var(--sage); }
.button.secondary:hover { background: #cfdfd1; }

.keyboard-hint {
  margin: 17px 2px 0;
  color: #959a95;
  font-size: 10px;
  text-align: right;
}

.keyboard-hint kbd { padding: 2px 5px; color: #747a75; background: #e7e5df; border: 1px solid #d9d7d0; border-radius: 4px; font: 9px "DM Sans", sans-serif; }
.keyboard-hint span { margin: 0 6px; }

.detail-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: hidden;
}

.detail-dialog::backdrop { background: rgba(25, 31, 27, 0.34); backdrop-filter: blur(2px); }

.detail-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(540px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  box-shadow: var(--shadow);
  animation: panel-in 240ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes panel-in { from { transform: translateX(30px); opacity: 0; } }

.detail-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 0 27px 0 30px;
  border-bottom: 1px solid var(--line);
}

.detail-brand { display: flex; align-items: center; gap: 9px; color: #7a807b; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.mini-mark { width: 21px; height: 19px; }
.mini-mark i { top: 2px; width: 11px; height: 15px; }

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #646a65;
  background: #f0efea;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.icon-button:hover { color: var(--ink); background: #e8e7e1; }
.icon-button svg { width: 18px; }

.detail-content {
  overflow-y: auto;
  padding: 44px 50px 46px;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #8b908b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.priority-label { display: inline-flex; align-items: center; gap: 6px; }
.priority-label .priority-dot { width: 6px; height: 6px; }

.detail-content h2 {
  max-width: 420px;
  margin: 0 0 30px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.status-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 18px;
  background: #efeee9;
  border-radius: 12px;
}

.detail-field label,
.detail-field > span {
  display: block;
  margin: 0 0 8px;
  color: #848984;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-select-wrap { position: relative; }
.status-select-wrap::after { content: ""; position: absolute; top: 13px; right: 13px; width: 7px; height: 7px; border-right: 1.5px solid #667069; border-bottom: 1.5px solid #667069; transform: rotate(45deg); pointer-events: none; }

.status-select-wrap select {
  width: 100%;
  height: 38px;
  padding: 0 35px 0 12px;
  appearance: none;
  color: var(--ink);
  background: white;
  border: 1px solid #dadbd5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.status-feedback { min-height: 15px; margin: 6px 0 0; color: var(--green-2); font-size: 10px; font-weight: 700; }

.assignee-detail { height: 38px; display: flex; align-items: center; gap: 8px; color: #4e554f; font-size: 12px; font-weight: 700; }
.assignee-detail .avatar { width: 31px; height: 31px; border: 0; font-size: 8px; }

.body-section { padding: 35px 0 32px; border-bottom: 1px solid var(--line); }
.section-label { margin: 0 0 14px; color: #898e89; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.body-copy p { margin: 0 0 15px; color: #4f5651; font-size: 14px; line-height: 1.75; }
.body-copy p:last-child { margin-bottom: 0; }
.body-copy p:last-child::first-line { color: var(--ink); font-weight: 700; }

.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 18px; padding-top: 29px; }
.meta-item { min-width: 0; }
.meta-label { display: block; margin-bottom: 8px; color: #959a95; font-size: 9px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.meta-value { display: flex; align-items: center; gap: 7px; color: #4f5651; font-size: 12px; font-weight: 600; }
.meta-value svg { width: 16px; height: 16px; fill: none; stroke: #8a908b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 8px; color: #536259; background: var(--sage); border-radius: 5px; font-size: 10px; font-weight: 700; }

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  padding: 11px 15px;
  color: white;
  background: #26382f;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(21, 31, 26, 0.25);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast-check { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #4f775f; }
.toast-check svg { width: 14px; fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1120px) {
  .main { width: calc(100% - 282px); margin-left: 260px; }
  .task-row { grid-template-columns: minmax(0, 1fr) 120px 110px 22px; }
  .assignee-cell span { display: none; }
  .assignee-cell { justify-content: center; }
}

@media (max-width: 780px) {
  .sidebar { display: none; }
  .main { width: 100%; margin: 0; padding: 0 16px 28px; }
  .mobile-header { height: 66px; display: flex; align-items: center; justify-content: space-between; margin: 0 -16px; padding: 0 18px; background: #ebe9e2; border-bottom: 1px solid #dedcd4; }
  .mobile-header .brand { font-size: 20px; }
  .mobile-header .brand-mark { width: 25px; height: 23px; }
  .mobile-header .brand-mark span { width: 13px; height: 18px; }
  .mobile-team .avatar { width: 29px; height: 29px; border-color: #ebe9e2; font-size: 8px; }
  .mobile-team .avatar:nth-child(n+4) { display: none; }
  .page-intro { display: block; margin: 29px 2px 23px; }
  h1 { font-size: 42px; }
  .intro-copy { font-size: 13px; }
  .overview { margin-top: 23px; }
  .overview-item { flex: 1; min-width: 0; padding: 0 13px; }
  .overview-item:first-child { padding-left: 0; }
  .overview-item strong { font-size: 22px; }
  .inbox-panel { border-radius: 13px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 9px; padding: 13px; }
  .search-field { flex: none; }
  .filter-field { width: 100%; }
  .filter-field select { max-width: none; flex: 1; }
  .list-heading { min-height: 51px; padding: 0 15px; }
  .list-sort { display: none; }
  .task-row { grid-template-columns: minmax(0, 1fr) auto 18px; gap: 9px; min-height: 88px; padding: 13px 15px; }
  .task-title-line { align-items: flex-start; }
  .priority-dot { margin-top: 5px; }
  .task-open { overflow: visible; font-size: 12px; line-height: 1.35; text-overflow: clip; white-space: normal; }
  .task-subline { margin-top: 7px; font-size: 10px; }
  .assignee-cell { display: none; }
  .due-cell { display: none; }
  .status-pill { align-self: start; margin-top: 1px; padding: 5px 7px; }
  .status-pill::before { display: none; }
  .keyboard-hint { display: none; }
  .detail-content { padding: 34px 24px 40px; }
  .detail-header { height: 62px; padding: 0 18px 0 23px; }
  .detail-content h2 { margin-bottom: 25px; font-size: 33px; }
  .status-box { grid-template-columns: 1fr; gap: 13px; padding: 15px; }
  .detail-meta { gap: 23px 14px; }
}

@media (max-width: 420px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .mobile-header { margin-left: -12px; margin-right: -12px; }
  .page-intro { margin-left: 1px; margin-right: 1px; }
  .overview-item { padding-left: 10px; padding-right: 10px; }
  .overview-item span { font-size: 9px; }
  .task-subline .comments-text { display: none; }
  .detail-panel { width: 100%; }
  .detail-content { padding-left: 21px; padding-right: 21px; }
}

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