Files
kits/packages/sitekit/styles.css
CatoandClaude Fable 5.2 008af96425 feat(paykit 0.5.0, sitekit 0.9.0): plans with prices and a waitlist, before a product can charge (#21)
* feat(paykit 0.5.0, sitekit 0.9.0): plans with prices and a waitlist, before a product can charge

paykit/plans: Tier (open, waitlist, checkout, contact), formatMoney,
readWaitlistEntry, WaitlistStore and joinWaitlist: what a product
offers, how a price is written, and the whole of a waitlist route.

sitekit: PlanTable and WaitlistForm: plan cards with one action each;
a waitlist action opens a one-field form in the card. A tier goes on
sale by turning that action into a link to the checkout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* fix(sitekit): the waitlist form's note is an alert only when something went wrong

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 20:12:30 +01:00

756 lines
18 KiB
CSS

/* Shared application chrome. Consumers supply semantic theme variables only. */
/* The chrome's own box model, so it measures the same on a host page with or
without a `box-sizing: border-box` reset. It covers the elements sitekit
renders, not host content passed into its slots (brand, actions, a footer's
extra, a tab icon): those keep whatever box model the host gives them.
Zero specificity (:where), so a host rule with a type, class or id
selector still wins; a host `*` rule loaded before this file does not. Pseudo-elements are
not covered (they cannot sit inside :where()), and sitekit gives none of
them padding or a border, so their box model does not change a size. */
:where(
.sk-skip,
.sk-masthead,
.sk-masthead *,
.sk-footer,
.sk-footer *,
.sk-tabbar,
.sk-tabbar *,
.sk-tabbar-spacer
):not(
:where(
.sk-brand *,
.sk-account-actions *,
.sk-menu-actions *,
.sk-grouped-actions *,
.sk-footer-bottom > :not(:first-child),
.sk-footer-bottom > :not(:first-child) *,
.sk-tab-icon *
)
) {
box-sizing: border-box;
}
:where(.sk-masthead, .sk-footer) {
color: var(--sk-fg, CanvasText);
font-family: var(--sk-font, system-ui, sans-serif);
}
.sk-shell-frame {
width: min(100%, var(--sk-width, 76rem));
margin-inline: auto;
padding-inline: var(--sk-gutter, clamp(1rem, 4vw, 2.5rem));
}
.sk-masthead {
position: sticky;
top: 0;
z-index: 40;
background: var(--sk-bg, Canvas);
border-bottom: 1px solid var(--sk-line, #d6d6d6);
}
.sk-masthead-row {
min-height: var(--sk-header-height, 80px);
display: flex;
align-items: center;
gap: clamp(1rem, 2vw, 2rem);
}
.sk-brand,
.sk-footer-brand {
color: inherit;
text-decoration: none;
font-weight: 650;
letter-spacing: -0.035em;
display: inline-flex;
align-items: center;
gap: 0.75rem;
min-height: 44px;
white-space: nowrap;
font-size: 1.2rem;
}
.sk-brand img,
.sk-brand svg {
width: 38px;
height: 38px;
object-fit: contain;
flex-shrink: 0;
}
.sk-desktop-nav {
margin-inline: auto;
display: flex;
align-items: center;
gap: 0.15rem;
min-width: 0;
}
.sk-desktop-nav a,
.sk-mobile-menu nav a,
.sk-footer nav a {
min-height: 44px;
display: flex;
align-items: center;
color: var(--sk-muted, #555);
text-decoration: none;
font-size: 0.875rem;
line-height: 1.4;
}
.sk-desktop-nav a {
padding: 0.75rem 0.7rem;
border-radius: var(--sk-radius, 0.5rem);
white-space: nowrap;
}
.sk-desktop-nav a[aria-current='page'],
.sk-mobile-menu a[aria-current='page'] {
background: var(--sk-raised, #f0f0f0);
color: var(--sk-fg, CanvasText);
font-weight: 600;
}
.sk-account-actions {
margin-inline-start: auto;
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
/* The link is the host's (the `actions` slot), so its box model is too. No
block padding: min-height and centring give it 44px under border-box and
46px (the border) under content-box, where 0.65rem of padding made 67px. */
.sk-account-actions > a {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 0 1rem;
color: var(--sk-fg, CanvasText);
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
text-decoration: none;
font-weight: 600;
font-size: 0.875rem;
}
.sk-mobile-menu {
display: none;
}
.sk-mobile-menu summary {
cursor: pointer;
list-style: none;
min-height: 44px;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.65rem 0.85rem;
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
font-size: 0.875rem;
font-weight: 600;
}
.sk-mobile-menu summary::-webkit-details-marker {
display: none;
}
.sk-mobile-menu nav {
position: absolute;
top: 100%;
left: var(--sk-gutter, 1rem);
right: var(--sk-gutter, 1rem);
background: var(--sk-bg, Canvas);
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
box-shadow: 0 18px 40px #00000014;
padding: 0.5rem;
max-height: 75dvh;
overflow-y: auto;
}
.sk-mobile-menu nav a {
padding: 0.8rem 1rem;
border-radius: var(--sk-radius, 0.5rem);
}
.sk-footer {
margin-top: var(--sk-footer-gap, clamp(4rem, 8vw, 7rem));
border-top: 1px solid var(--sk-line, #d6d6d6);
background: var(--sk-bg, Canvas);
padding-block: 3rem 1.5rem;
}
.sk-footer-top {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
}
.sk-footer-top p {
margin-top: 0.5rem;
color: var(--sk-muted, #555);
max-width: 36ch;
line-height: 1.7;
font-size: 0.875rem;
}
.sk-footer nav {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 1.5rem;
}
.sk-footer nav a {
padding-block: 0.5rem;
}
.sk-footer-bottom {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--sk-line, #d6d6d6);
color: var(--sk-muted, #555);
font-size: 0.75rem;
}
.sk-footer-bottom a {
color: inherit;
min-height: 44px;
display: inline-flex;
align-items: center;
}
.sk-skip {
position: fixed;
left: 1rem;
top: -10rem;
z-index: 100;
padding: 1rem;
color: var(--sk-bg, Canvas);
background: var(--sk-fg, CanvasText);
border-radius: 0.5rem;
}
.sk-skip:focus {
top: 1rem;
}
:where(.sk-masthead, .sk-footer) :is(a, summary, button):focus-visible,
.sk-skip:focus-visible {
outline: 3px solid var(--sk-focus, Highlight);
outline-offset: 3px;
}
@media (max-width: 1100px) {
.sk-desktop-nav {
display: none;
}
.sk-mobile-menu {
display: block;
order: 3;
}
.sk-mobile-menu summary {
display: flex;
}
.sk-masthead-row {
gap: 0.5rem;
min-height: var(--sk-mobile-header-height, 72px);
}
.sk-brand {
margin-inline-end: auto;
}
}
.sk-menu-actions {
display: none;
}
/* The narrowest phones (up to 380px, which takes in 360px Android): brand, an
account action and the menu button do not fit in one row (AOZ at 320px
needed 369px and scrolled sideways by 49px), so the action moves to the foot
of the menu, and only when there is a menu to hold it. */
@media (max-width: 380px) {
.sk-masthead-row:has(.sk-mobile-menu) > .sk-account-actions {
display: none;
}
.sk-menu-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid var(--sk-line, #d6d6d6);
}
.sk-menu-actions > a {
display: flex;
align-items: center;
justify-content: center;
min-height: 44px;
padding: 0 1rem; /* as .sk-account-actions > a: 44-46px in either box model */
color: var(--sk-fg, CanvasText);
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
text-decoration: none;
font-weight: 600;
font-size: 0.875rem;
}
}
@media (max-width: 600px) {
.sk-footer-top {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.sk-brand {
font-size: 1.05rem;
gap: 0.5rem;
}
.sk-account-actions > a {
padding-inline: 0.75rem;
}
}
.sk-hero {
padding-block: var(--sk-hero-space, clamp(3rem, 7vw, 6rem));
}
.sk-eyebrow {
font: 600 0.7rem/1.5 var(--sk-mono, monospace);
text-transform: uppercase;
letter-spacing: 0.13em;
color: var(--sk-muted, #555);
}
.sk-hero-title {
margin-block: 1rem 1.5rem;
font-family: var(--sk-display, Georgia, serif);
font-size: var(--sk-title-size, clamp(3rem, 6vw, 5rem));
font-weight: var(--sk-display-weight, 400);
line-height: var(--sk-display-leading, 1.05);
letter-spacing: var(--sk-display-tracking, -0.045em);
text-wrap: balance;
max-width: var(--sk-title-measure, 20ch);
}
.sk-hero-lead {
max-width: var(--sk-measure, 64ch);
display: grid;
gap: 1rem;
color: var(--sk-muted, #555);
font-size: var(--sk-lead-size, clamp(1.05rem, 2vw, 1.2rem));
line-height: var(--sk-lead-leading, 1.75);
}
.sk-hero-actions {
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
gap: 0.75rem;
margin-top: 2rem;
max-width: 36rem;
}
.sk-hero-actions a {
display: flex;
align-items: center;
justify-content: center;
min-height: 48px;
padding: 0.8rem 1rem;
font-size: 0.9rem;
font-weight: 600;
border-radius: var(--sk-radius, 0.5rem);
text-decoration: none;
text-align: center;
}
.sk-primary-action {
background: var(--sk-fg, CanvasText);
color: var(--sk-bg, Canvas);
border: 1px solid var(--sk-fg, CanvasText);
}
.sk-secondary-action {
background: transparent;
color: var(--sk-fg, CanvasText);
border: 1px solid var(--sk-line, #d6d6d6);
}
.sk-hero-actions a:focus-visible {
outline: 3px solid var(--sk-focus, Highlight);
outline-offset: 3px;
}
@media (max-width: 420px) {
.sk-hero-actions {
grid-auto-flow: row;
}
}
.sk-footer nav.sk-footer-groups {
grid-template-columns: repeat(var(--sk-footer-columns, 3), minmax(0, 1fr));
gap: 1.5rem;
}
.sk-footer-group h2 {
margin: 0 0 0.75rem;
font: 600 0.75rem/1.5 var(--sk-font, system-ui, sans-serif);
color: var(--sk-fg, CanvasText);
}
.sk-footer-group a {
font-size: 0.8125rem;
}
@media (max-width: 600px) {
.sk-footer nav.sk-footer-groups {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1.5rem;
}
}
/* Mobile bottom tab bar (SiteTabBar). Hidden from --sk-tabbar-breakpoint up.
One row of equal cells; the current one carries a short rule above its icon
and the full text colour, so the active state reads without a fill. */
.sk-tabbar {
position: fixed;
inset: auto 0 0 0;
z-index: 45;
display: grid;
grid-auto-flow: column;
grid-auto-columns: minmax(0, 1fr);
padding: 0 4px calc(0px + env(safe-area-inset-bottom));
background: var(--sk-bg, Canvas);
border-top: 1px solid var(--sk-line, #d6d6d6);
font-family: var(--sk-font, system-ui, sans-serif);
}
.sk-tab {
position: relative;
min-width: 0;
min-height: 56px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 3px;
padding: 8px 4px 6px;
color: var(--sk-muted, #555);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.01em;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
}
.sk-tab-icon {
display: inline-flex;
width: 24px;
height: 24px;
align-items: center;
justify-content: center;
font-size: 22px;
line-height: 1;
}
.sk-tab-icon > svg {
width: 24px;
height: 24px;
}
.sk-tab-label {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.sk-tab[aria-current='page'] {
color: var(--sk-fg, CanvasText);
}
.sk-tab[aria-current='page']::before {
content: '';
position: absolute;
top: -1px;
left: 50%;
width: 28px;
height: 3px;
transform: translateX(-50%);
border-radius: 0 0 3px 3px;
background: var(--sk-tab-active, currentColor);
}
.sk-tab:focus-visible {
outline: 2px solid var(--sk-focus, Highlight);
outline-offset: -4px;
border-radius: 10px;
}
.sk-tabbar-spacer {
height: calc(var(--sk-tabbar-height, 56px) + env(safe-area-inset-bottom));
}
/* Below the tab bar breakpoint the tab bar IS the navigation: a masthead that
says so (`tabBar`) drops its menu button rather than offering the same five
places twice. */
@media (max-width: 47.999rem) {
.sk-masthead--tabbar .sk-mobile-menu {
display: none;
}
.sk-masthead--tabbar .sk-masthead-row:has(.sk-mobile-menu) > .sk-account-actions {
display: flex;
}
}
@media (min-width: 48rem) {
.sk-tabbar,
.sk-tabbar-spacer {
display: none;
}
}
.sk-icon {
display: inline-block;
vertical-align: middle;
flex-shrink: 0;
}
/* One native disclosure and one link tree for grouped application navigation. */
.sk-masthead-row:has(.sk-grouped-menu) {
position: relative;
}
.sk-grouped-menu {
margin-inline-start: auto;
}
.sk-grouped-menu summary {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
min-height: 44px;
padding: 0.65rem 0.85rem;
list-style: none;
cursor: pointer;
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
font-size: 0.875rem;
font-weight: 600;
}
.sk-grouped-menu summary::-webkit-details-marker {
display: none;
}
.sk-grouped-panel {
position: absolute;
inset-block-start: 100%;
inset-inline-end: var(--sk-gutter, 1rem);
width: min(54rem, calc(100% - 2 * var(--sk-gutter, 1rem)));
box-sizing: border-box;
max-height: 75dvh;
overflow-y: auto;
padding: 1rem;
background: var(--sk-bg, Canvas);
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
box-shadow: 0 18px 40px #00000014;
}
.sk-nav-groups {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
gap: 1rem;
}
.sk-nav-group {
min-width: 0;
}
.sk-nav-group h2 {
margin: 0 0 0.5rem;
font-size: 0.875rem;
color: var(--sk-muted, #555);
}
.sk-grouped-actions > a,
.sk-nav-group a {
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
min-height: 44px;
padding: 0.75rem;
border-radius: var(--sk-radius, 0.5rem);
color: var(--sk-fg, CanvasText);
text-decoration: none;
overflow-wrap: anywhere;
}
.sk-nav-group a:hover,
.sk-nav-group a[aria-current='page'] {
background: var(--sk-raised, #f0f0f0);
}
.sk-nav-link-label {
font-weight: 600;
}
.sk-nav-description {
margin-top: 0.25rem;
font-size: 0.875rem;
line-height: 1.5;
color: var(--sk-muted, #555);
}
.sk-grouped-actions {
display: none;
}
@media (max-width: 600px) {
.sk-nav-groups {
grid-template-columns: minmax(0, 1fr);
}
}
@media (max-width: 380px) {
/* Give host account popovers the full narrow viewport, including padding. */
.sk-grouped-panel {
inset-inline: 0;
width: 100%;
}
.sk-masthead-row:has(.sk-grouped-menu) > .sk-account-actions {
display: none;
}
.sk-grouped-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
border-top: 1px solid var(--sk-line, #d6d6d6);
padding-top: 0.75rem;
margin-top: 0.75rem;
}
}
/* ── PlanTable: what a product offers, as cards to compare and act on ───── */
:where(.sk-plans, .sk-plans *) {
box-sizing: border-box;
}
.sk-plans {
/* A card never asks for more than the screen: min(100%, …) keeps one column
on a phone from becoming wider than it. */
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
gap: 1rem;
margin: 0;
padding: 0;
list-style: none;
color: var(--sk-fg, CanvasText);
font-family: var(--sk-font, system-ui, sans-serif);
}
.sk-plan {
/* Subgrid would align the parts across cards; a column with the action
pushed to the foot does it everywhere and reads the same. */
display: flex;
flex-direction: column;
gap: 1rem;
min-width: 0;
padding: 1.25rem;
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
background: var(--sk-surface, Canvas);
}
.sk-plan-head {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.sk-plan-badge {
align-self: flex-start;
margin: 0 0 0.25rem;
padding: 0.125rem 0.5rem;
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: 999px;
font-size: 0.75rem;
line-height: 1.5;
color: var(--sk-muted, #555);
}
.sk-plan-name {
margin: 0;
font-size: 1.25rem;
line-height: 1.3;
font-weight: 600;
}
.sk-plan-tagline,
.sk-plan-note {
margin: 0;
font-size: 0.875rem;
line-height: 1.5;
color: var(--sk-muted, #555);
}
.sk-plan-price {
margin: 0;
line-height: 1.2;
}
.sk-plan-amount {
font-size: 1.75rem;
font-weight: 600;
/* "CHF 12" stays one piece; a long "By agreement" may wrap between words. */
overflow-wrap: normal;
}
.sk-plan-per {
font-size: 0.875rem;
color: var(--sk-muted, #555);
}
.sk-plan-features {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin: 0;
padding: 0;
list-style: none;
font-size: 0.9375rem;
line-height: 1.5;
}
.sk-plan-features li {
position: relative;
padding-left: 1.25rem;
}
.sk-plan-features li::before {
content: '';
position: absolute;
left: 0.125rem;
top: 0.55em;
width: 0.375rem;
height: 0.375rem;
border-radius: 999px;
background: currentColor;
opacity: 0.45;
}
.sk-plan-action {
margin-top: auto;
padding-top: 0.25rem;
}
.sk-plan-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 2.75rem;
padding: 0.5rem 1rem;
border: 1px solid var(--sk-fg, CanvasText);
border-radius: var(--sk-radius, 0.5rem);
background: var(--sk-fg, CanvasText);
color: var(--sk-surface, Canvas);
font: inherit;
font-weight: 600;
line-height: 1.3;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.sk-plan-button:disabled {
opacity: 0.5;
cursor: default;
}
.sk-plan-button:focus-visible,
.sk-plan-quiet:focus-visible,
.sk-plan-input:focus-visible {
outline: 2px solid var(--sk-focus, Highlight);
outline-offset: 2px;
}
.sk-plan-quiet {
min-height: 2.75rem;
padding: 0.5rem 0.75rem;
border: 0;
background: none;
color: inherit;
font: inherit;
text-decoration: underline;
text-underline-offset: 0.2em;
cursor: pointer;
}
.sk-plan-current,
.sk-plan-done {
margin: 0;
padding: 0.625rem 0.75rem;
border: 1px solid var(--sk-line, #d6d6d6);
border-radius: var(--sk-radius, 0.5rem);
font-size: 0.9375rem;
line-height: 1.5;
}
.sk-plan-form {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sk-plan-label {
font-size: 0.875rem;
font-weight: 600;
}
.sk-plan-input {
width: 100%;
min-width: 0;
min-height: 2.75rem;
padding: 0.5rem 0.75rem;
border: 1px solid var(--sk-line-strong, var(--sk-line, #8a8a8a));
border-radius: var(--sk-radius, 0.5rem);
background: var(--sk-surface, Canvas);
color: inherit;
/* 16px: a smaller field makes a phone zoom the page on focus. */
font: inherit;
font-size: 1rem;
}
.sk-plan-input[aria-invalid='true'] {
border-color: var(--sk-negative, #b3261e);
}
.sk-plan-form-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
}
.sk-plan-form-actions .sk-plan-button {
width: auto;
flex: 1 1 10rem;
}