/* ── paste page: idle, drag, processing ─────────────────── */
body.idle #toolbar, body.idle #toc, body.idle #toc-backdrop, body.idle main { display: none; }
body:not(.idle) #paste { display: none; }
body.working #paste { opacity: .2; }

#paste {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 1.5rem 0;
}
.orn { color: var(--accent); font-size: 1.15rem; opacity: .85; margin-bottom: 1.4rem; }
.wordmark {
  font-size: 3.1rem; line-height: 1; letter-spacing: -.03em; font-weight: 500; margin: 0;
}
.tagline { margin: .95rem 0 0; font-size: 1.15rem; color: var(--ink-soft); text-align: center; text-wrap: pretty; }

.dropzone {
  position: relative; width: min(44rem, 100%); margin: 3.6rem 0 0;
  border: 1.5px dashed var(--border); border-radius: 16px;
  padding: 5.2rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transition: border-color .28s ease;
}
.dropzone::after {
  content: ''; position: absolute; inset: -1.5px;
  border: 1.5px dashed var(--accent); border-radius: 16px;
  background: var(--accent-soft); pointer-events: none;
  opacity: 0; transition: opacity .24s ease;
}
body.dragging .dropzone::after { opacity: 1; }
.cue {
  position: relative; display: flex; align-items: baseline; gap: .7rem;
  font-size: 2.3rem; line-height: 1.1; letter-spacing: -.015em;
}
.cue .keys { display: inline-flex; gap: .32rem; }
.cue kbd {
  font-family: var(--mono); font-size: .92rem; line-height: 1;
  padding: .45rem .6rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--ink-soft); transform: translateY(-.35rem);
}
.dz-sub { position: relative; margin: 0; font-family: var(--sans); font-size: .9rem; color: var(--muted); text-align: center; }

.assurance {
  display: flex; align-items: center; gap: .6rem;
  margin: 1.9rem 0 0; max-width: 44rem;
}
.assurance .shield { color: var(--accent); font-size: .95rem; line-height: 1; }
.assurance p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

.paste-error {
  margin: 1.6rem 0 0; font-size: 1rem; color: var(--ink-soft); font-style: italic;
  opacity: 0; transition: opacity .3s ease; text-align: center; max-width: 34rem;
}
.paste-error.show { opacity: 1; }

.spacer { flex: 1; min-height: 4rem; }
.paste-foot {
  width: 100%; max-width: 44rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.6rem 0 2rem;
  font-family: var(--sans); font-size: .82rem; color: var(--muted);
}
.paste-foot a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border); }
.paste-foot a:hover { color: var(--accent); border-color: var(--accent); }
.paste-foot button {
  display: flex; align-items: center; gap: .5rem;
  height: 2.1rem; padding: 0 .9rem;
  background: transparent; border: 1px solid var(--border); border-radius: 99px;
  cursor: pointer; color: var(--muted);
  font-family: var(--sans); font-size: .78rem; letter-spacing: .04em;
  transition: color .2s, border-color .2s;
}
.paste-foot button:hover { color: var(--ink); border-color: var(--muted); }

/* ── processing: setting the page ───────────────────────── */
#setting { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 2rem; background: var(--bg); }
body.working #setting { display: grid; }
.setting-inner { width: min(38rem, 100%); display: flex; flex-direction: column; align-items: center; gap: 2.4rem; }
.setting-orn { color: var(--accent); font-size: 1.6rem; animation: breathe .78s cubic-bezier(.22,.61,.36,1) both; }
.skeleton { width: 100%; display: flex; flex-direction: column; gap: .85rem; animation: lines-out .3s ease-in .52s both; }
.skeleton i { display: block; height: .62rem; border-radius: 3px; background: var(--surface-2); animation: line .34s cubic-bezier(.22,.61,.36,1) both; }
.skeleton i:nth-child(1) { width: 42%;  animation-delay: .02s; }
.skeleton i:nth-child(2) { width: 100%; animation-delay: .09s; }
.skeleton i:nth-child(3) { width: 96%;  animation-delay: .15s; }
.skeleton i:nth-child(4) { width: 99%;  animation-delay: .21s; }
.skeleton i:nth-child(5) { width: 64%;  animation-delay: .27s; }
.setting-label { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

@keyframes line { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes lines-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes breathe { 0% { opacity: 0; transform: scale(.94); } 45% { opacity: 1; transform: scale(1.05); } 100% { opacity: .9; transform: scale(1) translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  .setting-orn, .skeleton, .skeleton i { animation: none; opacity: 1; transform: none; }
  #progress { transition: none; }
}

/* close button lives in the reader toolbar on the web build */
#btn-close { width: auto !important; padding: 0 .8rem; font-family: var(--sans); font-size: .72rem !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ── example link ───────────────────────────────────────── */
.example-line { margin: 1.4rem 0 0; font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.example-line button {
  appearance: none; border: 0; background: none; padding: 0;
  font: inherit; color: var(--ink-soft); cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.example-line button:hover { color: var(--accent); border-color: var(--accent); }

/* ── below the fold: why ────────────────────────────────── */
.why {
  width: min(38rem, 100%);
  margin: 0 auto;
  padding: 1rem 0 6rem;
  color: var(--ink-soft);
}
.why h2 {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  margin: 3.4rem 0 1rem;
}
.why h2:first-child { margin-top: 0; }
.why p { margin: 0 0 1.25rem; font-size: 1.02rem; line-height: 1.75; text-wrap: pretty; }
.why code {
  font-family: var(--mono); font-size: .86em;
  background: var(--surface-2); padding: .1em .35em; border-radius: 4px;
}
.why-foot { color: var(--muted); font-size: .95rem !important; }
