:root {
  color-scheme: light dark;
  --bg: #f3f4ef; --card: #fff; --fg: #1c211d; --muted: #646f66; --line: #dde1d8;
  --accent: #3d7a4b; --accent-fg: #fff; --code-bg: #f0f2ec;
  --rot-a: #5a9a3c; --rot-b: #a07a2a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111411; --card: #1a1f1b; --fg: #e6ebe7; --muted: #94a096; --line: #2b332d;
    --accent: #7dbd8b; --accent-fg: #0e1a11; --code-bg: #131813;
    --rot-a: #8ccf5f; --rot-b: #c9a14a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 34rem; margin: 0 auto; padding: 2.5rem 1rem 2rem; }
.brand { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.brand a { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; border-radius: .4rem; }
.brand a:focus-visible { outline: 3px solid var(--rot-b); outline-offset: 4px; }
.chain { color: var(--muted); }
.spore { color: var(--rot-a); }
.word { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.rot {
  background: linear-gradient(90deg, var(--rot-a), var(--rot-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-decoration: underline wavy var(--rot-b) 1px; text-underline-offset: .22em;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 1rem;
  padding: 2rem 1.5rem; text-align: center; box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .05);
}
.icon {
  display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 1.1rem;
  color: hsl(var(--hue) 55% 40%); background: hsl(var(--hue) 60% 94%);
}
@media (prefers-color-scheme: dark) {
  .icon { color: hsl(var(--hue) 65% 70%); background: hsl(var(--hue) 25% 20%); }
}
.name { margin: 1rem 0 .25rem; font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.meta { margin: 0 0 1.5rem; color: var(--muted); }
.badge {
  display: inline-block; margin-left: .35rem; padding: 0 .45rem; border: 1px solid var(--line);
  border-radius: .4rem; font: .8rem ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.button {
  display: block; padding: .8rem 1.2rem; border-radius: .7rem; background: var(--accent); color: var(--accent-fg);
  font-weight: 600; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 3px solid var(--rot-b); outline-offset: 3px; }
@media (min-width: 30rem) { .button { display: inline-block; min-width: 14rem; } }
.actions { display: flex; gap: .6rem; justify-content: center; }
.actions .button { display: block; text-align: center; }
.actions .button:first-child { flex: 1 1 auto; }
@media (min-width: 30rem) { .actions .button:first-child { flex: 0 1 auto; min-width: 14rem; } }
.button.alt { min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.button.alt[hidden] { display: none; }
.qr { width: min(20rem, 90vw); padding: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--card); color: var(--fg); }
.qr::backdrop { background: rgb(0 0 0 / .55); }
.qr-body { padding: 1.25rem; text-align: center; }
.qr svg { display: block; width: 100%; height: auto; border-radius: .5rem; }
.qr form { margin-top: 1rem; }
.qr .button { width: 100%; }
.terminal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: left; }
.terminal h2 { margin: 0 0 .5rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.label { margin: .8rem 0 .2rem; font-size: .85rem; color: var(--muted); }
.muted { opacity: .8; }
/* A row: the text scrolls on its own on the left, the copy button has its own cell on the right. */
.box { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: .5rem; background: var(--code-bg); overflow: hidden; }
code {
  flex: 1 1 auto; min-width: 0; display: block; padding: .5rem .7rem; background: transparent;
  font: .85rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-x: auto; white-space: nowrap; user-select: all;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
code::-webkit-scrollbar { height: 6px; }
code::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.copy {
  flex: none; display: grid; place-items: start center; width: 2.6rem; padding: .62rem 0 0; border: 0;
  border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.copy[hidden] { display: none; }
.copy:hover { color: var(--fg); background: var(--card); }
.copy:focus-visible { outline: 2px solid var(--rot-b); outline-offset: -3px; }
.copy .i-done, .copy.done .i-copy { display: none; }
.copy.done .i-done { display: block; }
.copy.done { color: var(--accent); }
.copy.failed { color: #c0504d; }
.gone .meta { margin-bottom: 0; }
.about .lead { margin: 0 0 1.25rem; color: var(--muted); }
.steps { margin: 0 0 .5rem; padding: 0; list-style: none; counter-reset: step; text-align: left; }
.steps li { position: relative; margin: .55rem 0; padding-left: 2.2rem; }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: .1rem; width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--code-bg); border: 1px solid var(--line);
  font-size: .8rem; font-weight: 700; color: var(--accent);
}
.small { margin: 1rem 0 0; font-size: .85rem; color: var(--muted); }
.about .button { margin-top: 1.25rem; }
footer { margin-top: 1.5rem; text-align: center; font-size: .9rem; font-style: italic; color: var(--muted); }
