/*
 * boardsmithapp.com — one stylesheet for the landing page, the pricing page and the docs.
 *
 * It was inline in index.html while the site was one page. It is a file now because the docs
 * are eleven pages and a fourteenth copy of the same header is how a site starts looking like
 * three different sites. Page-specific rules stay in the page that needs them.
 */

:root {
  color-scheme: dark;
  --bg: #10131a;
  --bg-raised: #171c26;
  --line: #262d3b;
  --ink: #e6e9ef;
  --muted: #8b93a7;
  --gold: #d9aa3c;
  --gold-ink: #1a1405;
  --green: #6fbf87;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */

header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.25rem 0;
}
.wordmark { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.wordmark::before { content: "◆ "; color: var(--gold); }
nav { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
nav a { color: var(--muted); font-size: 0.97rem; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.here { color: var(--ink); }

.btn {
  display: inline-block; padding: 0.6rem 1.3rem; border-radius: 8px;
  background: var(--gold); color: var(--gold-ink); font-weight: 600;
  border: none; font-size: 1rem; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-quiet {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); font-weight: 500;
}

/* ---------- shared blocks ---------- */

section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.01em; }
h1 em { color: var(--gold); font-style: normal; }
h2 { font-size: 1.7rem; margin: 0 0 2rem; letter-spacing: -0.01em; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.cols h3 { margin: 0 0 0.5rem; font-size: 1.08rem; }
.cols p { margin: 0; color: var(--muted); font-size: 0.97rem; }
code {
  background: var(--bg-raised); border: 1px solid var(--line);
  padding: 0.05em 0.35em; border-radius: 5px; font-size: 0.9em;
}
kbd {
  background: var(--bg-raised); border: 1px solid var(--line); border-bottom-width: 2px;
  padding: 0.1em 0.45em; border-radius: 5px; font-size: 0.85em; white-space: nowrap;
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.1rem 1.2rem;
}
.card b { display: block; margin-bottom: 0.25rem; }
.card span { color: var(--muted); font-size: 0.92rem; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line); padding: 2.5rem 0 3rem;
  color: var(--muted); font-size: 0.88rem;
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  align-items: center; justify-content: center; margin-bottom: 1.2rem;
}
.foot-row a { color: var(--muted); }
.foot-row a:hover { color: var(--ink); text-decoration: none; }
.foot-note { text-align: center; }
/* The legal row sits under the main one, quieter: needed, rarely wanted. */
.foot-legal { font-size: 0.83rem; gap: 1.1rem; }

/* ---------- legal pages ---------- */

.legal { margin: 0 auto; padding: 2rem 0 4rem; }
.legal .updated { color: var(--muted); font-size: 0.88rem; margin: -1.8rem 0 2.5rem; }
.legal h2 { font-size: 1.25rem; }
.legal li { margin: 0.5rem 0; }

/* ---------- pricing ---------- */

.tiers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  align-items: start; margin-bottom: 1.5rem;
}
.tier {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.8rem;
}
.tier.paid { border-color: var(--gold); }
.tier h3 { margin: 0; font-size: 1.25rem; }
.tier .price { font-size: 2.4rem; font-weight: 700; margin: 0.6rem 0 0.1rem; letter-spacing: -0.02em; }
.tier .price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier .price-note { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.4rem; }
.tier ul { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.tier li { padding: 0.42rem 0 0.42rem 1.7rem; position: relative; font-size: 0.97rem; }
.tier li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700;
}
.tier li.no { color: var(--muted); }
.tier li.no::before { content: "—"; color: var(--line); }
.tier .btn { width: 100%; text-align: center; }

table {
  width: 100%; border-collapse: collapse; font-size: 0.96rem;
}
table th, table td {
  text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table th { color: var(--muted); font-weight: 600; font-size: 0.88rem; }
table td:first-child { width: 40%; }
.yes { color: var(--green); }
.non { color: var(--muted); }
.scroll-x { overflow-x: auto; }

.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2.4rem; }
.faq h3 { margin: 0 0 0.4rem; font-size: 1.03rem; }
.faq p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- docs ---------- */

.docs { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding: 2rem 0 4rem; }
.docs-nav { position: sticky; top: 2rem; align-self: start; font-size: 0.94rem; }
.docs-nav b {
  display: block; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; margin: 1.4rem 0 0.5rem;
}
.docs-nav b:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 0.25rem 0; color: var(--muted); }
.docs-nav a:hover { color: var(--ink); text-decoration: none; }
.docs-nav a.here { color: var(--gold); font-weight: 600; }

.prose { max-width: 68ch; min-width: 0; }
.prose h1 { font-size: 2.1rem; margin-bottom: 0.6rem; }
.prose .lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 2.5rem; }
.prose h2 { font-size: 1.35rem; margin: 2.6rem 0 0.9rem; }
.prose h3 { font-size: 1.06rem; margin: 1.8rem 0 0.5rem; }
.prose p, .prose li { color: #cdd3de; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }
.prose table { margin: 1.2rem 0; }
.prose td:first-child { width: auto; white-space: nowrap; }
pre {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.5;
}
pre code { background: none; border: none; padding: 0; font-size: 1em; }

.note, .pro {
  border-left: 3px solid var(--line); background: var(--bg-raised);
  padding: 0.9rem 1.1rem; border-radius: 0 8px 8px 0; margin: 1.4rem 0;
  font-size: 0.95rem; color: #cdd3de;
}
.note p, .pro p { margin: 0; }
.pro { border-left-color: var(--gold); }
.pro-tag {
  display: inline-block; background: var(--gold); color: var(--gold-ink);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.1em 0.45em; border-radius: 4px; vertical-align: 0.12em; margin-right: 0.4rem;
}

.next-prev {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  /*
   * The sidebar becomes one scrolling row rather than a stacked list. Stacked, twelve links
   * plus their group headings are a screen and a half of navigation above every article — the
   * reader scrolls past the whole table of contents to reach the page they already chose.
   */
  .docs { grid-template-columns: 1fr; gap: 1.5rem; }
  .docs-nav {
    position: static; display: flex; gap: 1.2rem; overflow-x: auto;
    border-bottom: 1px solid var(--line); padding-bottom: 0.8rem;
    scrollbar-width: none;
  }
  .docs-nav::-webkit-scrollbar { display: none; }
  .docs-nav b { display: none; }
  .docs-nav a { white-space: nowrap; padding: 0; }
}
@media (max-width: 820px) {
  h1 { font-size: 2.1rem; }
  .cols, .grid, .tiers, .faq { grid-template-columns: 1fr; }
  nav { gap: 1.1rem; font-size: 0.92rem; }
  header { flex-wrap: wrap; row-gap: 0.8rem; }
}
