/* Same tokens and type as LastCheck, so the Dodo tools look like one family. */
:root {
  --bg: #ffffff;
  --fg: #0e0f0e;
  --muted: #8c8c8c;
  --faint: #b4b4b4;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --field: #ffffff;
  --hover: rgba(0, 0, 0, 0.04);

  --brand: #89ff61;
  --brand-btn: #b6ff9d;
  --brand-btn-hover: #9eff7d;
  --new-tint: rgba(137, 255, 97, 0.18);

  --ok: #1f9d57;
  --bad: #d23c2c;
  --bad-tint: rgba(210, 60, 44, 0.12);
  --warn: #d98a14;
  --warn-tint: rgba(217, 138, 20, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151515;
    --fg: #f2f2f2;
    --muted: #969696;
    --faint: #6e6e6e;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);
    --field: #1c1c1c;
    --hover: rgba(255, 255, 255, 0.05);

    --brand-btn: #8fe86d;
    --brand-btn-hover: #a3f584;
    --new-tint: rgba(137, 255, 97, 0.1);

    --ok: #3fbe77;
    --bad: #ef5b4a;
    --bad-tint: rgba(239, 91, 74, 0.16);
    --warn: #e6a334;
    --warn-tint: rgba(230, 163, 52, 0.18);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Inter, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---------- header ---------- */

.chrome {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  /* The phone app: clear of the notch / status bar (0 on the Mac). */
  padding-top: calc(14px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.wordmark .hl {
  background: var(--brand);
  color: #0e0f0e;
  padding: 1px 5px 2px;
  margin-left: 1px;
}

.tagline {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- controls ---------- */

.btn {
  appearance: none;
  padding: 10px 14px;
  background: var(--field);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: default;
}

.btn-primary {
  background: var(--brand-btn);
  border-color: transparent;
  color: #0e0f0e;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-btn-hover);
}

.btn:disabled {
  background: var(--hover);
  color: var(--faint);
}

.btn-row {
  margin-top: 10px;
}

.btn-row .btn {
  width: 100%;
}

.field {
  width: 100%;
  padding: 9px 10px;
  background: var(--field);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  user-select: text;
}

.copy {
  margin: 0 0 12px;
  font-size: 12.5px;
}

.error {
  margin: 8px 0 0;
  color: var(--bad);
  font-size: 12px;
}

.banner {
  flex: none;
  padding: 10px 16px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bad-tint);
  color: var(--bad);
}

/* ---------- lists ---------- */

.pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.section {
  border-bottom: 1px solid var(--line);
}

.sec-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.sec-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.count {
  font-size: 11px;
  color: var(--muted);
}

.sec-body {
  padding: 14px 16px 16px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row.is-new {
  background: var(--new-tint);
}

.email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
}

.email:hover {
  text-decoration: underline;
}

.when {
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
  white-space: nowrap;
}

.meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--fg);
  user-select: text;
  cursor: text;
}

.tag {
  padding: 0 5px;
  border-radius: 2px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 16px;
}

.tag-new {
  background: var(--brand);
  color: #0e0f0e;
}

.tag-news {
  border: 1px solid var(--ok);
  color: var(--ok);
}

.tag-bad {
  background: var(--bad-tint);
  color: var(--bad);
}

.tag-warn {
  background: var(--warn-tint);
  color: var(--warn);
}

.empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- footer ---------- */

.credit {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 16px 8px;
  /* The phone app: clear of the home indicator (0 on the Mac). */
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--faint);
}

.credit-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

.credit-link:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* ---------- tabs ---------- */

.tabs {
  flex: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-bottom: 1px solid var(--line);
}

.tab {
  appearance: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 16px 13px;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  font: inherit;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.tab:last-child {
  border-right: 0;
}

.tab:hover {
  background: var(--hover);
}

.tab-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.tab-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.tab.is-active {
  color: var(--fg);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--brand);
}

.tab-new {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand);
  color: #0e0f0e;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ---------- product hero ---------- */

.hero {
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.hero-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.product-mark {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
}

.product-mark .hl {
  background: var(--brand);
  color: #0e0f0e;
  padding: 1px 6px 3px;
  margin-left: 2px;
}

.product-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.stat {
  padding: 10px 11px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat.is-highlight {
  background: var(--new-tint);
  border-color: transparent;
}

/* ---------- list ---------- */

.list-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.list-head h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.btn-small {
  padding: 5px 9px;
  font-size: 10px;
}

/* ---------- the dodo ---------- */

.chrome-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dodo {
  width: 62px;
  height: 62px;
  margin: -10px -6px -10px 0;
  overflow: visible;
  cursor: pointer;
}

.dodo-feet ellipse {
  fill: #f0b25a;
}

.dodo-shadow {
  fill: #000;
  opacity: 0.08;
}

.dodo-blush {
  fill: #ffb0bd;
  opacity: 0.6;
}

.dodo-heart {
  fill: #ff8fa3;
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  .dodo-shadow {
    opacity: 0.35;
  }
}
