/* ==========================================================================
   Particle 64 / Amplify shared stylesheet
   Base tokens and components match the Amplify app (amplifyvote.com):
   navy #193155 primary, red #ad1d2e warn, gold #e0b274 accent, Roboto.
   ========================================================================== */

:root {
  --navy: #193155;
  --navy-dark: #132542;
  --navy-deep: #0d1a2f;
  --red: #ad1d2e;
  --red-dark: #9a0000;
  --gold: #e0b274;
  --green: #3db15a;
  --p64-orange: #c9481c;

  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #eeeeee;
  --border: #e0e0e0;
  --text: #1f2937;
  --text-muted: #5b6575;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #c5cede;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-1: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
  --shadow-2: 0 3px 3px -2px rgba(0,0,0,.2), 0 3px 4px 0 rgba(0,0,0,.14), 0 1px 8px 0 rgba(0,0,0,.12);
  --shadow-4: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12);

  --max: 1120px;
  --gutter: 16px;
  --header-h: 64px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--red); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); font-weight: 500; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.material-icons { vertical-align: middle; line-height: 1; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--surface); color: var(--navy); padding: 8px 16px; border-radius: var(--radius);
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: var(--navy); color: var(--text-on-dark); }
.section-dark h2, .section-dark h3 { color: var(--text-on-dark); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }
.section-dark .section-head p { color: var(--text-on-dark-muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 8px;
}
.section-dark .eyebrow, .hero .eyebrow { color: var(--gold); }

/* ---------- Header (mirrors the app's navy mat-toolbar) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--text-on-dark);
  box-shadow: var(--shadow-2);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-on-dark); text-decoration: none; font-size: 1.25rem; font-weight: 500; }
.brand:hover { color: var(--text-on-dark); }
.brand { flex: none; }
/* flex: none + aspect-ratio stop iOS Safari from squeezing logos inside flex rows */
.brand img { flex: none; width: 36px; height: 36px; object-fit: contain; }
.brand img.brand-logo-wide { width: auto; height: 30px; aspect-ratio: 600 / 113; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--text-on-dark); text-decoration: none; padding: 8px 12px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 500;
}
.site-nav a:hover { background: rgba(255,255,255,.1); color: var(--text-on-dark); }
.site-nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--text-on-dark); cursor: pointer;
  padding: 8px; border-radius: var(--radius);
}
.nav-toggle .material-icons { font-size: 28px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: var(--navy-dark);
    padding: 8px var(--gutter) 16px; box-shadow: var(--shadow-2);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons (mat-raised-button look) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 500; font-size: .95rem; letter-spacing: .02em;
  padding: 10px 22px; min-height: 44px; border-radius: var(--radius); border: 0;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow-1);
  transition: box-shadow .2s, background-color .2s, transform .1s;
}
.btn:hover { box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(224,178,116,.18), transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: var(--text-on-dark);
  padding: 96px 0 104px;
}
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--text-on-dark-muted); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: 28px; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-4); transform: translateY(-2px); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-muted); }
.icon-badge {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(25,49,85,.08); color: var(--navy); margin-bottom: 16px;
}
.icon-badge .material-icons { font-size: 28px; }
.icon-badge.red { background: rgba(173,29,46,.1); color: var(--red); }
.icon-badge.gold { background: rgba(224,178,116,.25); color: #8a5a17; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.check-list li::before {
  content: 'check_circle'; font-family: 'Material Icons'; position: absolute; left: 0; top: 1px;
  color: var(--green); font-size: 22px; line-height: 1;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 24px; text-align: center; }
.stat-num { font-size: 2.4rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.stat-label { color: var(--text-on-dark-muted); font-size: .95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px;
  background: var(--surface-alt); color: var(--navy); font-size: .9rem; font-weight: 500;
}
.section-dark .chip { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Contact form (mat-form-field outline look) ---------- */
.contact-wrap { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.contact-info .contact-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.contact-info .contact-line .material-icons { color: var(--gold); }
.form-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: 28px; color: var(--text); }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #b9b9b9; border-radius: var(--radius); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--text); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.field-error { color: var(--red); font-size: .8rem; margin-top: 4px; min-height: 1em; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: 4px 0 18px; min-height: 65px; }
.form-status { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.success { background: #e6f4ea; color: #1e5c2e; border-left: 4px solid var(--green); }
.form-status.error { background: #fdecee; color: #7d1420; border-left: 4px solid var(--red); }
.form-note { font-size: .8rem; color: var(--text-muted); margin-top: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--text-on-dark-muted); padding: 40px 0; font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--text-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer img { flex: none; object-fit: contain; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}


/* ==========================================================================
   ampdocs.p64.io specific: docs layout, sidebar, search, content blocks
   ========================================================================== */
.brand img.brand-logo-wide { width: 149px; height: 28px; }
.brand-docs { font-size: 1rem; font-weight: 500; color: var(--gold); padding-left: 10px; border-left: 1px solid rgba(255,255,255,.3); }

/* Header search */
.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search input {
  width: 100%; font: inherit; font-size: .95rem; color: #fff; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2); border-radius: 22px; padding: 8px 44px 8px 40px;
}
.header-search input::placeholder { color: var(--text-on-dark-muted); }
.header-search input:focus { outline: none; background: #fff; color: var(--text); border-color: #fff; }
.header-search input:focus::placeholder { color: var(--text-muted); }
.header-search > .material-icons { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-on-dark-muted); font-size: 20px; pointer-events: none; }
.header-search input:focus ~ .material-icons { color: var(--text-muted); }
.header-search kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: inherit; font-size: .75rem;
  color: var(--text-on-dark-muted); background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; padding: 0 6px; pointer-events: none;
}
.header-search input:focus ~ kbd { display: none; }

.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; background: var(--surface); color: var(--text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-4); max-height: min(70vh, 520px); overflow-y: auto; padding: 6px;
}
.search-results[hidden] { display: none; }
.search-result {
  display: block; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--text);
}
.search-result:hover, .search-result.active { background: rgba(25,49,85,.07); color: var(--text); }
.search-result-path { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.search-result-title { font-weight: 500; color: var(--navy); }
.search-result-snippet { font-size: .85rem; color: var(--text-muted); line-height: 1.45; }
.search-result mark { background: rgba(224,178,116,.45); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-empty { padding: 14px; color: var(--text-muted); font-size: .9rem; }

.header-links { display: flex; align-items: center; gap: 4px; flex: none; }
.header-links a { color: var(--text-on-dark); text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-size: .95rem; font-weight: 500; }
.header-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; border-radius: var(--radius); flex: none; }
.menu-toggle .material-icons { font-size: 26px; }

@media (max-width: 960px) {
  .header-links .hide-md { display: none; }
}
@media (max-width: 760px) {
  .header-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand-docs { display: none; }
  .header-search kbd { display: none; }
  .brand img.brand-logo-wide { width: 104px; height: 20px; }
  .site-header .container { gap: 10px; }
  .header-search input { padding-right: 12px; }
}

/* Hero */
.docs-hero {
  background: radial-gradient(1000px 400px at 85% -20%, rgba(224,178,116,.18), transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: #fff; padding: 56px 0 64px;
}
.docs-hero .eyebrow { color: var(--gold); }
.docs-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.docs-hero .lead { color: var(--text-on-dark-muted); font-size: clamp(1rem, 2vw, 1.2rem); max-width: 680px; }
.paths { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 32px; }
.path {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius-lg); text-decoration: none;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #fff; transition: background .2s, transform .2s;
}
.path:hover { background: rgba(255,255,255,.13); color: #fff; transform: translateY(-2px); }
.path .material-icons { color: var(--gold); font-size: 28px; }
.path strong { display: block; font-weight: 500; font-size: 1.05rem; }
.path span.desc { display: block; color: var(--text-on-dark-muted); font-size: .9rem; line-height: 1.45; }

/* Two-column docs layout */
.docs-layout {
  display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 48px;
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
}
.sidebar {
  position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 28px 8px 40px 0; font-size: .92rem; overscroll-behavior: contain;
}
.sidebar-group { margin-bottom: 18px; }
.sidebar-group > a {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none; padding: 4px 10px;
}
.sidebar-group > a .material-icons { font-size: 18px; color: var(--navy); }
.sidebar-group > a:hover { color: var(--navy); }
.sidebar ul { list-style: none; margin: 4px 0 0; padding: 0; }
.sidebar li a {
  display: block; padding: 5px 10px 5px 36px; color: var(--text); text-decoration: none; border-radius: var(--radius);
  border-left: 3px solid transparent; line-height: 1.35;
}
.sidebar li a:hover { background: rgba(25,49,85,.06); color: var(--navy); }
.sidebar li a.active { background: rgba(25,49,85,.08); color: var(--navy); font-weight: 500; border-left-color: var(--red); }
.sidebar-backdrop { display: none; }

@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar {
    /* align-self: auto undoes the desktop "start", which Chrome applies to fixed boxes and which pins the panel at y=0 */
    position: fixed; top: var(--header-h); left: 0; bottom: 0; height: auto; align-self: auto; width: min(320px, 86vw); z-index: 45;
    background: var(--surface); box-shadow: var(--shadow-4); padding: 20px 12px 40px; transform: translateX(-105%); transition: transform .25s ease;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,.35); z-index: 44; }
  .menu-toggle { display: inline-flex; }
}

/* Content */
.docs-content { padding: 40px 0 80px; min-width: 0; max-width: 820px; }
.doc-part { padding-top: 8px; margin-bottom: 56px; }
.doc-part > .part-head {
  display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--border); padding-bottom: 14px; margin-bottom: 8px;
}
.part-head .icon-badge { margin: 0; flex: none; }
.part-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.part-head p { margin: 2px 0 0; color: var(--text-muted); }
.doc-section { padding-top: 28px; }
.doc-section h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: .6em; display: flex; align-items: baseline; gap: 8px; }
.doc-section h4 { font-size: 1.05rem; font-weight: 500; margin: 1.4em 0 .5em; }
.anchor { opacity: 0; text-decoration: none; color: var(--text-muted); font-weight: 400; font-size: .9em; }
.doc-section h3:hover .anchor, .anchor:focus { opacity: 1; }
.docs-content ul, .docs-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.docs-content li { margin-bottom: .35em; }
.docs-content li > ul, .docs-content li > ol { margin: .35em 0 0; }

/* Who can do this */
.who { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.who span {
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 10px; padding: 2px 9px;
  background: rgba(25,49,85,.08); color: var(--navy);
}
.who span.plan { background: rgba(224,178,116,.28); color: #7a4f12; }

/* UI labels as they appear in the app */
.ui {
  display: inline-flex; align-items: center; gap: 3px; font-weight: 500; font-size: .92em; color: var(--navy);
  background: #eef1f6; border: 1px solid #d7dde8; border-radius: 4px; padding: 0 6px; white-space: nowrap; line-height: 1.5;
}
.ui .material-icons { font-size: 1.05em; }
kbd { font-family: inherit; font-size: .85em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; }

/* Numbered steps */
ol.steps-list { counter-reset: s; list-style: none; padding-left: 0; }
ol.steps-list > li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: .8em; }
ol.steps-list > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center;
}

/* Callouts */
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); margin: 0 0 1.2em; border-left: 4px solid; }
.callout > .material-icons { flex: none; margin-top: 1px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout.tip { background: #e8f4ec; border-color: var(--green); }
.callout.tip > .material-icons { color: #2d8a47; }
.callout.note { background: #eaf0f8; border-color: var(--navy); }
.callout.note > .material-icons { color: var(--navy); }
.callout.warn { background: #fdf3e4; border-color: #d08a1b; }
.callout.warn > .material-icons { color: #b5730c; }
.callout.usecase { background: var(--surface); border-color: var(--gold); box-shadow: var(--shadow-1); }
.callout.usecase > .material-icons { color: #b5730c; }
.callout.usecase { scroll-margin-top: calc(var(--header-h) + 16px); }
.callout.danger { background: #fdecee; border-color: var(--red); }
.callout.danger > .material-icons { color: var(--red); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-lg); box-shadow: var(--shadow-1); background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap th { background: #f3f5f9; color: var(--navy); font-weight: 500; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child { font-weight: 500; }
.yes { color: #2d8a47; } .no { color: #9aa3b2; }

/* Definition grid */
dl.terms { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 10px 20px; margin: 0 0 1.2em; }
dl.terms dt { font-weight: 500; color: var(--navy); }
dl.terms dd { margin: 0; }
@media (max-width: 560px) { dl.terms { grid-template-columns: 1fr; gap: 2px; } dl.terms dd { margin-bottom: 10px; } }

/* Concept cards */
.concepts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 0 0 1.4em; }
.concept { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 16px; }
.concept strong { display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 500; margin-bottom: 4px; }
.concept strong .material-icons { color: var(--red); font-size: 20px; }
.concept p { margin: 0; font-size: .92rem; color: var(--text-muted); }

/* Flow diagram */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 1.4em; }
.flow span.node { background: var(--navy); color: #fff; padding: 6px 12px; border-radius: 16px; font-size: .88rem; font-weight: 500; }
.flow span.node.alt { background: var(--surface-alt); color: var(--navy); }
.flow .material-icons { color: var(--text-muted); font-size: 18px; }

/* Legend swatches */
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); }

/* Back to top + footer helpfulness */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; box-shadow: var(--shadow-2); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.help-band { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.help-band h3 { margin: 0 0 4px; }
.help-band p { margin: 0; color: var(--text-muted); }

/* Search hit flash when jumping to a section */
@keyframes flash { from { background: rgba(224,178,116,.35); } to { background: transparent; } }
.doc-section.flash { animation: flash 1.6s ease-out; border-radius: var(--radius); }

/* Quick starts, checklists and cheat sheets */
.quick-grid, .cheat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin: 0 0 1.4em; }
.quick-card, .cheat { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 18px 20px; scroll-margin-top: calc(var(--header-h) + 16px); }
.quick-card h4, .cheat h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; }
.quick-card h4 .material-icons, .cheat header > .material-icons { color: var(--red); font-size: 22px; }
.quick-more { margin: 10px 0 0; font-size: .9rem; color: var(--text-muted); }
ol.check { list-style: none; padding-left: 0; counter-reset: check; }
ol.check > li { position: relative; padding-left: 32px; margin-bottom: 8px; counter-increment: check; }
ol.check > li::before {
  content: counter(check); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: rgba(25,49,85,.1); color: var(--navy);
}
.quick-card ol.check { margin: 0; }
.cheat header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cheat header h4 { margin: 0; flex: 1; }
.cheat ol { padding-left: 1.3em; margin: 0 0 .8em; }
.cheat li { margin-bottom: 4px; }
.cheat-need { font-size: .9rem; color: var(--text-muted); margin: 0 0 8px; }
.cheat-tip { font-size: .9rem; background: #fdf3e4; border-left: 3px solid #d08a1b; padding: 8px 12px; border-radius: var(--radius); margin: 0; }
.print-btn {
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: .85rem; font-weight: 500; color: var(--navy);
  background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 10px; cursor: pointer;
}
.print-btn:hover { background: rgba(25,49,85,.06); }
.print-btn .material-icons { font-size: 18px; }
.matrix td.yes, .matrix td.no, .matrix th:not(:first-child) { text-align: center; }

@media print {
  .site-header, .sidebar, .docs-hero, .to-top, .site-footer, .print-btn { display: none !important; }
  body { background: #fff; }
  .docs-layout { display: block; }
  .docs-content { max-width: none; padding: 0; }
}

/* Screenshots */
.shot { margin: 4px 0 1.4em; }
.shot a { display: block; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--border); background: #fff; }
.shot a:hover { box-shadow: var(--shadow-4); }
.shot img { max-width: 100%; height: auto; display: block; }
.shot figcaption { font-size: .85rem; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* "Still stuck?" contact form (same form and handler as p64.io) */
.contact-band {
  background: radial-gradient(700px 300px at 90% -20%, rgba(224,178,116,.16), transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 60%, var(--navy-deep) 100%);
  color: var(--text-on-dark); border-radius: var(--radius-lg); padding: 32px; margin-top: 24px; scroll-margin-top: calc(var(--header-h) + 16px);
}
.contact-band .eyebrow { color: var(--gold); }
.contact-band h4 { color: #fff; font-size: clamp(1.25rem, 2.6vw, 1.5rem); font-weight: 500; margin: 6px 0 18px; }
.contact-band .contact-line { color: var(--text-on-dark-muted); font-size: .95rem; }
.contact-band .form-card { margin-top: 8px; }
.contact-band .form-card a { color: var(--navy); }
@media (max-width: 600px) { .contact-band { padding: 22px 16px; } .contact-band .form-card { padding: 20px 16px; } }

/* Use-case gallery */
.uc-list { columns: 2 300px; column-gap: 32px; margin: 0 0 1.2em; }
.uc-list > div { break-inside: avoid; }
.uc-list h4 { margin: 0 0 .3em; }
.uc-list > div { padding-bottom: 14px; }
.uc-list ul { margin: 0; padding-left: 1.2em; }
.uc-list li { margin-bottom: 4px; }
