@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #1c2433;
  --muted: #5c6778;
  --text-soft: #6f7b8c;
  --text-faint: #94a0b0;
  --teal: #2f6f73;
  --teal-soft: rgba(47, 111, 115, 0.1);
  --teal-border: rgba(47, 111, 115, 0.22);
  --gold: #b8952d;
  --blue: #1d4ed8;
  --blue-hover: #2563eb;
  --blue-deep: #162b75;
  --blue-soft: #eef4ff;
  --blue-border: #bfd7fe;
  --green: #166534;
  --orange: #92400e;
  --red: #991b1b;
  --slate: #596174;
  --shadow-sm: 0 1px 2px rgba(28, 36, 51, 0.04);
  --shadow: 0 10px 28px rgba(28, 36, 51, 0.06);
  --shadow-lg: 0 18px 48px rgba(28, 36, 51, 0.09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-heading: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.hidden {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.landing-page,
.login-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 30px 12px;
}

.landing-brand {
  display: grid;
  gap: 3px;
  color: var(--ink);
  text-decoration: none;
}

.landing-brand strong {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
}

.landing-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.landing-links a,
.landing-sign-in,
.landing-login {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-sign-in {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.landing-login {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.16);
}

.landing-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2px 30px 0;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.92fr);
  gap: 48px;
  align-items: center;
  min-height: auto;
  padding: 28px 0 80px;
}

.landing-headline {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.hero-reveal {
  animation: heroReveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-reveal-delay-1 {
  animation-delay: 80ms;
}

.hero-reveal-delay-2 {
  animation-delay: 160ms;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-reveal {
    animation: none;
  }
}

.landing-lede {
  max-width: 640px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
}

.landing-start-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.2fr) auto;
  gap: 10px;
  max-width: 850px;
  padding: 10px;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.landing-start-card label {
  display: grid;
  gap: 6px;
  padding: 8px 12px;
}

.landing-start-card span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-start-card input {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.landing-start-card .primary-button {
  min-height: 64px;
  border-radius: 10px;
}

.landing-cta .primary-button {
  min-height: 58px;
  padding-inline: 30px;
  border-radius: 12px;
  font-size: 16px;
}

.landing-product-preview {
  position: relative;
  min-width: 0;
}

.preview-shell {
  position: relative;
  display: grid;
  gap: 0;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: calc(var(--radius-xl) + 2px);
  background: var(--bg-soft);
  box-shadow: var(--shadow-lg);
}

.preview-shell::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: calc(100% - 12px);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: linear-gradient(180deg, #d4b35a 0%, #b8952d 42%, #8f7424 100%);
  opacity: 0.9;
  pointer-events: none;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.preview-head strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
}

.preview-head .eyebrow {
  margin-bottom: 4px;
}

.preview-provider-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.preview-provider-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.preview-provider-pills span.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  color: var(--blue);
}

.preview-dashboard {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.preview-score {
  min-height: 148px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
}

.preview-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-score small {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-delta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.preview-score strong {
  display: block;
  margin: 16px 0 10px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 70px;
  line-height: 0.9;
  font-weight: 500;
}

.preview-score strong span {
  color: var(--muted);
  font-size: 34px;
}

.preview-score p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.55;
}

.preview-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preview-mini-metrics article {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.preview-mini-metrics span {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-mini-metrics strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
}

.preview-chart {
  display: grid;
  gap: 8px;
  height: auto;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.preview-chart-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.preview-chart-label span:first-child {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.preview-grid {
  fill: none;
  stroke: var(--line);
  stroke-dasharray: 4 8;
}

.preview-area {
  fill: url("#previewArea");
}

.preview-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  filter: none;
}

.preview-chart circle {
  fill: var(--teal);
  stroke: var(--surface);
  stroke-width: 4;
}

.landing-section {
  padding: 94px 0;
  border-top: 1px solid var(--line);
}

.landing-section-steps {
  margin-inline: calc(50% - 50vw);
  padding: 94px max(30px, calc((100vw - 1240px) / 2 + 30px));
  background: #ffffff;
}

.landing-section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 28px;
}

.landing-steps,
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.landing-steps article,
.landing-feature-grid article {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.landing-steps.rich article {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  min-height: 286px;
  padding: 24px;
  background: var(--surface);
}

.landing-steps.rich article:nth-child(3) {
  background: var(--surface);
}

.landing-steps span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.step-visual {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 116px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.step-visual i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.site-visual {
  min-height: 126px;
  align-items: center;
}

.site-window {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.site-window b {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--line);
}

.site-window strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.site-window i {
  display: block;
  width: 76%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-border));
}

.scan-lens {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(37, 99, 235, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
}

.scan-lens::after {
  content: "";
  position: absolute;
  right: -11px;
  bottom: -7px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.6);
  transform: rotate(42deg);
}

.prompt-visual {
  align-content: start;
}

.prompt-visual b {
  width: max-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  font-size: 11px;
}

.prompt-visual p,
.fix-visual p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.prompt-visual i {
  width: 64%;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), var(--blue-border));
}

.fix-visual {
  grid-template-columns: 1fr;
  gap: 6px;
}

.fix-visual b {
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.visibility-readout-visual {
  gap: 8px;
  align-content: center;
  min-height: 126px;
}

.visibility-readout-visual div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 8px 10px;
  border-radius: 11px;
  background: var(--bg-soft);
}

.visibility-readout-visual b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.visibility-readout-visual strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.landing-section h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.landing-section h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.landing-section p {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

.landing-feature-band {
  display: grid;
  grid-template-columns: 0.58fr 1fr;
  gap: 42px;
  align-items: start;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(30px, calc((100vw - 1240px) / 2 + 30px));
  background: var(--bg-soft);
}

.landing-feature-grid article,
.feature-side-stack article {
  display: grid;
  gap: 9px;
  min-height: 230px;
}

.landing-feature-grid article span,
.feature-side-stack article span {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.landing-feature-grid article strong,
.feature-side-stack article strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.landing-feature-grid {
  grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.78fr);
  align-items: stretch;
}

.feature-wide {
  grid-column: auto;
  min-height: 464px;
  align-content: start;
}

.feature-side-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

.feature-mini-panel,
.feature-checklist {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.feature-mini-panel b,
.feature-checklist i {
  display: block;
  min-height: 48px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.chat-panel div {
  display: grid;
  gap: 6px;
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.chat-panel span {
  width: max-content;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
}

.chat-panel b {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

.feature-chat {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.feature-chat b {
  width: max-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 11px;
}

.feature-chat p,
.feature-chat i {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.4;
}

.feature-chat i {
  padding: 10px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.handoff-preview {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.handoff-preview b {
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.handoff-preview p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.handoff-preview i {
  width: max-content;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--blue);
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.feature-side-stack article:first-child {
  background: var(--surface);
}

.feature-side-stack article:last-child {
  background: var(--surface);
}

.landing-faq,
.landing-cta {
  display: grid;
  gap: 24px;
  margin-inline: calc(50% - 50vw);
  padding: 76px max(30px, calc((100vw - 1240px) / 2 + 30px));
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: #ffffff;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-grid details {
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.faq-grid details:hover,
.faq-grid details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.faq-grid summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq-grid summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.faq-grid details[open] summary::after {
  content: "-";
}

.faq-grid p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
}

.landing-cta {
  justify-items: start;
  min-height: 360px;
  text-align: left;
}

.landing-cta h2 {
  max-width: 780px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.3vw, 54px);
  letter-spacing: 0;
  font-weight: 500;
}

.landing-cta h2 span {
  color: var(--blue);
}

.landing-cta > p {
  max-width: 720px;
}

.cta-visual {
  display: grid;
  grid-template-columns: auto 72px auto 72px auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cta-visual span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--blue);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.cta-visual i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line), var(--blue));
}

.login-page {
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-shell {
  display: grid;
  width: min(560px, 100%);
  min-height: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-copy-panel {
  display: grid;
  align-content: space-between;
  gap: 28px;
  min-height: 584px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.login-copy-panel h1 {
  max-width: 560px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: clamp(42px, 5.3vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 500;
}

.login-copy-panel p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
}

.login-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.login-preview div {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 15px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--line);
}

.login-preview span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.login-preview strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 26px;
  width: 100%;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 12px 0 10px;
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
}

.google-login-button svg {
  width: 20px;
  height: 20px;
}

.login-helper {
  margin: -8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.email-login-form {
  display: grid;
  gap: 12px;
}

.email-login-form label {
  display: grid;
  gap: 7px;
}

.email-login-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.email-login-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.email-login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-help-copy {
  margin: -2px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 52px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle-button svg {
  width: 18px;
  height: 18px;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  background: var(--bg-soft);
  color: var(--blue);
  outline: none;
}

.secondary-login-button {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.16);
}

.login-option-row {
  display: grid;
  gap: 14px;
}

.login-option-row .text-button {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--blue);
}

.tracking-launch-card {
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.tracking-launch-card > div:first-child {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(29, 78, 216, 0.18);
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-pill.inline {
  margin-top: 4px;
  white-space: nowrap;
}

.tracking-launch-status {
  display: grid;
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 4px 0;
}

.tracking-launch-progress-track {
  position: relative;
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(191, 219, 254, 0.4);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tracking-launch-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.9), rgba(29, 78, 216, 1));
  transform: scaleX(0.06);
  transform-origin: left center;
  opacity: 0.72;
  will-change: transform;
}

.tracking-launch-actions {
  display: grid;
  gap: 12px;
  width: min(320px, 100%);
}

.tracking-launch-hint {
  max-width: 410px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

@keyframes trackingLaunchProgress {
  0% {
    transform: scaleX(0.08);
    opacity: 0.72;
  }

  70% {
    transform: scaleX(0.78);
    opacity: 0.94;
  }

  100% {
    transform: scaleX(0.98);
    opacity: 1;
  }
}

@keyframes trackingPulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.65;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.login-option-row .text-button:hover,
.login-option-row .text-button:focus-visible {
  background: var(--bg-muted);
  outline: none;
}

.login-switch {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}

.text-button.inline-link {
  display: inline;
  min-height: auto;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button.inline-link:hover,
.text-button.inline-link:focus-visible {
  background: transparent;
  outline: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--bg-soft);
  box-shadow: none;
}

.sidebar {
  position: relative;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 26px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: grid;
  gap: 4px;
  margin-bottom: 28px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition:
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.nav-item svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  outline: none;
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-border);
  box-shadow: var(--shadow-sm);
}

.sidebar-footer {
  display: grid;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.upgrade-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--blue);
  font-weight: 600;
}

.profile-menu-wrap {
  position: relative;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.sidebar-profile:hover,
.sidebar-profile[aria-expanded="true"] {
  background: var(--bg-soft);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-weight: 600;
}

.sidebar-profile strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.sidebar-profile small {
  color: var(--muted);
  font-weight: 500;
}

.sidebar-profile-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sidebar-profile-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.sidebar-profile-meta small:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile span > .plan-pill.inline {
  display: inline-flex;
  margin-top: 0;
}

.profile-menu {
  position: absolute;
  left: 0;
  right: auto;
  bottom: calc(100% + 10px);
  z-index: 10;
  display: grid;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.profile-menu strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.profile-menu span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.profile-menu button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-soft);
  color: var(--ink);
  font-weight: 600;
}

.profile-menu button:hover,
.profile-menu button:focus-visible {
  background: var(--bg-muted);
  outline: none;
}

.main {
  min-width: 0;
  padding: 30px 30px 42px;
  background: var(--bg-soft);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  margin: 0 -30px 0;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 36px;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.top-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
}

.top-tabs button {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.top-tabs button.active {
  border-color: var(--blue);
  color: var(--blue);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.primary-button,
.ghost-button,
.icon-button,
.email-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 600;
}

.primary-button {
  padding: 0 18px;
  border: 0;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.16);
  white-space: nowrap;
  transition:
    background 160ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.border-beam-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.border-beam-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0 72%, rgba(255, 255, 255, 0.55) 78%, rgb(147 197 253 / 0.55) 83%, transparent 90% 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: borderBeam 3.8s linear infinite;
}

.border-beam-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: calc(8px - 2px);
  background: inherit;
}

.border-beam-button:hover::before,
.border-beam-button:focus-visible::before {
  opacity: 1;
}

@property --beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --score {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

@keyframes borderBeam {
  to {
    --beam-angle: 360deg;
  }
}

.ghost-button {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease;
}

.ghost-button:hover {
  border-color: var(--line-strong);
  background: var(--bg-soft);
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #303642;
  font-size: 24px;
}

.property-bar {
  display: grid;
  gap: 16px;
  margin: 28px 0 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.property-bar.is-scanning {
  border-color: var(--blue-border);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.property-bar.is-scanning .workflow-step,
.property-bar.is-scanning .scan-submit-button {
  opacity: 0.72;
}

.workflow-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

.workflow-heading .provider-status {
  display: none;
}

.workflow-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.22;
  font-weight: 600;
}

.scan-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  max-width: 620px;
}

.scan-progress-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 680px;
  min-height: 170px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.scan-progress-orbit {
  width: 52px;
  height: 52px;
  border: 3px solid var(--blue-border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.scan-progress-copy {
  display: grid;
  gap: 8px;
}

.scan-progress-copy h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 500;
}

.scan-progress-copy p:last-child {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.workflow-step::after {
  content: none;
  position: absolute;
  top: 50%;
  right: -13px;
  width: 13px;
  height: 1px;
  background: var(--line);
}

.scan-submit-button {
  min-height: 58px;
  padding-inline: 24px;
}

.scan-submit-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  animation: spin 0.9s linear infinite;
}

.step-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span,
.provider-field legend {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.field input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(37, 99, 235, 0.12);
}

.provider-field {
  display: grid;
  grid-template-columns: 34px repeat(3, minmax(74px, 1fr));
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.provider-field legend {
  grid-column: 2 / -1;
}

.provider-field label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.provider-field .step-number {
  grid-row: 1 / span 2;
}

.provider-field input {
  accent-color: var(--blue);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.setup-card,
.score-hero,
.dashboard-card,
.kpi-card,
.panels,
.empty-state,
.detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.8fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
}

.setup-card h2,
.dashboard-card h2,
.panel-header h2,
.detail-card h2,
.empty-state h2,
.insight-feature h2 {
  margin: 0;
  line-height: 1.15;
}

.setup-card h2 {
  font-size: 16px;
}

.setup-card p,
.panel-header p,
.dashboard-card p,
.detail-card p,
.empty-state p,
.action p,
.factor p,
.prompt-card p,
.insight-card p,
.stack-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.provider-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.provider-row {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.provider-row strong {
  font-size: 13px;
}

.provider-row span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
}

.provider-row.ready span {
  color: var(--green);
}

.score-hero {
  display: none;
}

.panels {
  display: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.panels.active {
  display: block;
}

.overview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.overview-top h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.overview-top p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.notifications-card {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px 22px;
}

.notifications-head {
  align-items: flex-start;
}

.notifications-head h2 {
  margin-bottom: 6px;
}

.notifications-head p {
  margin: 0;
  color: var(--muted);
}

.notifications-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.notification-item.unread {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

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

.notification-copy {
  display: grid;
  gap: 4px;
}

.notification-copy strong {
  color: var(--ink);
  font-size: 15px;
}

.notification-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.notification-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.notification-meta span,
.notification-meta small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.new-scan-button {
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 22px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--blue);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.new-scan-button svg {
  width: 18px;
  height: 18px;
}

.date-select-wrap,
.date-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.date-select-wrap {
  padding: 0;
}

.date-select-wrap::before,
.date-pill::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--blue);
  border-radius: 4px;
  background: linear-gradient(var(--blue), var(--blue)) 50% 4px / 9px 2px no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}

.date-select-wrap::before {
  display: none;
}

.date-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  color: var(--blue);
  transform: translateY(-50%);
  pointer-events: none;
}

.date-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-select-wrap::after,
.date-pill::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.date-select-wrap::after {
  right: 13px;
  top: calc(50% - 3px);
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}

.date-pill {
  padding: 0 14px 0 38px;
}

.date-pill::after {
  left: 18px;
  top: calc(50% - 4px);
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: var(--blue);
}

.date-select {
  width: 162px;
  min-height: 42px;
  padding: 0 36px 0 40px;
  border: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}

.date-select-wrap,
.metrics-controls label,
.sentiment-topic-controls label {
  transition:
    border-color 0.18s ease;
}

.date-select-wrap:hover,
.date-select-wrap:focus-within,
.metrics-controls label:hover,
.metrics-controls label:focus-within,
.sentiment-topic-controls label:hover,
.sentiment-topic-controls label:focus-within {
  border-color: var(--blue-border);
}

.date-select-wrap.is-updating,
.metrics-controls label.is-updating,
.sentiment-topic-controls label.is-updating {
  animation: controlLoading 0.86s ease-out;
}

.metrics-results.is-updating,
.trend-chart.is-updating,
.panels.is-updating,
.sentiment-overview-card.is-updating,
.topic-sentiment-result.is-updating {
  animation: contentRefresh 0.94s ease-out;
}

@keyframes controlLoading {
  0% {
    opacity: 0.48;
  }

  50% {
    opacity: 0.82;
  }

  100% {
    opacity: 1;
  }
}

@keyframes contentRefresh {
  from {
    opacity: 0.32;
    filter: blur(1px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.property-bar.hidden + .kpi-grid {
  margin-top: 0;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 148px;
  padding: 28px 30px;
  background: var(--surface);
  border-color: var(--line);
}

.score-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  min-height: 226px;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.score-card .kpi-heading,
.score-card .score-display {
  grid-column: 1;
  position: relative;
  z-index: 1;
}

.metric-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  display: none;
}

.rank-card::before {
  background: var(--blue);
}

.sentiment-card::before {
  background: #64748b;
}

.kpi-heading,
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.kpi-heading span,
.kpi-label {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.kpi-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.kpi-icon svg {
  width: 19px;
  height: 19px;
}

.kpi-icon-purple {
  background: var(--blue-soft);
  color: var(--blue);
}

.kpi-icon-blue {
  background: #eff5ff;
  color: var(--blue);
}

.kpi-icon-green {
  background: #f0fdf4;
  color: var(--green);
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 24px 0 0;
}

.score-display strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 78px;
  line-height: 0.9;
  letter-spacing: 0;
  font-weight: 500;
}

.score-display span {
  color: var(--muted);
  font-size: 42px;
  font-weight: 500;
}

.kpi-card > strong {
  display: block;
  margin: 26px 0 18px;
  font-family: var(--font-heading);
  font-size: 44px;
  line-height: 0.95;
  font-weight: 500;
}

.mention-card > strong {
  color: var(--ink);
}

.rank-card > strong {
  color: var(--ink);
}

.sentiment-card > strong {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  color: #475569;
}

.sentiment-percent {
  color: #475569;
}

.sentiment-word {
  color: var(--green);
  font-size: 24px;
  font-weight: 700;
}

.kpi-change {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 25px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.kpi-change[hidden] {
  display: none;
}

.score-card .kpi-change {
  margin-top: 20px;
}

.kpi-change span:first-child {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green);
  font-weight: 600;
}

.kpi-change small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.kpi-change.negative span:first-child {
  background: #fef2f2;
  color: var(--red);
}

.kpi-change.neutral span:first-child,
.kpi-change .delta-muted {
  background: var(--bg-soft);
  color: var(--muted);
}

.kpi-card p {
  max-width: 260px;
  font-size: 14px;
}

.sentiment-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.sentiment-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
}

.dot.positive {
  background: var(--blue);
}

.dot.neutral {
  background: #596174;
}

.dot.negative {
  background: var(--red);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.dashboard-card {
  min-width: 0;
  padding: 32px;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.dashboard-card h2 {
  font-size: 21px;
  font-weight: 600;
}

.dashboard-card h2 span {
  color: var(--muted);
  font-weight: 500;
}

.menu-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.trend-chart {
  display: block;
  width: 100%;
  min-height: 318px;
  margin-top: 26px;
}

.trend-chart .grid {
  stroke: var(--line);
  stroke-dasharray: 7 9;
  stroke-width: 1;
}

.trend-chart .line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart .area {
  fill: url("#trendAreaGradient");
}

.trend-chart .dot {
  fill: var(--blue);
  stroke: #ffffff;
  stroke-width: 3;
}

.trend-chart text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.trend-chart .y-label {
  fill: var(--muted);
}

.trend-note {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
}

.share-card .card-title-row svg {
  color: #8a92a3;
}

.share-list {
  display: grid;
}

.share-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto minmax(90px, 0.55fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

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

.share-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--bg-soft);
  color: var(--slate);
  font-weight: 600;
}

.share-row.you .share-avatar {
  background: var(--blue-soft);
  color: var(--blue);
}

.share-row strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.share-row b {
  font-size: 22px;
}

.share-track,
.category-meter,
.bar-track,
.prompt-score i {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-muted);
}

.share-track i,
.category-meter span,
.bar-track i,
.prompt-score i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transform-origin: left center;
  animation: barFill 0.7s ease-out both;
}

@keyframes barFill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin-bottom: 32px;
}

.insight-feature h2 {
  margin-bottom: 22px;
  font-size: 20px;
  font-weight: 700;
}

.action-panel {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.action-list,
.factor-list,
.bar-list,
.stack-list,
.category-list,
.prompt-grid,
.competitor-grid,
.insight-grid {
  display: grid;
  gap: 12px;
}

.action {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.action-compact {
  padding-bottom: 0;
  border-bottom: 0;
}

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

.action strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.action p,
.action small {
  color: #4f5b70;
}

.action small {
  display: block;
  margin-top: 8px;
  line-height: 1.4;
}

.email-button {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0fdf4;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tag.warning {
  background: #fffbeb;
  color: var(--orange);
}

.tag.negative {
  background: #fef2f2;
  color: var(--red);
}

.intent-card {
  align-self: stretch;
  margin: 20px 0;
}

.intent-card h2 {
  margin-bottom: 24px;
}

.detail-share-card {
  margin-bottom: 20px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding: 14px 0;
}

.category-row strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.category-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.category-row .tag {
  grid-column: 2;
  grid-row: 1;
}

.category-meter {
  grid-column: 1 / -1;
}

.diagnostic-grid,
.source-detail-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.factor,
.prompt-card,
.competitor-card,
.insight-card,
.stack-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.factor {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.factor svg {
  margin-top: 2px;
  color: var(--green);
}

.factor.warning svg {
  color: var(--orange);
}

.factor strong,
.prompt-card strong,
.competitor-card strong,
.insight-card strong,
.stack-item strong {
  display: block;
  margin-bottom: 5px;
}

.source-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.source-columns h3,
.detail-card h3 {
  font-weight: 600;
  margin: 0 0 12px;
  font-size: 14px;
}

.bar-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.bar-item span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  grid-column: 1 / -1;
  height: 8px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0 18px;
}

.panel-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.prompt-method {
  margin-bottom: 16px;
}

.metrics-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 390px)) minmax(170px, auto);
  gap: 28px;
  margin: 4px 0 22px;
  align-items: end;
}

.metrics-controls label {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metrics-select-control::before {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 19px;
  z-index: 1;
  width: 16px;
  height: 16px;
  background: var(--blue);
  pointer-events: none;
}

.metrics-select-control.llm-control::before {
  display: none;
}

.llm-select-icon {
  position: absolute;
  left: 16px;
  bottom: 17px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--blue);
  pointer-events: none;
}

.llm-select-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.metrics-select-control.topic-control::before {
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.metrics-select-control.topic-control::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 24px;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
}

.metrics-controls select {
  min-width: 0;
  min-height: 54px;
  padding: 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.metrics-controls select:focus,
.sentiment-topic-controls select:focus,
.context-filter-control select:focus,
.date-select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.metrics-apply-button {
  min-height: 54px;
  align-self: end;
}

.metrics-empty-state {
  display: grid;
  gap: 8px;
  min-height: 280px;
  place-items: center;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  text-align: center;
}

.metrics-empty-state h3 {
  margin: 0;
  font-size: 22px;
}

.metrics-empty-state p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.method-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.signal-list {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.signal-list span {
  min-height: 26px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.metrics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.metrics-results {
  margin-top: 20px;
}

.topic-result-list {
  display: grid;
  gap: 16px;
}

.metric-summary-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.metric-summary-card span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-summary-card strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
}

.metric-summary-card p {
  margin: 0;
  color: var(--muted);
}

.prompt-grid {
  grid-template-columns: 1fr;
}

.metric-result-card {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.16fr) minmax(148px, 0.32fr);
  gap: 18px 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.metric-card-main {
  display: grid;
  gap: 12px;
}

.metric-section-label {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-title-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
}

.metric-title-pill strong {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.metric-prompt-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-prompt-list span {
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.metric-card-note p {
  margin: 0;
  color: var(--muted);
}

.metric-bar-wrap {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.metric-mode-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.segmented-mention-bar {
  position: relative;
  display: flex;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: var(--bg-muted);
}

.segmented-mention-bar i {
  position: relative;
  display: block;
  width: var(--w, 0%);
  height: 100%;
}

.segmented-mention-bar i:first-child {
  border-radius: 999px 0 0 999px;
}

.segmented-mention-bar i:last-child {
  border-radius: 0 999px 999px 0;
}

.you-segment {
  background: #6aa6ff;
}

.competitor-segment {
  background: #5a6072;
}

.competitor-segment-detail {
  background: var(--segment-color, #5a6072);
}

.segment-tooltip {
  position: absolute;
  left: calc(100% + 16px);
  bottom: calc(100% + 10px);
  z-index: 10;
  display: grid;
  gap: 4px;
  min-width: 132px;
  width: max-content;
  max-width: 220px;
  padding: 11px 13px;
  border: 1px solid rgba(90, 96, 114, 0.18);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  font-style: normal;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(4px, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.segment-tooltip strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.segment-tooltip b {
  color: var(--tooltip-color, var(--blue));
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.competitor-segment-detail::before {
  content: "";
  position: absolute;
  left: calc(100% + 11px);
  bottom: calc(100% + 5px);
  z-index: 11;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(90, 96, 114, 0.18);
  border-bottom: 1px solid rgba(90, 96, 114, 0.18);
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, 4px) rotate(45deg);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.competitor-segment-detail:hover .segment-tooltip,
.competitor-segment-detail:hover::before,
.you-segment.competitor-segment-detail:hover .segment-tooltip,
.you-segment.competitor-segment-detail:hover::before {
  opacity: 1;
}

.competitor-segment-detail:hover .segment-tooltip,
.you-segment.competitor-segment-detail:hover .segment-tooltip {
  transform: translate(0, 0);
}

.competitor-segment-detail:hover::before,
.you-segment.competitor-segment-detail:hover::before {
  transform: translate(0, 0) rotate(45deg);
}

.metric-share-legend-simple .legend-competitor::before {
  background: #5a6072;
}

.insights-sent-dialog {
  position: fixed;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  margin: auto;
}

.insights-sent-dialog[open] {
  display: grid;
  place-items: center;
}

.insights-sent-dialog::backdrop {
  background: rgba(11, 13, 18, 0.42);
  backdrop-filter: blur(4px);
}

.insights-sent-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  padding: 32px 28px 28px;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: floatingPanelIn 0.28s ease-out;
}

.insights-sent-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
}

.insights-sent-icon svg {
  width: 28px;
  height: 28px;
}

.insights-sent-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.15;
}

.insights-sent-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.insights-sent-card .primary-button {
  margin-top: 8px;
  min-width: 140px;
}

.metric-share-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
  padding-left: 2px;
}

.metric-share-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-share-legend b {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
}

.metric-share-legend .legend-you b {
  color: #3f82df;
}

.metric-share-legend .legend-competitor::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip-color, #94a3b8);
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  animation: floatingPanelIn 0.22s ease-out;
}

.metric-card-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-card-stats span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-card-stats b {
  display: block;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
}

.metric-card-stats span:first-child b {
  color: #3f82df;
  font-size: 34px;
}

.metric-card-stats span:nth-child(2) b {
  color: #5a6072;
  font-size: 34px;
}

.metric-inline-competitors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.metric-inline-competitors span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.metric-inline-competitors span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-color, #2472f5);
}

.metric-rank-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.metric-rank-card span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-rank-card strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1;
  font-weight: 500;
}

.metric-rank-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.metric-card-note {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.metric-card-note small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.metric-competitor-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-competitor-list span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.metric-competitor-list b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-competitor-breakdown {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.metric-competitor-breakdown > span {
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics-mode-toggle {
  display: flex !important;
  align-items: center;
  align-self: end;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.metrics-mode-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.metric-competitor-list span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip-color, #2472f5);
}

.competitor-note {
  border-left-color: var(--blue);
}

.metric-result-card .prompt-meta {
  grid-column: 1 / -1;
  margin-top: 0;
}

.prompt-card button,
.text-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--blue);
  font-weight: 600;
}

.prompt-score {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.prompt-score i {
  height: 8px;
  background: var(--green);
}

.metric-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
  gap: 18px;
  align-items: center;
  background: #ffffff;
}

.metric-prompt-row strong {
  font-size: 17px;
  line-height: 1.35;
}

.metric-row-score {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.metric-row-score > strong {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 0.95;
  font-weight: 500;
}

.metric-row-score > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.prompt-meta,
.competitor-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

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

.competitor-card .rate {
  display: block;
  margin: 12px 0 6px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 500;
}

.detail-card {
  padding: 22px;
}

.sentiment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.sentiment-overview-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 28px;
  align-items: center;
  overflow: hidden;
}

.sentiment-gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: min(300px, 100%);
  height: 178px;
  margin: 10px auto 0;
}

.sentiment-overview-card.animate-in .sentiment-gauge {
  animation: sentimentGaugeIn 0.9s ease-out both;
}

.gauge-arc {
  position: absolute;
  inset: 0 0 30px;
  border-radius: 180px 180px 0 0;
  background:
    radial-gradient(circle at 50% 100%, #ffffff 0 58%, transparent 59%),
    conic-gradient(from 270deg at 50% 100%, var(--blue) 0 var(--score-deg, 0deg), var(--bg-muted) 0 180deg, transparent 0);
}

.sentiment-gauge strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 54px;
  line-height: 0.9;
  font-weight: 500;
}

.sentiment-gauge span {
  position: absolute;
  bottom: 0;
  z-index: 1;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
}

.sentiment-bars {
  display: grid;
  gap: 13px;
  margin-top: 0;
}

.sentiment-side {
  display: grid;
  gap: 0;
  align-self: center;
  padding-right: 18px;
}

.sentiment-bar-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.sentiment-bar-row span {
  color: var(--ink);
  font-weight: 600;
}

.sentiment-bar-row:hover,
.sentiment-bar-row:focus-visible,
.sentiment-bar-row.active {
  border-color: var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.sentiment-face {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.sentiment-face svg {
  width: 19px;
  height: 19px;
}

.sentiment-face.positive {
  background: #f0fdf4;
  color: var(--green);
}

.sentiment-face.neutral {
  background: var(--bg-soft);
  color: var(--slate);
}

.sentiment-face.negative {
  background: #fef2f2;
  color: var(--red);
}

.sentiment-bar-row .bar-track {
  grid-column: 2 / -1;
}

.sentiment-bar-row .bar-track i {
  animation: none;
  transform: none;
}

.sentiment-overview-card.animate-in .sentiment-bar-row .bar-track i {
  animation: sentimentBarIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sentiment-overview-card.animate-in .sentiment-bar-row:nth-child(2) .bar-track i {
  animation-delay: 0.08s;
}

.sentiment-overview-card.animate-in .sentiment-bar-row:nth-child(3) .bar-track i {
  animation-delay: 0.16s;
}

@keyframes sentimentGaugeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sentimentBarIn {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.sentiment-bar-row.positive .bar-track i {
  background: var(--green);
}

.sentiment-bar-row.neutral .bar-track i {
  background: #7f879a;
}

.sentiment-bar-row.negative .bar-track i {
  background: var(--red);
}

.sentiment-bar-row.context .bar-track i {
  background: var(--blue);
}

.sentiment-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.sentiment-topic-card-wide,
.sentiment-context-wide {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sentiment-topic-card-wide {
  gap: 12px;
  padding: 24px 28px;
  overflow: visible;
}

.mention-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.mention-context-head h2 {
  margin: 0;
}

.context-filter-control {
  position: relative;
  display: grid;
  gap: 6px;
  width: min(220px, 42%);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.context-filter-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.context-filter-face {
  position: absolute;
  left: 12px;
  bottom: 11px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  color: var(--blue);
  pointer-events: none;
}

.context-filter-face svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.context-filter-control.positive .context-filter-face {
  background: #f0fdf4;
  color: var(--green);
}

.context-filter-control.neutral .context-filter-face {
  background: var(--bg-soft);
  color: var(--slate);
}

.context-filter-control.negative .context-filter-face {
  background: #fef2f2;
  color: var(--red);
}

.context-filter-control.all .context-filter-face {
  background: var(--blue-soft);
}

.sentiment-topic-card-wide .sentiment-topic-controls {
  max-width: 520px;
}

.sentiment-context-wide {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.context-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.context-chip-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.context-chip-card.active {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.context-chip-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.context-chip-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.context-rank-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0;
}

.context-rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.context-rank-row.primary {
  border-color: var(--blue-border);
  background: var(--blue-soft);
}

.context-rank-row > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.context-rank-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 18px;
}

.context-rank-row p,
.topic-sentiment-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.context-rank-row.empty {
  display: block;
  min-height: auto;
}

.sentiment-context-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.sentiment-topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.topic-sentiment-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.sentiment-topic-controls {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr);
  gap: 12px;
  align-items: end;
  margin-top: 0;
}

.sentiment-topic-controls-inline {
  justify-self: end;
  width: min(250px, calc(100% - 6px));
  margin-right: 6px;
}

.sentiment-topic-controls label {
  display: grid;
  gap: 7px;
}

.sentiment-topic-controls label > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sentiment-topic-controls select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.topic-sentiment-result {
  margin-top: 0;
}

.topic-sentiment-empty {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.selected-topic-card {
  padding: 4px 0 0;
}

.selected-topic-card > strong {
  display: block;
  margin-bottom: 16px;
  font-size: 17px;
}

.selected-topic-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.selected-topic-title strong {
  font-size: 17px;
}

.topic-context-leaderboard {
  display: grid;
  gap: 10px;
}

.topic-context-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.topic-context-row.primary {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  box-shadow: var(--shadow);
}

.topic-context-row:hover,
.topic-context-row:focus-within {
  z-index: 20;
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.topic-context-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.topic-context-row strong {
  display: inline;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.topic-context-row .context-info-popover,
.topic-context-row em {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.topic-context-row .context-info-popover {
  position: absolute;
  z-index: 30;
  left: 94px;
  bottom: calc(100% - 8px);
  display: none;
  width: min(480px, calc(100% - 92px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.topic-context-row .context-info-excerpt {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.context-info-meta {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.context-info-meta div {
  display: grid;
  gap: 2px;
}

.context-info-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.context-info-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.topic-context-row:hover .context-info-popover,
.topic-context-row:focus-within .context-info-popover {
  display: block;
  animation: floatingPanelIn 0.18s ease-out;
}

.context-info-button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 2px;
}

.context-info-button:hover,
.context-info-button:focus-visible {
  border-color: var(--blue-border);
  background: var(--blue-soft);
  outline: none;
}

.topic-context-row em {
  margin: 0;
  color: var(--blue);
  font-weight: 600;
}

.topic-sentiment-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.selected-topic-bars {
  display: grid;
  gap: 14px;
}

.topic-context-summary,
.topic-quote-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.topic-context-summary > span,
.topic-quote-list > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-context-summary div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-context-summary b {
  min-height: 28px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.topic-context-summary p,
.topic-quote-list p {
  margin: 0;
  color: var(--muted);
}

.topic-quote-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.topic-quote-list article strong {
  color: var(--ink);
  font-size: 13px;
}

.topic-signal-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-signal-list span {
  min-height: 30px;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.topic-sentiment-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.topic-sentiment-card strong {
  min-height: 34px;
  line-height: 1.25;
}

.topic-sentiment-card > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sentiment-mix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sentiment-mix span {
  display: grid;
  gap: 4px;
  min-height: 66px;
  align-content: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.sentiment-mix b {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1;
}

.sentiment-mix .positive {
  background: #f0fdf4;
}

.sentiment-mix .neutral {
  background: var(--bg-muted);
}

.sentiment-mix .negative {
  background: #fef2f2;
}

.topic-sentiment-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.sentiment-topic-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.stack-item a {
  color: var(--blue);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.insight-grid {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 16px;
}

.insight-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.insight-board-list {
  min-width: 0;
}

.insight-board-head,
.insight-board-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.insight-board-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: 0 0 12px 70px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.insight-board-row {
  min-height: 106px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.insight-row-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
}

.insight-row-icon svg {
  width: 22px;
  height: 22px;
}

.insight-board-row strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 14px;
}

.insight-board-row p {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.insight-board.single-insight {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.32fr);
}

.insight-board.single-insight .insight-board-head,
.insight-board.single-insight .insight-board-row {
  grid-template-columns: 78px minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 22px;
}

.insight-board.single-insight .insight-board-head {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr);
  padding-left: 100px;
}

.insight-board.single-insight .insight-board-row {
  min-height: 150px;
  align-items: center;
  padding: 26px 0;
}

.insight-board.single-insight .insight-row-icon {
  width: 62px;
  height: 62px;
}

.insight-board.single-insight .insight-row-icon svg {
  width: 31px;
  height: 31px;
}

.insight-board.single-insight .insight-board-row strong {
  font-size: 15px;
}

.insight-board.single-insight .insight-board-row p {
  max-width: 300px;
  font-size: 12.5px;
  line-height: 1.42;
}

.insight-send-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 330px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  text-align: center;
}

.send-orb {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.send-orb svg {
  width: 38px;
  height: 38px;
}

.insight-send-panel strong {
  max-width: 180px;
  font-size: 16px;
  line-height: 1.25;
}

.insight-send-panel p {
  max-width: 190px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.insight-send-panel .email-button {
  margin-top: 10px;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  text-decoration: none;
}

.insight-send-panel .email-button svg {
  width: 16px;
  height: 16px;
}

.insights-loading-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 360px;
  padding: 42px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.insights-loading-orbit {
  width: 58px;
  height: 58px;
  border: 3px solid var(--blue-soft);
  border-top-color: #6aa6ff;
  border-right-color: #5a6072;
  border-radius: 50%;
  animation: insightsSpin 0.9s linear infinite;
}

.insights-loading-card strong {
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.15;
}

.insights-loading-card p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.insights-loading-lines {
  display: grid;
  gap: 8px;
  width: min(340px, 100%);
  margin-top: 6px;
}

.insights-loading-lines i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-soft), #dbeafe, var(--bg-soft));
  background-size: 220% 100%;
  animation: insightsShimmer 1.15s ease-in-out infinite;
}

.insights-loading-lines i:nth-child(2) {
  width: 82%;
  animation-delay: 0.12s;
}

.insights-loading-lines i:nth-child(3) {
  width: 62%;
  animation-delay: 0.24s;
}

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

@keyframes insightsShimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.action-insight-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.insight-visual {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.insight-visual svg {
  width: 40px;
  height: 40px;
}

.insight-content-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.insight-copy,
.insight-solution {
  display: grid;
  gap: 8px;
}

.insight-solution {
  padding: 0 0 0 18px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
}

.insight-divider {
  display: none;
}

.insight-copy span,
.insight-solution span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.insight-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.insight-copy p,
.insight-copy small,
.insight-solution p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.insight-solution p {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.insight-send-button {
  width: auto;
  min-width: 168px;
  margin: 2px 0 0;
  border-color: var(--blue-border);
  color: var(--blue);
  white-space: nowrap;
}

.insight-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.insight-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}

.insight-dots span.active {
  background: var(--blue);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  line-height: 1.45;
}

pre {
  overflow-x: auto;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #e5edff;
}

.empty-state {
  margin-top: 22px;
  padding: 34px;
  text-align: center;
}

.empty-state.hidden,
.setup-card.hidden {
  display: none;
}

dialog {
  width: min(780px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  animation: floatingPanelIn 0.28s ease-out;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.confirm-dialog-card {
  display: grid;
  gap: 12px;
  width: min(400px, calc(100vw - 32px));
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.2;
}

.confirm-dialog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

@keyframes floatingPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.icon-only {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.answer-block {
  clear: both;
  white-space: pre-wrap;
}

.error-text {
  color: var(--red);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 214px minmax(0, 1fr);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 18px;
  }

  .topbar-actions {
    width: 100%;
  }

  .scan-form,
  .kpi-grid,
  .dashboard-grid,
  .insight-layout,
  .metrics-layout,
  .diagnostic-grid,
  .source-detail-grid,
  .sentiment-grid,
  .sentiment-lower-grid,
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sentiment-lower-grid {
    grid-template-columns: 1fr;
  }

  .provider-field {
    grid-column: 1 / -1;
  }

  .scan-form {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-links {
    display: none;
  }

  .landing-hero,
  .landing-feature-band,
  .landing-steps,
  .landing-feature-grid,
  .feature-side-stack,
  .landing-start-card {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 26px;
  }

  .preview-head {
    flex-direction: column;
  }

  .preview-provider-pills {
    justify-content: flex-start;
  }

  .landing-faq {
    grid-template-columns: 1fr;
  }

  .login-shell,
  .login-preview {
    grid-template-columns: 1fr;
  }

  .login-copy-panel {
    min-height: auto;
  }

  .landing-feature-band,
  .landing-faq,
  .landing-section-steps {
    margin-inline: 0;
    padding-inline: 24px;
    border-radius: 0;
  }

  .feature-wide {
    grid-column: auto;
    min-height: auto;
  }

  .cta-visual {
    grid-template-columns: auto;
  }

  .cta-visual i {
    width: 2px;
    height: 42px;
    justify-self: center;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), var(--blue));
  }

  .preview-mini-metrics {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 0 18px 32px;
  }

  .topbar {
    margin: 0 -18px;
    padding-inline: 18px;
  }

  .topbar-title,
  .topbar-actions,
  .setup-card,
  .method-card,
  .source-columns {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .scan-form,
  .kpi-grid,
  .dashboard-grid,
  .insight-layout,
  .metrics-layout,
  .metrics-controls,
  .diagnostic-grid,
  .source-detail-grid,
  .settings-grid,
  .sentiment-grid,
  .sentiment-lower-grid,
  .sentiment-overview-card,
  .prompt-grid,
  .competitor-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .context-chip-grid,
  .topic-sentiment-cloud,
  .context-rank-list,
  .sentiment-topic-controls {
    grid-template-columns: 1fr;
  }

  .action-insight-card {
    grid-template-columns: 1fr;
  }

  .insight-board {
    grid-template-columns: 1fr;
  }

  .insight-board-head {
    display: none;
  }

  .insight-board-row {
    grid-template-columns: 42px 1fr;
  }

  .insight-board.single-insight .insight-board-row {
    grid-template-columns: 62px 1fr;
  }

  .insight-board-row > div:last-child {
    grid-column: 2;
  }

  .insight-board.single-insight .insight-board-head {
    display: none;
  }

  .insight-send-panel {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .insight-content-card {
    grid-template-columns: 1fr;
  }

  .insight-solution {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .metric-result-card {
    grid-template-columns: 1fr;
  }

  .metric-card-stats {
    grid-template-columns: 1fr;
  }

  .score-card {
    grid-template-columns: 1fr;
  }

  .score-card .kpi-heading,
  .score-card .score-display {
    grid-column: 1;
    grid-row: auto;
  }

  .provider-status,
  .provider-field {
    grid-template-columns: 1fr;
  }

  .scan-submit-button,
  .ghost-button,
  .email-button {
    width: 100%;
  }

  .share-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .share-track {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 24px;
  }

  .top-tabs {
    gap: 14px;
  }

  .kpi-card,
  .dashboard-card,
  .action-panel {
    padding: 20px;
  }

  .score-display strong {
    font-size: 46px;
  }

  .sentiment-mix {
    grid-template-columns: 1fr;
  }

  .sentiment-gauge strong {
    font-size: 50px;
  }
}
