:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-2: #11141d;
  --panel: #15171f;
  --panel-2: #221a14;
  --text: #f8fafc;
  --text-soft: #d8dae0;
  --muted: #9ea3ad;
  --line: #2a2f3a;
  --line-soft: rgba(255,255,255,.08);
  --accent: #ff8a1f;
  --accent-2: #ffb15c;
  --accent-3: #ff6a00;
  --accent-soft: rgba(255, 138, 31, .14);
  --accent-glow: 0 0 0 4px rgba(255, 138, 31, .18), 0 14px 40px -8px rgba(255, 138, 31, .55);
  --info: #8ad0ff;
  --info-soft: rgba(138, 208, 255, .12);
  --danger: #ff8f8f;
  --warning: #ffd166;
  --ok: #9bf6b4;
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, .45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* Make the global `hidden` attribute win against any author rule that sets
   `display` (e.g. `.stack { display: grid }`, `.card { ... }`). Without this,
   `<section ... class="card stack" hidden>` renders as a visible empty box
   because the class rules tie with the UA `[hidden]` rule and the author
   cascade wins. !important here is the standard fix and matches what
   normalize.css / modern resets do. */
[hidden] { display: none !important; }

.clipboard-fallback {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

::selection { background: var(--accent); color: #170c03; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(45rem 32rem at 12% -6%, rgba(255, 138, 31, .28), transparent 60%),
    radial-gradient(38rem 28rem at 92% 8%, rgba(255, 106, 0, .18), transparent 60%),
    radial-gradient(50rem 40rem at 50% 110%, rgba(138, 208, 255, .10), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  animation: orbDrift 24s var(--ease) infinite alternate;
}

body::after {
  background-image:
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px, 19px 19px;
  background-position: 0 0, 9px 9px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}

@keyframes orbDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.04); }
}

a { color: var(--accent); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent-2); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(11, 13, 18, .85), rgba(11, 13, 18, .55));
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  padding: 6px;
  border: 1px solid var(--line-soft);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: var(--accent-glow);
}

.brand-name { display: inline-flex; align-items: center; line-height: 1; }
.brand-name b { font-weight: 800; letter-spacing: -.03em; font-size: 1.5rem; }

main { flex: 1 0 auto; }

.shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  /* Tighter top padding so the hero sits close to the sticky topbar; keep the
     generous bottom padding for visual balance above the footer. */
  padding: clamp(1rem, 2vw, 1.75rem) 0 clamp(2rem, 6vw, 4.5rem);
  animation: fadeUp .55s var(--ease) both;
}

.narrow { width: min(720px, calc(100vw - 2rem)); }
/* Both columns stretch to the height of the taller card so the left and
   right panels stay visually balanced — especially after upload, where the
   right panel collapses to a compact share-result and the left panel goes
   to a read-only file list of unpredictable length. */
.grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.25rem; align-items: stretch; }
.stack { display: grid; gap: 1rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  background: linear-gradient(180deg, #ffffff 0%, #c8c8d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p { font-size: 1.1rem; max-width: 56ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 800;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 138, 31, .35);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.7); }
}

h1, h2, h3 { letter-spacing: -.03em; line-height: 1.1; margin: 0; color: var(--text); }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); max-width: 18ch; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { color: var(--text-soft); line-height: 1.65; margin: 0; }
p.muted { color: var(--muted); }

.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
  margin-bottom: 1.5rem;
}

/* Trust badges are info chips, not buttons. No hover lift / glow so they
   don't read as actionable. Cursor stays as 'default'. */
.trust-badge {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  cursor: default;
  user-select: none;
}

.trust-badge svg {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  color: var(--accent);
  opacity: .85;
}

.trust-badge-text { display: grid; gap: 1px; min-width: 0; }
.trust-badge-text b { font-size: .9rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.trust-badge-text span { font-size: .78rem; color: var(--muted); }


.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 138, 31, .55), rgba(255, 138, 31, 0) 35%, rgba(138, 208, 255, .35) 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .55;
  transition: opacity .25s var(--ease);
}

.card:hover::before { opacity: 1; }

.drop {
  position: relative;
  border: 1px solid rgba(255, 138, 31, .3);
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
  padding: clamp(2.25rem, 8vw, 5rem);
  /* Generous cap so the drop area never visually clips its prompt at any
     viewport, but small enough that the max-height transition feels snappy
     when the drop zone collapses on entering share mode. */
  max-height: 30rem;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-soft);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .4s var(--ease),
    border-color .4s var(--ease),
    box-shadow .4s var(--ease),
    background .4s var(--ease),
    max-height .45s var(--ease),
    padding .45s var(--ease),
    opacity .35s var(--ease);
}

.drop::before,
.drop::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  z-index: -1;
  will-change: transform;
  transition: filter .6s var(--ease), opacity .6s var(--ease);
}

.drop::before {
  width: 70%;
  aspect-ratio: 1;
  top: -25%;
  left: -14%;
  background: radial-gradient(circle, rgba(255, 138, 31, .55), transparent 70%);
  animation: dropMorphA 22s ease-in-out infinite alternate;
}

.drop::after {
  width: 60%;
  aspect-ratio: 1;
  bottom: -28%;
  right: -16%;
  background: radial-gradient(circle, rgba(255, 106, 0, .45), transparent 70%);
  animation: dropMorphB 28s ease-in-out infinite alternate;
  animation-delay: -8s;
}

@keyframes dropMorphA {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(22%, 14%, 0) scale(1.18); }
  66%  { transform: translate3d(-8%, 26%, 0) scale(.88); }
  100% { transform: translate3d(12%, 6%, 0) scale(1.08); }
}

@keyframes dropMorphB {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(-16%, -20%, 0) scale(1.16); }
  66%  { transform: translate3d(10%, -10%, 0) scale(.92); }
  100% { transform: translate3d(-6%, -24%, 0) scale(1.06); }
}

.drop:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 138, 31, .55);
  box-shadow: 0 18px 44px -18px rgba(255, 138, 31, .55);
}

.drop:hover::before,
.drop:hover::after { filter: blur(40px); }

/* "Armed" — a file is being dragged anywhere on the page.
   The drop zone calls attention to itself with a soft pulse and brighter color. */
.drop.armed {
  border-color: rgba(255, 138, 31, .7);
  background: rgba(255, 138, 31, .16);
  color: var(--text);
  animation: dropArmedPulse 1.6s ease-in-out infinite;
}

.drop.armed::before,
.drop.armed::after { filter: blur(38px); }

@keyframes dropArmedPulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(255, 138, 31, .42), 0 22px 50px -20px rgba(255, 138, 31, .55); }
  50%      { box-shadow: 0 0 0 14px rgba(255, 138, 31, 0),   0 22px 50px -20px rgba(255, 138, 31, .55); }
}

/* "Drag" — file is currently over the drop zone itself. Maximum emphasis,
   freeze the pulse so it feels solid and ready to receive. */
.drop.drag,
.drop.armed.drag {
  border-color: var(--accent);
  background: rgba(255, 138, 31, .24);
  transform: scale(1.015);
  animation: none;
  box-shadow: 0 0 0 4px rgba(255, 138, 31, .28), 0 22px 50px -20px rgba(255, 138, 31, .75);
}

.drop.drag::before,
.drop.armed.drag::before,
.drop.drag::after,
.drop.armed.drag::after { filter: blur(30px); }

/* While a file is being dragged anywhere on the page, gently dim everything
   else so the drop zone is the only thing the eye lands on. */
body.file-dragging .topbar,
body.file-dragging .footer,
body.file-dragging .feature-strip,
body.file-dragging .hero,
body.file-dragging .grid > aside,
body.file-dragging .section-gap {
  opacity: .35;
  filter: saturate(.7);
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}

.button, button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 50%, var(--accent-3) 100%);
  color: #170c03;
  font-weight: 800;
  padding: .9rem 1.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  letter-spacing: -.005em;
  position: relative;
  box-shadow: 0 10px 26px -10px rgba(255, 138, 31, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .15s var(--ease);
}

.button:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -10px rgba(255, 138, 31, .8), inset 0 1px 0 rgba(255, 255, 255, .35);
  filter: brightness(1.05);
}

.button:active, button:active { transform: translateY(0); filter: brightness(.95); }
.button:focus-visible, button:focus-visible { outline: none; box-shadow: var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }

button.secondary, .button.secondary {
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

button.secondary:hover, .button.secondary:hover {
  border-color: rgba(255, 138, 31, .55);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
}

button.danger { background: linear-gradient(135deg, #ff9a9a, var(--danger)); color: #210909; box-shadow: 0 10px 26px -10px rgba(255, 143, 143, .55); }
button:disabled { opacity: .5; transform: none !important; box-shadow: none; filter: none; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 11, 18, .7);
  color: var(--text);
  padding: .85rem 1rem;
  font: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 31, .18);
  background: rgba(8, 11, 18, .9);
}

input[readonly] { color: var(--text-soft); cursor: text; }

/* Custom-styled select with a properly-positioned chevron. We strip the
   native arrow and use a small SVG positioned at right + 1rem. The chevron
   color matches --accent so it reads as part of the brand. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23ff8a1f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

select::-ms-expand { display: none; }

/* Best-effort styling for the *native* dropdown popup, used as a fallback
   if the JS enhancement (.select wrapper + custom widget) doesn't run.
   The OS draws this popup so most properties are ignored on Windows. */
select option {
  background: var(--bg-2);
  color: var(--text);
  padding: .5rem .8rem;
}
select option:checked,
select option:hover {
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------------------------------------------------------------
   Custom select widget. The native <select> stays in the DOM (for
   form value + change events) but is visually hidden; we render a
   dark-themed trigger button + popup on top so the dropdown matches
   the rest of the UI on every OS / theme.
--------------------------------------------------------------- */
.select { position: relative; display: block; }

/* Visually hide the native select but keep it in the accessibility
   tree for assistive tech that prefers it. */
.select > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  /* Strip the native chevron so nothing peeks through. */
  background-image: none;
  padding-right: 1rem;
}

.select-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}

.select-trigger:hover {
  transform: none;
  border-color: rgba(255, 138, 31, .35);
  background: rgba(255, 138, 31, .05);
}

.select-trigger:active {
  transform: none;
}

.select-trigger:focus,
.select-trigger[aria-expanded="true"] {
  outline: none;
  transform: none;
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}

.select-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.select-chevron {
  width: 12px;
  height: 8px;
  color: var(--accent);
  flex: none;
  transition: transform .2s var(--ease);
}

.select-trigger[aria-expanded="true"] .select-chevron { transform: rotate(180deg); }

.select-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px -14px rgba(0,0,0,.65), 0 0 0 1px rgba(255,138,31,.12);
  z-index: 50;
  max-height: 280px;
  overflow: auto;
  animation: selectIn .14s var(--ease);
}

@keyframes selectIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.select-option {
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  user-select: none;
  transition: background .12s var(--ease), color .12s var(--ease);
}

.select-option.hover {
  background: var(--accent-soft);
  color: var(--text);
}

.select-option[aria-selected="true"] {
  font-weight: 700;
  color: var(--accent);
}

.select-option[aria-selected="true"].hover {
  color: var(--text);
}

.select-option[aria-disabled="true"] {
  opacity: .4;
}

.select-option[aria-disabled="true"].hover {
  background: transparent;
}

.inline-checkbox { width: auto; accent-color: var(--accent); }

.section-gap { margin-top: 1rem; }

label { display: grid; gap: .45rem; color: var(--muted); font-weight: 650; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
label.row { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text-soft); font-weight: 600; }

.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.list { display: grid; gap: .6rem; padding: 0; margin: 0; list-style: none; }

#downloadState {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

#downloadState .list,
#downloadProgress,
#shareCta,
#preview {
  width: 100%;
  justify-self: stretch;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,.22);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.item:hover { border-color: rgba(255, 138, 31, .35); background: rgba(0,0,0,.32); }

/* Entrance animation for newly-picked / newly-dropped files. refreshFiles()
   in app.js diffs the existing rows against the new state and only stamps
   .just-added on freshly-added items, so removing one file or adding one
   to a list that already had others won't re-animate the survivors. The
   .stagger-N classes (no inline styles; CSP style-src 'self'). */
@keyframes itemIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.list .item.just-added {
  animation: itemIn .4s var(--ease) both;
}

/* Stagger multi-file drops without inline animation-delay (CSP style-src 'self'). */
.list .item.just-added.stagger-0 { animation-delay: 0ms; }
.list .item.just-added.stagger-1 { animation-delay: 50ms; }
.list .item.just-added.stagger-2 { animation-delay: 100ms; }
.list .item.just-added.stagger-3 { animation-delay: 150ms; }
.list .item.just-added.stagger-4 { animation-delay: 200ms; }
.list .item.just-added.stagger-5 { animation-delay: 250ms; }
.list .item.just-added.stagger-6 { animation-delay: 300ms; }
.list .item.just-added.stagger-7 { animation-delay: 350ms; }
.list .item.just-added.stagger-8 { animation-delay: 400ms; }
.list .item.just-added.stagger-9 { animation-delay: 450ms; }
.list .item.just-added.stagger-10 { animation-delay: 500ms; }
.list .item.just-added.stagger-11 { animation-delay: 550ms; }
.list .item.just-added.stagger-12 { animation-delay: 600ms; }
.list .item.just-added.stagger-13 { animation-delay: 650ms; }
.list .item.just-added.stagger-14 { animation-delay: 700ms; }
.list .item.just-added.stagger-15 { animation-delay: 750ms; }
.list .item.just-added.stagger-16 { animation-delay: 800ms; }
.list .item.just-added.stagger-17 { animation-delay: 850ms; }
.list .item.just-added.stagger-18 { animation-delay: 900ms; }
.list .item.just-added.stagger-19 { animation-delay: 950ms; }
.list .item.just-added.stagger-20 { animation-delay: 1000ms; }
.list .item.just-added.stagger-21 { animation-delay: 1050ms; }
.list .item.just-added.stagger-22 { animation-delay: 1100ms; }
.list .item.just-added.stagger-23 { animation-delay: 1150ms; }
.list .item.just-added.stagger-24 { animation-delay: 1200ms; }
.list .item.just-added.stagger-25 { animation-delay: 1250ms; }
.list .item.just-added.stagger-26 { animation-delay: 1300ms; }
.list .item.just-added.stagger-27 { animation-delay: 1350ms; }
.list .item.just-added.stagger-28 { animation-delay: 1400ms; }
.list .item.just-added.stagger-29 { animation-delay: 1450ms; }

.file-row {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.file-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}

.file-icon svg { width: 100%; height: 100%; display: block; }

.file-icon-image { color: #38bdf8; }
.file-icon-video { color: #f472b6; }
.file-icon-audio { color: #c084fc; }
.file-icon-pdf { color: #ef4444; }
.file-icon-archive { color: #f59e0b; }
.file-icon-spreadsheet { color: #22c55e; }
.file-icon-presentation { color: #f97316; }
.file-icon-document { color: #3b82f6; }
.file-icon-code { color: #fbbf24; }
.file-icon-text { color: #94a3b8; }

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  color: var(--text);
}

.notice {
  color: var(--warning);
  background:
    linear-gradient(180deg, rgba(255, 209, 102, .12), rgba(255, 209, 102, .04));
  border: 1px solid rgba(255, 209, 102, .4);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  font-size: .92rem;
  line-height: 1.55;
  margin: 0;
}

.notice::before {
  content: "⚠ ";
  font-weight: 800;
  margin-right: .25rem;
}

/* Soft suggestion — blue tone, lightbulb glyph. Used when peer-to-peer is
   merely recommended (transfer >200 MB). */
.notice.notice-info {
  color: var(--info);
  background: linear-gradient(180deg, rgba(138, 208, 255, .14), rgba(138, 208, 255, .04));
  border-color: rgba(138, 208, 255, .4);
}

.notice.notice-info::before {
  content: "💡 ";
}

/* Hard requirement — keep the warning amber but use a stronger glyph. */
.notice.notice-warn::before {
  content: "⚠ ";
}

.status { color: var(--accent-2); font-weight: 700; min-height: 1.4em; }
.error { color: var(--danger); }
.error-list {
  margin: -.35rem 0 0;
  padding-left: 1.25rem;
  color: var(--danger);
  font-size: .9rem;
}
.ok { color: var(--ok); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.qr {
  /* Compact QR sized to sit next to the share URL without dominating the
     post-upload card. The canvas is rendered at a high internal pixel density
     by the renderer; box-sizing keeps padding inside the displayed box. */
  width: 144px;
  height: 144px;
  display: block;
  image-rendering: pixelated;
  background: white;
  padding: .5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6), 0 0 0 1px var(--line-soft);
  box-sizing: border-box;
}

progress {
  width: 100%;
  height: .85rem;
  accent-color: var(--accent);
  border-radius: 999px;
  overflow: hidden;
}

#downloadProgress {
  margin-block: .1rem;
}

.media-preview .ok {
  margin-top: 0;
}

.media-preview img,
.media-preview video,
.media-preview audio {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

details.card {
  padding: 1rem 1.25rem;
}

details.card summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  color: var(--text);
}

details.card summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform .2s var(--ease);
}

details.card[open] summary::after { transform: rotate(45deg); }
details.card summary::-webkit-details-marker { display: none; }
details.card p { margin-top: .65rem; color: var(--text-soft); }

.footer {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  margin-top: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer a {
  color: var(--muted);
  font-size: .92rem;
  transition: color .15s var(--ease);
}

.footer a:hover { color: var(--accent); }

.footer-credit {
  display: inline-flex;
  align-items: center;
  font-size: .9rem;
}

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .footer { justify-content: center; text-align: center; }
}

/* ---------------------------------------------------------------
   Decorative world-network backdrop. Fixed-position SVG behind
   everything, very low opacity so it never competes with content.
--------------------------------------------------------------- */
.world-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  color: rgba(255, 255, 255, .14);
  opacity: .55;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 80%);
}

.world-bg .world-lines  { stroke-dasharray: 4 6; opacity: .9; }
.world-bg .world-nodes  { color: rgba(255, 138, 31, .55); }
.world-bg .world-pulses { opacity: .65; mix-blend-mode: screen; animation: worldPulse 6s ease-in-out infinite; }

@keyframes worldPulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .75; transform: scale(1.12); }
}

@media (max-width: 640px) {
  .world-bg { opacity: .35; }
}

/* When a file is being dragged, dim the backdrop too so the drop zone wins. */
body.file-dragging .world-bg { opacity: .15; transition: opacity .25s var(--ease); }

/* ---------------------------------------------------------------
   File toolbar (count + clear) and small icon buttons.
--------------------------------------------------------------- */
.file-toolbar {
  justify-content: space-between;
  align-items: center;
  margin-top: -.25rem;
}

button.small-btn,
.button.small-btn {
  padding: .35rem .8rem;
  font-size: .8rem;
  border-radius: 999px;
}

/* Square-ish small button used when the label is replaced by a single icon
   (e.g. the "Copy" action in Recent shares). Keeps the same height as the
   text small-btn next to it for visual harmony. */
button.small-btn.icon-only,
.button.small-btn.icon-only {
  padding: .35rem .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
button.small-btn.icon-only svg,
.button.small-btn.icon-only svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Brief green flash after a successful clipboard copy. Mirrors the share-copy
   feedback so the affordance feels consistent across the app. */
button.small-btn.icon-only.copied,
.button.small-btn.icon-only.copied {
  background: rgba(155, 246, 180, .14);
  color: var(--ok);
  border-color: rgba(155, 246, 180, .5);
  box-shadow: none;
  transform: none;
  filter: none;
}

/* Destructive icon button (e.g. "Delete now" in Recent shares). The default
   neutral state stays muted so the row doesn't shout, but hover/focus warns
   the user with a soft red so they know it's an irreversible action. */
button.small-btn.icon-only.recent-delete:hover,
button.small-btn.icon-only.recent-delete:focus-visible {
  color: #ff7a7a;
  border-color: rgba(255, 122, 122, .5);
  background: rgba(255, 122, 122, .12);
  box-shadow: none;
  filter: none;
  transform: none;
}

button.small-btn.icon-only.recent-delete:disabled {
  opacity: .5;
  cursor: progress;
}

button.icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  line-height: 1;
}
button.icon-btn:hover {
  color: var(--accent);
  border-color: rgba(255, 138, 31, .55);
  background: var(--accent-soft);
  box-shadow: none;
  filter: none;
  transform: none;
}

/* ---------------------------------------------------------------
   Share result + live activity dashboard
--------------------------------------------------------------- */
.share-result {
  margin-top: 0;
  /* Entrance choreography for the right aside once the upload
     completes. The wrapper itself fades up first; the QR canvas and
     "Send more files" button follow with small staggered delays so the
     panel feels lively instead of snapping in. The reduced-motion
     media query at the bottom of this file disables this for users
     who opt out. */
  animation: shareIn .45s var(--ease) both;
}

.share-result .qr {
  animation: shareIn .55s var(--ease) both;
  animation-delay: .12s;
}

.share-result .share-send-more {
  animation: shareIn .45s var(--ease) both;
  animation-delay: .2s;
}

@keyframes shareIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* The form-fields wrapper sits above #shareResult inside the right aside.
   While the upload grid is in normal state, it's the natural height of its
   children (mode/expires/downloads/password/start). When the share is on
   screen we collapse this wrapper smoothly via max-height + opacity.
   The 60rem cap is generous enough that no realistic content will be
   clipped on the way in or out. */
#uploadForm {
  overflow: hidden;
  max-height: 60rem;
  transition:
    max-height .5s var(--ease),
    opacity .35s var(--ease);
}

/* Once the upload completes, the upload grid switches into a focused
   "share is ready" state. On the right aside, the form-fields wrapper
   collapses so #shareResult owns the column. On the left card, the drop
   zone collapses (no more dropping until the user resets via "Send more
   files"), the file list goes read-only by hiding the per-row × button,
   and the toolbar's "Clear" button hides because it would be redundant
   with "Send more files". */
.grid.is-sharing #uploadForm {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.grid.is-sharing #drop {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}
.grid.is-sharing #fileList button.icon-btn { display: none; }
.grid.is-sharing #clearFiles { display: none; }

/* The QR sits below the share-URL input as a centered, supplementary
   visual for phones — the URL input above is the primary action and now
   spans the full panel width. */
.share-result .qr {
  justify-self: center;
  margin-top: .25rem;
}

.share-send-more {
  justify-self: start;
  padding: .55rem 1rem;
  font-size: .9rem;
  margin-top: .25rem;
}

.share-ready {
  margin: 0;
  color: var(--text-soft);
  background: rgba(138, 208, 255, .08);
  border: 1px solid rgba(138, 208, 255, .22);
  border-radius: var(--radius-md);
  padding: .75rem .9rem;
  font-size: .9rem;
  line-height: 1.45;
}

/* Subtle one-shot attention pulse on the "Share this link..." instruction.
   Runs once shortly after the share-result panel finishes its shareIn
   slide-up (.45s), so the user's eye is drawn to the line that explains
   what to do with the freshly minted URL. The 0% / 100% keyframes match
   the resting .share-ready style above, and animation-fill-mode: backwards
   keeps that resting state during the delay so there is no flash on entry.
   Honours the global prefers-reduced-motion override at the bottom of the
   file. */
.share-result .share-ready {
  animation: shareReadyPulse 1s var(--ease) .4s 1 backwards;
}

@keyframes shareReadyPulse {
  0%, 100% {
    background: rgba(138, 208, 255, .08);
    border-color: rgba(138, 208, 255, .22);
    box-shadow: 0 0 0 0 rgba(138, 208, 255, 0);
  }
  35% {
    background: rgba(138, 208, 255, .26);
    border-color: rgba(138, 208, 255, .6);
    box-shadow: 0 0 0 5px rgba(138, 208, 255, .18);
  }
}

/* Share-URL input with a small copy icon overlaid on its right edge. */
.share-input { position: relative; }

.share-input input {
  padding-right: 3.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
  letter-spacing: -.01em;
}

button.share-copy,
.share-copy {
  position: absolute;
  right: .4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 138, 31, .35);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}

button.share-copy:hover {
  background: linear-gradient(135deg, var(--accent-2), var(--accent), var(--accent-3));
  color: #170c03;
  border-color: var(--accent);
  filter: none;
  transform: translateY(-50%);
  box-shadow: 0 8px 20px -8px rgba(255, 138, 31, .65);
}

button.share-copy:active { transform: translateY(-50%) scale(.96); }

button.share-copy:focus-visible {
  outline: none;
  box-shadow: var(--accent-glow);
}

button.share-copy.copied,
button.share-copy.copied:hover {
  background: rgba(155, 246, 180, .14);
  color: var(--ok);
  border-color: rgba(155, 246, 180, .5);
  box-shadow: none;
}

.share-copy svg { width: 16px; height: 16px; display: block; }

.share-copied {
  margin: -.25rem 0 0;
  color: var(--ok);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.share-copied.show { opacity: 1; transform: translateY(0); }
.share-copied::before {
  content: "✓";
  font-weight: 800;
  color: var(--ok);
}

/* The live-activity card sits in its own full-width section under the upload
   grid (see #liveActivity in renderHome). The card already provides the
   gradient border + shadow; we just add a little extra breathing room. */
#liveActivity .eyebrow { margin: 0; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .65rem;
}

.stat {
  display: grid;
  gap: 2px;
  padding: .55rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.18);
}

.stat-label {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Long "First/Last download" timestamps: clip with ellipsis only when the grid
   cell is too narrow (no fixed max-width — full string when space allows). */
.stats-grid > .stat.stat-timestamp {
  min-width: 0;
}
.stats-grid > .stat.stat-timestamp .stat-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-value.stat-live {
  color: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.stat-value.stat-live::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulseDot 1.4s ease-in-out infinite;
}

/* ---------------------------------------------------------------
   Recent-shares list — stack the URL above the action buttons on
   narrow screens, truncate the URL with ellipsis so the row never
   pushes the buttons off-screen.
--------------------------------------------------------------- */
.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}
.recent-header h2 { margin: 0; }

.recent-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  padding: .85rem 1rem;
}

.recent-main {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.recent-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: .2rem;
}

.recent-meta time { display: block; }

.recent-url {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  color: var(--text);
  max-width: 100%;
}

.recent-actions {
  flex: 0 0 auto;
  gap: .45rem;
}

.recent-stats {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  grid-template-columns: none;
}

.recent-stats .stat {
  display: inline-flex;
  align-items: baseline;
  gap: .38rem;
  min-width: 0;
  padding: .42rem .62rem;
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.075);
}

.recent-stats .stat-value {
  order: 0;
  font-size: .92rem;
  line-height: 1;
}

.recent-stats .stat-label {
  order: 1;
  font-size: .62rem;
  letter-spacing: .1em;
  white-space: nowrap;
}

.recent-stats .stat-wide {
  border-radius: var(--radius-sm);
}

/* The "last download" pill keeps its own bigger radius so it still reads as
   a distinct, slightly chunkier element next to the round count pills, but
   we let it shrink-wrap to the size of its content so the LAST DOWNLOAD
   label sits flush next to the timestamp instead of being pushed to the
   far right of the row by `flex: 1 1 auto`. The .recent-stats parent has
   `flex-wrap: wrap`, so on narrow rows this pill simply wraps to its own
   line — the mobile media query below still forces it full-width there. */
.recent-stats .stat-wide.stat-last-download {
  min-width: 0;
}
.recent-stats .stat-wide.stat-last-download .stat-value {
  min-width: 0;
  font-size: .86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-stats .stat-wide.stat-last-download .stat-label {
  flex-shrink: 0;
}

.share-cta {
  margin: .25rem 0 .75rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 138, 31, .28);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 138, 31, .10), rgba(255,255,255,.025));
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  scroll-margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(-.35rem);
  transition: opacity .24s ease, transform .24s ease;
}

.share-cta > div {
  display: grid;
  row-gap: .85rem;
}

.share-cta.show {
  opacity: 1;
  transform: translateY(0);
}

.share-cta strong {
  color: var(--text);
}

.share-cta h2 {
  margin: 0;
  font-size: 1.05rem;
}

.share-cta p {
  margin: .1rem 0 0;
  color: var(--text-soft);
}

.share-cta-button {
  flex: none;
  padding: .75rem 1.15rem;
  font-size: .95rem;
  box-shadow: 0 12px 30px -10px rgba(255, 138, 31, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}

@media (max-width: 540px) {
  .recent-main {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .recent-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .recent-stats .stat-wide {
    margin-left: 0;
    flex: 1 1 100%;
  }
  .share-cta {
    align-items: stretch;
    flex-direction: column;
  }
  .share-cta-button {
    width: 100%;
  }
}

/* ---------------------------------------------------------------
   Trust strip: 2×2 grid below 540px and tighter padding so it
   doesn't dominate the first scroll on phones.
--------------------------------------------------------------- */
@media (max-width: 540px) {
  .feature-strip {
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-bottom: 1rem;
  }
  .trust-badge { padding: .65rem .75rem; gap: .55rem; }
  .trust-badge svg { width: 18px; height: 18px; }
  .trust-badge-text b { font-size: .82rem; }
  .trust-badge-text span { font-size: .7rem; }
}

/* ---------------------------------------------------------------
   Topbar: trim the logo a touch on very narrow screens so the
   brand sits comfortably even on iPhone SE (320px).
--------------------------------------------------------------- */
@media (max-width: 380px) {
  .brand-logo { width: 52px; height: 52px; }
  .brand-name b { font-size: 1.2rem; }
}

/* ---------------------------------------------------------------
   Touch devices: bump tappable controls to comfortable sizes.
   Triggered only on coarse-pointer / no-hover devices so the
   compact desktop UI is unaffected.
--------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  button.icon-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  button.small-btn,
  .button.small-btn {
    padding: .55rem 1rem;
    font-size: .85rem;
    min-height: 36px;
  }
  /* Make the share-result copy icon comfortably tappable too. */
  button.share-copy,
  .share-copy {
    width: 40px;
    height: 40px;
  }
  .share-input input { padding-right: 3.5rem; }
}

/* ---------------------------------------------------------------
   Bottom-anchored toast (transient confirmations like "Link copied").
   Sits above everything except the modal backdrop, never blocks
   interaction (pointer-events: none on the host).
--------------------------------------------------------------- */
.toast-host {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 4vh, 2.25rem);
  z-index: 900;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 0 1rem;
}

.toast {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), var(--bg-2);
  color: var(--text);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(155, 246, 180, .5);
  box-shadow:
    0 16px 40px -12px rgba(0,0,0,.6),
    0 0 0 1px rgba(155, 246, 180, .15),
    0 0 24px -4px rgba(155, 246, 180, .35);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.005em;
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  pointer-events: auto;
  max-width: min(420px, calc(100vw - 2rem));
}

.toast.show {
  opacity: 1;
  transform: none;
}

/* Anchored variant — positioned with CSS anchor (no inline top/left; CSP-safe). */
.toast-anchor {
  anchor-name: --toast-target;
}

.toast.toast-anchored {
  position: fixed;
  z-index: 950;
  pointer-events: auto;
  font-size: .85rem;
  padding: .5rem .85rem;
  position-anchor: --toast-target;
  bottom: calc(anchor(top) + 14px);
  left: anchor(center);
  translate: -50% 4px;
  scale: .96;
  opacity: 0;
  max-width: min(320px, calc(100vw - 2rem));
  transition: opacity .18s var(--ease), translate .18s var(--ease), scale .18s var(--ease);
}

.toast.toast-anchored.toast-below {
  bottom: auto;
  top: calc(anchor(bottom) + 14px);
}

.toast.toast-anchored.show {
  translate: -50% 0;
  scale: 1;
  opacity: 1;
}

/* ---------------------------------------------------------------
   Themed confirmation dialog (replacement for window.confirm()).
   Backdrop fades in, modal lifts and scales gently. Esc / Enter /
   click-outside are wired in JS.
--------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 7, 12, .65);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  opacity: 0;
  transition: opacity .15s var(--ease);
}

.modal-backdrop.show { opacity: 1; }

.modal {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)), var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 1.9rem);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.7),
    0 0 0 1px rgba(255, 138, 31, .12),
    0 0 60px -10px rgba(255, 138, 31, .15);
  transform: translateY(8px) scale(.98);
  transition: transform .18s var(--ease);
  outline: none;
}

.modal-backdrop.show .modal { transform: none; }

.modal-destructive {
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.7),
    0 0 0 1px rgba(255, 143, 143, .18),
    0 0 60px -10px rgba(255, 143, 143, .12);
}

.modal-title {
  margin: 0 0 .6rem 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}

.modal-message {
  margin: 0 0 1.4rem 0;
  color: var(--text-soft);
  line-height: 1.5;
  font-size: .95rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  flex-wrap: wrap;
}

.modal-actions button { min-width: 110px; }

/* Visually hidden but available to screen readers (used for the dialog's
   accessible name when no visible title is provided). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Destructive primary action button — used for "Clear list" etc. */
button.danger,
.button.danger {
  background: linear-gradient(135deg, #ff7a7a, #ff3838);
  color: #150404;
  border: 1px solid #ff5a5a;
  box-shadow: 0 12px 28px -10px rgba(255, 56, 56, .55);
}
button.danger:hover,
.button.danger:hover {
  filter: brightness(1.05);
  box-shadow: 0 16px 36px -10px rgba(255, 56, 56, .65);
  transform: translateY(-1px);
}
button.danger:focus-visible,
.button.danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 90, 90, .35), 0 12px 28px -10px rgba(255, 56, 56, .55);
}

.solutions-industries,
.solutions-included {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .65rem;
}

.solutions-industries li,
.solutions-included li {
  position: relative;
  padding: .65rem .9rem .65rem 1.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  line-height: 1.45;
}

.solutions-industries li::before,
.solutions-included li::before {
  content: "";
  position: absolute;
  left: .7rem;
  top: 1.15rem;
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.solutions-industries li strong { color: var(--text); }

@media (min-width: 720px) {
  .solutions-industries { grid-template-columns: 1fr 1fr; }
}

.solutions-gallery {
  display: grid;
  gap: 1.25rem;
  margin-top: .25rem;
}

@media (min-width: 960px) {
  .solutions-gallery { grid-template-columns: 1fr 1fr 1fr; }
}

.solutions-mockup {
  margin: 0;
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
}

.solutions-mockup img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(0,0,0,.35);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,.6);
}

.solutions-mockup figcaption { margin: 0; gap: .4rem; }

.solutions-mockup-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem .75rem;
  justify-content: space-between;
}

.solutions-mockup-head strong {
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -.01em;
}

.solutions-mockup figcaption p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.solutions-mockup figcaption p em {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
  margin-right: .25rem;
}

.solutions-ai-callout {
  margin: .25rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
  line-height: 1.55;
}

.solutions-cta { text-align: left; }

.solutions-cta-row {
  margin: .5rem 0 0;
}

.solutions-cta-row .button {
  color: #170c03;
  flex-wrap: wrap;
  text-align: center;
  max-width: 100%;
}

.solutions-cta-email {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: -.005em;
}

.solutions-cta-note {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .92rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
