/* Snapback brand: the one place the look of the service is decided.
 *
 * The marketing site (site/) and the founder portal (dashboard/) both start from this file, so that
 * a visitor who clicks from one to the other feels they have not left. It holds the design tokens
 * (colours, type, radius, page width) and the pieces both sides draw: the page, links, the top bar,
 * buttons, notes, the card. Anything only one of them needs stays in that app's own stylesheet,
 * which may use the tokens below and must not define its own (site/tests/site.test.mjs checks).
 *
 * To restyle the service, change it here. To add a colour, add a token here first.
 *
 * Rules for this file, because the marketing site's Content-Security-Policy allows nothing else:
 * no @import, no url(), no @font-face. System fonts only, no image. Plain CSS, no build step.
 *
 * How each side gets it:
 *   site/       scripts/build.mjs copies this file to dist/brand.css and the pages link it before styles.css.
 *   dashboard/  src/styles.css starts with @import "../../brand/brand.css", and Vite bundles it.
 */

:root {
  /* Type */
  --font-sans: system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Colour */
  --color-text: #1a1a1a;
  --color-muted: #666;
  --color-bg: #fafafa;
  --color-surface: #fff;
  --color-code-bg: #f0f0f0;
  --color-border: #ddd;
  --color-border-soft: #eee;
  --color-border-strong: #888;
  --color-link: #0a58ca;
  --color-accent: #1a1a1a;
  --color-accent-hover: #333;
  --color-on-accent: #fff;
  --color-hover: #f3f3f3;
  --color-danger: #b00;
  --color-ok: #080;

  /* Shape and space */
  --radius: 6px;
  --radius-small: 4px;
  --page-width: 900px;

  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

body { margin: 0; }

a { color: var(--color-link); }

code, pre { font-family: var(--font-mono); font-size: 0.9rem; }
code { background: var(--color-code-bg); padding: 0.05rem 0.3rem; border-radius: 3px; }
pre { background: var(--color-code-bg); padding: 0.7rem 0.9rem; overflow-x: auto; border-radius: var(--radius); margin: 0.4rem 0 1rem; }
pre code { background: none; padding: 0; }

/* The top bar. Its contents line up with the page column, whatever the screen width. */
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem max(1rem, calc((100% - var(--page-width)) / 2));
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: inherit; }

/* A button and a link that looks like one. */
button, .button {
  display: inline-block;
  font: inherit;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
}
button:hover:not(:disabled), .button:hover { background: var(--color-hover); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.button.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.button.primary:hover { background: var(--color-accent-hover); }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Small print. */
.note { color: var(--color-muted); font-size: 0.85rem; margin: 0.2rem 0; }

/* A card, as a visitor on another site sees it: a line of words and a button. */
.card-preview, .card-mock { padding: 0.6rem 0.9rem; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius); }
.cta { padding: 0.15rem 0.6rem; background: var(--color-accent); color: var(--color-on-accent); border-radius: var(--radius-small); font-size: 0.9rem; }
