:root {
  --bg: #0a0b0f;
  --bg-glow: radial-gradient(720px 360px at 50% -10%, rgba(109, 141, 253, 0.16), transparent 70%);
  --panel: #14161d;
  --panel-2: #191c24;
  --panel-border: #23262f;
  --panel-border-hover: #313543;
  --text: #f1f2f6;
  --text-dim: #9a9fae;
  --text-faint: #666c7a;
  --accent: #6d8dfd;
  --accent-strong: #92a8ff;
  --accent-soft: rgba(109, 141, 253, 0.12);
  --green: #3ecf8e;
  --green-soft: rgba(62, 207, 142, 0.14);
  --yellow: #e0b23e;
  --yellow-soft: rgba(224, 178, 62, 0.14);
  --red: #f0685f;
  --red-soft: rgba(240, 104, 95, 0.14);
  --aurora-2: #a78bfa;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f8;
    --bg-glow: radial-gradient(720px 360px at 50% -10%, rgba(109, 141, 253, 0.10), transparent 70%);
    --panel: #ffffff;
    --panel-2: #f8f9fc;
    --panel-border: #e4e6ed;
    --panel-border-hover: #cfd3de;
    --text: #171922;
    --text-dim: #5c6272;
    --text-faint: #8b90a0;
    --accent: #4a6bef;
    --accent-strong: #3a58d9;
    --accent-soft: rgba(74, 107, 239, 0.08);
    --green-soft: rgba(28, 163, 106, 0.10);
    --green: #1ca36a;
    --yellow-soft: rgba(178, 130, 10, 0.10);
    --yellow: #b2820a;
    --red-soft: rgba(214, 62, 52, 0.09);
    --red: #d63e34;
    --aurora-2: #8b5cf6;
    --shadow-sm: 0 1px 2px rgba(20, 22, 30, 0.06);
    --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 12px 32px -14px rgba(20, 22, 30, 0.18);
  }
}

/* Explicit manual choice (data-theme, set by the header toggle + localStorage)
   always wins over the OS-level prefers-color-scheme media query above -
   an attribute selector on :root outranks a bare :root inside a media query. */
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --bg-glow: radial-gradient(720px 360px at 50% -10%, rgba(109, 141, 253, 0.10), transparent 70%);
  --panel: #ffffff;
  --panel-2: #f8f9fc;
  --panel-border: #e4e6ed;
  --panel-border-hover: #cfd3de;
  --text: #171922;
  --text-dim: #5c6272;
  --text-faint: #8b90a0;
  --accent: #4a6bef;
  --accent-strong: #3a58d9;
  --accent-soft: rgba(74, 107, 239, 0.08);
  --green-soft: rgba(28, 163, 106, 0.10);
  --green: #1ca36a;
  --yellow-soft: rgba(178, 130, 10, 0.10);
  --yellow: #b2820a;
  --red-soft: rgba(214, 62, 52, 0.09);
  --red: #d63e34;
  --aurora-2: #8b5cf6;
  --shadow-sm: 0 1px 2px rgba(20, 22, 30, 0.06);
  --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 12px 32px -14px rgba(20, 22, 30, 0.18);
}

:root[data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-glow: radial-gradient(720px 360px at 50% -10%, rgba(109, 141, 253, 0.16), transparent 70%);
  --panel: #14161d;
  --panel-2: #191c24;
  --panel-border: #23262f;
  --panel-border-hover: #313543;
  --text: #f1f2f6;
  --text-dim: #9a9fae;
  --text-faint: #666c7a;
  --accent: #6d8dfd;
  --accent-strong: #92a8ff;
  --accent-soft: rgba(109, 141, 253, 0.12);
  --green: #3ecf8e;
  --green-soft: rgba(62, 207, 142, 0.14);
  --yellow: #e0b23e;
  --yellow-soft: rgba(224, 178, 62, 0.14);
  --red: #f0685f;
  --red-soft: rgba(240, 104, 95, 0.14);
  --aurora-2: #a78bfa;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Aurora background: soft glowing blobs, one tracking the cursor ---------- */

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

/* Two ambient blobs drift slowly and independently, like a lava lamp - they
   never touch the edges (the drift keyframes stay within a modest range),
   so the effect reads as alive without ever feeling busy. */
.aurora-blob--drift-a {
  top: 18%;
  left: 22%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 72%);
  opacity: 0.32;
  animation: auroraDriftA 24s ease-in-out infinite;
}

.aurora-blob--drift-b {
  top: 62%;
  left: 74%;
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  background: radial-gradient(circle, var(--aurora-2) 0%, transparent 72%);
  opacity: 0.28;
  animation: auroraDriftB 29s ease-in-out infinite;
}

/* The third blob follows the mouse - not instantly, but easing/lagging
   toward it, which is what makes it feel alive rather than just "attached"
   to the pointer. Driven by the same --mouse-x/--mouse-y custom properties
   the rest of the page's cursor-tracking already uses. */
.aurora-blob--cursor {
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  background: radial-gradient(circle, var(--accent-strong) 0%, transparent 70%);
  opacity: 0.3;
  transform: translate(var(--mouse-x, 50vw), var(--mouse-y, 30vh));
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auroraDriftA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, 40px) scale(1.12); }
  66% { transform: translate(-40px, 60px) scale(0.92); }
}

@keyframes auroraDriftB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(-60px, -50px) scale(1.1); }
  75% { transform: translate(30px, -70px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob--drift-a, .aurora-blob--drift-b { animation: none; }
  .aurora-blob--cursor { transition: none; }
}

.page {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Turning .page into a flex column (for the footer's margin-top:auto
   sticky-bottom trick) had a side effect: a flex item with horizontal
   auto margins no longer stretches to fill the cross axis by default -
   it shrinks to its content's width instead, then the auto margins center
   *that*. Every direct child of .page that centers itself the classic way
   (max-width + margin:0 auto - .explainer-intro, .dropzone, etc.) was
   quietly shrinking to hug its own content instead of filling .page and
   capping at its max-width. Restoring width:100% here undoes that side
   effect uniformly instead of patching each centered child individually. */
.page > * {
  width: 100%;
}

/* ---------- Site nav (logo, Home/Resources links, lang/theme toggles) ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}

.site-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1640px;
  margin: 0 auto;
  padding: 10px 32px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.site-nav-brand:hover { color: var(--accent); }

.site-nav-logo {
  display: flex;
  color: var(--accent);
  flex-shrink: 0;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.12s, color 0.12s;
}

.site-nav-link:hover {
  color: var(--text);
  background: var(--panel);
}

.site-nav .header-toggles {
  position: static;
}

/* ---------- Header ---------- */

.app-header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  margin-bottom: 48px;
}

.header-toggles {
  position: absolute;
  top: 4px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle,
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.lang-toggle {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.theme-toggle:hover,
.lang-toggle:hover { border-color: var(--panel-border-hover); color: var(--text); }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.app-header-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  width: 100%;
  max-width: 620px;
  min-width: 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.brand-name {
  font-size: 2.6rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-dim) 180%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-dim);
  max-width: 520px;
  font-size: 1.08rem;
  line-height: 1.6;
  font-weight: 450;
  margin: 0;
}

.hero-highlights {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 8px;
  column-gap: 18px;
  width: 100%;
}

.hero-highlight {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-highlight:not(:first-child)::before {
  content: "\00b7";
  color: var(--panel-border-hover);
}

.hero-highlight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-highlight-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.3;
}

.share-back-link {
  display: inline-block;
  margin-top: -6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.share-back-link:hover { text-decoration: underline; }

.article-back-link {
  display: block;
  margin: 0 0 20px;
}

/* ---------- Header stats (module count breakdown) ---------- */

.header-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.header-stat-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.header-stat-total-svg {
  width: clamp(210px, 30vw, 340px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 34px color-mix(in srgb, var(--accent) 40%, transparent));
}

.header-stat-total-svg-stop-a { stop-color: var(--accent-strong); }
.header-stat-total-svg-stop-b { stop-color: var(--aurora-2); }

/* Solid gradient fill rather than the earlier stroked outline: the old
   -webkit-text-stroke (and even SVG stroke-linejoin: round) approach left a
   small star-shaped glitch in the "2" because the font's glyph is built
   from overlapping sub-paths and a STROKE traces each one's offset outline
   independently, so they crossed. A FILL just resolves overlapping
   sub-paths by winding rule with no offset outlines to cross, so the
   glitch can't occur - which also means the site's normal font is safe to
   use here again instead of the Arial workaround. */
.header-stat-total-svg-text {
  font-family: var(--font);
  font-weight: 800;
  font-size: 132px;
  letter-spacing: -0.02em;
  fill: url(#statTotalGradient);
}

/* Bigger/bolder than a typical caption - reads as a headline under the
   number (matching .explainer-title's weight elsewhere on the site)
   rather than a muted footnote, per user request. */
.header-stat-total-label {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-dim) 180%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 460px;
  text-align: center;
}

.header-stat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.header-stat-box {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 128px;
  padding: 18px 10px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  cursor: default;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.2), border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-stat-box:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 28px -12px rgba(109, 141, 253, 0.45);
}

.header-stat-box-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--aurora-2) 16%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.header-stat-box-icon svg { width: 19px; height: 19px; }

.header-stat-box:hover .header-stat-box-icon {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, transparent), color-mix(in srgb, var(--aurora-2) 30%, transparent));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.header-stat-box-count {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.header-stat-box-label {
  position: relative;
  z-index: 1;
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.3;
}

/* Each category gets a hover effect that echoes its own icon - same accent
   palette throughout (so it never reads as a suspicion color like the
   green/yellow/red score system elsewhere), just a different shape of
   motion per category. */

/* Klíčové signály: a quick spark/flash on the icon, like the bolt firing. */
.header-stat-box--zap:hover .header-stat-box-icon {
  animation: statZap 0.5s ease;
}
@keyframes statZap {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.18) rotate(-10deg); }
  65% { transform: scale(0.94) rotate(7deg); }
}

/* Obsah a lidé: a soft spotlight rising up behind the icon, like a light
   turning on over a subject. */
.header-stat-box--person::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10%;
  width: 160%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, var(--accent-soft) 0%, transparent 70%);
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s ease;
  pointer-events: none;
}
.header-stat-box--person:hover::before { transform: translateX(-50%) scaleY(1); }
.header-stat-box--person:hover .header-stat-box-icon { transform: translateY(-3px); }

/* Metadata a soubor: a light scan-line sweeps down the box, like a
   document being scanned/read. */
.header-stat-box--file::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -50%;
  height: 45%;
  background: linear-gradient(180deg, transparent, var(--accent-soft) 45%, transparent);
  transform: translateY(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.header-stat-box--file:hover::after { transform: translateY(280%); }

/* Pixelová forenzní analýza: a faint pixel grid fades in and the
   magnifier icon zooms slightly, echoing the pixel-level inspection. */
.header-stat-box--search::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--panel-border-hover) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel-border-hover) 1px, transparent 1px);
  background-size: 9px 9px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.header-stat-box--search:hover::before { opacity: 0.5; }
.header-stat-box--search:hover .header-stat-box-icon { transform: scale(1.16); }

@media (prefers-reduced-motion: reduce) {
  .header-stat-box, .header-stat-box-icon { transition: none; animation: none; }
  .header-stat-box:hover { transform: none; }
}

/* Purely decorative ticker of module names - ambient texture under the
   stat boxes, not a navigation or reading element (aria-hidden in markup).
   The list is rendered twice back-to-back and the track scrolls exactly
   one copy's width, so the loop point is invisible. */
.header-marquee {
  width: 100%;
  margin-top: 6px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.header-marquee-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  animation: headerMarquee 46s linear infinite;
}

.header-marquee-item {
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.header-marquee-dot {
  color: var(--panel-border-hover);
  font-size: 0.6rem;
}

@keyframes headerMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .header-marquee-track { animation: none; }
}

/* ---------- Upload row (AI settings sidebar + dropzone) ---------- */

.upload-row {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 788px;
  margin: 0 auto;
}

.upload-main {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .upload-row { flex-direction: column; }
}

/* ---------- Dropzone ---------- */

.dropzone {
  max-width: 548px;
  margin: 0 auto;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 56px 28px;
  text-align: center;
  cursor: pointer;
  background: var(--panel);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

/* /tools' dropzone sits directly under .explainer-desc (max-width: 560px)
   with nothing else beside it, so it can match that width exactly - unlike
   the main page's #dropzone, which shares a row with a sidebar. */
#toolsDropzone {
  max-width: 560px;
}

.dropzone:hover {
  border-color: var(--accent);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
  box-shadow: 0 16px 38px -14px color-mix(in srgb, var(--accent) 55%, transparent);
}

.dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  margin-bottom: 8px;
  transition: color 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  color: var(--accent);
  transform: translateY(-2px);
}

.dropzone-title {
  margin: 0 0 4px;
  font-size: 0.96rem;
}

/* ---------- Staged files (review before submitting) ---------- */

.staged-panel {
  max-width: 548px;
  margin: 0 auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--panel);
  text-align: center;
}

.staged-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.staged-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--panel-border);
}

.staged-thumb-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
}

.staged-summary {
  margin: 0 0 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.staged-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-submit {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-submit:hover { opacity: 0.88; }

.btn-cancel {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-cancel:hover { border-color: var(--panel-border-hover); color: var(--text); }

.hint {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin: 0;
}

.demo-cta {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Collapsed by default via <details> (no "open" attribute) - the external
   Claude/Google calls are on by default for better out-of-the-box results
   (see hero copy elsewhere, which now says so honestly), but the toggles
   themselves don't need to be the first thing anyone sees. Plain <details>
   for free keyboard/accessibility support rather than a hand-rolled
   expand/collapse. */
.external-ai-settings {
  max-width: 548px;
  margin: 6px auto 0;
  text-align: left;
}

.external-ai-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.external-ai-summary::-webkit-details-marker { display: none; }

.external-ai-summary:hover {
  color: var(--text-dim);
  background: var(--panel-2);
}

.external-ai-summary-icon { flex-shrink: 0; }

.external-ai-summary-chevron {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.external-ai-settings[open] .external-ai-summary-chevron {
  transform: rotate(180deg);
}

.external-ai-settings .external-ai-boxes {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .external-ai-settings .external-ai-boxes { grid-template-columns: 1fr; }
}

.external-ai-settings .external-ai-hint {
  margin-top: 8px;
  text-align: center;
  max-width: none;
}

.external-ai-boxes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

.external-ai-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.external-ai-box:hover { border-color: var(--panel-border-hover); }

.external-ai-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
}

.external-ai-logo--claude { background: rgba(217, 119, 87, 0.16); color: #d97757; }
.external-ai-logo--google { background: rgba(66, 133, 244, 0.14); color: #4285f4; }

.external-ai-box-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.external-ai-box-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.external-ai-box-desc {
  font-size: 0.7rem;
  color: var(--text-faint);
}

.external-ai-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-faint);
  max-width: 420px;
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
  background: none;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-demo svg { color: var(--accent); flex-shrink: 0; opacity: 0.85; }

.btn-demo:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-demo:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Recent-analyses history (local, per-browser) ---------- */

.history-panel {
  margin-top: 20px;
}

/* Collapsed by default via <details> (no "open" attribute), same pattern
   as .external-ai-settings - thumbnails from past analyses are useful to
   have around but shouldn't compete with the dropzone as the first thing
   anyone sees. */
.history-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-faint);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.history-summary::-webkit-details-marker { display: none; }

.history-summary:hover {
  color: var(--text-dim);
  background: var(--panel-2);
}

.history-summary-icon { flex-shrink: 0; }

.history-summary-count { color: var(--text-faint); }

.history-summary-chevron {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.history-panel[open] .history-summary-chevron {
  transform: rotate(180deg);
}

.history-panel-body {
  margin-top: 12px;
}

.history-panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.history-clear-btn {
  font-size: 0.72rem;
  color: var(--text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.history-clear-btn:hover { color: var(--text-dim); }

.history-scroll {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.history-card {
  flex: 0 0 auto;
  width: 108px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: default;
}

.history-thumb-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.history-card:hover .history-thumb-wrap {
  border-color: var(--panel-border-hover);
  transform: translateY(-2px);
}

/* Category breakdown, revealed on hover - what actually drove the score,
   not just the bare number on the thumbnail badge. Expands in normal flow
   (not an absolutely-positioned popover) since .history-scroll scrolls
   horizontally, which per the CSS overflow-x/y spec forces its vertical
   overflow to auto too - an absolutely-positioned child floating above/
   below the card would just get clipped by that. */
.history-hover-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: max-height 0.22s ease, opacity 0.18s ease, margin-top 0.22s ease;
}

.history-card:hover .history-hover-detail {
  max-height: 160px;
  opacity: 1;
  margin-top: 2px;
}

.history-hover-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1.3;
}

.history-hover-cats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-hover-cat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
}

.history-hover-cat-label {
  font-size: 0.56rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-hover-cat-score {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-dim);
  flex-shrink: 0;
}

.history-hover-cat-bar {
  height: 3px;
  border-radius: 999px;
  background: var(--panel-border);
  overflow: hidden;
}

.history-hover-cat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.history-hover-cat-bar-fill.badge-ai-low { background: var(--green); }
.history-hover-cat-bar-fill.badge-ai-mid { background: var(--yellow); }
.history-hover-cat-bar-fill.badge-ai-high { background: var(--red); }

.history-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.history-score-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.5;
}

.history-filename {
  font-size: 0.68rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  font-size: 0.64rem;
  color: var(--text-faint);
}

.hidden { display: none !important; }

/* ---------- Entrance animation ---------- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.verdict-card,
.module-card,
.batch-card {
  animation: fadeInUp 0.4s ease both;
}

/* A light stagger across the first handful of cards in each grid reads as
   a cascade rather than everything popping in at once - nth-child counts
   restart per grid container, so every module-section/batch-grid gets its
   own short cascade. */
.module-grid .module-card:nth-child(1), .batch-grid .batch-card:nth-child(1) { animation-delay: 0.02s; }
.module-grid .module-card:nth-child(2), .batch-grid .batch-card:nth-child(2) { animation-delay: 0.05s; }
.module-grid .module-card:nth-child(3), .batch-grid .batch-card:nth-child(3) { animation-delay: 0.08s; }
.module-grid .module-card:nth-child(4), .batch-grid .batch-card:nth-child(4) { animation-delay: 0.11s; }
.module-grid .module-card:nth-child(5), .batch-grid .batch-card:nth-child(5) { animation-delay: 0.14s; }
.module-grid .module-card:nth-child(6), .batch-grid .batch-card:nth-child(6) { animation-delay: 0.17s; }

@media (prefers-reduced-motion: reduce) {
  .verdict-card, .module-card, .batch-card { animation: none; }
}

/* ---------- Image preview ---------- */

.image-preview-wrap {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.image-preview-inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  /* Clips the photo to its normal frame once zoomed past 1x - without this
     a scaled-up <img> would spill out over the surrounding card. */
  overflow: hidden;
  border-radius: var(--radius);
}

.image-preview {
  display: block;
  max-width: 100%;
  max-height: 440px;
  border-radius: var(--radius);
  object-fit: contain;
  cursor: default;
  transform-origin: center center;
  transition: transform 0.18s ease;
}

.image-preview--zoomed {
  cursor: grab;
}

.image-preview--panning {
  cursor: grabbing;
  /* No easing while actively dragging - the photo must track the pointer
     1:1 with no lag, the transition above is only for the +/- buttons. */
  transition: none;
}

/* Persistent +/- zoom control, docked in the photo's corner. The primary,
   discoverable way to zoom - Ctrl/Cmd+scroll and trackpad pinch still work
   as an undocumented bonus, but a modifier key isn't something most people
   would ever stumble into on their own. */
.magnifier-zoom-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow-sm);
}

.magnifier-zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.magnifier-zoom-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.magnifier-zoom-level {
  min-width: 34px;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
}

.magnifier-zoom-level--pulse {
  animation: magnifierZoomLevelPulse 0.28s ease;
}

@keyframes magnifierZoomLevelPulse {
  0% { transform: scale(1.3); color: var(--accent); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .magnifier-zoom-level--pulse { animation: none; }
}

.zoom-hint {
  margin: 10px 0 2px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- Loading / error ---------- */

.loading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

#loadingText {
  transition: opacity 0.2s ease;
}

.loading-fun-fact {
  flex-basis: 100%;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-dimmer, var(--text-dim));
  transition: opacity 0.2s ease;
}

.loading-fun-fact:empty {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--panel-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid rgba(240, 104, 95, 0.35);
  color: var(--red);
  font-size: 0.9rem;
}

/* ---------- Size check banner ---------- */

.size-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.size-check-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.size-check.size-ok {
  background: var(--green-soft);
  border-color: rgba(62, 207, 142, 0.3);
  color: var(--green);
}

.size-check.size-fail {
  background: var(--red-soft);
  border-color: rgba(240, 104, 95, 0.3);
  color: var(--red);
}

/* ---------- Batch grid ---------- */

.batch-section { margin-top: 32px; }

.batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.batch-export-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.batch-export-actions .btn-export {
  padding: 6px 13px;
  font-size: 0.76rem;
}

.batch-summary .stat {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 5px 12px;
  border-radius: 999px;
}

.batch-summary .stat strong { color: var(--text); font-weight: 800; }

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.batch-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-top-width: 3px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.batch-card:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.batch-card:hover .batch-thumb {
  transform: scale(1.045);
}

.batch-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* A colored top edge lets you scan a whole batch's severity at a glance,
   without reading every badge - same green/yellow/red language as the
   score badges below, just promoted onto the card chrome itself. */
.batch-card--low { border-top-color: var(--green); }
.batch-card--mid { border-top-color: var(--yellow); }
.batch-card--high, .batch-card--error { border-top-color: var(--red); }
.batch-card--pending, .batch-card--unknown { border-top-color: var(--panel-border); }

.batch-thumb-wrap {
  aspect-ratio: 4 / 3;
  background: var(--panel-2);
  overflow: hidden;
}

.batch-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.batch-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-filename {
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-dims {
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}

.badge-pod { background: var(--red-soft); color: var(--red); }
.badge-normal { background: var(--green-soft); color: var(--green); }
.badge-vetsi { background: var(--accent-soft); color: var(--accent-strong); }

.badge-ai-low { background: var(--green-soft); color: var(--green); }
.badge-ai-mid { background: var(--yellow-soft); color: var(--yellow); }
.badge-ai-high { background: var(--red-soft); color: var(--red); }
.badge-ai-pending, .badge-ai-unknown { background: rgba(128, 128, 128, 0.14); color: var(--text-faint); }
.badge-duplicate { background: var(--yellow-soft); color: var(--yellow); cursor: help; }
.badge-reused { background: var(--accent-soft); color: var(--accent-strong); cursor: help; }

.batch-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ---------- Verdict card ---------- */

.results { margin-top: 24px; }

.verdict-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 28px;
  scroll-margin-top: 64px;
}

/* ---------- Quick nav ---------- */

.quick-nav {
  position: sticky;
  top: calc(var(--site-nav-h, 60px) + 14px);
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 16px auto 0;
  padding: 8px 10px;
  overflow-x: auto;
  background: color-mix(in srgb, var(--panel) 45%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--panel-border) 70%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}

.quick-nav::-webkit-scrollbar { display: none; }

.quick-nav:empty { display: none; }

.quick-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  padding: 6px 12px;
  border-radius: 999px;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.quick-nav-link svg { flex-shrink: 0; opacity: 0.75; }

.quick-nav-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quick-nav-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

.quick-nav-link.active svg { opacity: 1; }

.verdict-top {
  flex: 1 1 320px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.radar-wrap {
  flex: 1 1 360px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 18px 22px 16px;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
}

.radar-caption {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  text-align: center;
}

.radar-scale-hint {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
}

/* Collapsed by default (plain <details>, no JS) - the 5-category breakdown
   above already gives the at-a-glance read; this is the "which specific
   module" drill-down for anyone who wants it, not primary information. */
.module-ranking-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
}

.module-ranking-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  transition: color 0.15s ease;
}

.module-ranking-summary::-webkit-details-marker { display: none; }

.module-ranking-summary:hover { color: var(--text-dim); }

.module-ranking-chevron { flex-shrink: 0; transition: transform 0.18s ease; }

.module-ranking-wrap[open] .module-ranking-chevron { transform: rotate(180deg); }

.module-ranking-wrap .cat-bars {
  margin-top: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.cat-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-bar-row {
  display: grid;
  grid-template-columns: 128px 1fr 30px;
  align-items: center;
  gap: 12px;
}

.cat-bar-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.cat-bar-icon {
  flex-shrink: 0;
  display: flex;
  color: var(--text-faint);
  opacity: 0.85;
}

.cat-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-bar-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--panel-border);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-bar-fill.score-low { background: var(--green); }
.cat-bar-fill.score-mid { background: var(--yellow); }
.cat-bar-fill.score-high { background: var(--red); }
.cat-bar-fill.score-na { background: transparent; }

.cat-bar-value {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.cat-bar-value.score-low { color: var(--green); }
.cat-bar-value.score-mid { color: var(--yellow); }
.cat-bar-value.score-high { color: var(--red); }
.cat-bar-value.score-na { color: var(--text-faint); font-weight: 600; }

.verdict-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-ring { flex-shrink: 0; }

.score-ring-bg {
  fill: none;
  stroke: var(--panel-border);
  stroke-width: 9;
}

.score-ring-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.score-ring-text {
  font-size: 32px;
  font-weight: 800;
  fill: var(--text);
  text-anchor: middle;
  dominant-baseline: central;
  font-family: var(--font);
}

.score-low .score-ring-fill { stroke: var(--green); }
.score-mid .score-ring-fill { stroke: var(--yellow); }
.score-high .score-ring-fill { stroke: var(--red); }
/* Neutral gray, deliberately not green/red/yellow - "unknown" isn't a
   point on the suspicion scale, no modules could even run. */
.score-unknown .score-ring-fill { stroke: var(--text-faint); }
.score-unknown .score-ring-text { fill: var(--text-faint); }

/* One-shot, tasteful pulse for a very clean result (score <= 10) - not
   confetti, just a subtle "nice" acknowledgement on the ring itself. */
.verdict-header--celebrate .score-ring {
  animation: celebrate-pulse 1.6s ease-out 1;
}

@keyframes celebrate-pulse {
  0% { filter: drop-shadow(0 0 0 color-mix(in srgb, var(--green) 0%, transparent)); transform: scale(1); }
  35% { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--green) 65%, transparent)); transform: scale(1.07); }
  100% { filter: drop-shadow(0 0 0 color-mix(in srgb, var(--green) 0%, transparent)); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .verdict-header--celebrate .score-ring {
    animation: none;
  }
}

.verdict-header h2 {
  margin: 0 0 3px;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}

.verdict-header p { margin: 0; color: var(--text-dim); font-size: 0.86rem; }

/* Applied alongside the warning-triangle ring (mlConflictRing in app.js) so
   the headline text itself carries the same "not settled" signal as the
   ring - without this, a plain-colored "Likely original" title right next
   to an amber warning triangle read as two contradicting claims side by
   side, confusing exactly the reader (someone who just wants a yes/no) this
   is meant to help most. */
.verdict-header--conflict h2,
.verdict-header--conflict p {
  color: var(--yellow);
}

.verdict-summary {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

.file-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
  font-size: 0.76rem;
  color: var(--text-faint);
}

.verdict-feedback {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.verdict-feedback-question {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.verdict-feedback-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.verdict-feedback-btn {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--panel-border-hover);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.verdict-feedback-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* Shown only when C2PA's own signed manifest declares AI/algorithmic origin
   (see renderResults' c2paConfirmed check) - the single strongest, least
   ambiguous signal this app can show, so it gets a distinct green "verified"
   treatment instead of blending into the module-card grid below.
   Always stacked (text on top, button at the bottom) rather than a side-by-
   side row - verdictCard sits in a narrow middle column on the 3-column
   desktop results layout, and a row layout squeezed the text into an
   uncomfortably narrow strip fighting the button for width. */
.c2pa-confirm-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--green);
  background: var(--green-soft);
}

.c2pa-confirm-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.c2pa-confirm-icon {
  flex-shrink: 0;
  color: var(--green);
}

.c2pa-confirm-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.c2pa-confirm-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.c2pa-confirm-meta {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.c2pa-confirm-download {
  align-self: flex-start;
}

@media (max-width: 480px) {
  .c2pa-confirm-download { width: 100%; }
}

/* Same layout as .c2pa-confirm-banner, red-toned (matching the high-suspicion
   score ring) instead of green - a heuristic ML-consensus signal, not the
   C2PA manifest's cryptographic declaration, so it deliberately doesn't
   borrow the "verified" color. */
.ml-confirm-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--red);
  background: var(--red-soft);
}

.ml-confirm-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ml-confirm-icon {
  flex-shrink: 0;
  color: var(--red);
}

.ml-confirm-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.ml-confirm-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Same layout as .ml-confirm-banner, amber-toned - flags a genuine ML model
   disagreement that the headline verdict couldn't confidently resolve
   either way (see v.ml_disagreement_hidden in app.js), so it deliberately
   uses neither the "confirmed AI" red nor the "clean" green from the score
   ring - a distinct warning color makes clear this is a "worth a second
   look" case, not a verdict of its own. */
.ml-conflict-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--yellow);
  background: var(--yellow-soft);
}

.ml-conflict-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ml-conflict-icon {
  flex-shrink: 0;
  color: var(--yellow);
}

.ml-conflict-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.ml-conflict-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.lang-mismatch-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  font-size: 0.82rem;
  color: var(--text-dim);
}

@media (max-width: 480px) {
  .lang-mismatch-note { flex-direction: column; align-items: stretch; }
}

/* ---------- Photo quality (separate axis from AI-suspicion) ---------- */

.quality-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 64px;
}

.quality-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.quality-good { color: var(--green); }
.quality-mid { color: var(--yellow); }
.quality-poor { color: var(--red); }

.quality-good .score-ring-fill { stroke: var(--green); }
.quality-mid .score-ring-fill { stroke: var(--yellow); }
.quality-poor .score-ring-fill { stroke: var(--red); }

.quality-header-text h2 {
  margin: 0 0 3px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.quality-header-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Two columns once there's room - 7 factors as one long vertical list felt
   like padding, not a polished summary. Falls back to a single column
   below that (matches .cat-bar-row's own mobile override elsewhere). */
.quality-bars {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 28px;
  row-gap: 12px;
  max-width: 880px;
}

@media (min-width: 640px) {
  .quality-bars { grid-template-columns: 1fr 1fr; }
}

.cat-bar-fill.quality-good { background: var(--green); }
.cat-bar-fill.quality-mid { background: var(--yellow); }
.cat-bar-fill.quality-poor { background: var(--red); }

.quality-notes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

/* ---------- Barvy a expozice (merged color/histogram/saturation card) ---------- */

.color-card {
  margin-top: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 64px;
}

.color-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 6px;
}

@media (min-width: 760px) {
  .color-card-body {
    grid-template-columns: minmax(220px, 380px) 1fr;
    align-items: start;
  }
}

.color-card-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.color-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
}

.color-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.color-chip-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.color-chip:hover .color-chip-swatch {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.color-chip-caption {
  font-size: 0.64rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.color-mood-tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.color-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-fact-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  min-width: 150px;
}

.color-fact-chip .quickfact-value {
  font-size: 0.9rem;
}

.color-card-histogram {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
}

/* ---------- Top summary row (file check + AI verdict + quality, side by
   side on wide screens so the page doesn't run so long) ---------- */

.top-summary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

@media (min-width: 1200px) {
  .top-summary-row { grid-template-columns: 1fr 1fr 1fr; }
  /* .quality-bars's own 2-column breakpoint fires on viewport width, but
     here the card itself only gets ~1/3 of that width - force it back to
     a single column so the bars stay readable instead of squeezed. */
  .top-summary-row .quality-bars { grid-template-columns: 1fr; }
}

/* ---------- File verification summary ("is this a genuine, readable image?") ---------- */

.validation-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 64px;
}

.validation-title {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.validation-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.validation-top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.validation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.validation-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.validation-value {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.validation-value--status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.validation-value.score-mid {
  color: var(--yellow);
}

.validation-check {
  flex-shrink: 0;
}

.validation-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 420px) {
  .validation-sub-row { grid-template-columns: 1fr 1fr; }
}

.validation-sub-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
}

.validation-value--message {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Compact "web/print/large-format" teaser inside the File Verification
   card - see usageSummaryHtml() in app.js. Reuses .usage-badge's existing
   good/ok/poor colors (defined near .usage-row below) so this and the
   full "Doporučení pro použití" card never drift out of sync. */
.validation-usage-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.usage-mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usage-mini-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.validation-hash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.validation-value--hash {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--text-dim);
  word-break: break-all;
  line-height: 1.5;
}

.hash-copy-btn {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.hash-copy-btn:hover { border-color: var(--accent); }

/* ---------- Usage recommendations ("can I use this for X?") ---------- */
/* Full card was replaced by the compact teaser in the File Verification
   card (see .validation-usage-badges above) - only the shared badge
   styling remains. */

.usage-badge {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.usage-badge.usage-good { background: var(--green-soft); color: var(--green); }
.usage-badge.usage-ok { background: var(--yellow-soft); color: var(--yellow); }
.usage-badge.usage-poor { background: var(--red-soft); color: var(--red); }

/* ---------- Module groups ---------- */

.module-section {
  margin-top: 52px;
  scroll-margin-top: 76px;
}

.module-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 20px;
  text-align: center;
}

.module-section-title svg { flex-shrink: 0; opacity: 0.8; width: 24px; height: 24px; color: var(--accent); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.module-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  /* Establishes the 3D space .module-card-inner rotates in - without this
     on the (unrotated) parent, the flip would look flat/skewed instead of
     a proper 3D turn. */
  perspective: 1400px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

/* Only the back is a click-anywhere-to-flip surface (see renderModuleCard's
   click handler) - the front's only click target is .module-flip-btn, so it
   doesn't get a pointer cursor implying the whole card is clickable. */
.module-card-back {
  cursor: pointer;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--panel-border-hover);
}

.module-card-primary {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.module-card-external {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px var(--yellow) inset;
}

.module-card-inner {
  position: relative;
  height: 100%;
  min-height: 190px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.module-card--flipped .module-card-inner {
  transform: rotateY(180deg);
}

.module-card-front,
.module-card-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.module-card-front {
  padding: 13px 14px;
}

.module-card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  overflow-y: auto;
  background: var(--panel-2);
  border-radius: var(--radius);
}

.module-card-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
  color: var(--text-faint);
  font-size: 0.76rem;
  font-weight: 700;
  font-style: italic;
  flex-shrink: 0;
}

.module-card-back-title {
  margin: 2px 0 0;
  font-size: 0.86rem;
}

.module-card-back-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
  .module-card-inner { transition: none; }
}

.external-badge-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.external-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--yellow);
  background: var(--yellow-soft);
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

.module-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-links a {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--panel-border);
  padding: 4px 10px;
  border-radius: 999px;
  transition: border-color 0.12s;
}

.module-links a:hover { border-color: var(--accent); }

.license-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}

.license-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 999px;
  line-height: 1.4;
}

.license-badge--paid { color: var(--yellow); background: var(--yellow-soft); }
.license-badge--free { color: var(--green); background: var(--green-soft); }
.license-badge--freemium,
.license-badge--portfolio { color: var(--text-dim); background: var(--panel-border); }

.license-badge-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.license-badge-link:hover { text-decoration: underline; }

.module-links-title {
  margin: 12px 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.module-score-clarifier {
  margin: 2px 0 12px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-dim);
}

.module-found-links {
  margin-top: 4px;
}

.found-links-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.found-links-list a {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.12s;
}

.found-links-list a:hover {
  background: rgba(109, 141, 253, 0.22);
}

/* ---------- Color palette module ---------- */

.color-swatches {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.color-swatch {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.color-swatch-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.55);
  padding: 1px 4px;
  border-radius: 4px 4px 0 0;
  margin-bottom: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}

.color-swatch:hover .color-swatch-label { opacity: 1; }

/* ---------- Metadata extras: camera quick-facts, GPS, full EXIF ---------- */

.privacy-score-box {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  margin-bottom: 12px;
}

.privacy-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.privacy-score-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.privacy-score-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

.privacy-reasons {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.privacy-reasons-none {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
}

.metadata-quickfacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.quickfact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 4px;
}

.quickfact-label {
  color: var(--text-faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quickfact-value {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: break-word;
}

.gps-line {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 8px 0;
}

.gps-line a {
  color: var(--accent);
  margin-left: 6px;
}

.gps-map-embed {
  width: 100%;
  height: 150px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  filter: grayscale(0.15);
}

.metadata-exif-details {
  margin-top: 10px;
  font-size: 0.8rem;
}

.metadata-exif-details summary {
  cursor: pointer;
  color: var(--text-faint);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exif-table {
  margin-top: 8px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.exif-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--text-dim);
  word-break: break-word;
}

.exif-table td:first-child {
  color: var(--text-faint);
  white-space: nowrap;
  width: 40%;
}

/* ---------- Info chips (Vision labels) ---------- */

.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.info-chip {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.module-header h3 {
  font-size: 0.86rem;
  margin: 0;
  font-weight: 650;
}

.module-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* The only click target that flips the card - everything else on the front
   (links, the EXIF <details> disclosure) now behaves normally instead of
   fighting with a whole-card click handler. */
.module-flip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--text-faint);
  background: none;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.module-flip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* How much evidentiary weight this module's finding carries, independent of
   its score on any given photo - a deliberately separate color language
   from the green/yellow/red suspicion-score system, so the two kinds of
   "how much should I trust this" don't get visually conflated. */
.evidence-tag {
  display: inline-block;
  width: fit-content;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  padding: 3px 9px;
  border-radius: 999px;
  margin: 8px 0 2px;
}

.evidence-tag--strong {
  background: var(--accent-soft);
  color: var(--accent);
}

.evidence-tag--supplementary {
  background: var(--panel-2);
  color: var(--text-faint);
}

.evidence-tag--experimental {
  background: color-mix(in srgb, var(--aurora-2) 16%, transparent);
  color: var(--aurora-2);
}

.module-score {
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--panel-2);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

/* Same green/yellow/red convention as the verdict ring, radar chart and
   batch badges elsewhere - a module card should be scannable by color
   alone, without reading the number, when deciding what's worth a look. */
.module-score.score-low { background: var(--green-soft); color: var(--green); }
.module-score.score-mid { background: var(--yellow-soft); color: var(--yellow); }
.module-score.score-high { background: var(--red-soft); color: var(--red); }

/* Purely informational modules (histogram jasu is a real signal and keeps
   a normal score badge - only the always-score-0 ones below) never mean
   "0% suspicious", so a numeric badge there would be actively misleading -
   a neutral, non-judgemental label instead. */
.module-score.score-info { background: var(--panel-2); color: var(--text-faint); font-weight: 700; }

/* A module that didn't run (quota used up, doesn't apply to this photo) is
   not the same thing as "ran and found nothing" - a plain 0/100 badge would
   look identical to a clean result unless you read the note text. */
.module-score.score-na { background: rgba(128, 128, 128, 0.14); color: var(--text-faint); }

.module-heatmap {
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--panel-border);
  display: block;
}

.module-notes {
  margin: 10px 0 0;
  padding-left: 16px;
  color: var(--text-dim);
  font-size: 0.81rem;
}

.module-notes li { margin-bottom: 5px; }

.found-strings-list {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  max-height: 180px;
  overflow-y: auto;
  list-style: none;
}

.found-strings-list li {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
  word-break: break-all;
  padding: 3px 0;
  border-bottom: 1px solid var(--panel-border);
}

.found-strings-list li:last-child { border-bottom: none; }

/* ---------- Visual context (Claude) module ---------- */

.vc-score-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.vc-score-note.score-low { background: var(--green-soft); border-color: rgba(62, 207, 142, 0.3); color: var(--green); }
.vc-score-note.score-mid { background: var(--yellow-soft); border-color: rgba(224, 178, 62, 0.3); color: var(--yellow); }
.vc-score-note.score-high { background: var(--red-soft); border-color: rgba(240, 104, 95, 0.3); color: var(--red); }

.vc-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--text-faint);
  color: var(--text-faint);
  font-size: 0.62rem;
  font-weight: 700;
  font-style: italic;
  cursor: help;
}

.vc-tabs {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vc-tab {
  font: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.vc-tab:hover {
  border-color: var(--panel-border-hover);
  color: var(--text);
}

.vc-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.vc-tab-panel {
  display: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border-left: 2px solid var(--accent);
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.55;
  min-height: 2.4em;
}

.vc-tab-panel.active { display: block; }

.vc-tab-panel-title-print { display: none; }

.vc-disclaimer {
  margin: 12px 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-faint);
  line-height: 1.5;
}

/* ---------- Footer ---------- */

footer { margin-top: auto; padding-top: 56px; }

.footer-nav {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--panel-border);
}

.footer-nav-brand-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-nav-icon {
  display: inline-flex;
  color: var(--accent);
}

.footer-nav-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.footer-nav-desc {
  margin: 0;
  max-width: 320px;
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.6;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.footer-nav-col h4 {
  margin: 0 0 2px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.footer-nav-link {
  width: fit-content;
  font-size: 0.84rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.12s;
}

.footer-nav-link:hover { color: var(--accent); }

@media (max-width: 700px) {
  .footer-nav { grid-template-columns: 1fr; gap: 22px; }
}

.disclaimer {
  font-size: 0.76rem;
  color: var(--text-faint);
  border-top: 1px solid var(--panel-border);
  padding-top: 18px;
  line-height: 1.6;
}

/* .footer-nav already ends on its own divider - skip this one too, or the
   two hairlines stack right on top of each other with only a small gap. */
.footer-nav + .disclaimer {
  border-top: none;
  padding-top: 0;
}

.usage-stats {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--text-faint);
}

.footer-brand {
  margin-top: 22px;
}

.footer-copyright {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-legal-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-faint);
  text-decoration: none;
}

.footer-legal-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-tagline-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  opacity: 0.8;
}

/* ---------- "How it works" explainer subpages ---------- */

.explainer-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 8px auto 28px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--panel) 45%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--panel-border) 70%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.explainer-switch-link {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  transition: color 0.12s, border-color 0.12s, background 0.12s;
}

.explainer-switch-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.explainer-switch-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

/* Content entrance animation for the /how/* explainer pages - plain CSS,
   replays on every full-page navigation between tabs (each tab is its own
   URL). Tried the cross-document View Transitions API here first, but a
   whole-page crossfade between pages with different text/box counts
   produced a distracting ghosting flicker - a per-element fade-up on load
   is simpler, fully predictable, and reads as more intentional. */
@keyframes explainer-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.explainer-intro,
.explainer-box,
.explainer-reliability {
  animation: explainer-fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.explainer-box:nth-child(1) { animation-delay: 70ms; }
.explainer-box:nth-child(2) { animation-delay: 115ms; }
.explainer-box:nth-child(3) { animation-delay: 160ms; }
.explainer-box:nth-child(4) { animation-delay: 205ms; }
.explainer-box:nth-child(5) { animation-delay: 250ms; }
.explainer-box:nth-child(6) { animation-delay: 295ms; }
.explainer-box:nth-child(7) { animation-delay: 340ms; }
.explainer-box:nth-child(n+8) { animation-delay: 385ms; }

.explainer-reliability { animation-delay: 340ms; }

@media (prefers-reduced-motion: reduce) {
  .explainer-intro,
  .explainer-box,
  .explainer-reliability {
    animation: none;
  }
}

.explainer-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.explainer-title {
  margin: 0 0 16px;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-dim) 180%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.explainer-desc {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.65;
}

.explainer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

.explainer-reliability {
  max-width: 680px;
  margin: 0 auto 40px;
  padding: 22px 26px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  text-align: center;
}

.explainer-reliability h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.explainer-reliability p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
}

.reliability-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 18px 0 10px;
  flex-wrap: wrap;
}

.reliability-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.reliability-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.reliability-stat-label {
  font-size: 0.72rem;
  color: var(--text-faint);
  max-width: 160px;
}

.reliability-stats-caption {
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--text-faint);
  font-style: italic;
}

.stats-breakdown-wrap {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--panel-border);
  text-align: left;
}

.stats-breakdown-wrap .cat-bars {
  margin-top: 12px;
}

@media (min-width: 640px) {
  .explainer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
  .explainer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.explainer-box {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s;
}

.explainer-box:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-2px);
}

.explainer-box-glyph {
  position: absolute;
  z-index: -1;
  bottom: -22px;
  right: -18px;
  width: 120px;
  height: 120px;
  color: var(--accent);
  opacity: 0.05;
  pointer-events: none;
  transform: rotate(-8deg) scale(1);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.explainer-box-glyph svg { display: block; width: 100%; height: 100%; }

.explainer-box:hover .explainer-box-glyph {
  opacity: 0.1;
  transform: rotate(-3deg) scale(1.12);
}

.explainer-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.explainer-box h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.explainer-box p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.explainer-box--wide { grid-column: 1 / -1; }

.explainer-box-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.explainer-box:has(.explainer-box-link) {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.explainer-box:has(.explainer-box-link:hover) {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.explainer-box-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.explainer-box-cta:hover { border-color: var(--accent); }

/* ---------- Report export ---------- */

.results-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.results-actions-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.module-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.module-filter-toggle input[type="checkbox"],
.external-ai-box input[type="checkbox"] {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--panel-border-hover);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.module-filter-toggle input[type="checkbox"]::before,
.external-ai-box input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform 0.15s, background 0.15s;
}

.module-filter-toggle input[type="checkbox"]:checked,
.external-ai-box input[type="checkbox"]:checked {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.module-filter-toggle input[type="checkbox"]:checked::before,
.external-ai-box input[type="checkbox"]:checked::before {
  transform: translateX(14px);
  background: var(--accent);
}

#moduleGroups.flagged-only .module-card[data-flagged="0"] { display: none; }
#moduleGroups.flagged-only .module-section.no-flagged-visible { display: none; }

.btn-export {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border-hover);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn-export:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.share-embed-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
}

.share-embed-badge-preview {
  flex-shrink: 0;
  height: 20px;
  width: auto;
}

.share-embed-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.share-embed-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  flex: 1;
  min-width: 220px;
}

.share-embed-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-embed-copy {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border-hover);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}

.btn-embed-copy:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

@media (max-width: 560px) {
  .share-embed-panel { flex-direction: column; align-items: flex-start; }
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .page { padding: 32px 16px 64px; }
  .verdict-header { flex-wrap: wrap; }
  .brand-name { font-size: 1.9rem; }
  .subtitle { font-size: 0.95rem; }
  .module-section-title { font-size: 1.1rem; }
  .module-grid { grid-template-columns: 1fr; }
  .batch-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* .radar-wrap's 320px min-width (a sensible floor on desktop, where it
     shares a row with .verdict-top) forces the whole card wider than a
     phone viewport if left alone - both panels need to be free to drop to
     full-width, stacked, single-column sizing here instead. */
  .verdict-card { padding: 20px; gap: 20px; }
  .verdict-top { min-width: 0; flex-basis: 100%; }
  .radar-wrap { min-width: 0; flex-basis: 100%; padding: 16px 14px 14px; }
  .cat-bar-row { grid-template-columns: 96px 1fr 30px; gap: 8px; }
  .cat-bar-label { font-size: 0.74rem; }
}

/* ---------- Print (PDF export) ---------- */

@media print {
  :root {
    /* Force the light palette regardless of the on-screen theme - printing
       a near-black page wastes ink and most printers/PDF viewers render
       dark-mode glows and shadows poorly. */
    --bg: #ffffff;
    --bg-glow: none;
    --panel: #ffffff;
    --panel-2: #f8f9fc;
    --panel-border: #d8dae2;
    --panel-border-hover: #d8dae2;
    --text: #171922;
    --text-dim: #444a5a;
    --text-faint: #6b7180;
    --accent: #3a58d9;
    --accent-strong: #3a58d9;
    --accent-soft: rgba(58, 88, 217, 0.08);
    --green-soft: rgba(28, 163, 106, 0.10);
    --green: #1b8a5a;
    --yellow-soft: rgba(178, 130, 10, 0.10);
    --yellow: #97690a;
    --red-soft: rgba(214, 62, 52, 0.09);
    --red: #b93227;
    --shadow-sm: none;
    --shadow: none;
  }

  .no-print,
  .dropzone,
  #loading,
  #error,
  .zoom-hint,
  .aurora-bg,
  footer { display: none !important; }

  body { background: #fff; }
  .page { max-width: none; padding: 0; }

  .module-card,
  .verdict-card,
  .image-preview-wrap { box-shadow: none; border: 1px solid var(--panel-border); break-inside: avoid; }

  .module-card, .verdict-card, .batch-card { animation: none; }
  .quick-nav { position: static; }

  /* A printed report should be complete regardless of what the "jen
     podezřelé moduly" toggle was set to on screen. */
  #moduleGroups.flagged-only .module-card[data-flagged="0"],
  #moduleGroups.flagged-only .module-section.no-flagged-visible { display: block; }

  .module-card:hover { transform: none; box-shadow: none; }

  .module-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* An embedded live map iframe won't render in print/PDF output - the
     coordinates text and link right above it stay visible and are what
     actually carries the information on paper. */
  .gps-map-embed { display: none; }

  /* Every visual_context section, not just the tab currently open on
     screen - a printed report should be complete, not reflect whichever
     tab happened to be active when the button was clicked. */
  .vc-tab-panel { display: block !important; margin-top: 8px; }
  .vc-tab-panel-title-print { display: inline; }

  /* Same principle for the collapsed full-EXIF <details> block - a printed
     report should show everything, not just whatever was expanded on
     screen when the button was clicked. */
  .metadata-exif-details summary { display: none; }
  .metadata-exif-details .exif-table { display: table !important; }
  .vc-tabs { display: none; }
}

/* ---------- Floating action button (bookmark / share / resources) ---------- */

.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 52px;
  height: 52px;
}

.fab-toggle {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.2s ease, border-color 0.15s;
}

.fab-toggle:hover { border-color: var(--panel-border-hover); }

.fab.is-open .fab-toggle {
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}

.fab-menu {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(10px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.fab.is-open .fab-menu {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.fab-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.fab-action:hover { color: var(--accent); background: var(--accent-soft); }

.fab-divider {
  width: 1px;
  height: 20px;
  background: var(--panel-border);
  flex: none;
}

.fab-hint {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: max-content;
  max-width: 220px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.fab-hint.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .fab { right: 16px; bottom: 16px; }
}

@media print {
  .fab { display: none; }
}

/* ---------- Resource cards (article teaser on /resources) ---------- */

.resource-card-meta {
  display: block;
  margin-top: 12px;
  color: var(--text-dim);
  opacity: 0.75;
  font-size: 0.74rem;
}

.explainer-box--featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--panel-border));
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 10%, var(--panel)) 0%, var(--panel) 55%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow-sm);
}

.explainer-box--featured:hover {
  border-color: var(--accent);
}

.resource-featured-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Resource article (full rewrite page) ---------- */

.article-wrap {
  max-width: 720px;
  margin: 0 auto 48px;
}

.article-meta {
  margin-bottom: 18px;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.article-meta-dot { margin: 0 6px; opacity: 0.6; }

.article-meta a { color: var(--accent); text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }

.article-title {
  margin: 0 0 26px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--text);
}

.article-body {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.75;
}

.article-body h2 {
  margin: 32px 0 12px;
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.article-body p { margin: 0 0 16px; }

.article-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.article-body li { margin-bottom: 6px; }

.article-body strong { color: var(--text); font-weight: 700; }

/* ---------- Downloadable icon cards (EU AI-labeling icons, in-article) ---------- */

.icon-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0 28px;
}

.icon-download-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-sm);
}

.icon-download-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 88px;
  border-radius: var(--radius);
  background: #f4f5f9;
  margin-bottom: 12px;
}

.icon-download-preview img { display: block; width: 56px; height: 56px; }

.icon-download-card h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.icon-download-links {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 4px 10px;
  font-size: 0.78rem;
}

.icon-download-links .icon-variant-label { color: var(--text-dim); }

.icon-download-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.icon-download-links a:hover { text-decoration: underline; }

.icon-download-all {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 28px;
}

.icon-download-all a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 7px 16px;
  text-decoration: none;
}

.icon-download-all a:hover { filter: brightness(1.05); }

.article-source-box {
  margin-top: 40px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.article-source-box p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  max-width: 460px;
  line-height: 1.6;
}

.article-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Homepage SEO copy + FAQ - inserted between the analyzer and the footer.
   Reuses .article-wrap/.article-body from the resources article pages so
   the prose matches existing typography; only the section heading and the
   FAQ accordion below are new. */
.home-seo-section,
.home-faq-section {
  margin: 56px 0;
}

.home-seo-section > .article-wrap > div > h2,
.home-faq-section > .article-wrap > div > h2 {
  margin: 0 0 20px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.article-body h3 {
  margin: 28px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--text-faint);
  border-bottom: 1.6px solid var(--text-faint);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after { transform: rotate(-135deg); }

.faq-question:hover { color: var(--accent); }

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.65;
}

.faq-answer p { margin: 0; }

.faq-answer a { color: var(--accent); text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

/* ---------- /tools: crop + adjustments ---------- */

.tools-workspace {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* "Vybrat jinou fotku" lives here (not just at the very bottom of the
   sidebar) so swapping the photo - a common, early action - doesn't need
   scrolling past every crop/adjustment to find it. */
.tools-photo-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.tools-photo-info-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tools-photo-info .tools-link-btn--secondary { flex-shrink: 0; }

.tools-photo-info svg { flex-shrink: 0; color: var(--text-faint); }

/* Crops are the primary content (left, wider - "photos first"), the
   sidebar holds every GLOBAL control (color/rotate/export) that applies to
   every crop at once ("more compact" - a narrow side column instead of a
   full-width card). Stacks to one column below the breakpoint, crops still
   first in source order so they stay first when stacked too. */
.tools-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .tools-main-grid { grid-template-columns: 1fr; }
}

.tools-crops-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Sticky only makes sense once the sidebar is actually beside the (often
   much taller, especially with extra formats open) crops column - matches
   the breakpoint above exactly so it never sticks while full-width/stacked. */
.tools-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

@media (min-width: 861px) {
  .tools-sidebar {
    position: sticky;
    top: calc(var(--site-nav-h, 60px) + 14px);
    max-height: calc(100vh - var(--site-nav-h, 60px) - 28px);
    overflow-y: auto;
  }
}

.tools-sidebar-group-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.tools-sidebar-group-label--spaced { margin-top: 20px; }

.tools-sliders-grid--stack {
  grid-template-columns: 1fr;
}

.tools-crops-row {
  display: grid;
  /* 2:1 column-width ratio matches the 2:1 vs 1:1 viewport aspect ratios
     below, so both viewports come out the same height (col width / aspect
     ratio) instead of the square one towering over the wide one. This
     alone isn't pixel-exact - see .tools-crop-col--square below for the
     other half of the fix. */
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 760px) {
  .tools-crops-row { grid-template-columns: 1fr; }
  /* The fixed-height sizing below would make a 16:9 frame ~460px wide -
     wider than the phone - so stack these full-width like the base pair,
     letting each aspect ratio set its own height instead. */
  .tools-crops-row--extra { flex-direction: column; }
  .tools-crops-row--extra .tools-crop-col { width: 100%; }
  .tools-crops-row--extra .tools-crop-viewport { width: 100%; height: auto; }
}

/* Same card treatment as .tools-controls-row below - kept as its own rule
   rather than a shared selector after this one was accidentally merged
   into .tools-step-title's rule during the two-column redesign, silently
   dropping the background/border/padding entirely (not just the 20px
   horizontal padding the height-matching math below depends on) until a
   later screenshot caught the resulting misalignment. */
.tools-crop-col {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.tools-step-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.tools-controls-row {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.tools-export-hint {
  margin: 4px 0 14px;
}

/* The square column's other half of the height-matching fix (with the 2fr/
   1fr split above). Column *widths* follow that 2:1 ratio exactly, but each
   column also subtracts its own horizontal padding before the viewport
   inside it gets sized - and a flat 20px on both sides only cancels out of
   the ratio if it's the same fraction of each column, which it isn't once
   column width itself differs 2:1. Concretely, with wide/square column
   widths 2C/C: viewport widths are (2C - 40) and (C - 20); those are only
   in a true 2:1 ratio (equal resulting heights) if the square column's
   padding is exactly half the wide column's - (2C-40) = 2*(C-20) holds for
   any C, but (2C-40) = 2*(C-10) does not. Halving it here (10px vs 20px)
   is that exact counterweight, not a stylistic tweak - mixing fr and px in
   one calc() would express this directly, but that's invalid inside
   grid-template-columns, so it's applied as padding on the narrower column
   instead. */
.tools-crop-col--square {
  padding-left: 10px;
  padding-right: 10px;
}

.tools-crop-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tools-crop-title {
  margin: 0;
  /* A flex item's default min-width is its own unbroken content width
     (170px+ for "Web banner 2000×1000") - on a narrow crop column (the
     square one, or mobile widths) that forced this whole row wider than
     its card, pushing .tools-crop-reset-btn out past the right edge
     entirely (confirmed via horizontal scroll on a 375px viewport) instead
     of letting the title wrap onto two lines like it should. */
  min-width: 0;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 600;
}

.tools-crop-title small {
  margin-left: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-faint);
}

/* Clears only this one crop's own pan/zoom/fit-mode (see resetBtn in
   createCrop(), tools.js) - a lighter-weight sibling to the page-wide
   "Obnovit výchozí" button, which resets color grading and every crop at
   once. Same compact round-icon pattern as .tools-fit-toggle's pill, just
   circular since there's no label text here (title says what it is via
   tooltip/aria-label instead - see data-i18n-title). */
.tools-crop-reset-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tools-crop-reset-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tools-crop-title-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

/* Only custom (typed-in) sizes get this - chip-added extras are removed by
   re-clicking their chip instead, which doesn't exist for a typed size. */
.tools-crop-remove-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tools-crop-remove-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* The opt-in formats have arbitrary aspect ratios, so unlike the fixed
   2fr/1fr pair above they can't share one column ratio. Each viewport gets
   a fixed height instead and derives its own width from its aspect-ratio,
   which also lines their frames up along a common baseline. */
.tools-crops-row--extra {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  margin-top: 20px;
}

.tools-crops-row--extra:empty { margin-top: 0; }

.tools-crops-row--extra .tools-crop-col { flex: 0 0 auto; }

.tools-crops-row--extra .tools-crop-viewport {
  width: auto;
  height: 260px;
}

.tools-extra { margin-top: 20px; }

.tools-extra-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 600;
}

.tools-extra-caret { transition: transform 0.18s ease; }
.tools-extra-toggle.is-open .tools-extra-caret { transform: rotate(90deg); }

.tools-extra-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  margin-top: 14px;
  padding: 16px 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.tools-extra-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tools-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools-custom-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools-custom-form input[type="number"] {
  width: 84px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.85rem;
}

.tools-custom-form input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
}

.tools-custom-x { flex-shrink: 0; color: var(--text-faint); }

#toolsCustomHint:not(:empty) { color: var(--red); }

.tools-format-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tools-format-chip small {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-faint);
}

.tools-format-chip:hover { border-color: var(--accent); }

.tools-format-chip.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--panel);
}

/* Always reserves one line of height, empty or not (updateUpscaleNote() in
   tools.js only ever changes its textContent, never display:none/.hidden) -
   without this, whichever crop happens not to need the note that moment
   (varies per photo/zoom) sat noticeably taller than its sibling column,
   throwing the zoom row and download button out of alignment between them. */
.tools-upscale-note {
  margin: 10px 0 0;
  min-height: 1.1rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--yellow);
}

.tools-controls-row h3 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.tools-crop-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--bg);
  cursor: grab;
  touch-action: none;
}

.tools-crop-viewport--wide { aspect-ratio: 2 / 1; }
.tools-crop-viewport--square { aspect-ratio: 1 / 1; }

.tools-crop-viewport.is-dragging { cursor: grabbing; }

/* Rule-of-thirds composition grid - two vertical + two horizontal hairlines
   at the 1/3 and 2/3 marks, drawn as four separately-positioned 1px
   background-image layers (exact placement, no extra DOM element needed).
   mix-blend-mode: difference inverts against whatever's underneath instead
   of using a fixed line color, so the lines stay visible over both a dark
   night sky and a bright white wall in the same photo. Pure decoration
   (pointer-events: none) - doesn't affect the actual crop math at all. */
.tools-crop-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0.55;
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px;
  background-position: 33.3334% 0, 66.6667% 0, 0 33.3334%, 0 66.6667%;
}

.tools-crop-viewport canvas {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.tools-drag-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 11, 15, 0.72);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  /* Wraps rather than nowrap because the opt-in formats include narrow
     portrait frames (A4 at 300 DPI is only ~180px wide here), where a
     single-line pill would spill past both edges and get clipped. */
  max-width: calc(100% - 16px);
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.tools-drag-hint.is-hidden { opacity: 0; }

.tools-zoom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

/* Toggles the crop viewport's minimum scale between "cover" (fills the
   frame, crops overflow - the default) and "contain" (shows the whole
   photo, padding any leftover space with white) - see createCrop()'s
   baseScale() in tools.js. Same compact-pill look as .tools-format-chip,
   just smaller since it lives inline in the zoom row rather than its own
   row. */
.tools-fit-toggle {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tools-fit-toggle:hover { border-color: var(--accent); }

.tools-fit-toggle.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--panel);
}

.tools-zoom-row .tools-slider-label { flex-shrink: 0; }

.tools-zoom-row .tools-slider-value {
  flex-shrink: 0;
  min-width: 34px;
  text-align: right;
}

/* Same layout as .tools-zoom-row - only shown while fit mode is on (see
   setFitMode() in tools.js), controls createCrop()'s marginFraction() in
   real target-image px instead of the old fixed 6% constant. */
.tools-margin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.tools-margin-row .tools-slider-label { flex-shrink: 0; }

.tools-margin-row .tools-slider-value {
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
}

.tools-download-btn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}

.tools-transform-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tools-icon-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tools-icon-btn svg { flex-shrink: 0; }

.tools-icon-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tools-icon-btn.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--panel);
}

.tools-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 28px;
}


.tools-bottom-actions {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.tools-link-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
}

.tools-link-btn:hover { color: var(--text); }

.tools-link-btn--secondary {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.tools-link-btn--secondary:hover { color: var(--accent); }

.tools-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tools-slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.tools-slider-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.tools-slider-value {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.tools-workspace input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--panel-border);
  outline: none;
  cursor: pointer;
}

.tools-workspace input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.tools-workspace input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.tools-workspace input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--panel-border);
}
