/**
 * Static Site Gen — the service pages in the WooCommerce My Account area.
 *
 * Same approach as form.css: low specificity, theme-neutral, and only what it
 * takes to keep a table of DNS records readable inside somebody else's theme.
 */

.ssg-account {
	--ssg-border: rgba( 128, 128, 128, 0.35 );
	--ssg-muted: rgba( 128, 128, 128, 1 );
	--ssg-surface: rgba( 128, 128, 128, 0.06 );
	--ssg-mine: rgba( 128, 128, 128, 0.22 );
	--ssg-ok: #1a7f37;
	--ssg-wait: #9a6700;
	--ssg-bad: #b42318;
}

/**
 * The user agent hides [hidden] with a `display: none` of its own, but any
 * author `display` rule outranks it whatever its specificity - and this
 * stylesheet sets one on .ssg-chat-working, as host themes do on their own
 * elements. The chat toggles the working indicator and the error line by the
 * attribute alone, so state it once here rather than pairing each display rule
 * with a hiding class. Same rule, same reason, as form.css.
 */
.ssg-account [hidden] {
	display: none !important;
}

.ssg-account-intro,
.ssg-account-note {
	margin: 0 0 1.5rem;
}

.ssg-account-note {
	color: var( --ssg-muted );
}

.ssg-account-hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.875em;
	color: var( --ssg-muted );
}

.ssg-account-field {
	margin: 0 0 1.25rem;
}

.ssg-account-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.ssg-account-field input[type="text"],
.ssg-account-field select {
	width: 100%;
	max-width: 26rem;
}

/* ---------------------------------------------------------------- Domains */

.ssg-domain {
	margin: 0 0 2rem;
	padding: 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-domain-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.ssg-domain-name {
	margin: 0;
	word-break: break-all;
}

.ssg-domain-status {
	font-size: 0.8125em;
	font-weight: 600;
	line-height: 1.6;
	padding: 0.1em 0.6em;
	border-radius: 999px;
	border: 1px solid currentColor;
	white-space: nowrap;
}

.ssg-status-pending {
	color: var( --ssg-wait );
}

.ssg-status-verified,
.ssg-status-active {
	color: var( --ssg-ok );
}

.ssg-status-failed {
	color: var( --ssg-bad );
}

.ssg-domain-note,
.ssg-domain-live,
.ssg-domain-site {
	margin: 0 0 0.75rem;
}

.ssg-domain-records-heading {
	margin: 1.5rem 0 0.5rem;
}

.ssg-domain-records-intro {
	margin: 0 0 0.75rem;
	color: var( --ssg-muted );
	font-size: 0.9375em;
}

/**
 * The records are the point of the page, and a TXT value is long. The wrapper
 * scrolls rather than the page, so a narrow screen never pushes the layout
 * sideways.
 */
.ssg-domain-records {
	overflow-x: auto;
	background: var( --ssg-surface );
	border-radius: 6px;
}

.ssg-domain-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.9375em;
}

.ssg-domain-table th,
.ssg-domain-table td {
	padding: 0.6rem 0.75rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var( --ssg-border );
}

.ssg-domain-table tr:last-child td {
	border-bottom: 0;
}

.ssg-record-optional {
	opacity: 0.85;
}

/* Click once and the whole value is selected: these are copied, not read. */
.ssg-domain-value {
	display: inline-block;
	max-width: 100%;
	overflow-wrap: anywhere;
	user-select: all;
	font-size: 0.9375em;
}

.ssg-domain-fqdn,
.ssg-domain-record-note,
.ssg-domain-optional {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

.ssg-domain-optional {
	display: inline-block;
	margin: 0 0 0 0.35rem;
	font-style: italic;
}

.ssg-domain-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.ssg-domain-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.ssg-domain-repoint {
	margin: 0 0 1rem;
}

.ssg-domain-form-add {
	display: block;
}

.ssg-domain-checked {
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

/**
 * Remove is destructive and rare, so it reads as a link. The theme's own
 * button styles are still on the element, hence the reset.
 */
.ssg-button-link {
	background: none;
	border: 0;
	padding: 0;
	color: var( --ssg-muted );
	text-decoration: underline;
}

.ssg-domain-add {
	margin-top: 2rem;
}

/* ------------------------------------------------------- Page address */

.ssg-address-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.ssg-address-current {
	margin: 0 0 1.5rem;
	word-break: break-all;
}

/**
 * The host sits in front of the field the way it does in the address bar,
 * so what is being chosen reads as the end of a link. On a phone the host
 * goes above rather than squeezing the field.
 */
.ssg-address-input {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	max-width: 32rem;
}

.ssg-address-prefix {
	color: var( --ssg-muted );
	white-space: nowrap;
}

.ssg-address-input input[type="text"] {
	flex: 1 1 12rem;
	min-width: 0;
}

.ssg-address-status {
	min-height: 1.5em;
	margin: 0.35rem 0 0;
	font-size: 0.875em;
}

.ssg-address-status.is-checking {
	color: var( --ssg-muted );
}

.ssg-address-status.is-ok {
	color: var( --ssg-ok );
}

.ssg-address-status.is-bad {
	color: var( --ssg-bad );
}

.ssg-address-terms {
	margin: 0 0 1rem;
	max-width: 36rem;
}

.ssg-address-old-heading {
	margin: 2rem 0 0.25rem;
}

.ssg-address-old {
	margin: 0.5rem 0 0 1.25rem;
	word-break: break-all;
}

.ssg-account-offer-price {
	font-size: 1.125em;
	font-weight: 600;
}

/* ------------------------------------------------------- Design chat */

/**
 * A chat inside somebody else's theme, so everything here is sized in ems off
 * the theme's own type and coloured from the tokens at the top of this file.
 * No fixed heights: the thread is capped in vh so it never runs off a phone,
 * and the composer grows with what is typed into it.
 */
.ssg-chat {
	display: flex;
	flex-direction: column;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
	overflow: hidden;
}

.ssg-chat-header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var( --ssg-border );
	background: var( --ssg-surface );
}

.ssg-chat-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
}

.ssg-chat-switch label {
	font-weight: 600;
	font-size: 0.875em;
}

.ssg-chat-switch select {
	max-width: 20rem;
}

.ssg-chat-page-name {
	margin: 0;
	font-weight: 600;
}

.ssg-chat-view {
	font-size: 0.875em;
}

.ssg-chat-header-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
}

/* The link to the hints, dressed as the View page link beside it. */
.ssg-chat-tips {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.875em;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* -- The budget meter ------------------------------------------------- */

.ssg-chat-budget {
	padding: 0.6rem 1rem;
	border-bottom: 1px solid var( --ssg-border );
}

.ssg-chat-budget-bar {
	height: 4px;
	border-radius: 2px;
	background: var( --ssg-border );
	overflow: hidden;
}

.ssg-chat-budget-fill {
	display: block;
	height: 100%;
	background: var( --ssg-ok );
	transition: width 0.4s ease;
}

.ssg-chat-budget.is-spent .ssg-chat-budget-fill {
	background: var( --ssg-bad );
}

.ssg-chat-budget-text {
	margin: 0.4rem 0 0;
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

/* -- The thread ------------------------------------------------------- */

.ssg-chat-thread {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	max-height: 60vh;
	min-height: 12rem;
	padding: 1rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ssg-chat-msg {
	display: flex;
	flex-direction: column;
	max-width: 85%;
}

.ssg-chat-msg-you {
	align-self: flex-end;
	align-items: flex-end;
}

.ssg-chat-msg-bot {
	align-self: flex-start;
}

.ssg-chat-bubble {
	padding: 0.6rem 0.85rem;
	border-radius: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/**
 * The two speakers are told apart by side, corner and weight of fill rather
 * than by colour. This sits inside somebody else's theme, which may be light
 * or dark and whose text colour is the only one that can be relied on, so a
 * neutral tint of it is the one fill guaranteed to keep its own text readable.
 */
.ssg-chat-msg-you .ssg-chat-bubble {
	border: 1px solid transparent;
	border-bottom-right-radius: 4px;
	background: var( --ssg-mine );
}

.ssg-chat-msg-bot .ssg-chat-bubble {
	border: 1px solid var( --ssg-border );
	border-bottom-left-radius: 4px;
	background: var( --ssg-surface );
}

/**
 * A request the other party made: support's, in the customer's thread, or
 * the customer's, in support's. Same side as any request, because that is
 * what it is, but hollow rather than filled, so whose it was is visible
 * before the label under it is read.
 */
.ssg-chat-msg-you.is-other .ssg-chat-bubble {
	border-color: var( --ssg-border );
	background: transparent;
}

.ssg-chat-who {
	font-weight: 600;
}

.ssg-chat-msg.is-undone .ssg-chat-bubble {
	opacity: 0.55;
	text-decoration: line-through;
}

.ssg-chat-msg.is-failed .ssg-chat-bubble {
	border-color: var( --ssg-bad );
	color: var( --ssg-bad );
}

.ssg-chat-meta {
	margin: 0.3rem 0.2rem 0;
	font-size: 0.75em;
	color: var( --ssg-muted );
}

.ssg-chat-meta span + span::before {
	content: "·";
	margin: 0 0.35rem;
}

.ssg-chat-undone {
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ssg-chat-greeting .ssg-chat-bubble p {
	margin: 0;
}

/* -- Undo ------------------------------------------------------------- */

.ssg-chat-undo-form {
	margin: 0.35rem 0 0;
}

.ssg-chat-undo {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 0.8125em;
	color: var( --ssg-muted );
	text-decoration: underline;
	cursor: pointer;
}

.ssg-chat-undo:hover,
.ssg-chat-undo:focus-visible {
	color: inherit;
}

.ssg-chat-undo[disabled] {
	cursor: default;
	text-decoration: none;
}

/* -- Working ---------------------------------------------------------- */

.ssg-chat-working {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	padding: 0 1rem 0.9rem;
	font-size: 0.875em;
	color: var( --ssg-muted );
}

.ssg-chat-dots {
	display: inline-flex;
	gap: 3px;
}

.ssg-chat-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	animation: ssg-chat-pulse 1.2s infinite ease-in-out;
}

.ssg-chat-dots span:nth-child( 2 ) {
	animation-delay: 0.15s;
}

.ssg-chat-dots span:nth-child( 3 ) {
	animation-delay: 0.3s;
}

@keyframes ssg-chat-pulse {
	0%, 60%, 100% { opacity: 0.25; }
	30%           { opacity: 1; }
}

/**
 * The dots are the only thing on this page that moves, and their whole job is
 * to say "still going" - which a static row of dots beside a label already
 * says.
 */
@media ( prefers-reduced-motion: reduce ) {
	.ssg-chat-dots span {
		animation: none;
		opacity: 0.5;
	}

	.ssg-chat-budget-fill,
	.ssg-chat-upload-bar span {
		transition: none;
	}
}

.ssg-chat-error {
	margin: 0 1rem 0.9rem;
	color: var( --ssg-bad );
	font-size: 0.875em;
}

/* -- Images the customer sends ---------------------------------------- */

.ssg-chat-uploads {
	padding: 0.75rem 1rem 0;
}

.ssg-chat-upload-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.6rem;
	padding: 0;
	list-style: none;
}

.ssg-chat-upload {
	display: flex;
	gap: 0.45rem;
	align-items: center;
	max-width: 100%;
	padding: 0.2rem 0.7rem 0.2rem 0.2rem;
	border: 1px solid var( --ssg-border );
	border-radius: 999px;
	background: var( --ssg-surface );
	font-size: 0.8125em;
}

.ssg-chat-upload-thumb {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.ssg-chat-upload-name {
	max-width: 12rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ssg-chat-upload-remove-form {
	margin: 0;
	line-height: 0;
}

/**
 * A quiet mark until it is wanted, like the undo in the thread: it sits on
 * every image, and five of them shouting would be five things to look at
 * before the images themselves.
 */
.ssg-chat-upload-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	font: inherit;
	font-size: 1em;
	line-height: 1;
	color: var( --ssg-muted );
	cursor: pointer;
}

.ssg-chat-upload-remove:hover,
.ssg-chat-upload-remove:focus-visible {
	background: var( --ssg-border );
	color: inherit;
}

.ssg-chat-upload-remove[disabled] {
	opacity: 0.5;
	cursor: default;
}

.ssg-chat-upload-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	margin: 0;
}

/**
 * The input is the control and the label beside it is what it looks like, so
 * the file picker can be a button of ours without a click handler in the way.
 * It is moved out of sight rather than hidden outright: display: none would
 * take it out of the tab order, and it is still the thing being focused.
 */
.ssg-chat-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.ssg-chat-attach {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
	margin: 0;
	padding: 0.35rem 0.8rem;
	border: 1px dashed var( --ssg-border );
	border-radius: 999px;
	font-size: 0.8125em;
	color: var( --ssg-muted );
	cursor: pointer;
}

.ssg-chat-attach:hover {
	border-style: solid;
	color: inherit;
}

/* The input carries the focus; the label is the only thing that can show it. */
.ssg-chat-file:focus-visible + .ssg-chat-attach {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	color: inherit;
}

.ssg-chat-attach-mark {
	font-size: 1.1em;
	line-height: 1;
}

.ssg-chat-upload-form.is-uploading .ssg-chat-attach {
	opacity: 0.5;
	cursor: default;
}

.ssg-chat-upload-progress {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
	font-size: 0.75em;
	color: var( --ssg-muted );
}

.ssg-chat-upload-bar {
	display: block;
	width: 6rem;
	height: 4px;
	border-radius: 999px;
	background: var( --ssg-border );
	overflow: hidden;
}

.ssg-chat-upload-bar span {
	display: block;
	width: 0;
	height: 100%;
	background: var( --ssg-ok );
	transition: width 0.2s ease;
}

.ssg-chat-upload-full {
	margin: 0;
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

.ssg-chat-upload-hint {
	margin: 0.5rem 0 0;
	font-size: 0.75em;
	color: var( --ssg-muted );
}

/* -- The composer ----------------------------------------------------- */

.ssg-chat-composer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: flex-end;
	margin: 0;
	padding: 0.75rem 1rem;
	border-top: 1px solid var( --ssg-border );
	background: var( --ssg-surface );
}

.ssg-chat-composer textarea {
	flex: 1 1 auto;
	min-height: 2.6rem;
	max-height: 10rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
	font: inherit;
	line-height: 1.45;
	resize: none;
	background: transparent;
	color: inherit;
}

.ssg-chat-composer textarea:disabled {
	opacity: 0.6;
}

/**
 * Support's choice of whether a change is charged, on a line of its own above
 * the field. Only the admin screen renders it.
 */
.ssg-chat-charge {
	display: flex;
	flex: 1 1 100%;
	gap: 0.4rem;
	align-items: center;
	margin: 0;
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

.ssg-chat-charge input {
	margin: 0;
}

/**
 * The theme's own button styles are on this element; all it needs from here is
 * to stop stretching and to line up with the composer beside it.
 */
.ssg-chat-send {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

.ssg-chat-send[disabled] {
	opacity: 0.5;
	cursor: default;
}

.ssg-chat-hint,
.ssg-chat-scope {
	margin: 0.6rem 0 0;
	font-size: 0.8125em;
	color: var( --ssg-muted );
}

/* The button to the desktop designer, above the chat. */
.ssg-chat-designer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0 0 1.25rem;
}

.ssg-chat-designer .ssg-account-hint {
	margin-top: 0;
}

.ssg-chat-spent {
	padding: 1rem;
	border-top: 1px solid var( --ssg-border );
}

.ssg-chat-spent .ssg-account-note {
	margin-bottom: 1rem;
}

@media ( max-width: 480px ) {
	.ssg-chat-msg {
		max-width: 95%;
	}

	.ssg-chat-thread {
		max-height: 55vh;
	}
}

/* -- The hints -------------------------------------------------------- */

/**
 * A dialog over the whole page, so it is fixed and sits above whatever the
 * theme puts at the top. The panel is white with its own ink whatever the
 * theme's colours, because a theme's white-on-dark would make it unreadable
 * on a white panel, and inherits the theme's type. Nothing until design.js
 * opens it; there is no no-script version of a tour.
 */
.ssg-hints {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.ssg-hints.is-open {
	display: flex;
}

.ssg-hints-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
}

.ssg-hints-panel {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 40rem;
	max-height: calc( 100vh - 2rem );
	overflow-y: auto;
	padding: 1.75rem 2rem 1.5rem;
	border-radius: 12px;
	background: #fff;
	color: #1f1f1f;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
}

.ssg-hints-panel:focus {
	outline: none;
}

.ssg-hints-x {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --ssg-surface );
	color: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.ssg-hints-x:hover,
.ssg-hints-x:focus-visible {
	background: var( --ssg-mine );
}

.ssg-hints-title {
	margin: 0 2.5rem 0.5rem 0;
	font-size: 1.5em;
	line-height: 1.2;
}

.ssg-hints-intro,
.ssg-hints-examples-hint {
	margin: 0 0 1.25rem;
	color: var( --ssg-muted );
}

.ssg-hints-list {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	counter-reset: ssg-hint;
}

.ssg-hints-item {
	position: relative;
	margin: 0 0 1.25rem;
	padding-left: 2.75rem;
	counter-increment: ssg-hint;
}

.ssg-hints-item::before {
	content: counter( ssg-hint );
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var( --ssg-mine );
	font-weight: 700;
	font-size: 0.9375em;
}

.ssg-hints-item-title {
	margin: 0 0 0.35rem;
	font-size: 1.0625em;
	line-height: 2rem;
}

.ssg-hints-item p {
	margin: 0 0 0.5rem;
	font-size: 0.9375em;
	line-height: 1.55;
}

.ssg-hints-examples {
	padding: 1rem 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
	background: var( --ssg-surface );
}

.ssg-hints-examples .ssg-hints-item-title {
	line-height: 1.3;
}

.ssg-hints-examples-hint {
	margin-bottom: 0.75rem;
	font-size: 0.875em;
}

.ssg-hints-example-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Each example is a quiet bubble, like a turn in the thread it will become. */
.ssg-hints-example {
	display: block;
	width: 100%;
	padding: 0.6rem 0.9rem;
	border: 1px solid var( --ssg-border );
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.875em;
	line-height: 1.45;
	text-align: left;
	cursor: pointer;
}

.ssg-hints-example:hover,
.ssg-hints-example:focus-visible {
	border-color: var( --ssg-muted );
	background: var( --ssg-surface );
}

.ssg-hints-actions {
	margin: 1.5rem 0 0;
	text-align: right;
}

/* No page scrolling underneath the dialog while it is open. */
body.ssg-hints-open {
	overflow: hidden;
}

@media ( max-width: 480px ) {
	.ssg-hints {
		padding: 0.5rem;
	}

	.ssg-hints-panel {
		max-height: calc( 100vh - 1rem );
		padding: 1.5rem 1.25rem 1.25rem;
	}

	.ssg-hints-item {
		padding-left: 2.5rem;
	}
}

/* ---------------------------------------------------- Stripe catalog */

/**
 * Three numbered steps, each a card like a domain's. The status pill on the
 * first is the gateway's own (wsg-connect-status), styled by its stylesheet
 * which is loaded on every account page.
 */
.ssg-catalog-step {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-catalog-step.is-waiting {
	opacity: 0.7;
}

.ssg-catalog-step-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.ssg-catalog-step-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
}

.ssg-catalog-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: var( --ssg-mine );
	font-size: 0.75em;
	font-weight: 700;
}

.ssg-catalog-notice {
	margin-bottom: 1.5rem;
}

.ssg-catalog-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
}

.ssg-catalog-error {
	color: var( --ssg-bad );
}

.ssg-catalog-products {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.ssg-catalog-product {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	background: var( --ssg-surface );
	border-radius: 4px;
}

.ssg-catalog-product-image {
	width: 2.5rem;
	height: 2.5rem;
	object-fit: cover;
	border-radius: 4px;
	flex: none;
}

.ssg-catalog-product-name {
	flex: 1;
	font-weight: 600;
}

.ssg-catalog-product-price {
	color: var( --ssg-muted );
	white-space: nowrap;
}

.ssg-catalog-refresh {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75rem;
	margin: 0;
}

.ssg-catalog-refresh .ssg-account-hint {
	display: inline;
	margin: 0;
}

.ssg-catalog-site-list {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.ssg-catalog-site {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.25rem 1rem;
	align-items: center;
	padding: 0.75rem 0;
	border-top: 1px solid var( --ssg-border );
}

.ssg-catalog-site:first-child {
	border-top: 0;
	padding-top: 0;
}

.ssg-catalog-site-toggle {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
	cursor: pointer;
}

.ssg-catalog-site-toggle input {
	margin: 0;
}

.ssg-catalog-site-heading {
	grid-column: 1 / -1;
	margin: 0;
}

.ssg-catalog-site-heading label {
	font-weight: 400;
	font-size: 0.875em;
	color: var( --ssg-muted );
}

.ssg-catalog-sites .ssg-account-hint {
	display: inline;
	margin-left: 0.75rem;
}

.ssg-catalog-due {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
	font-size: 0.9375em;
}

/* ---------------------------------------------------------- Newsletter */

/**
 * A meter, an offer, a row of downloads and a table. The table scrolls inside
 * its own wrapper, as the DNS records do, so a long address never pushes a
 * phone's layout sideways.
 */
.ssg-newsletter-switch,
.ssg-newsletter-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.5rem;
}

.ssg-newsletter-switch label {
	font-weight: 600;
}

.ssg-newsletter-search input[type="search"] {
	flex: 1 1 14rem;
	max-width: 22rem;
}

.ssg-newsletter-usage {
	margin: 0 0 1.5rem;
}

.ssg-newsletter-usage-text {
	margin: 0 0 0.5rem;
}

.ssg-newsletter-usage-text .ssg-account-hint {
	display: inline;
	margin-left: 0.5rem;
}

.ssg-newsletter-meter {
	height: 8px;
	border-radius: 4px;
	background: var( --ssg-border );
	overflow: hidden;
}

.ssg-newsletter-meter-fill {
	display: block;
	height: 100%;
	background: var( --ssg-ok );
}

.ssg-newsletter-usage.is-near .ssg-newsletter-meter-fill {
	background: var( --ssg-wait );
}

.ssg-newsletter-usage.is-full .ssg-newsletter-meter-fill {
	background: var( --ssg-bad );
}

.ssg-newsletter-usage-warning {
	margin: 0.5rem 0 0;
	font-size: 0.9375em;
	color: var( --ssg-wait );
}

.ssg-newsletter-usage.is-full .ssg-newsletter-usage-warning {
	color: var( --ssg-bad );
}

.ssg-newsletter-upgrade {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-newsletter-upgrade.is-urgent {
	border-color: currentColor;
	background: var( --ssg-surface );
}

.ssg-newsletter-upgrade-copy {
	flex: 1 1 18rem;
}

.ssg-newsletter-upgrade-copy p {
	margin: 0;
}

.ssg-newsletter-upgrade-title {
	margin: 0 0 0.35rem;
}

.ssg-newsletter-upgrade-buy {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.ssg-newsletter-heading {
	margin: 2rem 0 0.75rem;
}

.ssg-newsletter-exports {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 15rem, 1fr ) );
	gap: 1rem;
}

.ssg-newsletter-export form {
	margin: 0;
}

.ssg-newsletter-export .button {
	width: 100%;
}

.ssg-newsletter-table-wrap {
	overflow-x: auto;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-newsletter-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.9375em;
}

.ssg-newsletter-table th,
.ssg-newsletter-table td {
	padding: 0.55rem 0.75rem;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var( --ssg-border );
}

.ssg-newsletter-table thead th {
	background: var( --ssg-surface );
	font-size: 0.875em;
	white-space: nowrap;
}

.ssg-newsletter-table tr:last-child td {
	border-bottom: 0;
}

.ssg-newsletter-col-check {
	width: 2.25rem;
}

.ssg-newsletter-col-check input {
	margin: 0;
}

.ssg-newsletter-email {
	overflow-wrap: anywhere;
}

.ssg-newsletter-list-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0.75rem 0 0;
}

.ssg-newsletter-pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	font-size: 0.9375em;
}

.ssg-newsletter-add {
	margin: 2rem 0 0;
}

.ssg-newsletter-add summary {
	font-weight: 600;
	cursor: pointer;
}

.ssg-newsletter-add-form {
	margin-top: 1rem;
}

.ssg-newsletter-add-form input[type="email"] {
	width: 100%;
	max-width: 26rem;
}

/* ------------------------------------------------------------------ */
/* Analytics                                                           */
/* ------------------------------------------------------------------ */

/**
 * One series in one hue. The bars and the ranked lists are the only data
 * ink on the page; every number beside them stays in the text colour.
 */
.ssg-account-analytics {
	--ssg-series: #2a78d6;
}

.ssg-analytics-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin: 0 0 1.5rem;
}

.ssg-analytics-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.ssg-analytics-switch label {
	font-weight: 600;
}

.ssg-analytics-ranges {
	display: inline-flex;
	flex-wrap: wrap;
	padding: 3px;
	border: 1px solid var( --ssg-border );
	border-radius: 999px;
}

.ssg-analytics-range {
	padding: 0.3rem 0.85rem;
	border-radius: 999px;
	font-size: 0.9375em;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
}

.ssg-analytics-range:hover {
	background: var( --ssg-surface );
}

.ssg-analytics-range.is-current {
	background: var( --ssg-mine );
	font-weight: 600;
}

.ssg-analytics-start {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
	background: var( --ssg-surface );
}

.ssg-analytics-start-copy {
	flex: 1 1 18rem;
}

.ssg-analytics-start-copy p {
	margin: 0;
}

.ssg-analytics-start form {
	margin: 0;
}

/* The stat tiles. */
.ssg-analytics-tiles {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 11rem, 1fr ) );
	gap: 1rem;
	margin: 0 0 1.5rem;
}

.ssg-analytics-tile {
	padding: 1rem 1.1rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-analytics-tile p {
	margin: 0;
}

.ssg-analytics-tile-label {
	font-size: 0.875em;
	font-weight: 600;
	color: var( --ssg-muted );
}

.ssg-analytics-tile-value {
	margin: 0.2rem 0 0.35rem !important;
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.1;
}

.ssg-analytics-tile-delta {
	font-size: 0.875em;
	color: var( --ssg-muted );
}

.ssg-analytics-tile-delta.is-up {
	color: var( --ssg-ok );
}

.ssg-analytics-tile-delta.is-down {
	color: var( --ssg-bad );
}

.ssg-analytics-tile .ssg-account-hint {
	margin-top: 0.5rem;
}

/* Cards: the chart and each ranked list. */
.ssg-analytics-card {
	margin: 0 0 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
	min-width: 0;
}

.ssg-analytics-card-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

/* The chart: columns grown from one baseline, hairline gridlines behind. */
.ssg-analytics-chart {
	position: relative;
	height: 200px;
	margin: 0 0 0.35rem;
	padding-left: 2.75rem;
}

.ssg-analytics-chart-grid {
	position: absolute;
	inset: 0 0 0 2.75rem;
	pointer-events: none;
}

.ssg-analytics-chart-gridline {
	position: absolute;
	left: 0;
	right: 0;
	height: 0;
	border-top: 1px solid var( --ssg-border );
}

.ssg-analytics-chart-tick {
	position: absolute;
	right: calc( 100% + 0.5rem );
	top: -0.6em;
	font-size: 0.75rem;
	line-height: 1.2;
	color: var( --ssg-muted );
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ssg-analytics-chart-plot {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 2px;
	height: 100%;
}

/* The whole slot is the hit target, not just the painted bar. */
.ssg-analytics-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	cursor: default;
	border-radius: 4px 4px 0 0;
}

.ssg-analytics-col:hover,
.ssg-analytics-col:focus-visible {
	background: var( --ssg-surface );
}

.ssg-analytics-col:focus-visible {
	outline: 2px solid var( --ssg-series );
	outline-offset: 1px;
}

.ssg-analytics-bar {
	display: block;
	width: 100%;
	max-width: 24px;
	min-height: 2px;
	border-radius: 4px 4px 0 0;
	background: var( --ssg-series );
}

.ssg-analytics-col:hover .ssg-analytics-bar,
.ssg-analytics-col:focus-visible .ssg-analytics-bar {
	filter: brightness( 1.15 );
}

.ssg-analytics-chart-axis {
	display: flex;
	justify-content: space-between;
	margin: 0 0 0.75rem 2.75rem;
	font-size: 0.75rem;
	color: var( --ssg-muted );
}

.ssg-analytics-tooltip {
	position: absolute;
	z-index: 2;
	top: 0;
	left: 0;
	display: grid;
	gap: 0.1rem;
	padding: 0.45rem 0.6rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
	background: #ffffff;
	color: #1a1a19;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.12 );
	font-size: 0.8125rem;
	line-height: 1.35;
	white-space: nowrap;
	pointer-events: none;
	transform: translate( -50%, calc( -100% - 8px ) );
}

.ssg-analytics-tooltip-value {
	font-size: 0.9375rem;
}

.ssg-analytics-tooltip-label,
.ssg-analytics-tooltip-extra {
	color: #5f5f5b;
}

.ssg-analytics-table {
	margin-top: 0.5rem;
}

.ssg-analytics-table summary {
	font-size: 0.9375em;
	cursor: pointer;
}

.ssg-analytics-table .ssg-newsletter-table-wrap {
	max-height: 20rem;
	margin-top: 0.75rem;
	overflow: auto;
}

.ssg-analytics-num {
	text-align: right !important;
	font-variant-numeric: tabular-nums;
}

/* The ranked lists. */
.ssg-analytics-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 16rem, 1fr ) );
	gap: 0 1rem;
}

.ssg-analytics-ranked {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ssg-analytics-ranked-row {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto;
	align-items: baseline;
	gap: 0.2rem 0.75rem;
	margin: 0 0 0.6rem;
	font-size: 0.9375em;
}

.ssg-analytics-ranked-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ssg-analytics-ranked-value {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}

.ssg-analytics-ranked-track {
	grid-column: 1 / -1;
	display: block;
	height: 6px;
}

.ssg-analytics-ranked-fill {
	display: block;
	height: 100%;
	border-radius: 0 4px 4px 0;
	background: var( --ssg-series );
}

.ssg-analytics-footnote {
	margin-top: 1rem;
}

@media ( max-width: 480px ) {
	.ssg-analytics-chart {
		height: 160px;
	}

	.ssg-analytics-tile-value {
		font-size: 1.75rem;
	}
}

/* Bandwidth this month: the newsletter's meter and upgrade card, in a card. */
.ssg-analytics-bandwidth.ssg-newsletter-usage {
	margin: 0 0 1.5rem;
}

.ssg-analytics-bandwidth.is-full {
	border-color: var( --ssg-bad );
}

.ssg-analytics-bandwidth .ssg-account-hint {
	margin: 0.5rem 0 0;
}

.ssg-analytics-bandwidth-alert {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	border-left: 3px solid var( --ssg-bad );
	background: var( --ssg-surface );
}

.ssg-analytics-bandwidth .ssg-newsletter-upgrade {
	margin: 1rem 0 0;
}

/* ---------------------------------------------------------- Collaborators */

/* The "Working on" switcher above each service page, for someone who helps
   run a page somebody else owns. Tinted while it is somebody else's, so the
   page below is never mistaken for their own. */
.ssg-collab-context {
	margin: 0 0 1.5rem;
	padding: 0.75rem 0.9rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-collab-context.is-shared {
	border-left: 3px solid var( --ssg-wait );
	background: var( --ssg-surface );
}

.ssg-collab-context-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.ssg-collab-context-form label {
	font-weight: 600;
}

.ssg-collab-context-form select {
	flex: 1 1 14rem;
	max-width: 26rem;
}

.ssg-collab-context .ssg-account-hint {
	margin: 0.5rem 0 0;
}

.ssg-collab-invite {
	margin: 0 0 2rem;
	padding: 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-collab-invite-title {
	margin: 0 0 0.5rem;
}

.ssg-collab-invite > :last-child {
	margin-bottom: 0;
}

.ssg-collab-actions,
.ssg-collab-row-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.ssg-collab-actions form,
.ssg-collab-inline {
	margin: 0;
}

.ssg-collab-section {
	margin: 0 0 2rem;
}

.ssg-collab-table {
	margin: 0 0 1rem;
}

.ssg-collab-table .ssg-domain-status {
	margin-left: 0.35rem;
}

.ssg-collab-alert {
	padding: 0.75rem 0.9rem;
	border-left: 3px solid var( --ssg-bad );
	background: var( --ssg-surface );
}

.ssg-collab-form input[type="email"],
.ssg-collab-join input[type="email"],
.ssg-collab-join input[type="password"],
.ssg-collab-join input[type="text"] {
	width: 100%;
	max-width: 26rem;
}

.ssg-collab-join {
	margin: 1.25rem 0 0;
}

.ssg-collab-guest {
	max-width: 32rem;
	margin: 0 auto 1.5rem;
}

.ssg-collab-guest-or {
	margin: 1rem 0 0;
}

@media ( max-width: 600px ) {
	.ssg-collab-table thead {
		display: none;
	}

	.ssg-collab-table tr {
		display: block;
		padding: 0.5rem 0;
		border-bottom: 1px solid var( --ssg-border );
	}

	.ssg-collab-table td {
		display: block;
		padding: 0.25rem 0;
		border: 0;
	}
}

/* -------------------------------------------------------------- Live chat */

/*
 * The console is the Live Chat plugin's, laid out by its admin.css; this only
 * fits it into an account page, and styles the settings around it.
 */

.ssg-chat-console {
	margin: 0 0 2rem;
}

.ssg-chat-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.ssg-chat-console .lc-connection {
	margin-left: 0;
}

.ssg-chat-console .lc-connection:empty {
	display: none;
}

.ssg-chat-scope {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875em;
}

.ssg-chat-scope select {
	max-width: 18rem;
}

.ssg-chat-console .lc-console {
	height: 70vh;
	min-height: 480px;
	margin-top: 0;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-chat-console .lc-sidebar {
	border-right-color: var( --ssg-border );
}

.ssg-chat-console .lc-reply textarea {
	box-sizing: border-box;
	font: inherit;
}

.ssg-chat-console .lc-thread-actions .button {
	font-size: 0.8125em;
}

.ssg-chat-error {
	margin: 0 16px 12px;
	color: var( --ssg-bad );
}

.ssg-chat-section {
	margin: 0 0 2rem;
}

.ssg-chat-section h3 {
	margin: 0 0 0.75rem;
}

.ssg-chat-form textarea,
.ssg-chat-form input[type="text"],
.ssg-chat-form input[type="tel"] {
	box-sizing: border-box;
	width: 100%;
	max-width: 36rem;
}

.ssg-chat-check {
	display: flex !important;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400 !important;
}

.ssg-chat-inline {
	margin-top: 0.75rem;
}

.ssg-chat-site {
	margin: 0 0 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid var( --ssg-border );
	border-radius: 6px;
}

.ssg-chat-site summary {
	cursor: pointer;
}

.ssg-chat-site[open] summary {
	margin-bottom: 1rem;
}

.ssg-chat-offers {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ssg-chat-offer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	padding: 0.85rem 0;
	border-top: 1px solid var( --ssg-border );
}

.ssg-chat-offer-page {
	flex: 1 1 14rem;
	font-weight: 600;
}

/*
 * The console's filters and list rows are bare <button>s, which a theme is
 * free to style as big call-to-action buttons. Put back the console's own
 * look, one class deeper than the theme's rule and the console's.
 */
.ssg-chat-console .lc-list,
.ssg-chat-console .lc-list > li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ssg-chat-console button.lc-filter,
.ssg-chat-console button.lc-row-btn {
	font-family: inherit;
	font-weight: 400;
	line-height: 1.4;
	color: #2c3338;
	box-shadow: none;
	transform: none;
	transition: none;
}

.ssg-chat-console button.lc-filter {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	padding: 3px 10px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: none;
	font-size: 12px;
}

.ssg-chat-console button.lc-row-btn {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	gap: 3px;
	width: 100%;
	padding: 10px 14px;
	border: 0;
	border-left: 3px solid transparent;
	border-radius: 0;
	background: none;
	font-size: 14px;
	text-align: left;
}

.ssg-chat-console button.lc-filter:hover,
.ssg-chat-console button.lc-row-btn:hover {
	background: #f6f7f7;
	color: #2c3338;
	box-shadow: none;
	transform: none;
}

.ssg-chat-console button.lc-filter.is-active {
	border-color: #2271b1;
	background: #f0f6fc;
	color: #2271b1;
}

.ssg-chat-console .lc-row.is-current button.lc-row-btn {
	border-left-color: #2271b1;
	background: #f0f6fc;
}

.ssg-chat-console .lc-row--waiting button.lc-row-btn {
	border-left-color: #dba617;
}

.ssg-chat-console .lc-row.is-urgent button.lc-row-btn {
	border-left-color: #d63638;
}

.ssg-chat-console .lc-row-name {
	font-weight: 600;
	text-align: left;
}

@media ( max-width: 900px ) {
	.ssg-chat-console .lc-console {
		height: auto;
	}
}
