/* The marketing pages (pricing, docs, blog, forms) in the home page's Liquid Glass. Loaded after r2.css and site.css
   by components/glass/glass-shell.tsx, never by the home page. Every color is an r2 token, so both themes follow
   [data-theme] the way the home page does. */

/* ---------- the app's Tailwind (shadcn) palette follows the glass theme ----------
   Leftover Tailwind pieces (the docs table of contents, the toaster) read these HSL triplets. (0,2,0) beats the
   .dark class that next-themes sets on <html>, so they match the glass theme, not next-themes. */
:root[data-theme=light] {
  --background: 0 0% 100%;
  --foreground: 240 3% 11%;
  --muted: 240 5% 94%;
  --muted-foreground: 240 6% 25%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 3% 11%;
  --card: 0 0% 100%;
  --card-foreground: 240 3% 11%;
  --border: 240 6% 86%;
  --input: 240 6% 80%;
  --primary: 210 100% 31%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 5% 94%;
  --secondary-foreground: 240 3% 11%;
  --accent: 240 5% 94%;
  --accent-foreground: 240 3% 11%;
  --ring: 213 100% 18%;
}
:root[data-theme=dark] {
  --background: 230 29% 3%;
  --foreground: 240 11% 96%;
  --muted: 232 12% 14%;
  --muted-foreground: 240 7% 80%;
  --popover: 232 14% 10%;
  --popover-foreground: 240 11% 96%;
  --card: 232 14% 10%;
  --card-foreground: 240 11% 96%;
  --border: 240 5% 24%;
  --input: 240 5% 30%;
  --primary: 209 100% 74%;
  --primary-foreground: 230 29% 3%;
  --secondary: 232 12% 14%;
  --secondary-foreground: 240 11% 96%;
  --accent: 232 12% 14%;
  --accent-foreground: 240 11% 96%;
  --ring: 209 100% 74%;
}

/* ---------- the theme switch shows the action for the current theme (CSS, so no hydration mismatch) ---------- */
.gp-when-dark { display: contents; }
.gp-when-light { display: contents; }
:root[data-theme=dark] .gp-when-light,
:root:not([data-theme=dark]) .gp-when-dark { display: none; }

/* ---------- frame ---------- */
.gp-page { display: flex; flex-direction: column; min-height: 100svh; }
.gp-main { flex: 1; width: 100%; padding: 104px 24px 56px; }
.gp-page > .foot { margin-top: 0; }
.gp-wrap { width: 100%; max-width: 1120px; margin: 0 auto; }
.gp-gap { display: grid; gap: 72px; }
.gp-center { text-align: center; }
.gp-head { margin-bottom: 32px; display: grid; gap: 10px; }
.gp-head.gp-center { justify-items: center; }
.gp-title { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; font-weight: 680; letter-spacing: -.025em; color: var(--r2-ink); text-wrap: balance; overflow-wrap: anywhere; }
.gp-h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; font-weight: 680; letter-spacing: -.02em; color: var(--r2-ink); text-wrap: balance; }
.gp-lede { font-size: 17px; line-height: 1.55; color: var(--r2-ink-2); max-width: 62ch; }
.gp-center .gp-lede { margin-inline: auto; }
.gp-fine { font-size: 14px; line-height: 1.5; color: var(--r2-ink-2); }
.gp-fine a, .gp-lede a { color: var(--r2-accent); text-decoration: underline; text-underline-offset: 3px; }
.gp-block { width: 100%; }
.gp-stack { display: grid; gap: 10px; justify-items: stretch; }
.gp-error { font-size: 14px; color: var(--r2-v-unreliable); }
.gp-spinner { width: 28px; height: 28px; margin: 8px auto; color: var(--r2-ink-2); animation: gp-spin 1s linear infinite; }
@keyframes gp-spin { to { transform: rotate(360deg); } }

/* a single glass panel: forms, sign-in, thank-you pages */
.gp-panel { width: 100%; padding: 32px; border-radius: 32px; display: grid; gap: 16px; }
.gp-narrow { max-width: 560px; margin: 0 auto; }
.gp-panel.gp-center { justify-items: center; }
.gp-panel.gp-center .btn { min-width: 200px; }
.gp-ok-ic { width: 56px; height: 56px; color: var(--r2-v-credible); }
.gp-status { font-size: 15px; color: var(--r2-ink-2); text-align: center; }

/* ---------- pricing ---------- */
.gp-pricing { display: grid; gap: 32px; }
.gp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 24px; }
.gp-plan { max-width: none; align-content: stretch; grid-template-rows: auto auto auto 1fr auto; }
.gp-plan-pro { background: linear-gradient(180deg, var(--r2-pro-a), var(--r2-pro-b)); }
.gp-plan-name { font-size: 20px; font-weight: 700; color: var(--r2-ink); }
.gp-ticks { align-self: start; margin-top: 6px; }
.gp-ticks li { line-height: 1.4; }
.gp-limit { color: var(--r2-ink-2); }
.gp-limit .ic { color: var(--r2-ink-2); }
.gp-plan-act { margin-top: 10px; display: grid; }
.gp-plan-act .btn[disabled] { cursor: default; opacity: .75; }
.gp-pricing > .gp-fine { max-width: 62ch; margin: 0 auto; text-align: center; }
.gp-faq { display: grid; gap: 16px; justify-items: center; }
.gp-faq .faq-list { width: 100%; }
.gp-faq .gp-lede { text-align: center; }

/* pricing skeleton */
.gp-skel { border-radius: 14px; background: var(--r2-fill); }
.gp-skel-plan { min-height: 360px; }
@media (prefers-reduced-motion: no-preference) {
  .gp-skel { animation: gp-pulse 1.6s ease-in-out infinite; }
}
@keyframes gp-pulse { 50% { opacity: .55; } }

/* ---------- docs: sidebar, article, table of contents ---------- */
.gp-docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; align-items: start; }
.gp-docs-side { position: sticky; top: 88px; }
.gp-side { padding: 16px 12px; border-radius: 24px; display: grid; gap: 14px; }
.gp-side ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.gp-side-title { padding: 0 10px; font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--r2-ink-2); }
.gp-side a { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 12px; color: var(--r2-ink); font-size: 15px; text-decoration: none; }
.gp-side a:hover { background: var(--r2-hover); }
.gp-side a[aria-current=page] { background: var(--r2-fill); color: var(--r2-accent); font-weight: 650; }
.gp-docs-main { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: start; min-width: 0; }
.gp-docs-main:not(:has(> .gp-toc)) { grid-template-columns: minmax(0, 1fr); }
.gp-article { min-width: 0; padding: 40px 44px; border-radius: 32px; }
.gp-article-head { display: grid; gap: 12px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--r2-line); }
.gp-pager { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--r2-line); }
.gp-push { margin-left: auto; }
.gp-toc { position: sticky; top: 88px; }
.gp-toc-inner { padding: 18px 20px; border-radius: 24px; font-size: 14px; max-height: calc(100svh - 120px); overflow: auto; }
.gp-toc-inner p { font-weight: 650; color: var(--r2-ink); }
.gp-toc-inner a { color: var(--r2-ink-2); text-decoration: none; }
.gp-toc-inner a:hover { color: var(--r2-ink); text-decoration: underline; }
.gp-toc-inner a.text-primary { color: var(--r2-accent); }

/* ---------- prose: MDX docs and posts, about 70 characters a line (35em of Inter) ---------- */
.gp-prose { max-width: 35em; color: var(--r2-ink); font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.gp-prose > * + * { margin-top: 1em; }
.gp-prose h1, .gp-prose h2, .gp-prose h3, .gp-prose h4 { color: var(--r2-ink); font-weight: 680; letter-spacing: -.015em; line-height: 1.25; scroll-margin-top: 96px; }
.gp-prose h1 { font-size: 30px; margin-top: 1.6em; }
.gp-prose h2 { font-size: 24px; margin-top: 1.8em; }
.gp-prose h3 { font-size: 20px; margin-top: 1.5em; }
.gp-prose h4 { font-size: 17px; margin-top: 1.4em; }
.gp-prose > :first-child { margin-top: 0; }
.gp-prose p, .gp-prose li { color: var(--r2-ink); }
.gp-prose a { color: var(--r2-accent); text-decoration: underline; text-underline-offset: 3px; }
.gp-prose strong { font-weight: 680; }
.gp-prose ul, .gp-prose ol { padding-left: 1.4em; }
.gp-prose ul { list-style: disc; }
.gp-prose ol { list-style: decimal; }
.gp-prose li + li { margin-top: .35em; }
.gp-prose li > ul, .gp-prose li > ol { margin-top: .35em; }
.gp-prose li::marker { color: var(--r2-ink-2); }
.gp-prose blockquote { padding: 4px 0 4px 18px; border-left: 3px solid var(--r2-accent); color: var(--r2-ink-2); font-style: italic; }
.gp-prose hr { border: 0; border-top: 1px solid var(--r2-line); margin: 2em 0; }
.gp-prose img { max-width: 100%; height: auto; border-radius: 18px; }
.gp-prose code { padding: 2px 6px; border-radius: 6px; background: var(--r2-fill); font: .88em/1.5 ui-monospace, Consolas, monospace; }
.gp-prose pre { padding: 16px 18px; border-radius: 16px; background: var(--r2-fill); border: 1px solid var(--r2-line); overflow-x: auto; font-size: 14px; line-height: 1.55; }
.gp-prose pre code { padding: 0; background: none; font-size: inherit; }
.gp-table { overflow-x: auto; border-radius: 16px; border: 1px solid var(--r2-line); }
.gp-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.gp-table th, .gp-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--r2-line); }
.gp-table th { font-weight: 650; background: var(--r2-fill); }
.gp-table tr:last-child td { border-bottom: 0; }
.gp-callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: 18px; border: 1px solid var(--r2-line); background: var(--r2-fill); }
.gp-callout[data-type=warning] { background: var(--r2-wash-unverified); }
.gp-callout[data-type=danger] { background: var(--r2-wash-unreliable); }
.gp-mdx-card { padding: 18px 20px; border-radius: 22px; }
.gp-mdx-card[data-disabled] { opacity: .6; }
/* a whole card is its link */
.gp-stretch { color: inherit; text-decoration: none; }
.gp-stretch::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.gp-stretch:focus-visible { outline: none; }
.gp-stretch:focus-visible::before { outline: 3px solid var(--cq-focus-ring); outline-offset: 3px; }

/* ---------- blog ---------- */
.gp-block-sec { display: grid; gap: 18px; margin-top: 40px; }
.gp-block-sec:first-of-type { margin-top: 0; }
.gp-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 28px; transition: transform .25s var(--r2-ease); }
.gp-card:hover { transform: translateY(-2px); }
.gp-card-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
.gp-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.gp-card-body { display: grid; gap: 8px; align-content: start; padding: 20px 24px 24px; }
.gp-card-meta { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--r2-ink-2); }
.gp-card-title { font-size: 20px; line-height: 1.25; font-weight: 680; letter-spacing: -.015em; color: var(--r2-ink); }
.gp-card-title-lg { font-size: clamp(22px, 2.4vw, 30px); }
.gp-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gp-card-text { font-size: 16px; line-height: 1.55; color: var(--r2-ink-2); }
.gp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }

/* blog post */
.gp-post { max-width: 820px; margin: 0 auto; display: grid; gap: 24px; }
.gp-post-head { display: grid; gap: 14px; justify-items: start; }
.gp-back { margin-bottom: 8px; }
.gp-authors { display: flex; flex-wrap: wrap; gap: 16px; }
.gp-author { display: flex; align-items: center; gap: 10px; color: var(--r2-ink); text-decoration: none; font-size: 14px; }
.gp-author img { border-radius: 50%; }
.gp-author span span { display: block; color: var(--r2-ink-2); }
.gp-post-img { width: 100%; height: auto; border-radius: 28px; }
.gp-post .gp-article .gp-prose { margin: 0 auto; }
.gp-post-foot { display: flex; justify-content: center; }

/* ---------- forms ---------- */
.gp-form { display: grid; gap: 18px; }
.gp-field { display: grid; gap: 8px; }
.gp-label { font-size: 15px; font-weight: 600; color: var(--r2-ink); }
.gp-input {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px;
  border: 1px solid var(--r2-btn-border); background: var(--r2-btn); color: var(--r2-ink);
  font: 400 16px/1.45 var(--cq-font-sans);
  box-shadow: inset 0 1px 2px var(--r2-fill);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.gp-input::placeholder { color: var(--r2-ink-2); opacity: 1; }
.gp-input:hover { border-color: var(--r2-dot); }
.gp-input:focus-visible { outline: 3px solid var(--cq-focus-ring); outline-offset: 2px; }
textarea.gp-input { resize: vertical; min-height: 120px; }
select.gp-input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--r2-ink-2) 50%), linear-gradient(135deg, var(--r2-ink-2) 50%, transparent 50%); background-position: right 20px center, right 14px center; background-size: 6px 6px; background-repeat: no-repeat; }
select.gp-input option { background: var(--r2-solid); color: var(--r2-ink); }

/* FAQ & Help: search, category chips, accordion */
.gp-narrow-wide { max-width: 860px; }
.gp-search { position: relative; margin-bottom: 18px; }
.gp-search .gp-input { padding-left: 46px; border-radius: 999px; }
.gp-search-ic { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--r2-ink-2); pointer-events: none; z-index: 1; }
.gp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.gp-chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--r2-btn-border); background: var(--r2-btn); color: var(--r2-ink); font: 600 15px/1 var(--cq-font-sans); cursor: pointer; }
.gp-chip:hover { background: var(--r2-btn-hover); }
.gp-chip[aria-pressed=true] { background: var(--r2-ink); border-color: var(--r2-ink); color: var(--r2-bg); }
.gp-acc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gp-acc-item { border-radius: 22px; }
.gp-acc-item h2 { margin: 0; font-size: inherit; }
.gp-acc-q { position: relative; z-index: 1; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 22px; border: 0; background: none; color: var(--r2-ink); font: 650 17px/1.35 var(--cq-font-sans); text-align: left; cursor: pointer; border-radius: 22px; }
.gp-acc-q > span { min-width: 0; overflow-wrap: anywhere; }
.gp-acc-q svg { flex: none; width: 20px; height: 20px; color: var(--r2-ink-2); }
.gp-acc-a { position: relative; z-index: 1; padding: 0 22px 18px; max-width: 68ch; font-size: 16px; line-height: 1.6; color: var(--r2-ink-2); }

/* subscribed */
.gp-sites { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.gp-sites a { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--r2-ink-2); }
.gp-sites a:hover { color: var(--r2-ink); background: var(--r2-hover); }
.gp-sites svg { width: 26px; height: 26px; }
@media (prefers-reduced-motion: no-preference) {
  .gp-pop { animation: gp-pop .5s var(--r2-ease) both; }
}
@keyframes gp-pop { from { opacity: 0; transform: translateY(16px); } }

/* glass content sits above the .lg sheen */
.gp-card-body, .gp-article > *, .gp-panel > *, .gp-plan > *, .gp-side > *, .gp-toc-inner > *, .gp-mdx-card > * { position: relative; z-index: 1; }
.gp-card-body { position: static; }
.gp-card-body > * { position: relative; }
.gp-card-title { position: static; }
.gp-card-title .gp-stretch, .gp-mdx-card > .gp-stretch { position: static; }

/* ---------- narrower screens ---------- */
@media (max-width: 1199px) {
  .gp-docs-main { grid-template-columns: minmax(0, 1fr); }
  .gp-toc { display: none; }
}
@media (max-width: 899px) {
  .gp-main { padding: 88px 16px 40px; }
  .gp-gap { gap: 48px; }
  .gp-plans { grid-template-columns: minmax(0, 1fr); }
  .gp-plan { grid-template-rows: none; }
  .gp-docs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gp-docs-side { position: static; }
  .gp-side { padding: 12px; gap: 8px; }
  .gp-side > div { display: grid; gap: 4px; }
  .gp-side ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .gp-side a { min-height: 44px; }
  .gp-article { padding: 24px 20px; border-radius: 24px; }
  .gp-panel { padding: 24px 20px; border-radius: 24px; }
  .gp-card-wide { grid-template-columns: minmax(0, 1fr); }
  .gp-card { border-radius: 24px; }
  .gp-prose { font-size: 16px; }
  .gp-acc-q { padding: 12px 18px; font-size: 16px; }
  .gp-acc-a { padding: 0 18px 16px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .gp-card, .gp-card:hover { transition: none; transform: none; }
  .gp-spinner { animation-duration: 3s; }
  html { scroll-behavior: auto; }
}
