/* ShutterVerified — working JPG tester (design preview). Uses the tokens in ../styles.css :root
   and the authenticity theme overrides. */

.tester-main { padding: 0 0 3rem; }
.tester-hero { padding: 2.2rem 0 1.2rem; max-width: 46rem; }
.tester-hero h1 { margin: 0 0 0.45rem; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 680; letter-spacing: -0.035em; }
.tester-hero .lede { margin: 0; color: var(--ink-soft); }

.tester-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.tester-grid.is-idle { grid-template-columns: minmax(0, 1fr); max-width: 46rem; }
.tester-grid.is-idle .read-panel { display: none; }

/* Drop zone (live) */
.tester-drop {
  margin: 0 0 1rem;
  padding: 2.4rem 1.5rem 2rem;
  text-align: center;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  transition: background 0.15s, border-color 0.15s;
}
.tester-drop.is-over { background: var(--accent-soft); border-style: solid; }
.tester-drop h2 { margin: 0 0 0.35rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -0.02em; }
.tester-drop p { margin: 0 auto 1.05rem; color: var(--muted); max-width: 32rem; }
.tester-drop .formats {
  margin: 0.85rem auto 0 !important;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.btn { cursor: pointer; }

/* Card shell shared by progress, result and panel */
.sv-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.sv-card + .sv-card { margin-top: var(--space-2); }
.card-kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* File chip with local preview */
.tester .file-chip { margin: 0 0 var(--space-2); grid-template-columns: 4.6rem 1fr; }
.tester .thumb { border-radius: 2px; overflow: hidden; background-size: cover; background-position: center; }
.tester .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.file-local {
  display: inline-block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ok);
}

/* Progress steps */
.steps-live { list-style: none; margin: 0; padding: 0; }
.steps-live li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.75rem;
  padding: 0.72rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  color: var(--muted);
}
.steps-live li:first-child { border-top: 0; padding-top: 0.1rem; }
.step-dot {
  width: 1.35rem; height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 700;
  color: transparent;
}
.step-title { font-weight: 620; letter-spacing: -0.01em; }
.step-detail { display: block; margin-top: 0.1rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); min-height: 1.1em; }
.steps-live li.is-active { color: var(--ink); }
.steps-live li.is-active .step-dot {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: sv-spin 0.75s linear infinite;
}
.steps-live li.is-done { color: var(--ink); }
.steps-live li.is-done .step-dot { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.steps-live li.is-done .step-dot::after { content: "✓"; }
.steps-live li.is-fail .step-dot { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); }
.steps-live li.is-fail .step-dot::after { content: "!"; }
.steps-live li.is-skip { opacity: 0.45; }
.example-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, transparent);
  border-radius: 2px;
  vertical-align: 0.1em;
}
.progress-bar { height: 3px; margin: var(--space-2) 0 0; background: var(--line); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.45s ease; }
@keyframes sv-spin { to { transform: rotate(360deg); } }

/* Read from your photo */
.read-panel { position: sticky; top: calc(var(--header) + 1rem); }
.read-panel h2 { margin: 0 0 0.2rem; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; }
.read-panel .panel-sub { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.86rem; }
.read-list { margin: 0; }
.read-list > div {
  display: grid;
  grid-template-columns: 8.2rem 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  font-size: 0.9rem;
}
.read-list dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.read-list dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.read-list dd.is-pending {
  color: transparent;
  background: linear-gradient(90deg, var(--line) 0%, var(--bg-elev) 50%, var(--line) 100%);
  background-size: 200% 100%;
  animation: sv-shimmer 1.2s linear infinite;
  border-radius: 2px;
  max-width: 9rem;
  height: 1.1rem;
  margin-top: 0.15rem;
}
.read-list dd.is-new { animation: sv-in 0.35s ease; }
.read-list dd.is-none { color: var(--muted); font-weight: 450; }
.read-list .row-gps dd { color: var(--ok); font-weight: 600; }
.panel-foot {
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
}
@keyframes sv-shimmer { to { background-position: -200% 0; } }
@keyframes sv-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Result */
.result-card .result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 0.75rem; row-gap: 0.35rem; min-height: 2.35rem; }
.result-card .result-head .kicker { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.result-card .result-head .verified-stamp { justify-self: end; align-self: start; }
.verified-stamp {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent);
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
}
.tester .count { margin-top: 0.2rem; }
.tester .facts { margin: 0.4rem 0 1.2rem; }
.count-source { margin: -0.2rem 0 1rem; min-height: 1.15em; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.life-none { margin: 0 0 1.2rem; color: var(--ink-soft); font-size: 0.95rem; }
.log-box,
.cert-box {
  margin: 0 0 1.2rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.result-shared .log-box:last-child,
.result-shared .cert-box:last-child { margin-bottom: 0; }
.log-box > p,
.cert-box > p { margin: 0 0 0.35rem; }
.log-box ul { margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-soft); }
.log-box li { padding: 0.15rem 0; }
.log-box .log-unlock { margin-top: 0.45rem; }
.log-box .btn,
.cert-box .btn,
.cta-row .btn {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  min-height: 2.75rem;
  min-width: 12rem;
  padding: 0.78rem 1.2rem;
  box-shadow: none;
  justify-content: center;
}

.cert-box .fine {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}
.cert-recommend {
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cert-box .cta-row { margin: 0 0 0.8rem; }
.cert-box .cta-price { margin: 0; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; margin: 0.4rem 0 0.8rem; }
.cta-price { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

/* Notice states (Canon, no count, errors) */
.state-notice .notice-try-again { margin: 0.1rem 0 1rem; }
.state-notice .notice-try-again .btn { min-width: 12rem; justify-content: center; }
.state-notice .usb-offer { margin-top: 0; }
.state-notice .usb-offer > :last-child { margin-bottom: 0; }
.state-notice h2 { margin: 0 0 0.45rem; font-size: 1.35rem; font-weight: 660; letter-spacing: -0.025em; }
.state-notice p { margin: 0 0 0.9rem; color: var(--ink-soft); }
.state-notice ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-soft); }
.state-notice li { margin: 0.2rem 0; }
.state-icon {
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  margin: 0 0 0.9rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.state-error .state-icon { border-color: var(--accent-2); color: var(--accent-2); }
.state-error .card-kicker { color: var(--accent-2); }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .tester-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .read-panel { position: static; }
  .read-list > div { grid-template-columns: 7rem 1fr; }
  .sv-card { padding: var(--space-2); }
  .log-box .btn,
  .cert-box .btn,
  .cta-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .steps-live li.is-active .step-dot, .read-list dd.is-pending { animation: none; }
}
.home-dropzone.is-over { background: var(--accent-soft); border-style: solid; }
@media (max-width: 699px) {
  .tester-grid:not(.is-idle) { padding-top: 1.1rem; }
}

/* ---------- Result: camera + lens cards, firmware note, certificate selector ---------- */
.tester-grid.has-lens { grid-template-columns: minmax(0, 2fr) minmax(0, 0.95fr); }
.result-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); align-items: stretch; }
.result-pair.has-lens { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.result-pair > .sv-card { margin-top: 0; margin-bottom: 0; }
.result-card { display: flex; flex-direction: column; min-width: 0; height: 100%; box-sizing: border-box; container-type: inline-size; container-name: result-card; }
.result-card .count { font-size: clamp(1.55rem, 15cqi, 3.4rem); line-height: 1; white-space: nowrap; overflow-wrap: normal; max-width: 100%; box-sizing: border-box; }
.result-card .facts { margin: 0.4rem 0 1rem; }
.result-card .facts dd { overflow-wrap: anywhere; }
.lens-counts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem 1rem; margin-top: 0.2rem; }
.lens-counts > div { min-width: 0; container-type: inline-size; }
.lens-counts .count-sm { font-size: clamp(0.95rem, 16cqi, 2.3rem); margin: 0; white-space: nowrap; overflow-wrap: normal; max-width: 100%; }
.lens-counts .count-label { margin: 0.15rem 0 0.6rem; }
.lens-explain { margin: 0 0 0.8rem; font-size: 0.84rem; color: var(--muted); }
.asof-note { margin: 0.9rem 0; padding: 0.6rem 0.85rem; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--bg-elev) 80%, transparent); font-size: 0.9rem; color: var(--ink-soft); }
.result-shared { margin-top: 0; }
.result-shared .result-head { margin: 0 0 0.85rem; }
.result-shared .kicker { margin: 0; }
.fw-note { margin: auto 0 0; padding: 0.6rem 0.75rem; border: 1px solid color-mix(in srgb, #9a7b2f 45%, transparent); background: color-mix(in srgb, #9a7b2f 8%, transparent); border-radius: var(--radius); font-size: 0.84rem; color: var(--ink-soft); }
.fw-note a { color: var(--accent); }
.fw-note .example-tag { margin-left: 0.25rem; }
.cert-choose fieldset { margin: 0.4rem 0 0.8rem; padding: 0; border: 0; display: grid; gap: 0.5rem; }
.cert-choose legend { margin: 0 0 0.5rem; font-weight: 650; font-size: 1.02rem; }
.choose-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); cursor: pointer; }
.choose-opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.choose-opt input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; }
.opt-body { display: grid; gap: 0.1rem; min-width: 0; }
.opt-title { font-weight: 650; }
.opt-detail { font-size: 0.82rem; color: var(--muted); }
.opt-price { font-family: var(--font-mono); font-size: 0.95rem; text-align: right; color: var(--ink); }
.opt-price small { display: block; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lens-seller-tip { margin: 0 0 0.9rem; padding: 0.65rem 0.85rem; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 0.86rem; color: var(--ink-soft); }
@media (max-width: 1100px) { .tester-grid.has-lens { grid-template-columns: minmax(0, 1fr); } .tester-grid.has-lens .read-panel { position: static; } }
@media (max-width: 720px) { .result-pair.has-lens { grid-template-columns: minmax(0, 1fr); } }
.tester .file-name { overflow-wrap: anywhere; }
.asof-note .asof-row { display: block; }
.asof-note .asof-row + .asof-row { margin-top: 0.2rem; }
.asof-note .asof-k { display: inline-block; min-width: 8.2rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.asof-note strong { color: var(--ink); font-weight: 600; }
.asof-note .asof-gap { color: var(--muted); }
.age-note { margin: -0.4rem 0 0.9rem; padding: 0.5rem 0.85rem; border-left: 2px solid #b8860b; background: rgba(184, 134, 11, 0.07); font-size: 0.9rem; color: var(--ink-soft); }
@media (max-width: 480px) { .asof-note .asof-k { display: block; min-width: 0; } }
