:root {
  --bg: #fbfaf7;
  --ink: #1d1d1b;
  --muted: #5f5d57;
  --line: #e4e1d9;
  --card: #ffffff;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --note: #fff6dc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --ink: #ecebe6;
    --muted: #a3a19a;
    --line: #2d2f2b;
    --card: #1c1e1b;
    --accent: #5cc3a6;
    --accent-ink: #0f1a16;
    --note: #2e2a1c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 40rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }

.mark { font-weight: 700; letter-spacing: 0.02em; color: var(--accent); margin: 0 0 1.5rem; }
.mark a { color: inherit; text-decoration: none; }
h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.15; margin: 0 0 1rem; }
.lede { color: var(--muted); margin: 0 0 2.5rem; }

section { border-top: 1px solid var(--line); padding: 1.75rem 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.6rem; }
.n {
  display: inline-grid; place-items: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 0.95rem;
}

.button {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.85rem 1.4rem; border-radius: 0.6rem;
  font-weight: 600; text-decoration: none;
  min-height: 44px;
}
.button.secondary {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  padding: calc(0.85rem - 1px) calc(1.4rem - 1px);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.button:focus-visible, .copy:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.quiet { color: var(--muted); font-size: 0.95rem; }

.address {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  padding: 0.6rem 0.8rem;
}
li .address { margin: 0.5rem 0; }
.address code { font-size: 1.05rem; overflow-wrap: anywhere; flex: 1 1 12rem; }
.copy {
  font: inherit; font-size: 0.9rem;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 0.4rem;
  padding: 0.4rem 0.9rem; min-height: 44px; cursor: pointer;
}

details {
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  margin: 0.75rem 0; padding: 0 1rem;
}
summary { cursor: pointer; font-weight: 600; padding: 0.9rem 0; min-height: 44px; }
.where { color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
details ol { padding-left: 1.3rem; margin: 0 0 0.75rem; }
details li { margin: 0.35rem 0; }
details > p { margin: 0 0 1rem; }
.note { background: var(--note); border-radius: 0.4rem; padding: 0.6rem 0.8rem; }
details > div.note { margin: 0 0 1rem; }
div.note p { margin: 0.25rem 0; }

/* "What works where": one row per app, one column per device. On a phone it
   stacks into one block per app, each answer labelled with its device. */
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.25rem; }
h3 + .quiet { margin-top: 0; }
.works { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.95rem; }
.works th, .works td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-top: 1px solid var(--line); }
.works tr > :first-child { padding-left: 0; }
.works thead th { font-size: 0.85rem; font-weight: 600; color: var(--muted); border-top: 0; }
.works tbody th { font-weight: 600; }
.works .yes { color: var(--accent); }
.works .no { font-weight: 700; }
.works .untried { color: var(--muted); }
@media (max-width: 520px) {
  .works thead { display: none; }
  .works tr, .works th, .works td { display: block; }
  .works tr { border-top: 1px solid var(--line); padding: 0.6rem 0; }
  .works th, .works td { border-top: 0; padding: 0.1rem 0; }
  .works tbody th { padding-bottom: 0.2rem; }
  .works td::before { content: attr(data-device) ": "; color: var(--muted); }
}

.prompts { list-style: none; padding: 0; margin: 0 0 1rem; }
.prompts li {
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  padding: 0.7rem 0.9rem; margin: 0.5rem 0;
}
q { quotes: "\201C" "\201D"; }

.cheats { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.cheats th { text-align: left; font-size: 0.9rem; font-weight: 600; color: var(--muted); padding: 0.4rem 0.6rem; }
.cheats td { vertical-align: top; padding: 0.75rem 0.6rem; border-top: 1px solid var(--line); }
.cheats td:first-child { width: 38%; }
.shortcut { display: block; margin-top: 0.2rem; font: 0.85rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
@media (max-width: 520px) {
  .cheats thead { display: none; }
  .cheats tr, .cheats td { display: block; width: auto; }
  .cheats td:first-child { width: auto; padding-bottom: 0.25rem; }
  .cheats td + td { border-top: 0; padding-top: 0; }
}

/* dragon.rocks: the account page. */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.bar .mark { margin: 0; text-decoration: none; }
.bar #who { margin-left: auto; }
.campaigns { list-style: none; padding: 0; margin: 0 0 1rem; }
.campaigns li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  padding: 0.7rem 0.9rem; margin: 0.5rem 0;
}
.campaigns .name { font-weight: 600; }
.campaigns .role { color: var(--muted); font-size: 0.95rem; }
button.button { font: inherit; font-weight: 600; border: 0; cursor: pointer; }
