/* ContextNotes homepage — local implementation of the approved Google Stitch design.
   Values mirror the Stitch export (Tailwind defaults + its custom color/type tokens). */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --surface: #fdf8f8;
  --on-surface: #1c1b1c;
  --primary: #000;
  --secondary: #605e5e;
  --on-surface-variant: #4c4546;
  --outline: #706869; /* darkened from Stitch #7e7576 so small text meets 4.5:1 */
  --outline-variant: #cfc4c5;
  --sc-lowest: #fff;
  --sc-low: #f7f2f2;
  --sc: #f1eded;
  --sc-high: #ece7e7;
  --sc-highest: #e6e1e1;
  --primary-container: #1b1b1b;
  --on-primary-container: #848484;
  --inverse-surface: #313030;
  --error: #ba1a1a;
  --subtle-shadow: 0 16px 36px -4px rgba(28, 27, 27, .04), 0 6px 12px -2px rgba(28, 27, 27, .02);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* note colors (design palette; "Neutral" replaces the export's non-app "Peach") */
.note-yellow { --note-bg: #fef9c3; --note-bd: #f7eb9e; }
.note-pink { --note-bg: #fce7f3; --note-bd: #f5c7e2; }
.note-green { --note-bg: #dcfce7; --note-bd: #bff3cd; }
.note-blue { --note-bg: #e0f2fe; --note-bd: #c5e5fd; }
.note-lavender { --note-bg: #ede9fe; --note-bd: #ddd6fe; }
.note-neutral { --note-bg: #f1f5f9; --note-bd: #e2e8f0; }

/* ---------- base (Tailwind preflight essentials) ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--sc-highest); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--sc-highest); color: var(--primary); }
h1, h2, h3, h4, p, dl, dd, ul, figure { margin: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: inherit; }
button, input { font: inherit; color: inherit; margin: 0; }
button { background: transparent; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
section[id], [id="demo"] { scroll-margin-top: 6rem; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- SECTION 1: floating pill nav ---------- */
.nav-pill {
  position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 50;
  max-width: calc(100vw - 2rem);
  border-radius: 9999px; padding: .625rem 1.5rem;
  border: 1px solid rgba(207, 196, 197, .2);
  box-shadow: 0 16px 36px -4px rgba(28, 27, 27, .08);
  background: rgba(27, 27, 27, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; width: fit-content; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .625rem; transition: transform .15s; }
.brand:active { transform: scale(.98); }
.brand-mark { border-radius: 5px; background: #fff; color: #000; font-weight: 600; font-size: 12px; line-height: 16px; padding: .125rem .5rem; user-select: none; }
.brand-mark-dark { background: #000; color: #fff; }
.brand-name { font-size: 13px; line-height: 16px; letter-spacing: 0; font-weight: 600; color: #fff; }
.nav-links { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { font-size: 11px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; font-weight: 400; color: #a8a8a8; transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current] { color: #fff; font-weight: 500; }
.nav-cta { background: #fff; color: #000; border-radius: 9999px; padding: .25rem .875rem; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; transition: background-color .15s, transform .15s; }
.nav-cta:hover { background: var(--sc); }
.nav-cta:active { transform: scale(.98); }
.nav-pill :focus-visible { outline-color: #fff; }

/* ---------- SECTION 2: hero ---------- */
.hero { padding: 9rem 1.5rem 5rem; max-width: 64rem; margin: 0 auto; text-align: center; }
.beta-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .75rem; border-radius: 9999px; border: 1px solid var(--sc-highest); background: var(--sc-low); margin-bottom: 2rem; font-size: 11px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--on-surface-variant); font-weight: 600; }
.beta-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--primary); }
.display { font-size: 72px; line-height: 1.1; letter-spacing: -0.04em; font-weight: 600; color: var(--primary); max-width: 48rem; margin: 0 auto 1.5rem; }
.hero-lead { font-size: 18px; line-height: 1.625; letter-spacing: -0.01em; color: var(--secondary); max-width: 42rem; margin: 0 auto 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .875rem; margin-bottom: 1.25rem; }
.btn { display: inline-block; border-radius: 7px; padding: .75rem 1.5rem; font-weight: 500; font-size: 14px; line-height: 20px; transition: all .15s; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { opacity: .9; }
.btn-light { background: #f2eded; color: #1c1b1b; }
.btn-light:hover { background: #eae4e4; }
.btn-lg { padding: .875rem 2rem; }
.hero-meta { font-size: 12px; line-height: 16px; color: var(--outline); letter-spacing: 0; margin-bottom: 4rem; user-select: none; }

/* desktop window mockup */
.mock { position: relative; width: 100%; max-width: 56rem; margin: 0 auto; border-radius: 1rem; background: var(--sc-lowest); border: 1px solid var(--sc-highest); box-shadow: var(--subtle-shadow); overflow: hidden; padding: .75rem; text-align: left; }
@media (min-width: 768px) { .mock { padding: 1.25rem; } }
.mock-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 0 .5rem .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--sc); }
.mock-bar-left { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.mock-dot { flex: none; width: 12px; height: 12px; border-radius: 9999px; background: var(--sc-highest); }
.mock-title { margin-left: .5rem; font-size: 11px; line-height: 14px; letter-spacing: .08em; font-weight: 600; color: var(--on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-switch { display: flex; align-items: center; gap: .25rem; margin-left: .5rem; min-width: 0; }
.app-switch-label { font-size: 11px; line-height: 14px; letter-spacing: .08em; font-weight: 600; color: var(--outline); white-space: nowrap; }
.app-switch button { font-size: 11px; line-height: 14px; letter-spacing: .08em; font-weight: 600; color: var(--outline); padding: 1px .5rem; margin: -1px 0; border-radius: 9999px; white-space: nowrap; transition: color .15s, background-color .15s; }
.app-switch button:hover { color: var(--primary); }
.app-switch button[aria-pressed="true"] { color: var(--on-surface-variant); background: var(--sc-low); box-shadow: inset 0 0 0 1px var(--sc-highest); }
.mock-bar-right { display: flex; gap: .5rem; color: var(--outline); font-size: 12px; line-height: 16px; font-family: var(--mono); white-space: nowrap; }
@media (max-width: 639px) { .mock-bar-right { display: none; } .app-switch-label { display: none; } }

.canvas { position: relative; background: var(--sc-low); border-radius: .75rem; height: 400px; overflow: hidden; display: flex; border: 1px solid var(--sc); }
.canvas-app { flex: 1; min-width: 0; padding: 1.5rem; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--on-surface-variant); display: flex; flex-direction: column; justify-content: space-between; user-select: none; }
.code-lines { opacity: .8; }
.code-lines > * + * { margin-top: .5rem; }
.code-line { display: flex; gap: 1rem; white-space: nowrap; overflow: hidden; }
.ln { color: var(--on-surface-variant); }
.kw { color: var(--primary); font-weight: 600; }
.cm { color: #4a4848; }
.pl { padding-left: 1rem; }
.canvas-status { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: 1rem; border-top: 1px solid rgba(230, 225, 225, .6); font-size: 11px; color: var(--outline); white-space: nowrap; overflow: hidden; }
@media (max-width: 639px) { .canvas-status span:last-child { display: none; } .canvas-app { padding: 1rem; } }

/* simulated browser content (Chrome context) */
.page-view { font-family: var(--font); opacity: .9; }
.page-url { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--outline); background: var(--sc-lowest); border: 1px solid var(--sc-highest); border-radius: 9999px; padding: .125rem .625rem; margin-bottom: 1rem; }
.page-h { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); margin-bottom: .5rem; }
.page-p { font-size: 12px; line-height: 1.625; color: var(--on-surface-variant); margin-bottom: .375rem; max-width: 26rem; }
.page-skel { height: 8px; border-radius: 9999px; background: var(--sc-high); margin-top: .75rem; max-width: 22rem; }
.page-skel.short { max-width: 14rem; }

/* preview card and editor (same footprint) */
.preview, .hero-editor {
  position: absolute; right: 3rem; top: 2rem; bottom: 2rem; z-index: 10;
  width: 18rem; max-width: calc(100% - 3.75rem);
  border-radius: .75rem; background: var(--note-bg); color: var(--on-surface);
  padding: 1.25rem; box-shadow: var(--subtle-shadow); border: 1px solid var(--note-bd);
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
}
.preview { transition: opacity .1s ease, transform .1s ease; }
.preview.is-hidden { opacity: 0; transform: translateX(6px); pointer-events: none; visibility: hidden; }
button.preview { font: inherit; cursor: pointer; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-bottom: .5rem; margin-bottom: .75rem; border-bottom: 1px solid var(--note-bd); }
.preview-scope { font-size: 10px; line-height: 14px; text-transform: uppercase; font-weight: 600; color: rgba(28, 27, 28, .7); letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-time { font-size: 10px; line-height: 14px; color: rgba(28, 27, 28, .68); font-family: var(--mono); white-space: nowrap; }
.preview-title { font-size: 14px; line-height: 1.375; font-weight: 600; margin-bottom: .5rem; }
.preview-list { font-size: 12px; line-height: 1.625; color: rgba(28, 27, 28, .9); }
.preview-list > * + * { margin-top: .5rem; }
.preview-list li { display: flex; align-items: flex-start; gap: .375rem; overflow-wrap: anywhere; }
.preview-list .mark { font-weight: 700; flex: none; }
.preview-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .75rem; border-top: 1px solid var(--note-bd); font-size: 11px; line-height: 16px; color: rgba(28, 27, 28, .68); font-weight: 500; }
.preview-badge { font-size: 10px; background: rgba(255, 255, 255, .6); padding: .125rem .375rem; border-radius: .25rem; white-space: nowrap; }

.hero-editor { justify-content: flex-start; gap: 0; }
.ed-title { width: 100%; background: transparent; border: 0; padding: 0; font-size: 14px; line-height: 1.375; font-weight: 600; color: var(--on-surface); margin-bottom: .5rem; }
.ed-title::placeholder { color: rgba(28, 27, 28, .45); }
.ed-title:focus-visible { outline: 2px solid rgba(28, 27, 28, .5); outline-offset: 2px; }
.ed-body { flex: 1; min-height: 0; overflow: auto; font-size: 12px; line-height: 1.625; color: rgba(28, 27, 28, .9); outline: none; border-radius: .25rem; overflow-wrap: anywhere; }
.ed-body:focus-visible { box-shadow: 0 0 0 2px rgba(28, 27, 28, .35); }
.ed-body ul, .mini-body ul { margin: 0; padding-left: 1.1rem; list-style: disc; }
.ed-body div.cl { position: relative; padding-left: 1.3rem; }
.ed-body div.cl::before { content: ""; position: absolute; left: 1px; top: .3em; width: 11px; height: 11px; border: 1.5px solid rgba(28, 27, 28, .75); border-radius: 3px; background: rgba(255, 255, 255, .5); cursor: pointer; }
.ed-body div.cl[data-checked="true"] { color: rgba(28, 27, 28, .6); text-decoration: line-through; }
.ed-body div.cl[data-checked="true"]::before { background: rgba(28, 27, 28, .8); }
.ed-body div.cl[data-checked="true"]::after { content: ""; position: absolute; left: 5px; top: .38em; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

/* right edge rail */
.rail { flex: none; width: 2.5rem; height: 100%; background: rgba(230, 225, 225, .6); border-left: 1px solid var(--sc-highest); display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0; gap: .75rem; z-index: 20; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-tab { flex: none; display: block; width: 1rem; height: 2rem; border-radius: .375rem 0 0 .375rem; background: var(--note-bg); border: 1px solid var(--note-bd); border-right: 0; opacity: .75; transition: opacity .15s; cursor: pointer; }
.rail-tab:hover { opacity: 1; }
.rail-tab-active { width: 1.25rem; height: 2.5rem; opacity: 1; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); display: flex; align-items: center; justify-content: center; }
.grip { width: .25rem; height: 1rem; border-radius: 9999px; background: rgba(28, 27, 28, .3); }
.rail-add { margin-top: auto; flex: none; width: 1.25rem; height: 1.25rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: var(--outline); font-size: 12px; font-weight: 700; user-select: none; cursor: pointer; transition: color .15s; }
.rail-add:hover { color: var(--primary); }
.rail-add:disabled { opacity: .4; cursor: default; }

.demo-caption { max-width: 56rem; margin: 1rem auto 0; font-size: 12px; line-height: 16px; color: var(--outline); }

/* ---------- SECTION 3: edge rail explainer ---------- */
.explainer { padding: 5rem 1.5rem; max-width: 56rem; margin: 0 auto; text-align: center; }
.h-md { font-size: 36px; line-height: 44px; letter-spacing: -0.03em; font-weight: 600; color: var(--primary); margin-bottom: .75rem; }
.explainer-lead { font-size: 18px; line-height: 29px; letter-spacing: -0.01em; color: var(--secondary); margin-bottom: 3rem; }
.explainer-media { margin: 0 auto 2.5rem; max-width: 300px; text-align: center; }
.explainer-media video { display: block; width: 100%; height: auto; border-radius: 1rem; border: 1px solid var(--sc-highest); background: var(--sc-lowest); }
.feature-gif { display: block; width: 100%; max-width: 220px; height: auto; margin: 1rem auto 0; border-radius: 1rem; border: 1px solid var(--sc-highest); }
.explainer-media figcaption { margin-top: .625rem; font-size: 13px; line-height: 1.5; color: var(--secondary); }
.explainer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--sc-highest); border-bottom: 1px solid var(--sc-highest); padding: 1.5rem 0; }
@media (min-width: 768px) {
  .explainer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .explainer-item:not(:last-child) { border-right: 1px solid var(--sc-highest); }
}
.explainer-item { padding: .5rem 1rem; }
.explainer-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); margin-bottom: .25rem; }
.explainer-text { font-size: 12px; line-height: 16px; color: var(--secondary); }

/* ---------- SECTION 4: alternating feature blocks ---------- */
.features { padding: 4rem 1.5rem; max-width: 56rem; margin: 0 auto; }
.features > * + * { margin-top: 6rem; }
.feature { display: grid; gap: 2rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .feature { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .feature-text { grid-column: span 5 / span 5; }
  .feature-visual { grid-column: span 7 / span 7; }
}
.feature-flip .feature-visual { order: 2; }
.feature-flip .feature-text { order: 1; }
@media (min-width: 768px) {
  .feature-flip .feature-visual { order: 1; }
  .feature-flip .feature-text { order: 2; }
}
.feature-text > * + * { margin-top: .75rem; }
.eyebrow { font-size: 11px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--secondary); font-weight: 600; }
.h-sm { font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; color: var(--primary); }
.feature-body { font-size: 15px; line-height: 1.625; color: var(--secondary); }
.card { border-radius: 1rem; background: var(--sc-lowest); border: 1px solid var(--sc-highest); box-shadow: var(--subtle-shadow); padding: 1rem; overflow: hidden; }
.card-tinted { background: var(--sc-high); padding: 1.5rem; display: flex; justify-content: center; align-items: center; }
.card-center-pad { padding: 1.25rem; display: flex; justify-content: center; }
.card-pad { padding: 1.5rem; }
.widget-note { margin-top: 1rem; font-size: 12px; line-height: 16px; color: var(--outline); }

/* Notes Manager */
.mgr-head { display: flex; align-items: center; gap: .5rem; padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--sc); }
.mgr-title { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--primary); }
.mgr-total { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--outline); font-family: var(--mono); }
.mgr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; height: 13rem; }
.mgr-side { grid-column: span 2 / span 2; border-right: 1px solid var(--sc); padding-right: .75rem; font-size: 12px; line-height: 16px; }
.mgr-side > * + * { margin-top: .5rem; }
.mgr-filter { display: block; width: 100%; text-align: left; padding: .5rem; border-radius: .25rem; color: var(--secondary); cursor: pointer; transition: background-color .15s; }
.mgr-filter:hover { background: var(--sc); }
.mgr-filter.is-active, .mgr-filter[aria-pressed="true"] { background: var(--sc-high); font-weight: 500; color: var(--primary); }
.mgr-card { grid-column: span 3 / span 3; border-radius: .75rem; background: var(--note-bg); padding: .875rem; border: 1px solid var(--note-bd); display: flex; flex-direction: column; justify-content: space-between; min-height: 0; overflow: hidden; }
.mgr-card-title { font-size: 10px; line-height: 14px; color: var(--on-surface-variant); text-transform: uppercase; font-weight: 600; }
.mgr-card-text { font-size: 12px; line-height: 1.625; color: var(--on-surface); margin-top: .5rem; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.mgr-card-meta { font-size: 10px; line-height: 14px; color: var(--on-surface-variant); font-family: var(--mono); }

/* floating editor sample */
.mini-editor { width: 100%; max-width: 24rem; border-radius: .75rem; background: var(--note-bg); border: 1px solid var(--note-bd); padding: 1rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05); color: var(--on-surface); }
.mini-editor > * + * { margin-top: .75rem; }
.mini-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--on-surface-variant); }
.mini-label { font-size: 10px; line-height: 14px; text-transform: uppercase; font-weight: 700; letter-spacing: .05em; }
.mini-dots { display: flex; gap: .375rem; }
.mini-dots span { width: 10px; height: 10px; border-radius: 9999px; background: rgba(0, 0, 0, .15); display: inline-block; }
.mini-body { font-size: 12px; line-height: 1.625; color: var(--on-surface); border-radius: .25rem; outline: none; overflow-wrap: anywhere; }
.mini-body:focus-visible { box-shadow: 0 0 0 2px rgba(28, 27, 28, .35); }
.mini-tools, .ed-tools { padding-top: .5rem; border-top: 1px solid var(--note-bd); display: flex; align-items: center; gap: .75rem; font-size: 12px; line-height: 16px; color: var(--on-surface-variant); font-weight: 500; }
.ed-tools { margin-top: .75rem; }
.tool-b { font-weight: 700; }
.tool-i { font-style: italic; }
.tool-u { text-decoration: underline; }
.mini-tools button, .ed-tools button { min-width: 1.25rem; min-height: 1.5rem; border-radius: .25rem; transition: color .15s, background-color .15s; }
.mini-tools button:hover, .ed-tools button:hover { color: #000; }
.mini-tools button[aria-pressed="true"], .ed-tools button[aria-pressed="true"] { color: #000; background: rgba(255, 255, 255, .6); }
.tool-sep { color: rgba(76, 69, 70, .4); }
.tool-font { font-family: var(--mono); font-size: 10px; white-space: nowrap; }
.ed-tools .ed-close { margin-left: auto; padding: 0 .375rem; font-weight: 500; }
.ed-status { margin-top: .5rem; font-size: 10px; line-height: 14px; color: rgba(28, 27, 28, .6); }

/* Trash example */
.trash-card { width: 100%; max-width: 24rem; border-radius: .75rem; background: var(--note-bg); border: 1px solid var(--note-bd); padding: 1.25rem; }
.trash-card > * + * { margin-top: 1rem; }
.trash-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: 12px; color: var(--on-surface-variant); }
.trash-when { font-family: var(--mono); font-size: 10px; line-height: 14px; }
.trash-badge { font-size: 10px; line-height: 14px; font-weight: 600; text-transform: uppercase; background: rgba(255, 255, 255, .6); padding: .125rem .375rem; border-radius: .25rem; }
.trash-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--on-surface); }
.trash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .5rem; }
.trash-msg { font-size: 12px; line-height: 16px; color: var(--on-surface-variant); }
.btn-sm { display: inline-block; border-radius: 7px; font-size: 12px; line-height: 16px; padding: .375rem .875rem; font-weight: 500; transition: opacity .15s, background-color .15s; }
.btn-sm-dark { background: var(--primary); color: #fff; }
.btn-sm-dark:hover { opacity: .9; }
.btn-sm-danger { background: rgba(255, 255, 255, .8); color: var(--error); border: 1px solid rgba(186, 26, 26, .2); }
.btn-sm-danger:hover { background: #fff; }
.btn-sm-light { background: rgba(255, 255, 255, .8); color: var(--on-surface); border: 1px solid rgba(28, 27, 28, .12); }
.btn-sm-light:hover { background: #fff; }

/* Color swatches */
.swatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 640px) { .swatch-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.swatch { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: pointer; border-radius: .75rem; }
.swatch-chip { display: block; width: 100%; height: 4rem; border-radius: .75rem; background: var(--note-bg); border: 1px solid var(--note-bd); transition: transform .15s, box-shadow .15s; }
.swatch:hover .swatch-chip { transform: scale(1.05); }
.swatch[aria-checked="true"] .swatch-chip { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--primary); }
.swatch-name { font-size: 11px; line-height: 14px; color: var(--secondary); }

/* Scope */
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.scope-opt { display: block; width: 100%; padding: .75rem; border-radius: .5rem; border: 1px solid var(--sc); text-align: center; font-size: 12px; line-height: 16px; color: var(--outline); transition: color .15s; }
button.scope-opt:hover { color: var(--secondary); }
.scope-opt.is-active, .scope-opt[aria-checked="true"] { border: 2px solid var(--primary); background: var(--sc-low); font-weight: 600; color: var(--primary); opacity: 1; }
.scope-target { padding: .75rem; border-radius: .5rem; background: var(--sc-low); border: 1px solid var(--sc-highest); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.scope-target-name { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: 12px; line-height: 16px; font-family: var(--mono); font-weight: 500; color: var(--primary); }
.scope-target-name span:last-child { overflow-wrap: anywhere; }
.scope-dot { flex: none; width: 8px; height: 8px; border-radius: 9999px; background: var(--primary); }
.scope-badge { flex: none; font-size: 10px; line-height: 14px; text-transform: uppercase; background: var(--sc-highest); padding: .125rem .5rem; border-radius: .25rem; color: var(--on-surface-variant); white-space: nowrap; }

/* ---------- SECTION 5: feature grid ---------- */
.grid-section { padding: 6rem 1.5rem; max-width: 64rem; margin: 0 auto; border-top: 1px solid var(--sc-highest); }
.grid-head { text-align: center; max-width: 36rem; margin: 0 auto 4rem; }
.grid-sub { font-size: 15px; line-height: 24px; color: var(--secondary); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 2rem; }
@media (min-width: 768px) { .detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.detail > * + * { margin-top: .375rem; }
.detail-icon { width: 1.5rem; height: 1.5rem; margin-bottom: .5rem; color: var(--primary); }
.detail-icon svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.detail h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); }
.detail p { font-size: 12px; line-height: 1.625; color: var(--secondary); }

/* ---------- SECTION 6: privacy band ---------- */
.privacy-wrap { padding: 4rem 1.5rem; max-width: 56rem; margin: 0 auto; }
.privacy-band { border-radius: 1rem; background: var(--primary-container); color: #fff; padding: 2.5rem; text-align: center; }
@media (min-width: 768px) { .privacy-band { padding: 3.5rem; } }
.privacy-band > * + * { margin-top: 1.5rem; }
.privacy-label { font-size: 11px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; color: #a39a9b; font-weight: 600; }
.privacy-title { color: #fff; max-width: 32rem; margin-left: auto; margin-right: auto; margin-bottom: 0; }
.privacy-text { font-size: 15px; line-height: 1.625; color: var(--on-primary-container); max-width: 36rem; margin-left: auto; margin-right: auto; }
.privacy-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--inverse-surface); max-width: 36rem; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .privacy-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-value { font-size: 20px; line-height: 28px; font-weight: 700; color: #fff; margin-bottom: .125rem; }
.stat-label { font-size: 12px; line-height: 16px; color: var(--on-primary-container); }

/* ---------- SECTION 7: specs ---------- */
.specs { padding: 5rem 1.5rem; max-width: 48rem; margin: 0 auto; }
.specs-head { text-align: center; margin-bottom: 2.5rem; }
.specs-head .h-sm, .faq-head .h-sm { margin-bottom: .5rem; }
.specs-sub, .faq-sub { font-size: 12px; line-height: 16px; color: var(--secondary); }
.specs-table { border-radius: .75rem; border: 1px solid var(--sc-highest); background: var(--sc-lowest); overflow: hidden; }
.spec-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 1.5rem; border-bottom: 1px solid var(--sc); font-size: 12px; line-height: 16px; }
.spec-row:last-child { border-bottom: 0; }
.spec-row:nth-child(even) { background: rgba(247, 242, 242, .4); }
.spec-row dt { color: var(--secondary); font-weight: 500; }
.spec-row dd { font-weight: 600; color: var(--primary); text-align: right; }

/* ---------- SECTION 8: FAQ ---------- */
.faq { padding: 4rem 1.5rem; max-width: 48rem; margin: 0 auto; border-top: 1px solid var(--sc-highest); }
.faq-head { text-align: center; margin-bottom: 3rem; }
.faq-list > * + * { margin-top: 1rem; }
.faq-list details { border-bottom: 1px solid var(--sc-highest); padding-bottom: 1rem; }
.faq-list summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 4px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; color: var(--outline); font-size: 12px; line-height: 16px; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); }
.faq-list details p { font-size: 12px; line-height: 1.625; color: var(--secondary); margin-top: .5rem; }
.faq-list details a { text-decoration: underline; text-underline-offset: 2px; color: var(--primary); }

/* ---------- SECTION 9: final CTA ---------- */
.final { padding: 7rem 1.5rem; max-width: 56rem; margin: 0 auto; text-align: center; }
.h-lg { font-size: 44px; line-height: 52px; letter-spacing: -0.025em; font-weight: 600; color: var(--primary); margin-bottom: .75rem; }
.final-sub { font-size: 15px; line-height: 24px; color: var(--secondary); margin-bottom: 2rem; }
.final-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.final-meta { font-size: 12px; line-height: 16px; color: var(--outline); margin-top: 1rem; user-select: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--sc-highest); background: var(--surface); }
.footer-inner { width: 100%; max-width: 64rem; margin: 0 auto; padding: 4rem 2rem; display: flex; flex-direction: column; gap: 3rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .footer-brand { grid-column: span 2 / span 2; }
}
.footer-brand > * + * { margin-top: .75rem; }
.footer-logo { display: flex; align-items: center; gap: .5rem; }
.footer-name { font-size: 20px; line-height: 28px; letter-spacing: -0.015em; font-weight: 600; color: var(--on-surface); }
.footer-brand p { font-size: 12px; line-height: 1.625; color: var(--secondary); max-width: 20rem; }
.footer-col > * + * { margin-top: .75rem; }
.footer-h { font-size: 11px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--on-surface); font-weight: 600; }
.footer-col ul { font-size: 12px; line-height: 16px; }
.footer-col li + li { margin-top: .5rem; }
.footer-col a { color: var(--on-surface-variant); transition: color .15s; }
.footer-col a:hover { color: var(--on-surface); text-decoration: underline; }
.footer-bottom { padding-top: 2rem; border-top: 1px solid var(--sc); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; font-size: 12px; line-height: 16px; color: var(--outline); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }

/* ---------- small screens (adapted from the desktop design's own mobile tokens) ---------- */
@media (max-width: 767px) {
  .display { font-size: 40px; line-height: 46px; letter-spacing: -0.03em; }
  .h-lg { font-size: 32px; line-height: 38px; }
  .h-md { font-size: 30px; line-height: 38px; }
  .hero { padding-top: 7.5rem; }
  .nav-pill { padding: .5rem 1rem; }
  .nav-inner { gap: 1.25rem; }
}

/* the hero editor is under ~260px wide here: drop the decorative font label so Close stays inside */
@media (max-width: 420px) {
  .ed-tools .tool-sep, .ed-tools .tool-font { display: none; }
}

/* ---------- analytics consent (shown only when Clarity is configured) ---------- */
.consent { position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: 1rem; max-width: 30rem; margin-left: auto; padding: 1.25rem; border-radius: 1rem; background: var(--sc-lowest); border: 1px solid var(--sc-highest); box-shadow: 0 16px 36px -4px rgba(28, 27, 27, .16); color: var(--on-surface-variant); font-size: 13px; line-height: 1.55; }
.consent-title { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--primary); margin-bottom: .375rem; }
.consent-text a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.consent-btn { padding: .5rem 1.25rem; font-size: 13px; border: 1px solid var(--outline-variant); color: var(--primary); } /* equal weight: neither choice is nudged */
.footer-col .footer-link { font: inherit; font-size: 12px; line-height: 16px; color: var(--on-surface-variant); text-align: left; }
.footer-col .footer-link:hover { color: var(--on-surface); text-decoration: underline; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .swatch:hover .swatch-chip, .btn:active, .brand:active, .nav-cta:active { transform: none; }
}
