recoder-site/public/styles.css
caelum0x 65bf2849ae feat(RCD-MON): fix recoder.xyz payment path -- checkout, webhook, entitlement
- POST /api/checkout creates a live Dodo checkout session from an allowlisted
  product slug (weekly/monthly/pro/pro_annual/team), never a client-supplied
  product id.
- POST /api/webhooks/dodo verifies the Standard Webhooks signature
  (webhook-id.webhook-timestamp.body, 5-min replay window) against a secret
  stored only as a Worker secret, records each delivery idempotently by
  webhook-id in D1, and upserts a per-customer entitlement row on
  subscription lifecycle events.
- GET /api/entitlement is an internal-only lookup gated by a shared-secret
  header, for Recoder's app / Rithub to check a customer's billing state.
- GET /api/portal resolves a checkout session's email, looks up the Dodo
  customer id from our own entitlements table, and redirects into Dodo's
  hosted customer portal -- no bespoke billing UI.
- New /thanks page with a "Manage subscription" link; pricing cards now
  trigger checkout via one click (no form -- Dodo's hosted page collects
  email/card).
- New D1 database recoder-billing (webhook_events + entitlements tables).

This re-points recoder.xyz at a real backend: the live Dodo webhook
(ep_3L0eElSCHnxNsth2aIBRdObJJzT) was 404ing against the old pure-static
site. Verified live: bad signature -> 401, correctly-signed test event ->
200 + D1 row + idempotent replay, all 5 live checkout URLs return 200 on
Dodo's hosted page, pricing/thanks screenshot clean at 1440 and 390 with
no console errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-12-01 16:14:37 +03:00

457 lines
6.5 KiB
CSS

:root {
--bg: #ffffff;
--surface: #f5f5f7;
--ink: #1d1d1f;
--muted: #6e6e73;
--line: #d2d2d7;
--accent: #0071e3;
--accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #000000;
--surface: #1c1c1e;
--ink: #f5f5f7;
--muted: #9a9aa0;
--line: #2c2c2e;
--accent: #2f8fff;
--accent-ink: #000000;
}
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
overflow-x: hidden;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
font-size: 17px;
line-height: 1.47;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
width: 100%;
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.wrap {
max-width: 980px;
margin: 0 auto;
padding: 0 24px;
}
.wrap-narrow {
max-width: 720px;
margin: 0 auto;
padding: 0 24px;
}
header.site {
padding: 20px 0;
border-bottom: 1px solid var(--line);
}
header.site .bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
}
.logo {
display: flex;
align-items: center;
gap: 8px;
font-weight: 600;
font-size: 19px;
letter-spacing: -0.01em;
color: var(--ink);
}
.logo svg {
width: 22px;
height: 22px;
flex-shrink: 0;
}
nav.site-nav {
display: flex;
align-items: center;
gap: 28px;
font-size: 15px;
color: var(--muted);
}
nav.site-nav a {
color: var(--muted);
}
nav.site-nav a:hover {
color: var(--ink);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 10px 20px;
border-radius: 980px;
font-size: 15px;
font-weight: 500;
text-decoration: none;
border: 1px solid transparent;
white-space: nowrap;
}
.btn:hover {
text-decoration: none;
}
.btn-accent {
background: var(--accent);
color: var(--accent-ink);
}
.btn-accent:hover {
opacity: 0.88;
}
.btn-plain {
background: transparent;
color: var(--ink);
border-color: var(--line);
}
.btn-plain:hover {
background: var(--surface);
}
main {
display: block;
}
section.hero {
padding: 100px 0 72px;
text-align: center;
}
section.hero h1 {
font-size: 64px;
font-weight: 600;
letter-spacing: -0.02em;
margin: 0 0 16px;
}
section.hero p.sub {
font-size: 21px;
color: var(--muted);
max-width: 620px;
margin: 0 auto 36px;
}
.hero-actions {
display: flex;
gap: 14px;
justify-content: center;
flex-wrap: wrap;
}
section.band {
padding: 72px 0;
border-top: 1px solid var(--line);
}
section.band.alt {
background: var(--surface);
}
h2.section-title {
font-size: 36px;
font-weight: 600;
letter-spacing: -0.015em;
text-align: center;
margin: 0 0 48px;
}
.steps {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}
.step {
text-align: left;
}
.step .num {
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--accent);
color: var(--accent-ink);
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 600;
margin-bottom: 16px;
}
.step h3 {
font-size: 19px;
font-weight: 600;
margin: 0 0 8px;
}
.step p {
color: var(--muted);
margin: 0;
font-size: 16px;
}
.features-line {
text-align: center;
color: var(--muted);
font-size: 16px;
}
.features-line strong {
color: var(--ink);
font-weight: 500;
}
.dot {
color: var(--line);
margin: 0 10px;
}
.pricing-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.plan-card {
background: var(--surface);
border-radius: 20px;
padding: 28px 24px;
display: flex;
flex-direction: column;
gap: 8px;
}
.plan-card.featured {
outline: 1px solid var(--accent);
}
.plan-card .name {
font-size: 17px;
font-weight: 600;
}
.plan-card .price {
font-size: 32px;
font-weight: 600;
letter-spacing: -0.01em;
margin-top: 4px;
}
.plan-card .price span {
font-size: 15px;
font-weight: 400;
color: var(--muted);
}
.plan-card .desc {
color: var(--muted);
font-size: 15px;
margin-top: 4px;
}
.plan-card .checkout-btn {
margin-top: 12px;
width: 100%;
border: 1px solid var(--line);
cursor: pointer;
font: inherit;
}
.plan-card .checkout-btn[disabled] {
opacity: 0.6;
cursor: default;
}
.checkout-error {
color: var(--muted);
font-size: 14px;
text-align: center;
margin-top: 16px;
display: none;
}
.checkout-error.visible {
display: block;
}
.includes {
margin-top: 24px;
padding: 28px;
border-radius: 20px;
background: var(--surface);
}
.includes h3 {
font-size: 17px;
margin: 0 0 12px;
}
.includes ul {
margin: 0;
padding-left: 20px;
color: var(--muted);
font-size: 16px;
}
.includes li {
margin-bottom: 6px;
}
article.legal h1 {
font-size: 40px;
font-weight: 600;
letter-spacing: -0.015em;
margin: 48px 0 4px;
}
article.legal .meta {
color: var(--muted);
font-size: 14px;
margin: 0 0 40px;
}
article.legal h2 {
font-size: 22px;
font-weight: 600;
margin: 40px 0 12px;
}
article.legal h3 {
font-size: 17px;
font-weight: 600;
margin: 24px 0 8px;
color: var(--muted);
}
article.legal p,
article.legal li {
font-size: 16px;
color: var(--ink);
}
article.legal p {
margin: 0 0 14px;
}
article.legal ul,
article.legal ol {
padding-left: 22px;
margin: 0 0 14px;
}
.contact-card {
background: var(--surface);
border-radius: 20px;
padding: 36px;
text-align: center;
margin: 24px 0 64px;
}
.contact-card .email {
font-size: 24px;
font-weight: 600;
margin: 12px 0 20px;
display: block;
}
footer.site {
border-top: 1px solid var(--line);
padding: 32px 0 48px;
margin-top: 48px;
}
footer.site .bar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 16px;
}
footer.site nav {
display: flex;
gap: 20px;
flex-wrap: wrap;
font-size: 14px;
}
footer.site nav a {
color: var(--muted);
}
footer.site nav a:hover {
color: var(--ink);
}
footer.site .copy {
color: var(--muted);
font-size: 13px;
}
@media (max-width: 720px) {
section.hero h1 {
font-size: 40px;
}
section.hero p.sub {
font-size: 18px;
}
.steps {
grid-template-columns: 1fr;
gap: 28px;
}
article.legal h1 {
font-size: 30px;
}
}
@media (max-width: 560px) {
header.site .bar {
gap: 10px;
}
nav.site-nav {
gap: 10px;
}
nav.site-nav a:not(.btn) {
display: none;
}
.btn {
padding: 9px 16px;
font-size: 14px;
}
}