/* Switchboard
   Type: Space Grotesk (display), Work Sans (reading), IBM Plex Mono (metadata).
   Radius system: 16px panels, 10px controls, 999px pills and avatars.
   Theme: CSS tokens, system preference by default, optional explicit override. */

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-weight: 300 700;
  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 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #eff1ec;
  --surface: #fdfdfb;
  --surface-2: #f5f7f2;
  --surface-3: #ecefe8;
  --ink: #161b17;
  --ink-soft: #343c35;
  --muted: #5c655c;
  --muted-strong: #485248;
  --line: #d9ddd3;
  --line-strong: #b9c0b4;
  --accent: #dc4a22;
  --accent-text: #a83718;
  --accent-soft: #fbe7df;
  --accent-ink: #0a0d0a;
  --sidebar: #171d19;
  --sidebar-raise: #202822;
  --sidebar-ink: #eff2eb;
  --sidebar-muted: #9aa59c;
  --sidebar-accent: #ff906b;
  --sidebar-line: rgba(255, 255, 255, 0.12);
  --status-todo-bg: #e9ece5;
  --status-todo-ink: #4b554b;
  --status-progress-bg: #fbe7df;
  --status-progress-ink: #9e391b;
  --status-blocked-bg: #f8e5e2;
  --status-blocked-ink: #8f2e27;
  --status-done-bg: #e3eee6;
  --status-done-ink: #356146;
  --shadow-tint: rgba(27, 39, 29, 0.08);
  --shadow: 0 18px 48px var(--shadow-tint);
  --focus: #dc4a22;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1310;
    --surface: #161c18;
    --surface-2: #1c241e;
    --surface-3: #222d25;
    --ink: #eef2eb;
    --ink-soft: #d4dbd3;
    --muted: #a1ada3;
    --muted-strong: #bac4bb;
    --line: #2b362e;
    --line-strong: #3c4b40;
    --accent: #ff7d51;
    --accent-text: #ffa184;
    --accent-soft: #39251d;
    --accent-ink: #141915;
    --sidebar: #090d0a;
    --sidebar-raise: #151d17;
    --sidebar-ink: #f0f4ed;
    --sidebar-muted: #94a298;
    --sidebar-accent: #ffa184;
    --sidebar-line: rgba(255, 255, 255, 0.11);
    --status-todo-bg: #263028;
    --status-todo-ink: #c1ccc2;
    --status-progress-bg: #3b261e;
    --status-progress-ink: #ffb195;
    --status-blocked-bg: #3b2320;
    --status-blocked-ink: #ffb2a8;
    --status-done-bg: #1e3226;
    --status-done-ink: #a9d6b8;
    --shadow-tint: rgba(0, 0, 0, 0.34);
    --shadow: 0 20px 54px var(--shadow-tint);
    --focus: #ff7d51;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1310;
  --surface: #161c18;
  --surface-2: #1c241e;
  --surface-3: #222d25;
  --ink: #eef2eb;
  --ink-soft: #d4dbd3;
  --muted: #a1ada3;
  --muted-strong: #bac4bb;
  --line: #2b362e;
  --line-strong: #3c4b40;
  --accent: #ff7d51;
  --accent-text: #ffa184;
  --accent-soft: #39251d;
  --accent-ink: #141915;
  --sidebar: #090d0a;
  --sidebar-raise: #151d17;
  --sidebar-ink: #f0f4ed;
  --sidebar-muted: #94a298;
  --sidebar-accent: #ffa184;
  --sidebar-line: rgba(255, 255, 255, 0.11);
  --status-todo-bg: #263028;
  --status-todo-ink: #c1ccc2;
  --status-progress-bg: #3b261e;
  --status-progress-ink: #ffb195;
  --status-blocked-bg: #3b2320;
  --status-blocked-ink: #ffb2a8;
  --status-done-bg: #1e3226;
  --status-done-ink: #a9d6b8;
  --shadow-tint: rgba(0, 0, 0, 0.34);
  --shadow: 0 20px 54px var(--shadow-tint);
  --focus: #ff7d51;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 26px 20px 20px;
  overflow-y: auto;
  background: var(--sidebar);
  color: var(--sidebar-ink);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand-sub {
  margin-top: 3px;
  color: var(--sidebar-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.side-nav {
  margin-top: 42px;
}

.nav-title {
  margin: 0 0 10px 12px;
  color: var(--sidebar-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.side-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 39px;
  margin: 1px 0;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.side-filter:hover {
  background: var(--sidebar-raise);
  color: var(--sidebar-ink);
}

.side-filter[aria-pressed="true"] {
  border-color: var(--sidebar-line);
  background: var(--sidebar-raise);
  color: var(--sidebar-ink);
}

.side-filter[aria-pressed="true"] .side-count {
  color: var(--sidebar-accent);
}

.side-count {
  color: var(--sidebar-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.people {
  margin-top: 34px;
}

.people-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 12px;
  color: var(--sidebar-muted);
  font-size: 13px;
}

.person-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-count {
  margin-left: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border: 1px solid var(--sidebar-line);
  border-radius: 999px;
  background: var(--sidebar-raise);
  color: var(--sidebar-ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 30px;
}

.side-note {
  margin: 0 12px 14px;
  color: var(--sidebar-muted);
  font-size: 11px;
  line-height: 1.5;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--sidebar-line);
  border-radius: 9px;
  background: transparent;
  color: var(--sidebar-ink);
  font-size: 12px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
  background: var(--sidebar-raise);
}

.theme-glyph {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.theme-glyph::after {
  content: "";
  position: absolute;
  top: -1.5px;
  left: 4px;
  width: 8px;
  height: 12px;
  border-radius: 999px;
  background: var(--sidebar);
}

.theme-toggle[data-theme-state="dark"] .theme-glyph::after {
  left: 1px;
}

/* Main masthead */

.main {
  min-width: 0;
  padding: 34px 40px 48px;
}

.mobile-brand {
  display: none;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.top-copy {
  min-width: 0;
}

.top h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(38px, 4.2vw, 54px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.inbox-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.015em;
}

.controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: var(--muted-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.search-wrap {
  position: relative;
}

input[type="search"],
select {
  height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input[type="search"] {
  width: 238px;
  padding: 0 14px;
  font-size: 13.5px;
}

input[type="search"]::placeholder {
  color: var(--muted);
  opacity: 1;
}

input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

select {
  width: 166px;
  padding: 0 36px 0 13px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 19px,
    calc(100% - 12px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font-size: 13.5px;
}

input[type="search"]:hover,
select:hover {
  border-color: var(--muted);
}

input[type="search"]:focus-visible,
select:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.clear-search {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 31px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.clear-search:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* Workspace */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 414px);
  gap: 28px;
  align-items: start;
}

.list-pane {
  min-width: 0;
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
  padding: 0 2px;
}

.list-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.list-count {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

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

.task {
  transition: background 170ms ease, box-shadow 170ms ease;
}

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

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

.task.is-selected {
  background: var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent);
}

.task-open {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 22px;
  gap: 17px;
  align-items: start;
  width: 100%;
  padding: 18px 20px 19px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.task-open:focus-visible {
  outline-offset: -3px;
}

.task-status {
  justify-self: start;
  padding: 4px 9px 5px;
  border-radius: 999px;
  font-family: "Work Sans", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

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

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

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

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

.task-content {
  display: block;
  min-width: 0;
}

.task-title {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.24;
}

.task-summary {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.meta-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
}

.avatar-sm {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted-strong);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.task-arrow {
  align-self: center;
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  line-height: 1;
  opacity: 0.55;
  transform: translateX(0);
  transition: transform 180ms ease, opacity 180ms ease, color 180ms ease;
}

.task-open:hover .task-arrow,
.task-open:focus-visible .task-arrow {
  color: var(--accent-text);
  opacity: 1;
  transform: translateX(3px);
}

/* Loading skeleton */

.skeleton-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 17px;
  padding: 21px 20px;
}

.skeleton-row + .skeleton-row {
  border-top: 1px solid var(--line);
}

.skeleton {
  display: block;
  border-radius: 999px;
  background: var(--surface-3);
}

.skeleton-pill {
  width: 78px;
  height: 20px;
}

.skeleton-line {
  height: 12px;
  margin-top: 2px;
}

.skeleton-line.short {
  grid-column: 2;
  width: 38%;
  margin-top: -12px;
}

/* Empty list state */

.empty-state {
  padding: 48px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}

.empty-label {
  margin: 0 0 10px;
  color: var(--accent-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-state h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.empty-state p {
  max-width: 38ch;
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.primary-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 140ms ease, filter 140ms ease;
}

.primary-button:hover {
  filter: brightness(1.04);
}

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

/* Reading pane and empty reading state */

.reading-pane {
  position: sticky;
  top: 28px;
  min-width: 0;
}

.reading-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 472px;
  padding: 34px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.empty-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent-text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  line-height: 1;
}

.reading-empty h2 {
  max-width: 14ch;
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.reading-empty > p {
  max-width: 32ch;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.empty-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.empty-stat {
  padding: 13px 15px 14px;
  background: var(--surface-2);
}

.empty-stat span {
  display: block;
}

.stat-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  margin-top: 5px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Detail */

.detail {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: detail-in 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.close-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.close-button:hover {
  border-color: var(--muted);
  background: var(--surface-2);
  color: var(--ink);
}

.close-x {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  line-height: 1;
}

.detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 27px;
}

.detail h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
  margin: 22px 0 0;
  padding: 17px 18px;
  border-radius: 12px;
  background: var(--surface-2);
}

.meta-block {
  min-width: 0;
}

.meta-block dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-block dd {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.35;
}

.meta-block dd .avatar-sm {
  background: var(--surface-3);
}

.priority-high {
  color: var(--accent-text) !important;
  font-weight: 600;
}

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

.detail-brief h3 {
  margin: 0 0 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-body-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.68;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.status-editor {
  margin-top: 27px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.status-editor .status-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.status-editor select {
  width: 100%;
  background-color: var(--surface);
}

.status-helper {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.status-feedback {
  min-height: 17px;
  margin: 7px 0 0;
  color: var(--accent-text);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
}

.detail-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.tag {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  line-height: 1.2;
}

.comment-count {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

/* Toast */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

/* Responsive */

@media (max-width: 1100px) {
  .app {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 20px 24px 40px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
  }

  .mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 18px;
  }

  .compact-toggle {
    width: auto;
    min-height: 36px;
    padding: 8px 10px;
    border-color: var(--line);
    color: var(--muted-strong);
  }

  .compact-toggle:hover {
    background: var(--surface-2);
  }

  .compact-toggle .theme-glyph::after {
    background: var(--bg);
  }

  .reading-pane {
    display: none;
  }

  .workspace {
    display: block;
  }

  .reading-pane.is-open {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    padding: 12px;
    overflow-y: auto;
    background: var(--bg);
    overscroll-behavior: contain;
  }

  .reading-pane.is-open .detail {
    max-height: none;
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    overflow: visible;
  }

  .reading-pane.is-open .detail-top {
    position: sticky;
    top: 0;
    z-index: 2;
  }

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

@media (max-width: 780px) {
  .main {
    padding: 16px 16px 36px;
  }

  .mobile-brand {
    margin-bottom: 24px;
  }

  .top {
    display: block;
    margin-bottom: 24px;
  }

  .top h1 {
    font-size: 40px;
  }

  .inbox-summary {
    margin-top: 9px;
  }

  .controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 146px;
    align-items: end;
    gap: 10px;
    margin-top: 23px;
  }

  .search-wrap,
  input[type="search"],
  select {
    width: 100%;
  }

  .workspace {
    display: block;
  }

  .task-open {
    grid-template-columns: 92px minmax(0, 1fr) 18px;
    gap: 13px;
    padding: 17px 16px 18px;
  }

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

  .task-summary {
    font-size: 12.5px;
  }

  .skeleton-row {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
    padding: 20px 16px;
  }

  .reading-empty {
    min-height: 380px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 560px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .task-open {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 9px 10px;
  }

  .task-status {
    grid-column: 1 / -1;
  }

  .task-arrow {
    align-self: start;
    margin-top: 4px;
  }

  .task-meta {
    gap: 6px 11px;
  }

  .reading-pane.is-open {
    padding: 0;
  }

  .reading-pane.is-open .detail {
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .detail-top {
    border-radius: 0;
  }

  .detail-scroll {
    padding: 21px 18px 30px;
  }

  .detail-meta {
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    padding: 15px;
  }

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

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