/*
 * Red Pen: components
 * Built only from tokens.css. Load tokens.css first.
 */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
.rp { margin: 0; background: var(--rp-page); color: var(--rp-ink); font-family: var(--rp-sans); font-size: var(--rp-text-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
.rp img, .rp svg { display: block; max-width: 100%; }
:where(.rp) a { color: inherit; }
:where(.rp) :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) { margin: 0; }
:where(.rp) :where(ul, ol) { padding: 0; }

/* Layout */
.rp-container { width: min(100% - 2 * var(--rp-gutter), var(--rp-container)); margin-inline: auto; }
.rp-narrow { width: min(100% - 2 * var(--rp-gutter), var(--rp-narrow)); margin-inline: auto; }
.rp-center { text-align: center; }
.rp-section { padding-block: var(--rp-section); }
.rp-section--paper { background: var(--rp-paper); border-block: var(--rp-hairline); }
.rp-section--dark { background: var(--rp-charcoal); color: var(--rp-page); }
.rp-section--dark .rp-muted, .rp-section--dark .rp-eyebrow { color: var(--rp-charcoal-text); }
.rp-stack > * + * { margin-top: 18px; }
.rp-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Type */
.rp-hero-title, .rp-h2, .rp-h3 { font-family: var(--rp-display); font-weight: 800; letter-spacing: var(--rp-tracking-display); line-height: var(--rp-leading-display); color: inherit; }
.rp-hero-title { font-size: var(--rp-text-hero); }
.rp-h2 { font-size: var(--rp-text-h2); font-weight: 800; }
.rp-h3 { font-size: var(--rp-text-h3); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.rp-lead { font-size: var(--rp-text-lead); line-height: 1.5; color: var(--rp-ink); max-width: 600px; }
.rp-center .rp-lead { margin-inline: auto; }
.rp-muted { color: var(--rp-soft); }
.rp-eyebrow { font-family: var(--rp-sans); font-size: var(--rp-text-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-soft); }
.rp-small { font-size: var(--rp-text-small); }

/* The signature underline: a soft teal curve under one word of a headline */
.rp-mark { position: relative; white-space: nowrap; }
.rp-mark::after { content: ""; position: absolute; left: -3%; right: -3%; bottom: -.12em; height: .26em; border-bottom: .07em solid var(--rp-teal); border-radius: 0 0 50% 50% / 0 0 100% 100%; pointer-events: none; }
.rp-mark--red::after { border-bottom-color: var(--rp-red); }

/* Nav */
.rp-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px var(--rp-gutter); max-width: calc(var(--rp-container) + 2 * var(--rp-gutter)); margin-inline: auto; }
.rp-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--rp-display); font-weight: 800; font-size: 19px; text-decoration: none; white-space: nowrap; }
.rp-logo__mark { width: 30px; height: 30px; flex-shrink: 0; }
.rp-nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); font-size: 15px; }
.rp-nav__links a { text-decoration: none; color: var(--rp-ink); padding-block: 4px; border-bottom: 2px solid transparent; transition: border-color var(--rp-speed) var(--rp-ease); }
.rp-nav__links a:hover, .rp-nav__links a[aria-current] { border-bottom-color: var(--rp-teal); }
.rp-nav__end { display: flex; align-items: center; gap: 14px; }
@media (max-width: 820px) { .rp-nav__links { display: none; } }

/* Buttons: pills. Outline is the default, red is the one loud action */
.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 24px; border: var(--rp-border); border-radius: var(--rp-radius-pill); background: var(--rp-page); color: var(--rp-ink); font-family: var(--rp-sans); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background var(--rp-speed) var(--rp-ease), color var(--rp-speed) var(--rp-ease), transform var(--rp-speed) var(--rp-ease); }
.rp-btn:hover { background: var(--rp-sand); }
.rp-btn:active { transform: translateY(1px); }
.rp-btn--red { background: var(--rp-red); border-color: var(--rp-red); color: var(--rp-page); }
.rp-btn--red:hover { background: var(--rp-red-deep); border-color: var(--rp-red-deep); }
.rp-btn--dark { background: var(--rp-ink); color: var(--rp-page); }
.rp-btn--dark:hover { background: var(--rp-charcoal-2); }
.rp-btn--ghost { border-color: transparent; background: transparent; }
.rp-btn--ghost:hover { background: var(--rp-sand); }
.rp-btn--sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.rp-btn--block { width: 100%; }
.rp-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.rp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rp-center .rp-actions { justify-content: center; }

/* Store button: an outlined rounded rectangle with an icon and two lines */
.rp-store { display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px 9px 16px; border: var(--rp-border); border-radius: var(--rp-radius); text-decoration: none; background: var(--rp-page); line-height: 1.1; white-space: nowrap; transition: background var(--rp-speed) var(--rp-ease); }
.rp-store:hover { background: var(--rp-sand); }
.rp-store svg { width: 26px; height: 26px; }
.rp-store small { display: block; font-size: 11px; color: var(--rp-soft); }
.rp-store strong { display: block; font-family: var(--rp-display); font-size: 19px; font-weight: 800; }

/* Text link with a teal underline */
.rp-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--rp-teal); padding-bottom: 1px; white-space: nowrap; }
.rp-link:hover { border-bottom-color: var(--rp-red); }

/* Tabs: icon + word, the active one gets a tick above and a curve below */
.rp-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px clamp(14px, 3vw, 40px); padding-top: 14px; }
.rp-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: none; font-family: var(--rp-sans); font-size: 18px; color: var(--rp-soft); cursor: pointer; white-space: nowrap; }
.rp-tab svg { width: 20px; height: 20px; }
.rp-tab[aria-selected="true"] { color: var(--rp-ink); }
.rp-tab[aria-selected="true"]::before { content: ""; position: absolute; left: 50%; top: -12px; width: 2px; height: 9px; margin-left: -1px; border-radius: 2px; background: var(--rp-teal); box-shadow: -14px 3px 0 var(--rp-teal), 14px 3px 0 var(--rp-teal); }
.rp-tab[aria-selected="true"]::after { content: ""; position: absolute; left: -4%; right: -4%; bottom: -4px; height: 8px; border-bottom: 2px solid var(--rp-teal); border-radius: 0 0 50% 50% / 0 0 100% 100%; }

/* Tags and badges */
.rp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: var(--rp-radius-pill); background: var(--rp-sand); color: var(--rp-ink); font-family: var(--rp-mono); font-size: .86em; white-space: nowrap; }
.rp-tag::before { content: "#"; color: var(--rp-faint); }
.rp-new { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rp-red); vertical-align: super; margin-left: 2px; }
.rp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--rp-radius-pill); background: var(--rp-red-soft); color: var(--rp-red-deep); font-size: 12px; font-weight: 700; white-space: nowrap; }
.rp-badge--teal { background: var(--rp-teal-soft); color: var(--rp-ink); }
.rp-badge--dark { background: var(--rp-ink); color: var(--rp-page); }

/* Hero: centered title, lead, tabs, one action, then the desk */
.rp-hero { text-align: center; padding: clamp(40px, 6vw, 84px) var(--rp-gutter) 0; }
.rp-hero .rp-hero-title { max-width: 760px; margin-inline: auto; }
.rp-hero .rp-lead { margin: 16px auto 0; }
.rp-hero .rp-tabs { margin-top: 26px; }
.rp-hero .rp-actions { margin-top: 34px; justify-content: center; }
.rp-hero .rp-window { margin-top: clamp(56px, 7vw, 88px); }

/* The desk: a layered app window */
.rp-window { width: min(100% - 2 * var(--rp-gutter), 980px); margin-inline: auto; border-radius: var(--rp-radius-lg); background: var(--rp-page); box-shadow: var(--rp-shadow); border: var(--rp-hairline); overflow: hidden; display: grid; grid-template-columns: 200px 250px 1fr; text-align: left; min-height: 420px; }
.rp-window__side { background: var(--rp-charcoal); color: var(--rp-charcoal-text); padding: 14px 10px; font-size: 13px; }
.rp-dots { display: flex; gap: 7px; padding: 2px 6px 16px; }
.rp-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--rp-dot-red); }
.rp-dots i:nth-child(2) { background: var(--rp-dot-amber); }
.rp-dots i:nth-child(3) { background: var(--rp-dot-green); }
.rp-side-item { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: var(--rp-radius-sm); white-space: nowrap; }
.rp-side-item svg { width: 14px; height: 14px; opacity: .7; }
.rp-side-item--on { background: var(--rp-charcoal-2); color: var(--rp-page); }
.rp-side-item--sub { padding-left: 32px; }
.rp-window__list { border-right: var(--rp-hairline); background: var(--rp-paper); font-size: 13px; }
.rp-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 700; border-bottom: var(--rp-hairline); }
.rp-note { padding: 13px 16px; border-bottom: var(--rp-hairline); border-left: 3px solid transparent; }
.rp-note strong { display: block; font-size: 13.5px; }
.rp-note p { color: var(--rp-soft); font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-note small { display: block; margin-top: 4px; color: var(--rp-faint); font-size: 11.5px; }
.rp-note--on { border-left-color: var(--rp-red); background: var(--rp-sand); }
.rp-window__editor { padding: 30px clamp(22px, 4vw, 56px); font-size: 14.5px; }
.rp-window__editor h3 { font-family: var(--rp-display); font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.rp-window__editor h4 { font-family: var(--rp-display); font-size: 17px; font-weight: 800; margin: 20px 0 8px; }
.rp-window__editor p + p { margin-top: 10px; }
.rp-caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--rp-red); margin-left: 2px; }
@media (max-width: 900px) { .rp-window { grid-template-columns: 1fr; min-height: 0; } .rp-window__side, .rp-window__list { display: none; } .rp-window__editor { position: relative; padding-top: 44px; } .rp-window__editor::before { content: ""; position: absolute; top: 16px; left: 20px; width: 11px; height: 11px; border-radius: 50%; background: var(--rp-dot-red); box-shadow: 18px 0 0 var(--rp-dot-amber), 36px 0 0 var(--rp-dot-green); } }

/* Callout: a warm box with a left rule, like a highlighted note */
.rp-callout { padding: 14px 18px; border-radius: var(--rp-radius-sm); border-left: 3px solid var(--rp-amber); background: var(--rp-amber-soft); }
.rp-callout strong { display: block; font-size: .95em; margin-bottom: 2px; }
.rp-callout em { color: var(--rp-red-deep); }
.rp-callout--teal { border-left-color: var(--rp-teal); background: var(--rp-teal-soft); }

/* Checklist */
.rp-checks { list-style: none; display: grid; gap: 8px; }
.rp-checks li { display: flex; gap: 10px; align-items: flex-start; }
.rp-checks li::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: .2em; border: 1.5px solid var(--rp-line-strong); border-radius: 4px; }
.rp-checks li.is-done { color: var(--rp-faint); text-decoration: line-through; }
.rp-checks li.is-done::before { border-color: var(--rp-teal); background: var(--rp-teal); box-shadow: inset 0 0 0 3px var(--rp-page); }
.rp-ticks { list-style: none; display: grid; gap: 10px; }
.rp-ticks li { position: relative; padding-left: 28px; }
.rp-ticks li::before { content: ""; position: absolute; left: 3px; top: .35em; width: 12px; height: 7px; border-left: 2px solid var(--rp-red); border-bottom: 2px solid var(--rp-red); transform: rotate(-45deg); }

/* Feature cards */
.rp-card { padding: 28px; border: var(--rp-hairline); border-radius: var(--rp-radius-lg); background: var(--rp-page); }
.rp-card .rp-h3 { margin: 16px 0 8px; }
.rp-card__icon { width: 44px; height: 44px; border-radius: var(--rp-radius); display: grid; place-items: center; background: var(--rp-red-soft); color: var(--rp-red); }
.rp-card__icon svg { width: 22px; height: 22px; }
.rp-card__icon--teal { background: var(--rp-teal-soft); color: var(--rp-ink); }
.rp-card__icon--amber { background: var(--rp-amber-soft); color: var(--rp-amber); }

/* Section head */
.rp-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 5vw, 56px); }
.rp-head .rp-lead { margin-top: 12px; }

/* Quote */
.rp-quote { max-width: 760px; margin-inline: auto; text-align: center; }
.rp-quote blockquote { font-family: var(--rp-display); font-weight: 700; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; }
.rp-quote figcaption { margin-top: 18px; color: var(--rp-soft); font-size: var(--rp-text-small); }
.rp-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--rp-teal-soft); font-family: var(--rp-display); font-weight: 800; font-size: 15px; vertical-align: middle; margin-right: 8px; }

/* Pricing */
.rp-switch { display: inline-flex; padding: 4px; border-radius: var(--rp-radius-pill); background: var(--rp-sand); gap: 2px; }
.rp-switch button { border: 0; background: none; padding: 8px 18px; border-radius: var(--rp-radius-pill); font-family: var(--rp-sans); font-size: 14px; font-weight: 700; color: var(--rp-soft); cursor: pointer; white-space: nowrap; }
.rp-switch button[aria-pressed="true"] { background: var(--rp-page); color: var(--rp-ink); box-shadow: var(--rp-shadow-sm); }
.rp-plans { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: stretch; }
.rp-plan { display: flex; flex-direction: column; gap: 18px; padding: 30px; border: var(--rp-hairline); border-radius: var(--rp-radius-lg); background: var(--rp-page); }
.rp-plan--featured { border: 1.5px solid var(--rp-ink); box-shadow: var(--rp-shadow); position: relative; }
.rp-plan__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--rp-display); font-size: 22px; font-weight: 800; }
.rp-price { font-family: var(--rp-display); font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.rp-price small { font-family: var(--rp-sans); font-size: 15px; font-weight: 600; color: var(--rp-soft); letter-spacing: 0; }
.rp-plan .rp-ticks { flex: 1; font-size: 15px; }

/* FAQ */
.rp-faq { border-top: var(--rp-hairline); }
.rp-faq details { border-bottom: var(--rp-hairline); padding: 18px 0; }
.rp-faq summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-family: var(--rp-display); font-size: 18px; font-weight: 700; }
.rp-faq summary::-webkit-details-marker { display: none; }
.rp-faq summary::after { content: "+"; color: var(--rp-red); font-size: 22px; line-height: 1; }
.rp-faq details[open] summary::after { content: "\2212"; }
.rp-faq p { margin-top: 10px; color: var(--rp-soft); }

/* Comparison table */
.rp-table-wrap { overflow-x: auto; border: var(--rp-hairline); border-radius: var(--rp-radius-lg); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.rp-table th, .rp-table td { padding: 14px 18px; text-align: left; border-bottom: var(--rp-hairline); }
.rp-table thead th { font-family: var(--rp-display); font-weight: 800; background: var(--rp-paper); }
.rp-table tr:last-child td { border-bottom: 0; }
.rp-yes { color: var(--rp-red); font-weight: 800; }
.rp-no { color: var(--rp-faint); }

/* Article */
.rp-article-head { text-align: center; padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); }
.rp-article-head .rp-hero-title { font-size: clamp(32px, 4vw, 52px); margin-top: 14px; }
.rp-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; margin-top: 22px; color: var(--rp-soft); font-size: var(--rp-text-small); }
.rp-prose { font-size: var(--rp-text-prose); line-height: 1.75; }
.rp-prose > * + * { margin-top: 22px; }
.rp-prose h2 { font-family: var(--rp-display); font-weight: 800; font-size: 28px; line-height: 1.2; margin-top: 44px; }
.rp-prose h3 { font-family: var(--rp-display); font-weight: 800; font-size: 21px; margin-top: 32px; }
.rp-prose a { text-decoration: none; border-bottom: 2px solid var(--rp-teal); }
.rp-prose ul { padding-left: 22px; }
.rp-prose li + li { margin-top: 8px; }
.rp-prose li::marker { color: var(--rp-red); }
.rp-prose code { font-family: var(--rp-mono); font-size: .85em; padding: 1px 7px; border-radius: var(--rp-radius-sm); background: var(--rp-sand); }
.rp-pull { padding: 6px 0 6px 22px; border-left: 3px solid var(--rp-red); font-family: var(--rp-display); font-weight: 700; font-size: 24px; line-height: 1.35; }
.rp-figure { border-radius: var(--rp-radius-lg); overflow: hidden; border: var(--rp-hairline); background: var(--rp-paper); }
.rp-figure figcaption { padding: 12px 18px; font-size: var(--rp-text-small); color: var(--rp-soft); border-top: var(--rp-hairline); background: var(--rp-page); }
.rp-author { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: var(--rp-radius-lg); background: var(--rp-paper); border: var(--rp-hairline); }
.rp-author .rp-avatar { width: 52px; height: 52px; font-size: 19px; margin: 0; flex-shrink: 0; }

/* Forms */
.rp-form { display: grid; gap: 18px; }
.rp-field { display: grid; gap: 7px; }
.rp-label { font-size: 14px; font-weight: 700; }
.rp-hint { font-size: 13px; color: var(--rp-soft); }
.rp-input, .rp-select, .rp-textarea { width: 100%; min-height: 48px; padding: 11px 16px; border: 1.5px solid var(--rp-line-strong); border-radius: var(--rp-radius); background: var(--rp-page); color: var(--rp-ink); font-family: var(--rp-sans); font-size: 16px; transition: border-color var(--rp-speed) var(--rp-ease), box-shadow var(--rp-speed) var(--rp-ease); }
.rp-input::placeholder, .rp-textarea::placeholder { color: var(--rp-faint); }
.rp-input:focus, .rp-select:focus, .rp-textarea:focus { outline: none; border-color: var(--rp-ink); box-shadow: 0 0 0 4px var(--rp-teal-soft); }
.rp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--rp-soft); }
.rp-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rp-red); flex-shrink: 0; }
.rp-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.rp-choice { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--rp-line-strong); border-radius: var(--rp-radius); cursor: pointer; font-size: 15px; font-weight: 600; }
.rp-choice input { accent-color: var(--rp-red); }
.rp-choice:has(input:checked) { border-color: var(--rp-ink); background: var(--rp-paper); }
.rp-divider { display: flex; align-items: center; gap: 14px; color: var(--rp-faint); font-size: 13px; }
.rp-divider::before, .rp-divider::after { content: ""; flex: 1; border-top: var(--rp-hairline); }

/* Sign-up split */
.rp-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.rp-split__form { padding: clamp(28px, 5vw, 64px) var(--rp-gutter); display: flex; flex-direction: column; }
.rp-split__form .rp-form-box { width: min(100%, 420px); margin: auto; padding-block: 40px; }
.rp-split__aside { background: var(--rp-paper); border-left: var(--rp-hairline); padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 30px; overflow: hidden; }
@media (max-width: 900px) { .rp-split { grid-template-columns: 1fr; } .rp-split__aside { border-left: 0; border-top: var(--rp-hairline); } }

/* Small spacing helpers */
.rp-mt-sm { margin-top: 12px; }
.rp-mt { margin-top: 18px; }

/* Mini note card, for side panels */
.rp-mini { padding: 20px 22px; border-radius: var(--rp-radius-lg); background: var(--rp-page); border: var(--rp-hairline); box-shadow: var(--rp-shadow-sm); }
.rp-mini h4 { font-family: var(--rp-display); font-size: 18px; font-weight: 800; margin-bottom: 6px; }

/* Footer */
.rp-footer { border-top: var(--rp-hairline); padding: clamp(44px, 6vw, 72px) 0 32px; font-size: var(--rp-text-small); }
.rp-footer__grid { display: grid; gap: 32px; grid-template-columns: 1.6fr repeat(3, 1fr); }
.rp-footer h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.rp-footer ul { list-style: none; display: grid; gap: 8px; }
.rp-footer a { text-decoration: none; color: var(--rp-soft); }
.rp-footer a:hover { color: var(--rp-ink); }
.rp-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: var(--rp-hairline); color: var(--rp-faint); }
@media (max-width: 760px) { .rp-footer__grid { grid-template-columns: 1fr 1fr; } .rp-footer__grid > :first-child { grid-column: 1 / -1; } }
.rp-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
