.checkout { max-width: 1050px; padding-top: 70px; padding-bottom: 90px; }
.checkout h1 { font-size: clamp(2.8rem, 7vw, 5rem); line-height: 1.04; letter-spacing: -.045em; margin: 16px 0 24px; }
.checkout .intro { max-width: 620px; font-size: 1.15rem; }
.checkout:not(.auth-layout) { max-width: 1200px; padding-block: 40px 48px; }
.checkout:not(.auth-layout) h1 { font-size: clamp(2.4rem, 4.5vw, 3.5rem); margin: 12px 0 20px; }
.checkout:not(.auth-layout) h2 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.03em; }
.checkout:not(.auth-layout) .intro { max-width: 75ch; font-size: 1rem; }
.checkout .eyebrow { margin-top: 0; }
.checkout #status { max-width: none; }
.checkout #account-authentication { font-size: .875rem; }
.test-notice { margin: 28px 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; }
.checkout section { margin-top: 32px; scroll-margin-top: 16px; }
.checkout form { display: grid; gap: 12px; max-width: 420px; }
.checkout form > div:not([hidden]) { display: grid; gap: 8px; }
.checkout form > div > p { margin: 0; font-size: 13px; color: var(--muted); }
.checkout details { margin: 20px 0; }
.checkout summary { cursor: pointer; }
.checkout input { min-width: 0; }
#recovery-code { overflow-wrap: anywhere; user-select: all; }
.checkout label.consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.checkout .consent input { width: auto; padding: 0; margin-top: 3px; flex: none; }
.checkout input { padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.checkout .button { cursor: pointer; margin: 8px 8px 8px 0; }
/* The beta note is a textarea; it reads like the email input above it, not like code. */
.checkout #beta-note { padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: inherit; font: inherit; min-width: 0; resize: vertical; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.plan, .license-card { border: 1px solid var(--line); padding: 24px; border-radius: 16px; margin: 18px 0; }
.checkout .plan { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.checkout .plan h3 { font-size: 1.25rem; line-height: 1.4; min-height: 2.8em; margin: 0 0 12px; }
.plan strong { font-size: 2rem; line-height: 1.2; display: block; margin: 0 0 20px; }
/* In a narrow card the price shrinks with the card instead of wrapping, so every card's button sits at the same height. */
.checkout .plan { container-type: inline-size; }
@container (max-width: 320px) { .checkout .plan strong { font-size: clamp(1.4rem, 11cqi, 2rem); } }
.plan strong span { white-space: nowrap; }
.checkout .plan p, .checkout .plan li { font-size: .875rem; line-height: 1.65; }
.checkout .plan p { margin: 0 0 14px; }
.checkout .plan ul { padding-left: 20px; margin: 0 0 14px; }
.checkout .plan li + li { margin-top: 4px; }
.checkout-actions { display: grid; gap: 12px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.plan .checkout-actions { margin-top: auto; }
.checkout-actions label { display: grid; gap: 6px; }
.checkout-actions input { width: 100%; }
.checkout .checkout-actions .button { width: 100%; margin: 0; }
.checkout .checkout-actions p { margin: 0; }
.checkout-actions p:empty { display: none; }
.plan > .button { margin-top: auto; }
.plans:has(> :only-child) { grid-template-columns: minmax(0, 520px); }
.license-card .checkout-actions { max-width: 420px; }
[data-checkout-page="checkout"] .plans { grid-template-columns: minmax(0, 1fr); }
[data-checkout-page="checkout"] #account-authentication { display: none; }
[data-checkout-page="checkout"] .plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
[data-checkout-page="checkout"] .checkout-actions { align-self: start; margin: 0; padding: 0; border: 0; }
[data-checkout-page="checkout"] .checkout-actions p { overflow-wrap: anywhere; }
.billing-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 24px 0 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--sunken); }
.billing-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.billing-switch label { position: relative; cursor: pointer; }
.billing-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.billing-switch span { display: block; padding: 8px 22px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.billing-switch input:checked + span { background: var(--accent); color: var(--on-accent); }
.billing-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.plans.yearly .plan:not(.yearly), .plans.monthly .plan:not(.monthly), .plans.lifetime .plan:not(.lifetime) { display: none; }
.billing-switch em { pointer-events: none; margin-left: 4px; font-style: normal; font-size: .75rem; opacity: .85; }
.plan .per-month { margin-top: 4px; color: var(--muted); }
.checkout .plans:is(.yearly, .monthly, .lifetime) { align-items: start; }
.checkout .plan > :is(.badge, h3, .was, strong, .per-month, .button) { order: -1; }
.checkout .plan.popular { position: relative; border: 2px solid var(--accent); box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 18%, transparent); }
.checkout .plan .badge { position: absolute; top: -13px; left: 22px; margin: 0; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.checkout .plan h3 { min-height: 0; }
.checkout .plan .was { min-height: 1.75em; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 4px; color: var(--muted); }
.checkout .plan .was span { padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .75rem; }
.plan strong span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.checkout .plans:is(.yearly, .monthly, .lifetime) .plan > .button { width: 100%; margin: 0 0 20px; }
.checkout .plans:is(.yearly, .monthly, .lifetime) .plan.popular > .button.secondary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.checkout .plan ul { list-style: none; padding: 16px 0 0; border-top: 1px solid var(--line); }
.checkout .plan li { position: relative; padding-left: 24px; }
.checkout .plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.checkout .plan ul ~ p, .checkout .plan ul ~ p ~ p { color: var(--muted); }
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plans:is(.yearly, .monthly, .lifetime) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .plans:is(.yearly, .monthly, .lifetime) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .checkout:not(.auth-layout) { padding-block: 28px 32px; }
  .plans { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .checkout .plan { padding: 20px; }
  .checkout .plan h3 { min-height: 0; }
  [data-checkout-page="checkout"] .plan { grid-template-columns: minmax(0, 1fr); }
}
.license-card code { overflow-wrap: anywhere; user-select: all; }
.installer-code { max-width: 640px; margin-top: 10px; }
.installer-code label { display: grid; gap: 6px; }
.installer-code input { width: 100%; }
.pending-checkout { padding: 16px 0; border-top: 1px solid var(--line); }
.license-card p { margin: 12px 0; }
/* License card: title, the two values the panel asks for, dates, then the install steps; housekeeping folds away at the bottom. */
.checkout .license-card h3 { margin: 0 0 2px; font-size: 1.35rem; letter-spacing: -.02em; }
.license-card .license-subtitle { margin: 0 0 16px; color: var(--muted); }
.license-card .license-note { margin: 6px 0 10px; }
.license-card .license-dates { margin: 6px 0; }
.license-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; margin: 12px 0; }
.license-field .field-label { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--muted); }
.license-field code { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); font-size: 14px; }
.license-field > details { grid-column: 1 / -1; margin: 0; }
.license-field > details .license-field { margin: 8px 0 0; }
.checkout .license-field .button { margin: 0; }
.checkout .license-card h4 { margin: 24px 0 4px; font-size: 1.05rem; }
.install-steps { margin: 0; padding-left: 22px; }
.install-steps li { margin: 10px 0; line-height: 1.6; }
.install-steps li > .button { display: inline-flex; margin: 8px 8px 0 0; }
.install-steps .command { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); font-size: 13px; line-height: 1.5; }
.install-steps .command.inline { display: inline; padding: 2px 6px; }
.install-steps .command-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-top: 8px; }
.checkout .install-steps .command-row .button { margin: 0; }
.install-steps .command-row + a { display: inline-block; margin-top: 8px; }
.code-expiry { margin: 8px 0 0; font-weight: 600; }
.license-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.checkout .license-actions .button { margin: 0; }
.checkout .license-card details.verify-download, .checkout .license-card details.license-more { margin: 12px 0 0; }
.checkout .license-card details.license-more { padding-top: 12px; border-top: 1px solid var(--line); }
.license-card details.license-more summary, .license-card details.verify-download summary { font-size: 14px; font-weight: 600; color: var(--muted); }
.license-more > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: start; margin-top: 10px; }
.checkout .license-more .button { margin: 0; }
.verify-download code { display: block; margin-top: 6px; font-size: 13px; }
.verify-download p { font-size: .9rem; color: var(--muted); }
.payment-received { margin: 0 0 20px; padding: 18px 22px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.checkout .payment-received h3 { margin: 0 0 8px; font-size: 1.25rem; }
.payment-received p { margin: 6px 0; }
.payment-received code { overflow-wrap: anywhere; user-select: all; }
/* Two classes deep so the error red outranks the muted paragraph colour of the app screen in the light theme too. */
.checkout .coupon-error, .checkout .purchase-error { color: #a4231f; font-weight: 600; }
[data-theme="dark"] .checkout .coupon-error, [data-theme="dark"] .checkout .purchase-error { color: #ff8a80; }
/* The purchase message takes focus so it is announced and in view; the quiet outline matches the rest of the app screen. */
.purchase-error:focus { outline: 1px solid var(--line-strong); outline-offset: 6px; border-radius: 4px; }
@media (max-width: 640px) {
  .install-steps .command-row, .license-field { grid-template-columns: minmax(0, 1fr); }
  .checkout .license-actions .button, .checkout .license-more > div .button { width: 100%; }
  .checkout .license-more .checkout-actions { width: 100%; }
}
#status { padding: 12px 0; min-height: 48px; }
.terms { max-width: 760px; line-height: 1.7; }
[hidden] { display: none !important; }
.checkout button:disabled { opacity: .55; cursor: wait; }
#feedback-form select,#feedback-form textarea{width:100%;padding:11px 12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--ink);font:inherit}
#feedback-box .hint{font-size:13px;color:var(--muted)}
/* Signed-in account area: top bar, section menu, one section at a time. */
.account-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:16px 20px;border:1px solid var(--line);border-radius:8px;background:var(--surface);margin-bottom:24px}
.checkout .account-bar h2{margin:0;font-size:1.5rem;overflow-wrap:anywhere}
.account-bar .eyebrow{margin:0 0 2px}
.account-badge{display:inline-block;margin-top:6px;font-size:12px;font-weight:600;padding:2px 9px;border-radius:99px;background:var(--sunken);color:var(--muted)}
.account-actions{display:flex;gap:8px;flex-wrap:wrap}
.account-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;align-items:start}
.account-layout:has(>.account-nav[hidden]){grid-template-columns:minmax(0,1fr)}
.account-nav{display:flex;flex-direction:column;gap:2px;position:sticky;top:84px}
.account-nav a{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:6px;color:var(--muted);font-weight:600;font-size:14px;text-decoration:none}
.account-nav a:hover{background:var(--surface);color:var(--ink)}
.account-nav a[aria-current=page]{background:var(--accent-soft);color:var(--ink);box-shadow:inset 3px 0 0 var(--accent)}
.account-nav a[hidden]{display:none}
.account-count{margin-left:auto;font-size:12px;padding:1px 8px;border-radius:99px;background:#f1c66b;color:#2a2414}
.account-sections h2{margin-top:0}
.account-sections>section>section:first-child{margin-top:0}
#licenses-empty{padding:16px 20px;border:1px dashed var(--line-strong);border-radius:8px;color:var(--muted)}
.account-facts{display:grid;grid-template-columns:max-content 1fr;gap:6px 18px;margin:0 0 12px;font-size:15px}
.account-facts dt{color:var(--muted)}
.account-facts dd{margin:0;font-weight:600;overflow-wrap:anywhere}
#section-settings h3,#pending-checkouts h3{margin-top:32px}
/* Below 1100px the three plan cards need the full width, so the section menu becomes a row of tabs. */
@media(max-width:1100px){.account-layout{grid-template-columns:1fr;gap:16px}.account-nav{flex-direction:row;overflow-x:auto;position:static;border-bottom:1px solid var(--line);gap:0}.account-nav a{white-space:nowrap;border-radius:0}.account-nav a[aria-current=page]{box-shadow:inset 0 -3px 0 var(--accent)}}
/* On a phone the tabs wrap into rows of two instead of scrolling off the edge, so every label stays whole. */
@media(max-width:760px){.account-nav{flex-wrap:wrap;overflow:visible;gap:4px;padding-bottom:6px}.account-nav a{flex:1 1 calc(50% - 2px);justify-content:center;padding:10px 8px;border-radius:var(--radius)}.account-nav a[aria-current=page]{box-shadow:inset 0 -3px 0 var(--accent)}}
.checkout :is(p,aside,label,.terms,.install-steps) a:not(.button){color:var(--accent);text-decoration:underline;text-underline-offset:2px}
/* App screen: a quiet border tells the secondary button from the surface it sits on; the strike-through price stays on one line in any face. */
.checkout .button.secondary{background:var(--paper);border:1px solid var(--line-strong)}
.checkout .button.secondary:hover{background:var(--surface);border-color:var(--ink)}
.checkout .plan .was{flex-wrap:nowrap;white-space:nowrap}
@container (max-width:320px){.checkout .plan .was{font-size:clamp(.7rem,4.4cqi,.875rem)}}
.checkout .plan .was{min-height:1.75rem}
