/* theme.css — one palette and one set of primitives for every Sidewise page.

   Before this file the landing page carried its own palette while reader.html, app.html and
   privacy.html took whatever https://heyitsmejosh.com/tokens.css happened to define, so the
   marketing page and the app it advertises did not look like the same product — and the app
   pages rendered near-unstyled whenever that cross-origin import failed to load.

   tokens.css is still imported (it supplies --font-body, --font-mono, --radius-*, --navy),
   but every value the site actually depends on is redeclared below with a literal, so a
   failed import degrades the type stack and nothing else. Page-specific rules live in the
   page; anything two pages share belongs here. */

@import url("https://heyitsmejosh.com/tokens.css");

:root {
  --link: var(--clay-deep);
  --accent-soft: color-mix(in srgb, var(--clay) 9%, var(--bg));
  --font-body: -apple-system, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Bias colours. Shared by the reader's coverage bars and the app page's example card,
     so the two never drift into disagreeing about which end of the bar is "left". */
  --left: var(--clay);
  --center: #8a8d97;
  --right: #c0392b;
}
:root[data-theme="dark"] {
  --link: var(--clay);
  --left: #d4957a;
  --center: #7c7f89;
  --right: #d5604f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --link: var(--clay);
    --left: #d4957a;
    --center: #7c7f89;
    --right: #d5604f;
  }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
a { color: var(--link, var(--accent)); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Brand lockup: the landing hero and the reader header show the same mark and wordmark,
   at different sizes, so arriving in the app reads as the same product. */
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand img { width: 30px; height: 30px; }
.brand-name {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.1; color: var(--text);
}
a.brand:hover { text-decoration: none; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.98rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--bg); }
.btn-outline:hover { border-color: var(--link, var(--accent)); color: var(--link, var(--accent)); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* The surface every card-shaped thing on the site sits on: landing feature tiles, the
   reader's story cards, the app page's example story. */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

/* Coverage bar: left / center / right proportions of a story cluster. */
.bar {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden;
  margin: 0.5rem 0; background: var(--border);
}
.bar div { height: 100%; }
.bar .l { background: var(--left); }
.bar .c { background: var(--center); }
.bar .r { background: var(--right); }

.tag-blindspot {
  display: inline-block; font-size: 0.7rem; color: var(--right);
  border: 1px solid var(--right); border-radius: var(--radius-pill);
  padding: 0.1rem 0.5rem; margin-left: 0.5rem; vertical-align: middle;
}

.muted { color: var(--text2); }
