/* Clausery public site styles (landing, pricing, docs, legal). System fonts; no third-party requests. */
:root {
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #f1eee7; --surface-3: #e8e4da;
  --text: #1b1f27; --muted: #5d6470; --border: #d9d4c8; --border-strong: #b9b2a2;
  --ink: #1b2a41; --ink-2: #24385a; --ink-text: #ffffff;
  --accent: #0f766e; --accent-hover: #0b5f59; --accent-soft: #d8efe9; --accent-text: #ffffff;
  --warn-soft: #fef1dd; --warn: #b45309; --ok: #15803d; --ok-soft: #dcf5e3;
  --focus: #2563eb; --shadow: 0 1px 2px rgba(20,20,30,.06), 0 12px 32px -16px rgba(20,20,30,.35);
  --radius: 12px; --radius-sm: 7px; --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f1419; --surface: #171d25; --surface-2: #1f2731; --surface-3: #2a3340; --text: #e8ebef; --muted: #98a2b3; --border: #2e3846; --border-strong: #46526a; --ink: #0b1220; --ink-2: #131d30; --ink-text: #e8ebef; --accent: #2dd4bf; --accent-hover: #5eead4; --accent-soft: #123b39; --accent-text: #06201d; --warn-soft: #3b2a08; --warn: #fbbf24; --ok: #4ade80; --ok-soft: #0d3320; --focus: #60a5fa; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -16px rgba(0,0,0,.7); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0f1419; --surface: #171d25; --surface-2: #1f2731; --surface-3: #2a3340; --text: #e8ebef; --muted: #98a2b3; --border: #2e3846; --border-strong: #46526a; --ink: #0b1220; --ink-2: #131d30; --ink-text: #e8ebef; --accent: #2dd4bf; --accent-hover: #5eead4; --accent-soft: #123b39; --accent-text: #06201d; --warn-soft: #3b2a08; --warn: #fbbf24; --ok: #4ade80; --ok-soft: #0d3320; --focus: #60a5fa; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); } h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
pre { background: var(--surface-2); border: 1px solid var(--border); padding: 1rem; border-radius: var(--radius-sm); overflow: auto; font-size: .9rem; line-height: 1.5; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a.sr-only:focus-visible { position: fixed !important; top: .5rem; left: .5rem; width: auto; height: auto; overflow: visible; clip: auto; z-index: 200; padding: .5rem .8rem; background: var(--surface); color: var(--text); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); } .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; } .btn-ghost { background: transparent; border-color: transparent; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; } .btn-ink:hover { background: var(--ink-2); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: var(--radius-sm); font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); } .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .btn { margin-left: .5rem; }
.site-nav a.btn-primary { color: var(--accent-text); background: var(--accent); } .site-nav a.btn-primary:hover { background: var(--accent-hover); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .4rem .6rem; font: inherit; color: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: .75rem 1rem; gap: .25rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; } .site-nav .btn { margin: .5rem 0 0; }
}

/* hero */
.hero { padding: 4.5rem 0 3rem; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.hero .proof { display: flex; gap: 1.25rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero .proof span { display: inline-flex; align-items: center; gap: .35rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.shot { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.shot img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding: 3rem 0 2rem; } }

/* sections */
.section { padding: 4rem 0; } .section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-ink { background: var(--ink); color: var(--ink-text); } .section-ink .muted { color: #b9c3d4; } .section-ink a { color: #8fe3d9; } .section-ink code { background: rgba(255,255,255,.12); color: #f3f5f8; }
.section h2 { margin-bottom: .75rem; } .section .lead { margin-bottom: 2rem; }
.grid { display: grid; gap: 1.25rem; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.section-ink .feature { background: var(--ink-2); border-color: rgba(255,255,255,.08); }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.section-ink .feature .ico { background: rgba(45,212,191,.15); color: #8fe3d9; }
.feature h3 { margin-bottom: .35rem; } .feature p { margin: 0; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; position: relative; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: .75rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare th { background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.compare td.yes { color: var(--ok); font-weight: 600; } .compare td.no { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.quote { font-size: 1.25rem; font-style: italic; border-left: 4px solid var(--accent); padding-left: 1.25rem; margin: 0; max-width: 46rem; }
.quote cite { display: block; font-style: normal; font-size: .9rem; color: var(--muted); margin-top: .75rem; }
.faq details { border-bottom: 1px solid var(--border); padding: .5rem 0; } .faq summary { cursor: pointer; font-weight: 600; padding: .5rem 0; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; } .faq summary::after { content: '+'; color: var(--muted); } .faq details[open] summary::after { content: '–'; }
.faq p { color: var(--muted); }
.cta { text-align: center; padding: 4rem 0; } .cta .actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); position: relative; }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 0; } .plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 1.25rem 0; flex: 1; } .plan li { padding: .3rem 0; display: flex; gap: .5rem; align-items: flex-start; }
.plan li::before { content: '✓'; color: var(--ok); font-weight: 700; } .plan li.no::before { content: '–'; color: var(--muted); } .plan li.no { color: var(--muted); }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }

/* docs */
.docs { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; padding: 2.5rem 0 4rem; }
.docs-nav { position: sticky; top: 80px; align-self: start; }
.docs-nav h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
.docs-nav a { display: block; padding: .3rem .5rem; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); font-size: .95rem; }
.docs-nav a:hover { background: var(--surface-2); } .docs-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.docs-body { min-width: 0; max-width: 46rem; } .docs-body h1 { font-size: 2.2rem; } .docs-body h2 { font-size: 1.5rem; margin-top: 2.5rem; padding-top: .5rem; } .docs-body h3 { margin-top: 1.75rem; }
.docs-body table { display: block; max-width: 100%; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; } .docs-body th, .docs-body td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; } .docs-body th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.docs-body .note { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: .75rem 1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1rem 0; }
.docs-body .warn { background: var(--warn-soft); border-left: 4px solid var(--warn); padding: .75rem 1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1rem 0; }
.prose { max-width: 46rem; } .prose h2 { margin-top: 2rem; }
@media (max-width: 800px) { .docs { grid-template-columns: 1fr; gap: 1.5rem; } .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: .25rem; } .docs-nav h4 { width: 100%; margin: .5rem 0 .2rem; } }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; color: var(--text); }
.site-footer a { color: var(--muted); text-decoration: none; display: block; padding: .15rem 0; } .site-footer a:hover { color: var(--accent); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; font-size: .85rem; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .cta { display: none; } }
/* Multi-column link lists (home page "most-used" lists) */
.link-cols { list-style: none; padding: 0; margin: .75rem 0 0; columns: 3 14rem; column-gap: 1.5rem; }
.link-cols li { break-inside: avoid; padding: .2rem 0; }
.grid .link-cols { columns: 1; }
/* Template finder (templates index; shown by site.js) */
.filter { margin-top: 1.5rem; max-width: 34rem; }
.filter label { display: block; font-weight: 700; margin-bottom: .35rem; }
.filter input { width: 100%; padding: .7rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; }
.filter input:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 1px; }
.filter [data-filter-count] { min-height: 1.4em; margin: .4rem 0 0; }
.filter-empty { margin-top: 2rem; }
.feature[hidden], .filter-group[hidden], .filter[hidden], .filter-empty[hidden] { display: none; }
/* Home page search form that opens the filtered templates index */
.find-form { display: flex; gap: .5rem; max-width: 34rem; margin-top: 1.25rem; }
.find-form input { flex: 1; min-width: 0; padding: .65rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
/* Foot of template and guide pages: related cards and compact lists grouped by category */
.related-cards { margin-top: 1rem; }
.related-cards a.feature { text-decoration: none; color: inherit; padding: 1.1rem 1.25rem; transition: border-color .15s; }
.related-cards a.feature:hover { border-color: var(--accent); }
.related-cards h3 { font-size: 1.05rem; color: var(--accent); }
.related-cards p { font-size: .92rem; }
.cat-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem 1.75rem; margin-top: 1rem; }
.cat-lists h3 { font-size: .95rem; margin: 1rem 0 .35rem; }
.link-list { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.link-list li { padding: .18rem 0; }
.guide-meta { margin: .25rem 0 1.25rem; }
.guide-list li { margin-bottom: .6rem; }
.steps-compact li { padding: 1.1rem 1.25rem; }
.steps-compact h3 { font-size: 1.05rem; }
.related-cards p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) {
  .related-cards { gap: .6rem; }
  .related-cards a.feature { padding: .85rem 1rem; }
  .related-cards p { -webkit-line-clamp: 2; }
  .cat-lists.tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem 1rem; }
}
