/* ──────────────────────────────────────────────────────────────────────────
   shared.css — common chrome for the Zentsu marketing site
   Used by: index.html, privacy.html, terms.html, the /tools/* pages, the /blog
   pages, and the bench/* legal pages. bench.html layers /bench.css on top and
   keeps its own richer component set.

   This base carries the warm "paper" design language of the Bench flagship
   (bench.css): Inter Tight + JetBrains Mono, a warm neutral palette, and a
   quiet, technical type scale. Tokens are named to match bench.css so the two
   worlds stay visually cohesive; on bench.html the /bench.css values win
   (loaded after this file), so changes here never alter the flagship.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Reset (shared by every page) ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Tokens (light) — warm paper, matched to bench.css ── */
:root {
  --bg: #f5f3ee;
  --bg-alt: #ecebe4;
  --surface: #ffffff;
  --border: #d8d4cb;
  --border-soft: #e6e2d8;
  --ink: #14110f;
  --ink-soft: #2a2622;
  --text: #14110f; /* alias of --ink so existing page rules keep working */
  --muted: #6b655e;
  --accent: #4a7c6f;
  --accent-light: #e6efec;
  --spot: #b84e1a;
  --spot-soft: #f1e3d8;
  --body-text: #2a2622;
  --code-bg: #1c1917;
  --code-ink: #e8e3d8;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    'Inter Tight',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Keyboard focus — a visible ring in the accent, suppressed on mouse click. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Nav (matches bench.html: sticky w/ backdrop blur) ── */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
nav ul {
  /* Full-width row: brand flush left, links flush right — identical on every
     page regardless of that page's content column width. Do not re-add a
     max-width/centered band here: it only lines up with pages whose content
     grid happens to match (it used to match bench.html's 1160px grid and
     looked mis-aligned on every 760px-column page). */
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 60px;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
nav a:hover,
nav a.active {
  color: var(--text);
}
nav li:first-child {
  margin-right: auto;
}
nav li:first-child a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Legal / support / tool article ── */
article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.75rem 3rem;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 1px 2px rgba(20, 17, 15, 0.04);
}
@media (max-width: 600px) {
  article {
    padding: 1.85rem 1.35rem;
    border-radius: 12px;
  }
}

.page-label {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.32rem 0.62rem;
  border-radius: 6px;
  margin-bottom: 1.15rem;
}

article h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
article .effective {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.25rem;
}
article h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
article h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
article p,
article ul,
article ol {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--body-text);
}
article p {
  margin-bottom: 0.9rem;
}
article ul,
article ol {
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
}
article li {
  margin-bottom: 0.4rem;
}
article a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 2px;
}
article a:hover {
  text-decoration: underline;
}
article strong {
  color: var(--ink);
  font-weight: 600;
}
article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Inline code + fenced blocks (blog posts, tool pages). The fenced block is a
   warm terminal panel that reads the same in light and dark, echoing the code
   panels on the Bench landing page. */
article code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--accent-light);
  color: var(--ink-soft);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  word-break: break-word;
}
article pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
}
article pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  word-break: normal;
}

/* ── Blog post list (/blog/) ── */
.post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.post-list li {
  padding: 1.35rem 0;
  border-top: 1px solid var(--border);
}
.post-list li:first-child {
  border-top: none;
  padding-top: 0.5rem;
}
.post-list a {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.012em;
  transition: color 0.15s;
}
.post-list a:hover {
  color: var(--accent);
}
.post-list .date {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.3rem 0 0.45rem;
}
.post-list .desc {
  font-size: 0.9375rem;
  color: var(--body-text);
  line-height: 1.6;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
footer a:hover {
  color: var(--ink);
}
.indie-line {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.indie-line .indie-name {
  color: var(--ink-soft);
  font-weight: 500;
}

/* Feature flags — see /flags.js. Hidden by default; revealed when corresponding flag is live.
   !important is intentional: feature gates must beat any later layout rule (e.g. .btn { display: inline-flex }). */
.feature-app-store {
  display: none !important;
}
.flag-appStoreLive .feature-app-store {
  display: revert !important;
}

/* ── Dark mode — matched to bench.css dark tokens ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110f;
    --bg-alt: #1b1815;
    --surface: #22201c;
    --border: #2e2a25;
    --border-soft: #262320;
    --ink: #f0ece3;
    --ink-soft: #d6d0c2;
    --text: #f0ece3;
    --muted: #8e877c;
    --accent: #6fa796;
    --accent-light: #1f2e2a;
    --spot: #d9602a;
    --spot-soft: #3a2a20;
    --body-text: #d6d0c2;
    --code-bg: #0a0908;
    --code-ink: #d6d0c2;
  }
  article {
    box-shadow: none;
  }
}
