/* Public site pages: blog, docs and legal (on top of landing.css). */
[hidden] { display: none !important; }

/* Colour tokens on top of landing.css; [data-theme="dark"] is the night look (same switch as in the app). */
:root { --page: #FFFFFF; --glass: rgba(255,255,255,.92); --soft: #F4F3EF; --soft-2: #EFEDE8; --text: #2A2925; --hl: #EEF3FB; --hl-line: #D6E3F7;
  --tip: #EEF6F0; --tip-line: #D3EBDA; --imp: #FDF3EC; --imp-line: #F6DCC9; --blue: #3B7DED; color-scheme: light; }
[data-theme="dark"] { --bg: #151515; --surface: #1D1D1D; --ink: #ECEBE7; --ink-2: #A3A29A; --ink-3: #77766F; --line: #262625; --line-2: #3A3A38;
  --page: #151515; --glass: rgba(21,21,21,.88); --soft: #1F1F1E; --soft-2: #2A2A28; --text: #D9D8D3; --hl: rgba(143,139,255,.14); --hl-line: rgba(143,139,255,.35);
  --tip: rgba(63,185,80,.10); --tip-line: rgba(63,185,80,.30); --imp: rgba(240,136,62,.10); --imp-line: rgba(240,136,62,.30); --blue: #8F8BFF; color-scheme: dark; }
[data-theme="dark"] .lp-btn-dark { color: #151515; }
[data-theme="dark"] .lp-btn-dark:hover { background: #FFFFFF; }
[data-theme="dark"] .lp-header.is-scrolled .lp-header-in { background: rgba(29,29,29,.88); }
[data-theme="dark"] .ba-draft { background: rgba(227,179,65,.12); color: #E3B341; }
[data-theme="dark"] .prose a { text-decoration-color: var(--ink-3); }

/* Day / night switch (the same look as in the app's account menu) */
.tsw { position: relative; width: 44px; height: 24px; border-radius: 12px; border: 0; padding: 0; flex: none; cursor: pointer; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.tsw-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--page); color: var(--ink-2); box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.tsw-knob svg { width: 12px; height: 12px; grid-area: 1 / 1; transition: opacity .2s ease, transform .25s ease; }
.tsw-moon { opacity: 0; transform: rotate(-60deg); }
[data-theme="dark"] .tsw-knob { transform: translateX(20px); color: var(--ink); background: #3A3A38; }
[data-theme="dark"] .tsw-sun { opacity: 0; transform: rotate(60deg); }
[data-theme="dark"] .tsw-moon { opacity: 1; transform: none; }
.lp-nav a[aria-current="page"] { color: var(--ink); }

/* ---------------------------------------------------------------- blog list */
.bl { padding-top: 136px; padding-bottom: 40px; }
.bl-title { font-size: clamp(40px, 5vw, 60px); font-weight: 500; letter-spacing: -.03em; }
.bl-empty { margin-top: 32px; color: var(--ink-2); }
.bl-meta { font-size: 14px; color: var(--ink-3); }
.bl-feature { margin-top: 56px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.bl-feature-img, .bl-card-img { border-radius: 20px; overflow: hidden; background: var(--soft-2); aspect-ratio: 16 / 9; }
.bl-feature-img img, .bl-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
/* .bl-feature:hover .bl-feature-img img { transform: scale(1.025); } -- the featured image stays still */
.bl-card:hover .bl-card-img img { transform: scale(1.025); }
.bl-ph { width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(60% 80% at 15% 20%, #F6B48F 0%, transparent 60%), radial-gradient(50% 70% at 85% 15%, #B9D3EE 0%, transparent 60%), linear-gradient(120deg, #EE7E4E, #F3A77C 45%, #E9B7A4 70%, #C7D7EA); }
.bl-feature-img .bl-ph img, .bl-card-img .bl-ph img { width: 22%; max-width: 120px; height: auto; object-fit: contain; transform: none; }
.bl-feature-txt h2 { margin-top: 18px; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.03em; font-weight: 500; }
.bl-excerpt { margin-top: 18px; font-size: 18px; color: var(--ink-2); }
.bl-feature-txt .lp-btn { margin-top: 26px; }
.bl-grid { margin-top: 88px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.bl-card .bl-meta { margin-top: 16px; }
.bl-card h3 { margin-top: 6px; font-size: 21px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; }
.bl-card .bl-excerpt { margin-top: 8px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- article */
.ba { padding-top: 120px; }
.ba-draft { margin-bottom: 20px; padding: 10px 14px; border-radius: 10px; background: #FFF8C5; color: #7A5600; font-size: 14px; }
.ba-back { font-size: 14px; color: var(--ink-3); }
.ba-back:hover { color: var(--ink); }
.ba-head { max-width: 820px; margin-top: 28px; }
.ba-head h1 { margin-top: 14px; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -.03em; font-weight: 500; }
.ba-lead { margin-top: 18px; font-size: 20px; color: var(--ink-2); }
.ba-by { margin-top: 18px; font-size: 14px; color: var(--ink-3); }
.ba-cover { display: block; width: 100%; margin-top: 44px; border-radius: 20px; aspect-ratio: 16 / 8; object-fit: cover; }
.ba-layout { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 720px) 220px; gap: 80px; justify-content: space-between; }
.ba-more { margin-top: 96px; padding-top: 48px; border-top: 1px solid var(--line); }
.ba-more h2 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.ba-more .bl-grid { margin-top: 32px; }

/* Long-form text (blog, docs, legal) */
.prose { font-size: 17px; line-height: 1.75; color: var(--text); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; color: var(--ink); scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.8em; font-size: 21px; line-height: 1.3; font-weight: 600; color: var(--ink); scroll-margin-top: 96px; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--line-2); color: var(--ink-2); font-style: italic; }
.prose code { font: 14px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 2px 6px; border-radius: 6px; background: var(--soft-2); }
.prose figure img { width: 100%; border-radius: 14px; display: block; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.prose kbd { font: 500 12px/1 var(--body); padding: 3px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--page); }

/* "On this page" */
.toc { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow: auto; padding-left: 16px; border-left: 1px solid var(--line); }
.toc p { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.toc a { position: relative; display: block; font-size: 14px; line-height: 1.45; color: var(--ink-3); padding: 7px 0; transition: color .2s ease; }
.toc a.toc-l3 { padding-left: 14px; }
.toc a:hover { color: var(--ink); }
.toc a.is-on { color: var(--ink); }
/* one bar on the left line that glides to the heading you are reading */
.toc-bar { position: absolute; left: -1px; top: 0; width: 2px; height: 1px; border-radius: 1px; background: var(--ink); opacity: 0;
  transform-origin: 0 0; will-change: transform;
  transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .25s ease; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .toc-bar { transition: none; } }

@media (max-width: 1000px) {
  .bl-feature { grid-template-columns: 1fr; gap: 28px; }
  .bl-grid { grid-template-columns: 1fr 1fr; }
  .ba-layout { grid-template-columns: 1fr; }
  .ba-layout .toc { display: none; }
}
@media (max-width: 600px) {
  .bl, .ba { padding-top: 104px; }
  .bl-grid { grid-template-columns: 1fr; margin-top: 56px; }
  .prose { font-size: 16px; }
  .ba-cover { aspect-ratio: 16 / 10; border-radius: 14px; }
}

/* ---------------------------------------------------------------- docs and legal */
.dc-body { background: var(--page); }
.dc-top { position: sticky; top: 0; z-index: 50; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 24px;
  background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dc-brand { font-size: 20px; }
.dc-brand-tag { font-size: 14px; font-weight: 500; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line-2); line-height: 1; }
.dc-search { margin: 0 auto; width: min(480px, 40vw); height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--page); color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s; }
.dc-search:hover { border-color: var(--ink-3); }
.dc-search svg { width: 17px; height: 17px; }
.dc-search span { flex: 1; text-align: left; }
.dc-search kbd { font: 500 11px/1 var(--body); padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink-3); }
.dc-links { display: flex; gap: 22px; }
.dc-links a { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 22px 0; border-bottom: 2px solid transparent; }
.dc-links a:hover { color: var(--ink); }
.dc-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.dc-open { height: 36px; }
.dc-menu-btn { display: none; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 8px; color: var(--ink); cursor: pointer; }
.dc-menu-btn svg { width: 22px; height: 22px; }

.dc { display: grid; grid-template-columns: 264px minmax(0, 1fr) 232px; gap: 48px; max-width: 1440px; margin: 0 auto; padding: 0 24px; }
.dc-side { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow-y: auto; padding: 28px 8px 40px 0; border-right: 1px solid var(--line); background: var(--page); }
.dc-group + .dc-group { margin-top: 22px; }
.dc-group p { font-size: 13px; font-weight: 600; color: var(--ink); padding: 0 12px 6px; }
.dc-group a { display: block; font-size: 14px; color: var(--ink-2); padding: 7px 12px; border-radius: 8px; transition: background-color .12s, color .12s; }
.dc-group a:hover { background: var(--soft); color: var(--ink); }
.dc-group a.is-on { background: var(--soft-2); color: var(--ink); font-weight: 500; }
.dc-main { padding: 44px 0 40px; min-width: 0; max-width: 800px; }
.dc-crumb { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.dc-title { margin-top: 8px; font-size: clamp(32px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.025em; font-weight: 600; }
.dc-lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.dc-updated { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.dc-prose { margin-top: 36px; font-size: 16px; }
.dc-prose h2 { padding-top: 28px; border-top: 1px solid var(--line); font-size: 24px; }
.dc-prose h2:first-child { padding-top: 0; border-top: 0; }
.dc-prose h3 { font-size: 18px; }
.prose .tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose .tbl th { background: var(--soft); }
.prose .tbl tr:last-child td { border-bottom: 0; }
.prose blockquote.callout { font-style: normal; color: var(--text); padding: 14px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.prose blockquote.callout.is-tip { background: var(--tip); border-color: var(--tip-line); }
.prose blockquote.callout.is-important { background: var(--imp); border-color: var(--imp-line); }
.prose blockquote { margin-left: 0; margin-right: 0; }
.prose blockquote.callout.is-summary { background: var(--soft); }
.prose blockquote.callout.is-note { background: var(--hl); border-color: var(--hl-line); }
.dc-pager { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dc-pager a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.dc-pager a:hover { border-color: var(--ink-3); }
.dc-pager a.is-next { text-align: right; grid-column: 2; }
.dc-pager small { font-size: 13px; color: var(--ink-3); }
.dc-pager b { font-weight: 500; }
.dc-foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.dc-foot a:hover { color: var(--ink); }
.dc-toc { top: 108px; margin-top: 44px; }
.dc-scrim { position: fixed; inset: 64px 0 0; z-index: 44; background: rgba(0,0,0,.3); }
html.dc-lock { overflow: hidden; }

/* Search palette (the same look as the app's search) */
.cp-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; transition: background-color .16s ease; }
.cp-overlay.is-in { background: rgba(17,17,17,.38); backdrop-filter: blur(6px); }
.cp { width: min(680px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column; background: var(--page); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22); overflow: hidden; opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .16s ease, transform .16s ease; }
.cp-overlay.is-in .cp { opacity: 1; transform: none; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 0 18px; height: 58px; border-bottom: 1px solid var(--line); }
.cp-glass { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.cp-head input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.cp-head input::-webkit-search-cancel-button { display: none; }
.cp-close { border: 1px solid var(--line); background: var(--soft); color: var(--ink-2); border-radius: 6px; font: 500 11px/1 var(--body); padding: 5px 7px; cursor: pointer; }
.cp-list { overflow-y: auto; padding: 6px 8px 10px; }
.cp-group { padding: 12px 10px 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.cp-item.is-active { background: var(--hl); }
.cp-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--soft); color: var(--ink-2); }
.cp-ico svg { width: 17px; height: 17px; }
.cp-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cp-txt b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-txt small { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-go { font-size: 12px; color: var(--ink-3); opacity: 0; }
.cp-item.is-active .cp-go { opacity: 1; }
.cp-empty { padding: 32px 12px; text-align: center; color: var(--ink-2); font-size: 14px; }
html.cp-open { overflow: hidden; }

@media (max-width: 1180px) {
  .dc { grid-template-columns: 240px minmax(0, 1fr); }
  .dc-toc { display: none; }
}
@media (max-width: 860px) {
  .dc-top { padding: 0 12px; gap: 8px; }
  .dc-menu-btn { display: grid; place-items: center; }
  .dc-links, .dc-brand-tag, .dc-open { display: none; }
  .dc-search { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; margin-right: 0; margin-left: auto; }
  .dc-search span, .dc-search kbd { display: none; }
  .dc { grid-template-columns: 1fr; padding: 0 16px; gap: 0; }
  .dc-side { position: fixed; z-index: 45; left: 0; top: 64px; bottom: 0; height: auto; width: min(300px, 84vw); padding: 20px 12px 40px; transform: translateX(-100%); visibility: hidden; transition: transform .25s cubic-bezier(.2,.8,.2,1), visibility .25s; }
  .dc-side.is-open { transform: none; visibility: visible; box-shadow: 8px 0 24px rgba(0,0,0,.08); }
  .dc-main { padding-top: 28px; }
  .dc-pager { grid-template-columns: 1fr; }
  .dc-pager a.is-next { grid-column: 1; }
  .cp-overlay { padding: 0; }
  .cp-overlay.is-in { background: var(--page); backdrop-filter: none; }
  .cp { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .cp-close { font-size: 14px; padding: 8px 10px; border: 0; background: transparent; color: var(--blue); font-weight: 600; }
  .cp-go { display: none; }
}

.dc-sep { width: 1px; height: 24px; background: var(--line); flex: none; }
.lp-header-cta { display: flex; align-items: center; gap: 16px; }
@media (max-width: 860px) { .dc-sep { display: none; } }

/* Shared result page (/s/<token>) */
.sr { padding-top: 120px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.sr-card { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.12); }
.sr-txt h1 { margin-top: 12px; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; }
.sr-txt h1 span { white-space: nowrap; }
.sr-sub { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.sr-cta { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.sr-note { margin-top: 24px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 900px) { .sr { grid-template-columns: 1fr; gap: 28px; padding-top: 100px; } }

.sr-answers { padding-top: 24px; padding-bottom: 40px; max-width: 980px; }
.sr-answers h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.sr-answers h3 { margin-top: 24px; font-size: 18px; font-weight: 600; }
.sr-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sr-q { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 240px); gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 15px; }
.sr-q:first-child { border-top: 0; }
.sr-q-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--soft); }
.sr-q.is-ok .sr-q-n { background: var(--tip); color: #15803D; } .sr-q.is-bad .sr-q-n { background: var(--imp); color: #B42318; } .sr-q.is-part .sr-q-n { background: #FEF3C7; color: #B45309; }
.sr-q-t { color: var(--ink-2); }
.sr-q-a { display: grid; text-align: right; }
.sr-q-a small { color: var(--ink-3); font-size: 13px; }
@media (max-width: 700px) { .sr-q { grid-template-columns: 34px minmax(0, 1fr); } .sr-q-a { grid-column: 2; text-align: left; } }

.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
