:root {
  color-scheme: light dark;
  --bg: #fbfbfc;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --text: #3a3a3c;
  --muted: #8e8e93;
  --faint: #c7c7cc;
  --line: rgb(0 0 0 / 0.1);
  --hover: rgb(0 0 0 / 0.035);
  --select: rgb(0 0 0 / 0.06);
  --accent: #5e5ce6;
  --hot: #e5484d;
  --shadow: 0 0 0 0.5px var(--line), 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.04);
  --float: 0 0 0 0.5px var(--line), 0 4px 12px rgb(0 0 0 / 0.06), 0 24px 56px rgb(0 0 0 / 0.12);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  font: 450 13.5px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --surface: #18181b;
    --ink: #f5f5f7;
    --text: #d1d1d6;
    --muted: #8e8e93;
    --faint: #48484a;
    --line: rgb(255 255 255 / 0.1);
    --hover: rgb(255 255 255 / 0.045);
    --select: rgb(255 255 255 / 0.075);
    --accent: #7d7aff;
    --hot: #ff6369;
    --shadow: 0 0 0 0.5px var(--line), 0 8px 24px rgb(0 0 0 / 0.3);
    --float: 0 0 0 0.5px var(--line), 0 24px 56px rgb(0 0 0 / 0.5);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}
body {
  min-height: 100vh;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  outline: none;
}
button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
a {
  color: inherit;
  text-decoration: none;
}
::placeholder {
  color: var(--muted);
}
h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.015em;
}
q {
  color: var(--ink);
  font-weight: 500;
}
code {
  font: 12px var(--mono);
}
.grow {
  flex: 1;
}
.muted {
  color: var(--muted);
}
.icon {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Controls */

.primary,
.quiet,
.icon-button {
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  font-weight: 500;
  transition: background 0.15s, opacity 0.15s;
}
.primary {
  background: var(--ink);
  color: var(--bg);
}
.primary:hover {
  opacity: 0.86;
}
.quiet:hover,
.icon-button:hover {
  background: var(--hover);
}
.icon-button {
  width: 28px;
  padding: 0;
  justify-content: center;
  color: var(--muted);
  flex: none;
}
.small {
  height: 24px;
  padding: 0 8px;
  font-size: 12.5px;
}
.wide {
  width: 100%;
  height: 36px;
  justify-content: center;
}
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  box-shadow: inset 0 0 0 0.5px var(--line);
  transition: background 0.15s, color 0.15s;
}
.chip:hover {
  background: var(--hover);
  color: var(--text);
}
.chip.on {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: none;
}
.chip .icon {
  width: 11px;
  height: 11px;
}
.chip.done,
.chip.dropped {
  text-decoration: line-through;
}

.segmented {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--hover);
}
.segmented button {
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.segmented .on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 0.5px var(--line), 0 1px 2px rgb(0 0 0 / 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 200px;
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--hover);
  color: var(--muted);
  transition: box-shadow 0.15s, background 0.15s;
}
.search-box:focus-within {
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--line), 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.search {
  flex: 1;
  min-width: 0;
  color: var(--ink);
}
.search::-webkit-search-cancel-button {
  display: none;
}

.avatar {
  --hue: 240;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 600;
  color: hsl(var(--hue) 45% 32%);
  background: hsl(var(--hue) 65% 91%);
  box-shadow: 0 0 0 1.5px var(--bg);
  flex: none;
}
@media (prefers-color-scheme: dark) {
  .avatar {
    color: hsl(var(--hue) 70% 86%);
    background: hsl(var(--hue) 28% 26%);
  }
}

.status {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--faint);
  flex: none;
}
.status.done {
  background: var(--accent);
  box-shadow: none;
}
.status.dropped {
  background: var(--faint);
  box-shadow: none;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

kbd {
  font: 11px var(--mono);
  padding: 1px 5px;
  margin-right: 3px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 0.5px var(--line);
  color: var(--muted);
}

/* Frame */

.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  height: 100vh;
}
.shell.with-panel {
  grid-template-columns: 228px minmax(0, 1fr) min(520px, 42vw);
}

.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 14px 10px;
  border-right: 0.5px solid var(--line);
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  font-weight: 600;
  color: var(--ink);
}
.brand img {
  width: 20px;
  height: 20px;
}
.projects {
  display: grid;
  gap: 1px;
}
.projects a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  transition: background 0.15s;
}
.projects a:hover {
  background: var(--hover);
}
.projects a.on {
  background: var(--select);
  color: var(--ink);
  font-weight: 550;
}
.projects .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.projects .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.side .quiet,
.projects .quiet {
  justify-content: flex-start;
  width: 100%;
  padding: 0 10px;
  color: var(--muted);
  font-weight: 450;
}
.side .quiet:hover {
  color: var(--text);
}
.foot {
  display: grid;
  gap: 1px;
  margin-top: auto;
}

.main {
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 18px 28px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.title {
  display: flex;
  align-items: center;
  gap: 4px;
}
.title h1 {
  font-size: 20px;
  font-weight: 650;
}
.switch {
  cursor: default;
}
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  border-bottom: 0.5px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  padding: 10px 1px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -0.5px;
  transition: color 0.15s;
}
.tab:hover {
  color: var(--text);
}
.tab.on {
  color: var(--ink);
  border-color: var(--ink);
}
.tab .count {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.content {
  width: 100%;
  max-width: 1120px;
  padding: 8px 28px 56px;
}
.label {
  margin: 20px 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  padding: 8px 8px 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.banner > span:nth-child(2) {
  flex: 1;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18vh 16px;
  text-align: center;
}
.empty h2 {
  font-size: 17px;
  font-weight: 600;
}
.empty p {
  max-width: 36ch;
  color: var(--muted);
}
.keys {
  margin-top: 28px;
  font-size: 11.5px;
  color: var(--muted);
  word-spacing: 2px;
}

/* Tasks */

.hero {
  display: block;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--surface)), var(--surface) 70%);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.hero:hover {
  transform: translateY(-1px);
  box-shadow: var(--float);
}
.hero.cursor,
.hero.open {
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent), var(--shadow);
}
.hero-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.hero h2 {
  flex: 1;
  font-size: 20px;
  font-weight: 650;
}
.hero .score {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hero .summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 76ch;
  margin: 6px 0 10px;
  line-height: 1.55;
}
.hero .why {
  font-size: 12.5px;
  color: var(--muted);
}
.hero .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.rows {
  list-style: none;
  margin: 0 -10px;
  padding: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  transition: background 0.12s;
}
.row:hover {
  background: var(--hover);
}
.row.cursor,
.row.open {
  background: var(--select);
}
.rank {
  width: 18px;
  flex: none;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.row .status {
  margin: 0 3.5px;
}
.row .name {
  flex: none;
  max-width: 34%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
  color: var(--ink);
}
.row .summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 4px;
}
.due {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.due.hot {
  color: var(--hot);
  font-weight: 500;
}
.people {
  display: flex;
  align-items: center;
  flex: none;
}
.people .avatar + .avatar {
  margin-left: -5px;
}
.times {
  margin-left: 5px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.row .score {
  width: 28px;
  flex: none;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.row.transcript .date {
  width: 52px;
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.row.transcript .muted {
  font-size: 12px;
}
.pill {
  flex: none;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--hover);
}
.pill.waiting {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* The task panel */

.panel {
  overflow: auto;
  padding: 14px 24px 48px;
  border-left: 0.5px solid var(--line);
  background: var(--surface);
}
.panel:empty {
  display: none;
}
.panel:not(:empty) {
  animation: enter 0.28s var(--ease);
}
.panel-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12.5px;
}
.panel-top .status {
  margin-right: 2px;
}
.panel .name,
.panel .summary {
  display: block;
  width: calc(100% + 12px);
  margin: 0 -6px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.panel .name:hover,
.panel .summary:hover,
.panel .name:focus,
.panel .summary:focus {
  background: var(--hover);
}
.panel .name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.panel .summary {
  margin-top: 6px;
  resize: none;
  overflow: hidden;
  line-height: 1.6;
  font-size: 14px;
}
.fields {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px 12px;
  margin: 18px 0;
  padding: 16px 0;
  border-block: 0.5px solid var(--line);
}
.fields dt {
  font-size: 12.5px;
  color: var(--muted);
}
.fields dd {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}
.fields input[type="date"] {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--hover);
  font-size: 12.5px;
}
.scale {
  display: flex;
  align-items: center;
  gap: 3px;
}
.scale button {
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 5px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--hover);
  transition: background 0.15s, color 0.15s;
}
.scale button:hover {
  color: var(--ink);
}
.scale .under {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.scale .on {
  color: #fff;
  background: var(--accent);
}
.scale .muted {
  margin-left: 8px;
  font-size: 12.5px;
}
.tag-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.tag-input {
  width: 80px;
  font-size: 12.5px;
}
.why-box {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--hover);
  font-size: 12.5px;
}
.why-box .score {
  font-size: 20px;
  font-weight: 650;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.panel h3 {
  margin: 26px 0 12px;
  font-size: 12.5px;
  font-weight: 600;
}
.mentions {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}
.mentions li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
}
.mentions .who {
  font-size: 12.5px;
}
.mentions .who a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.mentions .who a:hover {
  color: var(--ink);
}
blockquote {
  margin-top: 5px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  line-height: 1.55;
}

/* Reading a transcript */

.reading {
  max-width: 700px;
  margin: 0 auto;
  padding-top: 20px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 18px -4px;
  font-size: 12.5px;
  color: var(--muted);
}
.back:hover {
  color: var(--ink);
}
.reading h2 {
  font-size: 24px;
  font-weight: 650;
}
.reading > .muted {
  margin-top: 4px;
}
.from {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px 0;
}
.from .muted {
  margin-right: 4px;
  font-size: 12.5px;
}
.from .chip {
  color: var(--text);
}
.body {
  margin-top: 26px;
}
.body p {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
}
.speaker {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 4px;
  font-size: 12.5px;
}
.speaker b {
  color: var(--ink);
  font-weight: 600;
}
.danger {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 0.5px solid var(--line);
}
.danger .quiet {
  color: var(--muted);
}
.danger .quiet:hover {
  color: var(--hot);
}

/* Sheets */

.veil {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: start center;
  padding: 12vh 16px 16px;
  background: rgb(0 0 0 / 0.22);
  animation: fade 0.15s;
}
.sheet {
  width: min(560px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 16px 20px 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--float);
  animation: rise 0.22s var(--ease);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sheet-head h2 {
  font-size: 15px;
  font-weight: 600;
}
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.sheet .projects a {
  height: 38px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.field small {
  font-size: 11.5px;
  color: var(--muted);
}
.field input,
.field textarea,
.card input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: inset 0 0 0 0.5px var(--line);
  color: var(--ink);
  transition: box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
}
.field input:focus,
.field textarea:focus,
.card input:focus {
  box-shadow: inset 0 0 0 0.5px var(--line), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.connect {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.connect p {
  line-height: 1.55;
}
.connect h3 {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.command {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: inset 0 0 0 0.5px var(--line);
}
.command code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--ink);
}
.connections {
  padding: 0;
  list-style: none;
}
.connections li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-bottom: 0.5px solid var(--line);
}

/* Sign-in and consent */

.center {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}
.card {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(340px, 100%);
  text-align: center;
  animation: rise 0.4s var(--ease);
}
.card .mark {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
}
.card h1 {
  font-size: 20px;
  font-weight: 650;
}
.card p {
  line-height: 1.55;
}
.card input {
  height: 38px;
  text-align: center;
}
.card .pair {
  width: 100%;
}
.card .quiet {
  box-shadow: inset 0 0 0 0.5px var(--line);
}
.shake {
  animation: shake 0.35s;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--float);
  transform: translateX(-50%);
  animation: toast 0.25s var(--ease);
  transition: opacity 0.3s;
}
.toast.gone {
  opacity: 0;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
}
@keyframes toast {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Phones: projects move into a sheet behind the title, and the panel covers the list. */

@media (max-width: 799px) {
  .shell,
  .shell.with-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    display: none;
  }
  .shell.with-panel .panel {
    position: fixed;
    inset: 0;
    z-index: 5;
    border: 0;
  }
  .switch {
    cursor: pointer;
  }
  .switch h1::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0 4px 8px;
    border: solid var(--muted);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
  }
  .head {
    padding: 14px 16px 0;
  }
  .content {
    padding: 8px 16px 48px;
  }
  .bar {
    flex-wrap: wrap;
    row-gap: 0;
  }
  .bar .grow {
    display: none;
  }
  .bar .segmented {
    margin-left: auto;
  }
  .search-box {
    order: 5;
    width: 100%;
    margin: 4px 0 10px;
  }
  .rows {
    margin: 0 -6px;
  }
  .row {
    padding: 0 6px;
  }
  .row .summary,
  .row .tags,
  .row .score,
  .row.transcript .muted {
    display: none;
  }
  .row .name {
    flex: 1;
    max-width: none;
  }
  .keys {
    display: none;
  }
  .pair {
    grid-template-columns: 1fr;
  }
}
