@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: "Literata";
  src: url("./assets/literata.ttf") format("truetype");
  font-weight: 200 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 {
  --ink: #0c1226;
  --ink-soft: #1a2341;
  --ink-muted: #aab1c6;
  --paper: #f2f3ef;
  --surface: #ffffff;
  --surface-quiet: #f7f8f4;
  --line: #c9ced8;
  --line-soft: #e2e5eb;
  --text: #1b2133;
  --muted: #5d6477;
  --muted-soft: #858c9d;
  --signal: #d9ff57;
  --cobalt: #2440e8;
  --cobalt-dark: #1730b7;
  --cobalt-wash: #e8ecff;
  --coral: #d9472b;
  --coral-wash: #ffeae4;
  --green: #1f7a55;
  --green-wash: #e2f4ea;
  --todo-wash: #eceef2;
  --todo-ink: #444b5e;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 5px;
  --rail-width: 264px;
}

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

html {
  background: var(--paper);
  color-scheme: light;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

a {
  color: var(--cobalt-dark);
}

input,
select,
textarea {
  caret-color: var(--cobalt);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: #aeb5c3 transparent;
}

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

[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: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

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

/* ---------- Sidebar ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  gap: 26px;
  overflow-y: auto;
  padding: 28px 20px 18px;
  background: var(--ink);
  color: #eef0e8;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f5f6ef;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: #f5f6ef;
}

.brand-word {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand-slash {
  color: var(--signal);
  font-weight: 500;
}

.rail-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rail-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
  color: #8992ad;
}

.rail-nav,
.status-link {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.rail :focus-visible,
.mobile-bar :focus-visible,
.toast :focus-visible {
  outline-color: var(--signal);
}

.rail-nav {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #2b3654;
  border-radius: 4px;
  color: #eef0e8;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.rail-nav:hover {
  background: #18213d;
}

.rail-nav.is-current {
  background: #1a2446;
  border-color: #34436e;
}

.rail-nav-main {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rail-nav-main svg {
  width: 16px;
  height: 16px;
  color: var(--signal);
}

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

.rail-nav.is-current .rail-count {
  color: var(--signal);
}

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

.status-link {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 3px;
  color: #b9c0d3;
  font-size: 13.5px;
  transition: background-color 150ms ease, color 150ms ease;
}

.status-link:hover {
  background: #17203c;
  color: #ffffff;
}

.status-link[aria-pressed="true"] {
  background: #192342;
  color: #ffffff;
  font-weight: 600;
}

.status-link[aria-pressed="true"] .rail-count {
  color: var(--signal);
}

.status-link-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.mark-all {
  background: #eef0e8;
}

.mark-todo {
  background: #aeb5c3;
}

.mark-in-progress {
  background: #7588ff;
}

.mark-blocked {
  background: #ff765e;
}

.mark-done {
  background: #5cc998;
}

.rail-team {
  margin-top: auto;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-list li {
  display: flex;
  min-height: 29px;
  align-items: center;
  gap: 9px;
  color: #c6ccdc;
  font-size: 12.5px;
}

.avatar {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #293353;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.rail .avatar {
  background: #232d4b;
  color: #dfe4f2;
}

.avatar-maya,
.avatar-maya.rail-avatar {
  background: #d8c9f5;
  color: #24143d;
}

.avatar-theo {
  background: #f4d9a6;
  color: #432c06;
}

.avatar-asha {
  background: #b9e3cf;
  color: #09321f;
}

.avatar-jon {
  background: #f4c5c6;
  color: #451113;
}

.avatar-luis {
  background: #b9d8f5;
  color: #0a2d4d;
}

.avatar-sam {
  background: #d9e7a5;
  color: #293507;
}

.rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #263150;
  color: #818aa4;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-bar {
  display: none;
}

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

.main {
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding: 42px clamp(24px, 4vw, 56px) 30px;
}

.masthead,
.toolbar,
.inbox,
.page-foot {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 44px;
  margin-bottom: 34px;
}

.masthead-copy {
  max-width: 620px;
}

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 620;
  letter-spacing: -0.038em;
  line-height: 1.02;
}

.masthead-copy p {
  max-width: 54ch;
  margin: 14px 0 0;
  color: #555c6f;
  font-size: 15.5px;
  line-height: 1.55;
}

.masthead-aside {
  flex: 0 0 auto;
  padding-bottom: 3px;
  text-align: right;
}

.week-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid #aeb5c3;
}

.week-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3e465a;
}

.week-dates {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #646b7c;
}

.queue-line {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 19px 0 0;
  color: #454c5f;
  font-size: 12.5px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 85, 0.13);
}

.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #aeb5c3;
}

.search-field {
  width: min(380px, 36vw);
}

.filter-field {
  width: 194px;
}

.control-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  color: #5c6375;
}

.search-input-wrap,
.select-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  color: #687083;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-input-wrap input,
.select-wrap select {
  width: 100%;
  height: 44px;
  border: 1px solid #858c9d;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-input-wrap input {
  padding: 0 46px 0 39px;
  appearance: none;
}

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

.search-input-wrap input::placeholder {
  color: #677083;
  opacity: 1;
}

.search-input-wrap input:hover,
.select-wrap select:hover {
  border-color: #697184;
}

.search-input-wrap:focus-within input,
.select-wrap:focus-within select {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(36, 64, 232, 0.14);
  outline: none;
}

.search-hint {
  position: absolute;
  top: 50%;
  right: 11px;
  display: inline-flex;
  width: 22px;
  height: 21px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4d8e0;
  border-radius: 3px;
  background: #f6f7f3;
  color: #6a7183;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-wrap select {
  appearance: none;
  padding: 0 38px 0 13px;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 16px;
  height: 16px;
  color: #4f5669;
  transform: translateY(-50%);
  pointer-events: none;
}

.toolbar-end {
  display: flex;
  min-height: 44px;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-bottom: 2px;
}

.result-count {
  margin: 0;
  color: #596073;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.clear-filters {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--cobalt-dark);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- List ---------- */

.inbox {
  padding-top: 22px;
}

.list-head,
.task-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 144px 174px 76px 24px;
  align-items: center;
}

.list-head {
  min-height: 35px;
  padding: 0 16px 0 22px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
  color: #62697b;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.task-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.task-row {
  position: relative;
  min-height: 77px;
  padding: 0 16px 0 22px;
  border-top: 1px solid var(--line-soft);
  transition: background-color 150ms ease;
}

.task-row:first-child {
  border-top: 0;
}

.task-row:hover {
  background: #f7f8f3;
}

.task-row.is-updated {
  animation: row-flash 1.5s ease-out;
}

@keyframes row-flash {
  0% {
    background: #efffc2;
  }
  100% {
    background: var(--surface);
  }
}

.row-num {
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #6f7687;
}

.row-open {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 11px 12px 11px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.row-open::after {
  position: absolute;
  inset: 0;
  content: "";
}

.row-open:focus-visible {
  outline-offset: -2px;
}

.row-title {
  max-width: 100%;
  overflow: hidden;
  color: #171c2c;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-open:hover .row-title {
  color: var(--cobalt-dark);
}

.row-meta {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #6a7183;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.row-meta-project {
  color: #42495b;
}

.meta-sep {
  color: #7c8495;
}

.row-status {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.status-chip {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "";
}

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

.status-todo::before {
  background: #7f8799;
}

.status-in-progress {
  background: var(--cobalt-wash);
  color: #1e33b7;
}

.status-in-progress::before {
  background: var(--cobalt);
}

.status-blocked {
  background: var(--coral-wash);
  color: #a32e17;
}

.status-blocked::before {
  background: var(--coral);
}

.status-done {
  background: var(--green-wash);
  color: #176144;
}

.status-done::before {
  background: var(--green);
}

.row-owner {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #3d4457;
  font-size: 12.5px;
}

.row-owner .avatar {
  width: 27px;
  height: 27px;
  font-size: 9px;
}

.row-owner-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.row-arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #8b92a2;
}

.row-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 150ms ease, color 150ms ease;
}

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

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 24px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-art {
  width: 180px;
  height: 112px;
  color: #586073;
}

.empty-state h3 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.empty-state p {
  max-width: 42ch;
  margin: 9px 0 0;
  color: #5b6275;
  font-size: 14.5px;
}

.btn-recover {
  min-height: 40px;
  margin-top: 22px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.btn-recover:hover {
  border-color: var(--cobalt-dark);
  background: var(--cobalt-dark);
}

/* ---------- Footer ---------- */

.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #c4c9d3;
  color: #6a7183;
  font-size: 11.5px;
}

.page-foot p {
  margin: 0;
}

.page-foot .mono {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- Detail inspector ---------- */

.detail {
  width: min(590px, 100vw);
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  inset: 0 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: -24px 0 64px rgba(8, 12, 28, 0.18);
}

.detail[open] {
  animation: detail-in 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.detail::backdrop {
  background: rgba(8, 12, 28, 0.43);
}

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

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

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

.detail-id {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #656c7e;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-id span {
  color: #2e3547;
}

.detail-id-mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cobalt);
}

.detail-close {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #8d95a6;
  border-radius: 4px;
  background: var(--surface-quiet);
  color: #32394b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.detail-close:hover {
  border-color: #697184;
  background: #eef0ea;
}

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

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

.detail-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

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

.priority-high {
  color: #9e2d15;
}

.priority-high::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e15a3c;
  content: "";
  vertical-align: 1px;
}

.detail-title {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 620;
  letter-spacing: -0.032em;
  line-height: 1.12;
  text-wrap: balance;
}

.detail-summary {
  margin: 15px 0 0;
  color: #4e5568;
  font-size: 15.5px;
  line-height: 1.6;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 25px 0 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.meta-cell {
  min-width: 0;
  padding: 13px 18px 13px 0;
}

.meta-cell:nth-child(odd) {
  border-right: 1px solid var(--line-soft);
}

.meta-cell:nth-child(even) {
  padding-left: 18px;
}

.meta-cell:nth-child(n + 3) {
  border-top: 1px solid var(--line-soft);
}

.meta-cell dt {
  margin: 0 0 4px;
  color: #6f7687;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta-cell dd {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #2a3142;
  font-size: 13px;
  font-weight: 500;
}

.meta-cell dd .avatar {
  width: 23px;
  height: 23px;
  font-size: 8px;
}

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

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #cfd4dd;
  border-radius: 3px;
  color: #555c6e;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 15px 16px;
  border: 1px solid #ced3dd;
  border-radius: 4px;
  background: #f4f5f0;
}

.status-panel-copy {
  min-width: 0;
}

.status-panel-title {
  display: block;
  margin-bottom: 3px;
  color: #333a4c;
  font-size: 13px;
  font-weight: 700;
}

.status-panel-help {
  display: block;
  color: #646b7d;
  font-size: 11.5px;
  line-height: 1.4;
}

.detail-status-field {
  display: flex;
  flex: 0 0 176px;
  flex-direction: column;
  gap: 5px;
}

.detail-status-field .control-label {
  margin: 0;
}

.detail-status-field .select-wrap select {
  height: 39px;
  border-color: #858c9d;
  background: #ffffff;
  font-size: 13px;
}

.detail-status-field .select-wrap select[data-status="todo"] {
  color: #444b5e;
}

.detail-status-field .select-wrap select[data-status="in-progress"] {
  color: #1e33b7;
}

.detail-status-field .select-wrap select[data-status="blocked"] {
  color: #a32e17;
}

.detail-status-field .select-wrap select[data-status="done"] {
  color: #176144;
}

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

.detail-brief h3 {
  margin: 0 0 12px;
  color: #62697b;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.detail-body {
  color: #2e3547;
  font-size: 16px;
  line-height: 1.68;
  white-space: pre-line;
}

.detail-body p.is-lead {
  color: #252c3d;
  font-size: 16.5px;
  line-height: 1.62;
}

.detail-body p {
  max-width: 64ch;
  margin: 0 0 14px;
}

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

.status-feedback {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  padding: 9px 11px;
  border: 1px solid #c7d1a0;
  border-radius: 3px;
  background: #f4ffd1;
  color: #2b3810;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 150ms ease, transform 150ms ease;
}

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

.status-feedback-mark {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #5f7e13;
}

.status-feedback-text {
  flex: 1 1 auto;
}

.status-feedback-undo {
  flex: 0 0 auto;
  padding: 1px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #3e5709;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: #6f7687;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: flex;
  width: max-content;
  max-width: min(440px, calc(100vw - 48px));
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border: 1px solid #394464;
  border-radius: 5px;
  background: var(--ink);
  color: #f3f5ed;
  box-shadow: 0 14px 34px rgba(8, 12, 28, 0.24);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.toast-mark {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
}

.toast-text {
  font-size: 12.5px;
  line-height: 1.35;
}

.toast-undo {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--signal);
  background: transparent;
  color: var(--signal);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.toast-close {
  display: inline-flex;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #aeb6ca;
  cursor: pointer;
}

.toast-close:hover {
  background: #202a49;
  color: #ffffff;
}

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

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

@media (max-width: 1120px) {
  .search-field {
    width: min(340px, 34vw);
  }

  .filter-field {
    width: 182px;
  }

  .masthead {
    gap: 28px;
  }

  .masthead h1 {
    font-size: 45px;
  }

  .list-head,
  .task-row {
    grid-template-columns: 38px minmax(0, 1fr) 132px 152px 68px 20px;
  }

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

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

@media (max-width: 1000px) {
  .rail {
    display: none;
  }

  .mobile-bar {
    display: flex;
    min-height: 61px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 18px;
    background: var(--ink);
    color: #f3f5ed;
  }

  .brand-mobile .brand-mark {
    width: 23px;
    height: 23px;
  }

  .brand-mobile .brand-word {
    font-size: 22px;
  }

  .mobile-count {
    color: #b9c1d5;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .main {
    margin-left: 0;
    padding: 25px 18px 32px;
  }

  .masthead {
    display: block;
    margin-bottom: 23px;
  }

  .masthead h1 {
    font-size: 42px;
  }

  .masthead-copy p {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.5;
  }

  .masthead-aside {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-top: 19px;
    padding-top: 11px;
    border-top: 1px solid #aeb5c3;
    text-align: left;
  }

  .week-block {
    padding-top: 0;
    border-top: 0;
  }

  .queue-line {
    margin: 0 0 1px;
    font-size: 11px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-bottom: 13px;
  }

  .search-field {
    width: auto;
    grid-column: 1 / -1;
  }

  .search-hint {
    display: none;
  }

  .search-input-wrap input {
    padding-right: 14px;
  }

  .filter-field {
    width: 100%;
    min-width: 0;
  }

  .toolbar-end {
    min-height: 44px;
    flex: 0 0 auto;
    gap: 10px;
  }

  .clear-filters {
    font-size: 10.5px;
  }

  .inbox {
    padding-top: 15px;
  }

  .list-head {
    display: none;
  }

  .task-list {
    border-radius: var(--radius);
  }

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

  .task-row:first-child {
    border-top: 0;
  }

  .row-num,
  .row-arrow {
    display: none;
  }

  .row-open {
    grid-area: open;
    gap: 4px;
    padding: 0;
  }

  .row-open::after {
    display: none;
  }

  .row-title {
    font-size: 16px;
    white-space: normal;
  }

  .row-meta {
    font-size: 9px;
  }

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

  .row-owner {
    grid-area: owner;
    font-size: 11.5px;
  }

  .row-owner .avatar {
    width: 24px;
    height: 24px;
    font-size: 8px;
  }

  .row-due {
    grid-area: due;
    align-self: center;
    font-size: 10.5px;
  }

  .empty-state {
    padding: 44px 20px 46px;
  }

  .empty-state h3 {
    font-size: 24px;
  }

  .page-foot {
    display: none;
  }

  .detail {
    width: 100vw;
    max-width: 100vw;
    box-shadow: none;
  }

  .detail-top {
    min-height: 60px;
    padding: 0 15px 0 20px;
  }

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

  .detail-title {
    font-size: 31px;
  }

  .detail-summary {
    font-size: 14.5px;
  }

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

  .meta-cell,
  .meta-cell:nth-child(even) {
    padding: 11px 0;
  }

  .meta-cell:nth-child(odd) {
    border-right: 0;
  }

  .meta-cell + .meta-cell {
    border-top: 1px solid var(--line-soft);
  }

  .status-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .detail-status-field {
    flex-basis: auto;
  }

  .detail-status-field .select-wrap select {
    height: 43px;
  }

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

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

@media (max-width: 390px) {
  .main {
    padding-inline: 15px;
  }

  .mobile-bar {
    padding-inline: 15px;
  }

  .masthead h1 {
    font-size: 38px;
  }

  .masthead-copy p {
    font-size: 14px;
  }

  .queue-line {
    display: none;
  }

  .masthead-aside {
    margin-top: 16px;
  }

  .week-block {
    width: 100%;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 42%);
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .filter-field {
    width: 100%;
  }

  .toolbar-end {
    justify-content: flex-end;
  }

  .clear-filters {
    display: none;
  }

  .result-count {
    font-size: 9.5px;
  }

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

  .status-chip {
    padding-inline: 7px;
    font-size: 10px;
  }

  .detail-title {
    font-size: 28px;
  }

  .toast-text {
    font-size: 12px;
  }
}

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