:root {
  --paper: #f4f3ee;
  --card: #ffffff;
  --ink: #14130e;
  --muted: #6c675b;
  --line: #e6e3d9;
  --line-2: #d6d2c6;
  --accent: #0f9d58;
  --accent-ink: #0a6e3d;
  --red: #cf3b32;
  --amber: #b9801a;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(800px 360px at 50% -8%, rgba(15, 157, 88, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: block;
}

.brand-name {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.brand-name strong {
  font-weight: 700;
}

.tag-free {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent-ink);
  background: rgba(15, 157, 88, 0.1);
  border: 1px solid rgba(15, 157, 88, 0.3);
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- layout ---------- */
.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 30px 18px 56px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  margin: 0 0 10px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(30px, 6.5vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
  font-weight: 700;
}

.hl {
  background: linear-gradient(transparent 62%, rgba(15, 157, 88, 0.28) 0);
  padding: 0 2px;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 50ch;
}

.lede code,
.hint code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #eceae2;
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

/* ---------- search ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 7px 7px 7px 14px;
  transition: box-shadow 0.15s;
}

.search:focus-within {
  box-shadow: 4px 4px 0 var(--ink);
}

.search-ico {
  color: var(--muted);
  flex: none;
}

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 16px;
  font-family: var(--mono);
  padding: 11px 6px;
}

.search input::placeholder {
  font-family: var(--sans);
  color: #a9a496;
}

.search button {
  flex: none;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  color: #04231a;
  cursor: pointer;
  background: var(--accent);
  transition: transform 0.08s ease, filter 0.15s;
}

.search button:hover {
  filter: brightness(1.06);
}

.search button:active {
  transform: translate(2px, 2px);
}

.search button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 2px 0;
}

/* ---------- status ---------- */
.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- result card ---------- */
.card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 6px 6px 0 rgba(20, 19, 14, 0.12);
}

.channel {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: #ecebe3;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar .fallback {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--muted);
}

.channel-meta h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
  margin: 2px 0 0;
  font-size: 14px;
  font-family: var(--mono);
}

/* ---------- badge ---------- */
.badge {
  margin: 18px 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 14px 16px;
  border-radius: 11px;
  border: 1.5px solid transparent;
}

.badge-ico {
  display: inline-flex;
  flex: none;
}

.badge.yes {
  background: rgba(15, 157, 88, 0.12);
  color: var(--accent-ink);
  border-color: rgba(15, 157, 88, 0.45);
}

.badge.no {
  background: rgba(207, 59, 50, 0.1);
  color: var(--red);
  border-color: rgba(207, 59, 50, 0.4);
}

.badge.unknown {
  background: rgba(185, 128, 26, 0.12);
  color: var(--amber);
  border-color: rgba(185, 128, 26, 0.4);
}

.detail {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 2px 18px;
}

/* ---------- confidence ---------- */
.confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.conf-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 600;
}

.conf-pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.conf-pill[data-level="high"] {
  background: rgba(15, 157, 88, 0.14);
  color: var(--accent-ink);
  border-color: rgba(15, 157, 88, 0.4);
}

.conf-pill[data-level="med"] {
  background: rgba(185, 128, 26, 0.14);
  color: var(--amber);
  border-color: rgba(185, 128, 26, 0.4);
}

.conf-pill[data-level="low"] {
  background: #ecebe3;
  color: var(--muted);
}

.chan-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.chan-link:hover {
  text-decoration: underline;
}

/* ---------- how + faq ---------- */
.how,
.faq {
  margin-top: 30px;
  border-top: 1.5px solid var(--ink);
  padding-top: 20px;
}

.how h2,
.faq h2 {
  font-family: var(--display);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
}

.how p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-family: var(--display);
  font-size: 16px;
  margin: 0 0 4px;
  font-weight: 600;
}

.faq-item p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

/* ---------- ads / footer ---------- */
.ad-slot {
  text-align: center;
  color: #a9a496;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 16px;
  background: #eceae2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 18px;
}

.hidden {
  display: none !important;
}

.error {
  color: var(--red);
  background: rgba(207, 59, 50, 0.08);
  border: 1.5px solid rgba(207, 59, 50, 0.35);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 14px;
}
