html,
body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f8fd;
  color: #1b1f2b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 1.5rem clamp(1.5rem, 4vw, 4rem);
  border-bottom: 1px solid #e4e8f1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 1.6rem);
  letter-spacing: 0.01em;
}

nav a {
  color: #4b5be5;
  text-decoration: none;
  margin-right: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  max-width: min(1280px, 94vw);
  width: 100%;
  margin: 0 auto;
}

.panel {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.panel h2 {
  margin-top: 0;
  font-size: 1.4rem;
  color: #0f172a;
}

form {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #475569;
}

input,
textarea,
select {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #d7dce8;
  background: #ffffff;
  color: #1b1f2b;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4b5be5;
  box-shadow: 0 0 0 3px rgba(75, 91, 229, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button,
.button-primary,
.button-secondary {
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  border: none;
  background: #4b5be5;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(75, 91, 229, 0.25);
}

.button-secondary {
  background: #eef1ff;
  color: #3949ab;
  border: 1px solid #ced5f2;
  box-shadow: none;
}

.button-secondary:hover {
  box-shadow: 0 8px 18px rgba(72, 86, 228, 0.25);
}

.output {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px dashed #d3d9e5;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
  color: #475569;
}

.muted {
  color: #56657b;
  font-size: 0.85rem;
}

ul.tool-links {
  padding-left: 1.2rem;
}

ul.tool-links li {
  margin-bottom: 0.6rem;
}

ul.tool-links a {
  color: #4b5be5;
  text-decoration: none;
}

ul.tool-links a:hover {
  text-decoration: underline;
}

footer {
  padding: 1.2rem;
  text-align: center;
  color: #7a8195;
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  background: #eef1ff;
  color: #3949ab;
  border: 1px solid #d6dcff;
}

.badge-outline {
  background: transparent;
  color: #3949ab;
  border-color: #c6cefb;
}

.badge-glow {
  background: linear-gradient(120deg, rgba(75, 91, 229, 0.12), rgba(0, 184, 212, 0.12));
  border-color: transparent;
  color: #2b3bb8;
}

.badge-assistant {
  background: #e9f4ff;
  color: #1e73be;
  border-color: #c8dfff;
}

.advanced-options {
  margin-top: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e1e6f0;
  background: #fcfdff;
}

.advanced-options summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  color: #3949ab;
  outline: none;
}

.advanced-options[open] summary {
  border-bottom: 1px solid #e1e6f0;
}

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

.advanced-grid {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.advanced-full {
  grid-column: 1 / -1;
}

.results-main {
  flex: 1;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5rem);
  max-width: min(1280px, 96vw);
  margin: 0 auto;
  width: 100%;
}

.result-root {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.results-grid {
  display: grid;
  gap: clamp(1.8rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  align-items: start;
}

.summary-section {
  display: grid;
  gap: 1.6rem;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e1e6f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.summary-score {
  text-align: right;
  font-size: 0.95rem;
  color: #6b7390;
}

.summary-score strong {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  color: #2736d1;
  line-height: 1;
}

.metrics-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.metric-card {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5eaf6;
  display: grid;
  gap: 0.5rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.metric-card h4 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5d6a8b;
}

.metric-card strong {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 600;
  color: #2130b6;
}

.metric-card span,
.metric-sub {
  font-size: 0.85rem;
  color: #6f7da0;
}

.summary-keywords,
.top-assistants__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.component-breakdown {
  display: grid;
  gap: 1rem;
}

.component-row {
  display: grid;
  gap: 0.6rem;
}

.component-row__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.component-label {
  font-weight: 600;
  color: #1f2937;
}

.component-description {
  display: block;
  font-size: 0.85rem;
  color: #6f7da0;
}

.component-value {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2736d1;
}

.component-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e5eaf6;
  overflow: hidden;
}

.component-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(120deg, rgba(75, 91, 229, 0.9), rgba(0, 184, 212, 0.9));
}

.charts-container,
.charts-section {
  display: grid;
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.charts-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.chart-card,
.assistant-card,
.geo-card,
.citation-card,
.top-sources-section,
.assistants-section,
.geo-section,
.citations-section {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid;
  gap: 1rem;
}

.chart-card canvas {
  width: 100% !important;
  height: clamp(240px, 30vw, 320px) !important;
}

.assistants-section h3,
.geo-section h3,
.citations-section h3,
.top-sources-section h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.assistant-columns {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.assistant-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.assistant-card__score {
  margin: 0;
  font-size: 0.93rem;
  color: #475569;
}

.assistant-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #64748b;
  text-align: right;
}

.assistant-card__keywords,
.assistant-card__queries,
.geo-card__keywords {
  display: grid;
  gap: 0.6rem;
}

.assistant-card__query {
  padding: 0.9rem;
  border-radius: 14px;
  background: #f7f9ff;
  border: 1px solid #dde3f3;
}

.assistant-card__query-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.assistant-card__query-meta {
  font-size: 0.82rem;
  color: #6f7da0;
}

.geo-card__score {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #2130b6;
}

.geo-card__gbp {
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #4b5563;
  background: rgba(226, 232, 255, 0.35);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

.geo-card__gbp span {
  font-size: 0.8rem;
}
.geo-card__proof {
  display: grid;
  gap: 0.3rem;
}
.geo-card__proof img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.geo-grid,
.citations-list {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.citations-list {
  max-height: 420px;
  overflow: auto;
  padding-right: 0.4rem;
}

.citation-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.citation-card a {
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
}

.citation-card a:hover {
  color: #2f4be5;
  text-decoration: underline;
}

.citation-card footer {
  font-size: 0.78rem;
  color: #79849c;
}

.insight-section {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid;
  gap: 1rem;
}

.insight-stack {
  display: grid;
  gap: 1.2rem;
}

.coverage-section {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid;
  gap: 1.2rem;
}

.visibility-body {
  background: radial-gradient(120% 120% at 0% 0%, #eef3ff 0%, #ffffff 45%, #f4f7ff 100%);
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid #dfe5fb;
  background: rgba(255, 255, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.tool-header h1 {
  margin: 0.2rem 0 0;
}
.tool-header nav a {
  color: #1f2a7c;
  font-weight: 500;
}
.breadcrumbs {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  color: #94a3b8;
}

.visibility-main {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.6rem, 4vw, 3.6rem);
}

.visibility-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.6rem);
  border-radius: 30px;
  padding: clamp(1.8rem, 4vw, 3.6rem);
  background: linear-gradient(130deg, #0c1039, #161f5f 55%, #122022);
  color: #f5f7ff;
  box-shadow: 0 35px 70px rgba(9, 12, 36, 0.6);
}

.hero-copy h2 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.hero-pill {
  display: inline-flex;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
  display: grid;
  gap: 0.5rem;
  color: rgba(245, 247, 255, 0.85);
}

.hero-list li::before {
  content: "•";
  margin-right: 0.4rem;
  color: #8ff5ff;
}

.hero-glance {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glance-progress {
  display: grid;
  gap: 0.6rem;
}

.glance-progress > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.glance-bar {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  height: 6px;
}

.glance-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7f9dff, #61f1ff);
}

.hero-form-card {
  background: #ffffff;
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
  border: 1px solid #e2e8ff;
  display: grid;
  gap: 1rem;
}

.form-header h3 {
  margin: 0;
}

.results-preview,
.insight-marquee,
.workflow-section {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 26px;
  padding: clamp(1.8rem, 4vw, 3rem);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 1.6rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.section-actions {
  display: grid;
  gap: 0.4rem;
  justify-items: flex-end;
}

.chip-stack {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d0d7f8;
  background: #f4f6ff;
  font-size: 0.8rem;
  color: #2b3580;
}

.preview-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.preview-card {
  border: 1px solid #dfe3f5;
  border-radius: 20px;
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
  background: #fdfdff;
}

.preview-metric {
  font-size: 2.8rem;
  margin: 0;
  color: #1f2a7c;
}

.answer-bars {
  display: grid;
  gap: 0.6rem;
}

.answer-bars .bar {
  height: 6px;
  border-radius: 999px;
  background: #e7ecff;
  overflow: hidden;
  margin: 0.25rem 0;
}

.answer-bars .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8fa3ff, #5fe0ff);
}

.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.insight-marquee .marquee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.insight-marquee article {
  padding: 1rem;
  border-radius: 16px;
  background: #f6f8ff;
  border: 1px dashed #d7ddfb;
}

.workflow-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.workflow-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid #e4e8fb;
}

.workflow-steps span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #1f2a7c;
  color: #fff;
  font-weight: 600;
}

.writer-export-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.writer-export-buttons button {
  border: 1px solid #dfe4ff;
  background: #f6f8ff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.outline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.outline-grid article {
  border: 1px solid #e4e8fb;
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
}

.schema-block {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 14px;
  overflow: auto;
}

.executive-section {
  background: #ffffff;
  border-radius: 28px;
  padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid #dfe4ff;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 1.8rem;
}

.executive-section header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.exec-actions {
  display: flex;
  gap: 0.6rem;
}

.exec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}

.scorecard,
.score-chart,
.score-info {
  border: 1px solid #e4e8ff;
  border-radius: 20px;
  padding: 1.2rem;
  background: #fdfdff;
}

.score-dial {
  display: grid;
  gap: 0.6rem;
}

.dial {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 10px solid #e8edff;
  display: grid;
  place-items: center;
  margin-bottom: 0.4rem;
  position: relative;
}

.dial::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border-top: 10px solid #7c3aed;
  border-right: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid transparent;
  transform: rotate(var(--dial-rotation, 45deg));
}

.dial span {
  font-size: 2.4rem;
  font-weight: 700;
  color: #1f2a7c;
}

.dial small {
  color: #667085;
}

.score-metrics {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.score-metrics li {
  display: flex;
  justify-content: space-between;
}

.score-chart {
  min-height: 220px;
  position: relative;
}

.score-chart canvas {
  height: 220px !important;
}

.trend-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
}

.dot-purple {
  background: #7c3aed;
}

.dot-gold {
  background: #fbbf24;
}

.score-info ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.2rem;
}
.provider-heartbeat {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #456;
}
.provider-heartbeat span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.provider-heartbeat span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.component-list {
  display: grid;
  gap: 0.3rem;
}

.next-actions .action-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.next-actions article {
  border: 1px solid #e5e9ff;
  border-radius: 18px;
  padding: 1rem;
  background: #f7f9ff;
  display: grid;
  gap: 0.4rem;
}

.recommendations-exec .dial {
  border-color: #e0e7ff;
}

.recommendation-wins .win-card,
.recommendation-projects .project-card {
  border: 1px solid #dfe4ff;
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.win-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.impact.high {
  color: #b91c1c;
}

.impact.medium {
  color: #b45309;
}

.impact.low {
  color: #15803d;
}

.topic-sources .topics-table {
  border: 1px solid #e4e8f5;
  border-radius: 18px;
  overflow: hidden;
}

.topics-head,
.topics-row {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0.9rem 1rem;
}

.topics-head {
  background: #f1f4ff;
  font-weight: 600;
}

.topics-row {
  border-top: 1px solid #eef1fb;
}

.topics-row strong {
  display: block;
}

.topics-row small {
  color: #94a3b8;
}

.intent-chip {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #d5ddfb;
  font-size: 0.8rem;
}

.source-mix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.source-card {
  border: 1px solid #e6eaf8;
  border-radius: 18px;
  padding: 1rem;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.source-card ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.2rem;
}

.insight-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.insight-card {
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  background: #fdfdff;
}

.insight-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.insight-card__score {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2130b6;
}

.gap-list {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0;
  color: #5b647a;
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
}

.intent-coverage-table,
.answer-share-table,
.authority-list,
.geo-consistency-table {
  display: grid;
  gap: 1rem;
}

.intent-row {
  border: 1px solid #e5e9f6;
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  background: #f8f9ff;
}

.intent-row__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.intent-row__score {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1f2ab6;
}

.intent-row__assistants {
  display: grid;
  gap: 0.6rem;
}

.coverage-chip {
  display: grid;
  gap: 0.3rem;
}

.coverage-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: #dfe4f8;
  overflow: hidden;
}

.coverage-bar--quiet {
  background: #e6eaf5;
}

.coverage-bar__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(120deg, #4b5be5, #00b8d4);
}

.coverage-value {
  font-size: 0.85rem;
  color: #475569;
}

.insight-highlight {
  border: 1px solid #d9e0fb;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(228, 234, 255, 0.4);
}

.insight-highlight strong {
  font-size: 2rem;
  color: #2130b6;
}

.answer-row {
  border: 1px solid #e5e9f6;
  border-radius: 14px;
  padding: 0.9rem;
  display: grid;
  gap: 0.4rem;
  background: #ffffff;
}

.answer-row__assistant {
  font-weight: 600;
}

.answer-row__bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #edf0fd;
  overflow: hidden;
}

.answer-row__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 107, 255, 0.9), rgba(158, 252, 255, 0.9));
}

.answer-row__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #5b647a;
}

.badge-warning {
  align-self: flex-start;
  background: rgba(255, 196, 87, 0.15);
  color: #b45309;
  border: 1px solid rgba(255, 196, 87, 0.6);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.competitor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.competitor-card {
  border: 1px solid #e1e6f0;
  border-radius: 14px;
  padding: 1rem;
  background: #f7f8ff;
  display: grid;
  gap: 0.6rem;
}

.competitor-card__metrics {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.authority-row,
.geo-consistency-row {
  border: 1px solid #e6eaf5;
  border-radius: 14px;
  padding: 0.9rem;
  display: grid;
  gap: 0.4rem;
}

.geo-consistency-row strong {
  font-size: 1rem;
  color: #1f2937;
}

.momentum-strip {
  border: 1px dashed rgba(77, 91, 229, 0.4);
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.momentum-pill {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.momentum-pill--up {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.momentum-pill--down {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.momentum-pill--flat {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}
.top-sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.top-sources-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: #f7f9ff;
  border: 1px solid #dde3f3;
}

.top-source-domain {
  font-weight: 600;
  color: #1f2937;
}

.top-source-mentions {
  font-size: 0.95rem;
  color: #6f7da0;
}

.empty-state {
  padding: clamp(2.2rem, 4vw, 3.2rem);
  border-radius: 24px;
  background: #ffffff;
  border: 1px dashed #d7dce8;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.scoreboard {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: clamp(1.5rem, 3vw, 2.2rem) 0;
}

.scoreboard-card {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 0.4rem;
}

.scoreboard-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6f7da0;
}

.scoreboard-value {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 700;
  color: #2130b6;
}

.scoreboard-status {
  font-size: 0.85rem;
  color: #5f6c8f;
}

.comparison-card {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid;
  gap: 1rem;
}

.opportunity-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  color: #1f2937;
}

.opportunity-list li {
  background: #f8fbff;
  border: 1px solid #dde3f3;
  border-radius: 14px;
  padding: 1rem 1.2rem;
}

.opportunity-list li > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.opportunity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.opportunity-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3949ab;
}

.opportunity-action svg {
  width: 14px;
  height: 14px;
}

.geo-intel-section {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.4rem;
}

.geo-intel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.geo-intel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.geo-controls {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: center;
}

.geo-controls label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.geo-controls select,
.geo-controls input[type="range"] {
  width: 100%;
}

.geo-map-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 340px;
  border: 1px solid #e1e6f0;
}

#geo-map {
  width: 100%;
  height: 100%;
  min-height: 340px;
}

.geo-summary {
  display: grid;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: #4b5563;
}

.geo-summary strong {
  color: #1f2937;
}

.geo-alerts {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.geo-note {
  border-style: dashed;
  color: #4b5563;
  background: rgba(226, 232, 255, 0.25);
}

.geo-note p {
  margin: 0;
  font-size: 0.92rem;
}

.leaflet-control-attribution {
  font-size: 0.65rem !important;
}

.comparison-table,
.insights-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table thead,
.insights-table thead {
  background: #f3f6ff;
}

.comparison-table th,
.comparison-table td,
.insights-table th,
.insights-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid #e1e6f0;
}

.comparison-table tbody tr:hover,
.insights-table tbody tr:hover {
  background: #f8fbff;
}

.comparison-brand {
  display: grid;
  gap: 0.2rem;
}

.brand-name {
  font-weight: 600;
  color: #1f2937;
}

.brand-domain {
  font-size: 0.8rem;
  color: #6f7da0;
}

.alert-list,
.opportunity-list {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.alert-list li {
  color: #c2410c;
  font-weight: 500;
}

.opportunity-list li {
  color: #1f2937;
}

.article-card {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: grid;
  gap: 1rem;
}

.article-content {
  background: #f8fbff;
  border: 1px solid #dde3f3;
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1f2937;
}

.article-content pre {
  white-space: pre-wrap;
}

.score-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.score-card {
  position: relative;
  gap: 0.5rem;
}

.score-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6f7da0;
}

.score-value {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #2332c7;
}

.score-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dde3f3;
  overflow: hidden;
}

.score-bar span {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(75, 91, 229, 0.9), rgba(0, 184, 212, 0.9));
}

.citation-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.citation-list li {
  background: #f8fbff;
  border: 1px solid #dde3f3;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.citation-list a {
  color: #1b2bcc;
  text-decoration: none;
}

.citation-list a:hover {
  text-decoration: underline;
}

.tool-hub-header {
  display: grid;
  gap: 2rem;
  padding: clamp(2.4rem, 6vw, 4rem) clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(135deg, rgba(22, 32, 73, 0.92), rgba(10, 14, 32, 0.9));
  border-bottom: 1px solid rgba(158, 252, 255, 0.18);
  color: #f5f6ff;
}

.tool-hub-header .badge {
  display: inline-flex;
}

.tool-hub-hero {
  display: grid;
  gap: 1.2rem;
  max-width: 720px;
}

.tool-hub-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0;
}

.tool-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tool-hub-session {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tool-hub-session .muted {
  color: rgba(229, 233, 255, 0.75);
}

.tool-hub-main {
  padding: clamp(2rem, 6vw, 4rem);
  background: radial-gradient(circle at 15% 20%, rgba(158, 252, 255, 0.08), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(255, 107, 255, 0.08), transparent 45%),
    #f6f8fd;
  min-height: 60vh;
}

.tool-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tool-card {
  background: #ffffff;
  border: 1px solid #e1e6f0;
  border-radius: 24px;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 1rem;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 60px rgba(15, 23, 42, 0.12);
}

.tool-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(158, 252, 255, 0.25), rgba(255, 107, 255, 0.25));
  box-shadow: inset 0 0 0 1px rgba(97, 117, 255, 0.15);
}

.tool-card h2 {
  margin: 0;
  font-size: 1.45rem;
  color: #17203d;
}

.tool-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.tool-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: #54607b;
  font-size: 0.92rem;
}

.tool-card ul li::before {
  content: "▸";
  color: #5865f2;
  margin-right: 0.5rem;
}

.tool-card .button-tertiary {
  align-self: flex-start;
}

.tool-card--admin {
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
  color: #f3f4ff;
  border-color: rgba(99, 112, 255, 0.35);
}

.tool-card--admin h2,
.tool-card--admin p,
.tool-card--admin ul {
  color: #d9ddff;
}

.tool-card--admin ul li::before {
  color: rgba(138, 180, 255, 0.9);
}

.tool-card--admin .button-tertiary {
  color: #f3f4ff;
  border-color: rgba(156, 175, 255, 0.45);
}

.tool-hub-footer {
  padding: 1.6rem;
  text-align: center;
  color: #848ca3;
  background: #f6f8fd;
  border-top: 1px solid #e1e6f0;
}

.workspace-body {
  background: #f7f8fd;
}
.workspace-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.workspace-sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.workspace-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.workspace-menu {
  display: grid;
  gap: 0.6rem;
}
.workspace-menu a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
}
.workspace-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}
.workspace-sidebar__footer {
  margin-top: auto;
  display: grid;
  gap: 0.6rem;
}
.button-secondary--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}
.workspace-main {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.workspace-header__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.workspace-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.quick-actions {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}
.quick-actions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}
.quick-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.workspace-panel {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}
.workspace-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Trend view + playbooks + writer toast */
.trend-section {
  margin: 2rem 0;
  padding: 2rem;
  border-radius: 24px;
  background: var(--surface-soft, #f8fafc);
  border: 1px solid rgba(82, 91, 117, 0.12);
}

.trend-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.trend-meta {
  display: grid;
  gap: 1rem;
}

.trend-meta article {
  padding: 1rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(82, 91, 117, 0.08);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.05);
}

.trend-meta h4 {
  margin: 0.2rem 0;
  font-size: 1.65rem;
}

.trend-positive {
  color: #16a34a;
}

.trend-negative {
  color: #dc2626;
}

.trend-chart {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(82, 91, 117, 0.1);
  padding: 1rem;
  min-height: 320px;
  position: relative;
}

.trend-chart canvas {
  width: 100%;
  height: 280px;
}

.trend-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #636b7c;
  margin-top: 0.75rem;
}

.trend-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.dot-purple {
  background: #7c3aed;
}

.dot-gold {
  background: #f59e0b;
}

.alert-playbook {
  cursor: pointer;
  position: relative;
}

.alert-playbook::after {
  content: "View playbook";
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #636b7c;
  margin-left: 0.5rem;
}

.playbook-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  backdrop-filter: blur(6px);
}

.playbook-modal[hidden] {
  display: none;
}

.playbook-modal__canvas {
  width: min(520px, 92vw);
  background: #ffffff;
  border-radius: 20px;
  padding: 1.8rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
}

.playbook-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #4b5563;
}

.playbook-steps {
  margin-top: 1rem;
  padding-left: 1.2rem;
  color: #111827;
  line-height: 1.5;
}

.writer-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #111827;
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(16px);
  z-index: 80;
}

.writer-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.writer-toast.error {
  background: #dc2626;
}

@media (max-width: 900px) {
  .trend-grid {
    grid-template-columns: 1fr;
  }
}
.workflow-list,
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}
.workflow-list li,
.activity-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}
.activity-list li span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: grid;
  place-items: center;
}
.pill-outline {
  border: 1px solid #cbd5f5;
  background: transparent;
  color: #1f3a8a;
}
.workspace-panel a {
  text-decoration: none;
  font-size: 0.9rem;
}
.workspace-shell .tool-grid.expanded {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 1.2rem;
}
.workspace-shell .section-header {
  margin-bottom: 1rem;
}
.metric-card--large {
  min-height: 150px;
}

.workspace-sidebar a span {
  font-size: 1.3rem;
}

.stack-form {
  display: grid;
  gap: 1.25rem;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.2rem, 3vw, 1.8rem);
}

.metric-positive {
  color: #0c9447 !important;
}

.metric-negative {
  color: #d14343 !important;
}

.citations-results {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.citations-grid {
  display: grid;
  gap: clamp(1.8rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.vis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.vis-table th,
.vis-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #e1e6f0;
  text-align: left;
}

.vis-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #647196;
}

.citations-columns {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.2rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.citation-list {
  display: grid;
  gap: 1rem;
}

.citation-item {
  background: #ffffff;
  border: 1px solid #e3e7f3;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.6rem;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.citation-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.8rem;
  color: #5f6c8f;
}

.citation-item a {
  font-weight: 600;
  color: #1a237e;
  text-decoration: none;
}

.citation-item a:hover {
  text-decoration: underline;
}

.citation-item p {
  margin: 0;
  font-size: 0.85rem;
  color: #5f6c8f;
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.mini-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #42506d;
}

.mini-list li strong {
  min-width: 90px;
  color: #1a237e;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 1px solid #d0d6f1;
  background: rgba(248, 250, 255, 0.8);
  color: #1f2a4d;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ghost-btn:hover {
  border-color: #4b5be5;
  box-shadow: 0 10px 20px rgba(75, 91, 229, 0.18);
}

.hero-form-card .form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero-form-card .form-actions button {
  flex: 1;
  min-width: 180px;
}

.hero-form-card .form-actions .ghost {
  background: transparent;
  border: 1px dashed #c5cbe3;
  color: #1a237e;
}

.monitor-center {
  background: #ffffff;
  border-radius: 28px;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid #e3e8ff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 1.8rem;
}

.monitor-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.8rem);
  align-items: start;
}

.monitor-form {
  display: grid;
  gap: 1rem;
  background: #f9faff;
  border: 1px solid #e0e6ff;
  border-radius: 20px;
  padding: 1.5rem;
}

.monitor-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: #1e2450;
}

.monitor-form input,
.monitor-form textarea {
  border-radius: 14px;
  border: 1px solid #cdd6f6;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

.monitor-form textarea {
  min-height: 90px;
  resize: vertical;
}

.monitor-form small {
  font-weight: 400;
  color: #6b7190;
}

.monitor-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.monitor-list-panel {
  border: 1px solid #e0e6ff;
  border-radius: 20px;
  padding: 1.3rem;
  background: #ffffff;
  min-height: 100%;
  display: grid;
  gap: 1rem;
}

.monitor-status {
  font-size: 0.9rem;
}

.monitor-status.error {
  color: #d6455d;
}

.monitor-list {
  display: grid;
  gap: 1rem;
}

.monitor-card {
  border: 1px solid #dfe5fb;
  border-radius: 18px;
  padding: 1rem 1.2rem;
  background: #f8f9ff;
  display: grid;
  gap: 0.8rem;
}

.monitor-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.monitor-card header h4 {
  margin: 0;
}

.monitor-card .monitor-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
}

.monitor-card .monitor-meta div {
  background: #fff;
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #ecf0ff;
}

.monitor-card .monitor-tags {
  display: grid;
  gap: 0.4rem;
}

.monitor-card .monitor-tags div {
  margin-top: 0.2rem;
}

.monitor-card .monitor-tags p {
  margin: 0.2rem 0 0;
  color: #2d3358;
}

.writer-settings {
  background: #fff;
  border-radius: 26px;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  border: 1px solid #e4e9f6;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.5rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.3rem;
  margin-top: 1rem;
}

.settings-card {
  border: 1px solid #e6ecfd;
  border-radius: 18px;
  padding: 1.2rem 1.3rem;
  background: #fdfdff;
  display: grid;
  gap: 0.6rem;
}

.settings-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.settings-card li {
  display: grid;
  gap: 0.1rem;
}

.settings-tags {
  display: grid;
  gap: 0.35rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.chip-outline {
  border: 1px solid #c7d2fe;
  color: #4338ca;
  background: #f5f5ff;
}

.chip-soft {
  background: #eef2ff;
  color: #3730a3;
}

.settings-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.settings-flags .flag-on,
.settings-flags .flag-off {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-flags .flag-on {
  background: #dcfce7;
  color: #166534;
}

.settings-flags .flag-off {
  background: #fee2e2;
  color: #991b1b;
}


.writer-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.writer-card {
  background: #ffffff;
  border: 1px solid #e6ecfd;
  border-radius: 20px;
  padding: 1.3rem 1.5rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 0.9rem;
}

.writer-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
}

.range-field .range-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.range-display input[type="range"] {
  flex: 1;
}

.toggle-grid {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #4b5a7a;
}

.assistant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem;
  font-size: 0.9rem;
}

.assistant-grid span {
  grid-column: 1 / -1;
  font-weight: 600;
  color: #1f2545;
}

.channel-chips {
  display: grid;
  gap: 0.4rem;
}

.channel-chips span {
  font-weight: 600;
  color: #1f2545;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.writer-chip {
  border: 1px solid #d6ddff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: #f5f7ff;
  color: #344265;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.writer-chip.is-active {
  background: #4b5be5;
  color: #fff;
  border-color: #4b5be5;
  box-shadow: 0 12px 25px rgba(75, 91, 229, 0.2);
}

.outline-builder-card {
  margin-top: 1.4rem;
  display: grid;
  gap: 1rem;
}

.outline-builder-rows {
  display: grid;
  gap: 1rem;
}

.outline-row {
  display: grid;
  gap: 0.6rem;
  border: 1px solid #e1e6f7;
  border-radius: 16px;
  padding: 0.9rem;
  background: #fdfdff;
  position: relative;
}

.outline-row__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.outline-row textarea {
  min-height: 80px;
  resize: vertical;
}

.outline-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #9ca6c7;
  cursor: pointer;
}

.outline-actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.quick-outline {
  border: 1px dashed #ced4eb;
  border-radius: 16px;
  padding: 0.8rem;
  background: #fbfcff;
}

.quick-outline summary {
  cursor: pointer;
  font-weight: 600;
  color: #303656;
  margin-bottom: 0.4rem;
}

.quick-outline textarea {
  min-height: 90px;
}

.monitor-card .monitor-delete {
  border: 1px solid #d04b5a;
  background: transparent;
  color: #d04b5a;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.monitor-card footer {
  font-size: 0.8rem;
  color: #6c7394;
}

.writer-collab {
  background: #fff;
  border-radius: 26px;
  padding: clamp(2rem, 4vw, 2.8rem);
  border: 1px solid #e1e6f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 1.8rem;
}

.collab-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
}

.history-column {
  display: grid;
  gap: 1rem;
}

.brief-history {
  display: grid;
  gap: 0.9rem;
}

.brief-card {
  border: 1px solid #e4e9f6;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  background: #fafbff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.brief-card.is-active {
  border-color: #4b5be5;
  background: #edf0ff;
}

.detail-column {
  border: 1px solid #e4e9f6;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  background: #fdfdff;
  display: grid;
  gap: 1.25rem;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-actions button {
  border: 1px solid #d0d6f1;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.detail-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.intel-block,
.comment-block {
  border-top: 1px solid #e4e9f6;
  padding-top: 1.2rem;
}

.intel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.intel-list li {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ecf0fb;
  font-size: 0.85rem;
  color: #4a5775;
}

.brief-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.brief-meta-grid article {
  border: 1px solid #ecf0fb;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
}

.assistant-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem;
}

.assistant-signal-grid article {
  border-radius: 14px;
  border: 1px solid #dfe5fb;
  padding: 0.8rem 0.9rem;
  background: #f7f8ff;
}

.comment-block textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cfd6eb;
  padding: 0.65rem 0.8rem;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}

.comment-block button {
  margin-top: 0.6rem;
  border: none;
  background: #1a237e;
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
}

.comment-timeline {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 0.8rem;
}

.comment-timeline article {
  background: #fff;
  border: 1px solid #ecf0fb;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
}

.results-header {
  padding: 1.8rem clamp(1.6rem, 4vw, 3.2rem);
  border-bottom: 1px solid #e1e6f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.results-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: #10172f;
}

.results-header .muted {
  font-size: 0.9rem;
}

.empty-pill {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px dashed #cfd6eb;
  background: #f8faff;
  color: #6b7596;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  .summary-section {
    position: static;
  }

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

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

@media (max-width: 720px) {
  .summary-header,
  .result-header,
  .assistant-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-score {
    text-align: left;
  }

  .tool-hub-header {
    padding-bottom: 3rem;
  }

  .tool-hub session {
    justify-content: space-between;
  }

  .tool-card ul {
    gap: 0.35rem;
  }
}


.next-actions {
  background: #ffffff;
  border-radius: 26px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border: 1px solid #e7ecff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 1.4rem;
}

.topic-sources {
  background: #ffffff;
  border-radius: 26px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border: 1px solid #e7ecff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 1.4rem;
}

.source-mix {
  background: #ffffff;
  border-radius: 26px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border: 1px solid #e7ecff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}
