/* Hopper, shared task inbox
   Radius system: cards & sheet 14px, inputs & buttons 10px, badges pill.
   One accent (ink) for primary actions; status colors are semantic only. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/artifacts/team-inbox--v1--s2--glm-5.3-flash--taste--2026-09-17T08-15-46-039Z/assets/space-grotesk.ttf") format("truetype");
  font-display: swap;
  font-weight: 300 700;
}
@font-face {
  font-family: "Work Sans";
  src: url("/artifacts/team-inbox--v1--s2--glm-5.3-flash--taste--2026-09-17T08-15-46-039Z/assets/work-sans.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/artifacts/team-inbox--v1--s2--glm-5.3-flash--taste--2026-09-17T08-15-46-039Z/assets/ibm-plex-mono.ttf") format("truetype");
  font-display: swap;
  font-weight: 400 700;
}

:root {
  --paper: #f6f6f3;
  --surface: #fefefd;
  --ink: #21211e;
  --ink-soft: #56564f;
  --ink-faint: #7c7c73;
  --line: #e3e3dc;
  --line-strong: #cfcfc6;
  --focus: #3b5bdb;

  --st-todo-bg: #ecece6;
  --st-todo-fg: #55554d;
  --st-progress-bg: #e1eaf8;
  --st-progress-fg: #2b538f;
  --st-blocked-bg: #f9e5d8;
  --st-blocked-fg: #96430f;
  --st-done-bg: #ddefe3;
  --st-done-fg: #1f6642;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --r-card: 14px;
  --r-input: 10px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

body.sheet-open { overflow: hidden; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: var(--r-input);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.topbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
}
.brand-mark { display: block; align-self: center; }
.topbar-tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

/* ---------- Workspace ---------- */
.workspace {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}
.intro { margin-bottom: 28px; }
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 6px;
}
.page-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 62ch;
}

/* ---------- Toolbar ---------- */
.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px 18px;
  align-items: end;
  margin-bottom: 10px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.field-input {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  padding: 10px 12px;
  width: 100%;
}
.field-input::placeholder { color: var(--ink-faint); }
.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2356564f' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.result-line {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 22px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* ---------- Task list ---------- */
.task-list[hidden] { display: none; }
.task-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.task-card:hover { border-color: var(--line-strong); }
.task-card:active { transform: scale(0.995); }

.task-link {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-card);
}
.task-main { flex: 1 1 auto; min-width: 0; }
.task-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17.5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 4px;
}
.task-link:hover .task-title { text-decoration: underline; text-underline-offset: 3px; }
.task-summary {
  display: -webkit-box;
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.task-meta strong { font-weight: 600; color: var(--ink-soft); }

.task-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-todo { background: var(--st-todo-bg); color: var(--st-todo-fg); }
.badge-in-progress { background: var(--st-progress-bg); color: var(--st-progress-fg); }
.badge-blocked { background: var(--st-blocked-bg); color: var(--st-blocked-fg); }
.badge-done { background: var(--st-done-bg); color: var(--st-done-fg); }

.open-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-faint);
}
.open-hint svg { transition: transform 0.15s ease; }
.task-link:hover .open-hint { color: var(--ink); }
.task-link:hover .open-hint svg { transform: translateX(2px); }

/* ---------- Empty state ---------- */
.empty-state {
  margin-top: 24px;
  padding: 44px 32px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  text-align: center;
}
.empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}
.empty-body {
  margin: 0 auto 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 48ch;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--r-input);
  border: 1px solid transparent;
  padding: 9px 16px;
  cursor: pointer;
}
.btn-quiet {
  background: var(--ink);
  color: var(--paper);
}
.btn-quiet:hover { background: #3a3a35; }
.btn-quiet:active { transform: scale(0.98); }

/* ---------- Detail sheet ---------- */
.sheet-root { position: relative; z-index: 40; }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 30, 0.42);
}
.sheet {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(520px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: no-preference) {
  .scrim { animation: fade-in 0.2s ease both; }
  .sheet { animation: slide-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.sheet-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-input);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--paper); }
.icon-btn:active { transform: scale(0.96); }

.sheet-body {
  padding: 24px;
  overflow-y: auto;
}
.sheet-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 20px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px 16px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin-bottom: 20px;
}
.status-row .field { flex: 1 1 200px; }
.status-note {
  margin: 0;
  font-size: 13.5px;
  color: var(--st-done-fg);
  flex: 1 1 100%;
  min-height: 1.2em;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  margin: 0 0 22px;
}
.meta-cell dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}
.meta-cell dd { margin: 0; font-size: 15px; color: var(--ink); }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  margin: 2px 4px 2px 0;
}

.sheet-text p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.65; color: var(--ink); max-width: 60ch; }
.sheet-text .expected { color: var(--ink-soft); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(33, 33, 30, 0.25);
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: toast-in 0.25s ease both; }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 20px 24px 28px;
}
.footer p {
  max-width: 1060px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .workspace { padding: 28px 16px 48px; }
  .topbar-inner { padding: 12px 16px; }
  .toolbar { grid-template-columns: 1fr; }
  .task-link { flex-direction: column; gap: 10px; padding: 16px; }
  .task-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .sheet { width: 100vw; border-left: 0; }
  .sheet-body { padding: 18px 16px 28px; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
}
