/* DS Downloader — layout (the kit gives the material) */
*,*::before,*::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0; min-height: 100dvh; overflow-x: hidden;
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 17px; line-height: 1.5;
  color: var(--lg-ink); background: var(--lg-paper);
}
a{ color: inherit; }
button{ font: inherit; color: inherit; }
[hidden]{ display: none !important; }
.wrap{ width: min(1080px, 100% - 32px); margin-inline: auto; }

.stripes{ position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 46px, color-mix(in oklab, var(--lg-ink) 6%, transparent) 46px 48px); }
.bigword{ position: fixed; left: 0; right: 0; bottom: -2vw; z-index: -1; pointer-events: none; text-align: center; white-space: nowrap;
  font-size: 21vw; font-weight: 800; line-height: .8; letter-spacing: -.05em;
  color: color-mix(in oklab, var(--lg-accent) 22%, transparent); }

/* nav */
.nav{ margin-top: 12px; }
.brand{ white-space: nowrap; display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; }
.brand b{ font-weight: 800; }
.nav-btn{ min-height: 42px; padding: 0 14px; font-family: var(--lg-f-mono); font-size: 13px; }

/* hero */
.hero{ padding: clamp(40px, 8vw, 96px) 0 24px; container-type: inline-size; }
.hero .lg-display{ font-size: clamp(3.2rem, 15cqi, 9rem); margin: 14px 0 18px; }
.lead{ max-width: 34em; margin: 0 0 32px; font-size: clamp(1.05rem, 2.4cqi, 1.3rem); opacity: .88; }

.drop{ padding: clamp(18px, 3vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.drop-row{ position: relative; }
.drop .lg-field{ field-sizing: fixed; font-size: clamp(1rem, 2.6vw, 1.25rem); min-height: 62px; padding-right: 52px; font-family: var(--lg-f-mono); }
.icon-btn{ position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; cursor: pointer; opacity: .6; border-radius: 50%; }
.icon-btn:hover{ opacity: 1; }
.drop-actions{ display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.drop-actions .lg--accent{ min-width: 220px; font-size: 1.05rem; }
.plats{ display: flex; gap: 8px; flex-wrap: wrap; }
.plats span{ font-family: var(--lg-f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid color-mix(in oklab, var(--lg-ink) 25%, transparent); opacity: .7; transition: all .2s; }
.plats span.on{ background: var(--lg-accent); color: var(--lg-on-accent); border-color: var(--lg-accent); opacity: 1; }

.msg{ min-height: 1.5em; margin: 14px 4px 0; font-weight: 600; }
.msg.err{ color: oklch(0.72 0.19 28); }
html[data-theme="light"] .msg.err{ color: oklch(0.52 0.2 28); }

/* busy state on the submit button */
.spin{ width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* result */
.result{ padding: clamp(16px, 3vw, 28px); display: grid; gap: 20px; margin-top: 8px; animation: rise .45s var(--lg-ease); }
@keyframes rise{ from{ opacity: 0; transform: translateY(16px); } }
.media{ display: grid; grid-template-columns: minmax(140px, 300px) 1fr; gap: 20px; align-items: center; }
.thumb{ position: relative; aspect-ratio: 16/9; border-radius: calc(var(--lg-radius) * .6); overflow: hidden; background: color-mix(in oklab, var(--lg-ink) 10%, transparent); border: 2px solid var(--lg-ink); }
.thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.portrait{ aspect-ratio: 4/5; max-width: 210px; }
.dur{ position: absolute; right: 8px; bottom: 8px; font-family: var(--lg-f-mono); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: oklch(0 0 0 / .78); color: #fff; }
.dur:empty{ display: none; }
.meta h2{ margin: 6px 0 4px; font-size: clamp(1.2rem, 3vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta p{ margin: 0; opacity: .75; }

.tabs{ display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; justify-self: start; border: 2px solid var(--lg-ink); }
.tabs button{ border: 0; background: none; padding: 9px 20px; border-radius: 999px; font-weight: 750; cursor: pointer; min-height: 42px; }
.tabs button[aria-selected="true"]{ background: var(--lg-ink); color: var(--lg-paper); }

.opts{ display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.opt{ text-align: left; cursor: pointer; padding: 14px 16px; display: grid; gap: 4px; min-height: 92px; border-radius: calc(var(--lg-radius) * .6);
  transition: transform .2s var(--lg-ease), background .2s; }
.opt:hover{ transform: translateY(-3px); }
.opt .q{ font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.opt .tag{ font-family: var(--lg-f-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--lg-ink); color: var(--lg-paper); }
.opt.best .tag{ background: var(--lg-on-accent); color: var(--lg-accent); }
.opt .sub{ font-family: var(--lg-f-mono); font-size: 12px; opacity: .78; }
.opt.lg--accent .sub{ opacity: .9; }
.hint{ margin: 0; font-size: 14px; opacity: .7; }

/* jobs */
.jobs{ display: grid; gap: 12px; margin-top: 16px; }
.job{ padding: 16px 18px; display: grid; gap: 10px; animation: rise .35s var(--lg-ease); }
.job-top{ display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.job-name{ font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.job-pct{ font-family: var(--lg-f-mono); font-weight: 600; font-size: 1.3rem; }
.bar{ height: 12px; border-radius: 999px; border: 2px solid var(--lg-ink); overflow: hidden; }
.bar i{ display: block; height: 100%; width: 0; background: var(--lg-accent); transition: width .3s linear; }
.bar.indet i{ width: 35% !important; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet{ from{ transform: translateX(-100%); } to{ transform: translateX(290%); } }
.job-info{ display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; font-family: var(--lg-f-mono); font-size: 13px; }
.job-info .acts{ display: flex; gap: 8px; }
.job-info .lg-btn{ min-height: 40px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 15px; }
.job.err .job-pct{ color: oklch(0.72 0.19 28); }

/* sections */
.how, .faq{ padding: 72px 0 0; }
.sec-head{ display: flex; justify-content: space-between; padding: 14px 0; border-top: var(--lg-rule); margin-bottom: 20px; }
.steps{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step{ padding: 22px; }
.step b{ display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--lg-accent); color: var(--lg-on-accent); font-size: 1.2rem; }
.step h3{ margin: 14px 0 6px; font-size: 1.35rem; letter-spacing: -.02em; }
.step p{ margin: 0; opacity: .85; }
.faq details{ margin-bottom: 10px; padding: 0 20px; border-radius: 18px; }
.faq summary{ cursor: pointer; padding: 18px 0; font-weight: 750; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after{ content: "+"; font-family: var(--lg-f-mono); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after{ content: "−"; }
.faq summary::-webkit-details-marker{ display: none; }
.faq details p{ margin: 0 0 18px; opacity: .88; }

.foot{ width: min(1080px, 100% - 32px); margin: 80px auto 0; padding: 24px 0 40px; border-top: var(--lg-rule); display: grid; gap: 8px; }
.foot p{ margin: 0; }
.foot a{ text-decoration-thickness: 2px; text-underline-offset: 3px; }

@media (max-width: 760px){
  .media{ grid-template-columns: 1fr; }
  .thumb.portrait{ max-width: 180px; }
  .steps{ grid-template-columns: 1fr; }
  .drop-actions > *{ flex: 1 1 100%; }
  .opts{ grid-template-columns: repeat(2, 1fr); }
  .nav{ padding-left: 14px; }
  .brand span{ font-size: 1rem; }
}
