:root {
  --bg: #f6f7f9; --card: #fff; --text: #16202a; --muted: #5b6672; --line: #dfe3e8;
  --accent: #0f766e; --accent-ink: #fff; --error-bg: #fdecec; --error: #9b1c1c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1418; --card: #182027; --text: #e6ebef; --muted: #9aa6b1; --line: #2a343d;
          --accent: #2dd4bf; --accent-ink: #062b28; --error-bg: #3a1717; --error: #fca5a5; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
       font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
       max-width: 860px; margin: 0 auto; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 16px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--text); }
main { max-width: 860px; margin: 0 auto; padding: 0 16px 40px; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 24px 0 8px; }
h2 { font-size: 22px; margin: 36px 0 8px; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 24px 24px; margin-top: 16px; }
.tool h1 { text-align: center; }
.tool .lede { text-align: center; }
.paste { display: flex; gap: 8px; }
.paste input { flex: 1; min-width: 0; font: inherit; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px;
               background: var(--bg); color: var(--text); }
.paste input:focus { outline: none; border-color: var(--accent); }
button, .btn { font: inherit; font-weight: 600; padding: 14px 22px; border-radius: 12px; border: 2px solid var(--accent);
               background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn { display: inline-block; padding: 10px 16px; background: transparent; color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.error { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--error-bg); color: var(--error); }
.result { display: flex; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.thumb { width: 180px; max-height: 320px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--line); }
.meta { min-width: 0; }
.meta p { margin: 0 0 8px; }
.author { font-weight: 700; }
.duration, .hint { color: var(--muted); font-size: 15px; }
.text { white-space: pre-line; overflow-wrap: anywhere; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.content ol, .content ul { padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.mono li, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; overflow-wrap: anywhere; }
.faq dt { font-weight: 700; margin-top: 18px; }
.faq dd { margin: 4px 0 0; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer nav, footer p { max-width: 860px; margin: 0 auto; padding: 12px 16px 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 24px; }
footer a { color: var(--muted); }
footer p:last-child { padding-bottom: 32px; }
.langs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 32px; font-size: 15px; }
.langs a[aria-current] { color: var(--text); font-weight: 600; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) {
  .tool { padding: 4px 16px 20px; }
  .paste { flex-direction: column; }
  .result { flex-direction: column; }
  .thumb { width: 100%; max-height: 240px; }
}
