/* emergic.com — one stylesheet. Palette from the app icon: cream, coffee, teal. */
:root {
  --ink: #16181d;
  --ink-2: #4a505c;
  --ink-3: #7a808c;
  --line: #e7e1d8;
  --bg: #fdfbf8;
  --cream: #f6ede2;
  --cream-2: #fbf6ef;
  --coffee: #8b5a3c;
  --teal: #2e9187;
  --teal-ink: #1f6b63;
  --teal-soft: #e3f2ef;
  --radius: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
code, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { background: #1d2026; color: #e9e6e0; padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(253, 251, 248, 0.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2b2f37; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { color: var(--ink); border-color: #d6cdc0; }
.nav .btn { padding: 8px 16px; color: #fff; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }

/* Hero */
.hero { padding: 88px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, var(--teal-soft), transparent 60%), radial-gradient(900px 400px at 0% 0%, var(--cream), transparent 55%); }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; color: var(--teal-ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 74px); line-height: 1.02; letter-spacing: -0.035em; margin: 22px 0 18px; max-width: 13em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--teal); }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); max-width: 38em; margin: 0 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* Product window mock */
.window { margin-top: 56px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px -30px rgba(40, 30, 20, 0.28), 0 2px 6px rgba(40, 30, 20, 0.05); overflow: hidden; }
.window-bar { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--cream-2); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #e2d8cb; }
.window-body { display: grid; grid-template-columns: 220px 1fr; min-height: 360px; }
.window-side { border-right: 1px solid var(--line); padding: 16px 12px; font-size: 14px; color: var(--ink-2); background: #fcfaf6; }
.window-side div { padding: 7px 10px; border-radius: 8px; }
.window-side .on { background: var(--cream); color: var(--ink); }
.window-main { padding: 26px 32px; display: flex; flex-direction: column; gap: 16px; }
.bubble-q { align-self: flex-end; background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 16px 16px 4px 16px; max-width: 70%; font-size: 15px; }
.bubble-a { font-size: 15px; color: var(--ink); max-width: 92%; }
.bubble-a sup { color: var(--teal-ink); font-weight: 600; }
.served { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.served b { width: 8px; height: 8px; border-radius: 50%; background: #3cb371; display: inline-block; }
.caption { font-size: 13px; color: var(--ink-3); margin-top: 10px; text-align: center; }

/* Sections */
section { padding: 88px 0; }
.section-cream { background: var(--cream-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coffee); margin: 0 0 12px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 16px; max-width: 18em; }
h3 { font-size: 20px; letter-spacing: -0.01em; margin: 0 0 8px; }
.section-lede { color: var(--ink-2); font-size: 19px; max-width: 40em; margin: 0 0 40px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { color: var(--ink-2); margin: 0; font-size: 16px; }
.icon { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }
.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: grid; place-items: center; }
.stat { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.compare { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 16px; }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { background: var(--cream-2); font-size: 14px; color: var(--ink-2); font-weight: 600; }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; width: 26%; }
.diagram { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }
.band { background: var(--ink); color: #f3efe9; border-radius: 24px; padding: 56px; display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: #fff; margin: 0 0 8px; }
.band p { color: #c9c4bc; margin: 0; max-width: 34em; }
.band .btn-primary { background: #fff; color: var(--ink); }

/* Docs pages: three columns like Jan's docs (sidebar, article, "On this page"). */
.page { padding: 64px 0 96px; }
.docs { max-width: 1320px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 48px; }
.doc-nav { position: sticky; top: 65px; align-self: start; max-height: calc(100vh - 65px); overflow-y: auto; padding: 28px 8px 40px 0; font-size: 14.5px; }
.doc-nav nav > a, .doc-section a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.doc-nav a:hover { background: var(--cream-2); color: var(--ink); }
.doc-nav a[aria-current="page"] { background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; }
.doc-group { font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 22px 10px 6px; }
.doc-group:first-child { margin-top: 8px; }
.doc-section summary { list-style: none; cursor: pointer; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); display: flex; justify-content: space-between; }
.doc-section summary::-webkit-details-marker { display: none; }
.doc-section summary::after { content: "›"; color: var(--ink-3); transition: transform .15s; }
.doc-section[open] summary::after { transform: rotate(90deg); }
.doc-section summary:hover { background: var(--cream-2); color: var(--ink); }
.doc-section a { margin-left: 12px; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.doc-search { position: relative; margin-bottom: 14px; }
.doc-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 8px 34px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.doc-search input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.doc-search kbd { position: absolute; right: 9px; top: 7px; font: 12px var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--cream-2); }
.doc-results { position: absolute; z-index: 6; left: 0; width: 360px; max-width: 86vw; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(40, 30, 20, .35); padding: 6px; }
.doc-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.doc-results a:hover, .doc-results a:focus { background: var(--cream-2); }
.doc-results span { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.doc-results p { margin: 8px 10px; font-size: 14px; color: var(--ink-2); }
.doc-body { padding: 36px 0 80px; min-width: 0; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin: 0 0 16px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs span { margin: 0 8px; }
.doc-toc { position: sticky; top: 65px; align-self: start; padding: 36px 0; font-size: 13.5px; }
.doc-toc p { font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.doc-toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 3px 0; }
.doc-toc a:hover { color: var(--teal-ink); }
.doc-toc .toc-3 { padding-left: 14px; }
.toc-foot { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.toc-foot a { color: var(--ink-3); }
.doc-menu { display: none; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(30px, 4vw, 40px); letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 14px; }
.prose h2 { font-size: 24px; margin: 44px 0 10px; padding-top: 8px; scroll-margin-top: 80px; }
.prose h3 { font-size: 19px; margin-top: 28px; scroll-margin-top: 80px; }
.prose .anchor { margin-left: 8px; color: var(--ink-3); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p, .prose li { color: #2c3039; }
.prose li { margin: 4px 0; }
.prose .lede { margin-bottom: 24px; }
.prose pre { background: #1d1f24; color: #eae6df; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--cream-2); }
.steps { counter-reset: dstep; border-left: 1px solid var(--line); margin: 24px 0 24px 14px; padding-left: 30px; }
.steps > h3 { position: relative; counter-increment: dstep; margin-top: 30px; }
.steps > h3:first-child { margin-top: 0; }
.steps > h3::before { content: counter(dstep); position: absolute; left: -46px; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); border: 4px solid var(--bg); color: var(--ink); font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.callout { border-radius: 12px; padding: 14px 18px; margin: 20px 0; border: 1px solid; font-size: 15.5px; }
.callout p { margin: 0; color: inherit; }
.callout b:first-child { margin-right: 4px; }
.callout.note, .note { background: var(--teal-soft); border-color: #c8e5e0; color: #1d4d48; }
.callout.tip { background: #eef6ea; border-color: #cfe3c4; color: #2b4a20; }
.callout.warning { background: #fdf3e2; border-color: #f0d9ae; color: #6a4810; }
.note { border: 1px solid #c8e5e0; border-radius: 12px; padding: 14px 18px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.cards a { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-weight: 600; }
.cards a:hover { border-color: #d3c8ba; box-shadow: 0 8px 22px -16px rgba(40, 30, 20, .4); }
.cards span { display: block; color: var(--ink-2); font-size: 14.5px; margin-top: 4px; font-weight: 400; }
.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 56px; padding-top: 24px; }
.pager a { text-decoration: none; color: var(--ink); font-weight: 600; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 48%; }
.pager a:hover { border-color: #d3c8ba; }
.pager span { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.pager .next { margin-left: auto; text-align: right; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-decoration: none; }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 240px minmax(0, 1fr); }
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  .grid-3, .grid-2, .cards { grid-template-columns: 1fr; }
  .window-body { grid-template-columns: 1fr; }
  .window-side { display: none; }
  .docs { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .doc-menu { display: block; margin-top: 16px; font: inherit; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; justify-self: start; }
  .doc-nav { display: none; position: static; max-height: none; padding: 12px 0; }
  .doc-nav.open { display: block; }
  .doc-body { padding-top: 16px; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: flex-start; background: var(--bg); border-bottom: 1px solid var(--line); padding: 16px 24px; gap: 14px; }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-block; }
  section { padding: 64px 0; }
  .band { padding: 36px 28px; }
  .hero { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
