:root {
  --mist: #e9f0f2;
  --sheet: #f9fbfa;
  --ink: #17313b;
  --track: #39758d;
  --coral: #d95d46;
  --pine: #23736a;
  --amber: #c1842f;
  --line: rgba(23, 49, 59, 0.14);
  --muted: rgba(23, 49, 59, 0.62);
  --shadow: 0 18px 45px rgba(23, 49, 59, 0.11);
  --radius: 18px;
  color-scheme: light;
  font-family:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--mist);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(57, 117, 141, 0.13), transparent 28rem),
    linear-gradient(110deg, rgba(255, 255, 255, 0.46), transparent 42%),
    var(--mist);
}

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

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(57, 117, 141, 0.44);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.section-kicker,
.brand-kicker,
.wordmark small,
.auth-card__eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button--primary {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(23, 49, 59, 0.18);
}

.button--primary:hover {
  background: #214452;
  box-shadow: 0 11px 26px rgba(23, 49, 59, 0.24);
}

.button--quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.button--wide {
  width: 100%;
  justify-content: space-between;
  padding-inline: 1.25rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(249, 251, 250, 0.68);
  cursor: pointer;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.icon-button:hover {
  background: var(--sheet);
  transform: rotate(4deg);
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

/* Login */

.auth-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.auth-brand {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 8rem);
  color: #f5fbfb;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%),
    var(--ink);
  isolation: isolate;
}

.auth-brand::before {
  position: absolute;
  z-index: -1;
  width: 33rem;
  height: 33rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  inset: auto -9rem -13rem auto;
  box-shadow:
    0 0 0 5rem rgba(255, 255, 255, 0.025),
    0 0 0 11rem rgba(255, 255, 255, 0.018);
}

.auth-brand h1 {
  max-width: 9ch;
  margin: 0.7rem 0 1rem;
  font-size: clamp(3.6rem, 8vw, 7.5rem);
  font-weight: 620;
  letter-spacing: -0.075em;
  line-height: 0.93;
}

.auth-brand p {
  max-width: 28rem;
  margin: 0;
  color: rgba(245, 251, 251, 0.7);
  font-size: 1.05rem;
  line-height: 1.8;
}

.brand-kicker {
  color: #8ec6d5;
}

.auth-route {
  display: grid;
  width: min(34rem, 85%);
  align-items: center;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  margin-top: 5rem;
}

.auth-route__node {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: var(--ink);
}

.auth-route__node--active {
  border-color: #ff9a7f;
  background: #ff9a7f;
  box-shadow: 0 0 0 7px rgba(255, 154, 127, 0.12);
}

.auth-route__line {
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.auth-card {
  display: flex;
  width: min(28rem, calc(100% - 3rem));
  flex-direction: column;
  justify-content: center;
  margin: auto;
}

.auth-card__eyebrow {
  color: var(--track);
}

.auth-card h2 {
  margin: 0.55rem 0 0.55rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.045em;
}

.auth-card__intro {
  margin: 0 0 2.2rem;
  color: var(--muted);
}

.auth-card label {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-card input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(249, 251, 250, 0.82);
}

.auth-card input {
  min-height: 50px;
  padding: 0 0.9rem;
}

.form-error {
  min-height: 1.25rem;
  margin: 0 0 0.8rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 700;
}

/* App shell */

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

.topbar {
  display: grid;
  min-height: 88px;
  align-items: center;
  gap: 1.3rem;
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
  padding: 1rem clamp(1rem, 2.4vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(249, 251, 250, 0.72);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.wordmark__mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.wordmark__mark::before,
.wordmark__mark::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.wordmark__mark::before {
  left: -3px;
}

.wordmark__mark::after {
  right: -3px;
}

.wordmark__mark span {
  width: 19px;
  height: 1px;
  background: var(--ink);
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.wordmark small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.52rem;
}

.topbar__date {
  padding-left: 1.3rem;
  border-left: 1px solid var(--line);
}

.topbar__date span,
.topbar__date small {
  display: block;
}

.topbar__date span {
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar__date small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.search-box {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.63);
  transition:
    border 160ms ease,
    background 160ms ease;
}

.search-box:focus-within {
  border-color: rgba(57, 117, 141, 0.45);
  background: var(--sheet);
}

.search-box svg {
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

kbd {
  min-width: 1.5rem;
  padding: 0.14rem 0.32rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
  text-align: center;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Status route */

.route-panel {
  display: grid;
  align-items: center;
  gap: 2rem;
  grid-template-columns: 12rem 1fr;
  padding: 1rem clamp(1rem, 2.4vw, 2.2rem);
  color: #edf8f8;
  background: var(--ink);
}

.route-panel__label span,
.route-panel__label small {
  display: block;
}

.route-panel__label span {
  font-size: 0.8rem;
  font-weight: 750;
}

.route-panel__label small {
  margin-top: 0.2rem;
  color: rgba(237, 248, 248, 0.55);
  font-size: 0.67rem;
}

.route-track {
  position: relative;
  display: grid;
  align-items: start;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  scrollbar-width: none;
}

.route-track::-webkit-scrollbar {
  display: none;
}

.route-track::before {
  position: absolute;
  height: 1px;
  background: rgba(237, 248, 248, 0.28);
  content: "";
  inset: 10px 7.5% auto;
}

.route-stop {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.38rem;
  padding: 0;
  border: 0;
  color: rgba(237, 248, 248, 0.6);
  background: none;
  cursor: pointer;
  font-size: 0.68rem;
}

.route-stop__node {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(237, 248, 248, 0.45);
  border-radius: 50%;
  background: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.56rem;
  transition:
    background 160ms ease,
    border 160ms ease,
    transform 160ms ease;
}

.route-stop:hover .route-stop__node,
.route-stop.is-current .route-stop__node {
  border-color: #8ec6d5;
  background: var(--track);
  transform: scale(1.14);
}

.route-stop.is-drop-target .route-stop__node {
  border-color: #ff9a7f;
  background: var(--coral);
  box-shadow: 0 0 0 7px rgba(217, 93, 70, 0.2);
}

.route-stop.is-moving {
  color: #fff;
}

/* Workspace */

.workspace {
  display: grid;
  min-height: calc(100vh - 173px);
  grid-template-columns: 248px minmax(0, 1fr);
}

.focus-rail {
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1.25rem 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(249, 251, 250, 0.38);
}

.focus-rail__heading h2,
.board-heading h2 {
  margin: 0.3rem 0 0;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.section-kicker {
  color: var(--track);
}

.metric-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.4rem;
}

.metric {
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: left;
}

.metric__value {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.4rem;
  font-weight: 760;
}

.metric__label {
  color: var(--muted);
  font-size: 0.68rem;
}

.metric--alert .metric__value {
  color: var(--coral);
}

.focus-list,
.filter-panel,
.insight-panel {
  margin-top: 1.8rem;
}

.focus-list__heading,
.filter-panel__heading,
.insight-panel__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.focus-list h3,
.filter-panel h3,
.insight-panel h3 {
  margin: 0;
  font-size: 0.8rem;
}

.focus-list__heading > span,
.insight-panel__heading > span {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.6rem;
}

.insight-item {
  display: grid;
  gap: 0.25rem 0.5rem;
  grid-template-columns: 7px 1fr;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
}

.insight-item__dot {
  width: 7px;
  height: 7px;
  margin-top: 0.24rem;
  border-radius: 50%;
  background: var(--amber);
}

.insight-item__dot[data-status="confirmed"] {
  background: var(--pine);
}

.insight-item p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
}

.insight-item small {
  grid-column: 2;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
}

.insight-empty {
  margin: 0;
  padding: 0.8rem 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.focus-task {
  display: grid;
  width: 100%;
  gap: 0.3rem;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.focus-task strong {
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-task span {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.61rem;
}

.empty-copy {
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.filter-chip {
  min-height: 31px;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
}

.filter-chip.is-active {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.rail-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2rem;
}

.board-section {
  min-width: 0;
  padding: 1.8rem clamp(1rem, 2.5vw, 2.4rem) 2.4rem;
}

.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.board-heading p {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
}

.assistant-role {
  display: grid;
  align-items: center;
  gap: 0.8rem 1.5rem;
  grid-template-columns: minmax(185px, 0.7fr) minmax(280px, 1.5fr);
  margin: -0.25rem 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(47, 100, 118, 0.18);
  border-left: 3px solid var(--track);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.42);
}

.assistant-role strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}

.assistant-role p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.65;
}

.board {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.lane {
  display: flex;
  min-height: 460px;
  flex-direction: column;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(249, 251, 250, 0.44);
  transition:
    border 160ms ease,
    background 160ms ease;
}

.lane.is-drag-over {
  border-color: var(--track);
  background: rgba(57, 117, 141, 0.1);
}

.lane__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.2rem 0.8rem;
}

.lane__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lane__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--track);
  box-shadow: 0 0 0 4px rgba(57, 117, 141, 0.1);
}

.lane[data-status="inbox"] .lane__dot {
  background: var(--muted);
}

.lane[data-status="in_progress"] .lane__dot {
  background: var(--pine);
}

.lane[data-status="waiting"] .lane__dot {
  background: var(--amber);
}

.lane__header h3 {
  margin: 0;
  font-size: 0.79rem;
}

.lane__count {
  min-width: 1.6rem;
  padding: 0.17rem 0.42rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(23, 49, 59, 0.07);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  text-align: center;
}

.lane__cards {
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.task-card {
  position: relative;
  display: grid;
  gap: 0.72rem;
  padding: 0.9rem 0.9rem 0.85rem 1rem;
  border: 1px solid rgba(23, 49, 59, 0.12);
  border-radius: 13px;
  background: var(--sheet);
  box-shadow: 0 2px 0 rgba(23, 49, 59, 0.035);
  cursor: grab;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border 160ms ease;
}

.task-card::before {
  position: absolute;
  width: 3px;
  border-radius: 4px;
  background: var(--track);
  content: "";
  inset: 0.75rem auto 0.75rem 0;
}

.task-card[data-priority="P0"]::before {
  background: var(--coral);
}

.task-card[data-priority="P1"]::before {
  background: var(--amber);
}

.task-card[data-priority="P3"]::before {
  background: rgba(23, 49, 59, 0.28);
}

.task-card:hover {
  z-index: 2;
  border-color: rgba(57, 117, 141, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-3px) rotate(-0.3deg);
}

.task-card.is-dragging {
  opacity: 0.48;
  cursor: grabbing;
  transform: rotate(1.4deg) scale(0.98);
}

.task-card.is-keyboard-moving {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(217, 93, 70, 0.14);
}

.task-card__meta,
.task-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.priority-badge,
.project-badge,
.format-badge,
.dependency-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.57rem;
  font-weight: 750;
}

.priority-badge {
  color: var(--track);
  background: rgba(57, 117, 141, 0.1);
}

.priority-badge[data-priority="P0"] {
  color: var(--coral);
  background: rgba(217, 93, 70, 0.11);
}

.priority-badge[data-priority="P1"] {
  color: #8a5b1d;
  background: rgba(193, 132, 47, 0.13);
}

.priority-badge[data-priority="P3"] {
  color: var(--muted);
  background: rgba(23, 49, 59, 0.06);
}

.task-card__id,
.task-card__due {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.58rem;
}

.task-card__due.is-overdue {
  color: var(--coral);
  font-weight: 750;
}

.task-card h4 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.5;
}

.task-card__labels {
  display: flex;
  overflow: hidden;
  gap: 0.35rem;
}

.project-badge {
  overflow: hidden;
  max-width: 100%;
  color: var(--pine);
  background: rgba(35, 115, 106, 0.09);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-badge {
  color: var(--track);
  background: rgba(57, 117, 141, 0.09);
}

.dependency-badge {
  color: var(--coral);
  background: rgba(217, 93, 70, 0.09);
}

.lane__empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 1.4rem;
  border: 1px dashed rgba(23, 49, 59, 0.18);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.lane__add {
  width: 100%;
  margin-top: auto;
  padding: 0.8rem;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.lane__add:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
}

.archive-band {
  display: grid;
  align-items: stretch;
  gap: 0.75rem;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr);
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(249, 251, 250, 0.42);
}

.archive-band__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.4rem 0.55rem;
}

.archive-band__copy strong {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

.archive-target {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  text-align: left;
  transition:
    border 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.archive-target:hover,
.archive-target.is-drag-over {
  border-color: var(--pine);
  background: rgba(35, 115, 106, 0.08);
  transform: translateY(-2px);
}

.archive-target--cancelled:hover,
.archive-target--cancelled.is-drag-over {
  border-color: var(--coral);
  background: rgba(217, 93, 70, 0.07);
}

.archive-target__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--pine);
  background: rgba(35, 115, 106, 0.11);
  font-weight: 800;
}

.archive-target--cancelled .archive-target__icon {
  color: var(--coral);
  background: rgba(217, 93, 70, 0.1);
}

.archive-target strong,
.archive-target small {
  display: block;
}

.archive-target strong {
  font-size: 0.76rem;
}

.archive-target small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.64rem;
}

/* Dialogs */

dialog {
  padding: 0;
  border: 1px solid rgba(23, 49, 59, 0.12);
  border-radius: 22px;
  color: var(--ink);
  background: var(--sheet);
  box-shadow: 0 30px 90px rgba(23, 49, 59, 0.28);
}

dialog::backdrop {
  background: rgba(14, 31, 37, 0.48);
  backdrop-filter: blur(5px);
}

.task-dialog {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
}

.task-dialog form {
  padding: 1.35rem;
}

.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1.5rem;
}

.dialog-header h2 {
  margin: 0.32rem 0 0;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.dialog-intro {
  max-width: 520px;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.5rem;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

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

.field > span {
  font-size: 0.72rem;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 0.65rem 0.75rem;
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field small {
  color: var(--muted);
  font-size: 0.62rem;
}

.capture-context {
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(47, 100, 118, 0.2);
  border-radius: 12px;
  background: rgba(47, 100, 118, 0.055);
}

.capture-context > span {
  color: var(--track);
  font-size: 0.7rem;
  font-weight: 760;
}

.capture-context p {
  margin: 0.45rem 0 0.35rem;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.archive-dialog,
.help-dialog {
  width: min(620px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1.35rem;
}

.archive-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(233, 240, 242, 0.36);
}

.archive-item button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 720;
  text-align: left;
}

.archive-item small {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.6rem;
}

.shortcut-list {
  display: grid;
  gap: 0;
  margin: 1.4rem 0 0;
}

.shortcut-list div {
  display: grid;
  align-items: center;
  gap: 1rem;
  grid-template-columns: 6rem 1fr;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.shortcut-list dt,
.shortcut-list dd {
  margin: 0;
}

.shortcut-list dt {
  display: flex;
  gap: 0.35rem;
}

.shortcut-list dd {
  color: var(--muted);
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  z-index: 20;
  max-width: min(390px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 1rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  inset: auto auto 1.5rem 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.toast.is-error {
  background: var(--coral);
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: auto minmax(220px, 1fr) auto;
  }

  .topbar__date {
    display: none;
  }

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

  .board {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    padding-bottom: 0.5rem;
    scroll-snap-type: x proximity;
  }

  .lane {
    scroll-snap-align: start;
  }
}

@media (max-width: 820px) {
  .auth-view {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: 42vh;
    padding: 2.5rem 1.5rem;
  }

  .auth-brand h1 {
    max-width: none;
    font-size: clamp(3.2rem, 14vw, 5.5rem);
  }

  .auth-brand p {
    font-size: 0.92rem;
  }

  .auth-route {
    margin-top: 2.5rem;
  }

  .auth-card {
    padding: 3rem 0;
  }

  .topbar {
    min-height: auto;
    grid-template-columns: 1fr auto;
  }

  .search-box {
    order: 3;
    grid-column: 1 / -1;
  }

  .route-panel {
    gap: 0.7rem;
    grid-template-columns: 1fr;
  }

  .route-panel__label small {
    display: none;
  }

  .route-track {
    overflow-x: auto;
    grid-template-columns: repeat(6, minmax(84px, 1fr));
    padding: 0.3rem 0 0.5rem;
  }

  .route-track::before {
    min-width: 430px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .focus-rail {
    display: grid;
    align-items: end;
    gap: 1rem;
    grid-template-columns: auto auto minmax(210px, 1fr);
    padding: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .focus-list,
  .filter-panel,
  .insight-panel {
    margin: 0;
  }

  .focus-list,
  .insight-panel,
  .rail-footer {
    display: none;
  }

  .metric-grid {
    min-width: 190px;
    margin: 0;
  }

  .board-section {
    padding-top: 1.3rem;
  }
}

@media (max-width: 620px) {
  .wordmark small,
  .topbar__actions .icon-button {
    display: none;
  }

  .topbar {
    gap: 0.7rem;
    padding: 0.8rem;
  }

  .topbar__actions .button {
    width: 44px;
    padding: 0;
  }

  .topbar__actions .button span:last-child {
    display: none;
  }

  .route-panel {
    padding-inline: 0.8rem;
  }

  .focus-rail {
    align-items: center;
    grid-template-columns: 1fr;
  }

  .focus-rail__heading {
    display: none;
  }

  .metric-grid {
    width: 100%;
  }

  .filter-panel {
    width: 100%;
  }

  .filter-panel__heading {
    display: none;
  }

  .filter-chips {
    flex-wrap: nowrap;
    margin: 0;
  }

  .filter-chip {
    flex: 1;
  }

  .board-heading {
    align-items: start;
  }

  .board-heading h2 {
    font-size: 1.3rem;
  }

  .assistant-role {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .board {
    margin-right: -1rem;
    grid-template-columns: repeat(4, minmax(84vw, 84vw));
    padding-right: 1rem;
    scroll-snap-type: x mandatory;
  }

  .lane {
    min-height: 430px;
  }

  .archive-band {
    grid-template-columns: 1fr 1fr;
  }

  .archive-band__copy {
    grid-column: 1 / -1;
  }

  .archive-target {
    align-items: start;
    padding: 0.7rem;
  }

  .archive-target__icon {
    width: 27px;
    height: 27px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field--full {
    grid-column: auto;
  }

  .task-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }

  .task-dialog form {
    max-height: 92vh;
    overflow-y: auto;
  }
}

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