:root {
  --bg: #08090f;
  --panel: #121521;
  --card: #141726;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #f3f4fa;
  --muted: #9aa1b8;
  --dim: #6d7488;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 24px;
  --radius-sm: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(920px 520px at 12% -12%, rgba(124, 92, 255, 0.2), transparent 62%),
    radial-gradient(820px 520px at 88% -8%, rgba(34, 211, 238, 0.11), transparent 58%),
    radial-gradient(700px 500px at 50% 110%, rgba(244, 114, 182, 0.07), transparent 60%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
}

.page-glow {
  position: fixed;
  top: -220px;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.16), rgba(244, 114, 182, 0.16), rgba(139, 92, 246, 0.28));
  filter: blur(130px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.85);
  outline-offset: 2px;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 15, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
  border-radius: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(140deg, #8b5cf6 0%, #6366f1 55%, #22d3ee 130%);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.brand-text strong {
  font-weight: 650;
}

.brand-text span {
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  flex: 0 0 auto;
}

.status-pill.is-online {
  border-color: rgba(52, 211, 153, 0.22);
  color: #a7f3d0;
}

.status-pill.is-online .status-dot {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.status-pill.is-demo {
  border-color: rgba(251, 191, 36, 0.24);
  color: #fde68a;
}

.status-pill.is-demo .status-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.status-pill.is-offline {
  border-color: rgba(248, 113, 113, 0.26);
  color: #fecaca;
}

.status-pill.is-offline .status-dot {
  background: var(--bad);
}

.status-pill.is-loading .status-dot {
  animation: pulse 1.3s ease-in-out infinite;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  max-width: 880px;
  padding: 62px 0 38px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.9);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.038em;
  font-weight: 750;
}

.gradient-text {
  background: linear-gradient(100deg, #ddd6fe 0%, #a78bfa 28%, #8b5cf6 52%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
}

.workspace {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  padding-bottom: 90px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 25, 40, 0.86), rgba(13, 15, 24, 0.92));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-panel {
  position: sticky;
  top: 92px;
  padding: 26px;
}

.form-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.form-head p {
  margin: 0 0 22px;
  color: var(--dim);
  font-size: 12.5px;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.field label {
  display: block;
  margin-bottom: 9px;
  color: #c8cce0;
  font-size: 13px;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #0a0c15;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: #5a6078;
}

.field input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.field input:focus {
  border-color: rgba(139, 92, 246, 0.7);
  background: #0b0d18;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.hint {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.5;
}

.primary-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  margin-top: 20px;
  padding: 0 44px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 58%, #4f46e5 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(99, 102, 241, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, 0.2) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform 0.65s ease;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(99, 102, 241, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.primary-btn:hover:not(:disabled)::after {
  transform: translateX(130%);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(0);
}

.primary-btn:disabled {
  cursor: wait;
  filter: saturate(0.75);
  opacity: 0.92;
}

.primary-btn > * {
  position: relative;
  z-index: 1;
}

.btn-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.btn-label {
  white-space: nowrap;
}

.primary-btn kbd {
  position: absolute;
  right: 12px;
  z-index: 1;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
}

.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.primary-btn.is-loading .btn-spinner {
  display: block;
}

.primary-btn.is-loading .btn-icon {
  display: none;
}

.primary-btn.is-loading kbd {
  display: none;
}

.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
  font-size: 12.5px;
  line-height: 1.5;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.examples-label {
  margin-right: 2px;
  color: var(--dim);
  font-size: 12px;
}

.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #b7bdd1;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.chip:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
  color: #fff;
}

.source-note {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.055);
  color: var(--muted);
}

.source-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #a78bfa;
}

.source-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

/* ── States ──────────────────────────────────────────────────────────────── */

.results {
  min-width: 0;
}

.state-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 23, 36, 0.72), rgba(12, 14, 22, 0.78));
}

.empty-state {
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
}

.empty-art {
  width: 200px;
  margin-bottom: 8px;
}

.empty-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.empty-state h2 {
  margin: 4px 0 8px;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.empty-sub {
  max-width: 440px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.empty-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.empty-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c3c8da;
  font-size: 13px;
}

.check {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3.5px;
  width: 4px;
  height: 7px;
  border: solid #6ee7b7;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}

.loading-state {
  min-height: 540px;
}

.loading-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0.085) 50%,
    rgba(255, 255, 255, 0.035) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.7s ease-in-out infinite;
}

.skeleton-logo {
  aspect-ratio: 1;
  border-radius: 18px;
}

.loading-copy {
  padding-top: 8px;
}

.skeleton-line {
  height: 13px;
  margin-bottom: 13px;
}

.skeleton-line.w40 { width: 40%; }
.skeleton-line.w85 { width: 85%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w55 { width: 55%; }

.stages {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.stages li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 12.5px;
  transition: color 0.2s ease;
}

.stages li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.stages li.is-active {
  color: #d8dbea;
}

.stages li.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
  animation: pulse 1.4s ease-in-out infinite;
}

.stages li.is-done {
  color: #8f97ac;
}

.stages li.is-done::before {
  background: var(--good);
}

.error-state {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 15px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
}

.error-icon svg {
  width: 25px;
  height: 25px;
}

.error-state h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.error-state p {
  max-width: 420px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.secondary-btn {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.secondary-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
}

/* ── Result ──────────────────────────────────────────────────────────────── */

.result {
  animation: fadeUp 0.45s ease both;
}

.demo-banner {
  display: flex;
  gap: 11px;
  margin-bottom: 20px;
  padding: 13px 15px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 13px;
  background: rgba(251, 191, 36, 0.06);
  color: #f5e6bb;
}

.demo-banner svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: #fbbf24;
}

.demo-banner p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}

.demo-banner code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #fde68a;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.result-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--dim);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.result-kicker.is-demo .live-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

.kicker-sep {
  color: #464c60;
}

.result-title h2 {
  margin: 0;
  font-size: clamp(27px, 3.2vw, 37px);
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.result-tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: #b8bed2;
  font-size: 11px;
  white-space: nowrap;
}

.badge.is-accent {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.badge.is-demo {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #c6cbdb;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ghost-btn svg {
  width: 15px;
  height: 15px;
}

.ghost-btn:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.09);
  color: #fff;
}

.warnings {
  margin: -6px 0 18px;
  padding: 10px 13px;
  border-left: 2px solid rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.045);
  color: #e8d9ad;
  font-size: 12px;
  line-height: 1.55;
}

.warnings ul {
  margin: 0;
  padding-left: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(24, 27, 44, 0.84), rgba(14, 16, 26, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summary-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.summary-card .facts {
  margin-top: auto;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-eyebrow {
  margin: 0 0 5px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.icon-btn:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.1);
  color: #ddd6fe;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dim);
  font-size: 10.5px;
  white-space: nowrap;
}

.description-card,
.seo-card {
  grid-column: 1 / -1;
}

/* Logo */

.logo-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.tab {
  flex: 1;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #eef0f8;
}

.logo-frame {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: #0b0d17;
}

.logo-svg,
.logo-svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-frame img {
  width: 100%;
  height: 100%;
  padding: 14px;
  background: #fff;
  object-fit: contain;
}

.logo-hint {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.5;
}

.palette {
  display: flex;
  gap: 8px;
  margin: 13px 0 2px;
}

.swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.small-btn {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #c2c8d9;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.small-btn:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.1);
  color: #fff;
}

/* Summary */

.lead {
  margin: 0 0 16px;
  color: #e5e7f1;
  font-size: 16px;
  line-height: 1.6;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.genre {
  padding: 5px 10px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.11);
  color: #c4b5fd;
  font-size: 11.5px;
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact dt {
  color: var(--dim);
  flex: 0 0 auto;
}

.fact dd {
  max-width: 66%;
  margin: 0;
  overflow: hidden;
  color: #d7dbea;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fact a {
  color: #a5b4fc;
  text-decoration: none;
}

.fact a:hover {
  text-decoration: underline;
}

/* Description */

.description {
  color: #d9dcea;
  font-size: 16px;
  line-height: 1.76;
}

.description p {
  margin: 0 0 14px;
}

.description p:last-child {
  margin-bottom: 0;
}

.counter {
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  white-space: nowrap;
}

.counter.is-good { color: var(--good); }
.counter.is-warn { color: var(--warn); }
.counter.is-bad { color: var(--bad); }

/* SEO */

.seo-row {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.seo-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.seo-value {
  padding: 2px 0;
  border-radius: 6px;
  color: #eef0f8;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  transition: color 0.16s ease;
}

.seo-value:hover {
  color: #fff;
}

#metaDescription {
  color: #d6daea;
  font-size: 15.5px;
  font-weight: 450;
  line-height: 1.62;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
}

.keyword {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: #c3c9dc;
  font-size: 11.5px;
}

/* Details */

.details {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  list-style: none;
  transition: color 0.16s ease;
}

.details summary::-webkit-details-marker {
  display: none;
}

.details summary:hover {
  color: #d8dbea;
}

.details summary::after {
  content: "+";
  color: var(--dim);
  font-size: 15px;
  line-height: 1;
}

.details[open] summary::after {
  content: "−";
}

.details p {
  margin: 12px 0 0;
  color: #cfd4e4;
  font-size: 12.5px;
  line-height: 1.6;
}

.details p.muted {
  color: var(--dim);
}

.details .small {
  font-size: 11.5px;
}

.details pre {
  margin: 12px 0 10px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080a12;
  color: #c8d0e4;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.disclaimer {
  max-width: 760px;
  margin: 18px 2px 0;
  color: #5f6578;
  font-size: 11.5px;
  line-height: 1.6;
}

/* ── Footer and toast ────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: #575d70;
  font-size: 11.5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  background: #171b2b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: #e8fff6;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast::before {
  content: "✓";
  color: var(--good);
  font-weight: 700;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fee2e2;
}

.toast.is-error::before {
  content: "!";
  color: var(--bad);
}

/* ── Motion ──────────────────────────────────────────────────────────────── */

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 20px;
  }

  .result-grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .result-head {
    flex-direction: column;
    gap: 14px;
  }

  .result-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-panel {
    position: static;
  }

  .hero {
    padding: 46px 0 30px;
  }

  .result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .logo-card {
    max-width: 420px;
  }

  .empty-state,
  .loading-state {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .page-main {
    padding: 0 16px;
  }

  .topbar-inner {
    padding: 0 16px;
    height: 62px;
  }

  .brand-text span {
    display: none;
  }

  .status-pill {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .hero {
    padding: 36px 0 26px;
  }

  .hero-sub {
    font-size: 14.5px;
  }

  .form-panel {
    padding: 20px;
    border-radius: 20px;
  }

  .panel,
  .state-card {
    border-radius: 20px;
  }

  .state-card {
    padding: 24px 20px;
  }

  .empty-state {
    min-height: 0;
    padding: 38px 20px;
  }

  .empty-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .empty-state h2 {
    font-size: 20px;
  }

  .loading-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .skeleton-logo {
    max-width: 180px;
  }

  .result-actions {
    width: 100%;
  }

  .ghost-btn {
    flex: 1;
    justify-content: center;
  }

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

  .logo-card {
    max-width: 100%;
  }

  .description {
    font-size: 15px;
  }

  .primary-btn kbd {
    display: none;
  }

  .primary-btn {
    padding: 0 18px;
  }

  .footer {
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
