/* LabNote website. Static, no build step. Tokens first, then base, layout, components. */

/* ---------- Fonts (self-hosted, latin subset, OFL: see assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --ink: #0f1d24;
  --ink-2: #41525c;
  --muted: #586861;
  --paper: #f3f6f4;
  --surface: #ffffff;
  --line: #dbe2de;
  --line-strong: #c9d3ce;
  --grid: #e2e9e5;
  --accent: #047857;
  --accent-dark: #035c43;
  --accent-soft: #e6efeb;
  --accent-line: #9db8ad;
  --on-dark-accent: #5fd3ac;
  --amber: #8a5a12;
  --amber-line: #b7791f;
  --amber-border: #e8d3ad;
  --btn-dashed: #8fb3a5;
  --btn-ink: #3f5a50;
  --btn-icon: #8a9a93;
  --on-accent: #ffffff;
  --shadow: rgba(15, 29, 36, 0.14);
  --shadow-soft: rgba(15, 29, 36, 0.08);
  /* The dark panel and the footer are dark in both themes. */
  --panel: #0f1d24;
  --panel-ink: #e7eeea;
  --panel-ink-2: #b9c8c1;
  --panel-muted: #9fb1aa;
  --panel-line: #2a3f47;
  --panel-ring: none;
  --panel-amber: #f0c27a;
  /* Fig. 1 illustration surfaces. The A4 sheet stays light in both themes. */
  --ill-sel: #dcefe7;
  --ill-card: #f8faf9;
  --ill-head: #eef3f0;
  --ill-bar: #e2e9e5;
  --ill-row: #e6ebe8;
  --ill-title: #cfe0d8;
  --ill-chrome: #9fb1aa;
  --sheet: #ffffff;
  --sheet-line: #c9d3ce;
  --sheet-bar: #dbe2de;
  --sheet-block: #f3f6f4;
  --sheet-block-line: #e2e9e5;
  --sheet-ink: #0f1d24;
  --sheet-muted: #5d6d66;
  --sheet-callout: #8a5a12;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e7eeea;
    --ink-2: #9fb1aa;
    --muted: #8a9c95;
    --paper: #0e171c;
    --surface: #142229;
    --line: #23343c;
    --line-strong: #2f444d;
    --grid: #15232a;
    --accent: #34c39a;
    --accent-dark: #5fd3ac;
    --accent-soft: #17302b;
    --accent-line: #2f6b59;
    --on-dark-accent: #5fd3ac;
    --amber: #e3b866;
    --amber-line: #b98a3a;
    --amber-border: #5c4521;
    --btn-dashed: #3a7a66;
    --btn-ink: #a9dcc9;
    --btn-icon: #6f847c;
    --on-accent: #06231b;
    --shadow: rgba(0, 0, 0, 0.5);
    --shadow-soft: rgba(0, 0, 0, 0.35);
    --panel: #0b1318;
    --panel-ring: inset 0 0 0 1px #23343c;
    --ill-sel: #1b3a33;
    --ill-card: #101c22;
    --ill-head: #1a2a31;
    --ill-bar: #24373f;
    --ill-row: #1d2e36;
    --ill-chrome: #9fb1aa;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-dark);
}
[id] {
  scroll-margin-top: 84px;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: 24px;
  position: relative;
}
.sec {
  position: relative;
  overflow: hidden;
}

/* ---------- Type helpers ---------- */
.mono {
  font-family: "IBM Plex Mono", Consolas, monospace;
  color: var(--panel-ink);
}
.mono-label {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.6;
}
.mono-label-sm {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.mono-note {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
}
.mono-note-sm {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}
h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}
h2 {
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}
.sec-head h2,
.why-copy h2 {
  text-wrap: balance;
}
.sec-sub,
.lead {
  color: var(--ink-2);
}
.sec-pad {
  padding-block: 104px;
}
.stack-56,
.stack-48,
.stack-40 {
  display: flex;
  flex-direction: column;
}
.stack-56 {
  gap: 56px;
  padding-top: 112px;
  padding-bottom: 96px;
}
.stack-48 {
  gap: 48px;
}
.stack-40 {
  gap: 40px;
}
.band {
  background: var(--surface);
}
.band-bordered {
  border-block: 1px solid var(--line);
}
.line-top {
  border-top: 1px solid var(--line);
}
.grid-bg {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- Buttons and pills ---------- */
.btn {
  display: flex;
  align-items: center;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
}
.btn-sm {
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.btn-sm .win {
  color: var(--btn-icon);
}
.btn-cta {
  gap: 12px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px dashed var(--btn-dashed);
  background: var(--accent-soft);
  color: var(--btn-ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.btn-cta-lg {
  min-height: 56px;
  padding: 0 28px;
  font-size: 17px;
}
.btn-cta .win {
  flex: none;
}
.pill-soon {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  white-space: nowrap;
}
.pill-tag {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 2px 8px;
}
/* Live state, set by main.js once config.js has a downloadUrl. */
.btn-live {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.btn-live:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--on-accent);
}
.btn-live .win {
  color: var(--on-accent);
}
.link-quiet {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent-line);
}
.link-quiet:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}
.logo {
  color: var(--accent);
  flex: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover {
  color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-btn .menu-close,
.menu-btn[aria-expanded="true"] .menu-open {
  display: none;
}
.menu-btn[aria-expanded="true"] .menu-close {
  display: inline;
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  padding-block: 88px 150px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}
.col {
  flex: 1 1 420px;
  min-width: 0;
}
.hero-copy {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-fig {
  flex: 1.35 1 520px;
}
.hero h1 {
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  font-size: 19px;
  max-width: 34em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-fig figure {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hero-fig figcaption {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- "Not a web app" strip ---------- */
.strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.strip-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.strip-grid li {
  padding: 28px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-left: 1px solid var(--line);
}
.strip-grid li:first-child {
  padding-left: 0;
  border-left: 0;
}
.strip-grid li:last-child {
  padding-right: 0;
}
.strip-grid .ico {
  flex: none;
  margin-top: 2px;
}
.strip-t {
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
}
.strip-grid p {
  font-size: 15px;
  color: var(--ink-2);
}
.ico {
  color: var(--accent);
}
.ico-ondark {
  color: var(--on-dark-accent);
}

/* ---------- Feature cards ---------- */
.feat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.card h3 {
  font-size: 25px;
}
.card-list {
  padding-left: 20px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-list strong {
  color: var(--ink);
  font-weight: 600;
}
.review {
  box-shadow: var(--panel-ring);
  background: var(--panel);
  color: var(--panel-ink);
  border-radius: 14px;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}
.review-copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review .card-tag {
  color: var(--panel-muted);
}
.review h3 {
  font-size: 28px;
}
.review p {
  color: var(--panel-ink-2);
}
.review-rows {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}
.review-rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
}
.st-ok {
  color: var(--on-dark-accent);
}
.st-open {
  color: var(--panel-muted);
}
.st-pending {
  color: var(--panel-amber);
}

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
}
.step.is-first {
  border-top-color: var(--accent);
}
.step-n {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
}
.step h3 {
  font-size: 21px;
}
.step p {
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- Why LabNote ---------- */
.why {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
}
.why-copy {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.why-copy p:last-child {
  color: var(--ink-2);
}
.why-grid {
  flex: 1.4 1 480px;
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.why-grid > div {
  padding: 24px 24px 24px 0;
  border-bottom: 1px solid var(--line);
}
.why-grid > div:nth-child(even) {
  padding: 24px 0 24px 24px;
  border-left: 1px solid var(--line);
}
.why-grid dt {
  font-weight: 600;
  margin-bottom: 6px;
}
.why-grid dd {
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- Download ---------- */
.dl-wrap {
  padding-block: 112px;
  display: flex;
  justify-content: center;
}
.dl-card {
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  box-shadow: 0 20px 50px var(--shadow-soft);
}
.dl-card h2 {
  font-size: 36px;
  line-height: 1.6;
}
.dl-note {
  color: var(--ink-2);
  max-width: 30em;
}
.req {
  width: 100%;
  margin-top: 12px;
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.req dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 24px;
  font-size: 15px;
}
.req dt {
  color: var(--ink-2);
}
.req dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.req dd.is-soon {
  color: var(--muted);
}
.req .mono-sum {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 13px;
}

/* ---------- Documentation and privacy ---------- */
.docs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.doc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
a.doc-card:hover {
  border-color: var(--accent);
  color: inherit;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.doc-title {
  font-weight: 600;
}
.doc-text {
  font-size: 15px;
  color: var(--ink-2);
}
.doc-arrow {
  color: var(--accent);
}
.privacy {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.privacy-head {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-head h3 {
  font-size: 24px;
}
.privacy-body {
  flex: 2 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.privacy-body ul {
  padding-left: 20px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-body p {
  font-size: 15px;
}

/* ---------- FAQ ---------- */
.faq {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.faq-head {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-list {
  flex: 2 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 20px;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.plus {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}
.faq details[open] .plus {
  transform: rotate(45deg);
}
.faq details p {
  margin-top: 12px;
  color: var(--ink-2);
}

/* ---------- About and contact ---------- */
.about {
  padding-block: 88px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.about-copy {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-text {
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  line-height: 1.4;
  max-width: 30em;
}
.contact-copy {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-text {
  color: var(--ink-2);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--panel);
  color: var(--panel-ink-2);
  border-top: 1px solid var(--panel-line);
}
.footer-inner {
  padding-block: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand .logo {
  color: var(--on-dark-accent);
}
.footer-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--panel-ink);
  font-size: 18px;
}
.footer-copy {
  font-size: 14px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
}
.footer-nav a {
  color: var(--panel-ink-2);
}
.footer-nav a:hover {
  color: #ffffff;
}
.site-footer :focus-visible {
  outline-color: var(--on-dark-accent);
}

/* ---------- Utilities ---------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .docs {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feat {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .wrap {
    padding-inline: 16px;
  }
  .page-head {
    padding-block: 48px 40px;
  }
  .page-body {
    padding-block: 40px 72px;
  }
  .notfound-inner {
    padding-block: 72px;
  }
  .strip-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .strip-grid li,
  .strip-grid li:first-child,
  .strip-grid li:last-child {
    padding: 20px 0;
    border-left: 0;
  }
  .strip-grid li + li {
    border-top: 1px solid var(--line);
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .why-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .why-grid > div,
  .why-grid > div:nth-child(even) {
    padding: 20px 0;
    border-left: 0;
  }
  .hero-inner {
    padding-block: 56px 132px;
  }
  .sec-pad {
    padding-block: 72px;
  }
  .stack-56 {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .dl-wrap {
    padding-block: 72px;
  }
  .dl-card {
    padding: 36px 20px;
  }
  .card,
  .privacy {
    padding: 24px;
  }
  .review {
    padding: 28px 24px;
  }
  .about {
    padding-block: 64px;
  }
  .req dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .req dd {
    margin-bottom: 10px;
  }
  /* Without JS the nav is a plain row under the header; with JS it hides behind the menu button. */
  .header-inner {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .nav {
    order: 3;
    flex: 0 0 100%;
    flex-wrap: wrap;
    gap: 4px 20px;
    padding-bottom: 12px;
  }
  .js .header-inner {
    height: 72px;
    min-height: 0;
    flex-wrap: nowrap;
  }
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px var(--shadow-soft);
  }
  .js .nav.is-open {
    display: flex;
  }
  .js .nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }
  .js .menu-btn {
    display: flex;
  }
}
@media (max-width: 480px) {
  .btn-sm {
    padding: 0 12px;
  }
  .btn-sm .win {
    display: none;
  }
  .brand-name {
    font-size: 21px;
  }
  .btn-cta,
  .btn-cta-lg {
    padding: 8px 18px;
    flex-wrap: wrap;
  }
}

/* ---------- Background drawings: the "research sketchbook" ----------
   Each drawing is its own SVG in assets/img/deco/, drawn in black with no fill, and shown
   through a CSS mask so it takes the theme colour. Decorative only (aria-hidden). */
.deco {
  position: absolute;
  pointer-events: none;
  background: var(--accent);
  opacity: var(--o, 0.14);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
@media (prefers-color-scheme: dark) {
  .deco {
    opacity: calc(var(--o, 0.14) * 0.85);
  }
}
/* Below 900px the content fills the width, so the margin drawings would sit behind text. */
@media (max-width: 900px) {
  .deco-sm-hide {
    display: none;
  }
}

/* ---------- Fig. 1 illustration (inline SVG; colours come from tokens) ---------- */
.ill {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 40px var(--shadow));
}
.f-surface { fill: var(--surface); }
.f-paper { fill: var(--paper); }
.f-panel { fill: var(--panel); }
.f-ink { fill: var(--ink); }
.f-ink-2 { fill: var(--ink-2); }
.f-muted { fill: var(--muted); }
.f-accent { fill: var(--accent); }
.f-accent-dark { fill: var(--accent-dark); }
.f-amber { fill: var(--amber); }
.f-ill-sel { fill: var(--ill-sel); }
.f-ill-card { fill: var(--ill-card); }
.f-ill-head { fill: var(--ill-head); }
.f-ill-bar { fill: var(--ill-bar); }
.f-ill-title { fill: var(--ill-title); }
.s-line { stroke: var(--line); }
.s-line-strong { stroke: var(--line-strong); }
.s-ink { stroke: var(--ink); }
.s-accent { stroke: var(--accent); }
.s-amber-line { stroke: var(--amber-line); }
.s-ill-row { stroke: var(--ill-row); }
.s-ill-chrome { stroke: var(--ill-chrome); }

.d-molecule {
  left: -30px;
  bottom: 110px;
  width: 560px;
  height: 380px;
  --o: 0.11;
  -webkit-mask-image: url("../img/deco/molecule.svg");
  mask-image: url("../img/deco/molecule.svg");
}
.d-ir-spectrum {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 146px;
  --o: 0.16;
  -webkit-mask-image: url("../img/deco/ir-spectrum.svg");
  mask-image: url("../img/deco/ir-spectrum.svg");
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-position: left bottom;
  mask-position: left bottom;
}
.d-separatory-funnel {
  left: -20px;
  bottom: 120px;
  width: 180px;
  height: 320px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/separatory-funnel.svg");
  mask-image: url("../img/deco/separatory-funnel.svg");
}
.d-reflux {
  right: -10px;
  top: 40px;
  width: 300px;
  height: 440px;
  --o: 0.13;
  -webkit-mask-image: url("../img/deco/reflux.svg");
  mask-image: url("../img/deco/reflux.svg");
}
.d-bunsen-tripod {
  left: -10px;
  bottom: 30px;
  width: 160px;
  height: 260px;
  --o: 0.15;
  -webkit-mask-image: url("../img/deco/bunsen-tripod.svg");
  mask-image: url("../img/deco/bunsen-tripod.svg");
}
.d-tlc-plate {
  right: 32px;
  top: 64px;
  width: 220px;
  height: 240px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/tlc-plate.svg");
  mask-image: url("../img/deco/tlc-plate.svg");
}
.d-test-tube-rack {
  left: -30px;
  bottom: 40px;
  width: 240px;
  height: 180px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/test-tube-rack.svg");
  mask-image: url("../img/deco/test-tube-rack.svg");
}
.d-periodic-table {
  right: -40px;
  top: 36px;
  width: 340px;
  height: 180px;
  --o: 0.12;
  -webkit-mask-image: url("../img/deco/periodic-table.svg");
  mask-image: url("../img/deco/periodic-table.svg");
}
.d-orbital {
  left: 4%;
  top: 80px;
  width: 300px;
  height: 300px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/orbital.svg");
  mask-image: url("../img/deco/orbital.svg");
}
.d-erlenmeyer {
  right: 5%;
  bottom: 70px;
  width: 220px;
  height: 280px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/erlenmeyer.svg");
  mask-image: url("../img/deco/erlenmeyer.svg");
}
.d-microscope {
  left: -20px;
  top: 120px;
  width: 200px;
  height: 280px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/microscope.svg");
  mask-image: url("../img/deco/microscope.svg");
}
.d-burette {
  right: -10px;
  top: 70px;
  width: 140px;
  height: 360px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/burette.svg");
  mask-image: url("../img/deco/burette.svg");
}
.d-titration-curve {
  left: 24px;
  bottom: 56px;
  width: 320px;
  height: 240px;
  --o: 0.15;
  -webkit-mask-image: url("../img/deco/titration-curve.svg");
  mask-image: url("../img/deco/titration-curve.svg");
}
.d-beaker-pipette {
  right: -20px;
  top: 40px;
  width: 200px;
  height: 240px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/beaker-pipette.svg");
  mask-image: url("../img/deco/beaker-pipette.svg");
}
.d-hexagon-chain {
  right: -20px;
  top: -10px;
  width: 400px;
  height: 120px;
  --o: 0.12;
  -webkit-mask-image: url("../img/deco/hexagon-chain.svg");
  mask-image: url("../img/deco/hexagon-chain.svg");
  background: var(--on-dark-accent);
}

/* ---------- Privacy and 404 pages ---------- */
.page-top {
  border-bottom: 1px solid var(--line);
}
.page-head {
  padding-block: 72px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1160px;
}
.page-head h1,
.notfound h1 {
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.page-body {
  padding-block: 56px 96px;
}
.prose {
  max-width: 720px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prose:first-child {
  border-top: 0;
  padding-top: 0;
}
.prose h2 {
  font-size: 30px;
  line-height: 1.2;
}
.prose h3 {
  font-size: 21px;
  margin-top: 8px;
}
.prose ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prose p,
.prose li {
  color: var(--ink-2);
}
.prose .fine {
  font-size: 15px;
  color: var(--muted);
}
.mono-inline {
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: 0.92em;
  color: var(--ink);
}
.lookups {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.lookups > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.lookups dt {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.lookups dd {
  font-size: 15px;
  color: var(--ink-2);
}
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.notfound {
  flex: 1;
}
.notfound-inner {
  padding-block: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 1160px;
}
.notfound .lead {
  max-width: 30em;
}
.btn-home {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.btn-home:hover {
  background: var(--accent-dark);
  color: var(--on-accent);
}
.d-notfound {
  right: 8%;
  top: 70px;
  width: 220px;
  height: 280px;
  --o: 0.14;
  -webkit-mask-image: url("../img/deco/erlenmeyer.svg");
  mask-image: url("../img/deco/erlenmeyer.svg");
}

/* ---------- Motion: only here, and only when the visitor has not asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
  .ill-draw path,
  .ill-draw line,
  .ill-draw polyline {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: ill-draw 1.4s ease-out 0.3s forwards;
  }
}
@keyframes ill-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@media print {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header {
    position: static;
  }
}
