@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;
	}
}

/* =====================================================================
 * 16. /signup — open an account, card on file, nothing charged
 *
 * Written against the markup SBIT_Portal_Signup actually prints: a stack of
 * .sb-card.sb-signup-step panels inside one .sb-signup-form, which becomes
 * two columns from 900px up. Tokens only — no colour is invented here.
 * ================================================================== */

/* The hidden attribute must beat any display we set below. Without this a
   panel carrying display:grid shows itself the moment the page paints, and
   the success card would greet a customer who has not signed up yet. */
.sb-app [hidden] {
	display: none !important;
}

.sb-signup {
	display: block;
	min-width: 0;
}

.sb-signup-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 18px;
	min-width: 0;
}

/* Timestamp fields are carried in the form, not laid out in it. */
.sb-signup-form > input[type="hidden"] {
	display: none;
}

.sb-signup-step {
	min-width: 0;
	align-self: start;
}

/* The intro line inside a step reads as guidance, not as a page subtitle. */
.sb-signup-step .sb-card-body > .sb-page-sub {
	font-size: 14px;
	margin-bottom: 4px;
}

.sb-signup-step .sb-field + .sb-field {
	margin-top: 14px;
}

/* "Billing address" divides the details card without opening a new panel. */
.sb-signup-step h3.sb-meta-label {
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid var(--sb-line);
}

.sb-signup-optional {
	margin-left: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-4);
}

.sb-signup-notes {
	min-height: 96px;
	resize: vertical;
	line-height: 1.55;
}

/* Package chooser ------------------------------------------------------
 *
 * The cards are one radio group. Selected has to be obvious without colour
 * vision: the marker fills, the border thickens to the accent, and the
 * ground shifts to accent-soft. Three signals, one of them shape.
 */

.sb-signup-plans {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
	min-width: 0;
}

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

.sb-signup-plan {
	position: relative;
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto;
	grid-template-areas:
		"mark name    price"
		"mark summary summary";
	column-gap: 12px;
	row-gap: 4px;
	align-items: start;
	min-height: 44px;
	margin: 0;
	padding: 14px 16px;
	background: var(--sb-surface);
	border: 1px solid var(--sb-line-strong);
	border-radius: var(--sb-radius);
	cursor: pointer;
	text-align: left;
	color: inherit;
	font: inherit;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

/* The marker is drawn, not an element, so the chooser works whether the
   markup ships a .sb-signup-plan-mark or nothing at all. */
.sb-signup-plan::before {
	content: "";
	grid-area: mark;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 2px solid var(--sb-line-strong);
	border-radius: 50%;
	background: var(--sb-surface);
	box-shadow: inset 0 0 0 4px var(--sb-surface);
	transition: border-color .15s ease, background-color .15s ease;
}

/* A card that ships its own marker element hands the job over. */
.sb-signup-plan:has(.sb-signup-plan-mark)::before {
	display: none;
}

.sb-signup-plan:hover {
	border-color: var(--sb-ink-4);
	background: var(--sb-surface-2);
}

.sb-signup-plan:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: var(--sb-ring);
	border-color: var(--sb-accent);
}

.sb-signup-plan.is-selected,
.sb-signup-plan[aria-checked="true"] {
	border-color: var(--sb-accent);
	background: var(--sb-accent-soft);
	box-shadow: inset 0 0 0 1px var(--sb-accent);
}

.sb-signup-plan.is-selected::before,
.sb-signup-plan[aria-checked="true"]::before {
	border-color: var(--sb-accent);
	background: var(--sb-accent);
}

/* :has() lives in its own rule on purpose. A browser that does not
   understand it drops the whole selector list, and the rules above are the
   ones that must survive — they are what the script toggles. */
.sb-signup-plan:has(input[type="radio"]:checked) {
	border-color: var(--sb-accent);
	background: var(--sb-accent-soft);
	box-shadow: inset 0 0 0 1px var(--sb-accent);
}

.sb-signup-plan:has(input[type="radio"]:checked)::before {
	border-color: var(--sb-accent);
	background: var(--sb-accent);
}

.sb-signup-plan:has(input[type="radio"]:focus-visible) {
	box-shadow: var(--sb-ring);
	border-color: var(--sb-accent);
}

.sb-signup-plan input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

/* Legacy marker element, kept working if the markup ever ships one. */
.sb-signup-plan-mark {
	grid-area: mark;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 2px solid var(--sb-line-strong);
	border-radius: 50%;
	background: var(--sb-surface);
	display: inline-grid;
	place-items: center;
	transition: border-color .15s ease, background-color .15s ease;
}

.sb-signup-plan-mark::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: transparent;
	transition: background-color .15s ease;
}

.sb-signup-plan.is-selected .sb-signup-plan-mark,
.sb-signup-plan[aria-checked="true"] .sb-signup-plan-mark,
.sb-signup-plan:has(input[type="radio"]:checked) .sb-signup-plan-mark {
	border-color: var(--sb-accent);
}

.sb-signup-plan.is-selected .sb-signup-plan-mark::after,
.sb-signup-plan[aria-checked="true"] .sb-signup-plan-mark::after,
.sb-signup-plan:has(input[type="radio"]:checked) .sb-signup-plan-mark::after {
	background: var(--sb-accent);
}

.sb-signup-plan-body {
	grid-area: name;
	min-width: 0;
	display: grid;
	gap: 4px;
}

.sb-signup-plan-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.sb-signup-plan-name {
	grid-area: name;
	display: block;
	font-size: 16px;
	font-weight: 600;
	color: var(--sb-ink);
	line-height: 1.3;
	margin: 0;
	min-width: 0;
}

.sb-signup-plan-price {
	grid-area: price;
	display: block;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -.012em;
	color: var(--sb-ink);
	white-space: nowrap;
	text-align: right;
	align-self: baseline;
}

.sb-signup-plan-summary,
.sb-signup-plan-desc {
	grid-area: summary;
	display: block;
	font-size: 13px;
	line-height: 1.5;
	color: var(--sb-ink-2);
	margin: 0;
	min-width: 0;
}

/* "I'm not sure yet" is a real answer, not a lesser one — but it is not a
   priced package either, so it wears a dashed edge and no price column. */
.sb-signup-plan-unsure {
	grid-template-columns: 22px minmax(0, 1fr);
	grid-template-areas:
		"mark name"
		"mark summary";
	border-style: dashed;
	background: var(--sb-surface-2);
}

.sb-signup-plan-unsure:hover {
	background: var(--sb-surface);
}

.sb-signup-plan-unsure.is-selected,
.sb-signup-plan-unsure[aria-checked="true"] {
	border-style: solid;
	background: var(--sb-accent-soft);
}

.sb-signup-plan-amount {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.018em;
	font-variant-numeric: tabular-nums;
	color: var(--sb-ink);
}

.sb-signup-plan-interval {
	font-size: 13px;
	color: var(--sb-ink-3);
	font-variant-numeric: tabular-nums;
}

.sb-signup-plan-features {
	grid-area: summary;
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: grid;
	gap: 6px;
	font-size: 13px;
	color: var(--sb-ink-2);
}

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

.sb-signup-plan-features .sb-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	color: var(--sb-good);
}

.sb-signup-plans.is-invalid .sb-signup-plan {
	border-color: var(--sb-crit);
}

.sb-signup-note {
	font-size: 13px;
	line-height: 1.55;
	color: var(--sb-ink-2);
	margin: 0;
}

/* "Nothing is charged today" ------------------------------------------
 *
 * The single most important sentence on the page. It keeps the info tone the
 * markup asked for and earns its weight through size and spacing instead of
 * a colour of its own.
 */

.sb-signup-nocharge {
	padding: 16px 18px;
	font-size: 14px;
	line-height: 1.6;
}

.sb-signup-nocharge strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	font-weight: 700;
	color: var(--sb-tone);
}

/* Legacy assurance block, kept for markup that still uses it. */
.sb-signup-assure {
	display: grid;
	gap: 10px;
	padding: 16px;
	border: 1px solid var(--sb-good-line);
	border-left: 3px solid var(--sb-good);
	border-radius: var(--sb-radius);
	background: var(--sb-good-bg);
}

.sb-signup-assure-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--sb-good);
}

.sb-signup-assure-title .sb-icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.sb-signup-assure-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--sb-ink-2);
}

.sb-signup-assure-list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.sb-signup-assure-list .sb-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	color: var(--sb-good);
}

.sb-signup-assure p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--sb-ink-2);
}

/* Form furniture ------------------------------------------------------ */

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

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

.sb-signup-aside,
.sb-signup-main {
	min-width: 0;
	display: grid;
	gap: 16px;
}

.sb-signup-group {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.sb-signup-fields {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.sb-signup-pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
}

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

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

.sb-signup-alert {
	margin: 0;
}

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

/* The honeypot.
   Deliberately NOT display:none and NOT hidden — bots skip both, and a form
   filler that never sees this field is a form filler we cannot catch. It is
   moved off-screen instead, where a real customer will never meet it. */
.sb-signup-honeypot,
.sb-signup-hp {
	position: absolute !important;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Submit + loading state ---------------------------------------------- */

.sb-signup-submit {
	display: grid;
	justify-items: stretch;
	gap: 10px;
	min-width: 0;
}

.sb-signup-submit .sb-hint {
	text-align: center;
	margin: 0;
}

.sb-signup-button {
	width: 100%;
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 15px;
}

.sb-signup-button[disabled],
.sb-signup-button[aria-busy="true"],
.sb-signup-button[aria-disabled="true"] {
	opacity: .72;
	cursor: progress;
	pointer-events: none;
}

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

.sb-signup-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-signup-button.is-busy .sb-signup-spinner,
.sb-signup-submit.is-busy .sb-signup-spinner,
.sb-signup-spinner.is-inline {
	display: inline-block;
}

.sb-signup-foot {
	display: grid;
	gap: 10px;
	text-align: center;
	font-size: 13px;
	color: var(--sb-ink-3);
}

/* Success screen ------------------------------------------------------
 *
 * A .sb-card that has earned a good-tone stripe. The card supplies its own
 * ground, border and padding, so all this adds is the stripe and the weight.
 */

.sb-signup-success {
	border-color: var(--sb-good-line);
	box-shadow: inset 3px 0 0 var(--sb-good), var(--sb-shadow);
}

.sb-signup-success .sb-card-head {
	background: var(--sb-good-bg);
	border-bottom-color: var(--sb-good-line);
}

.sb-signup-success .sb-card-title {
	font-size: 20px;
	letter-spacing: -.015em;
	color: var(--sb-ink);
}

.sb-signup-success .sb-card-title:focus-visible {
	outline: 2px solid transparent;
	box-shadow: var(--sb-ring);
	border-radius: var(--sb-radius-sm);
}

.sb-signup-success .sb-card-body p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--sb-ink-2);
}

.sb-signup-success-head {
	display: grid;
	gap: 10px;
	justify-items: start;
}

.sb-signup-success-icon {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--sb-good-bg);
	color: var(--sb-good);
}

.sb-signup-success-icon .sb-icon {
	width: 20px;
	height: 20px;
}

.sb-signup-success-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	letter-spacing: -.018em;
	color: var(--sb-ink);
}

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

.sb-signup-success-text {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--sb-ink-2);
}

.sb-signup-success-steps {
	list-style: none;
	counter-reset: sb-signup-step;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.sb-signup-success-steps li {
	counter-increment: sb-signup-step;
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	font-size: 14px;
	line-height: 1.55;
	color: var(--sb-ink-2);
}

.sb-signup-success-steps li::before {
	content: counter(sb-signup-step);
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--sb-accent-soft);
	color: var(--sb-accent);
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.sb-signup-success-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sb-signup-success-foot .sb-btn {
	flex: 1 1 auto;
}

/* Two columns from 900px up ------------------------------------------- */

@media (min-width: 900px) {
	.sb-signup-form {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 20px;
	}

	/* Anything that speaks to the whole form runs the full width. */
	.sb-signup-form > .sb-signup-alert,
	.sb-signup-form > noscript,
	.sb-signup-form > .sb-signup-honeypot,
	.sb-signup-form > .sb-signup-submit {
		grid-column: 1 / -1;
	}

	.sb-signup-layout {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 24px;
	}

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

	.sb-signup-submit {
		justify-items: start;
	}

	.sb-signup-button {
		width: auto;
		min-width: 280px;
	}

	.sb-signup-submit .sb-hint {
		text-align: left;
	}

	.sb-signup-success-foot .sb-btn {
		flex: 0 0 auto;
	}
}

/* =====================================================================
 * 17. /project — the seven-stage tracker
 *
 * The centrepiece of the portal. It has one job: a customer should know,
 * in under a second and without reading, which stage their site is at.
 * Vertical at every width, because that is how a build reads.
 * ================================================================== */

.sb-project-step {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 600;
	color: var(--sb-ink);
	font-variant-numeric: tabular-nums;
}

.sb-project-stages {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
	counter-reset: none;
}

.sb-project-stage {
	position: relative;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	column-gap: 14px;
	align-items: start;
	padding: 0 0 20px;
	margin: 0;
}

.sb-project-stage:last-child {
	padding-bottom: 0;
}

/* The connector runs from under one marker to the next. It is drawn on the
   list item rather than between them so the last stage simply has none. */
.sb-project-stage::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 32px;
	bottom: 4px;
	width: 2px;
	border-radius: 2px;
	background: var(--sb-line-strong);
}

.sb-project-stage:last-child::before {
	display: none;
}

/* Work still to come gets a broken line — the path exists but nothing has
   travelled it yet. */
.sb-project-stage.is-todo::before,
.sb-project-stage.is-current::before {
	background: repeating-linear-gradient(
		to bottom,
		var(--sb-line-strong) 0 4px,
		transparent 4px 8px
	);
}

.sb-project-stage-marker {
	position: relative;
	z-index: 1;
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--sb-line-strong);
	background: var(--sb-surface);
	color: var(--sb-ink-4);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.sb-project-stage-marker .sb-icon {
	width: 18px;
	height: 18px;
}

.sb-project-stage-body {
	display: grid;
	gap: 2px;
	min-width: 0;
	padding-top: 4px;
}

.sb-project-stage-name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--sb-ink-2);
	overflow-wrap: anywhere;
}

.sb-project-stage-date {
	font-size: 13px;
	color: var(--sb-ink-3);
	font-variant-numeric: tabular-nums;
}

.sb-project-stage-note {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--sb-ink-2);
}

/* Done: a tick, in the good tone, with its date. */
.sb-project-stage.is-done .sb-project-stage-marker {
	border-color: var(--sb-good-line);
	background: var(--sb-good-bg);
	color: var(--sb-good);
}

.sb-project-stage.is-done::before {
	background: var(--sb-good-line);
}

.sb-project-stage.is-done .sb-project-stage-name {
	color: var(--sb-ink);
}

.sb-project-stage.is-done .sb-project-stage-date {
	color: var(--sb-good);
	font-weight: 600;
}

/* Happening now: the one stage that must be unmistakable. Filled accent
   marker, a ring around it, its own panel, and the words to match. */
.sb-project-stage.is-current {
	padding-bottom: 24px;
}

.sb-project-stage.is-current .sb-project-stage-marker {
	border-color: var(--sb-accent);
	background: var(--sb-accent);
	color: var(--sb-accent-ink);
	box-shadow: 0 0 0 4px var(--sb-accent-soft);
}

.sb-project-stage.is-current .sb-project-stage-body {
	padding: 10px 14px;
	margin-top: -6px;
	border: 1px solid var(--sb-accent-ring);
	border-left: 3px solid var(--sb-accent);
	border-radius: var(--sb-radius);
	background: var(--sb-accent-soft);
}

.sb-project-stage.is-current .sb-project-stage-name {
	color: var(--sb-ink);
	font-size: 16px;
}

.sb-project-stage.is-current .sb-project-stage-date {
	color: var(--sb-accent);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* Not started: present, legible, plainly not the point yet. */
.sb-project-stage.is-todo .sb-project-stage-marker {
	border-style: dashed;
	background: var(--sb-surface-2);
}

.sb-project-stage.is-todo .sb-project-stage-name,
.sb-project-stage.is-todo .sb-project-stage-date {
	color: var(--sb-ink-4);
}

/* Site links ---------------------------------------------------------- */

.sb-project-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
	align-items: start;
}

.sb-project-link {
	display: grid;
	gap: 8px;
	justify-items: start;
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	background: var(--sb-surface-2);
}

.sb-project-link .sb-btn {
	max-width: 100%;
	min-height: 44px;
}

.sb-project-link .sb-hint {
	margin: 0;
}

/* Credentials --------------------------------------------------------- */

.sb-project-secret {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.sb-project-secret-value {
	font-size: 14px;
	letter-spacing: .04em;
	padding: 4px 10px;
	color: var(--sb-ink);
	background: var(--sb-surface-2);
	border: 1px solid var(--sb-line-strong);
	user-select: all;
}

/* The countdown is a promise being kept, so it stays visible and steady
   rather than flashing. Empty means nothing is on screen to clear. */
.sb-project-secret-timer {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--sb-warn);
	font-variant-numeric: tabular-nums;
}

.sb-project-secret-timer:empty,
.sb-project-error:empty {
	display: none;
}

.sb-project-error {
	display: block;
	margin-top: 6px;
}

/* Updates from us ----------------------------------------------------- */

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

.sb-project-note {
	display: grid;
	gap: 4px;
	padding: 14px;
	border: 1px solid var(--sb-line);
	border-left: 3px solid var(--sb-line-strong);
	border-radius: var(--sb-radius);
	background: var(--sb-surface-2);
	min-width: 0;
}

.sb-project-note-date {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--sb-ink-3);
	font-variant-numeric: tabular-nums;
}

.sb-project-note-body {
	font-size: 14px;
	line-height: 1.6;
	color: var(--sb-ink-2);
	overflow-wrap: anywhere;
}

/* =====================================================================
 * 18. /hours — balance and ledger
 *
 * Credits and debits must be told apart at a glance, but never by colour
 * alone: every row already carries a signed figure and a labelled pill.
 * portal.js adds .sb-hours-delta to the signed cell so the sign can also
 * carry weight and tone.
 * ================================================================== */

.sb-hours-delta {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.sb-hours-delta.is-credit {
	color: var(--sb-good);
}

.sb-hours-delta.is-debit {
	color: var(--sb-ink);
}

/* The sign is repeated as a shape so the two never rely on hue. */
.sb-hours-delta::after {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-left: 8px;
	vertical-align: baseline;
	background: currentColor;
}

.sb-hours-delta.is-credit::after {
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.sb-hours-delta.is-debit::after {
	clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* The balance tile is the answer to the only question anyone opens this
   screen with, so it is allowed to be bigger than its neighbours. */
.sb-stats > .sb-stat.sb-row:first-child .sb-stat-value {
	font-size: 30px;
}

/* =====================================================================
 * 19. /domains — buying, the ten-minute window, renewals
 * ================================================================== */

.sb-domains-name {
	display: block;
	margin: 0;
	font-family: var(--sb-mono);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -.01em;
	color: var(--sb-ink);
	overflow-wrap: anywhere;
}

/* In a table it is an identifier to be copied, not a headline. */
.sb-mono.sb-domains-name {
	display: inline;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: normal;
	color: var(--sb-ink-2);
}

/* The ten-minute window ------------------------------------------------
 *
 * This card is the last moment a typo can be undone, so it sits above
 * everything else and says so. The way out is outline-critical: plainly
 * available, never the thing your thumb lands on by accident.
 */

.sb-domains-pending {
	border-color: var(--sb-warn-line);
}

.sb-domains-pending .sb-card-head {
	background: var(--sb-warn-bg);
	border-bottom-color: var(--sb-warn-line);
}

.sb-domains-pending .sb-card-body {
	display: grid;
	gap: 8px;
}

.sb-domains-pending .sb-card-foot {
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

.sb-domains-countdown {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--sb-warn);
	font-variant-numeric: tabular-nums;
}

.sb-domains-countdown-value {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.015em;
	font-variant-numeric: tabular-nums;
}

.sb-domains-stop {
	margin: 0;
	display: grid;
}

.sb-domains-stop .sb-btn {
	min-height: 44px;
	width: 100%;
	white-space: normal;
}

.sb-domains-pending .sb-hint {
	margin: 0;
}

/* Search and results --------------------------------------------------- */

.sb-domains-search .sb-card-body {
	display: grid;
	gap: 18px;
}

.sb-domains-search .sb-portal-form {
	display: grid;
	gap: 12px;
	justify-items: start;
	margin: 0;
}

.sb-domains-search .sb-portal-form .sb-field {
	width: 100%;
}

.sb-domains-results {
	display: grid;
	gap: 10px;
	padding-top: 16px;
	border-top: 1px solid var(--sb-line);
}

.sb-domains-results > .sb-meta-label,
.sb-domains-results > .sb-hint {
	margin: 0;
}

.sb-domains-result {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	background: var(--sb-surface);
	box-shadow: inset 3px 0 0 var(--sb-tone);
	min-width: 0;
}

.sb-domains-result > div {
	min-width: 0;
}

.sb-domains-result .sb-domains-name {
	font-size: 17px;
}

.sb-domains-result .sb-hint {
	margin: 2px 0 0;
	font-weight: 600;
	color: var(--sb-tone);
}

.sb-domains-result-price {
	display: grid;
	gap: 8px;
	justify-items: end;
	text-align: right;
	flex: 0 0 auto;
}

.sb-domains-result-price p {
	margin: 0;
	font-size: 13px;
	color: var(--sb-ink-3);
	font-variant-numeric: tabular-nums;
}

.sb-domains-result-price strong {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--sb-ink);
}

.sb-domains-result-price form {
	margin: 0;
}

.sb-domains-result-price .sb-btn {
	min-height: 44px;
}

/* The last step before money moves ------------------------------------- */

.sb-domains-confirm .sb-card-body {
	display: grid;
	gap: 16px;
}

.sb-domains-confirm .sb-card-foot form {
	margin: 0;
}

.sb-domains-confirm .sb-card-foot .sb-btn {
	min-height: 44px;
}

/* Domains we hold ------------------------------------------------------ */

.sb-portal-domains .sb-card-body {
	padding: 0;
}

.sb-portal-domains .sb-table td .sb-hint {
	margin: 4px 0 0;
}

/* Expiring soon is a row that has to be spotted while scrolling: the
   stripe is already there, this tints the whole record behind it. The pill
   in the status column still carries the words. */
.sb-portal-domains .sb-table tbody tr.sb-row.is-warning td,
.sb-portal-domains .sb-table tbody tr.sb-row.is-critical td {
	background: var(--sb-tone-bg);
}

/* =====================================================================
 * 19b. Dashboard panels the new screens sit alongside
 * ================================================================== */

/* A dashboard panel is a .sb-card whose head carries a "view all" link.
   The link should sit level with the title, not float above it. */
.sb-portal-section > .sb-card-head {
	align-items: center;
}

.sb-portal-section > .sb-card-head .sb-btn {
	flex: 0 0 auto;
}

/* The support block is the last thing on the page and behaves like a note
   rather than a record, so it drops the panel ground and keeps the border. */
.sb-portal-support {
	background: var(--sb-surface-2);
	box-shadow: none;
}

.sb-portal-support .sb-card-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sb-portal-support .sb-card-title .sb-icon {
	color: var(--sb-ink-3);
}

.sb-portal-support .sb-meta-label {
	margin-top: 4px;
}

.sb-portal-support .sb-btn {
	min-height: 44px;
}

/* =====================================================================
 * 20. New screens — narrow viewports, motion, forced colours
 * ================================================================== */

@media (max-width: 640px) {
	.sb-project-stage {
		grid-template-columns: 28px minmax(0, 1fr);
		column-gap: 12px;
	}

	.sb-project-stage::before {
		left: 13px;
		top: 28px;
	}

	.sb-project-stage-marker {
		width: 28px;
		height: 28px;
		font-size: 12px;
	}

	.sb-project-stage-marker .sb-icon {
		width: 16px;
		height: 16px;
	}

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

	.sb-project-link .sb-btn {
		width: 100%;
	}

	.sb-domains-name {
		font-size: 18px;
	}

	.sb-domains-result {
		flex-direction: column;
		align-items: stretch;
	}

	.sb-domains-result-price {
		justify-items: stretch;
		text-align: left;
	}

	.sb-domains-result-price .sb-btn {
		width: 100%;
	}

	.sb-domains-search .sb-portal-form .sb-btn,
	.sb-domains-confirm .sb-card-foot .sb-btn {
		width: 100%;
	}

	.sb-signup-plan {
		padding: 14px;
		column-gap: 10px;
	}
}

/* Fingers, not cursors. */
@media (pointer: coarse) {
	.sb-signup-plan {
		min-height: 56px;
		padding: 16px;
	}

	.sb-signup-button {
		min-height: 52px;
	}

	.sb-project-link .sb-btn,
	.sb-domains-stop .sb-btn,
	.sb-domains-result-price .sb-btn,
	.sb-domains-confirm .sb-card-foot .sb-btn {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sb-signup-plan,
	.sb-signup-plan::before,
	.sb-signup-plan-mark,
	.sb-signup-plan-mark::after {
		transition: none !important;
	}

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

@media (forced-colors: active) {
	.sb-signup-plan,
	.sb-signup-assure,
	.sb-signup-success,
	.sb-signup-element,
	.sb-project-link,
	.sb-project-note,
	.sb-domains-result {
		border: 1px solid CanvasText;
	}

	.sb-signup-plan.is-selected,
	.sb-signup-plan[aria-checked="true"] {
		border-color: Highlight;
		box-shadow: none;
	}

	.sb-project-stage-marker {
		border-color: CanvasText;
	}

	.sb-project-stage.is-current .sb-project-stage-marker {
		border-color: Highlight;
		box-shadow: none;
	}

	.sb-project-stage.is-current .sb-project-stage-body {
		border: 1px solid Highlight;
	}

	.sb-hours-delta::after {
		background: CanvasText;
	}
}

@media print {
	.sb-project-stages,
	.sb-project-notes {
		break-inside: avoid;
	}

	.sb-project-secret,
	.sb-domains-stop,
	.sb-signup-submit {
		display: none !important;
	}
}
