/* convene's pages for the people installing it: the front page and one brief per distribution.
   One reading column. A brief's "why" is a chat, drawn as convene draws one: the reader's words
   right in terracotta, the answers left in sage. Setup is a numbered path. The colours are the
   app's own (macos/src/theme.rs). */
:root {
  color-scheme: light;
  --bg: #F7F2EB;          /* cream, the window */
  --sidebar: #F1EAE0;
  --raised: #E8DFD2;
  --hairline: #E2D9CD;
  --text: #2B2521;
  --muted: #6F665C;
  --accent: #D4704C;      /* terracotta: your words, the one button that matters */
  --accent-ink: #B4532F;  /* terracotta deep enough for small text on cream */
  --on-accent: #FFFFFF;
  --theirs: #DDE6CF;      /* sage: their words */
  --on-theirs: #2B2521;
  --olive: #4F6B3E;
  --display: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-bubble: 18px;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1E1916; --sidebar: #27211D; --raised: #332B26; --hairline: #40372F;
    --text: #F1EAE0; --muted: #AB9F92; --accent: #D4704C; --accent-ink: #E8956F;
    --on-accent: #FFFFFF; --theirs: #36432E; --on-theirs: #EEF2E6; --olive: #A9C296;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1E1916; --sidebar: #27211D; --raised: #332B26; --hairline: #40372F;
  --text: #F1EAE0; --muted: #AB9F92; --accent: #D4704C; --accent-ink: #E8956F;
  --on-accent: #FFFFFF; --theirs: #36432E; --on-theirs: #EEF2E6; --olive: #A9C296;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--body);
  padding-block: 40px 72px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
img, svg { max-width: 100%; }
.page { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { width: 64px; height: 64px; flex: none; }
.brand b { font: 800 26px/1 var(--display); letter-spacing: -0.01em; }
.brand a { color: inherit; text-decoration: none; }
.tag { font: 700 12px/1 var(--display); letter-spacing: 0.09em; text-transform: uppercase;
       color: var(--olive); background: var(--theirs); padding: 7px 11px; border-radius: 99px; margin-left: auto; }
h1 { font-weight: 800; font-size: clamp(2rem, 6.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--accent-ink); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 36rem; }

section { display: flex; flex-direction: column; gap: 22px; }
h2 { font-weight: 800; font-size: 1.55rem; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin-top: -12px; }

/* The why, as a chat */
.chat { display: flex; flex-direction: column; gap: 10px; background: var(--sidebar);
        border: 1px solid var(--hairline); border-radius: 22px; padding: 22px 18px; }
.chat p { max-width: min(30rem, 88%); padding: 11px 16px; border-radius: var(--r-bubble); }
.chat .me { align-self: flex-end; background: var(--accent); color: var(--on-accent);
            font-weight: 700; border-bottom-right-radius: 6px; margin-top: 12px; }
.chat .me:first-child { margin-top: 0; }
.chat .them { align-self: flex-start; background: var(--theirs); color: var(--on-theirs);
              border-bottom-left-radius: 6px; }
.reach { align-self: flex-end; font-size: 0.78rem; color: var(--muted); margin-top: -4px; padding-right: 6px; }

/* Setup path */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 30px; counter-reset: s; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; }
.steps > li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%;
                      background: var(--accent); color: var(--on-accent);
                      font: 800 18px/40px var(--display); text-align: center; }
.step { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step h3 { font-weight: 800; font-size: 1.15rem; line-height: 40px; }
.step h3 + p { margin-top: -8px; }
.cmd { display: flex; align-items: stretch; background: var(--raised); border-radius: var(--r); overflow: hidden; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 12px 14px;
            font: 400 0.86rem/1.5 var(--mono); color: var(--text); }
.cmd button { flex: none; border: 0; border-left: 1px solid var(--hairline); background: transparent; color: var(--accent-ink);
              font: 700 0.85rem/1 var(--display); padding: 0 16px; cursor: pointer; min-width: 74px; }
.cmd button:hover { background: var(--hairline); }
.cmd.block code { white-space: pre; }
.clicks { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; padding: 0; margin: 0; list-style: none; }
.clicks li { background: var(--raised); border-radius: 99px; padding: 5px 13px; font-weight: 600; font-size: 0.93rem; }
.clicks li + li::before { content: "›"; color: var(--muted); margin: 0 9px 0 -13px; position: relative; left: -6px; font-weight: 700; }
kbd, .ui { font: 700 0.92em var(--display); background: var(--raised); border-radius: 7px; padding: 2px 8px; white-space: nowrap; }
code.file { font: 400 0.88em var(--mono); overflow-wrap: anywhere; }
.aside { font-size: 0.93rem; color: var(--muted); }
.get { align-self: flex-start; display: inline-block; background: var(--accent); color: var(--on-accent);
       font: 800 1rem/1 var(--display); text-decoration: none; padding: 14px 20px; border-radius: 99px; }
.get:hover { filter: brightness(1.06); }

/* Things to try */
.try { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 32px; }
.try li { padding: 14px 0; border-top: 1px solid var(--hairline); min-width: 0; }
.try b { font-family: var(--display); font-weight: 800; display: block; }
.try span { color: var(--muted); font-size: 0.96rem; }

.words { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; align-items: baseline; margin: 0; }
.words dt { font: 700 0.85rem var(--display); color: var(--muted); }
.words dd { margin: 0; }

/* Where Rune is: his card, as a link to copy */
.address { background: var(--sidebar); border: 1px solid var(--hairline); border-radius: 22px; padding: 26px 24px; gap: 16px; }
.address .who { display: flex; align-items: center; gap: 14px; }
.address .face { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
                 font: 800 22px/48px var(--display); text-align: center; }
.address .who p { color: var(--muted); font-size: 0.93rem; }
.address .who b { display: block; color: var(--text); font: 800 1.15rem/1.3 var(--display); }
.address ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.address .cmd { background: var(--raised); }

/* Closing */
.tell { background: var(--theirs); color: var(--on-theirs); border-radius: 22px; padding: 26px 24px; gap: 14px; }
.tell ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.sign { font: 800 1.1rem var(--display); }

/* The front page: one row per distribution */
.dists { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dists > li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 20px; padding: 20px 0; border-top: 1px solid var(--hairline); }
.dists > li:last-child { border-bottom: 1px solid var(--hairline); }
.dists h3 { font-weight: 800; font-size: 1.25rem; line-height: 1.3; }
.dists .what { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dists .needs { color: var(--muted); font-size: 0.93rem; }
.links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-weight: 600; }
.links .brief { background: var(--accent); color: var(--on-accent); font: 800 0.93rem/1 var(--display);
                text-decoration: none; padding: 10px 15px; border-radius: 99px; }
.links .brief:hover { filter: brightness(1.06); }
.foot { color: var(--muted); font-size: 0.93rem; }

@media (max-width: 30rem) {
  .tag { display: none; }
  .steps > li { grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; }
  .steps > li::before { width: 32px; height: 32px; line-height: 32px; font-size: 15px; }
  .step h3 { line-height: 32px; }
  .dists > li { grid-template-columns: minmax(0, 1fr); }
}
