:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #171b1f;
  --muted: #5f6b76;
  --panel: #ffffff;
  --panel-strong: #eef6f6;
  --border: #d6dee6;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #d9f2ed;
  --amber: #b7791f;
  --amber-soft: #fff1ce;
  --danger: #b83232;
  --danger-soft: #ffe1df;
  --real: #26734d;
  --real-soft: #ddf3e7;
  --shadow: 0 18px 48px rgba(19, 32, 42, 0.10);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(184, 50, 50, 0.06), transparent 42%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-brand,
.site-nav a,
.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: 15px;
  font-weight: 850;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

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

.site-nav a,
.site-footer a {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a:hover,
.site-footer a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-strong);
}

.language-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.language-field select {
  min-width: 112px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  outline: 0;
}

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

.workspace {
  padding: 10px 0 0;
}

.hero-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-intro > div,
.section-copy,
.feature-card,
.steps li,
.faq-list details {
  min-width: 0;
}

.hero-intro > div:first-child {
  flex: 1 1 auto;
}

.brand,
.section-label {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.7;
}

.hero-lede,
.drop-copy,
.summary,
.section-copy p,
.feature-card p,
.faq-list p,
.trust-list li,
h1,
h2,
h3,
summary {
  overflow-wrap: anywhere;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
}

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

h1 {
  max-width: 720px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.04;
}

.privacy-lock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.privacy-lock svg {
  width: 18px;
  height: 18px;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.96fr) minmax(340px, 1fr);
  gap: 18px;
  min-width: 0;
}

.upload-panel,
.result-panel,
.detail-block {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(19, 32, 42, 0.06);
}

.upload-panel {
  padding: 14px;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 248px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #aaa08f;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0.02)),
    var(--panel-strong);
  cursor: pointer;
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0.04)),
    var(--panel-strong);
  outline: none;
  transform: translateY(-1px);
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
}

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

.drop-title {
  display: block;
  font-size: 22px;
  font-weight: 750;
}

.drop-copy {
  display: block;
  max-width: 320px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.preview {
  margin-top: 14px;
}

.preview-frame {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 250px;
  aspect-ratio: 4 / 3;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #eee8dd;
}

.preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview.is-empty img {
  display: none;
}

.preview-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.preview:not(.is-empty) .preview-empty {
  display: none;
}

.file-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.file-name,
.file-meta {
  margin: 0;
}

.file-name {
  max-width: 340px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.icon-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.icon-btn {
  flex: 0 0 auto;
  width: 40px;
  background: #edf2f6;
  color: var(--ink);
}

.icon-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.icon-btn:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.primary-btn {
  padding: 0 14px;
  background: var(--ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
}

.result-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 18px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.score-pill {
  display: inline-grid;
  min-width: 64px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: #edf2f6;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.score-pill.ai {
  background: var(--danger-soft);
  color: var(--danger);
}

.score-pill.real {
  background: var(--real-soft);
  color: var(--real);
}

.score-pill.uncertain {
  background: var(--amber-soft);
  color: var(--amber);
}

.meter {
  overflow: hidden;
  height: 10px;
  margin: 18px 0;
  border-radius: 999px;
  background: #e4eaf0;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--muted);
  transition: width 240ms ease, background 240ms ease;
}

.meter.ai span {
  background: linear-gradient(90deg, #f9735b, var(--danger));
}

.meter.real span {
  background: linear-gradient(90deg, #50b878, var(--real));
}

.meter.uncertain span {
  background: linear-gradient(90deg, #f4c15d, var(--amber));
}

.summary {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.actions {
  display: flex;
  margin: 18px 0;
}

.signals {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.signal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
}

.signal strong {
  display: block;
  font-size: 14px;
}

.signal span {
  color: var(--muted);
  font-size: 12px;
}

.impact {
  font-size: 13px;
  font-weight: 800;
}

.impact.ai {
  color: var(--danger);
}

.impact.real {
  color: var(--real);
}

.impact.neutral {
  color: var(--muted);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
  min-width: 0;
}

.detail-block {
  overflow: hidden;
}

.detail-block summary {
  min-height: 46px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.evidence-list {
  margin: 0;
  padding: 14px 18px 16px 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.evidence-list li + li {
  margin-top: 8px;
}

pre {
  max-height: 310px;
  margin: 0;
  overflow: auto;
  padding: 14px 16px 16px;
  color: #2d2b26;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.content-section {
  margin-top: 42px;
  padding: 30px 0 0;
  border-top: 1px solid var(--border);
}

.content-section h2 {
  max-width: 760px;
  font-size: clamp(28px, 3vw, 40px);
}

.section-copy p:not(.brand) {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.feature-card {
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.feature-card h3 {
  margin: 0;
  font-size: 18px;
}

.feature-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.content-split {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: start;
}

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

.steps li {
  display: grid;
  gap: 4px;
  min-height: 70px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.steps strong {
  font-size: 15px;
}

.steps span {
  color: var(--muted);
  font-size: 14px;
}

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.faq-list summary {
  min-height: 54px;
  padding: 15px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.faq-list p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
}

.site-footer strong {
  display: block;
  font-size: 15px;
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

noscript {
  display: block;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 12px 14px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: var(--ink);
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header,
  .hero-intro,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .hero-intro > div {
    width: 100%;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .app-grid,
  .details-grid,
  .feature-grid,
  .content-split,
  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 34px;
  }

  h1 {
    font-size: 40px;
  }

  .dropzone {
    min-height: 220px;
  }

  .file-name {
    max-width: 210px;
  }
}

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