/* Public preview audit. v0.40.0.
 *
 * SCOPED, DELIBERATELY. Every rule below is nested under .preview-page or a .preview-* class, and
 * the landing-page block at the end is nested under .hero-preview. Nothing here can leak into the
 * admin panels or the report surfaces, which is the rule that was set after presentation CSS last
 * overrode table sizing somewhere it was never meant to reach.
 *
 * PALETTE: pine and lime accents on warm paper, from ampuh-tokens.css. No hue is introduced that
 * the rest of the product does not already use.
 *
 * THIS FILE IS LOADED BY TWO SURFACES: /preview/ and the landing page, because the landing hero
 * now carries the same entry form. One file rather than two keeps the form identical on both.
 */

.preview-page {
  margin: 0;
  background: var(--ds-bg);
  color: var(--ds-text);
  font-family: var(--ds-font-sans);
  line-height: var(--ds-leading-normal);
}

/* ---------- header and footer ---------- */

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  max-width: var(--ds-shell-max);
  margin: 0 auto;
  padding: var(--ds-space-5) var(--ds-gutter);
}

.preview-header .brand img { display: block; height: auto; max-width: 200px; }

.preview-nav { display: flex; align-items: center; gap: var(--ds-space-4); }

.preview-nav__link {
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-sm);
  font-weight: 600;
  text-decoration: none;
}

.preview-nav__link:hover { color: var(--ds-pine); }

.preview-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--ds-space-3);
  max-width: var(--ds-shell-max);
  margin: var(--ds-space-12) auto 0;
  padding: var(--ds-space-5) var(--ds-gutter);
  border-top: 1px solid var(--ds-border);
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-xs);
}

.preview-page main {
  max-width: var(--ds-shell-max);
  margin: 0 auto;
  padding: 0 var(--ds-gutter);
}

/* ---------- intro and entry form ---------- */

.preview-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--ds-space-8);
  align-items: start;
  padding: var(--ds-space-8) 0 var(--ds-space-6);
}

.preview-intro h1 {
  margin: var(--ds-space-2) 0 var(--ds-space-3);
  font-size: var(--ds-font-size-3xl);
  line-height: var(--ds-leading-tight);
  letter-spacing: -0.01em;
}

.preview-intro .lead {
  margin: 0;
  max-width: 56ch;
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-md);
}

.preview-form,
.hero-preview {
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-raised);
  box-shadow: var(--ds-shadow-md);
}

.preview-form__input { font-family: var(--ds-font-mono); }

.preview-form__submit { width: 100%; margin-top: var(--ds-space-3); }

.preview-form__note,
.hero-preview__note {
  margin: var(--ds-space-3) 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-xs);
}

.preview-flash { margin: 0 0 var(--ds-space-6); }

.preview-flash__cta { margin: var(--ds-space-2) 0 0; font-size: var(--ds-font-size-sm); }

.preview-flash__cta a { color: var(--ds-pine); font-weight: 600; }

/* ---------- result ---------- */

.preview-result {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-surface-raised);
  overflow: hidden;
}

.preview-result__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-6);
  padding: var(--ds-space-6);
  /* The ink gradient used on the report heads, not a new treatment. */
  background: linear-gradient(135deg, oklch(24% .027 151) 0%, oklch(31% .045 156) 100%);
  color: oklch(97% .012 120);
}

.preview-result__head .ds-eyebrow { color: var(--ds-lime-soft); }

.preview-result__head h2 {
  margin: var(--ds-space-1) 0 var(--ds-space-2);
  font-size: var(--ds-font-size-2xl);
  line-height: var(--ds-leading-tight);
  color: oklch(98% .008 120);
}

.preview-result__url {
  margin: 0;
  font-family: var(--ds-font-mono);
  font-size: var(--ds-font-size-xs);
  color: oklch(88% .02 130);
  overflow-wrap: anywhere;
}

.preview-result__meta {
  margin: var(--ds-space-2) 0 0;
  font-size: var(--ds-font-size-xs);
  color: oklch(84% .02 130);
}

.preview-result__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-2);
  margin: var(--ds-space-3) 0 0;
}

.preview-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 152px;
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-lg);
  background: oklch(100% 0 0 / 8%);
  border: 1px solid oklch(100% 0 0 / 16%);
}

.preview-score__value {
  font-size: var(--ds-font-size-metric);
  font-weight: 700;
  line-height: 1;
  color: oklch(99% .006 120);
}

.preview-score__of {
  font-size: var(--ds-font-size-xs);
  letter-spacing: var(--ds-tracking-label);
  text-transform: uppercase;
  color: oklch(85% .02 130);
}

.preview-score__band {
  margin-top: var(--ds-space-2);
  padding: 2px 10px;
  border-radius: var(--ds-radius-pill);
  font-size: var(--ds-font-size-xs);
  font-weight: 600;
}

.preview-score--healthy .preview-score__band { background: var(--ds-lime); color: oklch(24% .027 151); }
.preview-score--mixed .preview-score__band { background: var(--ds-warning); color: oklch(22% .03 80); }
.preview-score--attention .preview-score__band { background: var(--ds-danger); color: oklch(99% .005 25); }

.preview-tally {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

.preview-tally li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--ds-space-4);
  background: var(--ds-surface-raised);
  font-size: var(--ds-font-size-xs);
  letter-spacing: var(--ds-tracking-label);
  text-transform: uppercase;
  color: var(--ds-text-muted);
}

.preview-tally li span {
  font-size: var(--ds-font-size-xl);
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ds-text);
}

.preview-shown { padding: var(--ds-space-6) var(--ds-space-6) 0; }

.preview-shown h3 { margin: 0 0 var(--ds-space-2); font-size: var(--ds-font-size-lg); }

.preview-shown__lead { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-font-size-sm); }

.preview-healthy { padding: var(--ds-space-6); }

.preview-healthy h3 { margin: 0 0 var(--ds-space-2); font-size: var(--ds-font-size-lg); }

.preview-healthy p { margin: 0; max-width: 72ch; color: var(--ds-text-muted); }

.preview-findings {
  margin: 0;
  padding: var(--ds-space-5) var(--ds-space-6) var(--ds-space-6);
  list-style: none;
  display: grid;
  gap: var(--ds-space-4);
}

.preview-finding {
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-neutral);
  border-radius: var(--ds-radius-md);
  background: var(--ds-bg);
}

.preview-finding--danger { border-left-color: var(--ds-danger); }
.preview-finding--warning { border-left-color: var(--ds-warning); }
.preview-finding--info { border-left-color: var(--ds-info); }

.preview-finding__area {
  margin: 0;
  font-size: var(--ds-font-size-xs);
  font-weight: 600;
  letter-spacing: var(--ds-tracking-label);
  text-transform: uppercase;
  color: var(--ds-text-muted);
}

.preview-finding__title { margin: var(--ds-space-1) 0 var(--ds-space-2); font-size: var(--ds-font-size-md); }

.preview-finding__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-2);
  margin: 0 0 var(--ds-space-4);
}

.preview-finding__sev { color: var(--ds-text-muted); font-size: var(--ds-font-size-xs); }

.preview-finding__plain {
  padding: var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  background: var(--ds-pine-tint);
}

.preview-finding__reading { margin: var(--ds-space-2) 0 0; max-width: 76ch; }

.preview-finding__readingmeta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-4);
  margin: var(--ds-space-3) 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-xs);
}

.preview-finding__todo { margin-top: var(--ds-space-4); }

.preview-finding__todo p:last-child { margin: var(--ds-space-2) 0 0; max-width: 76ch; }

.preview-finding__withheld {
  margin: var(--ds-space-4) 0 0;
  padding-top: var(--ds-space-3);
  border-top: 1px dashed var(--ds-border);
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-xs);
}

/* ---------- the gate ---------- */

.preview-gate {
  padding: var(--ds-space-6);
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-sunken);
}

.preview-gate h3 { margin: 0 0 var(--ds-space-3); font-size: var(--ds-font-size-lg); }

.preview-gate__list { margin: 0; padding-left: var(--ds-space-5); display: grid; gap: var(--ds-space-2); }

.preview-gate__list li { max-width: 78ch; color: var(--ds-text-muted); }

.preview-gate__list strong { color: var(--ds-text); }

.preview-gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-3);
  margin: var(--ds-space-5) 0 0;
}

.preview-gate__note { margin: var(--ds-space-3) 0 0; color: var(--ds-text-muted); font-size: var(--ds-font-size-xs); }

/* ---------- explainer, shown before a first check ---------- */

.preview-explain { padding: var(--ds-space-6) 0 0; }

.preview-explain h2 { margin: 0 0 var(--ds-space-5); font-size: var(--ds-font-size-xl); }

.preview-explain__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--ds-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: preview-step;
}

.preview-explain__list li {
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-raised);
}

.preview-explain__list strong { display: block; margin-bottom: var(--ds-space-2); }

.preview-explain__list p { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-font-size-sm); }

/* ---------- landing hero form ---------- */

.hero-preview { margin-top: var(--ds-space-5); max-width: 520px; }

.hero-preview__label {
  display: block;
  margin-bottom: var(--ds-space-2);
  font-size: var(--ds-font-size-sm);
  font-weight: 600;
}

.hero-preview__row { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); }

.hero-preview__row .ds-input { flex: 1 1 240px; font-family: var(--ds-font-mono); }

@media (max-width: 860px) {
  .preview-intro { grid-template-columns: minmax(0, 1fr); }
  .preview-tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-score { width: 100%; }
}

/* v1.82.224. ENTERPRISE PREVIEW SURFACE. The preview is the first product conversation for a buyer:
   the page must make the evidence, the boundary of the free check, and the next paid step legible in
   one scan. The treatment is deliberately restrained: pine, lime, measured cards, no decorative noise. */
.preview-page{background:radial-gradient(900px 360px at 50% -120px,oklch(91% .035 120 / .6),transparent 72%),var(--ds-bg)}
.preview-header{width:100%;max-width:none;margin:0;padding:14px clamp(16px,4vw,64px);border-bottom:1px solid var(--ds-border);background:color-mix(in oklab,var(--ds-bg) 90%,transparent);backdrop-filter:blur(12px);position:relative;z-index:5}
.preview-header::after{content:"";position:absolute;left:clamp(16px,4vw,64px);right:clamp(16px,4vw,64px);bottom:-1px;height:2px;background:linear-gradient(90deg,var(--ds-pine),var(--ds-lime),transparent 72%);opacity:.7}
.preview-nav__link{padding:9px 12px;border-radius:999px}
.preview-nav__link:hover{background:var(--ds-pine-tint)}
.preview-page main{width:100%;max-width:none;margin:0;padding:0 clamp(16px,4vw,64px) clamp(56px,7vw,96px)}
.preview-intro{width:min(100%,1280px);margin-inline:auto;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:clamp(32px,6vw,96px);padding:clamp(56px,8vw,104px) 0 clamp(40px,5vw,72px);align-items:center}
.preview-intro__copy{min-width:0}
.preview-intro__signal{display:flex;align-items:center;gap:9px;margin-bottom:18px;color:var(--ds-pine);font:700 var(--ds-font-size-xs,.75rem)/1.3 var(--ds-font-mono,ui-monospace,monospace);letter-spacing:.1em;text-transform:uppercase}
.preview-intro__signal span{width:8px;height:8px;border-radius:50%;background:var(--ds-lime);box-shadow:0 0 0 4px var(--ds-pine-tint)}
.preview-intro h1{max-width:15ch;font-size:clamp(2.35rem,5vw,4.5rem);letter-spacing:-.045em}
.preview-intro .lead{max-width:62ch;font-size:1.05rem;line-height:1.7}
.preview-intro__proof{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:28px;padding-top:20px;border-top:1px solid var(--ds-border);color:var(--ds-text-muted);font-size:var(--ds-font-size-sm,.8125rem)}
.preview-intro__proof span{display:inline-flex;align-items:center;gap:7px}.preview-intro__proof b{color:var(--ds-pine);font:700 var(--ds-font-size-xs,.75rem)/1 var(--ds-font-mono,ui-monospace,monospace)}
.preview-form{align-self:center;padding:clamp(24px,4vw,36px);border-radius:20px;border-color:color-mix(in oklab,var(--ds-pine) 24%,var(--ds-border));box-shadow:0 24px 60px -34px rgb(14 86 49 / .42)}
.preview-form::before{content:"START WITH ONE PAGE";display:block;margin:-4px 0 22px;color:var(--ds-pine);font:700 var(--ds-font-size-xs,.75rem)/1.2 var(--ds-font-mono,ui-monospace,monospace);letter-spacing:.14em}
.preview-result,.preview-explain{width:min(100%,1280px);margin-inline:auto}
.preview-result{box-shadow:0 24px 60px -40px rgb(14 86 49 / .35)}
.preview-gate{background:linear-gradient(135deg,var(--ds-pine-tint),var(--ds-surface-sunken))}
.preview-footer{width:100%;max-width:none;margin:0;padding:0 clamp(16px,4vw,64px);border-top:0;background:var(--ds-pine);color:oklch(88% .022 130);position:relative;overflow:hidden}
.preview-footer::before{content:"";display:block;height:2px;background:linear-gradient(90deg,transparent,var(--ds-lime),transparent);opacity:.72}
.preview-footer__inner{display:grid;grid-template-columns:minmax(240px,1.5fr) repeat(2,minmax(150px,1fr));gap:32px clamp(24px,6vw,80px);width:min(100%,1280px);margin-inline:auto;padding:clamp(32px,4vw,48px) 0 18px}
.preview-footer__identity{min-width:0;max-width:44ch}.preview-footer__brand{display:block;width:fit-content;line-height:0}.preview-footer__brand img{display:block;width:210px;height:46px}.preview-footer__eyebrow,.preview-footer__title{display:block;margin-top:14px;color:var(--ds-lime);font:700 .72rem/1.3 var(--ds-font-mono,ui-monospace,monospace);letter-spacing:.14em;text-transform:uppercase}.preview-footer__identity p{margin:10px 0 0;color:oklch(78% .026 133);line-height:1.55}.preview-footer__group{display:grid;align-content:start;gap:11px}.preview-footer__title{margin:0}.preview-footer__group a{color:oklch(90% .02 130);text-decoration:none}.preview-footer__group a:hover,.preview-footer__group a:focus-visible{color:var(--ds-lime)}.preview-footer__group a:focus-visible{outline:2px solid var(--ds-lime);outline-offset:3px;border-radius:3px}.preview-footer__base{grid-column:1/-1;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 24px;padding-top:18px;border-top:1px solid oklch(83% .145 116 / .3);color:oklch(77% .028 133);font-size:.78rem;font-variant-numeric:tabular-nums}.preview-footer__base span:last-child{color:oklch(90% .02 130)}
@media(max-width:860px){.preview-intro{grid-template-columns:1fr}.preview-form{max-width:680px;width:100%}.preview-footer__inner{grid-template-columns:1.3fr 1fr 1fr}}
@media(max-width:560px){.preview-intro{padding-block:40px}.preview-intro h1{max-width:18ch}.preview-intro__proof{display:grid;gap:10px}.preview-footer__inner{grid-template-columns:1fr;gap:24px;padding-block:28px 16px}.preview-footer__base{grid-column:auto;display:grid;gap:4px}.preview-footer__brand img{width:min(210px,100%);height:auto}}
