
:root {
  --paper: #fffdff;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #57534e;
  --line: #d6d3d1;
  --line-soft: #e7e5e4;
  --hint: #a8a29e;
  --soft: #f5f5f4;
  --brand: #662fac;
  --brand-deep: #502586;
  --brand-tint: #f9f7fc;
  --brand-wash: #f0eaf7;
  --brand-footer: #3d1c67;
  --brand-footer-line: #2b144866;
  --brand-edge: #ddd1ed;
  --font-heading: 'Fraunces', ui-serif, Georgia, serif;
  --font-text: 'Inter', ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: only light; background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-text); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 1.0625rem; }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand-wash); color: var(--brand-deep); padding: .75rem 1rem; z-index: 10; border-radius: 0 0 .75rem 0; }
.skip:focus { left: 0; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 max(1.25rem, env(safe-area-inset-left)); padding-right: max(1.25rem, env(safe-area-inset-right)); }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.wordmark { display: inline-flex; flex-direction: column; gap: 3px; text-decoration: none; margin-right: auto; width: fit-content; }
.wordmark .name { font-family: var(--font-heading); font-weight: 500; font-size: 23.4px; letter-spacing: -0.025em; line-height: 1; color: var(--ink); white-space: nowrap; }
.wordmark .tagline { font-size: 7.8px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; line-height: 1; color: var(--muted); text-align: center; white-space: nowrap; }
.wordmark { transition: opacity .2s ease; }
.wordmark:hover { opacity: .8; }
.wordmark.footer .name { font-size: 18.6px; }
.wordmark.footer .tagline { font-size: 6.2px; }
header.site nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
header.site nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); }
.button { display: inline-flex; align-items: center; gap: .5rem; background: var(--brand); color: var(--paper); font-weight: 600; font-size: .95rem; padding: .6rem 1.1rem; border-radius: .75rem; text-decoration: none; border: 0; }
.button:hover { background: var(--brand-deep); color: var(--paper); }
.button.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-edge); }
.button.ghost:hover { background: var(--brand-tint); color: var(--brand-deep); }

main { padding-top: 2.5rem; padding-bottom: 4.5rem; }
.eyebrow { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .75rem; }
h1 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; font-size: clamp(2.1rem, 5.5vw, 3.6rem); margin: 0 0 1.1rem; text-wrap: pretty; }
h2 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 .9rem; text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); margin: 0 0 2rem; text-wrap: pretty; }
p { margin: 0 0 1rem; }
.tool { display: inline-flex; align-items: center; gap: .3rem; vertical-align: baseline; white-space: nowrap; font-weight: 600; background: var(--brand-wash); color: var(--brand-deep); padding: .05rem .5rem .05rem .35rem; border-radius: .5rem; line-height: 1.5; }
.tool svg { width: 1.05em; height: 1.05em; flex: none; position: relative; top: .1em; }
.box.tint .tool, .boxes > li:nth-child(odd) > .box .tool { background: var(--paper); }

.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1.75rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.pill.level { background: transparent; }
.pill { display: inline-block; background: var(--brand-wash); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-edge); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; padding: .3rem .85rem; border-radius: 999px; margin-bottom: .9rem; }

.boxes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin: 0 0 2.5rem; padding: 0; list-style: none; }
.box { border: 1px solid var(--line); background: var(--paper); border-radius: 1.5rem; padding: 1.75rem; }
.boxes > li:nth-child(odd) > .box, .box.tint { background: var(--brand-wash); border-color: var(--brand-edge); }
.boxes > li > .box { height: 100%; display: flex; flex-direction: column; }
.box h2, .box h3 { margin-top: 0; }
.box .more { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; align-self: flex-end; text-decoration: none; padding-top: .75rem; }
.box .more:hover { text-decoration: underline; }
.box .more svg { width: 1.1em; height: 1.1em; }
.box p:last-child { margin-bottom: 0; }
.box .card-link { text-decoration: none; color: inherit; }
.box .card-link:hover { text-decoration: underline; }
.count { font-size: .9rem; opacity: .85; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 1rem; align-items: start; border-top: 1px solid var(--line); padding-top: 1rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--brand-wash); color: var(--brand-deep); font-weight: 700; }
.steps p { margin: .3rem 0 0; }

section.block { margin-bottom: 2.75rem; }
.notes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin-bottom: 2.75rem; }
.demo-frame { border: 1px solid var(--brand-edge); border-radius: 1.5rem; background: var(--brand-tint); padding: .6rem; overflow: hidden; }
.demo-frame iframe { display: block; width: 100%; height: 38rem; border: 0; border-radius: 1.1rem; background: var(--paper); }
.demo-frame.short iframe { height: 32rem; }
.demo-frame { position: relative; }
.demo-frame.loading iframe { visibility: hidden; }
.demo-frame.loading::after { content: "Loading the demo..."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-open { display: none; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: .75rem; background: transparent; color: var(--ink-soft); cursor: pointer; }
.js .search-open { display: grid; }
.search-close { flex: none; display: grid; place-items: center; width: 2.75rem; padding: 0; border: 0; border-radius: .75rem; background: transparent; color: var(--ink-soft); cursor: pointer; }
.search-close:hover { background: var(--brand-tint); color: var(--brand-deep); }
.search-open:hover, .search-open[aria-expanded="true"] { background: var(--brand-tint); color: var(--brand-deep); }
header.site { position: relative; }
.search-panel { position: absolute; left: 0; right: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px -12px rgb(28 25 23 / .12); padding-block: 1.25rem 1.5rem; }
.search-panel[hidden] { display: none; }
/* The filters copy the app's own Select (design-system/primitives/Select.tsx): same trigger, chevron, option list and check. */
.search-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.search-row .finder-field { flex: 1 1 16rem; }
.sel { position: relative; display: flex; }
.sel > button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 10.5rem; min-height: 2.75rem; padding: .625rem 1rem; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--paper); color: var(--ink); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; transition: border-color .15s; }
.sel > button:hover { border-color: var(--line); }
.sel > button:focus-visible { outline: none; border-color: var(--brand-deep); box-shadow: 0 0 0 2px #50258633; }
.sel > button svg { flex: none; color: var(--hint); transition: transform .15s; }
.sel > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.sel ul { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: .5rem 0 0; padding: .25rem 0; list-style: none; min-width: 12rem; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--paper); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); outline: none; overflow: hidden; }
.sel ul[hidden] { display: none; }
.sel li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.75rem; padding: 0 1rem; font-size: .875rem; color: var(--ink-soft); cursor: pointer; }
.sel li.active { background: var(--soft); }
.sel li svg { flex: none; color: var(--ink-soft); visibility: hidden; }
.sel li[aria-selected="true"] svg { visibility: visible; }
.search-results { list-style: none; max-height: 60vh; overflow-y: auto; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.search-results a { display: grid; gap: .15rem; padding: .75rem 1rem; border-radius: .75rem; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-soft); }
.search-results a:hover { background: var(--brand-tint); }
.search-results .tags { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-deep); }
.search-results .none { color: var(--muted); padding: .5rem .25rem; }
.search-results .blurb { color: var(--muted); font-size: .95rem; }
.finder-field { display: flex;  align-items: center; gap: .6rem; padding: 0 .75rem 0 1rem; background: #fff; border: 1px solid var(--line-soft); border-radius: .75rem; box-shadow: 0 10px 15px -3px rgb(28 25 23 / .03), 0 4px 6px -4px rgb(28 25 23 / .03); transition: border-color .15s, box-shadow .15s; }
.finder-field:hover { border-color: var(--line); }
.finder-field:focus-within { border-color: var(--brand-deep); box-shadow: 0 0 0 2px #50258626; }
.finder-field svg { flex: none; color: var(--hint); }
.finder-field input { flex: 1; min-width: 0; font: inherit; font-weight: 500; font-size: 1rem; padding: .95rem 0; border: 0; background: transparent; color: var(--ink); }
.finder-field input::placeholder { font-weight: 400; color: var(--muted); }
.finder-field input:focus-visible { outline: none; }
.boxes[hidden], .boxes > li[hidden] { display: none; }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
.related ul, .guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.related a { font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; }
.pager a { font-weight: 600; }

footer.site { background: var(--brand-footer); border-top: 1px solid var(--brand-footer-line); padding: 1.5rem 0; }
footer.site .wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
footer.site .top { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; }
footer.site nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; }
footer.site nav a { font-size: 11px; color: var(--brand-wash); text-decoration: none; }
footer.site nav a:hover { color: #fff; }
footer.site .copyright { margin: 0; font-size: 10px; letter-spacing: .025em; color: var(--brand-edge); }
.wordmark.light .name { color: #fff; }
.wordmark.light .tagline { color: var(--brand-edge); }
@media (min-width: 40rem) {
  footer.site .wrap { align-items: flex-start; }
  footer.site .top { flex-direction: row; justify-content: space-between; align-items: center; }
  footer.site nav { justify-content: flex-end; }
}

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .box { padding: 1.4rem; }
  .steps li { grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; }
  .steps li::before { width: 2rem; height: 2rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
