@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: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f1efe7;
  --paper-deep: #e6e3d8;
  --surface: #faf9f4;
  --surface-hover: #f7f5ed;
  --ink: #171c19;
  --ink-soft: #3c453f;
  --muted: #5c665f;
  --line: #d5d3c8;
  --line-strong: #b6b8ab;
  --green: #103f38;
  --green-deep: #0c332d;
  --green-soft: #1c544a;
  --red: #d54b30;
  --red-ink: #a52f1c;
  --mustard: #e8bd55;
  --focus: #0d5bd1;
  --todo: #526069;
  --todo-bg: #e7e9e7;
  --progress: #2858a8;
  --progress-bg: #e4eaf6;
  --blocked: #ae341e;
  --blocked-bg: #f6e3dc;
  --done: #216a4b;
  --done-bg: #e1ede5;
  --shadow-panel: -24px 0 60px rgba(17, 31, 26, 0.16), -2px 0 10px rgba(17, 31, 26, 0.08);
  --ease-out: cubic-bezier(0.16, 0.84, 0.32, 1);
  --font-ui: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

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

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--red);
}

body ::selection {
  background: var(--green);
  color: var(--surface);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  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;
  top: 10px;
  left: 12px;
  z-index: 200;
  padding: 11px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--green);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease-out);
}

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

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

.rail :focus-visible,
.topbar :focus-visible,
.status-panel :focus-visible {
  outline-color: var(--mustard);
}

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

/* Header */

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 74px;
  padding: 0 28px;
  background: var(--green);
  color: #f4f2e9;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  border-radius: 2px;
}

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

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

.brand-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-sub {
  color: #b9cbc2;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #dbe4df;
  font-size: 12px;
}

.queue-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.queue-stat strong {
  color: #fffdf5;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.queue-stat--blocked {
  color: #f1c9bd;
}

.queue-stat--blocked strong {
  color: #ffd3c6;
}

.mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f48064;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.avatar--top {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: #e7e2d3;
  color: var(--green-deep);
  font-size: 11px;
}

/* Workspace shell */

.workspace {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 440px;
  flex: 1 1 auto;
  min-height: 0;
}

/* Rail */

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 30px 16px 22px;
  overflow-y: auto;
  background: var(--green-deep);
  color: #e9eee9;
  scrollbar-width: thin;
  scrollbar-color: var(--green-soft) transparent;
}

.rail::-webkit-scrollbar {
  width: 8px;
}

.rail::-webkit-scrollbar-thumb {
  background: var(--green-soft);
  border-radius: 8px;
}

.rail-title {
  margin: 0 10px 16px;
  color: #a9beb4;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.rail-filters {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #d8e2dc;
  font-size: 13.5px;
  text-align: left;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.rail-item:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #fffdf5;
}

.rail-item.is-active {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}

.rail-item-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

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

.rail-dot--all {
  background: #d4c36d;
}

.rail-dot--todo {
  background: #91a1aa;
}

.rail-dot--in-progress {
  background: #7da6f7;
}

.rail-dot--blocked {
  background: #f2866b;
}

.rail-dot--done {
  background: #78c39b;
}

.rail-count {
  color: #9fb4aa;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.rail-item.is-active .rail-count {
  color: var(--ink-soft);
}

.rail-note {
  margin-top: 28px;
  padding: 20px 10px 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  color: #a9beb4;
}

.rail-note svg {
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: #8da69b;
}

.rail-note p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
}

.rail-foot {
  margin: auto 10px 0;
  padding-top: 30px;
  color: #819a8f;
  font-size: 10.5px;
  line-height: 1.5;
}

/* Main list */

.main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: var(--paper);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.main::-webkit-scrollbar,
.detail-scroll::-webkit-scrollbar {
  width: 10px;
}

.main::-webkit-scrollbar-thumb,
.detail-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--paper);
  border-radius: 10px;
}

.detail-scroll::-webkit-scrollbar-thumb {
  border-color: var(--surface);
}

.main-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 36px 60px;
}

.main-header {
  margin-bottom: 28px;
}

.main-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.main-summary {
  max-width: 62ch;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 15px;
  background: var(--paper);
}

.toolbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.search-field,
.filter-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.search-field {
  flex: 1 1 auto;
  min-width: 0;
}

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

.search-field:hover,
.filter-field:hover {
  background: #fdfcf8;
  border-color: #969b8f;
}

.search-field:focus-within,
.filter-field:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(13, 91, 209, 0.16);
}

.field-icon {
  width: 19px;
  height: 19px;
  flex: none;
  margin-left: 15px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 78px 0 11px;
  border: 0;
  border-radius: 3px;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.search-field input::placeholder {
  color: #646e67;
  opacity: 1;
}

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

.clear-search {
  position: absolute;
  right: 28px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

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

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

.search-hint {
  position: absolute;
  right: 12px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.search-field:focus-within .search-hint,
.search-field:has(input:not(:placeholder-shown)) .search-hint {
  display: none;
}

.filter-field select {
  width: 100%;
  height: 100%;
  padding: 0 38px 0 14px;
  border: 0;
  border-radius: 3px;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.filter-field select:focus-visible {
  outline: 0;
}

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

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 1px 11px;
}

.result-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.sort-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list-head,
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px 78px 104px 16px;
  gap: 12px;
  align-items: center;
}

.list-head {
  padding: 0 12px 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.list-head span:nth-child(3) {
  text-align: left;
}

.task-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-row-item {
  margin: 0;
}

.task-row {
  width: 100%;
  min-height: 88px;
  padding: 14px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
  border-radius: 0;
  background: transparent;
  text-align: left;
  transition: background-color 140ms var(--ease-out);
}

.task-row:hover {
  background: var(--surface-hover);
}

.task-row:active {
  background: var(--paper-deep);
}

.task-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  background: var(--surface);
}

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

.task-title {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.meta-sep {
  color: var(--line-strong);
}

.priority-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  white-space: nowrap;
}

.priority-label svg {
  width: 12px;
  height: 12px;
}

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

.priority--medium {
  color: #7d5c0e;
}

.priority--low {
  color: var(--muted);
}

.comment-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.comment-count svg {
  width: 12px;
  height: 12px;
}

.owner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.owner-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.15;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-stamp::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.status--todo {
  background: var(--todo-bg);
  color: var(--todo);
}

.status--in-progress {
  background: var(--progress-bg);
  color: var(--progress);
}

.status--blocked {
  background: var(--blocked-bg);
  color: var(--blocked);
}

.status--done {
  background: var(--done-bg);
  color: var(--done);
}

.row-arrow {
  width: 16px;
  height: 16px;
  color: var(--line-strong);
  transition: color 140ms var(--ease-out), transform 140ms var(--ease-out);
}

.task-row:hover .row-arrow {
  color: var(--ink);
  transform: translateX(2px);
}

/* Empty, loading and error */

.loading-state {
  padding: 24px 12px;
}

.loading-line {
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: 13px;
  border-radius: 2px;
  background: var(--line);
  animation: pulse 1.3s ease-in-out infinite;
}

.loading-line--short {
  width: 58%;
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: 44px 22px;
  text-align: center;
}

.empty-illustration {
  width: 180px;
  height: 132px;
  margin-bottom: 20px;
  color: var(--line-strong);
}

.empty-state h2,
.error-state h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.empty-state p,
.error-state p {
  max-width: 36ch;
  margin: 9px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.primary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 2px;
  background: var(--green);
  color: #fffdf5;
  font-size: 13px;
  font-weight: 650;
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.primary-button:hover {
  background: var(--green-soft);
}

.primary-button:active {
  transform: translateY(1px);
}

/* Detail pane */

.detail-pane {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 44px 38px;
  text-align: center;
}

.placeholder-stamp {
  width: 148px;
  height: 148px;
  margin-bottom: 24px;
  color: #c3c3b7;
  transform: rotate(-7deg);
}

.placeholder-stamp svg {
  width: 100%;
  height: 100%;
}

.detail-placeholder h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.detail-placeholder p {
  max-width: 31ch;
  margin: 9px 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.placeholder-hint kbd {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
}

.detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  animation: detail-in 220ms var(--ease-out);
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.back-button:hover {
  background: var(--paper);
  color: var(--ink);
}

.back-button svg {
  width: 18px;
  height: 18px;
}

.detail-id {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 26px 28px 56px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.detail-flags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-flags .status-stamp {
  padding: 5px 8px;
  font-size: 10px;
}

.detail-head h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.9rem;
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.detail-project {
  margin: 11px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-panel {
  margin: 26px 0 30px;
  padding: 18px;
  border-radius: 2px;
  background: var(--green);
  color: #f4f2e9;
}

.status-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-panel-note {
  color: #b9cbc2;
  font-size: 10.5px;
  text-align: right;
}

.status-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.status-select-wrap:focus-within {
  border-color: var(--mustard);
  box-shadow: 0 0 0 3px rgba(232, 189, 85, 0.28);
}

.status-select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 42px 0 13px;
  border: 0;
  border-radius: 2px;
  outline: 0;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
}

.status-select-wrap .select-chevron {
  right: 13px;
}

.status-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #f5f2e8;
  font-size: 12px;
  line-height: 1.4;
}

.feedback-copy {
  display: flex;
  align-items: center;
  gap: 7px;
}

.feedback-copy svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--mustard);
}

.text-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--mustard);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.text-button:hover {
  color: #f7d781;
}

.filter-note {
  margin: 12px 0 0;
  color: #efd18b;
  font-size: 11.5px;
  line-height: 1.5;
}

.detail-section {
  margin-top: 29px;
}

.detail-section h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-body {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.68;
}

.detail-body p {
  margin: 0;
}

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

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}

.meta-grid div {
  min-width: 0;
}

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

.meta-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.25;
}

/* Toast */

.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  background: var(--green-deep);
  color: #f7f4ec;
  box-shadow: 0 14px 34px rgba(12, 32, 26, 0.3), 0 2px 6px rgba(12, 32, 26, 0.18);
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--mustard);
}

/* Motion */

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
}

/* Side-sheet widths */

@media (max-width: 1319px) {
  .workspace {
    grid-template-columns: 216px minmax(0, 1fr);
  }

  .detail-pane {
    display: none;
  }

  .detail-pane.is-open {
    position: fixed;
    top: 74px;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: block;
    width: min(480px, calc(100vw - 40px));
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-panel);
  }

  .detail-pane .detail-placeholder {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-basis: 64px;
    padding: 0 18px;
  }

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

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

  .brand-sub {
    font-size: 8px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    display: none;
  }

  .main-inner {
    padding: 26px 18px 48px;
  }

  .main-header {
    margin-bottom: 22px;
  }

  .main-header h1 {
    font-size: 2rem;
  }

  .main-summary {
    font-size: 13.5px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 9px 0 14px;
  }

  .filter-field {
    flex-basis: auto;
    width: 100%;
  }

  .search-hint {
    display: none;
  }

  .list-head {
    display: none;
  }

  .results-bar {
    padding-top: 13px;
  }

  .task-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "task status"
      "owner due";
    gap: 10px 12px;
    min-height: 0;
    padding: 15px 10px 14px;
    scroll-margin-top: 150px;
  }

  .task-main {
    grid-area: task;
  }

  .owner {
    grid-area: owner;
  }

  .due {
    grid-area: due;
    justify-self: end;
  }

  .row-status {
    grid-area: status;
    align-self: start;
    justify-self: end;
  }

  .row-arrow {
    display: none;
  }

  .status-stamp {
    font-size: 9.5px;
  }

  .detail-pane.is-open {
    top: 0;
    width: 100%;
    border-left: 0;
    box-shadow: none;
  }

  .detail {
    height: 100dvh;
  }

  .detail-top {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .detail-scroll {
    padding: 24px 18px max(48px, env(safe-area-inset-bottom));
  }

  .detail-head h2 {
    font-size: 1.7rem;
  }

  .status-panel {
    margin: 22px 0 26px;
    padding: 16px;
  }

  .empty-state,
  .error-state {
    min-height: 360px;
  }

  body.detail-open {
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .topbar-meta {
    gap: 12px;
  }

  .queue-stat {
    font-size: 11px;
  }

  .queue-stat strong {
    font-size: 12.5px;
  }

  .brand {
    gap: 9px;
  }

  .brand-sub {
    display: none;
  }

  .main-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .main-header h1 {
    font-size: 1.9rem;
  }

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

  .task-meta {
    font-size: 11px;
  }

  .owner-name {
    font-size: 11.5px;
  }

  .due {
    font-size: 11px;
  }

  .status-stamp {
    gap: 5px;
    padding: 4px 7px;
  }

  .status-stamp::before {
    width: 4px;
    height: 4px;
  }

  .detail-top {
    padding-right: 14px;
    padding-left: 12px;
  }

  .detail-flags .status-stamp {
    font-size: 9px;
  }

  .meta-grid {
    gap: 16px;
  }

  .status-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .status-panel-note {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .queue-stat--blocked {
    display: none;
  }
}

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