:root {
  --bg: #0b1020;
  --bg-2: #11172b;
  --card: rgba(255, 255, 255, 0.06);
  --card-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #aeb8d0;
  --accent: #8b5cf6;
  --accent-2: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top right, rgba(139,92,246,0.22), transparent 28%),
    radial-gradient(circle at left top, rgba(34,197,94,0.14), transparent 20%),
    linear-gradient(180deg, #0a0f1f 0%, #0d1326 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
}

code {
  background: rgba(255,255,255,0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  font-size: 0.9em;
}

.shell {
  width: min(1280px, calc(100% - 28px));
  margin: 22px auto 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

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

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #5eead4);
  color: white;
  box-shadow: var(--shadow);
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}
.dot-ok { background: var(--accent-2); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--danger); }

.main-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: #d8c7ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 78ch;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mini-stat {
  padding: 16px;
  border-radius: 18px;
  background: var(--card-strong);
  border: 1px solid var(--line);
}

.mini-label {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.mini-value {
  font-size: 1.05rem;
  font-weight: 700;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.section-head p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.15s ease;
  font-weight: 600;
}
.tab:hover { transform: translateY(-1px); }
.tab.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.26), rgba(94,234,212,0.16));
  border-color: rgba(139,92,246,0.45);
}

.ask-form {
  display: grid;
  gap: 16px;
}

.field, .field-row {
  display: grid;
  gap: 8px;
}

.field-row {
  grid-template-columns: 1fr 1fr;
}

label {
  color: var(--muted);
  font-size: 0.92rem;
}

textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  font: inherit;
}

textarea:focus, input:focus {
  border-color: rgba(139,92,246,0.55);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.12);
}

.quick-picks {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.quick-title {
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  transition: 0.15s ease;
}
.chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: white;
  border-color: transparent;
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.response-meta,
.browser-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-badge {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
}

.meta-ok { background: rgba(34,197,94,0.12); color: #c7ffd8; }
.meta-warn { background: rgba(245,158,11,0.12); color: #ffe2a9; }
.meta-bad { background: rgba(239,68,68,0.12); color: #ffc4c4; }

.response-summary,
.empty-state {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.card-grid, .list-grid {
  display: grid;
  gap: 14px;
}

.result-card,
.browser-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 16px;
}

.result-title,
.browser-title {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
}

.result-subtitle,
.browser-subtitle {
  color: #d6dcf0;
  margin-bottom: 10px;
  font-size: 0.96rem;
}

.result-why,
.browser-why {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-footer,
.browser-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.link-btn {
  display: inline-flex;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.8rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-top: 18px;
  padding: 8px 4px;
  font-size: 0.94rem;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer a {
  color: #d7dfff;
  text-decoration: none;
}

.hidden { display: none !important; }

@media (max-width: 1040px) {
  .main-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 16px, 1280px);
    margin-top: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
