:root {
  --bg: #fbf6ec;
  --paper: #fffdf8;
  --ink: #1d1a16;
  --muted: #6b6257;
  --line: #1d1a16;
  --accent: #ff5b3a;
  --accent-ink: #1d1a16;
  --goo: #b7f36b;
  --warn: #fff1b8;
  --err: #c2261b;
  --shadow: 4px 4px 0 var(--line);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --paper: #201d18;
    --ink: #f3ecdf;
    --muted: #a99f90;
    --line: #f3ecdf;
    --accent: #ff7a5c;
    --accent-ink: #15130f;
    --goo: #9ad84f;
    --warn: #3a3218;
    --err: #ff8a7a;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font: 17px/1.55 var(--sans);
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
code, pre, textarea { font-family: var(--mono); font-size: .88em; }
pre { background: var(--paper); border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }

.top, main, footer { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; gap: 12px; }
.mark { font: 800 22px/1 var(--sans); letter-spacing: -.03em; text-decoration: none; }
.mark span { color: var(--muted); font-weight: 600; }
.top nav { display: flex; gap: 16px; font-size: 15px; }

.hero { padding: 48px 0 22px; }
h1 { font-size: clamp(36px, 8.5vw, 64px); line-height: .98; letter-spacing: -.04em; margin: 0 0 16px; font-weight: 850; }
h1 em {
  font-style: normal;
  background: var(--goo);
  color: #1d1a16;
  padding: 0 .12em;
  border-radius: .18em .4em .22em .5em;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0; }

.card {
  background: var(--paper);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 18px 0 28px;
}
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button {
  font: 600 15px var(--sans); color: var(--ink); background: transparent;
  border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; min-height: 190px; padding: 22px;
  border: 2.5px dashed var(--line); border-radius: 26px 14px 30px 12px;
  cursor: pointer; transition: transform .15s, background .15s;
}
.drop:hover, .drop.over { background: color-mix(in srgb, var(--goo) 30%, transparent); transform: rotate(-.4deg) scale(1.01); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.drop-big { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.drop-small { color: var(--muted); font-size: 14px; }

textarea {
  width: 100%; min-height: 200px; resize: vertical; padding: 12px;
  color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px;
}
.go, .copy, .del {
  font: 700 15px var(--sans); cursor: pointer; border: 2px solid var(--line); border-radius: 10px;
}
.go { margin-top: 12px; padding: 10px 20px; background: var(--accent); color: var(--accent-ink); box-shadow: 3px 3px 0 var(--line); }
.go:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.go:disabled { opacity: .6; cursor: progress; }
.copy, .del { padding: 6px 12px; background: var(--paper); color: var(--ink); white-space: nowrap; }
.del:hover { background: var(--err); color: var(--paper); }

.status { min-height: 1.4em; margin: 12px 0 0; font-weight: 600; }
.status.err { color: var(--err); }

.result { margin-top: 10px; border-top: 2px dashed var(--line); padding-top: 14px; }
.result-head { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.row a, .row code {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1.5px solid var(--line);
}
.row a { font-weight: 700; }
.token-note { background: var(--warn); border-radius: 8px; padding: 8px 10px; margin: 14px 0 4px; font-size: 15px; }
.fine { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.mine h2 { font-size: 20px; margin: 0 0 8px; }
.mine small { font-weight: 400; color: var(--muted); font-size: 14px; }
.mine ul { list-style: none; padding: 0; margin: 0 0 28px; }
.mine li {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent);
}
.mine li .meta { flex: 1; min-width: 0; }
.mine li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mine li span { color: var(--muted); font-size: 13px; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 32px; }
.how h3 { font-size: 16px; margin: 0 0 4px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }

.text { padding-top: 28px; padding-bottom: 12px; }
.text h1 { font-size: clamp(32px, 7vw, 46px); }
.text h2 { font-size: 20px; margin: 28px 0 6px; }
.text li { margin: 4px 0; }
.report { display: grid; gap: 14px; }
.report label { display: grid; gap: 6px; font-weight: 600; }
.report input, .report select {
  font: 16px var(--sans); padding: 10px; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: 10px; width: 100%;
}
.report textarea { min-height: 110px; font-family: var(--sans); font-size: 16px; }
.report .go { justify-self: start; margin: 0; }

footer { padding-top: 6px; padding-bottom: 36px; color: var(--muted); font-size: 14px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 30px; }
  .how { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .row a, .row code { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } h1 em { transform: none; } }

.prompt { border-style: dashed; }
.prompt-head { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
.prompt-sub { color: var(--muted); margin: 0 0 10px; }
.prompt pre { white-space: pre-wrap; word-break: break-word; font-size: 15px; margin: 0; }
.prose { padding-bottom: 32px; }
.prose h1 { font-size: clamp(32px, 7vw, 48px); margin-top: 32px; }
.prose h2 { margin-top: 28px; }
.prose pre { white-space: pre-wrap; word-break: break-word; }

.prompt-label { margin: 16px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prompt .go { margin-top: 10px; }
.faq { margin: 8px 0 36px; }
.faq h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 10px; }
.faq details { border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; margin: 10px 0; background: var(--paper); }
.faq summary { cursor: pointer; font-weight: 750; padding: 12px 0; list-style-position: inside; }
.faq details[open] summary { border-bottom: 2px dashed var(--line); margin-bottom: 8px; }
.faq ul { padding-left: 20px; }
.faq li { margin: 6px 0; }
