:root {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --ink: #162033;
  --muted: #647084;
  --line: rgba(30, 48, 76, 0.12);
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --yellow: #ca8a04;
  --yellow-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --slate: #263246;
  --shadow: 0 22px 60px rgba(23, 37, 84, 0.12);
  --shadow-soft: 0 12px 32px rgba(23, 37, 84, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

img,
svg,
canvas,
video,
iframe,
table,
section,
article,
aside,
header,
footer,
main,
form,
label,
input,
select,
button,
.preview-card,
.section-panel,
.metric-card,
.platform-card,
.analysis-card,
.risk-card,
.recommendation-card,
.plan-card,
.highlight-card {
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 48%);
  z-index: -4;
}

button,
input,
select {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

.background-system {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.gradient-field {
  position: absolute;
  filter: blur(70px);
  opacity: 0.32;
  transform: translate3d(0, 0, 0);
}

.gradient-field-one {
  width: 48vw;
  height: 48vw;
  left: -16vw;
  top: -18vw;
  background: conic-gradient(from 120deg, rgba(37, 99, 235, 0.55), rgba(22, 163, 74, 0.38), rgba(202, 138, 4, 0.28), rgba(37, 99, 235, 0.55));
  animation: driftOne 18s ease-in-out infinite alternate;
}

.gradient-field-two {
  width: 44vw;
  height: 44vw;
  right: -17vw;
  top: 22vh;
  background: conic-gradient(from 240deg, rgba(220, 38, 38, 0.24), rgba(37, 99, 235, 0.36), rgba(22, 163, 74, 0.28), rgba(220, 38, 38, 0.24));
  animation: driftTwo 22s ease-in-out infinite alternate;
}

.chart-line {
  position: absolute;
  height: 2px;
  width: 280px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.34), rgba(22, 163, 74, 0.22), transparent);
  transform: rotate(-12deg);
  opacity: 0.36;
}

.chart-line-one {
  top: 24vh;
  left: 8vw;
  animation: lineFloat 16s linear infinite;
}

.chart-line-two {
  right: 10vw;
  bottom: 18vh;
  animation: lineFloat 20s linear infinite reverse;
}

@keyframes driftOne {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(8vw, 5vh, 0) rotate(14deg); }
}

@keyframes driftTwo {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-7vw, 6vh, 0) rotate(-18deg); }
}

@keyframes lineFloat {
  from { transform: translateX(-12vw) rotate(-12deg); }
  to { transform: translateX(110vw) rotate(-12deg); }
}

.hero,
main,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  min-width: 0;
}

.brand span:last-child {
  overflow-wrap: anywhere;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), #0f766e);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.truth-badge,
.chip,
.status,
.priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 11px;
  white-space: nowrap;
  max-width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding: 56px 0 34px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.hero-text {
  max-width: 760px;
  margin-bottom: 22px;
  color: #39465c;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.preview-card,
.section-panel,
.metric-card,
.platform-card,
.analysis-card,
.risk-card,
.recommendation-card,
.plan-card,
.highlight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.preview-card {
  padding: 22px;
  box-shadow: var(--shadow);
  width: 100%;
  min-width: 0;
}

.preview-header,
.score-strip,
.section-heading,
.metric-top,
.platform-top,
.risk-top,
.recommendation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preview-header {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 900;
}

.live-dot {
  color: var(--green);
}

.preview-grid,
.kpi-grid,
.highlight-grid,
.platform-grid,
.analytics-grid,
.risk-grid,
.recommendation-grid,
.plan-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
}

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

.preview-grid div {
  min-height: 108px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, rgba(239, 246, 255, 0.74));
  min-width: 0;
}

.preview-grid span,
.metric-card span,
.highlight-card span,
.platform-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.preview-grid strong,
.metric-value {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1;
}

.score-strip {
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(22, 32, 51, 0.04);
  color: var(--muted);
  font-weight: 900;
}

.score-track {
  flex: 1;
  min-width: 70px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 32, 51, 0.12);
}

.score-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  transition: width 300ms ease;
}

main {
  display: grid;
  gap: 24px;
  padding: 10px 0 34px;
  min-width: 0;
}

.section-panel {
  padding: 24px;
  min-width: 0;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
}

.compact-heading {
  align-items: flex-start;
}

.campaign-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #3e4a5d;
  font-size: 0.88rem;
  font-weight: 900;
  min-width: 0;
}

.wide-field {
  grid-column: span 2;
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid rgba(30, 48, 76, 0.18);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
  min-width: 0;
}

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 16px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(23, 37, 84, 0.13);
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.secondary {
  background: var(--green);
  color: #ffffff;
}

.button.muted {
  border-color: var(--line);
  background: #ffffff;
  color: var(--slate);
}

.button.dark {
  background: var(--slate);
  color: #ffffff;
}

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

.metric-card,
.highlight-card,
.platform-card,
.analysis-card,
.risk-card,
.recommendation-card,
.plan-card {
  padding: 18px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-card {
  min-height: 138px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
}

.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.metric-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.highlight-card strong {
  display: block;
  margin: 7px 0;
  font-size: 1.2rem;
}

.highlight-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.table-scroll-hint {
  display: none;
  margin: -8px 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

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

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(30, 48, 76, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  color: #445066;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  color: #263246;
  font-size: 0.92rem;
  font-weight: 700;
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

.status.strong,
.priority.low {
  border-color: rgba(22, 163, 74, 0.22);
  background: var(--green-soft);
  color: #166534;
}

.status.needs,
.priority.medium,
.status.watch {
  border-color: rgba(202, 138, 4, 0.26);
  background: var(--yellow-soft);
  color: #854d0e;
}

.status.wasting,
.priority.high {
  border-color: rgba(220, 38, 38, 0.24);
  background: var(--red-soft);
  color: #991b1b;
}

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

.platform-card {
  background: linear-gradient(145deg, #ffffff, rgba(248, 250, 252, 0.82));
  min-width: 0;
}

.platform-top strong {
  font-size: 1.25rem;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.mini-metrics div {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.06);
  min-width: 0;
  overflow-wrap: anywhere;
}

.mini-metrics strong {
  display: block;
  margin-top: 5px;
}

.bar-row {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  min-width: 0;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 48, 76, 0.1);
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

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

.analysis-list,
.funnel-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.analysis-card {
  background: rgba(255, 255, 255, 0.72);
}

.analysis-card p,
.risk-card p,
.recommendation-card p,
.plan-card p,
.platform-card p {
  margin-bottom: 0;
  color: var(--muted);
}

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

.risk-card {
  border-left: 5px solid var(--yellow);
}

.risk-card.high-risk {
  border-left-color: var(--red);
}

.risk-card.medium-risk {
  border-left-color: var(--yellow);
}

.risk-card.low-risk {
  border-left-color: var(--green);
}

.recommendation-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
}

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

.plan-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.plan-card strong {
  color: var(--blue-dark);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed rgba(30, 48, 76, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.site-footer {
  padding: 16px 0 34px;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .hero,
  main,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .hero-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 22px;
    padding: 44px 0 30px;
  }

  .campaign-form,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-grid,
  .platform-grid,
  .risk-grid,
  .recommendation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .hero,
  main,
  .site-footer {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar,
  .section-heading,
  .preview-header,
  .score-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
    padding-top: 18px;
  }

  .brand {
    width: 100%;
  }

  .truth-badge {
    align-self: flex-start;
  }

  h1 {
    font-size: clamp(2.625rem, 9vw, 3rem);
    line-height: 1.04;
  }

  h2 {
    font-size: clamp(1.5rem, 5.5vw, 1.875rem);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 0 26px;
  }

  .hero-text {
    font-size: 1rem;
  }

  .chip-row {
    gap: 8px;
  }

  .preview-card {
    padding: 18px;
  }

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

  .preview-grid div {
    min-height: 96px;
    padding: 14px;
  }

  .preview-grid strong,
  .metric-value {
    font-size: clamp(1.625rem, 7vw, 2rem);
  }

  .score-strip {
    width: 100%;
    gap: 10px;
  }

  .score-track {
    width: 100%;
    flex-basis: auto;
  }

  main {
    gap: 18px;
    padding-top: 4px;
  }

  .section-panel {
    padding: 18px;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 16px;
  }

  .preview-grid,
  .platform-grid,
  .highlight-grid,
  .analytics-grid,
  .risk-grid,
  .recommendation-grid,
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .campaign-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wide-field {
    grid-column: auto;
  }

  input,
  select {
    min-height: 48px;
    padding: 12px;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
  }

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

  .metric-card,
  .highlight-card,
  .platform-card,
  .analysis-card,
  .risk-card,
  .recommendation-card,
  .plan-card {
    padding: 16px;
  }

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

  .risk-top,
  .recommendation-top,
  .platform-top,
  .bar-label {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .table-scroll-hint {
    display: block;
  }

  table {
    min-width: 940px;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .site-footer {
    padding-bottom: 28px;
  }
}

@media (max-width: 540px) {
  .hero,
  main,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: clamp(2rem, 9.5vw, 2.375rem);
    line-height: 1.06;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-grid {
    padding-top: 24px;
  }

  .hero-text,
  .section-heading p,
  .analysis-card p,
  .risk-card p,
  .recommendation-card p,
  .plan-card p,
  .platform-card p,
  .site-footer p {
    font-size: 0.94rem;
  }

  .section-panel,
  .preview-card {
    padding: 16px;
  }

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

  .preview-grid div {
    min-height: auto;
  }

  .kpi-grid,
  .highlight-grid,
  .mini-metrics,
  .platform-grid,
  .analytics-grid,
  .risk-grid,
  .recommendation-grid,
  .plan-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .chip-row {
    align-items: flex-start;
    flex-direction: row;
  }

  .chip,
  .truth-badge {
    width: auto;
    white-space: normal;
    text-align: center;
  }

  .truth-badge {
    width: 100%;
  }

  .metric-card {
    min-height: 126px;
  }

  .metric-value {
    font-size: 1.85rem;
  }

  .empty-state {
    padding: 18px;
    font-size: 0.94rem;
  }

  table {
    min-width: 900px;
  }
}

@media (max-width: 390px) {
  .hero,
  main,
  .site-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: clamp(1.75rem, 9vw, 2.125rem);
  }

  h2 {
    font-size: 1.35rem;
  }

  .topbar {
    padding-top: 14px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .chip-row {
    gap: 7px;
  }

  .chip {
    font-size: 0.76rem;
    padding: 6px 9px;
  }

  .section-panel,
  .preview-card,
  .metric-card,
  .highlight-card,
  .platform-card,
  .analysis-card,
  .risk-card,
  .recommendation-card,
  .plan-card {
    padding: 14px;
  }

  .preview-grid strong,
  .metric-value {
    font-size: 1.65rem;
  }

  .button {
    font-size: 0.94rem;
  }

  th,
  td {
    font-size: 0.82rem;
  }

  table {
    min-width: 860px;
  }
}

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