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

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

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

:root {
  --paper: #f3f0e8;
  --paper-deep: #ebe7dc;
  --surface: #fffdf8;
  --surface-soft: #f8f5ed;
  --ink: #1c1e19;
  --ink-soft: #5e6157;
  --ink-faint: #6a6d61;
  --line: #ddd8ca;
  --line-strong: #c8c2b2;
  --night: #181a16;
  --night-soft: #242720;
  --night-ink: #f7f3e9;
  --night-muted: #a3a598;
  --accent: #e64b25;
  --accent-deep: #c93b18;
  --accent-wash: #fbe6dc;
  --todo: #b5761d;
  --todo-wash: #fbf0d9;
  --progress: #2d648f;
  --progress-wash: #e5eff7;
  --blocked: #b43a2f;
  --blocked-wash: #f9e4e0;
  --done: #397052;
  --done-wash: #e4efe7;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --radius-lg: 22px;
  --radius-md: 15px;
  --shadow-card: 0 1px 0 rgba(28, 30, 25, 0.04), 0 10px 30px -22px rgba(28, 30, 25, 0.28);
  --shadow-dialog: -30px 0 90px -30px rgba(12, 14, 10, 0.45);
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% 0%, rgba(230, 75, 37, 0.055), transparent 33rem),
    radial-gradient(circle at 4% 90%, rgba(87, 101, 76, 0.05), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.detail-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

img,
svg {
  display: block;
}

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

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 14px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sidebar :focus-visible {
  outline-color: #f4a48e;
}

.detail-dialog :focus-visible {
  outline-color: var(--accent);
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  padding: 30px 22px 26px;
  background:
    radial-gradient(circle at 10% 2%, rgba(230, 75, 37, 0.14), transparent 18rem),
    linear-gradient(160deg, #1b1d18 0%, #151712 100%);
  color: var(--night-ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--night-ink);
  text-decoration: none;
  border-radius: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--accent);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.workspace-card {
  padding: 16px;
  border: 1px solid rgba(247, 243, 233, 0.09);
  border-radius: 16px;
  background: rgba(247, 243, 233, 0.045);
}

.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workspace-label,
.nav-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9c4ac;
}

.presence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fb578;
  box-shadow: 0 0 0 3px rgba(143, 181, 120, 0.12);
}

.workspace-name {
  margin: 10px 0 3px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: -0.01em;
}

.workspace-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--night-muted);
}

.status-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  margin: 0 0 8px 10px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #d8d9cf;
  text-align: left;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.nav-item:hover {
  background: rgba(247, 243, 233, 0.06);
  color: var(--night-ink);
}

.nav-item[aria-pressed="true"] {
  border-color: rgba(247, 243, 233, 0.11);
  background: rgba(247, 243, 233, 0.1);
  color: var(--night-ink);
}

.nav-item[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-glyph {
  width: 9px;
  height: 9px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}

.nav-glyph--all {
  border-radius: 3px;
}

.nav-glyph--todo {
  border-color: #d09b46;
  background: rgba(208, 155, 70, 0.22);
}

.nav-glyph--in-progress {
  border-color: #7ba5ca;
  background: rgba(123, 165, 202, 0.22);
}

.nav-glyph--blocked {
  border-color: #d6857c;
  background: rgba(214, 133, 124, 0.22);
}

.nav-glyph--done {
  border-color: #86b397;
  background: rgba(134, 179, 151, 0.22);
}

.nav-count {
  min-width: 25px;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(247, 243, 233, 0.08);
  color: var(--night-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

.nav-item[aria-pressed="true"] .nav-count {
  background: var(--accent);
  color: #fff;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(247, 243, 233, 0.1);
}

.team-row {
  display: flex;
  margin-bottom: 13px;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: -7px;
  border: 2px solid #191b16;
  border-radius: 50%;
  background: hsl(var(--mini-h) 26% 36%);
  color: #fffaf1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mini-avatar--more {
  background: #35382f;
  color: var(--night-muted);
}

.sidebar-foot p {
  margin: 0;
  max-width: 205px;
  color: var(--night-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.main {
  min-width: 0;
  width: 100%;
  max-width: 1180px;
  padding: 52px 54px 34px;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.page-heading {
  max-width: 690px;
}

.eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(230, 75, 37, 0.1);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(46px, 4.8vw, 68px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
}

h1 em {
  position: relative;
  color: var(--accent);
  font-weight: 400;
  white-space: nowrap;
}

.lede {
  max-width: 535px;
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

.cycle-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
  min-width: 218px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.62);
}

.cycle-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cycle-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.cycle-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.cycle-total {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-faint);
}

.cycle-ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex: none;
  margin-left: auto;
}

.cycle-ring svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 4;
}

.ring-track {
  stroke: var(--paper-deep);
}

.ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cycle-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Inbox */
.inbox-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.52);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: end;
}

.field {
  min-width: 0;
}

.field-label {
  display: block;
  margin: 0 0 7px 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.search-control,
.select-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 47px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-control:focus-within,
.select-control:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(28, 30, 25, 0.08);
}

.search-icon {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
  pointer-events: none;
}

.search-control input {
  width: 100%;
  min-height: 45px;
  padding: 10px 44px 10px 42px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
}

.search-control input::placeholder {
  color: #7d8074;
  opacity: 1;
}

.search-control input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  position: absolute;
  right: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink-soft);
  transition: background 150ms ease, color 150ms ease;
}

.search-clear:hover {
  background: var(--ink);
  color: var(--surface);
}

.search-clear svg {
  width: 13px;
  height: 13px;
}

.select-control select {
  width: 100%;
  min-height: 45px;
  padding: 10px 38px 10px 14px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 13px;
  width: 15px;
  height: 15px;
  color: var(--ink-soft);
  pointer-events: none;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 3px 12px;
}

.result-count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.list-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.hint-line {
  width: 19px;
  height: 1px;
  background: var(--line-strong);
}

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

/* Task cards */
.task-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  padding: 17px 17px 17px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--status-color, var(--line-strong));
}

.task-card[data-status="todo"] {
  --status-color: var(--todo);
}

.task-card[data-status="in-progress"] {
  --status-color: var(--progress);
}

.task-card[data-status="blocked"] {
  --status-color: var(--blocked);
}

.task-card[data-status="done"] {
  --status-color: var(--done);
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 1px 0 rgba(28, 30, 25, 0.04), 0 15px 35px -24px rgba(28, 30, 25, 0.38);
}

.task-card:focus-within {
  border-color: var(--ink);
}

.task-card[data-status="done"] .task-title {
  color: var(--ink-soft);
}

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

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 9px 2px 7px;
  border-radius: 20px;
  background: var(--status-wash, var(--paper-deep));
  color: var(--status-ink, var(--ink-soft));
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.status-pill[data-status="todo"] {
  --status-wash: var(--todo-wash);
  --status-ink: #8d5a11;
}

.status-pill[data-status="in-progress"] {
  --status-wash: var(--progress-wash);
  --status-ink: #235375;
}

.status-pill[data-status="blocked"] {
  --status-wash: var(--blocked-wash);
  --status-ink: #953027;
}

.status-pill[data-status="done"] {
  --status-wash: var(--done-wash);
  --status-ink: #2e5e44;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-badge[data-priority="high"] {
  border-color: #e8c5ba;
  color: #a13f27;
  background: #fdf1ec;
}

.task-project {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.task-project::before {
  content: "·";
  margin-right: 7px;
}

.task-heading {
  margin: 0;
  font-size: inherit;
}

.task-title {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.45vw, 18px);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-align: left;
}

.task-title:hover {
  color: var(--accent-deep);
}

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

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.meta-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 500;
}

.task-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: hsl(var(--avatar-h, 30) 26% 34%);
  color: #fff;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.meta-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--line-strong);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-item svg {
  width: 12px;
  height: 12px;
  opacity: 0.65;
}

.open-task {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.open-task svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.task-card:hover .open-task,
.open-task:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.task-card:hover .open-task svg,
.open-task:hover svg {
  transform: translateX(1px);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 54px 24px 58px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.55);
  text-align: center;
}

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

.empty-illustration {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  color: var(--ink-faint);
}

.empty-illustration svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 420px;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.button--primary {
  background: var(--ink);
  color: var(--surface);
}

.button--primary:hover {
  background: var(--accent-deep);
}

.button--quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button--quiet:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 4px 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.page-foot p {
  margin: 0;
}

.foot-mark {
  margin-right: 7px;
  color: var(--accent);
}

.foot-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Detail dialog */
.detail-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(585px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-dialog);
  overflow: hidden;
}

.detail-dialog[open] {
  animation: detail-in 320ms cubic-bezier(0.22, 0.75, 0.2, 1) both;
}

.detail-dialog::backdrop {
  background: rgba(22, 24, 19, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: backdrop-in 250ms ease both;
}

@keyframes detail-in {
  from {
    opacity: 0.3;
    transform: translateX(34px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: none;
  padding: 17px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.detail-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.detail-reference {
  margin: 3px 0 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.detail-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.detail-close svg {
  width: 15px;
  height: 15px;
}

.detail-close:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.detail-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 27px 30px 36px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}

.detail-title {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.status-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 5px 16px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.status-editor-copy label {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.status-editor-copy p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.status-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}

.status-select-wrap .status-dot {
  position: absolute;
  left: 11px;
  width: 7px;
  height: 7px;
  color: var(--status-ink, var(--ink-soft));
  pointer-events: none;
}

.status-select-wrap[data-status="todo"] {
  --status-ink: var(--todo);
}

.status-select-wrap[data-status="in-progress"] {
  --status-ink: var(--progress);
}

.status-select-wrap[data-status="blocked"] {
  --status-ink: var(--blocked);
}

.status-select-wrap[data-status="done"] {
  --status-ink: var(--done);
}

.status-select-wrap select {
  width: 100%;
  min-height: 37px;
  padding: 8px 34px 8px 24px;
  border: 0;
  border-radius: 10px;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  appearance: none;
  cursor: pointer;
}

.status-select-wrap:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(28, 30, 25, 0.08);
}

.status-select-wrap .select-chevron {
  right: 10px;
  width: 14px;
  height: 14px;
}

.filter-note {
  grid-column: 1 / -1;
  margin: 5px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--accent-deep);
  font-size: 11px;
  line-height: 1.45;
}

.filter-note[hidden] {
  display: none;
}

.status-feedback {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--done);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.status-feedback::before {
  content: "✓";
  display: inline-block;
  margin-right: 5px;
}

.status-feedback[hidden] {
  display: none;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px 22px;
  margin: 24px 0 0;
  padding: 21px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-block {
  min-width: 0;
}

.meta-block dt {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.meta-block dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

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

.meta-avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 50%;
  background: hsl(var(--avatar-h, 30) 26% 34%);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

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

.detail-tag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
}

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

.detail-body-heading {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.detail-body {
  color: #35382f;
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-line;
}

.detail-body:empty {
  display: none;
}

.detail-body p {
  margin: 0 0 13px;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.detail-body strong {
  color: var(--ink);
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-footer p {
  margin: 0;
  max-width: 240px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

/* Toast */
.toast {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(390px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(247, 243, 233, 0.12);
  border-radius: 13px;
  background: var(--night);
  color: var(--night-ink);
  box-shadow: 0 18px 50px -20px rgba(12, 14, 10, 0.65);
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.toast-mark svg {
  width: 14px;
  height: 14px;
}

.noscript-note {
  position: fixed;
  left: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .main {
    padding: 44px 36px 30px;
  }

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

  .cycle-card {
    min-width: 196px;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    gap: 18px;
    padding: 19px 20px 15px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 24px;
  }

  .workspace-card,
  .sidebar-foot,
  .nav-label {
    display: none;
  }

  .status-nav {
    flex-direction: row;
    gap: 5px;
    margin: 0 -20px;
    padding: 0 20px 1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .status-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    min-height: 35px;
    padding: 6px 10px;
    border-radius: 9px;
    gap: 8px;
  }

  .nav-item[aria-pressed="true"]::before {
    display: none;
  }

  .nav-item-label {
    gap: 7px;
    font-size: 12px;
  }

  .nav-count {
    min-width: 19px;
    padding: 0 5px;
    font-size: 9px;
  }

  .nav-glyph {
    width: 7px;
    height: 7px;
  }

  .main {
    padding: 31px 20px 26px;
  }

  .page-header {
    display: block;
    margin-bottom: 24px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(43px, 12vw, 58px);
  }

  .lede {
    margin-top: 13px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .cycle-card {
    display: none;
  }

  .inbox-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .list-header {
    padding: 19px 2px 10px;
  }

  .list-hint {
    display: none;
  }

  .task-card {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 12px;
    padding: 15px 13px 15px 18px;
  }

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

  .task-summary {
    font-size: 12.5px;
  }

  .open-task {
    width: 36px;
    height: 36px;
  }

  .open-task svg {
    width: 15px;
    height: 15px;
  }

  .page-foot {
    display: none;
  }

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

  .detail-scroll {
    padding: 23px 20px 30px;
  }

  .detail-head {
    padding: 14px 20px;
  }

  .detail-title {
    margin-bottom: 20px;
    font-size: clamp(32px, 9.5vw, 41px);
  }

  .detail-meta {
    gap: 16px;
  }

  .detail-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-footer p {
    max-width: none;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (max-width: 540px) {
  .sidebar {
    padding-top: 14px;
    padding-bottom: 11px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand-name {
    font-size: 22px;
  }

  .status-nav {
    margin-top: 0;
  }

  .main {
    padding: 23px 14px 22px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  .lede {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 11px;
    font-size: 13.5px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  h1 {
    font-size: clamp(39px, 11vw, 46px);
  }

  .inbox-panel {
    padding: 13px;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 126px;
    gap: 8px;
  }

  .field-label {
    margin-bottom: 6px;
    font-size: 8.5px;
  }

  .search-control input {
    padding-left: 38px;
    padding-right: 36px;
    font-size: 13px;
  }

  .search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .select-control select {
    padding-left: 11px;
    padding-right: 29px;
    font-size: 12.5px;
  }

  .select-chevron {
    right: 9px;
    width: 13px;
    height: 13px;
  }

  .list-header {
    padding-top: 16px;
    padding-bottom: 9px;
  }

  .task-card {
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 13px 10px 13px 16px;
  }

  .task-top {
    gap: 6px;
    margin-bottom: 4px;
  }

  .task-project {
    display: none;
  }

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

  .task-summary {
    -webkit-line-clamp: 1;
    margin-bottom: 7px;
    font-size: 12px;
  }

  .task-meta {
    gap: 6px;
  }

  .meta-item--comments {
    display: none;
  }

  .open-task {
    width: 34px;
    height: 34px;
  }

  .status-editor {
    grid-template-columns: 1fr;
    gap: 11px;
  }

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

  .detail-body {
    font-size: 13.5px;
  }

  .empty-state {
    padding: 40px 18px 44px;
  }
}

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