/* The site's text pages (legal, security, blog), built by tools/build_pages.py.
   Loaded after v2.css: the tokens, the dock, the buttons and the footer come from there. */

.textpage main { position: relative; z-index: 1; }
.textpage .footer { margin-top: 140px; }
/* the blue light at the top of the page, clipped by the page's own box so it can never widen the page */
.doc { position: relative; overflow: clip; }
.doc::before {
  content: ""; position: absolute; left: 50%; top: -200px; width: 1200px; height: 760px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(50% 50% at 50% 30%, rgba(26, 47, 230, 0.2), transparent 70%);
}
.doc { padding-top: calc(var(--header-h) + 96px); }
.doc-head { max-width: 780px; }
.doc-head .h1 { margin-top: 18px; }
.doc-meta { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; font: 400 12.5px/1.6 var(--mono); color: var(--muted); }
.doc-meta p { margin: 0; }
.doc-meta strong { font-weight: 500; color: var(--fg-2); }

.doc-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 72px; margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.doc-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; scrollbar-width: thin; }
.doc-toc ol { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.doc-toc a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); transition: color 0.16s var(--eo-quad), background 0.16s var(--eo-quad); }
.doc-toc a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.04); }

/* running text */
.prose { font-size: 15.5px; line-height: 1.72; color: var(--fg-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.4em; font-size: 22px; line-height: 1.25; letter-spacing: -0.016em; font-weight: 590; color: var(--fg); scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.9em; font-size: 17px; line-height: 1.35; font-weight: 590; color: var(--fg); scroll-margin-top: 96px; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose strong { font-weight: 590; color: var(--fg); }
.prose em { color: var(--fg-2); }
.prose a { color: var(--cobalt-3); text-decoration: underline; text-decoration-color: rgba(142, 160, 255, 0.35); text-underline-offset: 3px; transition: text-decoration-color 0.16s var(--eo-quad); overflow-wrap: anywhere; }
.prose a:hover { text-decoration-color: currentColor; }
.prose p.li { margin-top: 0.55em; padding-left: 28px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--faint); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose blockquote { padding-left: 18px; border-left: 2px solid var(--cobalt-2); color: var(--fg); }
.prose code { font: 400 0.88em/1 var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); }
.prose pre { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-1); overflow: auto; }
.prose pre code { padding: 0; background: none; font-size: 13px; line-height: 1.6; }
.prose img { border-radius: 12px; border: 1px solid var(--line); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, 0.02); }
.prose tr:last-child td { border-bottom: 0; }
/* a legal text's italic source line ("From Privacy Policy, Section 12.1") */
.prose p > em:only-child { font: 400 12px/1.5 var(--mono); font-style: normal; color: var(--muted); }
.prose p > em:only-child a { color: var(--muted); }

/* ---------- blog ---------- */
.post-lede { margin-top: 18px; max-width: 620px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.post-head .back { font-size: 13px; }
.post-head .back svg { width: 13px; height: 13px; }
.post-head .back:hover svg { transform: translateX(-3px); }
.post-head .h1 { margin-top: 26px; }
.post-meta { display: flex; gap: 18px; margin-top: 22px; font: 400 12px/1 var(--mono); letter-spacing: 0.04em; color: var(--faint); }
.post-body { max-width: 720px; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.post-cta { max-width: 720px; margin-top: 72px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-1), var(--bg)); display: grid; gap: 14px; justify-items: start; }
.post-cta p { font-size: 17px; line-height: 1.45; color: var(--fg); max-width: 460px; }

.post-list { margin-top: 64px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-1); transition: border-color 0.2s var(--eo-quad), background 0.2s var(--eo-quad); }
.post-card:hover { border-color: var(--line-2); background: var(--bg-2); }
.post-card time { font: 400 12px/1 var(--mono); color: var(--faint); }
.post-card h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.016em; font-weight: 590; }
.post-card p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.post-card .link-arrow { margin-top: auto; padding-top: 8px; font-size: 14px; }
.post-card:hover .link-arrow { color: var(--fg); }
.post-card:hover .link-arrow svg { transform: translateX(3px); }

.blog-empty { margin-top: 64px; max-width: 620px; padding: 40px; border-radius: 22px; border: 1px dashed var(--line-2); background: linear-gradient(180deg, var(--bg-1), transparent); }
.blog-empty-mark { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.blog-empty-mark .mark { width: 20px; height: 20px; }
.blog-empty h2 { margin-top: 24px; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 510; }
.blog-empty p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.blog-empty-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 26px; }

@media (max-width: 1024px) {
  .doc-grid { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { position: static; max-height: none; margin-bottom: 48px; padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-1); }
  .doc-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
}
@media (max-width: 640px) {
  .doc { padding-top: calc(var(--header-h) + 56px); }
  .doc-grid { margin-top: 44px; padding-top: 28px; }
  .doc-toc ol { grid-template-columns: 1fr; }
  .prose { font-size: 14.5px; }
  .prose h2 { font-size: 19px; }
  .prose p.li { padding-left: 16px; }
  .post-list { grid-template-columns: 1fr; margin-top: 44px; }
  .post-card { padding: 22px; }
  .blog-empty { margin-top: 44px; padding: 26px 22px; }
  .textpage .footer { margin-top: 100px; }
}
