@charset "UTF-8";
/*!
 * SmoothByte Payments — customer portal stylesheet.
 *
 * Standalone: the portal and the /subscribe/{token} page each render their own
 * HTML document with no theme CSS behind them, so this file carries the reset,
 * the design tokens, the base typography and every shared component.
 *
 * Structure
 *   1.  Reset
 *   2.  Design tokens (light, OS-dark, explicit light/dark)
 *   3.  Base elements
 *   4.  Utilities
 *   5.  Tone map (severity colours, set once, consumed everywhere)
 *   6.  Portal chrome — top bar, nav, account menu, main, footer
 *   7.  Page head + stat tiles
 *   8.  Cards, meta blocks, tables, pills, severity stripes
 *   9.  Buttons
 *   10. Forms
 *   11. Notices, empty states, dialogs, skeletons, copy buttons
 *   12. Screen furniture (services, invoices, payment methods, account, auth)
 *   13. /subscribe/{token}
 *   14. Responsive — mobile nav, stacked tables
 *   15. Reduced motion, forced colours, print
 *
 * Semantic status colour is kept strictly apart from the brand accent: the
 * accent means "this is the action", the status colours mean "this needs you".
 */

/* =====================================================================
 * 1. Reset
 * ================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100%;
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul[class],
ol[class] {
	margin: 0;
	padding: 0;
	list-style: none;
}

img,
svg,
video,
canvas {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

[hidden] {
	display: none !important;
}

/* =====================================================================
 * 2. Design tokens
 * ================================================================== */

:root {
	/* ground & ink */
	--sb-canvas: #F5F7FB;
	--sb-surface: #FFFFFF;
	--sb-surface-2: #F8FAFC;
	--sb-line: #E2E8F0;
	--sb-line-strong: #CBD5E1;
	--sb-ink: #0F172A;
	--sb-ink-2: #334155;
	--sb-ink-3: #64748B;
	--sb-ink-4: #94A3B8;

	/* brand accent — primary actions and active nav ONLY */
	--sb-accent: #2563EB;
	--sb-accent-hover: #1D4ED8;
	--sb-accent-soft: #EFF6FF;
	--sb-accent-ring: #93C5FD;
	--sb-accent-ink: #FFFFFF;

	/* semantic status — never used for buttons */
	--sb-good: #047857;
	--sb-good-bg: #ECFDF5;
	--sb-good-line: #A7F3D0;
	--sb-warn: #B45309;
	--sb-warn-bg: #FFFBEB;
	--sb-warn-line: #FDE68A;
	--sb-crit: #B91C1C;
	--sb-crit-bg: #FEF2F2;
	--sb-crit-line: #FECACA;
	--sb-neutral: #475569;
	--sb-neutral-bg: #F1F5F9;
	--sb-neutral-line: #E2E8F0;
	--sb-info: #4F46E5;
	--sb-info-bg: #EEF2FF;
	--sb-info-line: #C7D2FE;

	--sb-radius: 10px;
	--sb-radius-sm: 6px;
	--sb-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
	--sb-shadow-lift: 0 4px 12px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .06);
	--sb-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--sb-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

	/* derived, theme-swapped assets */
	--sb-ring: 0 0 0 3px var(--sb-accent-ring);
	--sb-scrim: rgba(15, 23, 42, .55);
	--sb-skeleton-a: #EEF2F7;
	--sb-skeleton-b: #E2E8F0;
	--sb-icon-sun: none;
	--sb-icon-moon: block;
	--sb-select-caret: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* The media query is the baseline for anyone who has never touched the toggle.
   Only tokens are redefined here — never a component. */
@media (prefers-color-scheme: dark) {
	:root {
		--sb-canvas: #0B1220;
		--sb-surface: #111A2E;
		--sb-surface-2: #0F1729;
		--sb-line: #1E293B;
		--sb-line-strong: #334155;
		--sb-ink: #E2E8F0;
		--sb-ink-2: #CBD5E1;
		--sb-ink-3: #94A3B8;
		--sb-ink-4: #64748B;
		--sb-accent: #3B82F6;
		--sb-accent-hover: #2563EB;
		--sb-accent-soft: #172554;
		--sb-accent-ring: #1D4ED8;
		--sb-accent-ink: #0B1220;
		--sb-good: #34D399;
		--sb-good-bg: #052E22;
		--sb-good-line: #065F46;
		--sb-warn: #FBBF24;
		--sb-warn-bg: #2E1F05;
		--sb-warn-line: #78350F;
		--sb-crit: #F87171;
		--sb-crit-bg: #2E0F0F;
		--sb-crit-line: #7F1D1D;
		--sb-neutral: #94A3B8;
		--sb-neutral-bg: #0F1729;
		--sb-neutral-line: #1E293B;
		--sb-info: #818CF8;
		--sb-info-bg: #1E1B4B;
		--sb-info-line: #3730A3;
		--sb-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
		--sb-shadow-lift: 0 4px 12px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .35);
		--sb-scrim: rgba(2, 6, 16, .7);
		--sb-skeleton-a: #16203A;
		--sb-skeleton-b: #1E293B;
		--sb-icon-sun: block;
		--sb-icon-moon: none;
		--sb-select-caret: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	}
}

/* The toggle must win in both directions, so both states are stamped again. */
:root[data-theme="dark"] {
	--sb-canvas: #0B1220;
	--sb-surface: #111A2E;
	--sb-surface-2: #0F1729;
	--sb-line: #1E293B;
	--sb-line-strong: #334155;
	--sb-ink: #E2E8F0;
	--sb-ink-2: #CBD5E1;
	--sb-ink-3: #94A3B8;
	--sb-ink-4: #64748B;
	--sb-accent: #3B82F6;
	--sb-accent-hover: #2563EB;
	--sb-accent-soft: #172554;
	--sb-accent-ring: #1D4ED8;
	--sb-accent-ink: #0B1220;
	--sb-good: #34D399;
	--sb-good-bg: #052E22;
	--sb-good-line: #065F46;
	--sb-warn: #FBBF24;
	--sb-warn-bg: #2E1F05;
	--sb-warn-line: #78350F;
	--sb-crit: #F87171;
	--sb-crit-bg: #2E0F0F;
	--sb-crit-line: #7F1D1D;
	--sb-neutral: #94A3B8;
	--sb-neutral-bg: #0F1729;
	--sb-neutral-line: #1E293B;
	--sb-info: #818CF8;
	--sb-info-bg: #1E1B4B;
	--sb-info-line: #3730A3;
	--sb-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
	--sb-shadow-lift: 0 4px 12px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .35);
	--sb-scrim: rgba(2, 6, 16, .7);
	--sb-skeleton-a: #16203A;
	--sb-skeleton-b: #1E293B;
	--sb-icon-sun: block;
	--sb-icon-moon: none;
	--sb-select-caret: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

:root[data-theme="light"] {
	--sb-canvas: #F5F7FB;
	--sb-surface: #FFFFFF;
	--sb-surface-2: #F8FAFC;
	--sb-line: #E2E8F0;
	--sb-line-strong: #CBD5E1;
	--sb-ink: #0F172A;
	--sb-ink-2: #334155;
	--sb-ink-3: #64748B;
	--sb-ink-4: #94A3B8;
	--sb-accent: #2563EB;
	--sb-accent-hover: #1D4ED8;
	--sb-accent-soft: #EFF6FF;
	--sb-accent-ring: #93C5FD;
	--sb-accent-ink: #FFFFFF;
	--sb-good: #047857;
	--sb-good-bg: #ECFDF5;
	--sb-good-line: #A7F3D0;
	--sb-warn: #B45309;
	--sb-warn-bg: #FFFBEB;
	--sb-warn-line: #FDE68A;
	--sb-crit: #B91C1C;
	--sb-crit-bg: #FEF2F2;
	--sb-crit-line: #FECACA;
	--sb-neutral: #475569;
	--sb-neutral-bg: #F1F5F9;
	--sb-neutral-line: #E2E8F0;
	--sb-info: #4F46E5;
	--sb-info-bg: #EEF2FF;
	--sb-info-line: #C7D2FE;
	--sb-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
	--sb-shadow-lift: 0 4px 12px rgba(15, 23, 42, .08), 0 1px 3px rgba(15, 23, 42, .06);
	--sb-scrim: rgba(15, 23, 42, .55);
	--sb-skeleton-a: #EEF2F7;
	--sb-skeleton-b: #E2E8F0;
	--sb-icon-sun: none;
	--sb-icon-moon: block;
	--sb-select-caret: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* =====================================================================
 * 3. Base elements
 * ================================================================== */

body.sb-app {
	background: var(--sb-canvas);
	color: var(--sb-ink);
	font-family: var(--sb-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-variant-numeric: normal;
}

.sb-app a {
	color: var(--sb-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.sb-app a:hover {
	color: var(--sb-accent-hover);
}

.sb-app strong,
.sb-app b {
	font-weight: 600;
	color: var(--sb-ink);
}

.sb-app small {
	font-size: 13px;
}

.sb-app :focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: var(--sb-ring);
	border-radius: var(--sb-radius-sm);
}

/* Keep the ring readable on dark surfaces where the accent ring is dim. */
.sb-app .sb-btn:focus-visible {
	box-shadow: var(--sb-ring), 0 0 0 1px var(--sb-surface);
}

/* =====================================================================
 * 4. Utilities
 * ================================================================== */

.sb-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Money and counts always line up. Right alignment is a table concern only. */
.sb-num {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

.sb-mono {
	font-family: var(--sb-mono);
	font-size: 12px;
	color: var(--sb-ink-2);
	background: var(--sb-surface-2);
	border: 1px solid var(--sb-line);
	border-radius: 4px;
	padding: 1px 6px;
	word-break: break-all;
}

.sb-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	stroke-width: 1.75;
}

.sb-portal-muted {
	color: var(--sb-ink-4);
}

/* Injected by portal.js so copy feedback and card errors are announced. */
.sb-portal-live {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* =====================================================================
 * 5. Tone map
 * ================================================================== */

/* Zero specificity so every component below can override freely. */
:where(.is-good) {
	--sb-tone: var(--sb-good);
	--sb-tone-bg: var(--sb-good-bg);
	--sb-tone-line: var(--sb-good-line);
}

:where(.is-warning) {
	--sb-tone: var(--sb-warn);
	--sb-tone-bg: var(--sb-warn-bg);
	--sb-tone-line: var(--sb-warn-line);
}

:where(.is-critical) {
	--sb-tone: var(--sb-crit);
	--sb-tone-bg: var(--sb-crit-bg);
	--sb-tone-line: var(--sb-crit-line);
}

:where(.is-neutral) {
	--sb-tone: var(--sb-neutral);
	--sb-tone-bg: var(--sb-neutral-bg);
	--sb-tone-line: var(--sb-neutral-line);
}

:where(.is-info) {
	--sb-tone: var(--sb-info);
	--sb-tone-bg: var(--sb-info-bg);
	--sb-tone-line: var(--sb-info-line);
}

/* =====================================================================
 * 6. Portal chrome
 * ================================================================== */

.sb-portal-skip {
	background: var(--sb-surface);
	color: var(--sb-ink);
	border: 1px solid var(--sb-line-strong);
	border-radius: var(--sb-radius-sm);
	font-size: 14px;
	font-weight: 600;
}

.sb-portal-skip:focus-visible,
.sb-subscribe-skip:focus-visible {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 14px;
	overflow: visible;
	clip: auto;
	clip-path: none;
}

.sb-portal-bar {
	position: sticky;
	top: 0;
	z-index: 60;
	background: var(--sb-surface);
	border-bottom: 1px solid var(--sb-line);
}

.sb-portal-bar-inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 8px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 60px;
}

.sb-portal-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: var(--sb-ink);
	text-decoration: none;
	border-radius: var(--sb-radius-sm);
	min-width: 0;
}

.sb-portal-wordmark:hover {
	color: var(--sb-ink);
}

.sb-portal-wordmark .sb-icon {
	color: var(--sb-accent);
	width: 24px;
	height: 24px;
}

.sb-portal-wordmark-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
	min-width: 0;
}

.sb-portal-wordmark-text strong {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -.01em;
	white-space: nowrap;
}

.sb-portal-wordmark-text span {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
}

.sb-portal-bar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Theme toggle -------------------------------------------------------- */

.sb-portal-theme {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface-2);
	color: var(--sb-ink-3);
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.sb-portal-theme:hover {
	color: var(--sb-ink);
	border-color: var(--sb-line-strong);
}

/* Which glyph shows is a token decision, so the media query stays token-only. */
.sb-portal-theme .sb-icon-sun {
	display: var(--sb-icon-sun);
}

.sb-portal-theme .sb-icon-moon {
	display: var(--sb-icon-moon);
}

/* Mobile nav trigger (injected by portal.js) --------------------------- */

.sb-portal-navtoggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	min-width: 44px;
	padding: 0 12px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface-2);
	color: var(--sb-ink-2);
	font-size: 14px;
	font-weight: 600;
}

/* The word "Menu" beside the burger — dropped on the narrowest phones so the
   trigger stays a clean 44px square next to the account button. */
.sb-portal-navtoggle-label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

@media (max-width: 380px) {
	.sb-portal-navtoggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.sb-portal-navtoggle {
		padding: 0;
	}
}

.sb-portal-navtoggle:hover {
	border-color: var(--sb-line-strong);
	color: var(--sb-ink);
}

.sb-portal-navtoggle .sb-portal-burger {
	position: relative;
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .18s ease, background-color .18s ease;
}

.sb-portal-navtoggle .sb-portal-burger::before,
.sb-portal-navtoggle .sb-portal-burger::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .18s ease;
}

.sb-portal-navtoggle .sb-portal-burger::before {
	top: -6px;
}

.sb-portal-navtoggle .sb-portal-burger::after {
	top: 6px;
}

.sb-portal-navtoggle[aria-expanded="true"] .sb-portal-burger {
	background: transparent;
}

.sb-portal-navtoggle[aria-expanded="true"] .sb-portal-burger::before {
	transform: translateY(6px) rotate(45deg);
}

.sb-portal-navtoggle[aria-expanded="true"] .sb-portal-burger::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* Account menu -------------------------------------------------------- */

.sb-portal-account {
	position: relative;
}

.sb-portal-account-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--sb-radius-sm);
	cursor: pointer;
	list-style: none;
	color: var(--sb-ink-2);
	font-size: 14px;
}

.sb-portal-account-trigger::-webkit-details-marker {
	display: none;
}

.sb-portal-account-trigger:hover {
	background: var(--sb-surface-2);
	border-color: var(--sb-line);
	color: var(--sb-ink);
}

.sb-portal-account-trigger .sb-icon-chevron {
	width: 16px;
	height: 16px;
	color: var(--sb-ink-4);
	transition: transform .18s ease;
}

.sb-portal-account[open] .sb-portal-account-trigger .sb-icon-chevron {
	transform: rotate(180deg);
}

.sb-portal-avatar {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--sb-accent-soft);
	color: var(--sb-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
}

.sb-portal-account-name {
	font-weight: 600;
	max-width: 14ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sb-portal-account-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 70;
	min-width: 248px;
	padding: 12px;
	background: var(--sb-surface);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	box-shadow: var(--sb-shadow-lift);
}

.sb-portal-account-email {
	font-size: 13px;
	color: var(--sb-ink-2);
	word-break: break-all;
	margin: 4px 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--sb-line);
}

.sb-portal-account-link {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 8px;
	border-radius: var(--sb-radius-sm);
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-ink-2);
	text-decoration: none;
}

.sb-portal-account-link .sb-icon {
	width: 18px;
	height: 18px;
	color: var(--sb-ink-4);
}

.sb-portal-account-link:hover {
	background: var(--sb-surface-2);
	color: var(--sb-accent);
}

.sb-portal-account-link:hover .sb-icon {
	color: var(--sb-accent);
}

/* Primary navigation --------------------------------------------------- */

.sb-nav {
	display: flex;
	gap: 2px;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 8px;
	border-top: 1px solid var(--sb-line);
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.sb-nav::-webkit-scrollbar {
	height: 3px;
}

.sb-nav::-webkit-scrollbar-thumb {
	background: var(--sb-line-strong);
	border-radius: 3px;
}

.sb-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-ink-3);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}

.sb-nav-item .sb-icon {
	width: 18px;
	height: 18px;
}

.sb-nav-item:hover {
	color: var(--sb-ink);
}

.sb-nav-item.is-active {
	color: var(--sb-accent);
	font-weight: 600;
	border-bottom-color: var(--sb-accent);
}

/* Main + footer -------------------------------------------------------- */

.sb-portal-main {
	max-width: 1120px;
	margin: 0 auto;
	padding: 24px 16px 56px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sb-portal-main > * {
	margin-block: 0;
}

.sb-portal-is-auth .sb-portal-main {
	max-width: 520px;
	padding-top: 40px;
}

.sb-portal-foot {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 16px 40px;
	border-top: 1px solid var(--sb-line);
	font-size: 12px;
	color: var(--sb-ink-3);
}

.sb-portal-foot p {
	margin: 0 0 4px;
}

.sb-portal-foot a {
	color: var(--sb-ink-2);
}

/* =====================================================================
 * 7. Page head + stat tiles
 * ================================================================== */

.sb-page-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.sb-page-head > * {
	min-width: 0;
}

.sb-page-heading {
	min-width: 0;
}

.sb-page-title {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -.022em;
	line-height: 1.18;
	margin: 0;
}

.sb-page-sub {
	font-size: 14px;
	color: var(--sb-ink-3);
	margin: 6px 0 0;
	max-width: 64ch;
}

.sb-page-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* Summary always comes before detail. */
.sb-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 12px;
}

.sb-stat {
	background: var(--sb-surface);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	padding: 16px;
	box-shadow: var(--sb-shadow);
}

.sb-stat > * {
	margin: 0;
}

.sb-stat-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
}

.sb-stat-value {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.2;
	margin-top: 6px;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.sb-stat-delta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--sb-ink-3);
	margin-top: 6px;
}

/* Direction is drawn, not written, so it reads at a glance. Severity comes
   from the tile's own stripe, never from the direction alone. */
.sb-stat-delta.is-up::before,
.sb-stat-delta.is-down::before {
	content: "";
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
}

.sb-stat-delta.is-up::before {
	border-bottom: 6px solid currentColor;
}

.sb-stat-delta.is-down::before {
	border-top: 6px solid currentColor;
}

.sb-stat-delta.is-flat::before {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 2px;
	border-radius: 2px;
	background: var(--sb-ink-4);
}

.sb-stat.sb-row .sb-stat-delta {
	color: var(--sb-tone);
	font-weight: 600;
}

/* =====================================================================
 * 8. Cards, meta, tables, pills, stripes
 * ================================================================== */

.sb-card {
	background: var(--sb-surface);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	box-shadow: var(--sb-shadow);
	overflow: hidden;
}

.sb-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 18px;
	background: var(--sb-surface-2);
	border-bottom: 1px solid var(--sb-line);
}

.sb-card-head > * {
	margin: 0;
	min-width: 0;
}

.sb-card-title {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.35;
	margin: 0;
}

h1.sb-card-title {
	font-size: 20px;
	letter-spacing: -.015em;
}

.sb-card-body {
	padding: 18px;
}

.sb-card-body > * {
	margin-block: 0;
}

.sb-card-body > * + * {
	margin-top: 14px;
}

.sb-card-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 14px 18px;
	background: var(--sb-surface-2);
	border-top: 1px solid var(--sb-line);
}

.sb-card-foot > * {
	margin: 0;
}

/* Detail blocks -------------------------------------------------------- */

.sb-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
	margin: 0;
}

.sb-meta-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	margin: 0;
}

.sb-meta-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
	margin: 0;
}

.sb-meta-value {
	font-size: 14px;
	color: var(--sb-ink);
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

/* Tables --------------------------------------------------------------- */

.sb-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	scrollbar-width: thin;
}

.sb-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	font-size: 14px;
}

.sb-table caption {
	text-align: left;
}

.sb-table th {
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
	background: var(--sb-surface-2);
	padding: 10px 12px;
	border-bottom: 1px solid var(--sb-line-strong);
	white-space: nowrap;
}

.sb-table td {
	padding: 12px;
	border-bottom: 1px solid var(--sb-line);
	color: var(--sb-ink-2);
	vertical-align: middle;
}

.sb-table tbody tr:last-child td {
	border-bottom: 0;
}

.sb-table .sb-num {
	text-align: right;
}

.sb-table tfoot th,
.sb-table tfoot td {
	background: var(--sb-surface-2);
	border-top: 2px solid var(--sb-line-strong);
	border-bottom: 0;
	color: var(--sb-ink);
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	font-size: 14px;
	padding: 12px;
}

.sb-table td .sb-btn.is-sm + .sb-btn.is-sm {
	margin-left: 4px;
}

/* Severity stripe — encoded in form as well as colour ------------------- */

tr.sb-row > *:first-child {
	box-shadow: inset 3px 0 0 var(--sb-tone);
}

.sb-card.sb-row,
.sb-stat.sb-row,
article.sb-row,
section.sb-row,
li.sb-row {
	box-shadow: inset 3px 0 0 var(--sb-tone), var(--sb-shadow);
}

/* Status pills --------------------------------------------------------- */

.sb-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 22px;
	padding: 1px 9px;
	border-radius: 999px;
	border: 1px solid var(--sb-tone-line);
	background: var(--sb-tone-bg);
	color: var(--sb-tone);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	vertical-align: middle;
}

.sb-pill::before {
	content: "";
	width: 6px;
	height: 6px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: currentColor;
}

/* Critical and warning get a distinct dot shape so the two never rely on
   hue alone to be told apart. */
.sb-pill.is-critical::before {
	border-radius: 1px;
	transform: rotate(45deg);
}

.sb-pill.is-warning::before {
	border-radius: 1px;
}

.sb-pill + .sb-pill {
	margin-left: 6px;
}

/* Chart container ------------------------------------------------------ */

.sb-chart {
	display: block;
	width: 100%;
	min-height: 160px;
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface-2);
	border: 1px solid var(--sb-line);
	padding: 12px;
	overflow: hidden;
}

/* =====================================================================
 * 9. Buttons
 * ================================================================== */

.sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--sb-radius-sm);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.sb-btn .sb-icon {
	width: 18px;
	height: 18px;
}

.sb-btn.is-primary {
	background: var(--sb-accent);
	border-color: var(--sb-accent);
	color: var(--sb-accent-ink);
}

.sb-btn.is-primary:hover {
	background: var(--sb-accent-hover);
	border-color: var(--sb-accent-hover);
	color: var(--sb-accent-ink);
}

.sb-btn.is-secondary {
	background: var(--sb-surface);
	border-color: var(--sb-line-strong);
	color: var(--sb-ink-2);
}

.sb-btn.is-secondary:hover {
	background: var(--sb-surface-2);
	border-color: var(--sb-ink-4);
	color: var(--sb-ink);
}

.sb-btn.is-ghost {
	background: transparent;
	border-color: transparent;
	color: var(--sb-ink-3);
}

.sb-btn.is-ghost:hover {
	background: var(--sb-surface-2);
	color: var(--sb-ink);
}

/* Destructive is always outline — never a solid red slab. */
.sb-btn.is-critical {
	background: transparent;
	border-color: var(--sb-crit);
	color: var(--sb-crit);
}

.sb-btn.is-critical:hover {
	background: var(--sb-crit-bg);
	border-color: var(--sb-crit);
	color: var(--sb-crit);
}

.sb-btn.is-sm {
	min-height: 36px;
	padding: 0 12px;
	font-size: 13px;
}

.sb-btn.is-sm .sb-icon {
	width: 16px;
	height: 16px;
}

.sb-btn[disabled],
.sb-btn[aria-disabled="true"],
.sb-btn.is-busy {
	opacity: .6;
	cursor: not-allowed;
	pointer-events: none;
}

/* Anything the finger has to hit gets the full 44px on touch. */
@media (pointer: coarse) {
	.sb-btn.is-sm {
		min-height: 44px;
		padding: 0 14px;
	}
}

/* =====================================================================
 * 10. Forms
 * ================================================================== */

.sb-field {
	margin: 0;
	min-width: 0;
}

.sb-field > * {
	margin: 0;
}

.sb-field > * + * {
	margin-top: 6px;
}

.sb-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--sb-ink-2);
}

.sb-label:has(input[type="checkbox"]),
.sb-label:has(input[type="radio"]) {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	min-height: 44px;
	align-content: center;
	flex-wrap: wrap;
}

.sb-label input[type="checkbox"],
.sb-label input[type="radio"] {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	margin-top: 2px;
	accent-color: var(--sb-accent);
}

.sb-input,
.sb-select {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--sb-ink);
	background: var(--sb-surface);
	border: 1px solid var(--sb-line-strong);
	border-radius: var(--sb-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.sb-input::placeholder {
	color: var(--sb-ink-4);
}

.sb-input:hover,
.sb-select:hover {
	border-color: var(--sb-ink-4);
}

.sb-input:focus,
.sb-select:focus,
.sb-input.is-focused {
	outline: none;
	border-color: var(--sb-accent);
	box-shadow: var(--sb-ring);
}

.sb-input[readonly] {
	background: var(--sb-surface-2);
	color: var(--sb-ink-3);
}

.sb-input[disabled],
.sb-select[disabled] {
	background: var(--sb-surface-2);
	color: var(--sb-ink-4);
	cursor: not-allowed;
}

.sb-input[aria-invalid="true"],
.sb-select[aria-invalid="true"],
.sb-input.is-invalid,
.sb-select.is-invalid {
	border-color: var(--sb-crit);
}

textarea.sb-input {
	min-height: 96px;
	padding: 12px;
	line-height: 1.5;
	resize: vertical;
}

.sb-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: var(--sb-select-caret);
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 20px 20px;
	cursor: pointer;
}

.sb-hint {
	font-size: 13px;
	color: var(--sb-ink-3);
}

.sb-error {
	font-size: 13px;
	font-weight: 500;
	color: var(--sb-crit);
}

/* A Stripe Element mounts into a .sb-input container; it is not a field the
   browser draws, so it needs its own height and inner padding. */
.sb-input:has(> iframe),
[data-sbit-card-element] {
	min-height: 48px;
	padding: 12px;
	background: var(--sb-surface);
}

[data-sbit-card-element] iframe {
	width: 100% !important;
}

[data-sbit-card-element].StripeElement--focus {
	border-color: var(--sb-accent);
	box-shadow: var(--sb-ring);
}

[data-sbit-card-element].StripeElement--invalid {
	border-color: var(--sb-crit);
}

/* =====================================================================
 * 11. Notices, empty states, dialogs, skeletons, copy
 * ================================================================== */

.sb-notice {
	padding: 14px 16px;
	border: 1px solid var(--sb-tone-line);
	border-left: 3px solid var(--sb-tone);
	border-radius: var(--sb-radius);
	background: var(--sb-tone-bg);
	color: var(--sb-ink);
	font-size: 14px;
}

.sb-notice > * {
	margin: 0;
}

.sb-notice > * + * {
	margin-top: 8px;
}

.sb-notice a {
	color: var(--sb-tone);
	font-weight: 600;
}

/* The one banner that has to shout: a payment did not go through. */
.sb-portal-alert {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px;
	border-left-width: 4px;
	box-shadow: var(--sb-shadow-lift);
}

.sb-portal-alert-icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--sb-crit);
	color: var(--sb-crit-bg);
}

.sb-portal-alert-icon .sb-icon {
	width: 22px;
	height: 22px;
}

.sb-portal-alert-body {
	flex: 1 1 auto;
	min-width: 0;
}

.sb-portal-alert-body > * {
	margin: 0;
}

.sb-portal-alert-body > * + * {
	margin-top: 8px;
}

.sb-portal-alert-title {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.25;
	color: var(--sb-crit);
}

.sb-portal-alert-body > .sb-portal-alert-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
}

/* Empty states --------------------------------------------------------- */

.sb-empty {
	text-align: center;
	padding: 28px 18px;
	border: 1px dashed var(--sb-line-strong);
	border-radius: var(--sb-radius);
	background: var(--sb-surface-2);
}

.sb-empty > * {
	margin-block: 0;
}

.sb-empty > * + * {
	margin-top: 10px;
}

.sb-empty-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--sb-ink);
}

.sb-empty-text {
	font-size: 14px;
	color: var(--sb-ink-3);
	max-width: 56ch;
	margin-left: auto;
	margin-right: auto;
}

.sb-empty-action {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sb-card-body.sb-empty {
	border: 0;
	background: transparent;
}

/* Dialogs -------------------------------------------------------------- */

dialog.sb-modal {
	width: 100%;
	max-width: min(560px, calc(100vw - 24px));
	padding: 0;
	border: 0;
	margin: auto;
	background: transparent;
	color: var(--sb-ink);
	overflow: visible;
}

dialog.sb-modal::backdrop {
	background: var(--sb-scrim);
}

/* Rendered open but non-modal (server-side fallback before portal.js runs). */
dialog.sb-modal[open]:not(:modal) {
	position: fixed;
	inset: 12px;
	z-index: 120;
	height: fit-content;
	max-height: calc(100dvh - 24px);
	margin: auto;
}

.sb-modal-panel {
	display: flex;
	flex-direction: column;
	max-height: calc(100dvh - 48px);
	background: var(--sb-surface);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	box-shadow: var(--sb-shadow-lift);
	overflow: hidden;
}

.sb-modal-head {
	padding: 16px 18px;
	border-bottom: 1px solid var(--sb-line);
	background: var(--sb-surface-2);
}

.sb-modal-head > * {
	margin: 0;
}

.sb-modal-body {
	padding: 18px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.sb-modal-body > * {
	margin-block: 0;
}

.sb-modal-body > * + * {
	margin-top: 14px;
}

.sb-modal-foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	padding: 14px 18px;
	border-top: 1px solid var(--sb-line);
	background: var(--sb-surface-2);
}

.sb-modal-foot > * {
	margin: 0;
}

/* Confirm dialog built by portal.js for destructive actions. It is narrower
   than a content dialog: one question, two answers, nothing to scroll. */
.sb-portal-confirm .sb-modal-panel {
	max-width: 460px;
}

.sb-portal-confirm-text {
	font-size: 15px;
	color: var(--sb-ink-2);
}

/* Skeletons ------------------------------------------------------------ */

.sb-skeleton {
	display: block;
	min-height: 16px;
	border-radius: var(--sb-radius-sm);
	background: linear-gradient(90deg, var(--sb-skeleton-a) 25%, var(--sb-skeleton-b) 37%, var(--sb-skeleton-a) 63%);
	background-size: 400% 100%;
	animation: sb-shimmer 1.4s ease infinite;
}

@keyframes sb-shimmer {
	from {
		background-position: 100% 50%;
	}

	to {
		background-position: 0 50%;
	}
}

/* Copy buttons --------------------------------------------------------- */

.sb-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-left: 6px;
	flex: 0 0 auto;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface);
	color: var(--sb-ink-3);
	vertical-align: middle;
	transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.sb-copy .sb-icon {
	width: 14px;
	height: 14px;
}

.sb-copy:hover {
	color: var(--sb-accent);
	border-color: var(--sb-accent);
	background: var(--sb-accent-soft);
}

.sb-copy.is-copied {
	color: var(--sb-good);
	border-color: var(--sb-good-line);
	background: var(--sb-good-bg);
}

@media (pointer: coarse) {
	.sb-copy {
		width: 44px;
		height: 44px;
	}
}

/* =====================================================================
 * 12. Screen furniture
 * ================================================================== */

/* Sections on the overview ------------------------------------------- */

.sb-portal-section-foot {
	margin: 0;
}

.sb-portal-service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 14px;
}

.sb-portal-services {
	display: grid;
	gap: 16px;
}

.sb-portal-service .sb-card-head {
	align-items: flex-start;
}

.sb-portal-service-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.sb-portal-service-head > * {
	margin: 0;
}

.sb-portal-service-price {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--sb-ink);
	font-variant-numeric: tabular-nums;
}

.sb-portal-support-list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	color: var(--sb-ink-2);
}

.sb-portal-support-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.sb-portal-support-list li::before {
	content: "";
	flex: 0 0 auto;
	width: 5px;
	height: 5px;
	margin-top: 9px;
	border-radius: 50%;
	background: var(--sb-ink-4);
}

/* Payment methods ------------------------------------------------------ */

.sb-cards-list {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sb-cards-item {
	background: var(--sb-surface);
}

.sb-cards-action {
	display: inline-flex;
	margin: 0;
}

/* Brand mark drawn by portal.js as inline SVG, tinted per brand. */
.sb-portal-cardmark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 24px;
	flex: 0 0 auto;
	margin-right: 8px;
	border-radius: 4px;
	border: 1px solid var(--sb-line);
	background: var(--sb-surface-2);
	color: var(--sb-mark, var(--sb-ink-3));
}

.sb-portal-cardmark svg {
	width: 24px;
	height: 16px;
	stroke-width: 1.75;
}

.sb-portal-cardmark.is-visa {
	--sb-mark: #1A4FBF;
}

.sb-portal-cardmark.is-mastercard {
	--sb-mark: #C2410C;
}

.sb-portal-cardmark.is-amex {
	--sb-mark: #0E7490;
}

.sb-portal-cardmark.is-discover {
	--sb-mark: #B45309;
}

:root[data-theme="dark"] .sb-portal-cardmark.is-visa {
	--sb-mark: #7BA5F5;
}

:root[data-theme="dark"] .sb-portal-cardmark.is-mastercard {
	--sb-mark: #FB923C;
}

:root[data-theme="dark"] .sb-portal-cardmark.is-amex {
	--sb-mark: #67E8F9;
}

:root[data-theme="dark"] .sb-portal-cardmark.is-discover {
	--sb-mark: #FCD34D;
}

/* Invoices ------------------------------------------------------------- */

.sb-invoices-pay {
	display: inline-flex;
	margin: 0;
}

.sb-field.sb-invoices-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.sb-field.sb-invoices-filter > * + * {
	margin-top: 0;
}

.sb-invoices-filter .sb-label {
	white-space: nowrap;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
}

.sb-invoices-filter .sb-select {
	width: auto;
	min-width: 150px;
}

/* Auth screens --------------------------------------------------------- */

.sb-portal-auth-card {
	max-width: 460px;
	width: 100%;
	margin: 0 auto;
}

.sb-portal-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sb-portal-form-inline {
	margin: 0;
}

.sb-portal-check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 14px;
	font-weight: 500;
	color: var(--sb-ink-2);
	cursor: pointer;
}

.sb-portal-check input {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	accent-color: var(--sb-accent);
}

.sb-portal-submit {
	width: 100%;
}

.sb-portal-auth-card .sb-card-foot {
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

/* =====================================================================
 * 13. /subscribe/{token}
 *
 * The subscribe screen prints a small scoped stylesheet of its own after this
 * file. These rules are the shared floor underneath it, so the page is still
 * complete and legible if that inline block ever changes.
 * ================================================================== */

.sb-subscribe-page {
	background: var(--sb-canvas);
	color: var(--sb-ink);
	font-family: var(--sb-font);
}

.sb-subscribe-shell {
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px 16px 64px;
}

.sb-subscribe-shell.is-narrow {
	max-width: 620px;
}

.sb-subscribe-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.sb-subscribe-brand-name {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.sb-subscribe-layout {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 20px;
	align-items: start;
}

.sb-subscribe-plan-name {
	font-size: 24px;
	line-height: 1.25;
	margin: 4px 0 0;
}

.sb-subscribe-plan .sb-card-head {
	display: block;
}

.sb-subscribe-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.sb-subscribe-amount {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -.022em;
	font-variant-numeric: tabular-nums;
}

.sb-subscribe-interval {
	font-size: 14px;
	color: var(--sb-ink-3);
}

.sb-subscribe-summary {
	font-size: 14px;
	color: var(--sb-ink-2);
}

.sb-subscribe-features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: 14px;
}

.sb-subscribe-features li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.sb-subscribe-tick {
	flex: 0 0 auto;
	margin-top: 3px;
	color: var(--sb-good);
}

.sb-subscribe-next-title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.sb-subscribe-next ul {
	margin: 0;
	padding-left: 18px;
	display: grid;
	gap: 6px;
	font-size: 13px;
}

.sb-subscribe-group {
	border: 0;
	margin: 0;
	padding: 0;
}

.sb-subscribe-legend {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
	padding: 0;
}

.sb-subscribe-required {
	color: var(--sb-crit);
	margin-left: 2px;
}

.sb-subscribe-secure {
	display: block;
}

.sb-subscribe-element {
	min-height: 120px;
	padding: 12px;
	border: 1px solid var(--sb-line-strong);
	border-radius: var(--sb-radius);
	background: var(--sb-surface);
}

.sb-subscribe-element .sb-skeleton {
	display: block;
	height: 96px;
}

.sb-subscribe-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
	font-size: 13px;
	line-height: 1.5;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
}

.sb-subscribe-check input {
	margin-top: 2px;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	accent-color: var(--sb-accent);
}

.sb-subscribe-form {
	min-width: 0;
}

.sb-subscribe-fields {
	margin: 0;
}

.sb-subscribe-fields .sb-field + .sb-field,
.sb-subscribe-fields .sb-subscribe-group + .sb-subscribe-group {
	margin-top: 14px;
}

.sb-subscribe-meta,
.sb-subscribe-terms,
.sb-subscribe-alert {
	margin: 0;
}

.sb-subscribe-alert p {
	margin: 0;
}

.sb-subscribe-submit {
	width: 100%;
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.sb-subscribe-submit[disabled] {
	opacity: .72;
	cursor: progress;
}

.sb-subscribe-submit-label {
	display: inline-block;
}

.sb-subscribe-spinner {
	display: none;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-top-color: transparent;
	animation: sb-spin .7s linear infinite;
}

.sb-subscribe-submit.is-busy .sb-subscribe-spinner,
.sb-subscribe-spinner.is-inline {
	display: inline-block;
}

.sb-subscribe-spinner.is-inline {
	color: var(--sb-ink-3);
}

@keyframes sb-spin {
	to {
		transform: rotate(360deg);
	}
}

.sb-subscribe-foot {
	text-align: center;
}

.sb-subscribe-result .sb-card-head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.sb-subscribe-legal {
	margin-top: 28px;
	font-size: 12px;
	color: var(--sb-ink-3);
	text-align: center;
}

.sb-subscribe-legal p {
	margin: 0 0 6px;
}

.sb-subscribe-support {
	color: var(--sb-accent);
	font-weight: 600;
}

/* =====================================================================
 * 14. Responsive
 * ================================================================== */

@media (max-width: 960px) {
	.sb-page-title {
		font-size: 26px;
	}
}

@media (max-width: 860px) {
	.sb-subscribe-layout {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Collapse the nav into a disclosure, but only once portal.js has added the
   trigger — with no JavaScript the nav stays a scrollable strip. */
@media (max-width: 760px) {
	.sb-app.has-js-nav .sb-portal-navtoggle {
		display: inline-flex;
	}

	.sb-app.has-js-nav .sb-nav {
		display: none;
		flex-direction: column;
		gap: 0;
		padding: 6px 8px 10px;
		overflow: visible;
	}

	.sb-app.has-js-nav .sb-nav[data-sb-open="true"] {
		display: flex;
	}

	.sb-app.has-js-nav .sb-nav-item {
		min-height: 48px;
		padding: 0 10px;
		border-bottom: 0;
		border-left: 3px solid transparent;
		border-radius: var(--sb-radius-sm);
	}

	.sb-app.has-js-nav .sb-nav-item.is-active {
		border-left-color: var(--sb-accent);
		background: var(--sb-accent-soft);
	}

	.sb-portal-account-name {
		display: none;
	}
}

@media (max-width: 640px) {
	.sb-portal-bar-inner {
		padding: 8px 12px;
	}

	.sb-portal-main {
		padding: 16px 12px 48px;
		gap: 16px;
	}

	.sb-portal-foot {
		padding: 16px 12px 32px;
	}

	.sb-page-title {
		font-size: 24px;
	}

	.sb-page-actions,
	.sb-page-actions .sb-btn {
		width: 100%;
	}

	.sb-card-body,
	.sb-modal-body {
		padding: 16px;
	}

	.sb-card-head,
	.sb-card-foot,
	.sb-modal-head,
	.sb-modal-foot {
		padding: 12px 16px;
	}

	.sb-stats {
		grid-template-columns: minmax(0, 1fr);
	}

	.sb-portal-alert {
		flex-direction: column;
		gap: 12px;
	}

	.sb-portal-alert-body > .sb-portal-alert-actions .sb-btn {
		flex: 1 1 100%;
	}

	.sb-modal-foot {
		justify-content: stretch;
	}

	.sb-modal-foot .sb-btn {
		flex: 1 1 100%;
	}

	.sb-card-foot .sb-btn,
	.sb-cards-action,
	.sb-cards-action .sb-btn {
		width: 100%;
	}

	/* Tables become stacked records. portal.js stamps the labels and the ARIA
	   roles that keep the relationships intact once display changes. */
	.has-js-tables .sb-table-wrap {
		overflow-x: visible;
	}

	.has-js-tables .sb-table {
		display: block;
		min-width: 0;
	}

	.has-js-tables .sb-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.has-js-tables .sb-table tbody,
	.has-js-tables .sb-table tfoot {
		display: block;
	}

	.has-js-tables .sb-table tr {
		display: block;
		padding: 8px 12px;
		margin-bottom: 10px;
		background: var(--sb-surface);
		border: 1px solid var(--sb-line);
		border-radius: var(--sb-radius-sm);
	}

	.has-js-tables .sb-table tr:last-child {
		margin-bottom: 0;
	}

	.has-js-tables .sb-table td,
	.has-js-tables .sb-table tfoot th {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 14px;
		padding: 7px 0;
		border: 0;
		border-bottom: 1px solid var(--sb-line);
		text-align: left;
		background: transparent;
		white-space: normal;
	}

	.has-js-tables .sb-table tr > *:last-child {
		border-bottom: 0;
	}

	.has-js-tables .sb-table td[data-label]::before,
	.has-js-tables .sb-table tfoot th[data-label]::before {
		content: attr(data-label);
		flex: 0 0 auto;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--sb-ink-3);
	}

	.has-js-tables .sb-table td.sb-num {
		justify-content: space-between;
		text-align: right;
		font-weight: 600;
		color: var(--sb-ink);
	}

	.has-js-tables .sb-table td:empty {
		display: none;
	}

	/* The stripe moves to the record, not the first cell. */
	.has-js-tables tr.sb-row > *:first-child {
		box-shadow: none;
	}

	.has-js-tables .sb-table tr.sb-row {
		box-shadow: inset 3px 0 0 var(--sb-tone);
	}
}

@media (max-width: 420px) {
	.sb-portal-wordmark-text span {
		display: none;
	}

	.sb-portal-account-menu {
		position: fixed;
		top: 68px;
		left: 12px;
		right: 12px;
		min-width: 0;
	}

	.sb-meta {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* =====================================================================
 * 15. Motion, forced colours, print
 * ================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.sb-app *,
	.sb-app *::before,
	.sb-app *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}

	.sb-skeleton {
		background: var(--sb-skeleton-a);
		animation: none !important;
	}

	/* A spinner is a progress report, not decoration: it keeps turning, just
	   slowly enough not to trouble anyone. */
	.sb-subscribe-spinner {
		animation-duration: 2.4s !important;
		animation-iteration-count: infinite !important;
	}
}

@media (forced-colors: active) {
	.sb-pill,
	.sb-btn,
	.sb-card,
	.sb-notice,
	.sb-input,
	.sb-select {
		border: 1px solid CanvasText;
	}

	.sb-nav-item.is-active {
		border-bottom-color: Highlight;
	}
}

@media print {
	.sb-portal-bar,
	.sb-portal-foot,
	.sb-page-actions,
	.sb-portal-theme,
	.sb-copy,
	.sb-btn,
	dialog.sb-modal {
		display: none !important;
	}

	body.sb-app {
		background: #fff;
		color: #000;
	}

	.sb-card {
		border: 1px solid #999;
		box-shadow: none;
		break-inside: avoid;
	}

	.sb-table-wrap {
		overflow: visible;
	}

	.sb-table {
		min-width: 0;
	}
}
