/* Epic Image Resizer — near-black stage, lime light source.
   Lime means "live": the active choice, the CTA, and the bytes you shed. */

:root {
  --bg:        #060707;
  --card:      #101211;
  --card-2:    #171A18;
  --line:      #262A27;
  --line-soft: #1C201E;
  --text:      #FFFFFF;
  --muted:     #98A29B;
  --muted-2:   #6E7872;

  --lime:        #B6E82A;
  --lime-bright: #D6FF52;
  --lime-deep:   #86B400;
  --lime-glow:   rgba(182, 232, 42, .35);
  --lime-faint:  rgba(182, 232, 42, .10);

  --radius:  20px;
  --radius-s: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* Layout display values must never resurrect a hidden element. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 90px;
}

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

:where(button, select, input, a, [tabindex]):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ------------------------------------------------------------- atmosphere */

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 34%, rgba(182, 232, 42, .10), transparent 70%),
    radial-gradient(40% 30% at 8% 42%,  rgba(182, 232, 42, .09), transparent 70%),
    radial-gradient(40% 30% at 92% 40%, rgba(182, 232, 42, .09), transparent 70%);
}

.specks {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, var(--lime), transparent),
    radial-gradient(1.5px 1.5px at 84% 18%, var(--lime), transparent),
    radial-gradient(1.5px 1.5px at 22% 68%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 91% 62%, var(--lime), transparent),
    radial-gradient(1.5px 1.5px at 68% 8%,  #fff, transparent),
    radial-gradient(1.5px 1.5px at 6% 80%,  var(--lime), transparent),
    radial-gradient(1.5px 1.5px at 44% 90%, var(--lime), transparent);
}

/* --------------------------------------------------------------- masthead */

.masthead {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

.lockup__mark {
  width: 34px;
  height: 34px;
  color: var(--lime);
  filter: drop-shadow(0 0 10px var(--lime-glow));
  flex: none;
}

.lockup__text { display: flex; flex-direction: column; line-height: 1; }

.lockup__epic {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-style: italic;
}

.lockup__sub {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.masthead__note { margin: 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------- hero */

.hero { text-align: center; padding: 26px 0 30px; }

.hero__title {
  margin: 0 0 16px;
  font-size: clamp(34px, 6.6vw, 68px);
  font-weight: 800;
  letter-spacing: -.037em;
  line-height: 1.03;
}

.hero__title--lime {
  color: var(--lime);
  text-shadow: 0 0 46px rgba(182, 232, 42, .38);
}

.hero__sub {
  margin: 0;
  font-size: clamp(14.5px, 1.5vw, 17px);
  color: var(--muted);
  line-height: 1.6;
}

.hero.is-compact { padding: 6px 0 18px; }
.hero.is-compact .hero__title { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 6px; }
.hero.is-compact .hero__sub { display: none; }

/* ------------------------------------------------------------------ stage */

.stage { position: relative; }

/* Drop card */

.dropcard {
  position: relative;
  border: 1.5px solid var(--lime);
  border-radius: 28px;
  background: linear-gradient(180deg, #0E100F, #0A0C0B);
  padding: 10px;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(182, 232, 42, .10),
    0 0 70px -10px rgba(182, 232, 42, .32),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}

.dropcard:hover, .dropcard.is-hot {
  box-shadow:
    0 0 0 1px rgba(182, 232, 42, .25),
    0 0 110px -6px rgba(182, 232, 42, .5),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.dropcard__inner {
  border: 1.5px dashed rgba(182, 232, 42, .42);
  border-radius: 20px;
  padding: 46px 24px 40px;
  text-align: center;
}

.dropcard__icon {
  width: 74px;
  height: 56px;
  color: var(--lime);
  filter: drop-shadow(0 0 16px var(--lime-glow));
  margin-bottom: 14px;
}

.dropcard__title {
  margin: 0 0 6px;
  font-size: clamp(18px, 2.3vw, 23px);
  font-weight: 700;
  letter-spacing: -.02em;
}

.dropcard__sub { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }

.dropcard__note { margin: 18px 0 0; color: var(--muted-2); font-size: 13px; }

/* The light the card sits on */

.stage__beam {
  position: relative;
  height: 60px;
  margin: -14px auto 0;
  width: 82%;
  pointer-events: none;
}

.stage__beam::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 100% at 50% 0%, rgba(182, 232, 42, .55), transparent 70%);
  filter: blur(14px);
}

/* The hot core of the streak — thin, bright, and clipped to the middle. */
.stage__beam::after {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--lime-bright) 22%, #fff 50%, var(--lime-bright) 78%, transparent);
  filter: blur(1.5px);
  opacity: .95;
}

/* Compare */

.compare {
  border: 1.5px solid var(--lime);
  border-radius: 28px;
  background: linear-gradient(180deg, #0E100F, #0A0C0B);
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(182, 232, 42, .10),
    0 0 70px -10px rgba(182, 232, 42, .32);
}

.compare__frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  /* Bounded on purpose: a 4:3 photo must not push the controls off-screen. */
  height: clamp(260px, 52vh, 540px);
  touch-action: none;
  user-select: none;
  cursor: ew-resize;
}

.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* The after layer is clipped from the left, so the divider reveals it. */
.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime-glow);
  transform: translateX(-1px);
}

.compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background: #0A0C0B;
  color: var(--lime);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: ew-resize;
  display: grid;
  place-items: center;
  box-shadow: 0 0 22px rgba(182, 232, 42, .45);
}

.compare__tag {
  position: absolute;
  top: 14px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(6, 7, 7, .78);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.compare__tag--left { left: 14px; }

.compare__tag--right {
  right: 14px;
  color: var(--lime);
  border-color: rgba(182, 232, 42, .4);
}

.compare__hint {
  margin: 10px 4px 2px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* -------------------------------------------------------------- filmstrip */

.filmstrip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.filmstrip__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
  flex: 1;
  min-width: 0;
  scrollbar-width: thin;
}

.shot {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--card);
  cursor: pointer;
  padding: 0;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

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

.shot:hover { transform: translateY(-2px); }

.shot.is-on {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime), 0 0 22px -4px var(--lime-glow);
}

.shot__x {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(6, 7, 7, .82);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .15s var(--ease);
}

.shot:hover .shot__x, .shot__x:focus-visible { opacity: 1; }

.shot__bad {
  position: absolute;
  inset: auto 0 0 0;
  background: #C2410C;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px;
}

.filmstrip__actions { display: flex; gap: 8px; }

/* --------------------------------------------------------------- controls */

.controls { margin-top: 34px; }

.row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.row__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  flex: none;
  width: 108px;
}

.tiles { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }

.tile {
  min-width: 96px;
  padding: 9px 14px;
  border-radius: var(--radius-s);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}

.tile:hover { border-color: #3A403C; background: var(--card-2); }

.tile__name { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }

.tile__dim {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.tile.is-on {
  border-color: var(--lime);
  background: rgba(182, 232, 42, .07);
  box-shadow: 0 0 22px -8px var(--lime-glow);
}

.tile.is-on .tile__name, .tile.is-on .tile__dim { color: var(--lime); }

/* Chips */

.chips {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips--formats { justify-content: center; }

.chips--formats li {
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .03em;
}

.chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}

.chip:hover { border-color: #3A403C; background: var(--card-2); }

.chip.is-on {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(182, 232, 42, .07);
  box-shadow: 0 0 22px -8px var(--lime-glow);
}

/* Settings grid */

.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 18, 17, .72);
}

.setting__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}

.setting__value {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--lime);
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.setting__hint {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-2);
}

.input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #0A0C0B;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.input:focus { border-color: var(--lime); outline: none; }

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

.input--mb { width: 62px; padding: 5px 7px; font-size: 13px; flex: none; }

.lock {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lock.is-on { border-color: var(--lime); color: var(--lime); background: rgba(182, 232, 42, .08); }

.range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 3px;
  background: var(--line);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 14px var(--lime-glow);
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 14px var(--lime-glow);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.check input[type="checkbox"] { accent-color: var(--lime); width: 17px; height: 17px; }

.unit { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- action */

.action { text-align: center; margin-top: 34px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lime-bright), var(--lime-deep));
  color: #0A0C0B;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.015em;
  cursor: pointer;
  box-shadow: 0 0 60px -10px rgba(182, 232, 42, .75), 0 10px 30px -14px rgba(0, 0, 0, .9);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}

.cta:hover { transform: translateY(-2px); box-shadow: 0 0 80px -6px rgba(182, 232, 42, .9); }

.cta:disabled {
  filter: grayscale(.85) brightness(.55);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.action__note { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }
.action__note strong { color: var(--lime); font-weight: 700; }

/* Tally */

.tally {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 18, 17, .72);
}

.tally__figures {
  display: flex;
  align-items: baseline;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tally__before, .tally__after {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.tally__after { color: var(--lime); }
.tally__arrow { color: var(--muted-2); font-size: 18px; }

.tally__pct {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.bar {
  position: relative;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--lime-deep), var(--lime));
}

.bar__kept {
  height: 100%;
  background: #2A2F2B;
  border-radius: 999px 0 0 999px;
  transition: width .45s var(--ease);
}

/* ------------------------------------------------------------------ files */

.files { margin-top: 30px; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.line {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  background: rgba(16, 18, 17, .6);
}

.line.is-on { border-color: rgba(182, 232, 42, .45); }

.line__thumb {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  background: #000;
  display: block;
}

.line__name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line__meta {
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.line__meta em { font-style: normal; color: var(--lime); }
.line.is-failed .line__meta { color: #F97316; }

.line__side { display: flex; align-items: center; gap: 10px; }

.line__pct {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  min-width: 4.6ch;
  text-align: right;
}

/* --------------------------------------------------------------- buttons */

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 7px 16px;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.btn:hover { border-color: var(--lime); color: var(--lime); }
.btn:disabled { opacity: .4; cursor: not-allowed; border-color: var(--line); color: var(--text); }

.btn--ghost { background: transparent; }

/* ----------------------------------------------------------------- notes */

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid var(--line-soft);
}

.note__title { margin: 0 0 7px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.note p { margin: 0; font-size: 13.5px; color: var(--muted); }

.foot {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 44px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ------------------------------------------------------------- drop hint */

.drophint {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(6, 7, 7, .78);
  backdrop-filter: blur(3px);
  z-index: 60;
  pointer-events: none;
}

.drophint.is-on { display: grid; }

.drophint span {
  font-size: 17px;
  font-weight: 800;
  color: #0A0C0B;
  background: var(--lime);
  padding: 14px 30px;
  border-radius: 999px;
  box-shadow: 0 0 70px var(--lime-glow);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 760px) {
  .row { gap: 10px; }
  .row__label { width: 100%; }
  .dropcard__inner { padding: 32px 16px 28px; }
  .tally__pct { margin-left: 0; }
  .compare__frame { height: clamp(220px, 42vh, 380px); }
}

@media (max-width: 560px) {
  main { padding: 0 14px 60px; }
  .masthead { padding: 16px 14px; }
  .foot { padding: 0 14px 30px; }
  .tile { flex: 1 1 44%; min-width: 0; }
  .line { grid-template-columns: 38px minmax(0, 1fr); }
  .line__side { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0s !important; animation-duration: 0s !important; }
}
