:root {
  --bg: #dde7f1;
  --bg-deep: #cedbe8;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-soft: #fbfdff;
  --surface-tint: #eef5ff;
  --border: rgba(124, 143, 168, 0.28);
  --border-strong: rgba(96, 118, 146, 0.38);
  --text: #102033;
  --muted: #607287;
  --muted-soft: #8191a4;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --ai: #b74d44;
  --ai-soft: rgba(183, 77, 68, 0.1);
  --human: #1c7a62;
  --human-soft: rgba(28, 122, 98, 0.1);
  --neutral: #6f7f92;
  --neutral-soft: rgba(111, 127, 146, 0.12);
  --shadow: 0 26px 60px rgba(20, 34, 58, 0.12);
  --shadow-soft: 0 12px 28px rgba(20, 34, 58, 0.08);
  --meter: linear-gradient(90deg, #1c7a62 0%, #e0a237 52%, #b74d44 100%);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(28, 122, 98, 0.16), transparent 26%),
    linear-gradient(180deg, #e7eef7 0%, var(--bg) 42%, #d0dcea 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 75%);
}

.page-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

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

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-mark,
.topbar-chip,
.info-chip,
.panel-label,
.hero-badge,
.result-badge {
  letter-spacing: 0.01em;
}

.brand-mark {
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.94);
  color: #f7fbff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.topbar-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.68fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.hero-panel,
.card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy,
.hero-panel {
  border-radius: var(--radius-xl);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 28px 30px 24px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -24px;
  top: -38px;
  border-radius: 36px;
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.13), rgba(28, 122, 98, 0.18));
  transform: rotate(14deg);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
.hero-score,
.metric-value {
  font-family: "Fraunces", serif;
}

h1 {
  max-width: 100%;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-text,
.section-heading p,
.hero-summary,
.result-explanation,
.input-hint,
.fetch-meta,
.meter-head,
.signal-list,
.notes-list,
.metric-copy,
.mini-stats span,
.brand-copy {
  color: var(--muted);
}

.hero-text {
  max-width: 58ch;
  margin: 14px 0 0;
  font-size: 0.96rem;
  line-height: 1.62;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.info-chip {
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: #26435f;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 24px 24px 22px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.panel-label {
  margin: 0 0 16px;
  color: var(--muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-badge,
.result-badge {
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-badge.ai,
.result-badge.ai {
  background: var(--ai-soft);
  color: var(--ai);
}

.hero-badge.human,
.result-badge.human {
  background: var(--human-soft);
  color: var(--human);
}

.hero-badge.neutral,
.result-badge.neutral,
.meter-fill.neutral {
  background: var(--neutral-soft);
  color: var(--neutral);
}

.hero-score {
  margin: 0;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1;
}

.hero-summary {
  margin: 14px 0 0;
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.58;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas:
    "input result"
    "input metrics"
    "notes notes";
  gap: 18px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 28px;
}

.input-card {
  grid-area: input;
}

.result-card {
  grid-area: result;
}

.metrics-card {
  grid-area: metrics;
}

.notes-card {
  grid-area: notes;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  line-height: 1.58;
}

.url-import,
.video-import {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(235, 243, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.url-import label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.93rem;
  font-weight: 800;
}

.video-import {
  display: grid;
  gap: 14px;
}

.file-drop {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 18px;
  border: 1px dashed rgba(37, 99, 235, 0.36);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.file-drop:hover {
  border-color: rgba(37, 99, 235, 0.58);
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.file-drop-copy {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.video-preview {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(124, 143, 168, 0.28);
  border-radius: 18px;
  background: #101826;
  box-shadow: var(--shadow-soft);
}

.link-note {
  background: rgba(255, 255, 255, 0.78);
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

textarea,
input[type="url"] {
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

textarea::placeholder,
input[type="url"]::placeholder {
  color: #8ca0b5;
}

textarea {
  min-height: 340px;
  resize: vertical;
  padding: 20px;
  border-radius: 22px;
  line-height: 1.72;
}

input[type="url"] {
  padding: 14px 16px;
  border-radius: 16px;
}

textarea:focus,
input[type="url"]:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.input-hint,
.fetch-meta {
  margin: 10px 0 0;
  font-size: 0.9rem;
  line-height: 1.58;
}

.fetch-status {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
}

.fetch-status.neutral {
  background: rgba(111, 127, 146, 0.08);
  border-color: rgba(111, 127, 146, 0.14);
  color: var(--neutral);
}

.fetch-status.loading {
  background: rgba(224, 162, 55, 0.12);
  border-color: rgba(224, 162, 55, 0.2);
  color: #9d6612;
}

.fetch-status.success {
  background: var(--human-soft);
  border-color: rgba(28, 122, 98, 0.18);
  color: var(--human);
}

.fetch-status.error {
  background: var(--ai-soft);
  border-color: rgba(183, 77, 68, 0.18);
  color: var(--ai);
}

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

button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

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

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.primary-btn {
  background: linear-gradient(135deg, #102033 0%, #214467 100%);
  color: #f6fbff;
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.16);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border-color: var(--border);
}

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

.stat-pill,
.metric-card,
.insight-box {
  background: var(--surface-soft);
  border: 1px solid rgba(124, 143, 168, 0.22);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.stat-pill {
  padding: 16px;
}

.stat-pill span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.stat-pill strong {
  font-size: 1.42rem;
  letter-spacing: -0.03em;
}

.meter-block {
  padding: 18px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 250, 254, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(124, 143, 168, 0.24);
  box-shadow: var(--shadow-soft);
}

.meter-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.meter-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(130, 148, 170, 0.16);
}

.meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--meter);
  transition: width 360ms ease;
}

.meter-fill.ai {
  background: linear-gradient(90deg, #e0a237 0%, #b74d44 100%);
}

.meter-fill.human {
  background: linear-gradient(90deg, #8bd1b9 0%, #1c7a62 100%);
}

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

.result-explanation {
  margin: 0;
  line-height: 1.72;
}

.insight-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.frame-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 58px;
  margin-top: 18px;
}

.frame-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(124, 143, 168, 0.25);
  border-radius: 10px;
  background: #101826;
}

.analysis-canvas {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.insight-box {
  padding: 18px;
}

.insight-box h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.signal-list,
.notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-list li,
.notes-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.7;
}

.signal-list li + li,
.notes-list li + li {
  margin-top: 10px;
}

.signal-list li::before,
.notes-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.32);
}

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

.metric-card {
  padding: 16px;
}

.metric-card h3 {
  margin-bottom: 10px;
  font-size: 0.93rem;
  letter-spacing: -0.01em;
}

.metric-value {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1;
}

.metric-copy {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.56;
}

.notes-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(246, 250, 255, 0.96) 100%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1080px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "input"
      "result"
      "metrics"
      "notes";
  }

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

}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
    padding-bottom: 28px;
  }

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

  .hero-copy,
  .hero-panel,
  .card {
    padding: 22px;
    border-radius: 24px;
  }

  .url-row,
  .mini-stats,
  .insight-columns,
  .metrics-grid,
  .notes-list {
    grid-template-columns: 1fr;
  }

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

  textarea {
    min-height: 260px;
  }

  .hero-score {
    font-size: 2.3rem;
  }
}
