/* NativeCAM website. Plain CSS, no build step; light and dark follow the system. */
:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --surface-2: #eeebe5;
  --text: #1b1d21;
  --muted: #565b63;
  --border: #dcd7ce;
  --accent: #1f5fc4;
  --accent-hover: #174c9f;
  --accent-ink: #ffffff;
  --accent-soft: #e3ecfb;
  --wood: #9a6a2f;
  --ok: #1d7a43;
  --ok-soft: #e1f3e8;
  --warn: #8a5a00;
  --warn-soft: #fff4d9;
  --warn-border: #e2b54c;
  --code-bg: #efece6;
  --shadow: rgba(30, 25, 15, 0.22);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --surface: #1d2024;
    --surface-2: #24282d;
    --text: #e9e7e3;
    --muted: #a5aab2;
    --border: #2f343a;
    --accent: #6ea4ff;
    --accent-hover: #93bbff;
    --accent-ink: #0d1626;
    --accent-soft: #1b2a44;
    --wood: #d9ab6c;
    --ok: #5fd08f;
    --ok-soft: #173525;
    --warn: #f0c060;
    --warn-soft: #2b2415;
    --warn-border: #6d5626;
    --code-bg: #1a1d21;
    --shadow: rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); margin: 0 0 0.5em; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 2.2em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.8em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin: 0.25em 0; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; }
kbd {
  background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px;
  padding: 0.05em 0.4em; border-radius: 5px; white-space: nowrap;
}
pre {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; overflow-x: auto; line-height: 1.5; margin: 0 0 1.2em;
}
pre code { background: none; padding: 0; font-size: 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.prose { max-width: 46rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { border-radius: 7px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 2px 4px; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 600; }
.nav .nav-gh { color: var(--text); border: 1px solid var(--border); }
@media (max-width: 720px) {
  .header-row { padding-block: 10px 8px; }
  .nav { width: 100%; }
  .nav ul { margin-inline: -10px; }
  .nav a { padding: 5px 10px; font-size: 0.92rem; }
}
@media (min-width: 900px) {
  [id] { scroll-margin-top: 80px; }
  .site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
}

main { padding-bottom: 4rem; }

/* Page header */
.page-head { padding: clamp(2rem, 6vw, 3.5rem) 0 0.5rem; }
.page-head .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 44rem; }
.eyebrow { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wood); margin: 0 0 0.6rem; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.8rem; }
.crumbs a { color: var(--muted); }

/* Hero */
.hero { padding: clamp(2.2rem, 7vw, 4.5rem) 0 1rem; text-align: center; }
.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero .lede { font-size: clamp(1.08rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 40rem; margin: 0 auto 1.6rem; }
.hero .actions { justify-content: center; }
.hero-shot { margin: clamp(1.8rem, 5vw, 3rem) auto 0; max-width: 64rem; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.meta-line { color: var(--muted); font-size: 0.92rem; }

/* Notices */
.notice {
  background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: var(--radius);
  padding: 14px 18px; margin: 1.5rem 0; text-align: left;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong:first-child { color: var(--warn); }
.note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin: 1.5rem 0; }
.note p:last-child { margin-bottom: 0; }
.hero .notice { max-width: 46rem; margin-inline: auto; }

/* Screenshots */
figure { margin: 1.5rem 0 2rem; }
figure img { display: block; filter: drop-shadow(0 10px 24px var(--shadow)); }
figure a { display: block; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.9rem; text-align: center; }
figure.narrow img { max-width: min(100%, 640px); margin-inline: auto; }
figure.inset img { max-width: min(100%, 440px); margin-inline: auto; }
.shots-2 { display: grid; gap: 20px 28px; grid-template-columns: 1fr; margin: 1.5rem 0 2rem; }
.shots-2 figure { margin: 0; }
@media (min-width: 760px) { .shots-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Cards */
.section { padding-top: 1rem; }
.section > h2:first-child { margin-top: 2.5rem; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin: 1.2rem 0 2rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.08rem; }
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.6rem; }
.card .more { margin-top: auto; font-weight: 600; font-size: 0.95rem; text-decoration: none; }
a.card { text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--accent); }
a.card:hover h3 { color: var(--accent); }
.card img { border-radius: 8px; margin: -4px 0 14px; }

/* Feature rows: text beside a screenshot on wide screens */
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 40px; align-items: center; margin: 2.5rem 0 3.5rem; }
.feature > * { min-width: 0; }
.feature h2 { margin-top: 0; }
.feature figure { margin: 0.5rem 0 0; }
@media (min-width: 960px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .feature.flip > :first-child { order: 2; }
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
td code { white-space: nowrap; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.doc { background: var(--warn-soft); color: var(--warn); }
.badge.pp { background: var(--accent-soft); color: var(--accent); }

/* Tutorials */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 2rem 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 3rem; margin: 0 0 2.5rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; font-size: 0.95rem;
}
.steps > li > h2 { margin: 0 0 0.5rem; font-size: 1.35rem; padding-top: 0.15rem; }
@media (max-width: 560px) {
  .steps > li { padding-left: 0; }
  .steps > li::before { position: static; margin-bottom: 0.6rem; }
}
.tut-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.93rem; margin: 0 0 1.5rem; }
.next { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Contents list on long pages */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin: 1.5rem 0 2rem; }
.toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.5rem; }
.toc ul { columns: 2 14rem; gap: 2rem; margin: 0; padding-left: 1.1rem; }
.toc li { break-inside: avoid; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 2.5rem 0 1.5rem; font-size: 0.93rem; color: var(--muted); }
.footer-grid { display: grid; gap: 1.5rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1.05rem; margin-bottom: 0.5rem; }
.footer-brand img { border-radius: 5px; }
.site-footer h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.6rem; color: var(--text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.legal { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.2rem; font-size: 0.85rem; }
.legal p { max-width: 60rem; }

.center { text-align: center; }
.muted { color: var(--muted); }
.big-404 { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--wood); margin: 0; line-height: 1; }
