/* Minimal Apple Liquid Glass styling — no Tailwind build, no CDN. */
:root {
  --bg-a: #e0eafc;
  --bg-b: #cfdef3;
  --fg: #1c1c1e;
  --muted: #6e6e73;
  --card-bg: rgba(255, 255, 255, 0.55);
  --card-border: rgba(255, 255, 255, 0.3);
  --hit-bg: rgba(255, 235, 59, 0.55);
  --tag-bg: rgba(0, 0, 0, 0.06);
  --accent: #0071e3;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-a), var(--bg-b));
  color: var(--fg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.bg-orb-a { width: 480px; height: 480px; top: -120px; left: -120px; background: #c0d6ff; }
.bg-orb-b { width: 540px; height: 540px; bottom: -160px; right: -160px; background: #ffd6e8; }

.container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.topbar { margin-bottom: 24px; }
.brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.tab {
  padding: 10px 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-active {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

.banner {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(255, 200, 100, 0.35);
  border: 1px solid rgba(255, 160, 60, 0.5);
  border-radius: 12px;
  font-size: 13px;
  backdrop-filter: blur(20px);
}
.banner .err { color: #8a4b00; }

.cards { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 16px 20px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 6px 24px rgba(31, 38, 135, 0.08);
}
.card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
}
.card .from { font-weight: 600; color: var(--fg); }
.card h3 {
  font-size: 16px;
  margin: 6px 0 4px;
  font-weight: 600;
}
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card .snippet {
  margin: 6px 0 8px;
  font-size: 14px;
  color: #3a3a3c;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}
.card.detail pre.body {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.04);
  padding: 14px;
  border-radius: 12px;
  margin: 16px 0;
  max-height: 60vh;
  overflow: auto;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag-yes           { background: rgba(52, 199, 89, 0.18); color: #166d2e; }
.tag-no            { background: rgba(174, 174, 178, 0.25); color: #555; }
.tag-maybe         { background: rgba(255, 204, 0, 0.22); color: #6b5300; }
.tag-reply_waiting { background: rgba(0, 113, 227, 0.16); color: #0050a3; }
.tag-name_match    { background: rgba(255, 149, 0, 0.22); color: #8a4500; }
.tag-llm           { background: rgba(175, 82, 222, 0.18); color: #5d2184; }
.tag-name          { background: rgba(255, 149, 0, 0.22); color: #8a4500; }
.tag-unread        { color: var(--accent); }

mark.hit {
  background: var(--hit-bg);
  padding: 0 2px;
  border-radius: 3px;
}

.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.btn:hover { background: rgba(255, 255, 255, 0.9); }
.btn-ghost { background: transparent; }

.pager {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 13px;
}
.pager a { color: var(--accent); text-decoration: none; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 14px;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
  line-height: 1.6;
}
.meta b { color: var(--fg); font-weight: 600; }

.footnote {
  margin-top: 30px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}