/* The frame every page shares: base elements, header and menu, footer, and
   the layout of the content pages (roadmap, docs, download). Colours and
   type come from tokens.css. */

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vm-ink); text-underline-offset: 0.15em; }
code { font-family: var(--mono); font-size: 0.9em; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 3px;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

/* Brand on the left; the menu and the download button on the right. On a
   phone the button moves up beside the brand and the menu gets its own row. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.site-brand {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-brand img { width: 2rem; height: 2rem; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.35rem; }
.site-nav a, .nav-cta {
  padding: 0.5rem 0.7rem;
  border-radius: 3px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-sunk); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--coin); }
.nav-cta {
  margin-left: -1rem; /* sits closer to the menu than the header gap */
  background: var(--ink);
  color: var(--bg);
}
.nav-cta:hover { opacity: 0.9; }
.nav-cta[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--coin); }
.nav-cta svg { width: 1em; height: 1em; margin-right: 0.35rem; }
@media (max-width: 40rem) {
  .site-header { padding: 0.75rem 1rem; }
  .site-nav { order: 1; flex-wrap: nowrap; gap: 0.35rem; width: 100%; margin-left: -0.5rem; }
  .site-nav a { padding: 0.45rem 0.5rem; }
  .nav-cta { margin-left: 0; }
  .nav-more { display: none; }
}

.site-footer {
  max-width: 72rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; max-width: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--ink-soft); }
/* Styled here in full, so it looks the same on pages without app.css. */
.site-footer .theme-toggle {
  font: 500 0.9rem var(--sans);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--ink-soft);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.site-footer .theme-toggle:hover { color: var(--ink); border-color: var(--ink); }

/* Content pages */

.page {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem;
}
.page h1 { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0.5rem 0 0.75rem; }
.page h2 { font-size: 1.5rem; margin: 2.75rem 0 0.75rem; letter-spacing: -0.01em; }
.page h3 { font-size: 1.15rem; margin: 1.75rem 0 0.4rem; }
.page p, .page li { max-width: 65ch; line-height: 1.6; }
.page p { margin: 0 0 1rem; }
.page h1, .page h2 { text-wrap: balance; }
.page .lede { font-size: 1.2rem; color: var(--ink-soft); }
.page dl.facts-list { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 1rem 0; }
.page dl.facts-list dt { color: var(--ink-soft); }
.page dl.facts-list dd { margin: 0; }
@media (max-width: 34rem) { .page dl.facts-list { grid-template-columns: 1fr; gap: 0.1rem; } .page dl.facts-list dd { margin-bottom: 0.6rem; } }
.page .toc { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding: 0.9rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 1.5rem 0; }
.page code { font-family: var(--mono); font-size: 0.9em; }
.page pre { background: var(--surface-sunk); padding: 0.9rem 1rem; border-radius: 4px; overflow-x: auto; font-size: 0.9rem; }
.callout { border-left: 4px solid var(--coin); background: var(--coin-wash); padding: 0.9rem 1.1rem; border-radius: 3px; margin: 1.25rem 0; }
.callout p { margin: 0; }
.button-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600;
  padding: 0.8rem 1.3rem; border-radius: 3px; font-size: 1.05rem;
}
.button-link:hover { opacity: 0.92; }
.download-hero { display: flex; gap: 1.5rem; align-items: center; margin: 1.5rem 0; }
.download-hero h1 { margin-top: 0; }
@media (max-width: 34rem) { .download-hero { flex-direction: column; align-items: flex-start; } }
.download-hero img { width: 7rem; height: 7rem; flex: none; }
.sha { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; }

.fees-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 0.5rem 0 1rem; }
.fees-table th, .fees-table td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
.fees-table th { font-weight: 500; color: var(--ink-soft); font-size: 0.85rem; }
.page .table-wrap { overflow-x: auto; }
