carlos / platform Public

console: the billing page gets plan cards, a currency switch and pack rows (styling)

The current plan is a summary tile (name, packs, members, currency,
renewal, and a few of the limits it gives the account today). Currency
is a segmented control of the same required radios; each paid plan is a
selectable card with its price and a few inclusions from the catalog;
packs are rows naming what one adds, with a wider quantity box. The paid
view's pack rows get the same treatment. No JavaScript; prices in every
sold currency stay rendered and the :has() rules still pick the checked
one. Field names, CSRF fields and the action order are unchanged. New
billingCopy strings are drafts for copy review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 0c4c9aacc579379c55bb74daaa58950e8ee5f09a parent de23fa5
4 files changed, +320 −35
  • internal/console/billingpage.go +122 −6
  • internal/console/billingpage_copy.go +23 −1
  • internal/console/templates/billing.html +59 −28
  • internal/console/templates/layout.html +116 −0

CI passed — run details

diff --git a/internal/console/billingpage.go b/internal/console/billingpage.go
index 8e341705e..e943a6032 100644
--- a/internal/console/billingpage.go
+++ b/internal/console/billingpage.go
@@ -9,6 +9,7 @@ import (
"net/url"
"regexp"
"slices"
+ "strconv"
"strings"
"time"
@@ -193,8 +194,13 @@ type billingView struct {
Notice, OwnersOnly, CurrencyNotice string
// Actions is decideBillingPage's Offered: the template renders each
// offered action in this order.
- Actions []string
+ Actions []string
+ // The summary: the current plan's label, its facts (packs held,
+ // members on a team plan, currency, renewal) and a few of the limits
+ // it gives the account today.
+ Plan string
Facts []string
+ Includes []string
Offers billingOffers
Buy *billingBuyView
Change *billingChangeView
@@ -232,10 +238,14 @@ type billingPlanOption struct {
// Prices and, on a team plan, Totals: one per currency the form can
// submit.
Prices, Totals []billingPrice
+ // Includes is a few of the plan's limits for this account today
+ // (planIncludes).
+ Includes []string
}
type billingPackInput struct {
Name, Price string // Price: the change form's, in the subscription's currency
+ Label, Adds string // the pack as the page names it, and what one adds
Prices []billingPrice // the purchase form's, one per currency it can submit
Max, Value int
}
@@ -356,12 +366,22 @@ func (s *Server) billingViewFor(r *http.Request, in billingPageInput, st billing
}
}
- // The facts.
+ // The summary.
plan, packs := cat.DefaultPlan, map[string]int(nil)
+ var sponsored *plans.Limits
if in.Row != nil {
- plan, packs = in.Row.Plan, in.Row.Packs
+ plan, packs, sponsored = in.Row.Plan, in.Row.Packs, in.Row.Sponsored
+ }
+ v.Plan = planLabel(plan)
+ if p, ok := cat.Plans[plan]; ok {
+ held := map[string]int{}
+ for _, name := range heldPacks(packs) {
+ held[name] = packs[name]
+ }
+ if l, err := cat.Effective(plan, held, sponsored, members); err == nil {
+ v.Includes = planIncludes(l, p.MaxMembers)
+ }
}
- v.Facts = append(v.Facts, fmt.Sprintf(billingCopy["fact.plan"], planLabel(plan)))
if held := heldPacks(packs); len(held) > 0 {
var parts []string
for _, name := range held {
@@ -445,6 +465,9 @@ func (s *Server) billingBuy(r *http.Request, book *plans.PriceBook, b *billingAc
for _, name := range paidPlansByTotal(cat, book, order) {
p := cat.Plans[name]
opt := billingPlanOption{Name: name, Label: planLabel(name), Checked: name == want}
+ if l, err := cat.Effective(name, nil, nil, members); err == nil {
+ opt.Includes = planIncludes(l, p.MaxMembers)
+ }
for _, c := range codes {
price, ok := book.PlanPrice(name, c)
if !ok {
@@ -463,7 +486,7 @@ func (s *Server) billingBuy(r *http.Request, book *plans.PriceBook, b *billingAc
continue
}
seen[pk] = true
- in := billingPackInput{Name: pk, Max: cat.Packs[pk].MaxQuantity}
+ in := billingPackInput{Name: pk, Label: planLabel(pk), Adds: packAdds(cat.Packs[pk].Adds), Max: cat.Packs[pk].MaxQuantity}
for _, c := range codes {
if price, ok := book.PackPrice(pk, c); ok {
in.Prices = append(in.Prices, billingPrice{c, fmt.Sprintf(billingCopy["pack.price"], plans.FormatMinor(c, price))})
@@ -506,7 +529,7 @@ func billingChange(cat *plans.Catalog, book *plans.PriceBook, plan string, packs
}
func packInput(cat *plans.Catalog, book *plans.PriceBook, name, currency string, value int) billingPackInput {
- in := billingPackInput{Name: name, Max: cat.Packs[name].MaxQuantity, Value: value}
+ in := billingPackInput{Name: name, Label: planLabel(name), Adds: packAdds(cat.Packs[name].Adds), Max: cat.Packs[name].MaxQuantity, Value: value}
if price, ok := book.PackPrice(name, currency); ok {
in.Price = fmt.Sprintf(billingCopy["pack.price"], plans.FormatMinor(currency, price))
}
@@ -583,6 +606,99 @@ func planLabel(name string) string {
func billingDate(t time.Time) string { return t.UTC().Format("2 January 2006") }
+// planIncludes is a few of l's limits as a plan card lists them, in the
+// words `carlos accounts plan` uses: apps and instances, sleeps after,
+// disk per app, custom domains, and the member cap of a plan that has one
+// (maxMembers, 0 for none). A limit of 0 is left out.
+func planIncludes(l plans.Limits, maxMembers int) []string {
+ var out []string
+ if l.RunningThings > 0 {
+ out = append(out, fmt.Sprintf(billingCopy["limit.running"], billingCount(int64(l.RunningThings))))
+ }
+ if l.IdleSeconds > 0 {
+ out = append(out, fmt.Sprintf(billingCopy["limit.idle"], billingDuration(l.IdleSeconds)))
+ }
+ if l.DiskBytes > 0 {
+ out = append(out, fmt.Sprintf(billingCopy["limit.disk"], billingBytes(l.DiskBytes)))
+ }
+ if l.CustomDomains {
+ out = append(out, billingCopy["limit.domains"])
+ }
+ if maxMembers > 0 {
+ out = append(out, fmt.Sprintf(billingCopy["limit.members"], maxMembers))
+ }
+ return out
+}
+
+// packAdds is what one unit of a pack adds, as its row says it; "" when
+// it adds nothing the page names.
+func packAdds(a plans.Limits) string {
+ var parts []string
+ if a.RunningThings > 0 {
+ parts = append(parts, fmt.Sprintf(billingCopy["limit.running"], billingCount(int64(a.RunningThings))))
+ }
+ if a.DiskBytes > 0 {
+ parts = append(parts, fmt.Sprintf(billingCopy["limit.disk"], billingBytes(a.DiskBytes)))
+ }
+ if a.StorageBytes > 0 {
+ parts = append(parts, fmt.Sprintf(billingCopy["limit.storage"], billingBytes(a.StorageBytes)))
+ }
+ if a.EmailPerDay > 0 {
+ parts = append(parts, fmt.Sprintf(billingCopy["limit.email"], billingCount(int64(a.EmailPerDay))))
+ }
+ if a.BandwidthBytesMonth > 0 {
+ parts = append(parts, fmt.Sprintf(billingCopy["limit.bandwidth"], billingBytes(a.BandwidthBytesMonth)))
+ }
+ if len(parts) == 0 {
+ return ""
+ }
+ return fmt.Sprintf(billingCopy["pack.adds"], strings.Join(parts, ", "))
+}
+
+// billingBytes is a size in GB, or MB below one GB, in the binary units
+// the catalog's numbers are written in (as accounts_plan.go's planBytes).
+func billingBytes(b int64) string {
+ const mb, gb = 1 << 20, 1 << 30
+ if b >= gb {
+ if b%gb == 0 {
+ return billingCount(b/gb) + " GB"
+ }
+ return strconv.FormatFloat(float64(b)/gb, 'f', 1, 64) + " GB"
+ }
+ return billingCount(b/mb) + " MB"
+}
+
+// billingCount is n with its thousands grouped: 1000 is "1,000".
+func billingCount(n int64) string {
+ if n < 0 {
+ return "-" + billingCount(-n)
+ }
+ s := strconv.FormatInt(n, 10)
+ for i := len(s) - 3; i > 0; i -= 3 {
+ s = s[:i] + "," + s[i:]
+ }
+ return s
+}
+
+// billingDuration is seconds in the largest whole unit: 900 is "15
+// minutes", 90 is "90 seconds".
+func billingDuration(s int) string {
+ unit := func(n int, one, many string) string {
+ if n == 1 {
+ return fmt.Sprintf(billingCopy[one], n)
+ }
+ return fmt.Sprintf(billingCopy[many], n)
+ }
+ switch {
+ case s%3600 == 0:
+ return unit(s/3600, "duration.hour", "duration.hours")
+ case s%60 == 0:
+ return unit(s/60, "duration.minute", "duration.minutes")
+ default:
+ return unit(s, "duration.second", "duration.seconds")
+ }
+}
+
// ---- /upgrade -------------------------------------------------------------
// upgradeCurrency is a currency value /upgrade keeps as given.
diff --git a/internal/console/billingpage_copy.go b/internal/console/billingpage_copy.go
index 20d716e8e..b75ebd252 100644
--- a/internal/console/billingpage_copy.go
+++ b/internal/console/billingpage_copy.go
@@ -98,7 +98,6 @@ var billingCopy = map[string]string{
"pick.title": "Which account?",
// Task 8's own drafts, beyond the plan's list: labels the page needs.
- "fact.plan": "Plan: %s",
"fact.packs": "Packs: %s",
"fact.currency": "Pays in %s",
"plan.price": "%s a year",
@@ -116,4 +115,27 @@ var billingCopy = map[string]string{
"error.title": "Error",
"page.read_failed": "We couldn't read billing. Please try again.",
"upgrade.read_failed": "We couldn't read your accounts. Please try again.",
+
+ // The page's styling pass (2026-10-28): the summary's heading, the
+ // packs heading and line, and the limits a plan card and a pack row
+ // list, in the words `carlos accounts plan` uses. DRAFTS for copy
+ // review.
+ "summary.title": "Your plan",
+ "packs.title": "Packs",
+ "packs.lede": "Optional. Each pack adds to the plan's limits.",
+ "pack.adds": "Adds %s",
+ "limit.running": "%s apps and instances",
+ "limit.idle": "Sleeps after %s",
+ "limit.disk": "%s disk per app",
+ "limit.storage": "%s object storage",
+ "limit.email": "%s emails a day",
+ "limit.bandwidth": "%s bandwidth a month",
+ "limit.domains": "Custom domains",
+ "limit.members": "Up to %d members",
+ "duration.second": "%d second",
+ "duration.seconds": "%d seconds",
+ "duration.minute": "%d minute",
+ "duration.minutes": "%d minutes",
+ "duration.hour": "%d hour",
+ "duration.hours": "%d hours",
}
diff --git a/internal/console/templates/billing.html b/internal/console/templates/billing.html
index 7504b6164..570cdc9ea 100644
--- a/internal/console/templates/billing.html
+++ b/internal/console/templates/billing.html
@@ -9,10 +9,20 @@
{{if .Notice}}<p class="banner">{{.Notice}}</p>{{end}}
{{if .OwnersOnly}}<p class="banner">{{.OwnersOnly}}</p>{{end}}
{{if .CurrencyNotice}}<p class="banner error">{{.CurrencyNotice}}</p>{{end}}
-<ul>
- {{range .Facts}}<li>{{.}}</li>
- {{end}}
-</ul>
+<section class="tile billing-now" aria-labelledby="billing-now-title">
+ <div>
+ <h2 id="billing-now-title">{{billingText "summary.title"}}</h2>
+ <p class="tile-value">{{.Plan}}</p>
+ {{if .Facts}}<ul class="billing-facts">
+ {{range .Facts}}<li>{{.}}</li>
+ {{end}}
+ </ul>{{end}}
+ </div>
+ {{if .Includes}}<ul class="billing-includes">
+ {{range .Includes}}<li>{{icon "check"}}<span>{{.}}</span></li>
+ {{end}}
+ </ul>{{end}}
+</section>
{{/* The offered actions, in decideBillingPage's order. */}}
{{range .Actions}}
{{if eq . "confirm"}}<div class="settings-row"><form method="post" action="{{$.Base}}/billing/confirm">
@@ -37,59 +47,80 @@
<button type="submit">{{billingText "button.resume"}}</button>
</form></div>{{end}}
{{if eq . "buy"}}{{with $.Billing.Buy}}
-<h2>{{billingText "buy.title"}}</h2>
{{if .Currencies}}<style>
{{range .Currencies}}.buy:has(input[name=currency][value={{.Code}}]:checked) .price:not(.price-{{.Code}}){display:none}
{{end}}</style>{{end}}
+{{/* One form: the currency, a plan card per paid plan, the packs. Every
+ price stays on the page in every currency the form can submit; the
+ rules above show the checked currency's. */}}
<form class="buy" method="post" action="{{$.Base}}/billing/checkout">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
- {{if .FixedCurrency}}<p>{{.FixedCurrency}}<input type="hidden" name="currency" value="{{.FixedCurrency}}"></p>
- {{else}}<p>{{billingText "currency.legend"}}:
- {{range .Currencies}}<label><input type="radio" name="currency" value="{{.Code}}"{{if .Checked}} checked{{end}} required> {{.Code}}</label>
- {{end}}
- </p>{{end}}
- {{range .Plans}}<p data-plan="{{.Name}}">
- <label><input type="radio" name="plan" value="{{.Name}}"{{if .Checked}} checked{{end}} required> {{.Label}}</label>
- {{range .Prices}}<span class="small price price-{{.Code}}" data-currency="{{.Code}}">{{.Text}}</span>
- {{end}}{{range .Totals}}<span class="small price price-{{.Code}} total" data-currency="{{.Code}}">{{.Text}}</span>
- {{end}}
- </p>
- {{end}}
+ <div class="sectionhead">
+ <h2 id="buy-title">{{billingText "buy.title"}}</h2>
+ {{if .FixedCurrency}}<p class="currency"><span class="small">{{billingText "currency.legend"}}</span>
+ <span class="seg"><span class="seg-fixed">{{.FixedCurrency}}</span></span><input type="hidden" name="currency" value="{{.FixedCurrency}}"></p>
+ {{else}}<fieldset class="currency">
+ <legend class="small">{{billingText "currency.legend"}}</legend>
+ <span class="seg">
+ {{range .Currencies}}<label><input type="radio" name="currency" value="{{.Code}}"{{if .Checked}} checked{{end}} required><span>{{.Code}}</span></label>
+ {{end}}</span>
+ </fieldset>{{end}}
+ </div>
+ <fieldset class="plan-cards" aria-labelledby="buy-title">
+ {{range .Plans}}<div class="plan-card">
+ <p data-plan="{{.Name}}">
+ <label><input type="radio" name="plan" value="{{.Name}}"{{if .Checked}} checked{{end}} required aria-describedby="plan-{{.Name}}-cost{{if .Includes}} plan-{{.Name}}-incl{{end}}"> <span class="plan-name">{{.Label}}</span></label>
+ <span class="plan-cost" id="plan-{{.Name}}-cost">
+ {{range .Prices}}<span class="small price price-{{.Code}}" data-currency="{{.Code}}">{{.Text}}</span>
+ {{end}}{{range .Totals}}<span class="small price price-{{.Code}} total" data-currency="{{.Code}}">{{.Text}}</span>
+ {{end}}</span>
+ </p>
+ {{if .Includes}}<ul class="plan-incl" id="plan-{{.Name}}-incl">
+ {{range .Includes}}<li>{{icon "check"}}<span>{{.}}</span></li>
+ {{end}}
+ </ul>{{end}}
+ </div>
+ {{end}}</fieldset>
+ {{if .Packs}}<h3 id="packs-title">{{billingText "packs.title"}}</h3>
+ <p class="small">{{billingText "packs.lede"}}</p>
<div class="tablewrap">
- <table>
+ <table class="packs" aria-labelledby="packs-title">
{{range .Packs}}<tr data-pack="{{.Name}}">
- <td><label for="pack-{{.Name}}">{{.Name}}</label></td>
- <td><input type="number" id="pack-{{.Name}}" name="pack_{{.Name}}" min="0" max="{{.Max}}" step="1" value="{{.Value}}"></td>
+ <td><label for="pack-{{.Name}}">{{.Label}}</label>{{if .Adds}}<span class="small" id="pack-{{.Name}}-adds">{{.Adds}}</span>{{end}}</td>
+ <td><input type="number" id="pack-{{.Name}}" name="pack_{{.Name}}" min="0" max="{{.Max}}" step="1" value="{{.Value}}" inputmode="numeric"{{if .Adds}} aria-describedby="pack-{{.Name}}-adds"{{end}}></td>
<td>{{range .Prices}}<span class="small price price-{{.Code}}" data-currency="{{.Code}}">{{.Text}}</span>
{{end}}</td>
</tr>
{{end}}
</table>
+ </div>{{end}}
+ <div class="buy-foot">
+ <button type="submit">{{billingText "buy.button"}}</button>
</div>
- <button type="submit">{{billingText "buy.button"}}</button>
</form>
{{end}}{{end}}
{{if eq . "change"}}{{with $.Billing.Change}}
+{{if .Packs}}<h2 id="packs-title">{{billingText "packs.title"}}</h2>
<div class="tablewrap">
-<table>
+<table class="packs packs-change" aria-labelledby="packs-title">
{{range .Packs}}<tr>
- <td><label for="change-{{.Name}}">{{.Name}}</label></td>
+ <td><label for="change-{{.Name}}">{{.Label}}</label>{{if .Adds}}<span class="small" id="change-{{.Name}}-adds">{{.Adds}}</span>{{end}}</td>
<td class="small">{{.Price}}</td>
<td><form method="post" action="{{$.Base}}/billing/change">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
<input type="hidden" name="pack" value="{{.Name}}">
- <input type="number" id="change-{{.Name}}" name="quantity" value="{{.Value}}" min="0" max="{{.Max}}" step="1">
- <button class="linkish" type="submit">{{billingText "button.change"}}</button>
+ <input type="number" id="change-{{.Name}}" name="quantity" value="{{.Value}}" min="0" max="{{.Max}}" step="1" inputmode="numeric"{{if .Adds}} aria-describedby="change-{{.Name}}-adds"{{end}}>
+ <button class="btn-sm btn-secondary" type="submit">{{billingText "button.change"}}</button>
</form></td>
</tr>
{{end}}
</table>
-</div>
-{{if .Upgrades}}<div class="settings-row">
+</div>{{end}}
+{{if .Upgrades}}<div class="settings-row billing-upgrades">
{{range .Upgrades}}<form method="post" action="{{$.Base}}/billing/change">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
<input type="hidden" name="plan" value="{{.Name}}">
- <button type="submit">{{.Label}}</button>
+ <button class="btn-secondary" type="submit">{{.Label}}</button>
</form>
{{end}}
</div>{{end}}
diff --git a/internal/console/templates/layout.html b/internal/console/templates/layout.html
index 2df237b94..0fb0d1b2a 100644
--- a/internal/console/templates/layout.html
+++ b/internal/console/templates/layout.html
@@ -558,6 +558,122 @@
header nav a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }
header nav a.addr { color: var(--muted); text-decoration: none; }
header nav a.addr:hover { text-decoration: underline; }
+ /* The billing page (billing.html). Its price elements carry fixed class
+ lists that billing.html's own currency rules and their guard test
+ (TestBillingPagePricesFollowShownCurrency) read, so they are styled
+ here as span.price in context, never by a class of their own.
+
+ The summary is a tile: the plan's name as its value, its facts under
+ it, and what it gives the account today beside them. */
+ .billing-now {
+ display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
+ gap: 1rem 3rem; padding: 1.15rem 1.4rem 1.25rem; margin: 0 0 0.5rem;
+ }
+ .billing-now .tile-value { margin: 0 0 0.3rem; line-height: 1.2; }
+ .billing-facts { list-style: none; font-size: 0.9rem; color: var(--muted); }
+ .billing-includes, .plan-incl { list-style: none; display: grid; gap: 0.3rem; font-size: 0.9rem; }
+ .billing-includes { grid-template-columns: repeat(auto-fit, minmax(13rem, auto)); column-gap: 2rem; align-self: center; }
+ .billing-includes li, .plan-incl li { display: flex; align-items: flex-start; gap: 0.5rem; }
+ .billing-includes .icon, .plan-incl .icon { color: var(--accent); margin-top: 0.25em; }
+ /* The purchase form: a heading with the currency switch at its right
+ end, the plan cards, the packs, then the one button. */
+ .buy fieldset { border: 0; min-width: 0; }
+ .buy .currency { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
+ .buy .currency legend { float: left; }
+ /* A segmented control made of real radios: each radio is laid
+ transparently over its own label, so it keeps its click, its keyboard
+ arrows and its required check, and the label carries the look. */
+ .seg {
+ display: inline-flex; gap: 2px; padding: 2px; border-radius: 0.5rem;
+ background: var(--accent-soft);
+ }
+ .seg label { position: relative; display: block; }
+ .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
+ .seg label > span, .seg-fixed {
+ display: block; min-width: 3.4rem; padding: 0.4rem 0.75rem; border-radius: 0.375rem;
+ font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
+ text-align: center; color: var(--muted); line-height: 1.3;
+ transition: color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
+ }
+ .seg label:hover > span { color: var(--ink); }
+ .seg label:has(input:checked) > span, .seg-fixed {
+ background: var(--bg); color: var(--ink);
+ box-shadow: 0 1px 2px rgba(32, 29, 41, 0.12), 0 1px 4px rgba(32, 29, 41, 0.08);
+ }
+ .seg label:has(input:focus-visible) > span { outline: 2px solid var(--accent); outline-offset: 1px; }
+ /* Plan cards. The label's ::after stretches over its card, so the whole
+ card picks the plan; the checked card takes the accent. */
+ .plan-cards {
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
+ gap: 1rem; margin: 0 0 2.25rem;
+ }
+ .plan-card {
+ position: relative; border: 1px solid var(--rule); border-radius: 0.6rem;
+ padding: 1.1rem 1.25rem 1.25rem;
+ transition: border-color 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
+ }
+ .plan-card:hover { border-color: var(--muted); }
+ .plan-card:has(input:checked) {
+ border-color: var(--accent); background: var(--accent-soft);
+ box-shadow: inset 0 0 0 1px var(--accent);
+ }
+ .plan-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
+ .plan-card p { margin: 0; max-width: none; }
+ .plan-card label { display: flex; align-items: center; gap: 0.55rem; cursor: pointer; }
+ .plan-card label::after { content: ""; position: absolute; inset: 0; }
+ .plan-card input { flex: none; width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--accent); cursor: pointer; }
+ .plan-name { font-size: 1.15rem; font-weight: 650; }
+ .plan-cost { display: block; margin: 0.65rem 0 0; }
+ .plan-card span.price {
+ display: block; color: var(--ink); font-size: 1.15rem; font-weight: 650;
+ line-height: 1.3; text-wrap: balance; font-variant-numeric: tabular-nums;
+ }
+ .plan-card span.total { margin-top: 0.4rem; font-size: 0.9rem; font-weight: 500; }
+ /* No currency checked yet (a refused one): every currency's price shows,
+ so each steps down to one line's weight. */
+ .buy:not(:has(input[name=currency]:checked)) .plan-card span.price { font-size: 0.95rem; font-weight: 500; }
+ .plan-incl { margin: 1rem 0 0; padding: 0.9rem 0 0; border-top: 1px solid var(--rule); }
+ .plan-card:has(input:checked) .plan-incl { border-top-color: var(--accent-soft); }
+ /* Packs: one row each, the name and what one adds, a quantity, a price.
+ The quantity box is wide enough for its maximum and steps by one. */
+ .buy h3 { margin: 0 0 0.2rem; }
+ .buy h3 + .small { margin: 0 0 0.75rem; }
+ table.packs { margin: 0; }
+ .packs tr:first-child td { border-top: 1px solid var(--rule); }
+ .packs td { padding: 0.75rem 1.25rem 0.75rem 0; vertical-align: middle; }
+ .packs td:first-child { width: 100%; }
+ .packs td + td { white-space: nowrap; }
+ .packs td:last-child { padding-right: 0; text-align: right; }
+ .packs label { display: block; font-weight: 600; }
+ .packs td:first-child .small { display: block; }
+ .packs span.price { display: block; color: var(--ink); font-variant-numeric: tabular-nums; }
+ .packs td form { justify-content: flex-end; flex-wrap: nowrap; }
+ .packs input[type=number] {
+ width: 4.75rem; padding: 0.4rem 0.5rem; text-align: center;
+ font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums;
+ color: var(--ink); background: var(--bg); accent-color: var(--accent);
+ border: 1px solid var(--rule); border-radius: 0.4rem;
+ }
+ .packs input[type=number]:hover { border-color: var(--muted); }
+ .packs input[type=number]:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
+ .buy-foot { margin: 1.75rem 0 0; }
+ .buy-foot button { padding: 0.7rem 1.5rem; }
+ .billing-upgrades { margin-top: 1.25rem; }
+ @media (min-width: 46rem) {
+ .billing-includes { grid-template-columns: repeat(2, auto); }
+ }
+ @media (max-width: 40rem) {
+ .billing-now { padding: 1rem 1.1rem 1.1rem; }
+ .packs tr {
+ display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
+ gap: 0.6rem 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule);
+ }
+ .packs tr:first-child { border-top: 1px solid var(--rule); }
+ .packs td, .packs tr:first-child td { display: block; width: auto; padding: 0; border: 0; }
+ .packs td:first-child { grid-column: 1 / -1; }
+ .packs td:last-child { text-align: right; }
+ .buy-foot button { width: 100%; }
+ }
</style>
</head>
<body>