/* YTPocket: bold "sticker" style. Yellow ground, thick ink outlines with an
   offset shadow, pink for selected things and progress, mint for download.
   Icons: /icons.svg (Phosphor + Simple Icons), filled with currentColor.

   Sections: tokens, base, header & menus, page & hero, tool (result, sheet,
   options), content sections, step pictures, tool cards, footer, legal
   pages, toasts, responsive. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/bricolage-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------- tokens --- */
/* Yellow is the default everywhere. Dark is opt-in via the moon button
   (data-theme="dark" on <html>, set by /theme.js before first paint). */
:root {
  color-scheme: light;
  --bg: #ffd43b;
  --card: #fffdf5;
  --soft: #fff4c2; /* paste zone, hover, step stages */
  --field: #ffffff;
  --ink: #161616;
  --muted: #55524a;
  --outline: #161616;
  --shadow: #161616;
  --pop: #ff5d8f; /* selected, progress */
  --pop-soft: #ffc2d5;
  --pop-softer: #ffdfe9;
  --mint: #3ddc97; /* download */
  --sun: #ffd43b;
  --on-color: #161616; /* text on pop / mint / sun */
  --danger: #c4202f;
  --cta-bg: #161616;
  --cta-ink: #ffffff;
  --foot-bg: #161616;
  --foot-ink: #fff8e1;
  --foot-muted: #d8d1bb;

  --font:
    'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Arabic',
    sans-serif;
  --line: 3px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --pad: clamp(14px, 4vw, 28px);
  --max: 1120px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1c1b18;
  --card: #2a2823;
  --soft: #34312a;
  --field: #1c1b18;
  --ink: #fff8e1;
  --muted: #c9c2ab;
  --outline: #fff8e1;
  --shadow: #ffd43b;
  --pop-soft: #6b2c41;
  --pop-softer: #4a2532;
  --danger: #ff8a95;
  --cta-bg: #ffd43b;
  --cta-ink: #161616;
  --foot-bg: #11100e;
}

/* --------------------------------------------------------------- base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip; /* offset shadows must never cause sideways scrolling */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll {
  overflow: hidden;
}
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
img,
svg {
  display: block;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--pop);
  outline-offset: 3px;
}
.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 40;
  padding: 10px 14px;
  border: var(--line) solid var(--outline);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus {
  top: 8px;
}

/* The signature: card with a thick outline and a hard offset shadow. */
.box {
  background: var(--card);
  border: var(--line) solid var(--outline);
  box-shadow: 4px 4px 0 var(--shadow);
}

/* ----------------------------------------------------- header & menus --- */
.topbar,
.page,
.foot-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.logo {
  width: 36px;
  height: 36px;
  border: var(--line) solid var(--outline);
  border-radius: 11px;
  background: var(--pop);
  color: #161616;
  display: grid;
  place-items: center;
}
.logo .ic {
  width: 20px;
  height: 20px;
}
.menu {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.dd {
  position: relative;
}
.dd > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.dd > summary::-webkit-details-marker {
  display: none;
}
.dd > summary .caret {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.dd > summary:hover,
.dd.active > summary {
  background: var(--soft);
}
.dd[open] > summary {
  background: var(--card);
  box-shadow: inset 0 0 0 var(--line) var(--outline);
}
.dd[open] > summary .caret {
  transform: rotate(180deg);
}
.dd-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  padding: 8px;
  background: var(--card);
  border: var(--line) solid var(--outline);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--shadow);
}
/* Menu item: platform sticker + label + one-line description. */
.dd-panel a,
.drawer nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
}
.dd-panel a:hover,
.drawer nav a:hover {
  background: var(--soft);
}
.dd-panel a[aria-current='page'],
.drawer nav a[aria-current='page'] {
  background: var(--soft);
  box-shadow: inset 4px 0 0 var(--pop);
}
.dd-panel b,
.drawer nav b {
  display: block;
  font-weight: 800;
}
.dd-panel small,
.drawer nav small {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}
.topbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: var(--line) solid var(--outline);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 3px 3px 0 var(--shadow);
}
.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.menu-btn {
  display: none;
}
.status {
  padding: 4px 12px;
  border: 2px solid var(--outline);
  border-radius: 99px;
  background: var(--card);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--danger);
}

/* Slide-in menu (phones). */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(22 22 22 / 0.5);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  overflow-y: auto;
  padding: max(14px, env(safe-area-inset-top)) 14px 24px;
  background: var(--card);
  border-left: var(--line) solid var(--outline);
  animation: slide-in 0.2s ease-out;
}
@keyframes slide-in {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.drawer-label {
  margin: 16px 10px 4px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--muted);
}

/* Brand colours (Simple Icons), as classes: the strict CSP blocks inline
   style attributes. */
.brand-youtube {
  --brand: #ff0000;
}
.brand-tiktok {
  --brand: #000000;
}
.brand-facebook {
  --brand: #0866ff;
}
.brand-pinterest {
  --brand: #bd081c;
}
.brand-dailymotion {
  --brand: #0a0a0a;
}
.brand-twitch {
  --brand: #9146ff;
}

/* Platform logo "sticker": brand colour, ink frame, slightly tilted. */
.sticker {
  position: relative;
  width: 48px;
  height: 48px;
  flex: none;
  border: var(--line) solid #161616;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  transform: rotate(-5deg);
  box-shadow: 2px 2px 0 #161616;
}
.sticker .ic {
  width: 24px;
  height: 24px;
}
.sticker.sm {
  width: 34px;
  height: 34px;
  border-width: 2px;
  border-radius: 10px;
  box-shadow: none;
}
.sticker.sm .ic {
  width: 18px;
  height: 18px;
}
.sticker .fmt {
  position: absolute;
  right: -10px;
  bottom: -8px;
  transform: rotate(5deg);
  padding: 0 5px;
  border: 2px solid #161616;
  border-radius: 7px;
  background: var(--mint);
  color: #161616;
  font-size: 0.625rem;
  font-weight: 800;
}

/* ------------------------------------------------------- page & hero --- */
.page {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* let the column shrink below the input's default width */
  gap: 18px;
  align-content: start;
  padding-bottom: 36px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
}
.crumbs li {
  display: flex;
  align-items: center;
  gap: 4px;
}
.crumbs a {
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}
.crumbs .sep {
  width: 12px;
  height: 12px;
}
.crumbs [aria-current] {
  color: var(--ink);
}

.hero {
  border-radius: var(--r-lg);
  padding: clamp(18px, 4vw, 30px);
  display: grid;
  gap: 14px;
}
.hero h1 {
  font-size: clamp(1.9rem, 6.5vw, 3rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.lead {
  color: var(--muted);
  margin-top: -6px;
}
/* Big tap target for phones: reads the clipboard in one tap. */
.paste-zone {
  min-height: 104px;
  border: var(--line) dashed var(--outline);
  border-radius: 18px;
  background: var(--soft);
  font-size: 1.15rem;
  font-weight: 800;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
}
.paste-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.paste-zone small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.paste-zone:hover {
  border-style: solid;
}
.intake {
  display: flex;
  gap: 10px;
}
.field-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.intake input {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 44px 0 16px;
  border: var(--line) solid var(--outline);
  border-radius: var(--r-md);
  background: var(--field);
  font-size: 1rem; /* 16px: no iOS zoom on focus */
  outline: none;
}
.intake input::placeholder {
  color: var(--muted);
  opacity: 0.9;
}
.intake input:focus-visible {
  box-shadow: 0 0 0 3px var(--pop);
}
.intake.dragging input {
  border-style: dashed;
  background: var(--soft);
}
/* Paste button inside the field, right side (shown while the field is empty). */
.field-paste {
  position: absolute;
  top: 9px;
  right: 9px;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--outline);
  border-radius: 10px;
  background: var(--soft);
  font-weight: 800;
  font-size: 0.9375rem;
}
.field-paste:hover {
  background: var(--mint);
  color: #161616;
}
.field-paste .ic {
  width: 18px;
  height: 18px;
}
.intake input:placeholder-shown {
  padding-right: 112px; /* room for the Paste button */
}
/* Phones: icon only (the big "Tap to paste link" area is right above). */
@media (max-width: 759px) {
  .field-paste {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .field-paste-text {
    display: none;
  }
  .intake input:placeholder-shown {
    padding-right: 54px;
  }
}
.clear {
  position: absolute;
  top: 8px;
  right: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: none;
  display: grid;
  place-items: center;
}
.clear:hover {
  background: var(--soft);
}
.clear .ic {
  width: 18px;
  height: 18px;
}
.cta {
  flex: none;
  min-width: 128px;
  padding: 0 20px;
  white-space: nowrap;
  height: 56px;
  border: var(--line) solid var(--outline);
  border-radius: var(--r-md);
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.08s;
}
.cta:active:not(:disabled) {
  transform: translate(2px, 2px);
}
.cta:disabled {
  opacity: 0.7;
}
.alert {
  border: var(--line) solid var(--danger);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  background: var(--card);
}
.alert strong {
  display: block;
  font-weight: 800;
  color: var(--danger);
}
.alert span {
  color: var(--muted);
  font-size: 0.9375rem;
}
.terms {
  margin-top: -4px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.terms a {
  color: var(--ink);
  font-weight: 700;
}

/* Sister pages of the same platform (Video / To MP3 / To MP4 ...). */
.sisters ul {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 4px 6px 2px;
  scrollbar-width: none;
}
.sisters ul::-webkit-scrollbar {
  display: none;
}
.sisters a {
  display: block;
  white-space: nowrap;
  padding: 7px 16px;
  border: var(--line) solid var(--outline);
  border-radius: 99px;
  background: var(--card);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--shadow);
}
.sisters a:hover {
  background: var(--soft);
}
.sisters a[aria-current='page'] {
  background: var(--pop);
  color: var(--on-color);
}

/* Once a video is loaded the hero shrinks to just the link field, and the
   reading material moves out of the way. */
.has-video .hero h1,
.has-video .lead,
.has-video .paste-zone,
.has-video .terms,
.has-video .content {
  display: none;
}
.has-video .hero {
  padding: 12px;
  border-radius: var(--r-md);
}

/* ------------------------------------------------------------- result --- */
.result {
  display: grid;
  gap: 18px;
  align-items: start;
}
.video {
  border-radius: 22px;
  overflow: hidden;
}
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-bottom: var(--line) solid var(--outline);
}
.screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* No thumbnail available: striped panel with the site name. */
.screen.empty {
  background: repeating-linear-gradient(45deg, var(--pop) 0 14px, var(--pop-soft) 14px 28px);
  display: grid;
  place-items: center;
}
.screen.empty::after {
  content: attr(data-site);
  padding: 6px 16px;
  border: var(--line) solid #161616;
  border-radius: 99px;
  background: #fffdf5;
  color: #161616;
  font-weight: 800;
  font-size: 1.25rem;
}
.live {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 2px 10px;
  border: 2px solid #161616;
  border-radius: 99px;
  background: var(--pop);
  color: #161616;
  font-weight: 800;
  font-size: 0.875rem;
}
.video-text {
  padding: 12px 16px 14px;
}
.video-text h2 {
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.meta span:empty {
  display: none;
}
.meta #site {
  font-weight: 800;
  color: var(--ink);
}
.pill {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--outline);
  border-radius: 99px;
  background: var(--card);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.875rem;
}
.pill:hover {
  background: var(--soft);
}
.pill:disabled {
  opacity: 0.7;
  cursor: progress;
}
.pill .ic {
  width: 16px;
  height: 16px;
}
/* Thumbnail pages: saving the image is the main action. */
.pill.big {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
  padding: 14px;
  border-width: var(--line);
  border-radius: var(--r-md);
  background: var(--mint);
  color: #161616;
  font-size: 1.1rem;
  box-shadow: 3px 3px 0 var(--shadow);
}
.pill.big .ic {
  width: 22px;
  height: 22px;
}
:root[data-theme='dark'] .pill.big {
  border-color: #161616;
}

/* "Cut a part" (switched off in app.js until it gets a timeline UI). */
.cut-toggle {
  margin-top: 10px;
  border: 0;
  background: none;
  font-weight: 800;
  text-decoration: underline;
}
.cut {
  margin-top: 6px;
  padding: 12px;
  border: var(--line) dashed var(--outline);
  border-radius: var(--r-md);
  background: var(--soft);
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
}
.cut label {
  display: grid;
  gap: 2px;
  font-weight: 800;
  font-size: 0.875rem;
}
.cut input {
  width: 96px;
  height: 44px;
  padding: 0 10px;
  border: var(--line) solid var(--outline);
  border-radius: var(--r-sm);
  background: var(--field);
  font-size: 1rem;
}
.cut-msg {
  flex-basis: 100%;
  font-size: 0.875rem;
  font-weight: 700;
}
.cut-msg.bad {
  color: var(--danger);
}
.link-btn {
  height: 44px;
  border: 0;
  background: none;
  font-weight: 700;
  text-decoration: underline;
  color: var(--muted);
}

.skeleton {
  padding-bottom: 14px;
  display: grid;
  gap: 10px;
}
.sk {
  background: var(--soft);
  animation: breathe 1.3s ease-in-out infinite;
}
.sk-media {
  aspect-ratio: 16 / 9;
  border-bottom: var(--line) solid var(--outline);
}
.sk-line {
  height: 16px;
  margin: 0 16px;
  border-radius: 6px;
}
.sk-line.short {
  width: 40%;
}
@keyframes breathe {
  50% {
    opacity: 0.45;
  }
}

/* ---------------------------------------------------------- the sheet --- */
.sheet {
  border-radius: 26px;
  padding: 10px 14px 14px;
}
.grab {
  width: 44px;
  height: 6px;
  margin: 0 auto 12px;
  border-radius: 3px;
  background: var(--outline);
}
.tabs {
  display: flex;
  gap: 8px;
}
.tabs button {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: var(--line) solid var(--outline);
  border-radius: 14px;
  background: var(--card);
  font-weight: 800;
}
.tabs button[aria-pressed='true'] {
  background: var(--pop);
  color: var(--on-color);
}
.tabs button:disabled {
  opacity: 0.4;
}
.sheet-note {
  margin-top: 10px;
  font-weight: 700;
  color: var(--danger);
}
.options {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

/* One format = one big button. Its background doubles as the progress bar. */
.opt {
  --p: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 10px;
  border: var(--line) solid transparent;
  border-radius: var(--r-md);
  background: none;
  text-align: left;
}
.opt:hover:not(:disabled) {
  background: var(--soft);
}
.opt::before {
  content: '';
  position: absolute;
  inset: 0;
  width: calc(var(--p) * 1%);
  background: repeating-linear-gradient(45deg, var(--pop-soft) 0 8px, var(--pop-softer) 8px 16px);
  transition: width 0.5s ease-out;
}
.opt-text {
  position: relative;
  flex: 1;
  min-width: 0;
}
.opt-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}
.opt-sub {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.opt-icon {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  border: var(--line) solid var(--outline);
  border-radius: 50%;
  background: var(--mint);
  color: #161616;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.opt-icon .ic {
  width: 22px;
  height: 22px;
}
.opt.busy {
  border-color: var(--outline);
  background: var(--card);
}
.opt.busy .opt-icon {
  background: var(--card);
  color: var(--ink);
}
/* Unknown progress (waiting, converting): stripes slide across. */
.opt.busy.indeterminate::before {
  width: 100%;
  opacity: 0.6;
  background-size: 200% 100%;
  animation: slide 1.2s linear infinite;
}
@keyframes slide {
  to {
    background-position: -45px 0;
  }
}
.opt.done .opt-icon {
  background: var(--ink);
  color: var(--mint);
}
.opt.failed .opt-sub {
  color: var(--danger);
  font-weight: 700;
}
.opt.failed .opt-icon {
  background: var(--card);
  color: var(--ink);
}
.opt:disabled .opt-name,
.opt:disabled .opt-sub {
  color: var(--muted);
}
.opt:disabled .opt-icon {
  background: var(--soft);
  color: var(--muted);
  border-color: var(--muted);
}

/* ---------------------------------------------------- content sections --- */
.content {
  display: grid;
  gap: 18px;
}
.sec {
  border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 26px);
}
.sec h2,
.related h2 {
  margin-bottom: 14px;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.prose p {
  max-width: 72ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}
.prose p + p {
  margin-top: 10px;
}
.prose a,
.faq a,
.doc a {
  color: var(--ink);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* "What you get": one strip split into equal columns by thin lines (the
   grid gap shows the strip's background as the divider), not cards in a
   card. Desktop: 5 across. Phones: 2 across, the last one full width. */
.feats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border: var(--line) solid var(--outline);
  border-radius: 18px;
  background: color-mix(in srgb, var(--outline) 16%, var(--field));
}
.feat {
  padding: 18px 16px 20px;
  background: var(--field);
}
.tile {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  border: var(--line) solid #161616;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #161616;
  --duo: #fff;
  --duo-opacity: 1;
}
.tile .ic {
  width: 30px;
  height: 30px;
}
.tone-pop {
  background: var(--pop);
}
.tone-mint {
  background: var(--mint);
}
.tone-sun {
  background: var(--sun);
}
:root[data-theme='dark'] .tile {
  border-color: var(--outline);
}
.feat b {
  display: block;
  font-size: 1.0625rem;
  line-height: 1.25;
}
.feat-desc {
  display: block;
  margin-top: 3px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--muted);
}
@media (max-width: 859px) {
  .feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Odd one out spans the row and lays out sideways. */
  .feat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .feat:last-child:nth-child(odd) .tile {
    margin-bottom: 0;
  }
}

/* FAQ: native disclosure widgets, plus/minus icons. */
.faq details {
  border-top: 2px solid var(--soft);
}
.faq details:first-of-type {
  border-top: 0;
}
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  font-weight: 800;
  font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq-icon {
  width: 32px;
  height: 32px;
  flex: none;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.faq-icon .ic {
  width: 16px;
  height: 16px;
}
.faq-icon .minus,
.faq details[open] .faq-icon .plus {
  display: none;
}
.faq details[open] .faq-icon .minus {
  display: block;
}
.faq details[open] .faq-icon {
  background: var(--pop);
  color: #161616;
}
.faq details p {
  max-width: 72ch;
  padding: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

/* ------------------------------------------------------ step pictures --- */
/* Small copies of the real interface. Decorative (aria-hidden). */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step {
  border: var(--line) solid var(--outline);
  border-radius: 20px;
  background: var(--field);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.stage {
  height: 190px;
  position: relative;
  border-bottom: var(--line) solid var(--outline);
  background-color: var(--soft);
  background-image: radial-gradient(rgb(22 22 22 / 0.12) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #161616;
  font-size: 13px;
}
:root[data-theme='dark'] .stage {
  background-image: radial-gradient(rgb(255 248 225 / 0.12) 1.2px, transparent 1.2px);
}
.step-text {
  padding: 14px 16px 16px;
}
.step-text h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 800;
}
.step-text p {
  margin-top: 6px;
  color: var(--muted);
}
.num {
  width: 32px;
  height: 32px;
  flex: none;
  border: var(--line) solid var(--outline);
  border-radius: 50%;
  background: var(--mint);
  color: #161616;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
}
.hand {
  position: absolute;
  width: 30px;
  height: 30px;
  color: #161616;
  filter: drop-shadow(2px 2px 0 #fff);
}
/* 1: phone with share sheet */
.m-phone {
  position: absolute;
  top: 16px;
  width: 132px;
  height: 230px;
  padding: 8px;
  border: 3px solid #161616;
  border-radius: 22px;
  background: #fff;
  box-shadow: 4px 4px 0 #161616;
}
.m-video {
  height: 62px;
  border: 2px solid #161616;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
}
.m-video .ic {
  width: 30px;
  height: 30px;
}
.m-share {
  position: absolute;
  left: -30px;
  right: -30px;
  top: 70px;
  padding: 8px;
  border: 3px solid #161616;
  border-radius: 16px;
  background: #fffdf5;
  box-shadow: 3px 3px 0 #161616;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.m-share > div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
}
.m-share i {
  width: 34px;
  height: 34px;
  border: 2px solid #161616;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}
.m-share i .ic {
  width: 18px;
  height: 18px;
}
.m-share .hit i {
  background: var(--pop);
}
.m-share .hand {
  left: 30px;
  top: 6px;
  width: 24px;
  height: 24px;
}
/* 2: our link box */
.m-pasted {
  position: absolute;
  top: 30px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 2px solid #161616;
  border-radius: 99px;
  background: var(--mint);
  font-size: 12px;
  font-weight: 800;
}
.m-pasted .ic {
  width: 14px;
  height: 14px;
}
.m-intake {
  width: 88%;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 3px solid #161616;
  border-radius: 16px;
  background: #fffdf5;
  box-shadow: 4px 4px 0 #161616;
}
.m-field {
  flex: 1;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 3px solid #161616;
  border-radius: 11px;
  background: #fff;
}
.m-field span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.m-field .ic {
  width: 16px;
  height: 16px;
  color: #55524a;
}
.m-cta {
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  background: #161616;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  display: grid;
  place-items: center;
}
.hand-cta {
  right: 30px;
  bottom: 32px;
}
/* 3: our format rows / thumbnail card */
.m-sheet {
  width: 88%;
  padding: 10px;
  border: 3px solid #161616;
  border-radius: 18px;
  background: #fffdf5;
  box-shadow: 4px 4px 0 #161616;
  display: grid;
  gap: 6px;
}
.m-tabs {
  display: flex;
  gap: 6px;
}
.m-tabs span {
  flex: 1;
  padding: 4px;
  border: 2px solid #161616;
  border-radius: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.m-tabs .on {
  background: var(--pop);
}
.m-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 2px solid transparent;
  border-radius: 11px;
  overflow: hidden;
}
.m-row .t {
  position: relative;
  flex: 1;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.15;
}
.m-row .t small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #55524a;
}
.m-row .c {
  position: relative;
  width: 32px;
  height: 32px;
  border: 2px solid #161616;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}
.m-row .c .ic {
  width: 16px;
  height: 16px;
}
.m-row .c.done {
  background: #161616;
  color: var(--mint);
}
.m-row.busy {
  border-color: #161616;
  background: #fff;
}
.m-row.busy::before {
  content: '';
  position: absolute;
  inset: 0 36% 0 0;
  background: repeating-linear-gradient(45deg, #ffc2d5 0 7px, #ffdfe9 7px 14px);
}
.m-row.busy .c {
  background: #fff;
}
.m-thumb {
  width: 78%;
  padding: 8px;
  border: 3px solid #161616;
  border-radius: 16px;
  background: #fffdf5;
  box-shadow: 4px 4px 0 #161616;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.m-thumb-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 86px;
  border: 2px solid #161616;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  position: relative;
}
.m-thumb-img .ic {
  width: 32px;
  height: 32px;
}
.m-thumb-img span {
  position: absolute;
  right: 6px;
  bottom: 4px;
  padding: 0 5px;
  border-radius: 6px;
  background: #161616;
  font-size: 10px;
  font-weight: 800;
}
.m-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 2px solid #161616;
  border-radius: 99px;
  background: var(--mint);
  font-size: 12px;
  font-weight: 800;
}
.m-pill .ic {
  width: 14px;
  height: 14px;
}
.hand-pill {
  left: 58%;
  bottom: 14px;
}

/* --------------------------------------------------------- tool cards --- */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.tool {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px;
  border: var(--line) solid var(--outline);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 4px 4px 0 var(--shadow);
  text-decoration: none;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    background-color 0.12s;
}
.tool:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
  background: var(--soft);
}
.tool:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
}
.tool-text {
  flex: 1;
  min-width: 0;
}
.tool-text b {
  display: block;
  font-size: 1.0625rem;
  line-height: 1.2;
}
.tool-text span {
  font-size: 0.875rem;
  color: var(--muted);
}
.go {
  width: 36px;
  height: 36px;
  flex: none;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.go .ic {
  width: 16px;
  height: 16px;
}
.tool:hover .go {
  background: var(--ink);
  color: var(--bg);
}

/* ------------------------------------------------------------- footer --- */
.site-foot {
  margin-top: 18px;
  background: var(--foot-bg);
  color: var(--foot-ink);
  padding: 32px 0 max(28px, env(safe-area-inset-bottom));
}
.fcols {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: 24px;
}
.fcol .brand {
  font-size: 1.25rem;
}
.fcol.about p {
  margin-top: 10px;
  color: var(--foot-muted);
  font-size: 0.9375rem;
  max-width: 28ch;
}
.fhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--sun);
  font-weight: 800;
}
.fhead .ic {
  width: 18px;
  height: 18px;
}
.fcol li a {
  display: inline-block;
  padding: 4px 0;
  color: var(--foot-muted);
  text-decoration: none;
  font-size: 0.9375rem;
}
.fcol li a:hover {
  color: var(--foot-ink);
  text-decoration: underline;
}
.fine {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 248 225 / 0.15);
  color: var(--foot-muted);
  font-size: 0.8125rem;
}

/* --------------------------------------------------------- legal pages --- */
.doc {
  max-width: 820px;
}
.doc h1 {
  margin-bottom: 12px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.doc h2 {
  margin: 24px 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
}
.doc p {
  max-width: 72ch;
  line-height: 1.65;
  color: var(--muted);
}
.doc p + p {
  margin-top: 8px;
}

/* ------------------------------------------------------------- toasts --- */
.toasts {
  position: fixed;
  z-index: 20;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
}
.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0 8px;
  padding: 10px 6px 10px 14px;
  border: var(--line) solid #161616;
  border-radius: var(--r-md);
  background: var(--mint);
  color: #161616;
  box-shadow: 4px 4px 0 #161616;
  animation: drop 0.2s ease-out;
}
.toast.error {
  background: var(--pop);
}
.toast.info {
  background: #fffdf5;
}
.toast b {
  font-weight: 800;
}
.toast p {
  grid-column: 1;
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}
.toast button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  display: grid;
  place-items: center;
}
.toast button:hover {
  background: rgb(0 0 0 / 0.08);
}
.toast .ic {
  width: 16px;
  height: 16px;
}
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1000px) {
  .fcols {
    grid-template-columns: repeat(3, 1fr);
  }
  .fcol.about {
    grid-column: 1 / -1;
  }
}
/* Tablets and phones: menus move into the slide-in panel. */
@media (max-width: 859px) {
  .menu {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}
/* Phones: the format panel looks like a bottom sheet. */
@media (max-width: 759px) {
  .sheet {
    border-radius: 26px 26px 18px 18px;
  }
  .cta {
    min-width: 0;
    padding: 0 16px;
  }
  .fcols {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}
@media (max-width: 380px) {
  .cta {
    padding: 0 12px;
    font-size: 1rem;
  }
}
/* No paste zone on wide screens with a mouse; the field is enough there. */
@media (min-width: 760px) and (hover: hover) and (pointer: fine) {
  .paste-zone {
    display: none;
  }
}
/* Wide screens: video on the left, formats on the right. */
@media (min-width: 760px) {
  .result {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }
  .grab {
    display: none;
  }
  .sheet {
    padding-top: 14px;
    position: sticky;
    top: 16px;
  }
  /* Thumbnail pages: no format panel, so the picture gets the room. */
  [data-tab='thumbnail'] .result {
    grid-template-columns: minmax(0, 720px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (forced-colors: active) {
  .opt::before {
    background: Highlight;
    forced-color-adjust: none;
  }
  .sticker,
  .tile {
    forced-color-adjust: none;
  }
}
