@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

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

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

:root {
  color-scheme: dark;
  --ink: #0b0f0d;
  --ink-soft: #0e1411;
  --panel: #121815;
  --panel-2: #17201b;
  --panel-3: #1d2922;
  --line: #28352e;
  --line-strong: #3a4b41;
  --text: #eef4ed;
  --muted: #9eada3;
  --muted-2: #7f9085;
  --lime: #c9f26b;
  --lime-soft: rgba(201, 242, 107, 0.12);
  --blue: #8ecbff;
  --amber: #f3c969;
  --coral: #ff927a;
  --mint: #70e6b3;
  --todo: #c3cec6;
  --radius: 16px;
  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Work Sans", "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(201, 242, 107, 0.06), transparent 62%),
    linear-gradient(rgba(238, 244, 237, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 244, 237, 0.022) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 72px 72px, 72px 72px, auto;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

a {
  color: inherit;
  touch-action: manipulation;
}

h1,
h2,
h3,
p,
dl,
dd,
dt,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

/* ---------- Shell ---------- */

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
  height: 100vh;
  height: 100dvh;
  padding: 30px 22px 24px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(201, 242, 107, 0.045), transparent 34%),
    var(--ink-soft);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  filter: drop-shadow(0 3px 10px rgba(201, 242, 107, 0.16));
}

.brand-word {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.sidebar-context {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.sidebar-context span {
  display: block;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-label {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.workspace-nav {
  margin-top: -12px;
}

.workspace-nav .nav-label {
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(238, 244, 237, 0.04);
}

.nav-item.is-current {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--lime);
}

.nav-item.is-current svg {
  color: var(--lime);
}

.nav-count {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.team {
  min-height: 0;
}

.team-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.team-size {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
}

.team-list {
  display: grid;
  gap: 2px;
}

.team-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #0b0f0d;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar--0 { background: #c9f26b; }
.avatar--1 { background: #8ecbff; }
.avatar--2 { background: #f3c969; }
.avatar--3 { background: #ffb09d; }
.avatar--4 { background: #70e6b3; }
.avatar--5 { background: #d7c2ff; }

.team-name {
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-load {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

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

.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.shortcut-hint span {
  margin-left: 4px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line-strong);
  border-bottom-color: #4f6458;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.workspace-note {
  margin-top: 13px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.55;
}

/* ---------- Main ---------- */

.main {
  min-width: 0;
  padding: 46px clamp(28px, 4vw, 64px) 28px;
}

.mobile-bar {
  display: none;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 424px);
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
  max-width: 1170px;
  margin: 0 auto;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-divider {
  color: var(--line-strong);
}

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(201, 242, 107, 0.12);
}

.page-title {
  display: flex;
  align-items: flex-start;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(78px, 8.6vw, 118px);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}

.title-slash {
  margin: -3px 0 0 10px;
  color: var(--lime);
  font-weight: 300;
  line-height: 0.8;
}

.lede {
  max-width: 57ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.65;
  text-wrap: pretty;
}

.lede-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.num {
  color: var(--text);
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 100px;
  padding: 14px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.stat:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  transform: translateY(-2px);
}

.stat[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stat[aria-pressed="true"] .stat-label {
  color: rgba(11, 15, 13, 0.72);
}

.stat-count {
  font-family: var(--font-display);
  font-size: 37px;
  font-weight: 400;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--todo);
}

.status-dot--todo { background: var(--todo); }
.status-dot--in-progress { background: var(--blue); }
.status-dot--blocked { background: var(--coral); }
.status-dot--done { background: var(--lime); }

/* ---------- Toolbar ---------- */

.workspace {
  max-width: 1170px;
  margin: 0 auto;
  padding-top: 24px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(18, 24, 21, 0.7);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--search {
  position: relative;
  flex: 1 1 300px;
  min-width: 0;
}

.field-icon {
  position: absolute;
  bottom: 15px;
  left: 15px;
  z-index: 1;
  color: var(--muted-2);
  pointer-events: none;
}

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

.field input {
  padding: 0 76px 0 43px;
  appearance: none;
  -webkit-appearance: none;
}

.field input::-webkit-search-cancel-button {
  appearance: none;
}

.field input::placeholder {
  color: var(--muted-2);
  opacity: 1;
}

.field input:hover,
.field select:hover {
  border-color: #52665a;
}

.field input:focus,
.field select:focus {
  border-color: var(--lime);
  background-color: var(--panel-2);
}

.key-hint {
  position: absolute;
  right: 12px;
  bottom: 14px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.key-hint kbd {
  height: 19px;
  min-width: 19px;
  font-size: 9.5px;
}

.field--filter {
  flex: 0 0 190px;
}

.field--filter > label {
  padding-left: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  padding: 0 40px 0 14px;
  appearance: none;
  -webkit-appearance: none;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.clear-btn:hover {
  border-color: var(--coral);
  background: rgba(255, 146, 122, 0.08);
  color: var(--text);
}

.clear-btn[hidden] {
  display: none;
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 27px 3px 12px;
}

.list-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Task list ---------- */

.task-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 20, 17, 0.66);
  overflow: hidden;
}

.task {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 206px 92px;
  gap: 18px;
  align-items: center;
  padding: 19px 20px 19px 18px;
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms ease;
}

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

.task::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--status-color, var(--todo));
  content: "";
  opacity: 0.65;
  transform: scaleY(0.55);
  transition: opacity 160ms ease, transform 160ms ease;
}

.task:hover {
  background: var(--panel-2);
}

.task:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.task-index {
  align-self: start;
  padding-top: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

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

.task-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 7px;
  border: 1px solid color-mix(in srgb, var(--status-color) 36%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-color) 9%, transparent);
  color: var(--status-color);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1.7;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill .status-dot {
  width: 5px;
  height: 5px;
  background: var(--status-color);
}

.priority {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.priority--high {
  color: var(--amber);
}

.task-title {
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.task-summary {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.task-aside {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-left: 17px;
  border-left: 1px solid var(--line);
}

.task-project {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-person {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.task-person .avatar {
  width: 23px;
  height: 23px;
  font-size: 8.5px;
}

.task-person span:last-child {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-due {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.open-btn svg {
  transition: transform 160ms ease;
}

.open-btn:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.open-btn:hover svg {
  transform: translateX(2px);
}

.list-footnote {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 3px 0;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.list-footnote .pulse-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

/* ---------- Empty state ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 48px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(18, 24, 21, 0.55);
  text-align: center;
}

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

.empty-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--lime-soft);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.empty-state p {
  max-width: 42ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-wrap: pretty;
}

.btn-primary {
  min-height: 44px;
  margin-top: 22px;
  padding: 0 18px;
  border: 1px solid var(--lime);
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.btn-primary:hover {
  background: #dcff8a;
  color: #060a08;
}

.btn-ghost {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.btn-ghost:hover {
  border-color: var(--lime);
  background: var(--lime-soft);
}

.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 1170px;
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- Detail sheet ---------- */

.detail {
  width: min(596px, calc(100vw - 32px));
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}

.detail[open] {
  animation: sheet-in 220ms cubic-bezier(0.22, 0.8, 0.28, 1);
}

.detail::backdrop {
  background: rgba(3, 6, 4, 0.68);
  backdrop-filter: blur(3px);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 20px 26px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.detail-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.detail-eyebrow span:first-child {
  color: var(--lime);
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.icon-btn:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.detail-scroll {
  flex: 1 1 auto;
  padding: 27px 26px 34px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-title {
  color: var(--text);
  font-size: clamp(30px, 3.2vw, 39px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.tag {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.status-panel {
  margin-top: 25px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(130deg, rgba(201, 242, 107, 0.07), transparent 55%),
    var(--panel-2);
}

.status-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.status-panel-head label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.status-chip {
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.select-wrap--status select {
  height: 49px;
  background-color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
}

.status-feedback {
  min-height: 18px;
  margin-top: 9px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
}

.status-feedback:empty {
  margin-top: 0;
  min-height: 0;
}

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

.meta-cell {
  min-width: 0;
  padding: 13px 15px;
  background: var(--panel);
}

.meta-cell dt {
  margin-bottom: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-cell dd {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.meta-person {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-person .avatar {
  width: 24px;
  height: 24px;
  font-size: 8.5px;
}

.detail-body-wrap {
  margin-top: 29px;
}

.detail-body-wrap h3 {
  margin-bottom: 11px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.detail-body {
  color: #d6dfd7;
  font-size: 15.5px;
  line-height: 1.75;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.detail-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.comment-icon {
  display: inline-flex;
  color: var(--muted);
}

.footnote-rule {
  width: 14px;
  height: 1px;
  background: var(--line-strong);
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 15px 26px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--ink-soft);
}

.detail-footer p {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .main {
    padding-top: 38px;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) 344px;
    gap: 32px;
  }

  .task {
    grid-template-columns: 28px minmax(0, 1fr) 178px 82px;
    gap: 14px;
  }

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

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

  .sidebar {
    display: none;
  }

  .main {
    padding: 0 24px 24px;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -24px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 15, 13, 0.88);
  }

  .brand--compact {
    gap: 8px;
  }

  .brand--compact .brand-word {
    font-size: 21px;
  }

  .mobile-context {
    color: var(--muted-2);
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 24px;
    padding-top: 32px;
  }

  .page-title {
    font-size: clamp(72px, 10vw, 96px);
  }

  .task {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 14px;
    align-items: center;
    padding: 17px 18px;
  }

  .task-index {
    display: none;
  }

  .task-aside {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 13px;
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 9px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .task-project {
    max-width: 140px;
  }

  .task-person {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 0 16px 20px;
  }

  .mobile-bar {
    margin: 0 -16px;
    padding: 12px 16px;
  }

  .masthead {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 26px;
    padding-bottom: 24px;
  }

  .page-title {
    font-size: clamp(64px, 18vw, 88px);
  }

  .lede {
    margin-top: 17px;
    font-size: 15px;
  }

  .lede-meta {
    margin-top: 13px;
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .stat {
    min-height: 82px;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
  }

  .stat-label {
    gap: 5px;
    font-size: 8.5px;
    letter-spacing: 0.03em;
  }

  .stat-label .status-dot {
    display: none;
  }

  .stat-count {
    font-size: 28px;
  }

  .workspace {
    padding-top: 16px;
  }

  .toolbar {
    gap: 10px;
    padding: 10px;
  }

  .field--search {
    flex-basis: 100%;
  }

  .field--filter {
    flex: 1 1 auto;
  }

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

  .clear-btn {
    flex: 0 0 auto;
    justify-content: center;
  }

  .list-head {
    padding-top: 22px;
  }

  .task {
    padding: 16px 15px;
    grid-template-columns: minmax(0, 1fr) 66px;
  }

  .task-title {
    font-size: 17.5px;
  }

  .task-summary {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .open-btn {
    width: 100%;
    padding: 0;
    font-size: 0;
    gap: 0;
  }

  .open-btn svg {
    width: 16px;
    height: 16px;
  }

  .task-aside {
    gap: 7px 12px;
  }

  .task-project {
    max-width: 116px;
    font-size: 9px;
  }

  .task-due {
    margin-left: auto;
    order: 2;
  }

  .task-person {
    margin-left: 0;
  }

  .task-person span:last-child {
    font-size: 11px;
  }

  .detail {
    width: 100vw;
    height: 100dvh;
    border-left: 0;
  }

  .detail[open] {
    animation-name: sheet-up;
  }

  @keyframes sheet-up {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .detail-top {
    padding: 15px 18px 14px;
  }

  .detail-scroll {
    padding: 22px 18px 26px;
  }

  .detail-title {
    font-size: clamp(27px, 7.5vw, 34px);
  }

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

  .detail-footer {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  }

  .detail-footer p {
    display: none;
  }

  .detail-footer .btn-ghost {
    flex: 1 1 auto;
  }

  .page-footer {
    margin-top: 26px;
  }

  .page-footer p:last-child {
    display: none;
  }

  .empty-state {
    min-height: 300px;
    padding: 38px 18px;
  }
}

@media (max-width: 430px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    min-height: 74px;
  }

  .task {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 10px;
  }
}

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

  .stat:hover {
    transform: none;
  }
}

.task-list[hidden]{display:none}
