@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f0f2f5;
  --surface: #fff;
  --ink: #050505;
  --muted: #65676b;
  --blue: #0866ff;
  --wash: #e7f3ff;
  --chip: #e4e6eb;
  --line: #dddfe2;
  --font: Poppins, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input:focus, textarea:focus, select:focus { outline: none; }

.app { height: 100%; display: flex; min-height: 0; }

.sidebar {
  width: 240px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 8px 12px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.wordmark {
  margin: 4px 8px 16px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--blue);
}
.nav { flex: 1; min-height: 0; overflow: auto; }
.nav-item {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.nav-item:hover { background: var(--bg); }
.nav-item[aria-current="true"] { background: var(--wash); color: var(--blue); }
.nav-deepify { color: var(--blue); }
.nav-count {
  min-width: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.nav-item[aria-current="true"] .nav-count { color: var(--blue); }
.nav-count:empty { display: none; }
.nav-rule { border: 0; height: 8px; margin: 0; }

.operator { margin-top: auto; padding: 12px 10px 4px; }
.operator p { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.clear-samples {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.clear-samples:hover { text-decoration: underline; }

.workspace { flex: 1; min-width: 0; display: flex; background: var(--bg); }
.list-pane {
  width: 360px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
}
.list-head { padding: 16px 16px 8px; }
.list-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.search {
  margin-top: 12px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--muted);
}
.search svg { width: 16px; height: 16px; flex: none; }
.search input { width: 100%; border: 0; background: transparent; padding: 0; font-size: 15px; }
.search input::-webkit-search-cancel-button { appearance: none; }
.list { flex: 1; overflow: auto; padding: 4px 8px 16px; }

.row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.row:hover { background: var(--bg); }
.row.is-on { background: var(--wash); }
.avatar, .pfp {
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-weight: 600;
  background: var(--chip);
  color: var(--ink);
}
.avatar { width: 48px; height: 48px; font-size: 18px; }
.row-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}
.row-meta {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}
.row-meta.is-due { color: var(--ink); font-weight: 600; }
.row-side { display: flex; align-items: center; gap: 6px; }
.row-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.row-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.row:hover .row-remove, .row-remove.is-armed { background: var(--chip); color: var(--ink); }
.row-remove.is-armed {
  width: auto;
  padding: 0 8px;
  border-radius: 6px;
  background: #e41e3f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.list-blank { padding: 32px 12px; color: var(--muted); font-size: 15px; }

.detail-pane { flex: 1; min-width: 0; overflow: auto; background: var(--bg); }
.detail-inner { max-width: 860px; margin: 0 auto; padding: 16px 16px 64px; }
.back {
  display: none;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
}

.page, .card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.page { overflow: visible; }
.cover {
  height: 218px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #e4e6eb;
}
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.identity {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 0;
  padding: 0 16px 16px;
}
.pfp {
  width: 168px;
  height: 168px;
  margin-top: -78px;
  border: 4px solid #fff;
  font-size: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  flex: none;
  background: #e4e6eb;
  color: #050505;
}
.who { flex: 1; min-width: 200px; padding: 12px 0 4px; }
.name-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: #050505;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.subtitle { margin: 2px 0 0; color: #65676b; font-size: 15px; font-weight: 500; }
.tagline { margin: 2px 0 0; color: #050505; font-size: 15px; font-weight: 500; }
.missing { margin: 8px 0 0; color: #65676b; font-size: 15px; }
.signal { margin: 6px 0 0; color: var(--ink); font-size: 15px; }
.wait {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--wash);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.sample { color: var(--muted); font-weight: 500; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 12px 0 4px; }
.btn {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: #e4e6eb;
  color: #050505;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { background: #d8dadf; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #0861f2; }
.btn.is-armed { background: #e41e3f; color: #fff; }
.btn.is-armed:hover { background: #d00b2e; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 16px;
  margin-top: 16px;
}
.split .card { margin-top: 0; }
.card { margin-top: 16px; padding: 16px 16px 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.card-head h2 { margin: 0; }
.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
}
.linkish:hover { text-decoration: underline; }

.intro { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 15px; }
.intro svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--muted); }
.intro-main { min-width: 0; flex: 1; }
.intro .copy, .intro a { overflow-wrap: anywhere; }
.intro a, .intro .copy {
  color: #050505;
  font-weight: 500;
  text-decoration: none;
  word-break: break-word;
}
.intro a { color: var(--blue); }
.intro .plain { color: #050505; font-weight: 500; }
.intro a:hover, .intro .copy:hover { text-decoration: underline; }
.copy {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  text-align: left;
}
.edit-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 15px;
}
.edit-row span { color: var(--muted); }
.edit-row input, .edit-row textarea {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  padding: 8px 10px;
  font-size: 15px;
}
.edit-row textarea { resize: vertical; min-height: 72px; }

.tip {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
  resize: none;
  field-sizing: content;
  min-height: 64px;
  font-size: 15px;
  line-height: 1.45;
}
.tip::placeholder { color: #8a8d91; }
.outcomes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.callback { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.callback input { border: 0; background: var(--bg); border-radius: 6px; padding: 6px 8px; color: var(--ink); }
.statuses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.status {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--chip);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.status.is-on { background: var(--wash); color: var(--blue); }
.priority { display: flex; gap: 6px; margin-top: 8px; }
.priority button {
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: #e4e6eb;
  color: #050505;
  font-size: 13px;
  font-weight: 600;
}
.priority button.is-on { background: var(--wash); color: var(--blue); }

.note { padding: 10px 0; }
.note p { margin: 0; font-size: 15px; }
.note time { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.note-form { margin-top: 4px; }
.note-form input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: var(--bg);
  padding: 0 14px;
  font-size: 15px;
}
.history { margin: 10px 0 0; padding: 0; list-style: none; }
.history li { padding: 2px 0; font-size: 13px; color: var(--muted); }
.quiet-prompt { height: 100%; display: grid; place-items: center; color: var(--muted); }
.detail-inner.is-passed .name-input { color: var(--muted); }

.empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.empty h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.empty p { max-width: 36ch; margin: 8px auto 0; font-size: 15px; color: var(--muted); }
.workspace.is-empty .list-pane,
.workspace.is-empty .detail-pane { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #323436;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.toast.show { opacity: 1; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .app { flex-direction: column; height: auto; min-height: 100%; }
  .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { display: flex; overflow: auto; flex: none; }
  .nav-group { display: flex; }
  .workspace { flex-direction: column; }
  .list-pane { width: 100%; border-right: 0; }
  .workspace.has-selection .list-pane { display: none; }
  .workspace:not(.has-selection) .detail-pane { display: none; }
  .back { display: inline; }
  .split { grid-template-columns: 1fr; }
  .cover { height: 160px; }
  .pfp { width: 108px; height: 108px; margin-top: -36px; font-size: 32px; }
  .name-input { font-size: 24px; }
  .btns { justify-content: flex-start; width: 100%; }
}

* { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.25) transparent; }
