/* Self hosted fonts (SIL Open Font License, see fonts/OFL-*.txt). Served from this site, so no request goes to Google. */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-400-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-400-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/atkinson-hyperlegible-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* QRotto — teal and navy, simple and plain-spoken.
   Fonts: Atkinson Hyperlegible (made for easy reading) and JetBrains Mono for data. */
:root {
  /* ---------- design scale (every size on the site comes from here) ---------- */
  /* type, in rem so it grows with the reader's text setting */
  --fs-12: 0.75rem; --fs-13: 0.8125rem; --fs-14: 0.875rem; --fs-15: 0.9375rem; --fs-16: 1rem; --fs-17: 1.0625rem;
  --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-22: 1.375rem; --fs-24: 1.5rem; --fs-28: 1.75rem; --fs-32: 2rem;
  --fs-36: 2.25rem; --fs-40: 2.5rem; --fs-44: 2.75rem; --fs-52: 3.25rem;
  --lh-none: 1; --lh-tight: 1.1; --lh-snug: 1.25; --lh-normal: 1.4; --lh-relaxed: 1.5; --lh-body: 1.6; --lh-prose: 1.7; --lh-loose: 2;
  /* spacing: even steps below 12px (2 4 6 8 10), then the 4px grid (12 16 20 24 28 32 36 40 48 56 64 72 80) */
  /* elevation */
  --shadow-1: 0 1px 3px rgba(14, 17, 32, 0.06);
  --shadow-2: 0 4px 16px rgba(14, 17, 32, 0.08);
  --shadow-3: 0 8px 24px rgba(14, 17, 32, 0.18);
  --shadow-4: 0 16px 40px rgba(14, 17, 32, 0.18);
  --shadow-up: 0 -8px 32px rgba(14, 17, 32, 0.25);
  /* layers */
  --z-raised: 1; --z-float: 20; --z-sticky: 25; --z-header: 30; --z-menu: 40; --z-popover: 50; --z-toast: 60; --z-skip: 1000; --z-modal: 9999;
  /* motion */
  --dur-1: 0.15s; --dur-2: 0.2s;
  /* the navy surface (header, menus, code, bands) and text on it */
  --navy-2: #1b1f33; --navy-3: #2a2f45; --navy-line: #4a4f66; --navy-line-2: #7a8099;
  --on-navy: #e8eaf2; --on-navy-2: #cfd3e0; --on-navy-3: #a9adbd;

  --navy: #0e1120;
  --text: #0e1120;
  --body: #1f2333;
  --muted: #3a3f52;
  --faint: #5b6072;
  --bg: #ffffff;
  --surface: #f6f8f9;
  --card: #ffffff;
  --border: #e3e5ee;
  --border-strong: #d0d3de;
  --input-border: #868c9f;
  --accent: #0f766e;
  --accent-dark: #0b5a54;
  --accent-soft: #e6f4f1;
  --accent-bright: #5eead4;
  --hero: #e9f6f2;
  --hero-line: #cde6df;
  --success: #1d6b34;
  --success-soft: #e8f6ec;
  --success-line: #9fd3b0;
  --warn: #8a5409;
  --warn-soft: #fdf3e1;
  --danger: #9e2020;
  --danger-soft: #fbeded;
  --warn-line: #f0d49e;
  --danger-line: #efbcbc;
  --warn-text: #5c3806;
  --hero-dot: #b5ddd1;
  --focus: #0f766e;
  --radius: 4px;
  --radius-lg: 6px;
  --font: "Atkinson Hyperlegible", "Atkinson Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
/* The hidden attribute must always win. Classes such as .btn, .ds-row and .checkbox-row set display and used to override it, so "Stop camera" showed before the camera started. */
[hidden] { display: none !important; }
/* Text for screen readers only, such as the corner cell of a comparison table. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-17);
  background: var(--bg);
  color: var(--body);
  line-height: var(--lh-body);
}

h1, h2, h3, h4 { color: var(--text); line-height: var(--lh-snug); }

a { color: var(--accent-dark); }
a:hover { color: var(--text); }

/* ---------- header ---------- */
header.site-header {
  background: var(--navy);
  color: #ffffff;
  position: relative;
  z-index: var(--z-header);
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 60px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-weight: 700;
  font-size: var(--fs-28);
  line-height: var(--lh-none);
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo:hover { color: #ffffff; }
.logo-dot {
  display: inline-block;
  width: 0.27em;
  height: 0.27em;
  margin-left: 0.07em;
  background: var(--accent-bright);
}
.logo:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 2px; }

/* site search, added by nav.js */
.site-search {
  flex: 0 1 300px;
  margin-left: auto;
  margin-bottom: 0;              /* it is a <label>; the form label margin would lift it 4px */
  font-weight: 400;
  font-size: var(--fs-16);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--navy-2);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  color: var(--on-navy-2);
}
.site-search svg { flex: none; }
.site-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: var(--fs-16);
  outline: none;
}
.site-search input::placeholder { color: var(--on-navy-3); }
.site-search input { text-overflow: ellipsis; }
.site-search:focus-within { border-color: var(--accent-bright); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-height: 44px;
  font: inherit;
  font-size: var(--fs-16);
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent-bright); }
.nav-toggle .nav-bars { display: block; width: 17px; height: 11px; position: relative; }
.nav-toggle .nav-bars::before,
.nav-toggle .nav-bars::after,
.nav-toggle .nav-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor;
}
.nav-toggle .nav-bars::before { top: 0; }
.nav-toggle .nav-bars span { top: 4.5px; }
.nav-toggle .nav-bars::after { bottom: 0; }

nav.tool-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav.tool-nav > a, .nav-drop > summary {
  color: var(--on-navy);
  text-decoration: none;
  font-size: var(--fs-16);
  padding: 8px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
nav.tool-nav > a:hover, .nav-drop > summary:hover { color: #ffffff; background: var(--navy-2); }
nav.tool-nav > a.active { color: #ffffff; text-decoration: underline; text-decoration-color: var(--accent-bright); text-decoration-thickness: 2px; text-underline-offset: 7px; }

.nav-drop { position: relative; }
.nav-drop > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-1);
}
.nav-drop[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-drop.is-active > summary { color: #ffffff; text-decoration: underline; text-decoration-color: var(--accent-bright); text-decoration-thickness: 2px; text-underline-offset: 7px; }

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: var(--z-menu);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-4);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 2px 8px;
  min-width: 360px;
}
.nav-panel a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-16);
  padding: 8px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}
.nav-panel a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.nav-panel a.active { color: var(--accent-dark); font-weight: 700; }
.nav-panel .nav-group {
  grid-column: 1 / -1;
  font-size: var(--fs-13);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 10px 4px;
}

/* one row on wide screens: the search box gives way before the menu wraps */
@media (min-width: 1121px) {
  .nav-wrap { flex-wrap: nowrap; }
  .site-search { min-width: 120px; }
}

@media (max-width: 1120px) {
  .js .nav-toggle { display: inline-flex; }
  .js nav.tool-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--navy-3);
  }
  .js .site-header.nav-open nav.tool-nav { display: flex; }
  nav.tool-nav > a, .nav-drop > summary { padding: 12px 10px; font-size: var(--fs-17); }
  .nav-drop { position: static; }
  .nav-panel {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: var(--radius);
    padding: 4px 0 8px;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
    background: var(--navy-2);
  }
  .nav-panel a { color: var(--on-navy); }
  .nav-panel a:hover, .nav-panel a.active { background: var(--navy-3); color: #ffffff; }
  .nav-panel .nav-group { color: var(--on-navy-3); padding-top: 12px; }
  .site-search { order: 3; flex: 1 1 100%; margin-left: 0; }
}

/* ---------- page frame ---------- */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.breadcrumb {
  font-size: var(--fs-15);
  color: var(--muted);
  margin: 0 0 20px;
}
.breadcrumb a { color: var(--text); }

.hero { margin-bottom: 32px; }
.hero h1 {
  font-size: var(--fs-40);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.hero p {
  color: var(--muted);
  max-width: 44em;
  margin: 0;
  font-size: var(--fs-20);
  line-height: var(--lh-relaxed);
}

/* ---------- generator: one column, two numbered steps ---------- */
.generator-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.generator-layout > .panel { display: flex; flex-direction: column; }
.generator-layout > .panel::before {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--text);
}
.generator-layout > .panel:first-child::before { content: "Step 1 · Your details"; }
.generator-layout > .panel.qr-output::before { content: "Step 2 · Your code"; align-self: stretch; }

.panel {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.generator-layout > .panel.qr-output { align-items: center; background: var(--surface); }

.form-group { margin-bottom: 24px; }

label {
  display: block;
  font-size: var(--fs-17);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius);
  font-size: var(--fs-17);
  font-family: inherit;
  background: #ffffff;
  color: var(--text);
}

textarea { min-height: 110px; resize: vertical; line-height: var(--lh-relaxed); }

input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
  box-shadow: none;
}
.site-search input:focus, .docs-filter input:focus, .docs-search input:focus { outline: none; box-shadow: none; }

input[type="radio"], input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  background: var(--accent);
  color: #ffffff;
  border: 0;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: var(--lh-snug);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); color: #ffffff; }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn svg { flex: none; }

.btn-outline {
  background: #ffffff;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover { background: #ffffff; color: var(--text); border-color: var(--text); }
.btn-outline:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.btn-small { min-height: 44px; padding: 10px 20px; font-size: var(--fs-16); }

.qr-output { text-align: center; }

#qrcode {
  display: inline-block;
  padding: 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  min-height: 256px;
  min-width: 256px;
}

#qrcode canvas, #qrcode img {
  display: block;
  width: 256px;
  height: auto;
  max-width: 100%;
}

.qr-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* the scan check the engine writes under each code */
.qr-scan-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px auto 0;
  max-width: 460px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  text-align: left;
  color: var(--body);
}
.qr-scan-badge::before {
  content: "\2713";
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--badge, var(--success));
  color: #ffffff;
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.qr-scan-badge strong { display: block; font-size: var(--fs-18); color: var(--text); }
.qr-scan-badge.is-low { --badge: var(--success); background: var(--success-soft); border-color: var(--success-line); }
.qr-scan-badge.is-mid { --badge: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.qr-scan-badge.is-high { --badge: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.qr-scan-badge.is-mid::before, .qr-scan-badge.is-high::before { content: "!"; }
.qr-scan-badge[hidden] { display: none; }

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-weight: 400;
  cursor: pointer;
  background: #ffffff;
}
.radio-row label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.radio-row input { width: 20px; }

.checkbox-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.checkbox-row input { width: 20px; }
.checkbox-row label { margin: 0; font-weight: 400; }

/* ---------- long-form content ---------- */
article.content-block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
article.content-block h2 { margin-top: 0; }
article.content-block h2:not(:first-child) { margin-top: 48px; }

.prose { max-width: 72ch; margin-left: auto; margin-right: auto; font-size: var(--fs-18); line-height: var(--lh-prose); }
.prose h2 { margin: 48px 0 16px; font-size: var(--fs-28); letter-spacing: -0.01em; }
.prose h3 { margin: 32px 0 10px; font-size: var(--fs-20); }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent-dark); }
.prose code { font-family: var(--mono); font-size: 0.92em; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; }
article code { overflow-wrap: anywhere; }

.grid-heading {
  font-size: var(--fs-32);
  margin: 0 0 8px;
  color: var(--text);
}
.grid-sub { color: var(--muted); margin: 0 0 8px; font-size: var(--fs-18); }

.grid-group {
  font-size: var(--fs-14);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-strong);
}

/* ---------- tool tiles ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.tool-grid > .tool-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--dur-1) ease, box-shadow var(--dur-1) ease;
}
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-2); color: var(--text); }
.tool-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  color: var(--accent);
}
.tool-card .icon svg { width: 28px; height: 28px; }
.tool-card:hover .icon { background: var(--accent); color: #ffffff; }
.tool-card .card-body { min-width: 0; }
.tool-card h3 { margin: 0 0 4px; font-size: var(--fs-18); line-height: var(--lh-snug); }
.tool-card p { margin: 0; color: var(--muted); font-size: var(--fs-16); line-height: var(--lh-normal); }
.tool-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- footer ---------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  padding: 32px 20px 40px;
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-16);
  line-height: var(--lh-loose);
}
footer a { color: var(--text); }

.ad-slot { margin: 32px 0; text-align: center; }
.ad-slot:empty { display: none; }

/* ---------- article meta / author ---------- */
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: var(--fs-15);
  color: var(--muted);
  margin: 40px auto 0;
  max-width: 72ch;
}
.article-meta .sep { color: var(--border-strong); }
.article-meta a { color: var(--accent-dark); }

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 40px;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-content: center;
  font-weight: 700;
  font-size: var(--fs-18);
  flex-shrink: 0;
}
.author-box h3 { margin: 0 0 4px; font-size: var(--fs-18); }
.author-box p { margin: 0; font-size: var(--fs-16); color: var(--muted); line-height: var(--lh-relaxed); }

/* ---------- figures ---------- */
figure { margin: 28px 0; text-align: center; }
figure img {
  max-width: 100%;
  width: auto;
  height: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 10px;
  cursor: zoom-in;
  transition: border-color var(--dur-1) ease;
}
figure a.zoom { display: inline-block; max-width: 100%; }
figure a.zoom:hover img { border-color: var(--accent); }
figure a.zoom:focus-visible img { outline: 3px solid var(--focus); outline-offset: 3px; }
figure img[src*="example-"] { max-width: min(300px, 100%); }
figcaption { margin-top: 10px; font-size: var(--fs-15); color: var(--muted); }

/* ---------- callouts ---------- */
.takeaway {
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin: 28px 0;
}
.takeaway p { margin: 0; }
.takeaway strong { color: var(--accent-dark); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
table.cmp { width: 100%; border-collapse: collapse; font-size: var(--fs-16); min-width: 460px; }
table.cmp th, table.cmp td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.cmp th { background: var(--surface); font-weight: 700; color: var(--text); }
table.cmp tr:last-child td { border-bottom: none; }
/* A wide table scrolls sideways; the soft shadow at the edge shows there is more to see. */
.table-wrap {
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(14, 17, 32, 0.18), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(14, 17, 32, 0.18), transparent) right center / 12px 100% no-repeat scroll,
    #fff;
}
/* Phones: two and three column tables fit the screen instead of cutting off the last column. */
@media (max-width: 640px) {
  table.cmp { min-width: 0; font-size: var(--fs-15); }
  table.cmp:has(tr > :nth-child(4)) { min-width: 520px; }
  table.cmp th, table.cmp td { padding: 10px 12px; }
  table.cmp td { overflow-wrap: anywhere; }  /* long links such as wa.me/447700900123 wrap instead of pushing the table wider */
}

/* ---------- blog listing ---------- */
.post-list { display: grid; gap: 12px; margin-top: 24px; }
.post-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color var(--dur-1) ease;
}
.post-card:hover { border-color: var(--accent); color: var(--text); }
.post-card h3 { margin: 0 0 6px; font-size: var(--fs-20); line-height: var(--lh-snug); }
.post-card .date { font-size: var(--fs-14); color: var(--muted); display: block; margin-bottom: 8px; }
.post-card p { margin: 0; color: var(--muted); }

/* ---------- table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 0 0 32px;
}
.toc h2 {
  margin: 0 0 12px !important;
  font-size: var(--fs-14) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toc ol { margin: 0; padding-left: 24px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--accent-dark); }
.prose h2[id] { scroll-margin-top: 20px; }

/* ---------- related posts ---------- */
.related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-strong); }
.related > h2 { font-size: var(--fs-22); margin: 0 0 20px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.related-grid a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  line-height: var(--lh-normal);
}
.related-grid a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- lightbox ---------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 16, 23, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: var(--z-modal);
  cursor: zoom-out;
}
.lb-overlay img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; background: #fff; border-radius: var(--radius-lg); padding: 12px; }
.lb-cap { position: absolute; left: 24px; right: 24px; bottom: 22px; text-align: center; color: var(--on-navy); font-size: var(--fs-15); line-height: var(--lh-relaxed); }
.lb-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border: none; border-radius: var(--radius); background: rgba(255,255,255,0.14); color: #fff; font-size: var(--fs-22); line-height: var(--lh-none); cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,0.26); }
.lb-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body.lb-open { overflow: hidden; }

/* ---------- keyboard focus ---------- */
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.post-card:focus-visible, .related-grid a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- bulk generator ---------- */
.bulk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
.bulk-item { margin: 0; text-align: center; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 12px 8px; }
.bulk-item img { display: block; margin: 0 auto 8px; max-width: 120px; height: auto; border: none; padding: 0; cursor: default; }
.bulk-item figcaption { font-size: var(--fs-14); color: var(--muted); margin: 0; word-break: break-word; }
.bulk-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.bulk-status { font-size: var(--fs-16); color: var(--muted); margin: 16px 0 0; }
.bulk-panel { grid-column: 1 / -1; }
/* random QR code generator */
.panel-title { font-size: var(--fs-18); margin: 0 0 16px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input { flex: 1; min-width: 0; }
.reveal-box { margin-top: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); }
.reveal-box summary { cursor: pointer; font-weight: 700; }
.reveal-box p { margin: 8px 0 0; overflow-wrap: anywhere; }
.batch-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 16px; align-items: end; }
.bulk-panel + .article-meta, .generator-layout + .bulk-panel { margin-top: 24px; }

/* ---------- scanner ---------- */
.scan-drop {
  border: 2px dashed var(--input-border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background: var(--surface);
  transition: border-color var(--dur-1) ease, background var(--dur-1) ease;
}
.scan-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.scan-drop p { margin: 0 0 6px; color: var(--muted); }
.scan-drop .scan-or { font-size: var(--fs-15); color: var(--faint); margin: 12px 0 10px; }
.scan-media { margin-top: 20px; text-align: center; }
.scan-media img, .scan-media video { max-width: 100%; max-height: 320px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); }
.scan-result { margin-top: 20px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 20px 24px; }
.scan-kind, .ds-verdict {
  display: inline-block;
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.scan-ok, .ds-pass { background: var(--success-soft); color: var(--success); }
.scan-fail, .ds-fail { background: var(--danger-soft); color: var(--danger); }
.scan-out {
  font-family: var(--mono);
  font-size: var(--fs-15);
  line-height: var(--lh-body);
  word-break: break-all;
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0;
  color: var(--text);
}

/* ---------- QR designer ---------- */
.ds-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .ds-layout { grid-template-columns: 1fr; } }
.ds-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }  /* controls line up even when one label wraps */
.ds-row .form-group { flex: 1; min-width: 130px; }
.ds-row .form-group.ds-wide { flex: 2; }  /* room for "Square, most reliable" */
@media (max-width: 640px) { .ds-row .form-group, .ds-row .form-group.ds-wide { flex: 1 1 100%; } }  /* one control per row on phones */
input[type="color"] { width: 100%; height: 52px; padding: 4px; border: 1.5px solid var(--input-border); border-radius: var(--radius); background: #fff; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.ds-slider-label { display: flex; justify-content: space-between; align-items: baseline; }
.ds-slider-label span { font-weight: 400; color: var(--muted); font-size: var(--fs-15); }
.ds-check { margin-top: 20px; padding: 16px 20px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--card); }
.ds-detail { margin: 0; color: var(--muted); line-height: var(--lh-relaxed); }
.ds-note { font-size: var(--fs-15); color: var(--warn); margin: 6px 0 0; }
.ds-preview { text-align: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 24px; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.ds-preview img { max-width: 300px; border-radius: var(--radius); }

/* ---------- stress test ---------- */
.st-panel { max-width: 940px; margin: 0 auto; }
.st-gen { display: grid; gap: 10px; max-width: 460px; margin: 0 auto; text-align: left; }
.st-label { font-weight: 700; }
.st-busy { text-align: center; color: var(--muted); padding: 24px 0; }
.st-top { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 24px; }
.st-thumb img { width: 170px; height: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; }
.st-facts { flex: 1; min-width: 260px; }
.st-facts h2 { margin-top: 0; font-size: var(--fs-20); }
.st-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.st-facts dt { font-weight: 700; color: var(--muted); }
.st-facts dd { margin: 0; }
.st-content { word-break: break-all; }
.st-h { font-size: var(--fs-20); margin: 28px 0 10px; }
.st-note { color: var(--muted); margin: 0 0 16px; }
.st-table td:nth-child(3) { color: var(--muted); }
.st-strip { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.st-case { margin: 0; text-align: center; width: 160px; }
.st-case img { width: 160px; height: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; }
.st-case figcaption { font-size: var(--fs-14); color: var(--muted); margin-top: 8px; line-height: var(--lh-normal); }
.st-pass { color: var(--success); font-weight: 700; }
.st-failtxt { color: var(--danger); font-weight: 700; }

/* ---------- small helpers ---------- */
.bk-hint { margin: 12px 0 0; color: var(--muted); min-height: 1.2em; }
.bk-hint.is-error { color: var(--danger); font-weight: 700; }
.bk-hint.is-warn { color: var(--warn); }
.fb-help { margin: 6px 0 0; font-size: var(--fs-15); color: var(--muted); }
.sg-spec { margin: 8px 0 0; font-size: var(--fs-15); color: var(--muted); }
.sg-hint { margin: 12px 0 0; font-size: var(--fs-15); color: var(--muted); min-height: 1.2em; }
.sg-preview { text-align: center; }
.sg-sheet { max-width: 100%; max-height: 460px; width: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-3); background: #fff; }

/* ======================================================================
   Homepage
   ====================================================================== */
.home-band {
  position: relative;
  overflow: hidden;
  background: var(--hero);
  border-bottom: 1px solid var(--hero-line);
}
.home-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--hero-dot) 1.4px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 50% 45%, transparent 45%, #000 100%);
  mask-image: radial-gradient(ellipse 55% 75% at 50% 45%, transparent 45%, #000 100%);
  pointer-events: none;
}
.home-band-inner { position: relative; max-width: 860px; margin: 0 auto; padding: 64px 20px; }
.home-band h1 { margin: 0 0 12px; font-size: var(--fs-52); line-height: var(--lh-tight); letter-spacing: -0.02em; text-align: center; }
.home-band .lede { margin: 0 0 36px; font-size: var(--fs-20); text-align: center; color: var(--muted); }

.maker-label { display: block; font-size: var(--fs-18); font-weight: 700; margin-bottom: 8px; }
.maker-row { display: flex; gap: 8px; }
.maker-row input { flex: 1; min-width: 0; min-height: 58px; font-size: var(--fs-18); }
.maker-row .btn { min-height: 58px; padding: 0 28px; }

.detect { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detect-found {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 4px 0 0;
  /* people click this status line anyway, so a click shows the code (same as Generate QR Code) */
  background: none;
  border: 0;
  font-weight: 700;
  color: var(--accent-dark);
  cursor: pointer;
}
.detect-or { color: var(--muted); margin-left: 4px; }
#heroCanvas.flash { animation: hero-flash 0.9s ease-out; }
@keyframes hero-flash {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  30% { box-shadow: 0 0 0 8px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { #heroCanvas.flash { animation: none; outline: 3px solid var(--accent); } }
.chip-go { color: var(--muted); }
.detect-more { margin: 8px 0 0; }
.detect-more a { font-weight: 700; color: var(--accent-dark); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #ffffff;
  font: inherit;
  font-size: var(--fs-16);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }

.maker-out {
  margin-top: 28px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--hero-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.maker-out canvas { display: block; width: 200px; height: 200px; flex: none; image-rendering: pixelated; }
.maker-info { flex: 1 1 300px; }
.maker-info .qr-scan-badge { margin: 0 0 16px; max-width: none; }
.maker-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.maker-more { margin: 12px 0 0; font-size: var(--fs-16); color: var(--muted); }

.steps-band { border-bottom: 1px solid var(--border); }
.steps-inner { max-width: 1080px; margin: 0 auto; padding: 64px 20px 72px; }
.steps-inner h2 { margin: 0 0 8px; font-size: var(--fs-32); text-align: center; }
.steps-inner > p { margin: 0 0 40px; font-size: var(--fs-18); text-align: center; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.steps li { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.step-icon { width: 56px; height: 56px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.step-num { font-size: var(--fs-44); font-weight: 700; color: var(--hero-line); line-height: var(--lh-none); }
.steps h3 { margin: 0 0 6px; font-size: var(--fs-22); }
.steps p { margin: 0; color: var(--muted); }

/* the whole homepage is one main landmark, so screen readers land on the generator; the reading column keeps its width */
main.home { max-width: none; margin: 0; padding: 0; }
.home-main { max-width: 860px; margin: 0 auto; padding: 64px 20px 72px; }
.home-band .lede, .cta-band p { margin-left: auto; margin-right: auto; }
.home-main .grid-heading { font-size: var(--fs-32); }

.prose ul.tips, .tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.tips li { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 0; }
.tips li strong { display: block; color: var(--text); }
.tip-icon { flex: none; width: 44px; height: 44px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

.note-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--hero); border-radius: var(--radius-lg); margin: 0 0 20px; }
.note-box p { margin: 0; }
.note-icon { flex: none; width: 44px; height: 44px; border-radius: var(--radius-lg); background: #ffffff; color: var(--accent); display: flex; align-items: center; justify-content: center; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 0 20px; background: #ffffff; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--text); }
.faq details p { margin: 0 0 20px; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  body { font-size: var(--fs-17); }
  main { padding: 24px 16px 56px; }
  .nav-wrap { padding: 10px 16px; }
  .hero h1 { font-size: var(--fs-32); }
  .hero p { font-size: var(--fs-18); }
  .panel { padding: 20px 16px; }
  .generator-layout > .panel::before { font-size: var(--fs-20); margin-bottom: 20px; }
  #qrcode { min-width: 0; max-width: 100%; padding: 12px; }
  #qrcode canvas, #qrcode img { max-width: 100%; height: auto; }
  .qr-actions .btn { flex: 1 1 140px; }
  .prose { font-size: var(--fs-17); }
  .prose h2 { font-size: var(--fs-24); }
  .home-band-inner { padding: 40px 16px; }
  .home-band h1 { font-size: var(--fs-36); }
  .home-band .lede { font-size: var(--fs-18); margin-bottom: 24px; }
  .maker-row { flex-direction: column; }
  .maker-out { padding: 20px 16px; justify-content: center; }
  .maker-actions .btn { flex: 1 1 120px; }
  .steps-inner { padding: 48px 16px; }
  .steps-inner h2, .home-main .grid-heading { font-size: var(--fs-28); }
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-grid > .tool-card { padding: 16px; }
  .tool-card p { font-size: var(--fs-15); }
  .author-box { padding: 16px; gap: 12px; }
}

@media (max-width: 380px) {
  .tool-grid { grid-template-columns: 1fr; }
}

html, body { max-width: 100%; }
img, canvas, svg { max-width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* docs:start */
/* ---------- docs ---------- */
.docs-eyebrow { font-size: var(--fs-14); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-dark); margin: 0 0 8px; }
.docs-page h1 { font-size: var(--fs-40); line-height: var(--lh-tight); margin: 0 0 16px; letter-spacing: -0.02em; }
.docs-lead { font-size: var(--fs-20); color: var(--muted); margin: 0 0 20px; }
.docs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.docs-checked { font-size: var(--fs-15); color: var(--faint); margin: 0 0 20px; }
.docs-all { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); margin: 0 0 8px; background: var(--card); }
.docs-all > summary { cursor: pointer; font-weight: 700; padding: 16px 20px; color: var(--text); }
.docs-all-list { padding: 0 20px 16px; columns: 2 220px; column-gap: 32px; }
.docs-all-list h2 { font-size: var(--fs-13); text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 12px 0 6px; break-after: avoid; }
.docs-all-list ul { list-style: none; margin: 0; padding: 0; }
.docs-all-list li { break-inside: avoid; }
.docs-all-list a { display: block; padding: 6px 10px; border-radius: var(--radius); color: var(--body); text-decoration: none; }
.docs-all-list a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.docs-all-list a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.docs-prose { max-width: none; }
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); margin: 24px 0; font-size: var(--fs-16); overflow: hidden; }
.spec dt, .spec dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.spec dt { font-weight: 700; background: var(--surface); color: var(--text); }
.spec dt:last-of-type, .spec dd:last-of-type { border-bottom: none; }
.field { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 20px 20px; margin: 0 0 16px; }
.prose .field h3 { margin: 0 0 4px; font-size: var(--fs-18); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.field .tag { font-size: var(--fs-13); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: var(--radius); background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.field .tag.req { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--hero-line); }
.prose .field p { margin: 6px 0 0; }
.prose .field ul { margin: 8px 0 0; }
.payload-label { font-weight: 700; margin: 20px 0 6px !important; }
pre.payload { font-family: var(--mono); font-size: var(--fs-15); background: var(--navy); color: #e6f4f1; border-radius: var(--radius-lg); padding: 16px 16px; overflow-x: auto; margin: 0 0 20px; line-height: var(--lh-relaxed); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.payload .k { color: var(--accent-bright); }
.docs-warn { border-radius: var(--radius-lg); padding: 16px 20px; margin: 0 0 20px; background: var(--warn-soft); border: 1px solid var(--warn-line); }
.prose .docs-warn p { margin: 0; color: var(--warn-text); }
.docs-warn strong { display: block; margin-bottom: 2px; }
.docs-badges .qr-scan-badge { margin: 0 0 10px; }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.docs-pager a { display: block; padding: 16px 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); font-weight: 700; }
.docs-pager a:hover { border-color: var(--accent); }
.docs-pager a span { display: block; font-size: var(--fs-14); font-weight: 400; color: var(--faint); }
.docs-next { text-align: right; }
.docs-index-group { margin: 32px 0 0; }
.docs-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.docs-index-grid a { display: block; padding: 16px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); }
.docs-index-grid a:hover { border-color: var(--accent); }
.docs-index-grid strong { display: block; }
.docs-index-grid span { display: block; font-size: var(--fs-15); color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) {
  .docs-page h1 { font-size: var(--fs-32); }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dt { border-bottom: none; padding-bottom: 2px; }
  .docs-pager { grid-template-columns: minmax(0, 1fr); }
  .docs-next { text-align: left; }
}
/* ---------- docs layout: side menu, content, "On this page" rail ---------- */
.docs-shell { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: 270px minmax(0, 1fr) 230px; align-items: start; }
.docs-shell > main.docs-page { width: 100%; max-width: 820px; margin: 0 auto; padding: 32px 40px 72px; box-sizing: border-box; }
.docs-side { border-right: 1px solid var(--border); background: var(--surface); align-self: stretch; }
.docs-side-inner { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 24px 16px 40px 20px; box-sizing: border-box; }
.docs-filter { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px; margin: 0 0 16px; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--muted); font-weight: 400; }
.docs-filter input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; font: inherit; font-size: var(--fs-16); background: transparent; color: var(--text); outline: none; box-shadow: none; }
.docs-filter:focus-within { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 1px; }
.docs-side-nav h2 { margin: 20px 0 4px; padding: 0 10px; font-size: var(--fs-13); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.docs-side-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-side-nav a { display: block; padding: 6px 10px; border-radius: var(--radius); color: var(--body); text-decoration: none; font-size: var(--fs-16); line-height: var(--lh-normal); }
.docs-side-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.docs-side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.docs-side-home { font-weight: 700; color: var(--text) !important; }
/* the rail must run the full height of the page, or its sticky inner has nowhere to stick */
.docs-rail { align-self: stretch; }
.docs-rail-inner { position: sticky; top: 0; padding: 32px 20px 40px 8px; }
.docs-rail-title { margin: 0 0 10px; font-size: var(--fs-13); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.docs-rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.docs-rail ol a { display: block; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: var(--fs-15); line-height: var(--lh-normal); }
.docs-rail ol a:hover { color: var(--text); }
.docs-rail ol a[aria-current="location"] { border-left-color: var(--accent); color: var(--accent-dark); font-weight: 700; }
.docs-try { margin-top: 28px; padding: 16px; background: var(--hero); border-radius: var(--radius-lg); }
.docs-try p { margin: 0 0 10px; font-weight: 700; color: var(--text); }
.docs-try .btn { width: 100%; font-size: var(--fs-15); }
.docs-fix { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--fs-16); }

/* wide screens: the side menu and rail replace the in-page lists */
@media (min-width: 1181px) {
  .docs-shell .docs-all, .docs-shell .prose > .toc { display: none; }
}
@media (max-width: 1180px) {
  .docs-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .docs-rail { display: none; }
  .docs-shell .docs-all { display: none; }
}
@media (max-width: 900px) {
  .docs-shell { display: block; }
  .docs-side { display: none; }
  .docs-shell .docs-all { display: block; }
  .docs-shell > main.docs-page { padding: 24px 16px 56px; }
}

/* copy button on code examples */
.payload-wrap { position: relative; }
.payload-wrap pre.payload { padding-right: 84px; }
.copy-btn { position: absolute; top: 8px; right: 8px; min-height: 32px; padding: 0 12px; border: 1px solid var(--navy-line); border-radius: var(--radius); background: var(--navy-2); color: var(--on-navy); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.copy-btn:hover { border-color: var(--accent-bright); }
.copy-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- docs home ---------- */
.docs-hero { background: var(--hero); border-bottom: 1px solid var(--hero-line); }
.docs-hero-inner { max-width: 1040px; margin: 0 auto; padding: 32px 20px 52px; }
.docs-hero h1 { margin: 0 0 10px; font-size: var(--fs-44); line-height: var(--lh-tight); letter-spacing: -0.02em; }
.docs-hero .docs-lead { max-width: 36em; margin-bottom: 24px; }
.docs-search { display: flex; align-items: center; gap: 12px; max-width: 640px; height: 58px; padding: 0 12px 0 20px; background: #fff; border: 1.5px solid var(--input-border); border-radius: var(--radius-lg); color: var(--muted); font-weight: 400; margin: 0; }
.docs-search input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; font: inherit; font-size: var(--fs-18); background: transparent; color: var(--text); outline: none; box-shadow: none; }
.docs-search:focus-within { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 1px; }
.docs-search kbd { font-family: var(--mono); font-size: var(--fs-14); border: 1px solid var(--border-strong); border-radius: 3px; padding: 0 8px; color: var(--muted); }
main.docs-home { max-width: 1040px; padding-top: 40px; }
.docs-home h2 { font-size: var(--fs-28); margin: 56px 0 6px; }
.docs-sub { margin: 0 0 20px; color: var(--muted); }
.docs-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.docs-task { display: flex; align-items: center; gap: 16px; padding: 20px 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); text-decoration: none; color: var(--body); background: #fff; }
.docs-task:hover { border-color: var(--accent); color: var(--body); }
.docs-task .icon { flex: none; width: 52px; height: 52px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.docs-task .icon svg { width: 28px; height: 28px; }
.docs-task > span:nth-child(2) { flex: 1; min-width: 0; }
.docs-task strong { display: block; font-size: var(--fs-18); line-height: var(--lh-snug); color: var(--text); }
.docs-task strong + span { font-size: var(--fs-15); color: var(--muted); }
.docs-task-go { font-size: var(--fs-22); font-weight: 700; color: var(--accent); }
.docs-more { margin: 16px 0 0; color: var(--muted); }
.docs-trust { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 20px 24px; background: var(--success-soft); border: 1px solid var(--success-line); border-radius: var(--radius-lg); }
.docs-trust svg { flex: none; }
.docs-trust > div { flex: 1 1 380px; }
.docs-trust strong { display: block; font-size: var(--fs-18); color: var(--text); }
.docs-trust a { font-weight: 700; }
.docs-words { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.docs-words a { display: block; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--body); }
.docs-words a:hover { border-color: var(--accent); color: var(--body); }
.docs-word-art { display: flex; height: 140px; align-items: center; justify-content: center; background: var(--surface); }
.docs-words strong { display: block; padding: 16px 20px 0; font-size: var(--fs-18); color: var(--text); }
.docs-words strong + span { display: block; padding: 2px 20px 16px; font-size: var(--fs-15); color: var(--muted); }
.docs-duo { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.docs-duo > div { padding: 24px 24px; border-radius: var(--radius-lg); }
.docs-start { background: var(--surface); border: 1px solid var(--border); }
.docs-unsure { background: var(--hero); }
.docs-home .docs-duo h2 { margin: 0 0 10px; font-size: var(--fs-20); }
.docs-start ol { margin: 0; padding-left: 24px; line-height: var(--lh-loose); }
.docs-unsure p { margin: 0 0 16px; color: var(--muted); }
.docs-experts { margin-top: 56px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.docs-experts > summary { cursor: pointer; padding: 20px 24px; font-size: var(--fs-20); font-weight: 700; color: var(--text); }
.docs-experts .table-wrap { margin: 0 24px 24px; }
.docs-experts td:first-child a { font-weight: 700; color: var(--text); }
.docs-experts code { font-family: var(--mono); font-size: var(--fs-14); background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; }
.docs-az-list { columns: 3 220px; column-gap: 32px; }
.docs-az-list h2 { margin: 0 0 6px !important; font-size: var(--fs-13) !important; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); break-after: avoid; }
.docs-az-list ul { list-style: none; margin: 0 0 20px; padding: 0; }
.docs-az-list li { break-inside: avoid; padding: 4px 0; }
@media (max-width: 760px) {
  .docs-hero h1 { font-size: var(--fs-32); }
  .docs-tasks, .docs-words, .docs-duo { grid-template-columns: 1fr; }
  .docs-task { padding: 16px 16px; }
}

/* docs home footer row: fix link on the left, last checked date on the right */
.docs-home-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: var(--fs-16); color: var(--muted); }

/* "/ Docs" beside the logo on docs pages */
.logo-sep { color: var(--navy-line); font-size: var(--fs-22); line-height: var(--lh-none); margin: 0 -8px; }
.logo-section { color: #ffffff; font-weight: 700; font-size: var(--fs-18); text-decoration: none; }
.logo-section:hover { color: var(--accent-bright); }
/* keep "qrotto / Docs" together; the free space goes after it */
.logo-section { margin-right: auto; }

/* the suggestion list needs no dropdown arrow inside a search box */
.docs-search input::-webkit-calendar-picker-indicator,
.site-search input::-webkit-calendar-picker-indicator { display: none !important; }
.docs-search input { text-overflow: ellipsis; }
/* docs:end */

/* file pickers: the browser's grey button, restyled as a secondary button */
input[type="file"] { font: inherit; font-size: var(--fs-16); color: var(--muted); width: 100%; min-width: 0; }  /* min-width 0 lets it shrink in a narrow panel */
input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 12px;
  padding: 0 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); }

/* =====================================================================
   Release 2: one studio, many doors
   ===================================================================== */

/* ---------- Create menu: every type, grouped in columns ---------- */
.nav-panel { grid-template-columns: repeat(4, minmax(175px, 1fr)); min-width: 780px; gap: 0 10px; padding: 16px; }
/* Create sits near the right of the bar, so the wide panel opens towards the left */
@media (min-width: 1121px) { .nav-drop > .nav-panel { left: auto; right: 0; } }
.nav-col { display: flex; flex-direction: column; }
.nav-col .nav-group { padding: 10px 10px 4px; }
.nav-col .nav-group:first-child { padding-top: 2px; }
@media (max-width: 1120px) {
  .nav-panel { grid-template-columns: 1fr 1fr; min-width: 0; }
}
@media (max-width: 420px) {
  .nav-panel { grid-template-columns: 1fr; }
}

/* ---------- phones: search sits behind an icon so the tool comes first ---------- */
.search-toggle { display: none; }
@media (max-width: 760px) {
  .js .search-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto;
    background: none; border: 1px solid var(--navy-line); border-radius: var(--radius); color: #ffffff; cursor: pointer;
  }
  .js .search-toggle:hover { border-color: var(--accent-bright); }
  .js .site-search { display: none; }
  .js .site-header.search-open .site-search { display: flex; }
}

/* ---------- doors: the type rail beside the tool ---------- */
main.door { max-width: 1240px; }
main.door .hero { margin-bottom: 24px; }
.type-rail { margin: 0 0 24px; }
.rail-groups {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 8px 8px 12px;
}
.rail-grp ul { list-style: none; margin: 0; padding: 0; }
.rail-h {
  margin: 12px 10px 4px;
  font-size: var(--fs-13);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
}
.rail-grp:first-child .rail-h { margin-top: 4px; }
.ti {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--body);
  text-decoration: none;
  font-size: var(--fs-16);
  line-height: var(--lh-snug);
  position: relative;
}
.ti svg { flex: none; color: var(--faint); }
.ti:hover { background: var(--surface); color: var(--text); }
.ti[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.ti[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 5px; bottom: 5px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.ti[aria-current="page"] svg { color: var(--accent); }
.ti-new { margin-left: auto; font-size: var(--fs-12); font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.ti[aria-current="page"] .ti-new { background: #ffffff; }
.rail-tiles { display: none; }

@media (min-width: 1100px) {
  main.door {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    column-gap: 36px;
    align-items: start;
  }
  main.door > * { grid-column: 2; min-width: 0; }
  main.door > .type-rail {
    grid-column: 1;
    grid-row: 1 / span 80;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: 0;
  }
  main.door > article, main.door > .prose, main.door > .article-meta, main.door > .content-block { max-width: 820px; }
  /* form and code side by side, the code stays in view while the form is filled in */
  main.door .generator-layout:has(> .panel.qr-output):not(:has(> :nth-child(3))) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
  main.door .generator-layout:has(> .panel.qr-output):not(:has(> :nth-child(3))) > .panel.qr-output { position: sticky; top: 16px; }
}

@media (max-width: 1099px) {
  .rail-groups { display: none; }
  .rail-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 4px 10px;
    min-height: 66px;
    border: 1px solid var(--border-strong);
    background: var(--card);
    border-radius: var(--radius-lg);
    color: var(--body);
    text-decoration: none;
    font-size: var(--fs-14);
    text-align: center;
    line-height: var(--lh-tight);
  }
  .tile svg { color: var(--faint); }
  .tile:hover { border-color: var(--accent); color: var(--text); }
  .tile[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
  .tile[aria-current="page"] svg { color: var(--accent); }
  .rail-all {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    padding: 10px;
    border: 1px dashed var(--accent);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--accent-dark);
    font: inherit; font-weight: 700;
    cursor: pointer;
  }
  .rail-all:hover { background: var(--accent-soft); }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .rail-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* the full list in a sheet on phones */
dialog.type-sheet {
  border: 0; padding: 0;
  width: 100%; max-width: 560px; max-height: 84vh;
  border-radius: 16px 16px 0 0;
  margin: auto auto 0;
  box-shadow: var(--shadow-up);
  color: var(--body);
}
dialog.type-sheet::backdrop { background: rgba(14, 17, 32, 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px; position: sticky; top: 0; background: var(--card); z-index: var(--z-raised); }
.sheet-head b { font-size: var(--fs-18); color: var(--text); }
.sheet-x { border: 0; background: var(--surface); border-radius: 999px; width: 44px; height: 44px; font-size: var(--fs-24); line-height: var(--lh-none); cursor: pointer; color: var(--text); }
dialog.type-sheet .rail-groups { display: block; border: 0; padding: 0 10px 20px; }
dialog.type-sheet .ti { padding: 10px 10px; font-size: var(--fs-16); }

/* a slim bar keeps the type and Change in reach after scrolling (phones) */
.type-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: var(--z-sticky);
  display: none; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
}
.type-bar-name { flex: 1; font-weight: 700; color: var(--text); }
.type-bar button { min-height: 40px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 6px 16px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 1099px) { .type-bar.show { display: flex; } }

/* what the visitor brought along, and the next steps under a code */
.carry-note { margin: 0 0 16px; background: var(--success-soft); border: 1px solid var(--success-line); color: var(--success); border-radius: var(--radius); padding: 8px 12px; font-size: var(--fs-15); }
.next-steps { margin: 16px 0 0; font-size: var(--fs-16); color: var(--muted); text-align: center; }
.next-steps a { font-weight: 700; }

/* back to the tool from a long guide */
.back-to-tool {
  position: fixed; right: 16px; bottom: 16px; z-index: var(--z-float);
  display: none; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 16px;
  border: 0; border-radius: 999px;
  background: var(--navy); color: #ffffff;
  font: inherit; font-weight: 700;
  box-shadow: var(--shadow-3);
  cursor: pointer;
}
.back-to-tool.show { display: inline-flex; }
.back-to-tool:hover { background: var(--accent-dark); }
@media print { .type-rail, .type-bar, .back-to-tool { display: none !important; } }

/* ---------- release 2: smaller pieces ---------- */
.field-note { margin: 8px 0 0; font-size: var(--fs-15); color: var(--muted); }
#wifiPrivate::before { content: "\1F512\00A0"; }
.qr-empty { margin: 0; padding: 72px 20px; color: var(--faint); font-size: var(--fs-16); text-align: center; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); min-width: 220px; }
details.form-more { margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 16px; background: var(--surface); }
details.form-more > summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--text); }
details.form-more[open] > summary { padding-bottom: 4px; }
details.form-more .form-group { margin: 10px 0 16px; }
.tool-card-wide { grid-column: 1 / -1; background: var(--hero); border-color: var(--hero-line); }
.tool-card-wide:hover { border-color: var(--accent); }
section.merged { margin: 8px 0 0; }

/* QR code checker */
.panel.checker { padding: 24px; }
.ck-paste { margin: 24px 0 0; }
.ck-paste label { display: block; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.ck-result { margin: 24px 0 0; padding: 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--card); }
.ck-verdict { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--radius); font-weight: 700; font-size: var(--fs-17); }
.ck-verdict.ck-ok { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-line); }
.ck-verdict.ck-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); }
.ck-verdict.ck-info { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.ck-label { margin: 0 0 6px; font-size: var(--fs-14); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.ck-list { list-style: none; margin: 16px 0 0; padding: 0; }
.ck-list li { position: relative; padding: 8px 0 8px 32px; border-top: 1px solid var(--border); }
.ck-list li::before { position: absolute; left: 4px; top: 8px; font-weight: 700; }
.ck-list li.ck-ok::before { content: "\2713"; color: var(--success); }
.ck-list li.ck-warn::before { content: "!"; color: var(--warn); left: 9px; }
.ck-list li.ck-info::before { content: "i"; color: var(--accent-dark); left: 9px; font-style: italic; font-family: Georgia, serif; }
.ck-actions { margin: 16px 0 0; }
.ck-note { margin: 12px 0 0; font-size: var(--fs-15); color: var(--muted); }

/* ---------- homepage v3: every type in view ---------- */
.home-studio .type-rail { margin: 0 0 24px; }
.ti.is-detected, .tile.is-detected { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.ti.is-detected svg, .tile.is-detected svg { color: var(--accent); }
.tile.is-detected { border-color: var(--accent); }
@media (min-width: 1100px) {
  .home-studio {
    max-width: 1240px;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    column-gap: 40px;
    align-items: start;
    padding-top: 44px;
  }
  .home-studio > * { grid-column: 2; min-width: 0; }
  .home-studio > .type-rail { grid-column: 1; grid-row: 1 / span 20; margin: 0; position: relative; }
  .home-studio h1, .home-studio .lede { text-align: left; }
  .home-studio .lede { margin-bottom: 28px; }
}
.hero-style { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.hero-style-label { font-weight: 700; color: var(--text); margin-right: 4px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #ffffff; box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.swatch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.trust-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 20px 0 0; padding: 0; font-weight: 700; color: var(--text); }
.trust-strip li { display: inline-flex; align-items: center; gap: 6px; }
.trust-strip svg { color: var(--success); flex: none; }
@media (max-width: 1099px) {
  .home-studio .rail-tiles { margin-bottom: 4px; }
  .trust-strip { justify-content: center; }
}
/* homepage, wide screens: the type list in two columns so all 26 fit on the first screen */
@media (min-width: 1100px) {
  .home-studio { grid-template-columns: 400px minmax(0, 1fr); column-gap: 36px; }
  .home-studio .rail-groups { columns: 2; column-gap: 6px; padding: 8px 6px 10px; }
  .home-studio .rail-grp { break-inside: avoid; }
  .home-studio .ti { padding: 6px 8px; font-size: var(--fs-15); }
}

/* ---------- homepage v4: sections for teams ---------- */
.feature-band, .use-band, .cta-band { border-bottom: 1px solid var(--border); }
.use-band { background: var(--surface); }
.band-inner { max-width: 1180px; margin: 0 auto; padding: 64px 20px 72px; }
.band-inner > h2 { margin: 0 0 10px; font-size: var(--fs-32); text-align: center; color: var(--text); }
.band-lede { margin: 0 auto 36px; max-width: 760px; text-align: center; font-size: var(--fs-18); color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-card { display: flex; flex-direction: column; padding: 28px 24px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.feature-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-card h3 { margin: 0 0 6px; font-size: var(--fs-20); color: var(--text); }
.feature-card p { margin: 0 0 16px; color: var(--muted); flex: 1; }
.feature-card a { font-weight: 700; }
.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.use-card { padding: 24px 24px 20px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.use-card h3 { margin: 0 0 6px; font-size: var(--fs-20); color: var(--text); }
.use-card p { margin: 0 0 12px; color: var(--muted); }
.use-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.use-card li a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none; color: var(--accent-dark); font-weight: 700; font-size: var(--fs-15); background: var(--card); }
.use-card li a:hover { border-color: var(--accent); background: var(--accent-soft); }
.assure-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.assure-list li { position: relative; padding: 16px 16px 16px 48px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.assure-list li::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.cta-band { background: var(--navy); color: #ffffff; border-bottom: 0; }
.cta-band .band-inner { text-align: center; padding: 56px 20px 60px; }
.cta-band h2 { color: #ffffff; margin: 0 0 10px; font-size: var(--fs-32); }
.cta-band p { margin: 0 auto 24px; max-width: 680px; color: var(--on-navy-2); font-size: var(--fs-18); }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn-outline { background: transparent; color: #ffffff; border-color: var(--navy-line-2); }
.cta-band .btn-outline:hover { border-color: var(--accent-bright); }
@media (max-width: 900px) {
  .feature-grid, .use-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .feature-grid, .use-grid { grid-template-columns: 1fr; }
  .band-inner { padding: 48px 16px 56px; }
  .band-inner > h2, .cta-band h2 { font-size: var(--fs-28); }
}
.prose ul.assure-list { padding-left: 0; margin-left: 0; }

/* =====================================================================
   UX patterns pass: keyboard, feedback, readability
   ===================================================================== */
/* skip link: first stop for keyboard users, out of sight until focused */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: var(--z-skip); padding: 12px 20px; background: var(--card); color: var(--accent-dark); border: 2px solid var(--accent); border-radius: var(--radius-lg); font-weight: 700; text-decoration: none; transition: top var(--dur-1); }
.skip-link:focus { top: 12px; outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
main:focus, .home-band:focus { outline: none; }
/* the header search shows a clear ring when focused */
.site-search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-miss { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: var(--z-popover); font-size: var(--fs-15); color: var(--text); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: 0; }
.search-miss:not(:empty) { padding: 10px 12px; }
.site-search { position: relative; }
/* links that open a new tab */
a.ext-link::after { content: "\2197"; display: inline-block; margin-left: 2px; font-size: 0.85em; text-decoration: none; }
/* scrollable tables reachable by keyboard show where focus is */
[data-scrollable]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* a note after each download */
.toast { position: fixed; left: 50%; bottom: 20px; z-index: var(--z-toast); transform: translate(-50%, calc(100% + 40px)); max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--navy); color: #ffffff; font-weight: 700; box-shadow: var(--shadow-3); transition: transform var(--dur-2); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
/* comfortable targets in "on this page" lists */
.toc a { display: inline-block; padding: 4px 0; }
/* readable line length: about 70 characters */
.prose p, .prose li, .hero p, .band-lede { max-width: 72ch; }
.band-lede { margin-left: auto; margin-right: auto; }
/* phones: thumb-sized chips and colour buttons on the homepage */
@media (max-width: 640px) {
  .detect .chip { min-height: 44px; }
  .swatch { width: 40px; height: 40px; }
}
/* every paragraph in the page body keeps a readable measure; centred ones stay centred */
main p { max-width: 72ch; }
.steps-inner > p, .band-lede, .grid-sub { margin-left: auto; margin-right: auto; }
.home-main > .grid-sub { margin-left: 0; }
/* small inline links get a 24px tall hit area (WCAG 2.5.8) */
.breadcrumb a, .article-meta a, .docs-breadcrumb a, footer a { display: inline-block; padding: 4px 0; }
.author-box h3 a { display: inline-block; padding: 2px 0; }

/* ---------- developer page ---------- */
.api-demo { margin: 0 0 28px; }
.api-demo h2 { margin: 0 0 12px; font-size: var(--fs-20); }
.api-demo label { display: block; font-weight: 700; margin: 0 0 6px; }
.api-out { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 16px; }
.api-code svg { display: block; width: 220px; height: 220px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: #ffffff; }
.api-result { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; margin: 0; padding: 16px 16px; background: var(--navy); color: var(--on-navy); border-radius: var(--radius-lg); font-family: var(--mono); font-size: var(--fs-15); white-space: pre-wrap; }
.prose pre { background: var(--navy); color: var(--on-navy); padding: 16px 20px; border-radius: var(--radius-lg); overflow-x: auto; font-size: var(--fs-14); line-height: var(--lh-relaxed); }
.prose pre code { background: none; color: inherit; padding: 0; font-family: var(--mono); }

/* ---------- dark mode: follows the phone or computer setting ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text: #f1f3f8;
    --body: #d9dce6;
    --muted: #b6bbcb;
    --faint: #a0a5b8;
    --bg: #12151f;
    --surface: #181c28;
    --card: #1c2130;
    --border: #2a3043;
    --border-strong: #3a4158;
    --input-border: #7d849c;
    --accent: #2dd4bf;
    --accent-dark: #5eead4;
    --accent-soft: #123532;
    --hero: #121f22;
    --hero-line: #24463f;
    --success: #6fdc95;
    --success-soft: #11291b;
    --success-line: #2f6a45;
    --warn: #f6bf5f;
    --warn-soft: #2d2412;
    --danger: #ff9b9b;
    --danger-soft: #331619;
    --focus: #5eead4;
    --warn-line: #5a4318;
    --danger-line: #5c2a2e;
    --warn-text: #f3dcae;
    --hero-dot: rgba(94, 234, 212, 0.16);
  }

  /* fields and light cards turn dark with the page */
  input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="password"],
  input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"],
  textarea, select, input[type="color"], input[type="file"]::file-selector-button,
  .btn-outline, .radio-row label, .chip, .faq details, .docs-filter, .docs-search, .docs-task,
  .note-icon, .maker-out, .bulk-item, .docs-side, .ti[aria-current="page"] .ti-new { background: var(--card); }
  .btn-outline:hover { background: var(--surface); color: var(--text); border-color: var(--text); }

  /* filled buttons keep the deep teal, so their white text stays easy to read */
  .btn, .tool-card:hover .icon, .author-avatar { background: #0f766e; }
  .btn:hover, .back-to-tool:hover { background: #0b5a54; }
  /* outline buttons stay outlined (they share the .btn class) */
  .btn.btn-outline { background: var(--card); }
  .btn.btn-outline:hover { background: var(--surface); }
  .qr-scan-badge::before { color: #0e1120; }
  .assure-list li::before { background-color: #1d6b34; }

  /* a code previewed dark on dark looks inverted and many scanners refuse that, so previews stay on white */
  .ds-preview, .sg-preview canvas, .sg-preview img { background: #ffffff; }
  #heroCanvas { background: #ffffff; border-radius: var(--radius); }

  /* navy panels need an edge on a dark page */
  .prose pre, pre.payload, .api-result, .toast { border: 1px solid var(--border-strong); }
  .cta-band { background: #0b0d15; border-top: 1px solid var(--border); }
  .site-header { border-bottom: 1px solid var(--border); }

  /* tables that scroll sideways fade into the page colour */
  .table-wrap {
    background:
      linear-gradient(to right, var(--bg) 30%, rgba(18, 21, 31, 0)) left center / 32px 100% no-repeat local,
      linear-gradient(to left, var(--bg) 30%, rgba(18, 21, 31, 0)) right center / 32px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.6), transparent) left center / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.6), transparent) right center / 12px 100% no-repeat scroll,
      var(--bg);
  }

  .step-num { color: #2f6a60; }
  .lb-overlay img { background: #ffffff; }
  /* the empty preview sits on the white code box */
  .qr-empty { color: #5b6072; border-color: #d0d3de; }
}

/* ---------- brand font loading ---------- */
/* Arial sized to the brand font's measured width and height, so text does not move when the font arrives */
@font-face { font-family: "Atkinson Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); font-weight: 400; size-adjust: 98.42%; ascent-override: 96.53%; descent-override: 29.47%; line-gap-override: 0%; }
@font-face { font-family: "Atkinson Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold"); font-weight: 700; size-adjust: 99.79%; ascent-override: 95.2%; descent-override: 29.06%; line-gap-override: 0%; }
/* the wordmark waits for its own font (preloaded) rather than flashing a stand-in */
@font-face { font-family: "QRotto Wordmark"; font-style: normal; font-weight: 700; font-display: block; src: url(fonts/atkinson-hyperlegible-700-latin.woff2) format("woff2"); }
.logo-text { font-family: "QRotto Wordmark", var(--font); }

/* ---------- one focus style ---------- */
/* every control gets the same 3px ring; on navy surfaces it switches to the bright teal so it stays at least 3:1 */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus-visible, .home-band:focus-visible { outline: none; }
/* (a ring is drawn just outside the control, so this follows the surface the control sits on) */
.site-header, .cta-band, .lb-overlay, .copy-btn { --focus: #5eead4; }

/* ---------- Windows high contrast (forced colours) ---------- */
@media (forced-colors: active) {
  .btn, .chip, .swatch, .ti-new, .copy-btn, .back-to-tool { border: 2px solid ButtonText; }
  .swatch, .logo-dot, #heroCanvas, .api-code svg { forced-color-adjust: none; }
  .ti[aria-current="page"] { outline: 2px solid Highlight; outline-offset: 2px; }
  .qr-scan-badge::before { border: 2px solid CanvasText; }
}

/* ---------- small text never below 12px ---------- */
.ti-new { font-size: var(--fs-12); }

/* ---------- print: the content and the code, without the site around them ---------- */
@media print {
  .site-header, .skip-link, .site-search, .search-toggle, .nav-toggle, footer, .toast, .cta-band, .type-sheet, .rail-all, .next-steps, .maker-actions, .hero-style, .maker-more, .qr-actions, .copy-btn, .detect, .trust-strip { display: none !important; }
  body, main, .panel, .content-block, .faq details { background: #ffffff !important; color: #000000 !important; box-shadow: none !important; }
  a { color: #000000 !important; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  h1, h2, h3 { break-after: avoid; }
  figure, table, pre, .panel, .faq details, #qrcode, .maker-out { break-inside: avoid; }
  details > *:not(summary) { display: block !important; }
  details::details-content { content-visibility: visible !important; }
  main { max-width: none; padding: 0; }
  @page { margin: 16mm; }
}

/* ---------- API page: the demo keeps its space while it draws ---------- */
.api-code { flex: none; width: 222px; height: 222px; }
.api-result { min-height: 7.6em; }
/* date and time fields move focus into their own parts, so the ring follows focus-within */
input[type="date"]:focus-within, input[type="time"]:focus-within, input[type="datetime-local"]:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
.footer-legal { margin: 8px 0 0; font-size: var(--fs-13); color: var(--faint); }
/* headings wrap into even lines instead of leaving one word alone; long paragraphs avoid a lone last word */
h1, h2, h3 { text-wrap: balance; }
.prose p, .hero p { text-wrap: pretty; }
