/*
  The public site's one stylesheet (app/site).

  Served from /assets under a Content-Security-Policy that admits styles from
  here only: templates carry no style="" and no <style>. No web fonts — the
  system stack. Colours are tokens, redefined for the dark scheme.
*/

:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1b1a18;
  --ink-2: #55534e;
  --line: #e6e3dc;
  --accent: #3d6b4f;
  --badge-bg: #eaf1ec;
  --radius: 14px;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1c1c1a;
    --ink: #eeece6;
    --ink-2: #b2afa7;
    --line: #2e2d2a;
    --accent: #8cc3a0;
    --badge-bg: #223027;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: 0.15em; }

.top, main, .foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand { font-weight: 650; color: var(--ink); text-decoration: none; }

.lang { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); }
.lang [aria-current] { font-weight: 600; color: var(--ink); }

main { padding-bottom: 48px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0.6em 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 1.6em 0 0.4em; }
h3 { font-size: 1.1rem; margin: 1.3em 0 0.3em; }
h4 { font-size: 1rem; margin: 1.2em 0 0.3em; }

.hero { padding: 24px 0 8px; }
.tagline { font-size: 1.3rem; line-height: 1.4; margin: 0 0 0.6em; }
.lede { color: var(--ink-2); }

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 15px;
}

.links ul { padding-left: 1.2em; }

.doc { overflow-wrap: anywhere; }
.doc blockquote {
  margin: 1em 0;
  padding: 2px 16px;
  border-left: 3px solid var(--line);
  color: var(--ink-2);
}
.doc table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  margin: 1em 0;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  min-width: 8rem;
}
.doc code { font-size: 0.92em; }
.meta { color: var(--ink-2); font-size: 15px; margin-top: 2em; }

.contacts dt { font-weight: 600; margin-top: 0.8em; }
.contacts dd { margin: 0; }

.product { display: grid; gap: 24px; padding-top: 16px; }
.product figure { margin: 0; }
.product img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius);
  background: var(--surface);
}
.product figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.product h1 { margin-top: 0.1em; }
.product-brand { margin: 0; color: var(--ink-2); font-weight: 600; }
.product-category { margin-top: 0; color: var(--ink-2); }

@media (min-width: 640px) {
  .product { grid-template-columns: 280px 1fr; align-items: start; }
}

.foot {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  padding-bottom: 32px;
  font-size: 15px;
  color: var(--ink-2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.nowrap { white-space: nowrap; }
