/* Free .DDD check: the dropzone and the result card on the 22 DDD viewer
   pages (assets/preview.js renders it; the copy is assets/preview-text/<dir>.json).
   The look follows the accepted mock (FREE_PREVIEW_2026-10-14/mock): the
   ground box, the dashed dropzone, the dark card head, four tiles, two chips,
   the top-3 rows with severity pills and the fine estimate, the green CTA box,
   the amber lock. Every class is pv-prefixed; the palette is styles.css's. */
.pv-section {
  --pv-ground: #ecf8f0;
  --pv-ok: #065f46;
  --pv-warn: #b45309;
  --pv-warnbg: #fef3c7;
  --pv-danger: #b91c1c;
  --pv-dangerbg: #fee2e2;
  --pv-amber: #fde68a;
  --pv-line: #e2e8f0;
  --pv-muted: #64748b;
  padding: 56px 0 64px;
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.pv-section [data-preview-mount]:empty { min-height: 470px; }
.pv-box {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid #d1fae5;
  border-radius: 18px;
  background: var(--pv-ground);
}
.pv-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: break-word; }
.pv-sub { margin: 0 0 18px; color: #334155; font-size: 15px; line-height: 1.6; }

/* The dropzone */
.pv-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px 26px;
  border: 2px dashed #86efac;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pv-drop.is-over { border-color: var(--green); background: #f0fdf4; }
.pv-drop.is-disabled { cursor: default; opacity: .75; }
.pv-drop.is-disabled .pv-button { pointer-events: none; background: #94a3b8; box-shadow: none; }
.pv-drop-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green);
}
.pv-drop-title { display: block; font-size: 17px; line-height: 1.35; }
.pv-drop-hint { display: block; margin-top: 4px; color: var(--pv-muted); font-size: 13px; line-height: 1.5; }
/* Visually hidden, never display:none: the label opens the native picker on
   Android Chrome and iOS Safari. */
.pv-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }
.pv-input:focus-visible + .pv-button { outline: 3px solid #86efac; outline-offset: 3px; }
.pv-button { min-height: 48px; margin-top: 16px; padding: 13px 22px; font-size: 15px; cursor: pointer; }
.is-busy .pv-button { pointer-events: none; opacity: .7; }
.pv-file { display: block; max-width: 100%; margin-top: 10px; color: var(--ink); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.pv-turnstile { min-height: 0; margin-top: 12px; }
.pv-turnstile:empty { margin-top: 0; }
.pv-turnstile-note { display: block; margin-top: 8px; color: var(--pv-muted); font-size: 12px; line-height: 1.5; }
.pv-status { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #fff; color: #334155; font-size: 14px; line-height: 1.5; text-align: center; }
.pv-status[data-tone="error"] { background: var(--pv-dangerbg); color: var(--pv-danger); font-weight: 600; }
.is-busy .pv-status::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid #86efac; border-top-color: var(--green); border-radius: 50%; animation: pv-spin .8s linear infinite; }
@keyframes pv-spin { to { transform: rotate(360deg); } }
.pv-privacy { margin: 12px 0 0; color: var(--pv-muted); font-size: 12px; line-height: 1.55; text-align: center; }

/* The result card */
.pv-result { scroll-margin-top: 96px; }
.pv-card {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--pv-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(10, 56, 29, .08);
}
.pv-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 34px; padding: 18px 24px; background: var(--dark); color: #fff; }
.pv-who { min-width: 0; }
.pv-who b { display: block; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.pv-who span { color: #bbf7d0; font-size: 13px; overflow-wrap: anywhere; }
.pv-kv { color: #bbf7d0; font-size: 13px; }
.pv-kv b { display: block; color: #fff; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pv-sect { padding: 16px 24px 6px; font-size: 15px; font-weight: 800; line-height: 1.4; }
.pv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px 24px 6px; }
.pv-tile { min-width: 0; padding: 12px 14px; border-radius: 12px; background: var(--pv-ground); }
.pv-tile small { display: block; color: var(--pv-muted); font-size: 12px; line-height: 1.35; }
.pv-tile b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-tile-driving b, .pv-tile-rest b { color: var(--pv-ok); }
.pv-tile-work b { color: #1d4ed8; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 24px 4px; }
.pv-chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pv-chip-confirmed { background: var(--pv-dangerbg); color: var(--pv-danger); }
.pv-chip-potential { background: var(--pv-warnbg); color: var(--pv-warn); }
.pv-inf { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 24px; border-top: 1px solid var(--pv-line); }
.pv-sect + .pv-inf { border-top: 0; }
.pv-inf-date { padding-top: 3px; color: var(--pv-muted); font-size: 13px; }
.pv-inf-text p { margin: 0; font-size: 14px; line-height: 1.45; overflow-wrap: break-word; }
.pv-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pv-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.5; }
.pv-pill-most_serious { background: #7f1d1d; color: #fff; }
.pv-pill-very_serious { background: var(--pv-dangerbg); color: var(--pv-danger); }
.pv-pill-serious { background: var(--pv-warnbg); color: var(--pv-warn); }
.pv-pill-minor { background: #e0f2fe; color: #075985; }
.pv-pill-none { background: #f1f5f9; color: #475569; }
.pv-pill-potential { border: 1px solid #fcd34d; background: #fff; color: var(--pv-warn); }
.pv-fine { text-align: right; white-space: nowrap; }
.pv-fine b { display: block; color: var(--pv-danger); font-size: 16px; }
.pv-fine small { color: var(--pv-muted); font-size: 11px; }
/* A fine stated only as a rate sentence: small print under the sentence, the
   amount slot empty, so the sentence keeps its width (FP-FIX D2 + D3). */
.pv-inf-note { display: block; margin-top: 4px; color: var(--pv-muted); font-size: 11px; line-height: 1.5; overflow-wrap: break-word; }
.pv-empty { margin: 0; padding: 4px 24px 12px; color: #334155; font-size: 14px; }
.pv-cav { margin: 0; padding: 4px 24px 14px; color: var(--pv-muted); font-size: 11px; line-height: 1.55; }
/* The fines caveat, collapsed (the owner's ruling 2026-10-13): quiet small print. */
.pv-cav-details { margin: 0; padding: 4px 24px 6px; color: var(--pv-muted); font-size: 11px; line-height: 1.55; }
.pv-cav-details summary { display: inline-block; min-height: 24px; padding: 2px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; list-style: none; }
.pv-cav-details summary::-webkit-details-marker { display: none; }
.pv-cav-details summary::before { content: "\25B8"; display: inline-block; margin-right: 5px; text-decoration: none; transition: transform .15s ease; }
.pv-cav-details[open] summary::before { transform: rotate(90deg); }
.pv-cav-details p { margin: 4px 0 0; }
.pv-ctabox { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 10px 24px 24px; padding: 18px; border-radius: 14px; background: var(--pv-ground); }
.pv-ctabox p { flex: 1; min-width: 240px; margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.pv-ctabox small { display: block; margin-top: 4px; color: var(--pv-muted); font-size: 13px; font-weight: 400; }
.pv-cta-button { min-height: 48px; }

/* The locked answer */
.pv-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; padding: 18px 22px; border: 1px solid var(--pv-line); border-radius: 14px; background: #fff; }
.pv-lock-icon { display: flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--pv-amber); color: #78350f; }
.pv-lock-text { flex: 1; min-width: 220px; }
.pv-lock-text b { display: block; font-size: 16px; line-height: 1.4; }
.pv-lock-text p { margin: 3px 0 0; color: #334155; font-size: 14px; line-height: 1.5; }

@media (max-width: 760px) {
  .pv-section { padding: 36px 0 44px; }
  .pv-section [data-preview-mount]:empty { min-height: 560px; }
  .pv-box { padding: 18px 16px; }
  .pv-title { font-size: 22px; }
  .pv-drop { padding: 26px 12px 20px; }
  .pv-button { width: 100%; }
  .pv-head { gap: 12px 22px; padding: 16px; }
  .pv-who { flex-basis: 100%; }
  .pv-who b { font-size: 18px; }
  .pv-sect { padding: 14px 16px 6px; }
  .pv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 16px 4px; }
  .pv-tile b { font-size: 19px; }
  .pv-chips { padding: 10px 16px 4px; }
  .pv-inf { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 16px; }
  .pv-fine { text-align: left; white-space: normal; }
  .pv-fine b { display: inline; margin-right: 6px; }
  .pv-empty, .pv-cav, .pv-cav-details { padding-inline: 16px; }
  .pv-ctabox { margin: 10px 16px 16px; padding: 16px; }
  .pv-ctabox p { min-width: 0; flex-basis: 100%; }
  .pv-cta-button { width: 100%; }
  .pv-lock { padding: 16px; }
  .pv-lock .pv-cta-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .is-busy .pv-status::before { animation: none; }
}
