/* Product Photo Prep — static rail styles.
   SR-21 enterprise-design conformance (FOUNDRY run #31, 2026-08-16).
   Conformed to the enterprise-design token scale (the design system's single
   source of truth): semantic token NAMES + VALUES, radius (--r/--rs), shared
   easing (--ease), compact enterprise type scale, Urbanist headings over Inter
   body, pill controls, hairline --br borders, and the signature indigo->pink/amber
   gradient on the conversion CTA. Dual-mode: OS preference (prefers-color-scheme)
   AND an explicit [data-color-mode] override, mirrored per the theming contract.

   Security-justified deviation (logged for verifier ratify; ALG-3 S1/S3/S4/SR-8):
   fonts are SELF-HOSTED via @font-face (font-src 'self'), never fetched from a
   third-party font CDN. This preserves the tool's zero-third-party-network posture
   and the locked "default-src 'none'" CSP — no CSP loosening, no honesty regression
   on "nothing leaves your browser." Urbanist/Inter woff2 ship in ./fonts/ at deploy
   (OFL, deploy-time asset per the deploy manifest); if a face is absent the stack
   degrades gracefully to system sans with zero breakage. */

/* ---- Self-hosted faces (no third-party network; font-src 'self') ---- */
@font-face {
  font-family: 'Urbanist'; font-style: normal; font-weight: 400 800;
  font-display: swap; src: url('fonts/urbanist-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300 600;
  font-display: swap; src: url('fonts/inter-var.woff2') format('woff2');
}

/* ---- Design-system tokens — light is the public-tool default; full dark parity ---- */
:root,
[data-color-mode="light"] {
  --bg: #f6f6fb; --s1: #ffffff; --s2: #f0edfa; --h: #e9e5f7;
  --br: rgba(17, 13, 38, 0.10);
  --tx: #15121f; --lt: #3c3750; --m: #6a6580;
  --in: #4934bc; --in-2: #4934bc;
  --or: #fe2267; --wn: #b45309; --ok: #15803d; --er: #dc2626;
  --dead: #7a1f2b; --invalid: #6a6580;
  --r: 14px; --rs: 8px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --sh-1: 0 1px 3px rgba(17, 13, 38, 0.08), 0 4px 12px rgba(17, 13, 38, 0.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Urbanist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
[data-color-mode="dark"] {
  --bg: #08060f; --s1: #110e1c; --s2: #1a1530; --h: #1e1a2e;
  --br: rgba(255, 255, 255, 0.08);
  --tx: #e2e8f0; --lt: #cbd5e1; --m: #94a3b8;
  --in: #4934bc; --in-2: #8b7ff5;
  --or: #fe2267; --wn: #ff9e02; --ok: #22c55e; --er: #ef4444;
  --dead: #d9848e; --invalid: #9a9aad;
  --sh-1: 0 8px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
/* OS-preference default when no explicit data-color-mode is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-color-mode]) {
    --bg: #08060f; --s1: #110e1c; --s2: #1a1530; --h: #1e1a2e;
    --br: rgba(255, 255, 255, 0.08);
    --tx: #e2e8f0; --lt: #cbd5e1; --m: #94a3b8;
    --in: #4934bc; --in-2: #8b7ff5;
    --or: #fe2267; --wn: #ff9e02; --ok: #22c55e; --er: #ef4444;
    --dead: #d9848e; --invalid: #9a9aad;
    --sh-1: 0 8px 24px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--in); }
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

.wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }

.kicker {
  font-family: var(--display);
  text-transform: uppercase; letter-spacing: .08em; font-size: 12px;
  font-weight: 700; color: var(--in-2); margin: 0 0 6px;
}
h1 { font-family: var(--display); font-weight: 800; font-size: 30px; margin: 0 0 10px; letter-spacing: -0.01em; }
.lede { color: var(--m); margin: 0 0 24px; font-size: 15px; }

.panel {
  background: var(--s1); border: 1px solid var(--br); border-radius: var(--r);
  padding: 22px; box-shadow: var(--sh-1);
}
.label { display: block; font-family: var(--display); font-weight: 600; font-size: 13px; margin: 0 0 8px; }
.hint { color: var(--m); font-weight: 400; font-family: var(--font); }
textarea {
  width: 100%; resize: vertical; padding: 12px 14px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--tx); background: var(--bg); border: 1px solid var(--br); border-radius: var(--rs);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
textarea:focus { outline: none; border-color: var(--in); box-shadow: 0 0 0 2px var(--in); }

.actions { display: flex; gap: 10px; margin: 14px 0 0; }
.btn {
  appearance: none; border: 1px solid var(--br); background: var(--s1); color: var(--tx);
  font: 600 14px/1 var(--display); padding: 11px 20px; border-radius: 360px; cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { border-color: var(--in); }
.btn:active { transform: translateY(1px); }
/* Primary in-tool action: solid indigo keeps white text at WCAG AA (~8:1). */
.btn--primary { background: var(--in); color: #ffffff; border-color: var(--in); }
.btn--primary:hover { background: #3d2ba0; border-color: #3d2ba0; }
.btn:disabled { opacity: .55; cursor: default; }

.summary { margin: 18px 0 0; font-family: var(--display); font-weight: 600; font-size: 15px; min-height: 1.2em; }
.results { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--br); border-radius: var(--rs);
}
.badge {
  flex: none; font-family: var(--display); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 999px; color: #fff;
}
.badge--pass { background: var(--ok); } .badge--warn { background: var(--wn); }
.badge--fail { background: var(--er); } .badge--dead { background: var(--dead); } .badge--invalid { background: var(--invalid); }
.row__body { min-width: 0; }
.row__url { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--tx); }
.row__dim { font-size: 13px; color: var(--m); margin-top: 2px; }
.row__flag { font-size: 13px; color: var(--er); margin-top: 3px; }
.row--pass .row__flag { color: var(--m); }

/* Conversion CTA carries the signature indigo->pink/amber gradient. */
.cta {
  margin: 22px 0 0; padding: 18px; border: 1px solid var(--br);
  border-radius: var(--r); background: var(--s2);
}
.cta__text { margin: 0 0 12px; font-size: 15px; color: var(--tx); }
.cta__link {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: 14px;
  color: #ffffff; text-decoration: none; padding: 11px 22px; border-radius: 360px;
  background: linear-gradient(135deg, var(--or), var(--wn));
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.cta__link:hover { transform: translateY(-1px); box-shadow: var(--sh-1); text-decoration: none; }

.foot { margin: 26px 2px 0; color: var(--m); font-size: 13px; }
.foot a { color: var(--in-2); }
