/* Eviditor website — Option C: crisp bright white, forest green, amber-gold evidence.
 * Colors follow the real light-mode app tokens in frontend/src/styles/editorial/tokens.css.
 */

:root {
  --white: #ffffff;
  --canvas: #fafbf7;
  --sage-surface: #eff2e9;
  --tint: #e5eddb;
  --ink: #14231b;
  --forest: #23382e;
  --forest-hover: #1d3025;
  --emerald: #355742;
  --muted: #58665d;
  --subtle: #7d897f;
  --line: #e3e8dd;
  --line-strong: #cfd7c8;
  --lime: #bfe873;
  --lime-soft: #eef6de;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --font-serif: "New York", "Iowan Old Style", "Georgia", serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, monospace;

  --measure: 1160px;
  --section: clamp(56px, 6vw, 88px);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-window: 0 32px 80px rgba(20, 35, 27, 0.10), 0 4px 14px rgba(20, 35, 27, 0.04);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { margin: 0; background: var(--white); }

a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button { font: inherit; cursor: pointer; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.shell { width: min(var(--measure), calc(100% - 80px)); margin: 0 auto; }

/* ---------- Navigation ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 24px; display: block; }
.nav-links { display: flex; gap: 36px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.masthead-actions { display: flex; justify-content: flex-end; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--white); box-shadow: 0 12px 28px rgba(35, 56, 46, 0.18); }
.btn-primary:hover { background: var(--forest-hover); }
.btn-primary .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.btn-sm { padding: 9px 18px; font-size: 13px; box-shadow: none; }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--forest); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(42px, 4vw, 66px) 0 34px;
  text-align: center;
  background:
    radial-gradient(52% 38% at 50% 0%, rgba(191, 232, 115, 0.22), transparent 72%),
    linear-gradient(180deg, var(--white) 0%, var(--canvas) 100%);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px;
  margin: 0 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--emerald);
  font-size: 13px;
  font-weight: 500;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #74a75f; }
.hero h1 {
  margin: 0 auto 20px;
  font-family: var(--font-serif);
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.032em;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  color: var(--emerald);
  background: linear-gradient(transparent 64%, rgba(191, 232, 115, 0.6) 64%);
  padding: 0 6px;
}
.hero-sub {
  margin: 0 auto 22px;
  max-width: 49ch;
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
}
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-note { margin: 0 0 26px; font-size: 13px; color: var(--muted); }

/* ---------- Native product imagery ---------- */
.product-hero { max-width: 1120px; margin: 0 auto; }
.product-window {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: var(--sage-surface);
  box-shadow: var(--shadow-window);
}
.product-window img {
  display: block;
  width: 100%;
  height: auto;
}
.product-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
/* ---------- Trust strip ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.trust ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 56px;
  margin: 0;
  padding: 30px 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.trust li { display: inline-flex; align-items: center; gap: 10px; }
.trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); border: 1px solid var(--emerald); }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-soft { background: var(--canvas); }
.section-head { max-width: 640px; margin: 0 auto clamp(32px, 4vw, 56px); text-align: center; }
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
}
.section-head h2, .feature h2 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.026em;
  color: var(--ink);
}
.section-head p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--muted); }

/* ---------- Features ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(56px, 8vw, 112px);
}
.feature + .feature { margin-top: clamp(64px, 7vw, 104px); }
.feature.flip .feature-copy { order: 2; }
.feature-copy p { margin: 0 0 28px; max-width: 30ch; font-size: 19px; line-height: 1.55; color: var(--muted); }
.points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--ink); }
.points li { display: flex; gap: 12px; align-items: baseline; }
.points li::before { content: ""; flex: 0 0 14px; height: 2px; background: var(--lime); transform: translateY(-4px); }

.chief-editor-example { min-width: 0; margin: 0; }

.feature.review-feature {
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 4.5vw, 64px);
}
.review-copy p { max-width: 36ch; margin-bottom: 22px; font-size: 17px; }
.review-steps {
  display: grid;
  gap: 5px;
}
.review-steps a {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink);
}
.review-steps a:hover {
  background: var(--canvas);
  text-decoration: none;
}
.review-steps a[aria-selected="true"] {
  border-color: var(--line-strong);
  background: var(--sage-surface);
}
.review-step-number {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.review-steps a[aria-selected="true"] .review-step-number { background: var(--forest); color: var(--white); }
.review-steps strong { display: block; font-size: 15px; line-height: 1.4; }
.review-steps small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.review-autoplay {
  margin: 10px 0 0 10px;
  padding: 4px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 650;
}
.review-autoplay:hover { text-decoration: underline; text-underline-offset: 3px; }
.review-autoplay span {
  display: inline-block;
  min-width: 32px;
  margin-inline-start: 4px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
}
.review-autoplay[aria-pressed="true"] span {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}
.review-stage { min-width: 0; }
.review-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 14px;
  background: var(--sage-surface);
  box-shadow: 0 12px 32px rgba(20, 35, 27, 0.08);
}
.review-media + .review-media:not([role="tabpanel"]) { margin-top: 12px; }
.review-media[data-review-fade]:not([hidden]) { animation: review-stage-in 150ms ease-out; }
@keyframes review-stage-in {
  from { opacity: 0.84; }
  to { opacity: 1; }
}
.review-media img { display: block; width: 100%; height: 100%; }
.review-media .review-motion { position: absolute; inset: 0; }
.review-cues {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.review-action-cue {
  position: absolute;
  border: 2px solid #9d5414;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88);
  opacity: 0;
  animation: review-action-focus var(--cue-length) ease-out var(--cue-delay) both;
}
@keyframes review-action-focus {
  12%, 75% { opacity: 1; }
  0%, 100% { opacity: 0; }
}
.review-sample-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ownership-map { margin: 0; border-top: 1px solid var(--line-strong); }
.ownership-map div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-strong);
}
.ownership-map dt { color: var(--ink); font-size: 15px; font-weight: 650; }
.ownership-map dd { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- How it works ---------- */
.workflow-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  max-width: none;
  margin: 0 0 28px;
  text-align: left;
}
.workflow-head h2 { margin: 0; }
.workflow-head p { font-size: 16px; }
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line-strong);
  list-style: none;
}
.workflow-step {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: clamp(16px, 2vw, 24px);
}
.workflow-step + .workflow-step { border-inline-start: 1px solid var(--line-strong); }
.workflow-step h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 650;
}
.workflow-index {
  display: grid;
  flex: 0 0 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--tint);
  color: var(--forest);
  font-size: 13px;
}
.workflow-step > p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.workflow-evidence {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 136px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.workflow-evidence figcaption, .workflow-finding dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}
.workflow-sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.workflow-sample strong {
  color: var(--forest);
  font: 400 50px/1 var(--font-serif);
}
.workflow-finding { background: var(--sage-surface); }
.workflow-finding dd { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.workflow-finding del { text-decoration-color: #9f5139; }
.workflow-output {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.workflow-output img { display: block; width: 100%; height: auto; }
.workflow-output figcaption { font-weight: 400; }
.workflow-output strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 15px; }
.workflow-link {
  align-self: start;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 40px 34px 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.plan.featured { border: 2px solid var(--forest); box-shadow: 0 24px 60px rgba(35, 56, 46, 0.12); }
.plan-tag {
  align-self: flex-start;
  margin-bottom: 22px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.plan.featured .plan-tag { background: var(--lime-soft); border-color: #cfe3a8; color: var(--forest); }
.plan h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; color: var(--ink); }
.price { margin: 0 0 6px; font-family: var(--font-serif); font-size: 48px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.price small { font-family: var(--font-sans); font-size: 15px; color: var(--subtle); }
.price s { font-family: var(--font-sans); font-size: 16px; color: var(--subtle); margin-left: 6px; }
.plan-sub { margin: 0 0 28px; font-size: 14px; color: var(--muted); }
.plan ul { margin: 0 0 32px; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; color: var(--ink); }
.plan li::before { content: "✓"; margin-right: 10px; color: var(--emerald); font-weight: 700; }
.plan .btn { margin-top: auto; }
.plans-note { margin: 36px auto 0; max-width: 60ch; text-align: center; font-size: 13.5px; color: var(--subtle); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 4px;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 12px;
  height: 12px;
  background:
    linear-gradient(var(--emerald), var(--emerald)) center / 12px 2px no-repeat,
    linear-gradient(var(--emerald), var(--emerald)) center / 2px 12px no-repeat;
  transition: transform 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 4px 28px; max-width: 60ch; font-size: 16px; line-height: 1.65; color: var(--muted); }
.faq-more { margin: 28px 0 0; text-align: center; font-size: 15px; color: var(--muted); }

/* ---------- Closing ---------- */
.closing { padding: 0 0 var(--section); }
.closing-card {
  padding: clamp(48px, 6vw, 80px) 40px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(191, 232, 115, 0.28), transparent 70%),
    var(--sage-surface);
  border: 1px solid var(--line);
}
.closing-card h2 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.026em;
  color: var(--ink);
}
.closing-card p { margin: 0 0 36px; font-size: 18px; color: var(--muted); }
.closing-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 13.5px; color: var(--subtle); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; }
.footer-links a { color: var(--muted); }
.footer-sample { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.footer-copy { margin: 20px 0 0; font-size: 12.5px; color: var(--subtle); }
.footer-beian { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 20px; font-size: 12.5px; }
.footer-beian a { color: var(--subtle); }

/* ---------- Coming soon dialog ---------- */
.coming-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 40px 100px rgba(20, 35, 27, 0.22);
}
.coming-dialog::backdrop { background: rgba(20, 35, 27, 0.4); backdrop-filter: blur(4px); }
.dialog-body { padding: 40px 40px 34px; text-align: center; }
.dialog-mark { width: 52px; height: 44px; margin: 0 auto 22px; display: block; }
.dialog-title { margin: 0 0 12px; font-family: var(--font-serif); font-size: 30px; font-weight: 400; line-height: 1.15; color: var(--ink); }
.dialog-copy { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.dialog-actions { display: flex; flex-direction: column; gap: 10px; }
.dialog-email { margin: 18px 0 0; font-size: 13px; color: var(--subtle); }

/* ---------- Legal and support pages ---------- */
.masthead-simple .masthead-inner { grid-template-columns: 1fr auto; }
.doc-page { padding: 96px 0 140px; }
.doc-prose { max-width: 680px; }
.doc-prose h1 { margin: 0 0 20px; font-family: var(--font-serif); font-size: clamp(36px, 4vw, 48px); font-weight: 400; color: var(--ink); }
.doc-prose h2 { margin: 48px 0 12px; font-size: 19px; font-weight: 600; color: var(--ink); }
.doc-prose p, .doc-prose li { font-size: 16px; line-height: 1.75; color: var(--muted); }
.btn-link { color: var(--emerald); font-size: 14px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .review-media[data-review-fade]:not([hidden]) { animation: none; }
  .review-cues { display: none; }
}

/* ---------- Narrow viewports ---------- */
@media (max-width: 900px) {
  .shell { width: min(var(--measure), calc(100% - 48px)); }
  .masthead-inner { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-copy { order: 0; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .feature.review-feature { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-step + .workflow-step { border-inline-start: 0; border-block-start: 1px solid var(--line-strong); }
}
@media (min-width: 521px) and (max-width: 720px) {
  .workflow-step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title evidence" "description evidence" "link evidence";
    gap: 8px 16px;
  }
  .workflow-step h3 { grid-area: title; }
  .workflow-step > p { grid-area: description; }
  .workflow-evidence { grid-area: evidence; }
  .workflow-link { grid-area: link; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero-sub { font-size: 18px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 12px 17px; }
  .hero-note { margin-bottom: 32px; }
  .product-window img { aspect-ratio: 1360 / 968; }
  .ownership-map div { gap: 8px 14px; }
}
