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

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

:root {
  --paper: #f4f3ef;
  --paper-deep: #e9ece7;
  --ink: #17201d;
  --muted: #68716d;
  --spruce: #245747;
  --spruce-dark: #173d32;
  --signal: #f2b84b;
  --rust: #b6513e;
  --mist: #dce4de;
  --white: #fffefa;
  --line: #ccd2cd;
  --focus: #0b6da3;
  --rail-width: 86px;
  --detail-width: 455px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Work Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

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

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 10px 20px;
  background: var(--spruce);
  color: var(--white);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--white);
}

.brand-mark svg { width: 38px; height: 38px; }
.brand-mark path, .brand-mark circle { fill: none; stroke: currentColor; stroke-width: 2; }
.brand-mark circle { fill: var(--signal); stroke: var(--signal); }

.rail-nav {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 72px;
}

.rail-link {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 5px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #bcd0c9;
  text-decoration: none;
  cursor: pointer;
}

.rail-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.rail-link span { font-size: 10px; font-weight: 600; }
.rail-link:hover { color: var(--white); background: rgba(255,255,255,.08); }
.rail-link.is-active { color: var(--white); }
.rail-link.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: var(--signal);
  border-radius: 0 4px 4px 0;
}

.profile {
  margin-top: auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 50%;
  color: var(--white);
  font-size: 12px;
  font-weight: 650;
}

.workspace { margin-left: var(--rail-width); min-height: 100vh; }

.topbar {
  height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--ink);
  font-family: "Oswald", sans-serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .015em;
  text-decoration: none;
}

.topbar-context { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 560; }
.team-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(242,184,75,.18); }
.icon-button { position: relative; justify-self: end; display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.notification-dot { position: absolute; top: 8px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--rust); }

.content-frame { display: flex; min-height: calc(100vh - 70px); }
.inbox { flex: 1 1 auto; min-width: 0; padding: 54px clamp(30px, 5vw, 80px) 70px; }
.detail-host { flex: 0 0 0; width: 0; overflow: hidden; border-left: 0 solid var(--line); background: var(--white); transition: flex-basis 220ms ease, width 220ms ease; }
.detail-host.is-open { flex-basis: var(--detail-width); width: var(--detail-width); border-left-width: 1px; overflow: visible; }

.inbox-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; max-width: 980px; margin: 0 auto 30px; }
.date-line { margin: 0 0 5px; color: var(--spruce); font-size: 14px; font-weight: 650; }
h1 { margin: 0; font-family: "Oswald", sans-serif; font-size: clamp(50px, 5vw, 76px); line-height: .98; font-weight: 520; letter-spacing: -.035em; }
.inbox-note { margin: 0 0 5px; padding-left: 16px; border-left: 3px solid var(--signal); color: var(--muted); font-size: 13px; line-height: 1.45; }
.inbox-note span { color: var(--ink); font-weight: 700; }

.toolbar { max-width: 980px; margin: 0 auto 28px; display: flex; gap: 12px; }
.search-field { flex: 1; min-width: 180px; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); background: var(--white); }
.search-field:focus-within { border-color: var(--spruce); box-shadow: 0 0 0 1px var(--spruce); }
.search-field svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search-field input::placeholder { color: #868e8a; }
.search-field kbd { min-width: 24px; padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; color: var(--muted); background: var(--paper); font-family: inherit; font-size: 11px; text-align: center; }
.filter-field { position: relative; width: 184px; height: 50px; display: flex; align-items: center; background: var(--white); border: 1px solid var(--line); }
.filter-field span { padding-left: 15px; color: var(--muted); font-size: 12px; }
.filter-field select { position: absolute; inset: 0; width: 100%; padding: 17px 34px 4px 15px; border: 0; outline: 0; appearance: none; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.filter-field svg { position: absolute; right: 12px; width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.7; pointer-events: none; }

.list-meta { max-width: 980px; margin: 0 auto; padding: 0 18px 10px 46px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--ink); }
.task-list { position: relative; max-width: 980px; margin: 0 auto; }
.task-list::before { content: ""; position: absolute; z-index: 0; left: 20px; top: 34px; bottom: 34px; width: 1px; background: var(--line); }

.task-item { position: relative; z-index: 1; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 20px; align-items: center; min-height: 94px; padding: 18px 18px 18px 7px; border-bottom: 1px solid var(--line); }
.task-item[aria-current="true"] { background: linear-gradient(90deg, rgba(36,87,71,.07), transparent 72%); }
.status-node { width: 27px; height: 27px; display: grid; place-items: center; border: 6px solid var(--paper); border-radius: 50%; background: var(--status-color); box-shadow: 0 0 0 1px var(--status-color); }
.status-node::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--paper); }
.task-copy { min-width: 0; }
.task-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.project-name { color: var(--spruce); font-weight: 680; }
.priority { display: inline-flex; align-items: center; gap: 5px; }
.priority::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.priority-high { color: var(--rust); }
.task-title-button { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.3; font-weight: 610; text-align: left; cursor: pointer; }
.task-title-button:hover { color: var(--spruce); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.task-assignee { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.task-date { align-self: center; display: grid; justify-items: end; gap: 6px; min-width: 82px; color: var(--ink); font-size: 12px; font-weight: 570; }
.status-label { padding: 3px 7px; border: 1px solid color-mix(in srgb, var(--status-color) 55%, var(--line)); color: var(--status-text); background: color-mix(in srgb, var(--status-color) 11%, transparent); font-size: 10px; font-weight: 650; }

.empty-state { max-width: 980px; margin: 0 auto; padding: 70px 20px; text-align: center; }
.empty-signal { position: relative; width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 20px; border: 1px solid var(--line); border-radius: 50%; }
.empty-signal::before, .empty-signal::after { content: ""; position: absolute; background: var(--line); }
.empty-signal::before { width: 86px; height: 1px; }
.empty-signal::after { width: 1px; height: 86px; }
.empty-signal span { z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.empty-state h2 { margin: 0 0 8px; font-family: "Oswald", sans-serif; font-size: 30px; font-weight: 520; }
.empty-state p { margin: 0 auto 22px; color: var(--muted); font-size: 14px; }
.empty-state button { padding: 10px 16px; border: 1px solid var(--spruce); background: transparent; color: var(--spruce); font-weight: 650; cursor: pointer; }
.empty-state button:hover { background: var(--spruce); color: white; }

.detail-panel { position: sticky; top: 0; height: calc(100vh - 70px); display: flex; flex-direction: column; overflow-y: auto; }
.detail-top { padding: 25px 30px 20px; border-bottom: 1px solid var(--line); }
.detail-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.detail-index { color: var(--muted); font-size: 12px; }
.close-detail { display: inline-flex; align-items: center; gap: 7px; padding: 7px 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 620; cursor: pointer; }
.close-detail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.close-detail:hover { color: var(--rust); }
.detail-project { margin: 0 0 10px; color: var(--spruce); font-size: 13px; font-weight: 660; }
.detail-panel h2 { max-width: 360px; margin: 0; font-family: "Oswald", sans-serif; font-size: 37px; line-height: 1.12; font-weight: 520; letter-spacing: -.02em; }
.detail-body { padding: 26px 30px 40px; }
.status-block { padding: 18px; background: var(--paper-deep); border-left: 4px solid var(--current-status-color); }
.status-block label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 580; }
.status-select-wrap { position: relative; }
.status-select-wrap select { width: 100%; height: 42px; appearance: none; padding: 0 38px 0 12px; border: 1px solid #aeb8b1; border-radius: 0; background: var(--white); color: var(--ink); font-weight: 620; cursor: pointer; }
.status-select-wrap svg { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; fill: none; stroke: var(--ink); pointer-events: none; }
.status-feedback { min-height: 17px; margin: 8px 0 0; color: var(--spruce); font-size: 12px; font-weight: 600; }
.detail-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 650; }
.body-copy { margin: 0; white-space: pre-line; font-size: 14px; line-height: 1.68; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px; }
.detail-fact span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-fact strong { font-size: 13px; font-weight: 620; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 5px 9px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); font-size: 11px; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 11px 16px; background: var(--ink); color: var(--white); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
  :root { --detail-width: 400px; }
  .inbox { padding-inline: 30px; }
  .inbox-note { display: none; }
  .task-item { gap: 14px; }
}

@media (max-width: 760px) {
  :root { --rail-width: 0px; }
  body.detail-open { overflow: hidden; }
  .rail { position: fixed; inset: auto 0 0; width: 100%; height: 68px; flex-direction: row; justify-content: space-around; padding: 7px 18px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.2); }
  .brand-mark, .profile { display: none; }
  .rail-nav { display: flex; justify-content: space-around; margin: 0; }
  .rail-link { width: 82px; min-height: 50px; }
  .rail-link.is-active::before { left: 14px; right: 14px; top: auto; bottom: -7px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .workspace { margin: 0; padding-bottom: 68px; }
  .topbar { height: 58px; padding: 0 19px; grid-template-columns: 1fr auto; }
  .topbar-context { display: none; }
  .wordmark { font-size: 21px; }
  .content-frame { min-height: calc(100vh - 126px); }
  .inbox { padding: 31px 18px 45px; }
  .inbox-heading { margin-bottom: 23px; }
  h1 { font-size: 48px; }
  .date-line { font-size: 12px; }
  .toolbar { display: grid; grid-template-columns: 1fr 136px; gap: 8px; margin-bottom: 22px; }
  .search-field { grid-column: 1 / -1; height: 47px; }
  .search-field kbd { display: none; }
  .filter-field { grid-column: 2; width: 136px; height: 45px; }
  .filter-field span { display: none; }
  .filter-field select { padding: 0 32px 0 13px; }
  .list-meta { padding-left: 42px; padding-right: 4px; }
  .task-list::before { left: 16px; }
  .task-item { grid-template-columns: 22px minmax(0, 1fr); gap: 13px; min-height: 104px; padding: 17px 3px 17px 5px; }
  .status-node { width: 23px; height: 23px; border-width: 5px; }
  .task-title-button { font-size: 15px; }
  .task-date { grid-column: 2; justify-self: start; display: flex; align-items: center; gap: 8px; margin-top: -3px; min-width: 0; }
  .task-assignee { display: none; }
  .detail-host, .detail-host.is-open { position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; border: 0; background: var(--white); transform: translateX(100%); transition: transform 220ms ease; }
  .detail-host.is-open { transform: translateX(0); }
  .detail-panel { position: static; height: 100%; }
  .detail-top { padding: 20px 22px 19px; }
  .detail-topline { margin-bottom: 24px; }
  .detail-panel h2 { font-size: 34px; }
  .detail-body { padding: 22px 22px 40px; }
  .toast { bottom: 88px; width: max-content; max-width: calc(100vw - 36px); text-align: center; }
}

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