:root {
  --ink: #10201c;
  --ink-soft: #38524a;
  --paper: #f5efe3;
  --paper-strong: #fffaf0;
  --moss: #19372f;
  --moss-2: #245547;
  --copper: #c97944;
  --gold: #e9b85f;
  --foam: #dce8cf;
  --line: rgba(16, 32, 28, 0.14);
  --glass: rgba(255, 250, 240, 0.78);
  --shadow: 0 28px 80px rgba(16, 32, 28, 0.22);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(233, 184, 95, 0.32), transparent 28rem),
    radial-gradient(circle at 88% 5%, rgba(76, 120, 99, 0.26), transparent 30rem),
    linear-gradient(135deg, #efe3cf 0%, #f8f2e5 44%, #dbe5d0 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(16, 32, 28, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 28, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

body::after {
  position: fixed;
  inset: auto -10rem -20rem auto;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  content: "";
  background: rgba(25, 55, 47, 0.15);
  filter: blur(10px);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 12px 40px rgba(16, 32, 28, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper-strong);
  font-weight: 800;
  background: linear-gradient(135deg, var(--moss), var(--copper));
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(25, 55, 47, 0.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy {
  min-height: 520px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.82), rgba(245, 239, 227, 0.52)),
    url("data:image/svg+xml,%3Csvg width='240' height='240' viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%2310201c' stroke-opacity='.10'%3E%3Cpath d='M24 160c32-18 64-18 96 0s64 18 96 0'/%3E%3Cpath d='M24 120c32-18 64-18 96 0s64 18 96 0'/%3E%3Cpath d='M24 80c32-18 64-18 96 0s64 18 96 0'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: var(--shadow);
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 820px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(3.1rem, 8vw, 7.8rem);
  font-weight: 650;
  line-height: 0.86;
}

h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: 650;
  line-height: 0.95;
}

.hero-lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.26rem);
  line-height: 1.75;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

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

.button.primary {
  color: var(--paper-strong);
  background: var(--moss);
  box-shadow: 0 12px 28px rgba(25, 55, 47, 0.26);
}

.button.primary.alt {
  background: linear-gradient(135deg, var(--copper), #8a4b2d);
}

.button.ghost {
  color: var(--moss);
  background: rgba(255, 250, 240, 0.68);
  box-shadow: inset 0 0 0 1px rgba(25, 55, 47, 0.16);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 28px;
  border-radius: 42px;
  color: var(--paper-strong);
  background:
    linear-gradient(160deg, rgba(16, 32, 28, 0.1), rgba(16, 32, 28, 0.76)),
    linear-gradient(135deg, #16352d, #10201c 52%, #7d4b2d);
  box-shadow: var(--shadow);
}

.hero-card::before,
.hero-card::after {
  position: absolute;
  content: "";
}

.hero-card::before {
  inset: 86px 30px auto auto;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 36% 64% 48% 52%;
  transform: rotate(-12deg);
}

.hero-card::after {
  inset: auto -40px -60px auto;
  width: 19rem;
  height: 19rem;
  border-radius: 50%;
  background: rgba(233, 184, 95, 0.18);
  filter: blur(2px);
}

.card-topline,
.mini-stats,
.score-orbit {
  position: relative;
  z-index: 1;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255, 250, 240, 0.74);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pulse-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: #8ff0b2;
  box-shadow: 0 0 0 0 rgba(143, 240, 178, 0.7);
  animation: pulse 1.8s infinite;
}

.score-orbit {
  display: grid;
  min-height: 310px;
  place-items: center;
  margin: 34px 0;
  text-align: center;
}

.score-orbit strong {
  font-size: clamp(4.5rem, 8vw, 7.1rem);
  line-height: 0.8;
}

.score-orbit small {
  display: block;
  grid-row: 2;
  margin-top: -44px;
  color: rgba(255, 250, 240, 0.72);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.orbit-ring {
  position: absolute;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 250, 240, 0.25);
  border-radius: 44% 56% 51% 49%;
  animation: rotateSlow 16s linear infinite;
}

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

.mini-stats div {
  padding: 16px;
  border: 1px solid rgba(255, 250, 240, 0.13);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.08);
}

.mini-stats dt {
  color: rgba(255, 250, 240, 0.56);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mini-stats dd {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 800;
}

.workspace-grid,
.analysis-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.workspace-grid {
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
}

.analysis-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.98fr) minmax(280px, 0.78fr);
}

.panel,
.footnote-panel {
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 32px;
  background: var(--glass);
  box-shadow: 0 20px 54px rgba(16, 32, 28, 0.1);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 24px;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.panel-heading.compact {
  margin-bottom: 18px;
}

.mode-toggle {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.mode-toggle label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  background: rgba(255, 250, 240, 0.48);
  font-weight: 800;
}

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

.drop-zone {
  display: grid;
  min-height: 230px;
  place-items: center;
  padding: 26px;
  border: 1.5px dashed rgba(25, 55, 47, 0.34);
  border-radius: 28px;
  cursor: pointer;
  text-align: center;
  background:
    radial-gradient(circle at 50% 15%, rgba(233, 184, 95, 0.22), transparent 10rem),
    rgba(245, 239, 227, 0.52);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--copper);
  background:
    radial-gradient(circle at 50% 15%, rgba(233, 184, 95, 0.34), transparent 12rem),
    rgba(255, 250, 240, 0.75);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-icon {
  width: 74px;
  height: 74px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(25, 55, 47, 0.9), rgba(201, 121, 68, 0.86)),
    url("data:image/svg+xml,%3Csvg width='74' height='74' viewBox='0 0 74 74' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M37 48V24m0 0-10 10m10-10 10 10' stroke='white' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20 52h34' stroke='white' stroke-opacity='.75' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  box-shadow: 0 18px 34px rgba(25, 55, 47, 0.22);
}

.drop-zone strong,
.drop-zone small {
  display: block;
}

.drop-zone strong {
  margin-top: 16px;
  font-size: 1.08rem;
}

.drop-zone small {
  margin-top: 8px;
  color: var(--ink-soft);
}

.upload-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.preview-frame {
  position: relative;
  overflow: hidden;
  min-height: 424px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(16, 32, 28, 0.08), rgba(201, 121, 68, 0.12)),
    #e7ddca;
}

.preview-frame > img {
  width: 100%;
  height: 100%;
  min-height: 424px;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02);
}

.preview-frame.is-pair {
  padding: 14px;
}

.pair-preview {
  display: grid;
  min-height: 424px;
  grid-template-columns: minmax(190px, 0.74fr) minmax(280px, 1.26fr);
  gap: 14px;
}

.pair-preview figure {
  position: relative;
  overflow: hidden;
  min-height: 424px;
  margin: 0;
  border-radius: 22px;
  background: rgba(16, 32, 28, 0.1);
}

.pair-preview img {
  width: 100%;
  height: 100%;
  min-height: 424px;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.03);
}

.pair-preview figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 250, 240, 0.42);
  border-radius: 999px;
  color: var(--paper-strong);
  background: rgba(16, 32, 28, 0.72);
  box-shadow: 0 10px 24px rgba(16, 32, 28, 0.22);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.empty-preview span {
  width: 220px;
  height: 220px;
  border: 1px solid rgba(25, 55, 47, 0.12);
  border-radius: 42% 58% 52% 48%;
  background: rgba(255, 250, 240, 0.4);
  animation: rotateSlow 18s linear infinite;
}

.empty-preview p {
  max-width: 330px;
  margin: -110px auto 0;
  color: var(--ink-soft);
  font-weight: 800;
  line-height: 1.55;
}

.hotspot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 250, 240, 0.5);
  border-radius: 999px;
  color: var(--paper-strong);
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(16, 32, 28, 0.72);
  box-shadow: 0 12px 28px rgba(16, 32, 28, 0.26);
  backdrop-filter: blur(12px);
}

.hotspot span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.hotspot-one {
  top: 28%;
  left: 10%;
}

.hotspot-two {
  right: 10%;
  bottom: 22%;
}

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(25, 55, 47, 0.08);
  font-size: 0.86rem;
  font-weight: 800;
}

.status-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a0a99e;
}

.result-status.is-running .status-light {
  background: var(--gold);
  animation: pulse 1.4s infinite;
}

.result-status.is-complete .status-light {
  background: #2f9462;
}

.result-score {
  margin-top: 28px;
}

.result-score > div:first-child {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.result-score span,
.decision-row span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-score strong {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.82;
}

.score-bar {
  overflow: hidden;
  height: 13px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(16, 32, 28, 0.12);
}

.score-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #88b376, var(--gold), var(--copper));
  transition: width 700ms ease;
}

.decision-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.decision-row div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.48);
}

.decision-row strong {
  display: block;
  margin-top: 9px;
  font-size: 1.05rem;
}

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

.evidence-list li {
  position: relative;
  padding: 14px 14px 14px 42px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.48);
  color: var(--ink-soft);
  line-height: 1.5;
}

.evidence-list li::before {
  position: absolute;
  top: 17px;
  left: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  content: "";
  background: var(--copper);
  box-shadow: 0 0 0 5px rgba(201, 121, 68, 0.12);
}

.metric-list {
  display: grid;
  gap: 14px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.metric-row span {
  color: var(--ink-soft);
  font-weight: 800;
}

.metric-row strong {
  font-variant-numeric: tabular-nums;
}

.metric-row i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(16, 32, 28, 0.1);
}

.metric-row i::before {
  display: block;
  width: var(--metric-width, 0%);
  height: 100%;
  border-radius: inherit;
  content: "";
  background: linear-gradient(90deg, var(--moss-2), var(--gold));
  transition: width 650ms ease;
}

.footnote-panel {
  margin-top: 18px;
  padding: 20px 24px;
}

.footnote-panel strong {
  display: block;
  margin-bottom: 8px;
}

.footnote-panel p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 8px;
  color: var(--moss);
  background: rgba(25, 55, 47, 0.08);
  font-size: 0.92em;
}

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

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(143, 240, 178, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(143, 240, 178, 0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .workspace-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card {
    min-height: auto;
  }

  .preview-frame,
  .preview-frame > img,
  .pair-preview,
  .pair-preview figure,
  .pair-preview img {
    min-height: 340px;
  }

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

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .site-header {
    position: static;
    align-items: flex-start;
    border-radius: 26px;
  }

  .nav-links {
    display: none;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .footnote-panel {
    border-radius: 26px;
  }

  .hero-actions,
  .upload-meta,
  .decision-row,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .decision-row,
  .mini-stats {
    display: grid;
  }
}
