/* ==========================================================================
   Benchwork - shared task inbox
   Palette: cool drafting paper, ink, one cobalt accent.
   Type: Literata (display), DM Sans (UI), IBM Plex Mono (metadata).
   Shape rule: panels and controls use 3px corners; status badges are pills.
   ========================================================================== */

@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: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  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 {
  --paper: #edf0f4;
  --paper-deep: #e1e7ef;
  --surface: #fbfcfe;
  --surface-hover: #f3f6fa;
  --ink: #141924;
  --ink-2: #303a49;
  --muted: #4f5c6d;
  --faint: #5f6c7f;
  --line: #d2dae4;
  --line-strong: #b3bfce;
  --accent: #1d3ab5;
  --accent-deep: #14298a;
  --accent-soft: #dde4fa;
  --st-todo: #52627a;
  --st-progress: #8a5c07;
  --st-blocked: #a13333;
  --st-done: #2f6b4f;
  --bg-todo: #e6ebf2;
  --bg-progress: #f5ead4;
  --bg-blocked: #f6e2e0;
  --bg-done: #e0ebe4;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(20px, 4vw, 56px);
}

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

[hidden] {
  display: none !important;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 88% -12%, #e4eaf3 0%, rgba(228, 234, 243, 0) 62%),
    var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A fixed paper grain. Never intercepts pointers. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  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;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 70;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 3px;
  font-size: 13px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* Masthead ----------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1500px;
  height: 64px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
}

.brand__name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.brand__dot {
  color: var(--accent);
}

.masthead__divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}

.masthead__context {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.team {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 8px;
}

.team li {
  margin-left: -7px;
}

.team li:first-child {
  margin-left: 0;
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.avatar--team {
  width: 27px;
  height: 27px;
  border: 2px solid var(--paper);
  background: var(--paper-deep);
  font-size: 8.5px;
}

.avatar--sm {
  width: 26px;
  height: 26px;
  font-size: 8.5px;
  background: var(--paper);
}

/* Workspace ---------------------------------------------------------------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: clamp(32px, 4vw, 64px);
  max-width: 1500px;
  margin: 0 auto;
  padding: 44px var(--gutter) 96px;
  align-items: start;
}

.inbox {
  min-width: 0;
  scroll-margin-top: 84px;
}

.inbox__head {
  margin-bottom: 28px;
  animation: rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.inbox__title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--serif);
  font-size: clamp(44px, 4.4vw, 60px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.inbox__title:focus-visible {
  outline-offset: 8px;
}

.inbox__count {
  margin-top: 3px;
  padding: 3px 8px 2px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--accent);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.inbox__lede {
  margin-top: 12px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 14px;
}

/* Controls ----------------------------------------------------------------- */

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 14px;
  align-items: end;
}

.field {
  min-width: 0;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.field label,
.status-box label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.key-hint {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1;
}

input[type="search"],
select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

input[type="search"] {
  padding: 0 14px;
  appearance: none;
}

input[type="search"]::placeholder {
  color: #67758a;
  opacity: 1;
}

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

input[type="search"]:hover,
select:hover {
  border-color: #96a5b8;
}

input[type="search"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: #ffffff;
}

.select-wrap {
  position: relative;
}

.chevron {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin-top: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
}

.results-bar__summary {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.text-button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-button:hover {
  border-bottom-color: var(--accent);
}

/* Task groups and rows ----------------------------------------------------- */

.task-list {
  padding-bottom: 8px;
}

.group + .group {
  margin-top: 8px;
}

.group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 26px 0 10px;
}

.group__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-2);
}

.group__count {
  color: var(--faint);
  font-size: 10px;
}

.group__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.swatch {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: currentColor;
}

.swatch[data-status="todo"] {
  color: var(--st-todo);
}

.swatch[data-status="in-progress"] {
  color: var(--st-progress);
}

.swatch[data-status="blocked"] {
  color: var(--st-blocked);
}

.swatch[data-status="done"] {
  color: var(--st-done);
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 14px;
  align-items: center;
  padding: 19px 6px 18px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.task-row:hover {
  background: rgba(251, 252, 254, 0.72);
}

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

.task-row.is-enter {
  animation: row-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

.task-row__main {
  min-width: 0;
}

.task-row__title {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: break-word;
  text-wrap: pretty;
  transition: color 0.18s ease;
}

.task-row:hover .task-row__title,
.task-row__title:focus-visible {
  color: var(--accent);
}

.task-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 15px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.task-row__project {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.task-row__due {
  color: var(--muted);
}

.task-row__due time {
  color: var(--ink-2);
}

.task-row__comments {
  color: var(--faint);
}

.task-row__status {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.task-row__status[data-status="todo"] {
  color: var(--st-todo);
}

.task-row__status[data-status="in-progress"] {
  color: var(--st-progress);
}

.task-row__status[data-status="blocked"] {
  color: var(--st-blocked);
}

.task-row__status[data-status="done"] {
  color: var(--st-done);
}

.task-row__arrow {
  align-self: center;
  justify-self: end;
  color: var(--line-strong);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.task-row:hover .task-row__arrow,
.task-row:focus-within .task-row__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

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

/* Empty, loading, error ---------------------------------------------------- */

.loading {
  padding: 30px 0;
}

.skeleton {
  display: grid;
  gap: 11px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.skeleton__bar {
  display: block;
  width: 34%;
  height: 11px;
  border-radius: 2px;
  background: var(--paper-deep);
  animation: breathe 1.6s ease-in-out infinite;
}

.skeleton__bar--wide {
  width: 72%;
  height: 15px;
}

.skeleton__bar--mid {
  width: 54%;
  height: 15px;
}

.empty-state,
.load-error {
  max-width: 520px;
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
}

.empty-state__zero {
  display: block;
  margin-bottom: 14px;
  color: var(--line-strong);
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 0.8;
}

.empty-state__title,
.load-error h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.empty-state__copy,
.load-error p {
  margin-top: 10px;
  max-width: 42ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.empty-state__copy strong {
  color: var(--ink-2);
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

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

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

.button--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button--primary:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

/* Side panel --------------------------------------------------------------- */

.side {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  padding-right: 3px;
  padding-bottom: 2px;
  animation: rise 0.55s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.side::-webkit-scrollbar {
  width: 7px;
}

.side::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--line-strong);
}

.overview {
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
}

.micro {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.overview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.overview__title {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.overview__total {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 4px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stat {
  padding: 15px 14px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat__num {
  display: block;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat__label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.roster-wrap {
  margin-top: 24px;
}

.roster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  margin-top: 10px;
}

.roster li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 0;
}

.roster__name {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster__count {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
}

.overview__note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.panel-loading {
  display: grid;
  gap: 14px;
  min-height: 260px;
  align-content: start;
}

/* Detail panel ------------------------------------------------------------- */

.detail-host {
  min-width: 0;
}

.detail {
  padding: 0 24px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  animation: detail-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detail__topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -24px;
  padding: 15px 20px 13px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px 3px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.status-pill[data-status="todo"] {
  color: var(--st-todo);
  background: var(--bg-todo);
}

.status-pill[data-status="in-progress"] {
  color: var(--st-progress);
  background: var(--bg-progress);
}

.status-pill[data-status="blocked"] {
  color: var(--st-blocked);
  background: var(--bg-blocked);
}

.status-pill[data-status="done"] {
  color: var(--st-done);
  background: var(--bg-done);
}

.status-pill .swatch {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.close-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.12s ease;
}

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

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

.close-button kbd {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.detail__project {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail__title {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(27px, 2.2vw, 33px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.12;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.detail__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 17px;
  color: var(--ink-2);
  font-size: 13px;
}

.detail__due {
  color: var(--muted);
  font-size: 12px;
}

.detail__due time {
  color: var(--ink-2);
}

.status-box {
  margin-top: 23px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
}

.status-box .select-wrap {
  margin-top: 8px;
}

.status-box select {
  height: 44px;
  background: var(--surface);
}

.status-feedback {
  min-height: 17px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-feedback.is-active {
  color: var(--accent);
  font-weight: 600;
}

.detail__section {
  margin-top: 28px;
}

.detail__body {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.68;
  overflow-wrap: break-word;
  white-space: pre-line;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.fact {
  min-width: 0;
  padding: 12px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact--wide {
  grid-column: 1 / -1;
}

.fact dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13px;
}

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

.tag {
  padding: 3px 7px 2px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
}

/* Motion ------------------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes flash {
  0% {
    background-color: var(--accent-soft);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Tablet and mobile -------------------------------------------------------- */

@media (max-width: 1023px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 34px;
    padding-bottom: 64px;
  }

  .side {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .overview {
    display: none;
  }

  .detail-host {
    display: none;
  }

  .detail-host.is-open {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    padding: 0 22px calc(44px + env(safe-area-inset-bottom));
  }

  .detail-host.is-open .detail {
    min-height: 100dvh;
    padding-inline: 0;
    border: 0;
    border-radius: 0;
    animation-name: detail-up;
  }

  .detail__topbar {
    margin-inline: 0;
    padding: 15px 0 13px;
    background: var(--surface);
  }

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

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

@media (max-width: 720px) {
  .masthead__inner {
    height: 60px;
    gap: 12px;
  }

  .masthead__context {
    display: none;
  }

  .masthead__divider {
    display: none;
  }

  .brand__name {
    font-size: 20px;
  }

  .workspace {
    padding-top: 28px;
    gap: 0;
  }

  .inbox__head {
    margin-bottom: 22px;
  }

  .inbox__title {
    font-size: 42px;
  }

  .inbox__lede {
    margin-top: 10px;
    font-size: 13.5px;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr) 136px;
    gap: 10px;
  }

  input[type="search"],
  select {
    height: 44px;
    font-size: 16px;
  }

  select {
    padding-inline: 11px 32px;
  }

  .chevron {
    right: 12px;
  }

  .task-row {
    padding: 16px 2px 15px 0;
    gap: 10px;
  }

  .task-row__title {
    font-size: 15.5px;
  }

  .task-row__meta {
    gap: 4px 12px;
    margin-top: 7px;
    font-size: 11.5px;
  }

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

  .group__head {
    padding-top: 22px;
  }

  .detail__title {
    font-size: 28px;
  }

  .detail__body {
    font-size: 14px;
  }

  .empty-state,
  .load-error {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .team li {
    margin-left: -9px;
  }

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

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

  .inbox__count {
    font-size: 10px;
    padding-inline: 6px;
  }

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

  .fact--wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
