/* reflow2's site, in flo2.io's layout and its dark palette (flo2's site/style.css,
   the prefers-color-scheme: dark values). Dark only: the owner asked for the black
   background, white text and green buttons flo2.io shows. */
:root {
  color-scheme: dark;
  --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%; scroll-behavior: smooth; }
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: 42rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
a { color: var(--accent); }

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

section { border-top: 1px solid var(--line); padding: 1.75rem 0 0.5rem; margin-top: 2rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.5rem; }
h2 + .quiet { margin-top: 0; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; display: flex; align-items: center; gap: 0.6rem; }
.n {
  display: inline-grid; place-items: center; flex: none;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 0.9rem;
}

.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; margin: 0 0 1rem; }
.button:focus-visible, .copy:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.quiet { color: var(--muted); font-size: 0.95rem; }

code { font: 0.92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
p code, li code { background: var(--card); border: 1px solid var(--line); border-radius: 0.3rem; padding: 0.05rem 0.3rem; }

/* A command with its Copy button. The button stays hidden unless the browser can
   write to the clipboard (copy.js). */
.cmd {
  display: flex; align-items: flex-start; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  margin: 0.6rem 0 1rem; padding-right: 0.45rem;
}
/* The command scrolls inside its own box, and the button sits beside it rather
   than over the end of a long line. */
.cmd pre { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0.8rem 0.9rem; overflow-x: auto; }
.cmd pre code { font-size: 0.9rem; overflow-wrap: normal; }
.cmd .copy { flex: none; margin-top: 0.45rem; }
.copy {
  font: inherit; font-size: 0.85rem;
  background: var(--bg); color: var(--accent);
  border: 1px solid var(--accent); border-radius: 0.4rem;
  padding: 0.3rem 0.8rem; min-height: 36px; cursor: pointer;
}

details {
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  margin: 1rem 0; padding: 0 1rem;
}
summary { cursor: pointer; font-weight: 600; padding: 0.9rem 0; min-height: 44px; }
details[open] { padding-bottom: 0.5rem; }
details .cmd { background: var(--bg); }

ol, ul { padding-left: 1.3rem; }
li { margin: 0.35rem 0; }
.note { background: var(--note); border-radius: 0.4rem; padding: 0.6rem 0.8rem; margin: 0.75rem 0; }
.note p { margin: 0.25rem 0; }

footer { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.25rem; }
footer p { margin: 0.3rem 0; }

.mark a { color: inherit; text-decoration: none; }

/* ---- The explainer (index.html): wide drawings, a narrow text column. ----
   The drawings are laid out on a 1280-wide canvas, so they get the page's full
   width; text stays in the 42rem column the rest of the site reads in. */
.explainer main { max-width: 74rem; }
.explainer .text { max-width: 42rem; margin-left: auto; margin-right: auto; }
.explainer .hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: center; }
.explainer .hero .text { flex: 1 1 22rem; margin: 0; }
.explainer .hero-art { flex: 0 1 24rem; width: 100%; max-width: 24rem; height: auto; }
.explainer .example-note { color: var(--muted); font-size: 0.95rem; margin-top: 2rem; }
.explainer .example-note b { color: var(--ink); }
.explainer section { border-top: 1px solid var(--line); margin-top: 2.5rem; }
.explainer h2 { display: flex; align-items: center; gap: 0.6rem; }
.explainer .kicker { color: var(--muted); margin: 0 0 0.5rem; }
.explainer .caption { text-align: center; font-weight: 600; margin-top: 0.25rem; }
figure.drawing { margin: 0.5rem 0; overflow-x: auto; }
figure.drawing svg { display: block; width: 100%; height: auto; }
figure.drawing.narrow-art svg { max-width: 40rem; margin: 0 auto; }
/* Below this width the drawings' text would be too small to read, so a drawing
   keeps a readable size and scrolls sideways inside its own frame. */
@media (max-width: 900px) {
  figure.drawing svg { min-width: 860px; }
  figure.drawing.narrow-art svg { min-width: 560px; }
  figure.drawing::after { content: "Scroll sideways to see the whole drawing."; display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; position: sticky; left: 0; }
}

/* ---- What it is and is not; the three partners; the five steps (index.html,
   walkthrough.html, why.html). The three partners keep one colour each, the same
   as draw.js's WHO: you green, the AI blue-violet, reflow2 orange. ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.4rem 1rem 0.6rem; }
.card h3 { margin-top: 0.75rem; }
.card ul { margin: 0.25rem 0 0.5rem; }
.pair, .partners { display: grid; gap: 0.9rem; margin: 1rem 0; }
.pair { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.partners { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }
.partners p { margin: 0.4rem 0; }
.who {
  display: inline-block; font-size: 0.82rem; font-weight: 700; line-height: 1.2;
  padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap;
  vertical-align: 0.08em;
}
.who.you { background: #5cc3a6; color: #0f1a16; }
.who.ai { background: #7f8cf0; color: #10122a; }
.who.r2 { background: #eb6834; color: #1f0d05; }
h3 .who { font-size: 0.95rem; }
.steps { list-style: none; padding: 0; }
.steps li { border-left: 3px solid var(--line); padding: 0.1rem 0 0.4rem 1rem; margin: 1.1rem 0; }
.steps h3 { margin: 0.2rem 0 0.4rem; }
.steps p { margin: 0.35rem 0; }
.legend { color: var(--muted); }
.wholine { color: var(--muted); font-size: 0.95rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 600; }
dl.pairs dt { font-weight: 700; margin-top: 1rem; }
dl.pairs dd { margin: 0.25rem 0 0; color: var(--muted); }
