/* ════════════════════════════════════════════════════════════════════════
   Accessibility Testing Framework — premium LIGHT design system
   Light glass · animated mesh gradient · 3D tilt · spring motion · 60fps
   High-contrast dark text for AA readability. transform/opacity only.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Surfaces & text (light, high contrast) ── */
  --bg:           #eaecf8;
  --text:         #12152b;   /* ~16:1 on white */
  --text-2:       #2a2f4a;
  --muted:        #545b78;   /* ~7:1 on white  */
  --faint:        #7c84a3;
  --border:       rgba(20, 23, 55, .09);
  --border-soft:  rgba(20, 23, 55, .055);

  --surface:      rgba(255, 255, 255, .68);
  --surface-2:    rgba(255, 255, 255, .9);
  --card-grad:    linear-gradient(157deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .62) 100%);

  /* ── Brand accents ── */
  --accent:       #5b54e6;
  --accent-dark:  #4a40d8;
  --accent-2:     #8b5cf6;
  --accent-3:     #0e9bbd;
  --accent-soft:  rgba(91, 84, 230, .10);
  --accent-soft2: rgba(139, 92, 246, .10);

  /* ── Semantic (AA on their soft bg) ── */
  --pass:        #0f7a39;
  --pass-soft:   #e6f7ed;
  --fail:        #c0271f;
  --fail-soft:   #fdeceb;
  --warn:        #a85706;
  --warn-soft:   #fdf2e2;
  --info:        #1850d6;
  --info-soft:   #e9effe;

  --radius-l: 22px;
  --radius:   15px;
  --radius-s: 11px;

  /* layered, brand-tinted shadows (Stripe/Vercel feel) */
  --shadow-s:    0 1px 2px rgba(20, 23, 55, .06), 0 6px 18px rgba(79, 70, 229, .07);
  --shadow-m:    0 4px 12px rgba(20, 23, 55, .08), 0 18px 44px rgba(79, 70, 229, .14);
  --shadow-lift: 0 12px 26px rgba(79, 70, 229, .18), 0 34px 66px rgba(20, 23, 55, .16);

  --grad-accent: linear-gradient(120deg, #6366f1 0%, #8b5cf6 48%, #06b6d4 118%);
  --grad-warm:   linear-gradient(120deg, #8b5cf6, #ec4899);
  --grad-text:   linear-gradient(95deg, #4f46e5 0%, #7c3aed 45%, #0891b2 100%);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: hidden;
  animation: body-in .5s var(--ease-out) both;
}

@keyframes body-in { from { opacity: 0; } to { opacity: 1; } }

body.page-leave {
  opacity: 0;
  transform: scale(.99);
  transition: opacity .26s ease, transform .26s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 5px;
}

::selection { background: rgba(99, 102, 241, .22); color: #1a1640; }

a { color: var(--accent-dark); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, .26);
  border: 3px solid transparent;
  border-radius: 99px;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(79, 70, 229, .42); }

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

/* ══ Animated mesh-gradient background ════════════════════════════════════ */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 760px at 78% -12%, rgba(129, 140, 248, .30), transparent 58%),
    radial-gradient(1000px 680px at -8% 22%, rgba(167, 139, 250, .26), transparent 58%),
    radial-gradient(1100px 760px at 62% 118%, rgba(34, 211, 238, .20), transparent 58%),
    radial-gradient(900px 620px at 18% 96%, rgba(236, 72, 153, .12), transparent 56%),
    linear-gradient(180deg, #f3f4fd 0%, #eaecf8 60%, #eef0fb 100%);
}

/* slowly rotating conic mesh sheen → "moving light" */
.bg-fx::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 150vmax; height: 150vmax;
  margin: -75vmax 0 0 -75vmax;
  background: conic-gradient(from 0deg,
    rgba(99, 102, 241, .10), rgba(139, 92, 246, .04),
    rgba(6, 182, 212, .09),  rgba(236, 72, 153, .04),
    rgba(99, 102, 241, .10));
  filter: blur(40px);
  opacity: .7;
  animation: mesh-spin 40s linear infinite;
}

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

.aurora {
  position: absolute;
  width: 58vmax; height: 58vmax;
  border-radius: 50%;
  filter: blur(64px);
  opacity: .55;
  mix-blend-mode: multiply;
  will-change: transform;
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
.aurora.a1 { top: -26vmax; right: -14vmax; background: radial-gradient(circle at 35% 35%, rgba(129, 140, 248, .55), transparent 62%); }
.aurora.a2 { bottom: -28vmax; left: -16vmax; background: radial-gradient(circle at 60% 40%, rgba(167, 139, 250, .48), transparent 62%); animation-duration: 30s; animation-delay: -7s; }
.aurora.a3 { top: 24%; left: 44%; width: 44vmax; height: 44vmax; background: radial-gradient(circle at 50% 50%, rgba(45, 212, 238, .40), transparent 62%); animation-duration: 36s; animation-delay: -15s; }

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(4vmax, -3vmax, 0) scale(1.14) rotate(14deg); }
  100% { transform: translate3d(-3vmax, 4vmax, 0) scale(.92) rotate(-12deg); }
}

.bg-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(79, 70, 229, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, .05) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 92% 72% at 50% 0%, #000 28%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 92% 72% at 50% 0%, #000 28%, transparent 76%);
}

#fxCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .bg-fx::before { animation: none; }
  #fxCanvas { display: none; }
}

/* ══ Scroll / load reveal ═════════════════════════════════════════════════ */

html.js .reveal {
  opacity: 0;
  transform: translateY(34px) scale(.965);
  transition:
    opacity .72s var(--ease-out),
    transform .72s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
html.js .reveal.in { opacity: 1; transform: none; will-change: auto; }
/* after the entrance plays, hand control to the card's own transitions
   (box-shadow / border) — but NOT transform, so JS tilt stays responsive */
html.js .reveal.in.done {
  transition: box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}

html.js .reveal-left  { transform: translateX(-36px) scale(.98); }
html.js .reveal-right { transform: translateX(36px) scale(.98); }
html.js .reveal-left.in, html.js .reveal-right.in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

.float-y { animation: float-y 5.5s ease-in-out infinite; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ══ Header — sticky light glass ══════════════════════════════════════════ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(20, 23, 55, .07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 6px 24px rgba(79, 70, 229, .05);
}

.header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .8), rgba(6, 182, 212, .7), transparent);
  background-size: 220% 100%;
  animation: hairline-slide 7s linear infinite;
}
@keyframes hairline-slide { from { background-position: 130% 0; } to { background-position: -130% 0; } }

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hdr-logo {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 24px;
  background: var(--grad-accent);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius-s);
  box-shadow: 0 8px 22px rgba(99, 102, 241, .4);
  flex: none;
  animation: float-y 5.5s ease-in-out infinite;
}

.hdr-title { min-width: 0; }
.hdr-title h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  background: var(--grad-text);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: text-pan 8s ease-in-out infinite alternate;
}
@keyframes text-pan { to { background-position: 100% 0; } }
.hdr-title p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.hdr-badges {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; justify-content: flex-end;
}

.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  text-decoration: none;
  max-width: 240px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow-s);
  transition: transform .22s var(--ease-spring), background .2s, border-color .2s, box-shadow .2s;
}
.badge-pill.badge-accent {
  background: var(--accent-soft);
  border-color: rgba(91, 84, 230, .28);
  color: var(--accent-dark);
}
a.badge-pill:hover {
  background: #fff;
  border-color: rgba(91, 84, 230, .35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}
a.badge-pill:active { transform: translateY(0); }

/* ══ Layout ═══════════════════════════════════════════════════════════════ */

.page { max-width: 1320px; margin: 0 auto; padding: 26px 28px 52px; }

.layout {
  display: grid;
  grid-template-columns: minmax(400px, 1.04fr) 1fr;
  gap: 22px;
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.full-width { margin-top: 20px; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .header-inner { padding: 12px 18px; }
  .page { padding: 18px 18px 44px; }
}

/* ── Idle "ready" panel (fills the right column before a scan) ──────────── */
.idle-state { padding: 30px 26px 28px; text-align: center; }
.idle-badge {
  width: 62px; height: 62px;
  margin: 2px auto 14px;
  display: grid; place-items: center;
  font-size: 30px;
  border-radius: 18px;
  background: var(--accent-soft);
  border: 1px solid var(--border-soft);
}
.idle-title { margin: 0 0 7px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.idle-sub { margin: 0 auto 20px; max-width: 380px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.idle-points { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.idle-point {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-s);
}
.idle-point-ic { flex: none; font-size: 16px; line-height: 1.3; }

/* ══ Cards — light glass, layered depth, 3D tilt ══════════════════════════ */

.card {
  position: relative;
  background: var(--card-grad);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
  overflow: hidden;
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  transition:
    box-shadow .35s var(--ease-out),
    border-color .35s var(--ease-out);
}

/* crisp top light edge */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
  pointer-events: none;
  z-index: 2;
}

/* cursor-tracked sheen (fx.js sets --mx/--my) */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(580px circle at var(--mx, 50%) var(--my, -30%),
              rgba(129, 140, 248, .14), transparent 44%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(129, 140, 248, .4);
  box-shadow: var(--shadow-lift);
}
.card:hover::after { opacity: 1; }


.card-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.card-hd-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 18px;
  background: linear-gradient(150deg, var(--accent-soft), var(--accent-soft2));
  border: 1px solid rgba(91, 84, 230, .2);
  border-radius: var(--radius-s);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 12px rgba(91, 84, 230, .12);
  flex: none;
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.card:hover .card-hd-icon {
  box-shadow: 0 8px 22px rgba(91, 84, 230, .3);
}

.card-hd-title { font-size: 15.5px; font-weight: 800; letter-spacing: -.015em; color: var(--text); }
.card-hd-sub   { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.card-body { padding: 18px 22px 22px; }

/* ══ Form fields ══════════════════════════════════════════════════════════ */

.field { margin-bottom: 16px; }

.field-lbl {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 7px;
}

.req-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fail);
  box-shadow: 0 0 0 0 rgba(192, 39, 31, .5);
  animation: req-pulse 2.2s ease-in-out infinite;
}
@keyframes req-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 39, 31, .45); }
  50%      { box-shadow: 0 0 0 5px rgba(192, 39, 31, 0); }
}

input[type="url"], input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, .85);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  box-shadow: inset 0 1px 2px rgba(20, 23, 55, .04);
  transition: border-color .2s, box-shadow .25s, background .2s, transform .2s var(--ease-spring);
}
input::placeholder { color: var(--faint); }
input:hover:not(:focus) { border-color: rgba(91, 84, 230, .35); }
input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(91, 84, 230, .15), 0 8px 20px rgba(91, 84, 230, .12);
}

.field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; transition: color .2s; }
.field-hint.ok  { color: var(--pass); }
.field-hint.bad { color: var(--warn); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 18px 0; }

.section-lbl {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint);
  margin-bottom: 10px;
}

/* ══ Sliders ══════════════════════════════════════════════════════════════ */

.slider-wrap { display: flex; align-items: center; gap: 12px; }

.slider-wrap input[type="range"] {
  --pct: 0%;
  flex: 1;
  appearance: none;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, #6366f1 0%, #8b5cf6 var(--pct), rgba(20, 23, 55, .1) var(--pct));
  cursor: pointer;
  transition: filter .2s;
}
.slider-wrap input[type="range"]:hover { filter: brightness(1.06) saturate(1.1); }
.slider-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 84, 230, .14), 0 2px 8px rgba(20, 23, 55, .25);
  transition: transform .18s var(--ease-spring), box-shadow .2s;
}
.slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 7px rgba(91, 84, 230, .18), 0 2px 10px rgba(20, 23, 55, .25);
}
.slider-wrap input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.28); }
.slider-wrap input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--accent);
}

.slider-val {
  min-width: 44px;
  text-align: center;
  padding: 5px 8px;
  font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 84, 230, .22);
  border-radius: 8px;
  transition: transform .15s var(--ease-spring);
}
.slider-val.bump { animation: val-bump .3s var(--ease-spring); }
@keyframes val-bump { 50% { transform: scale(1.22); } }

/* ══ Option rows (radio cards) ════════════════════════════════════════════ */

.opt-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .55);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .2s;
}
.opt-row:hover {
  border-color: rgba(91, 84, 230, .4);
  background: #fff;
  box-shadow: var(--shadow-s);
}
.opt-row input[type="radio"] { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.opt-row:has(input:checked) {
  border-color: rgba(91, 84, 230, .55);
  background: linear-gradient(150deg, var(--accent-soft), rgba(255, 255, 255, .4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 6px 18px rgba(91, 84, 230, .14);
}
.opt-main { font-size: 13.5px; font-weight: 600; color: var(--text); }
.opt-sub  { font-size: 12px; color: var(--muted); margin-top: 1px; }

.rec-tag {
  display: inline-block; margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  color: var(--pass); background: var(--pass-soft);
  border: 1px solid rgba(15, 122, 57, .25);
  border-radius: 99px; vertical-align: 1px;
}

/* ══ Test chips ═══════════════════════════════════════════════════════════ */

.test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .test-grid { grid-template-columns: 1fr; } }

.test-chip {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .55);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: border-color .18s, background .18s, opacity .18s, box-shadow .2s;
}
.test-chip:hover { box-shadow: var(--shadow-s); border-color: rgba(91, 84, 230, .4); background: rgba(255, 255, 255, .8); }
.test-chip input[type="checkbox"] { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.test-chip:has(input:checked) {
  border-color: rgba(91, 84, 230, .5);
  background: linear-gradient(150deg, var(--accent-soft), rgba(255, 255, 255, .5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.test-chip:not(:has(input:checked)) { opacity: .62; }
.chip-main { font-size: 13px; font-weight: 600; color: var(--text); }
.chip-sub  { font-size: 11.5px; color: var(--muted); }

/* ══ Accordion ════════════════════════════════════════════════════════════ */

.accordion {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  margin-top: 16px; overflow: hidden;
  background: rgba(255, 255, 255, .5);
  transition: border-color .25s, box-shadow .25s;
}
.accordion:hover { border-color: rgba(91, 84, 230, .3); }
.accordion[open] { border-color: rgba(91, 84, 230, .4); box-shadow: var(--shadow-s); }
.accordion > summary {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, .6);
  user-select: none;
  transition: background .2s;
}
.accordion > summary:hover { background: #fff; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary .acc-arrow { margin-left: auto; transition: transform .35s var(--ease-spring); color: var(--muted); font-size: 11px; }
.accordion[open] > summary .acc-arrow { transform: rotate(180deg); }
.acc-body { padding: 16px; border-top: 1px solid var(--border-soft); animation: acc-in .35s var(--ease-out); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ══ Toggle switches ══════════════════════════════════════════════════════ */

.toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px; margin: 0 -6px;
  cursor: pointer; border-radius: var(--radius-s);
  transition: background .2s;
}
.toggle-row:hover { background: rgba(91, 84, 230, .05); }
.toggle-row + .toggle-row { border-top: 1px solid var(--border-soft); }
.toggle-info { flex: 1; min-width: 0; }
.ti-main { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ti-sub  { font-size: 12px; color: var(--muted); }

.sw { position: relative; flex: none; width: 46px; height: 25px; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.sw-track {
  position: absolute; inset: 0; border-radius: 99px;
  background: rgba(20, 23, 55, .16);
  transition: background .25s, box-shadow .25s; pointer-events: none;
}
.sw-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 23, 55, .35);
  transition: transform .28s var(--ease-spring); pointer-events: none;
}
.sw input:checked ~ .sw-track { background: var(--grad-accent); box-shadow: 0 2px 12px rgba(99, 102, 241, .45); }
.sw input:checked ~ .sw-thumb { transform: translateX(21px); }
.sw input:active ~ .sw-thumb { transform: scaleX(1.18); }
.sw input:checked:active ~ .sw-thumb { transform: translateX(21px) scaleX(1.18); }
.sw input:focus-visible ~ .sw-track { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ══ Buttons ══════════════════════════════════════════════════════════════ */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font: inherit; font-weight: 700;
  border-radius: var(--radius-s);
  border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  overflow: hidden; transform: translateZ(0);
  transition: transform .2s var(--ease-spring), box-shadow .25s, background .2s, border-color .2s, filter .2s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: var(--grad-accent);
  background-size: 170% 100%;
  box-shadow: 0 6px 20px rgba(99, 102, 241, .42), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-primary::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -80%; width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-20deg);
  transition: left .6s var(--ease-out); pointer-events: none;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(99, 102, 241, .55), inset 0 1px 0 rgba(255, 255, 255, .3);
  background-position: 100% 0;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* breathing glow ring to draw the eye to the main CTA */
.btn-glow { animation: btn-glow 2.8s ease-in-out infinite; }
@keyframes btn-glow {
  0%, 100% { box-shadow: 0 6px 20px rgba(99, 102, 241, .42), inset 0 1px 0 rgba(255, 255, 255, .3); }
  50%      { box-shadow: 0 6px 30px rgba(99, 102, 241, .65), 0 0 0 4px rgba(99, 102, 241, .1), inset 0 1px 0 rgba(255, 255, 255, .3); }
}
.btn-glow:hover { animation: none; }

.btn-outline {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, .7);
  border-color: var(--border);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-outline:hover {
  border-color: rgba(91, 84, 230, .45);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}

.btn-block { width: 100%; }
.btn-lg { padding: 15px 22px; font-size: 15px; }

.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: scale(0);
  animation: ripple .6s var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ══ Global click burst — fires anywhere on the page ══════════════════════ */

.click-fx-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
  contain: strict;
}

/* ══ PDF generation progress overlay ══════════════════════════════════════ */

.pdf-ov-back {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: rgba(12, 14, 30, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.pdf-ov-back.show { opacity: 1; pointer-events: auto; }

.pdf-ov {
  width: min(420px, calc(100vw - 40px));
  text-align: center;
  padding: 28px 30px 26px;
  background: var(--card-grad);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-lift);
  transform: scale(.92); transition: transform .3s var(--ease-spring);
}
.pdf-ov-back.show .pdf-ov { transform: scale(1); }

.pdf-ov-ic { font-size: 30px; animation: float-y 2.4s ease-in-out infinite; }
.pdf-ov-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 8px 0 4px; color: var(--text); }
.pdf-ov-msg { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; min-height: 18px; }

.pdf-ov-track {
  height: 10px; border-radius: 99px;
  background: rgba(20, 23, 55, .1); overflow: hidden;
}
.pdf-ov-bar {
  height: 100%; width: 0; border-radius: 99px;
  background: var(--grad-accent);
  box-shadow: 0 0 14px rgba(99, 102, 241, .55);
  transition: width .35s var(--ease-out);
  position: relative; overflow: hidden;
}
.pdf-ov-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  background-size: 200% 100%; animation: bar-shimmer 1.4s linear infinite;
}
.pdf-ov-pct {
  margin-top: 10px; font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pdf-ov.err .pdf-ov-bar { background: var(--fail); box-shadow: none; }
.pdf-ov.err .pdf-ov-msg { color: var(--fail); }

/* soft glow flash */
.click-glow {
  position: fixed;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, .5), rgba(139, 92, 246, .18) 45%, transparent 70%);
  transform: scale(.25);
  will-change: transform, opacity;
  animation: click-glow .5s var(--ease-out) forwards;
}
@keyframes click-glow {
  0%   { transform: scale(.25); opacity: .9; }
  100% { transform: scale(1.5);  opacity: 0; }
}

/* expanding ring */
.click-ring {
  position: fixed;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2.5px solid rgba(99, 102, 241, .75);
  box-shadow: 0 0 14px rgba(99, 102, 241, .45);
  transform: scale(0);
  will-change: transform, opacity;
  animation: click-ring .62s var(--ease-out) forwards;
}
@keyframes click-ring {
  0%   { transform: scale(0);   opacity: 1;  border-width: 3px; }
  70%  { opacity: .55; }
  100% { transform: scale(5);   opacity: 0;  border-width: 1px; }
}

/* flying sparks */
.click-spark {
  position: fixed;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: hsl(var(--h, 248) 92% 66%);
  box-shadow: 0 0 8px hsl(var(--h, 248) 92% 66% / .85);
  will-change: transform, opacity;
  animation: click-spark .58s var(--ease-out) forwards;
}
@keyframes click-spark {
  0%   { transform: translate(0, 0) scale(1);   opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .click-fx-layer { display: none; }
}

.stop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--fail);
  background: var(--fail-soft);
  border: 1.5px solid rgba(192, 39, 31, .25);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.stop-btn:hover:not(:disabled) { background: #fbdedc; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(192, 39, 31, .2); }
.stop-btn:active:not(:disabled) { transform: translateY(1px); }
.stop-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ══ Progress panel ═══════════════════════════════════════════════════════ */

.prog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.prog-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.prog-status-msg { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-chip {
  flex: none; padding: 5px 12px;
  border-radius: 99px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent;
  transition: background .3s, color .3s;
}
.sc-running { color: var(--info); background: var(--info-soft); border-color: rgba(24, 80, 214, .2); }
.sc-done    { color: var(--pass); background: var(--pass-soft); border-color: rgba(15, 122, 57, .2); }
.sc-error   { color: var(--fail); background: var(--fail-soft); border-color: rgba(192, 39, 31, .2); }
.sc-stopped { color: var(--warn); background: var(--warn-soft); border-color: rgba(168, 87, 6, .2); }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.step-track { display: flex; justify-content: space-between; margin: 4px 6px 18px; position: relative; }
.step-track::before {
  content: ""; position: absolute;
  top: 18px; left: 30px; right: 30px; height: 3px;
  background: rgba(20, 23, 55, .1); border-radius: 99px;
}
.step-track::after {
  content: ""; position: absolute;
  top: 18px; left: 30px; height: 3px; border-radius: 99px;
  width: calc((100% - 60px) * var(--sp, 0) / 100);
  background: var(--grad-accent);
  box-shadow: 0 0 12px rgba(99, 102, 241, .6);
  transition: width .6s var(--ease-out);
}
.step-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 54px; }
.step-dot {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-size: 15px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-s);
  transition: border-color .3s, background .3s, transform .35s var(--ease-spring), box-shadow .3s;
}
.step-lbl { font-size: 11px; font-weight: 600; color: var(--muted); transition: color .3s; }
.step-item.active .step-dot {
  border-color: var(--accent);
  background: linear-gradient(150deg, #fff, var(--accent-soft));
  transform: scale(1.16);
  box-shadow: 0 0 0 5px rgba(91, 84, 230, .12), 0 6px 18px rgba(99, 102, 241, .4);
  animation: step-glow 2s ease-in-out infinite;
}
@keyframes step-glow { 50% { box-shadow: 0 0 0 8px rgba(91, 84, 230, .06), 0 6px 24px rgba(99, 102, 241, .55); } }
.step-item.active .step-lbl { color: var(--accent-dark); }
.step-item.done .step-dot { border-color: var(--pass); background: var(--pass-soft); color: var(--pass); }
.step-item.done .step-lbl { color: var(--pass); }

.prog-bar-wrap { height: 10px; background: rgba(20, 23, 55, .08); border-radius: 99px; overflow: hidden; margin-bottom: 7px; }
.prog-bar {
  position: relative; height: 100%; border-radius: 99px;
  background: var(--grad-accent);
  box-shadow: 0 0 14px rgba(99, 102, 241, .5);
  transition: width .45s var(--ease-out); overflow: hidden;
}
.prog-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: bar-shimmer 1.5s linear infinite;
}
@keyframes bar-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* live activity row: pulsing dot + message + big percentage */
.prog-live {
  display: flex; align-items: center; gap: 9px;
  margin: 2px 0 12px;
}
.live-dot {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(91, 84, 230, .5);
  animation: live-dot 1.5s ease-out infinite;
}
@keyframes live-dot {
  0%   { box-shadow: 0 0 0 0 rgba(91, 84, 230, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(91, 84, 230, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 84, 230, 0); }
}
.prog-live-msg {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prog-pct {
  flex: none;
  font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* live stat tiles */
.prog-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.ps {
  text-align: center;
  padding: 12px 6px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-s);
}
.ps-val {
  font-size: 20px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  color: var(--accent-dark);
  transition: transform .2s var(--ease-spring);
}
.ps-val.bump { animation: ps-bump .32s var(--ease-spring); }
@keyframes ps-bump {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.28); color: var(--accent-2); }
  100% { transform: scale(1); }
}
.ps-tot { font-size: 13px; font-weight: 700; color: var(--faint); }
.ps-lbl { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-top: 3px; letter-spacing: .01em; }

@media (max-width: 460px) {
  .prog-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ══ Log console (kept dark for terminal legibility) ══════════════════════ */

.log-hd { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.log-clear-btn {
  font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: rgba(255, 255, 255, .6);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 3px 10px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.log-clear-btn:hover { color: var(--text); border-color: rgba(91, 84, 230, .35); background: #fff; }

.log-console {
  height: 320px; overflow-y: auto;
  background: #0c1022;
  border: 1px solid rgba(20, 23, 55, .15);
  border-radius: var(--radius-s);
  box-shadow: inset 0 2px 16px rgba(0, 0, 0, .35);
  padding: 12px 14px;
  font-family: var(--mono); font-size: 11.8px; line-height: 1.75;
}
.log-empty { color: #5b648c; font-style: italic; }
.ll { display: flex; gap: 10px; color: #c2c9e8; word-break: break-all; animation: log-in .25s var(--ease-out) both; }
@keyframes log-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.ll.dim { opacity: .55; animation: none; }
.ll.ok { color: #7ef0ab; }
.ll.err { color: #ff9b9b; }
.ll.warn { color: #ffd98a; }
.ll.info { color: #9fc2ff; }
.ll-time { flex: none; min-width: 38px; color: #5c6694; }

/* ══ Result panel — KPI cards ═════════════════════════════════════════════ */

.result-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.rk {
  text-align: center;
  padding: 16px 10px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-s);
  transition: transform .25s var(--ease-spring), box-shadow .25s, border-color .25s;
  animation: kpi-pop .5s var(--ease-spring) both;
}
.rk:nth-child(2) { animation-delay: .08s; }
.rk:nth-child(3) { animation-delay: .16s; }
.rk:nth-child(4) { animation-delay: .24s; }
@keyframes kpi-pop { from { opacity: 0; transform: scale(.82) translateY(12px); } to { opacity: 1; transform: none; } }
.rk:hover { border-color: rgba(91, 84, 230, .35); box-shadow: var(--shadow-m); }
.rk-val { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rk-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.result-path { width: 100%; font-size: 11.5px; color: var(--muted); word-break: break-all; }

.callout {
  display: flex; gap: 10px; margin-top: 16px;
  padding: 12px 14px; font-size: 12.5px;
  color: var(--info); background: var(--info-soft);
  border: 1px solid rgba(24, 80, 214, .18);
  border-radius: var(--radius-s);
}

/* ══ Info list ════════════════════════════════════════════════════════════ */

.info-list { padding: 4px 0 10px; }
.info-row {
  display: flex; gap: 12px;
  padding: 9px 6px; margin: 0 -6px;
  border-radius: var(--radius-s);
  transition: background .2s, transform .25s var(--ease-out);
}
.info-row + .info-row { border-top: 1px solid var(--border-soft); }
.info-row:hover { background: rgba(91, 84, 230, .05); }
.info-row:hover .info-icon { transform: scale(1.12) rotate(-5deg); border-color: rgba(91, 84, 230, .35); }
.info-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center; font-size: 15px;
  background: linear-gradient(150deg, #fff, var(--accent-soft));
  border: 1px solid var(--border);
  border-radius: 9px; flex: none;
  box-shadow: var(--shadow-s);
  transition: transform .3s var(--ease-spring), border-color .25s;
}
.info-text strong { font-size: 13px; display: block; color: var(--text); }
.info-text span { font-size: 12px; color: var(--muted); }

/* ══ Scan history ═════════════════════════════════════════════════════════ */

.hist-toolbar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.hist-filter {
  width: 220px; padding: 9px 12px !important; font-size: 13px;
  transition: width .35s var(--ease-out), border-color .2s, box-shadow .25s, background .2s !important;
}
.hist-filter:focus { width: 280px; }

.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
  align-items: center; gap: 14px;
  padding: 14px 22px;
  animation: row-in .45s var(--ease-out) both;
  transition: background .2s, transform .2s;
}
.hist-row:nth-child(1) { animation-delay: .03s; }
.hist-row:nth-child(2) { animation-delay: .08s; }
.hist-row:nth-child(3) { animation-delay: .13s; }
.hist-row:nth-child(4) { animation-delay: .18s; }
.hist-row:nth-child(5) { animation-delay: .23s; }
.hist-row:nth-child(6) { animation-delay: .28s; }
@keyframes row-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hist-row + .hist-row { border-top: 1px solid var(--border-soft); }
.hist-row:hover { background: rgba(91, 84, 230, .05); }

.status-pill {
  width: 78px; text-align: center;
  padding: 5px 0; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; text-transform: capitalize;
  border: 1px solid transparent;
}
.sp-done    { color: var(--pass); background: var(--pass-soft); border-color: rgba(15, 122, 57, .22); }
.sp-running { color: var(--info); background: var(--info-soft); border-color: rgba(24, 80, 214, .22); animation: pulse 1.6s ease-in-out infinite; }
.sp-error   { color: var(--fail); background: var(--fail-soft); border-color: rgba(192, 39, 31, .22); }
.sp-stopped { color: var(--warn); background: var(--warn-soft); border-color: rgba(168, 87, 6, .22); }
.sp-pending { color: var(--muted); background: rgba(20, 23, 55, .06); }

.hist-url {
  min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
a.hist-url:hover { color: var(--accent-dark); }

.wcag-tag {
  flex: none; padding: 4px 9px;
  font-size: 11px; font-weight: 700;
  color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid rgba(91, 84, 230, .22);
  border-radius: 99px; white-space: nowrap;
}
.hist-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hist-actions { display: flex; gap: 8px; align-items: center; }

.rpt-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px;
  font-size: 12px; font-weight: 700;
  color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid rgba(91, 84, 230, .3);
  border-radius: var(--radius-s);
  text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .18s var(--ease-spring), box-shadow .2s;
}
.rpt-btn:hover { background: rgba(91, 84, 230, .18); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(91, 84, 230, .28); }
.rpt-btn:active { transform: translateY(1px); }

.drive-btn {
  display: inline-flex; align-items: center;
  padding: 7px 10px; font-size: 12px;
  text-decoration: none; color: var(--text-2);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  transition: background .2s, transform .18s var(--ease-spring), border-color .2s;
}
.drive-btn:hover { background: #fff; border-color: rgba(91, 84, 230, .35); transform: translateY(-2px); }

.no-hist { padding: 40px 22px; text-align: center; color: var(--muted); font-size: 13.5px; animation: body-in .4s ease both; }

/* skeleton loader */
.skel-list { padding: 8px 22px 16px; }
.skel-row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 90px 120px;
  gap: 14px; align-items: center; padding: 14px 0;
}
.skel-row + .skel-row { border-top: 1px solid var(--border-soft); }
.skel {
  height: 15px; border-radius: 8px;
  background: linear-gradient(90deg, rgba(20, 23, 55, .06) 25%, rgba(20, 23, 55, .12) 50%, rgba(20, 23, 55, .06) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s linear infinite;
}
.skel-pill { height: 24px; border-radius: 99px; }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 760px) {
  .hist-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .hist-url { grid-column: 2; white-space: normal; word-break: break-all; }
  .hist-meta, .wcag-tag { grid-column: 2; justify-self: start; }
  .hist-actions { grid-column: 1 / -1; }
  .hist-filter { width: 140px; }
  .hist-filter:focus { width: 160px; }
}

/* ══ Header user / drive bits ═════════════════════════════════════════════ */

.hdr-user { padding-left: 6px; }
.hdr-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; object-fit: cover; border: 1.5px solid rgba(91, 84, 230, .3); }
.hdr-avatar-fallback { display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--grad-accent); }
.badge-pill.badge-drive { background: var(--pass-soft); border-color: rgba(15, 122, 57, .3); color: var(--pass); }

button.drive-btn { font: inherit; font-size: 12px; font-weight: 700; color: var(--accent-dark); cursor: pointer; white-space: nowrap; }
button.drive-btn:disabled { cursor: wait; opacity: .75; }
.uploading { position: relative; }
.uploading::after {
  content: ""; display: inline-block;
  width: 11px; height: 11px; margin-left: 7px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -1px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ Floating action button ═══════════════════════════════════════════════ */

.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  font-size: 19px; color: #fff;
  background: var(--grad-accent);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(99, 102, 241, .5);
  cursor: pointer;
  opacity: 0; transform: translateY(18px) scale(.8); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-spring), box-shadow .25s;
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(99, 102, 241, .65); }
.fab:active { transform: translateY(0); }

/* ══ Toasts ═══════════════════════════════════════════════════════════════ */

.toast-stack {
  position: fixed; right: 18px; bottom: 86px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-m);
  opacity: 0; transform: translateX(40px) scale(.95);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-spring);
}
.toast.show { opacity: 1; transform: none; }
.toast-success { border-left-color: var(--pass); }
.toast-error { border-left-color: var(--fail); }
.toast-progress { border-left-color: var(--accent); }
.toast-msg { flex: 1; min-width: 0; }
.toast-link {
  flex: none; font-weight: 700; color: var(--accent-dark);
  text-decoration: none; padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(91, 84, 230, .28);
  border-radius: 7px;
  transition: background .2s, transform .15s;
}
.toast-link:hover { background: rgba(91, 84, 230, .2); transform: translateY(-1px); }

@media (max-width: 760px) {
  .fab { right: 16px; bottom: 16px; }
  .toast-stack { bottom: 78px; }
  .card .card-hd, .card .card-body { transform: none; }
}

/* ── Share button (history rows) ───────────────────────────────────────── */
.share-btn {
  font: inherit; font-size: 12px; font-weight: 700;
  color: var(--accent-dark); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.share-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(12, 14, 32, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%; max-width: 460px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-l); box-shadow: 0 24px 70px rgba(10,10,40,.4);
  max-height: 90vh; overflow: auto; animation: modal-in .22s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }
.modal-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.modal-title { font-size: 17px; font-weight: 800; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.modal-x { border: none; background: none; font-size: 16px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal-x:hover { background: var(--border-soft); color: var(--text); }
.modal-body { padding: 4px 22px 22px; }
.modal-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.modal-tab {
  font: inherit; font-size: 13px; font-weight: 700; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: 8px 6px; margin-bottom: -1px; cursor: pointer;
}
.modal-tab.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.modal-pane[hidden] { display: none; }
.modal textarea {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--text);
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-s); resize: vertical;
}
.modal textarea:focus, .modal select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,84,230,.15); }
.modal select { width: 100%; padding: 11px 14px; font: inherit; border: 1.5px solid var(--border); border-radius: var(--radius-s); background: #fff; cursor: pointer; }
.share-linkbox { margin: 4px 0 16px; padding: 12px 14px; background: var(--accent-soft); border-radius: var(--radius-s); }
.share-linkbox[hidden] { display: none; }
.share-linkrow { display: flex; gap: 8px; margin-top: 6px; }
.share-linkrow input { flex: 1; min-width: 0; font-size: 12.5px; }

/* ── Share history list (in modal) ─────────────────────────────────────── */
.share-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.share-row { border: 1px solid var(--border); border-radius: var(--radius-s); padding: 12px 14px; }
.share-row-top { display: flex; align-items: center; gap: 10px; }
.share-state { padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.ss-active { background: var(--pass-soft); color: var(--pass); }
.ss-expired { background: var(--warn-soft); color: var(--warn); }
.ss-revoked { background: var(--fail-soft); color: var(--fail); }
.share-recip { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row-meta { font-size: 11.5px; color: var(--muted); margin: 6px 0 8px; }
.share-row-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.share-mini { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); border: none; border-radius: 7px; padding: 5px 10px; cursor: pointer; }
.share-mini:hover { background: #e2e5fd; }
.share-mini.danger { color: var(--fail); background: var(--fail-soft); }

/* ── Share success pane: animated checkmark + confetti ─────────────────── */
.modal { position: relative; }
.sent-pane[hidden] { display: none; }
.sent-pane { text-align: center; padding: 10px 0 4px; }
.sent-check { width: 88px; height: 88px; margin: 6px auto 14px; }
.sent-check svg { width: 100%; height: 100%; }
.sent-check .sc-ring {
  fill: none; stroke: var(--pass); stroke-width: 5;
  stroke-dasharray: 214; stroke-dashoffset: 214;
}
.sent-check .sc-tick {
  fill: none; stroke: var(--pass); stroke-width: 6;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
}
/* exclamation shown only in the warning (email-failed) state */
.sent-check .sc-bang, .sent-check .sc-bang-dot {
  fill: none; stroke: var(--warn); stroke-width: 6; stroke-linecap: round;
  display: none;
}
.sent-check .sc-bang-dot { fill: var(--warn); stroke: none; }
.sent-check.play .sc-ring { animation: sc-ring .5s var(--ease-out, ease) forwards; }
.sent-check.play .sc-tick { animation: sc-tick .35s .42s var(--ease-out, ease) forwards; }
.sent-check.play { animation: sc-pop .45s var(--ease-spring, ease); }

/* WARNING variant: link created but email could not be sent */
.sent-check.warn .sc-ring { stroke: var(--warn); }
.sent-check.warn .sc-tick { display: none; }
.sent-check.warn .sc-bang, .sent-check.warn .sc-bang-dot { display: block; }
.sent-title.warn { color: var(--warn); }
.sent-sub.warn { color: var(--fail); font-weight: 600; }
@keyframes sc-ring { to { stroke-dashoffset: 0; } }
@keyframes sc-tick { to { stroke-dashoffset: 0; } }
@keyframes sc-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.sent-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.sent-sub { font-size: 13px; color: var(--muted); margin: 0 auto 16px; max-width: 360px; line-height: 1.5; word-break: break-word; }
.sent-actions { display: flex; gap: 10px; margin-top: 16px; }
.sent-actions .btn { flex: 1; justify-content: center; }

.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: var(--radius-l); }
.confetti i {
  position: absolute; top: -16px; display: block; border-radius: 2px;
  opacity: .95; will-change: transform, opacity;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0%   { transform: translate3d(0, -10px, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--x, 0), 520px, 0) rotate(var(--r, 360deg)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sent-check .sc-ring, .sent-check .sc-tick { stroke-dashoffset: 0 !important; animation: none !important; }
  .sent-check.play { animation: none; }
  .confetti { display: none; }
}
