/* ==========================================================================
   DVS-M17 public site
   One stylesheet for the landing page, user guide, support page, release
   notes, privacy policy and 404. Plain CSS, relative paths only — the same
   bytes have to work on https://am17-docs.mike-zingman.workers.dev and from
   file:// during a preview.

   The palette, card and type scale come from the privacy policy, which was the
   first page published. Keeping them here rather than in each page is what
   stops the site looking like four separate documents.
   ========================================================================== */

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-ink: #0058b0;
  --ok: #1a7f37;
  --warn: #9a6700;
  --line: #e5e5ea;
  --soft: #f7f7f9;
  --max: 820px;
  --max-wide: 1040px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  padding: 0 16px 56px;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
.container { max-width: var(--max); margin: 0 auto; }
.wide { max-width: var(--max-wide); margin: 0 auto; }
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}
h1 { font-size: 30px; line-height: 1.2; font-weight: 700; margin-bottom: 6px; }
.dates { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.intro { font-size: 16px; margin-bottom: 24px; }

/* ---- site chrome -------------------------------------------------------- */
.site-header {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 18px 4px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  justify-content: space-between;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header .brand img { width: 30px; height: 30px; border-radius: 8px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  padding: 4px 0;
}
.site-header nav a:hover { color: var(--accent); }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.site-footer {
  max-width: var(--max-wide);
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 6px 0; }

/* ---- landing ------------------------------------------------------------ */
.hero { text-align: center; padding: 34px 20px 30px; }
.hero .hero-icon {
  width: 104px; height: 104px;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0, 113, 227, 0.22);
  margin-bottom: 20px;
}
.hero .kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.hero h1 { font-size: 40px; letter-spacing: -0.02em; margin-bottom: 12px; }
.hero .lede {
  font-size: 18px;
  color: #3a3a3c;
  max-width: 640px;
  margin: 0 auto 24px;
}
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-ink); }
.btn.secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid #cfe2fb;
}
.btn.secondary:hover { background: #f2f7ff; }
.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 8px 0 26px;
}
.strip figure {
  background: var(--card);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.strip img {
  border-radius: 8px;
  display: block;
  width: 100%;
  height: auto;
  /* Reserve the 9:16 box before the lazy image arrives. Without the intrinsic
     ratio the grid reserves no height and the page jumps as six screenshots
     load — which is also how a full-page capture ends up with empty cards. */
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}
.strip figcaption {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  padding-top: 8px;
}

.section-head { margin: 30px 0 14px; }
.section-head h2 { font-size: 24px; letter-spacing: -0.01em; margin-bottom: 6px; }
.section-head p { color: var(--muted); font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.feature {
  background: var(--card);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: #3a3a3c; }
.feature .tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: #eaf2fe;
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: 2px;
}

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.step {
  background: var(--card);
  border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step h3 { font-size: 15.5px; margin-bottom: 4px; }
.step p { font-size: 14px; color: #3a3a3c; }

.privacy-strip {
  background: #f2f7ff;
  border: 1px solid #d6e6ff;
  border-radius: 16px;
  padding: 22px 24px;
  margin: 26px 0 8px;
}
.privacy-strip h2 { font-size: 18px; margin-bottom: 6px; }
.privacy-strip p { font-size: 14.5px; margin-bottom: 10px; }
.privacy-strip a { color: var(--accent); font-weight: 600; text-decoration: none; }
.privacy-strip a:hover { text-decoration: underline; }

.licence-note {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-left: 3px solid #c7c7cc;
  color: var(--muted);
  font-size: 14px;
}

/* ---- support ------------------------------------------------------------ */
.contact-card {
  background: #f2f7ff;
  border: 1px solid #d6e6ff;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 18px 0 26px;
}
.contact-card h2 { font-size: 18px; margin-bottom: 8px; }
.contact-card p { font-size: 15px; margin-bottom: 8px; }
.contact-card a { color: var(--accent); font-weight: 600; }
.contact-card ul { margin: 8px 0 0; padding-left: 22px; font-size: 14.5px; }

.faq { margin: 8px 0 20px; }
.faq details {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 10px;
  padding: 14px 18px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: " +"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: " –"; }
.faq .answer { font-size: 14.5px; color: #3a3a3c; padding-top: 8px; }
.faq .answer p { margin-bottom: 8px; }
.faq .answer ul { margin: 6px 0 8px; padding-left: 22px; }
.faq .answer a { color: var(--accent); }

/* ---- long-form pages (policy, guide, release notes) -------------------- */
.summary {
  background: #f2f7ff;
  border: 1px solid #d6e6ff;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 28px;
}
.summary h2 { font-size: 17px; margin-bottom: 10px; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { font-size: 14.5px; margin: 5px 0; }

nav.toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 28px;
  background: #fcfcfd;
}
nav.toc h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}
nav.toc ol { margin: 0; padding-left: 22px; }
nav.toc li { font-size: 14.5px; margin: 4px 0; }
nav.toc a { color: var(--accent); text-decoration: none; }
nav.toc a:hover { text-decoration: underline; }

section { margin-bottom: 30px; }
h2.section-title {
  display: flex;
  gap: 10px;
  font-size: 19px;
  line-height: 1.3;
  margin-bottom: 10px;
  scroll-margin-top: 20px;
}
.num { color: var(--accent); font-weight: 700; min-width: 24px; }
.section-content { font-size: 15.5px; }
.section-content p { margin: 0 0 12px; }
.section-content ul, .section-content ol { margin: 0 0 12px; padding-left: 24px; }
.section-content li { margin: 6px 0; }
h3 { font-size: 16px; margin: 18px 0 8px; }
strong { font-weight: 600; }
a { color: var(--accent); }

.callout {
  background: #fff8e6;
  border: 1px solid #f0d894;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
  font-size: 15px;
}
.callout strong { color: var(--warn); }
.callout.info { background: #f2f7ff; border-color: #d6e6ff; }
.callout.info strong { color: var(--accent-ink); }

.table-wrap { overflow-x: auto; margin: 12px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; }
tr:last-child td { border-bottom: none; }

.contact {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
}

/* ---- markdown-rendered guide ------------------------------------------- */
.guide { font-size: 15.5px; }
.guide h1 { font-size: 30px; margin-bottom: 8px; }
.guide h2 {
  font-size: 23px;
  letter-spacing: -0.01em;
  margin: 34px 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.guide h3 { font-size: 17px; margin: 22px 0 8px; scroll-margin-top: 20px; }
.guide h4 { font-size: 15.5px; margin: 18px 0 6px; }
.guide p { margin: 0 0 12px; }
.guide ul, .guide ol { margin: 0 0 12px; padding-left: 24px; }
.guide li { margin: 5px 0; }
.guide li > ul, .guide li > ol { margin: 5px 0 5px; }
.guide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.guide pre {
  background: #1d1d1f;
  color: #f5f5f7;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
}
.guide pre code { background: none; border: 0; color: inherit; padding: 0; font-size: inherit; }
.guide blockquote {
  border-left: 3px solid #c7c7cc;
  padding: 4px 0 4px 16px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
}
.guide blockquote p:last-child { margin-bottom: 0; }
.guide img {
  display: block;
  margin: 16px auto;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  max-width: min(320px, 100%);
}
.guide hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.guide table { margin: 12px 0 18px; }
.guide .table-wrap { margin: 12px 0 18px; }

/* ---- release notes ------------------------------------------------------ */
.release {
  border-left: 3px solid var(--line);
  padding: 2px 0 2px 18px;
  margin: 0 0 24px;
}
.release h2 { font-size: 17px; margin: 0 0 4px; }
.release .build { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.release p { font-size: 14.5px; margin-bottom: 8px; }
.release.latest { border-left-color: var(--accent); }

/* ---- 404 ---------------------------------------------------------------- */
.notfound { text-align: center; padding: 48px 24px 40px; }
.notfound .code { font-size: 64px; font-weight: 700; color: var(--accent); line-height: 1; }
.notfound h1 { margin: 10px 0 8px; }
.notfound p { color: var(--muted); margin-bottom: 20px; }
.notfound .links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---- responsive / print ------------------------------------------------- */
@media (max-width: 640px) {
  body { padding: 0 10px 40px; }
  .site-header { padding: 14px 2px 10px; }
  .card { padding: 24px 18px; border-radius: 12px; }
  h1 { font-size: 25px; }
  .hero { padding: 22px 6px 24px; }
  .hero h1 { font-size: 31px; }
  .hero .lede { font-size: 16.5px; }
  .hero .hero-icon { width: 84px; height: 84px; border-radius: 20px; }
  h2.section-title { font-size: 17.5px; }
  .section-content { font-size: 15px; }
  .guide h2 { font-size: 20px; }
}
@media print {
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; padding: 0; }
  nav.toc, .site-header, .site-footer { display: none; }
  a { color: inherit; text-decoration: none; }
}
