:root {
	/* Palette. Use these tokens instead of literal colours. */
	--bg: #202020;
	--surface: #2d2d2d;
	--surface-2: #363636;
	--sunken: #1a1a1a;
	--border-soft: #414141;
	--border: #444;
	--border-strong: #555;
	--text: rgb(204, 204, 204);
	--text-strong: #f0f0f0;
	--text-muted: #aaa;
	--text-faint: #888;
	--accent: #613583;
	--accent-hover: #7b4aa3;
	--accent-bright: #9a6cc4;
	--accent-soft: rgba(123, 74, 163, 0.18);
	--ok: #8ec07c;
	--ok-soft: rgba(142, 192, 124, 0.14);
	--warn: #e8910c;
	--warn-soft: rgba(232, 145, 12, 0.14);
	--danger: #cc2f2e;
	--danger-text: #e88080;
	--danger-bg: #8b2e2e;
	--danger-soft: rgba(224, 102, 102, 0.14);
	--info: #7fb3d5;
	--info-soft: rgba(127, 179, 213, 0.14);
	--radius: 8px;
	--radius-sm: 5px;
	--gap: 1.25rem;
	--mono: "Overpass Mono", ui-monospace, Consolas, monospace;
	--focus-ring: 0 0 0 3px rgba(154, 108, 196, 0.6);
}

html,
body {
   height: 100%;
}

body {
   font-family: overpass !important;
   color: var(--text);
   background-color: var(--bg);
   margin: 0;
   display: flex;
   flex-direction: column;
   min-height: 100vh;
}

a:link,
a:visited {
	color: rgb(205, 205, 205);
	text-underline-offset: 3px;
}

a:hover {
	color: #fff;
	text-decoration-color: var(--accent-bright);
}

a:active {
	color: rgb(205, 205, 205);
}

:focus-visible {
	outline: 2px solid var(--accent-bright);
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
	z-index: 10;
	padding: 0.5rem 1rem;
	background: var(--accent);
	color: #fff;
}

/* —— Site header (#46) —— */

.site-header {
	background-color: var(--surface);
	border-bottom: 1px solid black;
	box-shadow: rgb(40, 40, 40) 0px 1px 0px 0px;
}

.site-header-inner {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
}

.brand:link,
.brand:visited {
	font-size: 1.4rem;
	font-weight: 600;
	color: var(--text-strong);
	text-decoration: none;
}

.brand span {
	color: var(--text-muted);
	font-weight: 300;
}

.site-nav,
.site-account {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
}

.site-nav {
	flex: 1;
}

.site-nav a,
.site-account a:not(.btn) {
	padding: 0.4rem 0.7rem;
	border-radius: var(--radius-sm);
	text-decoration: none;
}

.site-nav a:hover,
.site-account a:not(.btn):hover {
	background: var(--surface-2);
}

.site-nav a[aria-current="page"],
.site-account a[aria-current="page"] {
	color: var(--text-strong);
	background: var(--accent-soft);
	box-shadow: inset 0 -2px 0 var(--accent-bright);
}

@media (max-width: 640px) {
	.site-nav {
		order: 3;
		flex-basis: 100%;
		margin: 0 -0.7rem;
	}

	.site-account {
		margin-left: auto;
	}
}

.main {
	box-sizing: border-box;
	width: 100%;
	max-width: 64rem;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Wider frame for dashboards and detail pages. */
.main.main-wide {
	max-width: 72rem;
}

.page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 1.25rem;
}

.page-head h2 {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 300;
	color: var(--text-strong);
}

.page-head p {
	margin: 0.25rem 0 0;
	color: var(--text-muted);
}

.common {
	border-top-color: var(--border-soft);
	border-top-style: dotted;
}
.privacy {
	border-top-color: var(--border-soft);
	border-top-style: dotted;
}

.crypto {
	font-size: 4em;
	color: #ff0000;
}

.hero{
	font-size: clamp(1.9rem, 5vw, 3em);
	font-weight: 200;
	text-align:center;
}

/* intro_content sits under the centred hero */
.main.welcome > p {
	text-align: center;
	color: var(--text-muted);
	margin-top: -0.75rem;
}

.hero a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	word-break: break-all;
}

.hero a:hover,
.hero a:focus {
	color: var(--ok);
	border-bottom-color: var(--ok);
}

.no-to-hate {
	font-size: 3em;
	font-weight: 200;
	text-align:center;
}


aside {
    width: 40%;
    padding-left: 0.5rem;
    margin-left: 0.5rem;
    float: right;
    box-shadow: inset 5px 0 5px -5px #29627e;
    font-style: italic;
    color: #29627e;
}

aside > p {
    margin: 0.5rem;
}

.whatis-diagram {
    margin: 1.25em 0;
    padding: 1em 1.25em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.8em;
    line-height: 1.35;
    color: #ccc;
}

.whatis-hops {
    margin: 1.25em 0;
    padding: 1em 1.25em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow-x: auto;
    color: #ccc;
}

.whatis-hops-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    min-width: max-content;
    padding: 0.35em 0;
}

.whatis-hop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45em 0.7em;
    border: 1px solid #5a5a5a;
    border-radius: 4px;
    background-color: #3a3a3a;
    font-size: 0.8em;
    font-family: "Overpass Mono", "Consolas", monospace;
    white-space: nowrap;
    color: #ddd;
}

.whatis-hop-endpoint {
    border-color: #6a8fa3;
    background-color: #2f4450;
    color: #e8f0f4;
}

.whatis-hop-rp {
    border-color: #8a7a4a;
    background-color: #3f3828;
    color: #f0e8d0;
    font-weight: 600;
}

.whatis-hop-bastion {
    border-color: #6a8fa3;
    background-color: #2f4450;
    color: #e8f0f4;
    font-weight: 600;
}

.whatis-hop-guest {
    border-color: #5a7a5a;
    background-color: #2e3a2e;
    color: #dce8dc;
    font-weight: 600;
}

.whatis-hop-link {
    display: inline-block;
    width: 1.6em;
    height: 2px;
    margin: 0 0.15em;
    background-color: #777;
    flex-shrink: 0;
}

.whatis-hop-link-direct {
    width: 2.4em;
    background-color: #a07050;
    height: 3px;
}

.whatis-hop-link-lan {
    width: 2.8em;
    background-color: #6a9a6a;
    height: 3px;
}

.whatis-hops-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em 1.5em;
    margin-top: 0.85em;
    font-size: 0.8em;
    color: var(--text-muted);
}

.whatis-hops-zones {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    min-width: max-content;
}

.whatis-hops-zone {
    display: flex;
    flex-direction: column;
    padding: 0.65em 0.85em;
    border: 1px dashed var(--border-strong);
    border-radius: 4px;
    background-color: #262626;
}

.whatis-hops-zone-public {
    border-color: #5a7a8a;
    border-right-style: solid;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.whatis-hops-zone-lan {
    border-color: #5a7a5a;
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.whatis-hops-zone-label {
    display: block;
    margin-bottom: 0.55em;
    font-size: 0.72em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #999;
}

.whatis-hops-zone .whatis-hops-row {
    flex: 1;
}

.whatis-hops figcaption {
    margin-top: 0.85em;
    font-size: 0.85em;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.4;
}

.order-routing-info {
    margin: 0.5em 0 0.25em 0;
    padding: 0.85em 1em;
    background-color: #2a2a2a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}

.order-routing-info p {
    margin: 0 0 0.65em 0;
}

.order-routing-info p:last-child {
    margin-bottom: 0;
}

/* Signup: used for both register and login forms, and account forms */
.signup {
  margin: 1.5em auto;
  display: flex;
  width: min(100%, 28em);
  flex-direction: column;
  gap: 0.25em;
}

.signup label {
  display: block;
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.35em;
}

.signup label:first-of-type {
  margin-top: 0;
}

.signup input,
.signup textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5em;
  padding: 0.5em 0.6em;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: #e0e0e0;
}

.signup input:focus,
.signup textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.signup input[type=text]:read-only,
.signup input[type=password]:read-only {
  user-select: none;
  border: 1px solid var(--border);
  box-shadow: none;
  background-color: #252525;
  color: var(--text-faint);
}

.signup .totp-qr {
  display: block;
  margin-top: 0.75em;
  margin-bottom: 1em;
  filter: invert(1);
}

.signup .totp-secret-intro {
  margin: 1em 0 0.4em 0;
  font-weight: 300;
  font-size: 0.95em;
}

.signup .totp-secret {
  display: block;
  font-family: monospace;
  font-size: 0.95em;
  padding: 0.6em 0.75em;
  margin-top: 0.25em;
  margin-bottom: 1em;
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: #e0e0e0;
  user-select: all;
  word-break: break-all;
}

.signup form > p {
  margin: 0.5em 0 0 0;
  font-weight: 300;
  font-size: 0.95em;
}

.change-password-form {
  margin-top: 0.5em;
}

.change-password-group {
  margin-top: 0.5em;
}

.change-password-subheading {
  margin: 0.25em 0 0.5em 0;
  font-size: 0.95em;
  font-weight: 300;
  color: #aaaaaa;
}

.change-password-separator {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid #444444;
}

input.danger {
  color: var(--danger);
}

input[type=submit] {
  align-self: start;
  min-width: 10em;
}

.submit-style {
	background-color: #6e6e6e;
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 16px;
	/*font-family: sans-serif;*/
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.submit-style:hover {
	background-color: var(--accent);
}

.submit-style:active {
	background-color: #512c6d;
	transform: scale(0.97);
}

.submit-style.submit-danger {
	background-color: #8b2e2e;
}

.submit-style.submit-danger:hover {
	background-color: #a83a3a;
}

.submit-style.submit-danger:active {
	background-color: #6f2424;
}

a.submit-style {
	text-decoration: none;
	display: inline-block;
	margin: 0 0.5em;
}

.center-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.signup .center-wrapper {
	margin-top: 1.25em;
}

.signup-uuid-callout {
    margin: 1.25em 0;
    padding: 1em 1.25em;
    background-color: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--accent);
}

.signup-uuid-display {
    display: block;
    font-family: monospace;
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.03em;
    word-break: break-all;
}

.flash {
	margin: 1em auto;
	padding: 0.85em 1.15em;
	max-width: 28em;
	border-radius: 4px;
	border: 1px solid transparent;
	text-align: center;
}
.flash-ok {
	background: rgba(34, 197, 94, 0.2);
	border-color: rgba(34, 197, 94, 0.55);
	color: #bbf7d0;
}
.flash-error {
	background: #b04c48;
	border-color: #8f3a37;
	color: #f5e6e5;
}

.order-form {
	padding-bottom: 1.5em;
	margin-bottom: 1.5em;
}

.order-form fieldset {
	border: 1px solid var(--border);
	padding: 1em;
	margin-bottom: 1.5em;
	border-radius: 4px;
}

.order-form legend {
	font-weight: bold;
	padding: 0 0.5em;
}

.order-form label {
	display: block;
	margin: 0.75em 0;
	cursor: pointer;
}

.order-summary {
	margin: 1em 0;
	padding: 0.5em 0;
	border-bottom: 1px solid var(--border);
}

.order-summary dt {
	font-weight: bold;
	margin-top: 0.5em;
	color: var(--text-muted);
}

.order-summary dd {
	margin-left: 1.5em;
}

.warning-red {
	color: var(--danger);
	display: block;
	font-size: 0.85em;
	margin-left: 1.6em;
	margin-top: 0.2em;
}

.warning-red-light {
	color: var(--danger);
	font-weight: lighter;
	display: block;
	font-size: 0.85em;
	margin-left: 1.6em;
	margin-top: 0.2em;
}

.warning-orange {
	color: var(--warn);
	display: block;
	font-size: 0.85em;
	margin-left: 1.6em;
	margin-top: 0.2em;
}

.cost {
	color: var(--ok);
	font-weight: bold;
	display: block;
	margin-left: 1.6em;
}

.order-total {
	font-size: 1.4em;
	font-weight: bold;
	margin: 1em 0;
}

.disabled-option {
	color: #666;
	cursor: not-allowed;
}

.site-footer {
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--text-muted);
    background-color: rgb(42, 42, 42);
    border-top: 1px solid var(--border-soft);
    margin-top: auto;
    width: 100%;
}

.site-footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1.5rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.site-footer p {
    margin: 0;
}

/* Onboarding: light/thin explanatory text */
.onboarding-copy .onboarding-text {
    font-weight: 300;
    margin: 1em 0;
}

.onboarding-copy textarea {
    min-height: 8em;
}

/* Dashboard: four control-panel sections */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 90%;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dashboard-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25em;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.dashboard-wallet p,
.dashboard-vms p,
.dashboard-web p,
.dashboard-scribe p {
    margin: 0.5em 0;
}

.dashboard-scribe-host {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.dashboard-actions .submit-style {
    margin: 0.25em;
}

.dashboard-cta {
    font-size: 1.1em;
    padding: 14px 28px;
}

a.dashboard-cta.submit-style {
    display: block;
    width: fit-content;
    margin: 0.5em auto 0;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.dashboard-table th {
    font-weight: 500;
    color: var(--text-muted);
}

.dashboard-dl {
    margin: 0.5em 0;
}

.dashboard-dl dt {
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.5em;
}

.dashboard-dl dd {
    margin-left: 1em;
}

.dashboard-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-checkbox {
    display: inline-flex;
    align-items: center;
    font-weight: 300;
}

.dashboard-checkbox::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 1px solid #666;
    border-radius: 3px;
    margin-right: 0.5em;
    background-color: #3d3d3d;
}

.dashboard-checkbox-enabled::before {
    background-color: var(--accent);
    border-color: #8a5cb8;
}

/* Top-up: method choice grid */
.topup-method-form {
    margin: 1em 0;
}

.topup {
    max-width: 44rem;
    margin-bottom: 2rem;
}

.topup-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 0.75rem;
    border: 0;
    padding: 0;
    margin: 0;
}

.topup-methods legend,
.wallet-preset-grid legend {
    font-weight: 500;
    color: var(--text-strong);
    padding: 0;
    margin-bottom: 0.6rem;
}

.topup-method {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.1rem 0.85rem;
    align-items: center;
    width: 100%;
    padding: 1rem 1.1rem;
    font: inherit;
    text-align: left;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
}

.topup-method:hover:not([disabled]) {
    border-color: var(--accent-bright);
    background: var(--surface-2);
}

.topup-method[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.topup-method-recommended {
    border-color: var(--accent-hover);
}

.topup-method-icon {
    grid-row: span 2;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-strong);
    font-weight: 700;
}

.topup-method-name {
    color: var(--text-strong);
    font-weight: 500;
}

.topup-method-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wallet {
    margin-bottom: 2rem;
}

.wallet-balance-figure {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}

.input-affix {
    display: flex;
    max-width: 14em;
}

.input-affix-label {
    display: grid;
    place-items: center;
    padding: 0 0.9rem;
    font-size: 1.4em;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 2px solid var(--border-strong);
    border-right: 0;
    border-radius: 6px 0 0 6px;
}

.input-affix .wallet-custom-amount {
    border-radius: 0 6px 6px 0;
}

/* Manage / Scribe */
.manage-cards {
    margin-top: 1rem;
}

.scribe-index-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14em, 1fr));
    gap: 1rem;
}

.scribe-card-link {
    text-decoration: none;
    color: inherit;
}

.scribe-index-card,
.scribe-post-card {
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    transition: border-color 0.15s ease;
}

.scribe-card-link:hover .scribe-index-card,
.scribe-card-link:hover .scribe-post-card {
    border-color: #666;
}

.scribe-index-card-disabled {
    opacity: 0.6;
}

.scribe-index-card h2,
.scribe-post-title {
    font-size: 1.1em;
    margin: 0 0 0.5em 0;
    font-weight: 500;
}

.scribe-index-card p,
.scribe-post-description {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

.manage-form .order-form label,
.manage-form label {
    display: block;
    margin: 0.75em 0 0.25em 0;
    cursor: pointer;
}

.manage-form input[type="text"],
.manage-form input[type="datetime-local"],
.manage-form textarea {
    width: 100%;
    max-width: 32em;
    padding: 0.5em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

.manage-form textarea {
    min-height: 12em;
    resize: vertical;
}

.manage-form-actions {
    margin-top: 1.5em;
}

.manage-form-actions .submit-style,
.manage-form-actions input.submit-style {
    margin-right: 0.5em;
    margin-bottom: 0.5em;
}

.scribe-post-card {
    position: relative;
}

.scribe-post-card-draft {
    border-left: 3px solid var(--warn);
}

.scribe-draft-badge {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 0.75em;
    font-weight: 600;
    color: var(--warn);
    text-transform: uppercase;
}

/* Manage / Account SSH random art */
.ssh-randomart {
    display: inline-block;
    padding: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    background-color: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}

.ssh-randomart svg {
    display: block;
}

.ssh-randomart-ascii {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
    overflow-x: auto;
}

.ssh-key-form {
    margin-top: 1.25rem;
}

.ssh-key-form > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.ssh-key-add-row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.ssh-key-add-row textarea {
    flex: 1;
    min-width: 0;
    min-height: 8em;
    box-sizing: border-box;
    padding: 0.5em 0.6em;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: #e0e0e0;
    font: inherit;
}

.ssh-key-add-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.ssh-key-add-row .submit-style {
    flex-shrink: 0;
    margin: 0;
    white-space: nowrap;
}

.ssh-key-form .signup textarea {
    min-height: 8em;
    padding: 0.5em 0.6em;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: #e0e0e0;
}

.ssh-key-form .signup textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.ssh-key-help {
    margin-top: 0.4rem;
    font-size: 0.9em;
    font-weight: 300;
    color: #aaaaaa;
}

/* Manage Account layout: details + authenticator beside password; SSH full width */
.account-grid .account-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account-grid .account-ssh {
    grid-column: 1 / -1;
}

/* Grid items default to min-width: auto, so one wide child (the key form,
   a fingerprint) widened the whole page on phones. */
.account-grid > * {
    min-width: 0;
}

@media (max-width: 640px) {
    .ssh-key-add-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.recovery-codes-list {
    list-style: none;
    margin: 1em 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.5rem 1.25rem;
}

.recovery-code {
    font-family: monospace;
    font-size: 0.95em;
    user-select: all;
    letter-spacing: 0.02em;
}

.account-details-dl {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-details-dl > div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.5rem 1rem;
    align-items: baseline;
}

.account-details-dl dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.account-details-dl dd {
    margin: 0;
}

.ssh-fingerprint {
    font-size: 0.85em;
    word-break: break-all;
}

.ssh-key-actions {
    white-space: nowrap;
}

.ssh-key-actions .ssh-key-edit {
    margin-right: 0.75em;
}

.inline-form {
    display: inline;
    margin: 0;
}

button.ssh-key-delete {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: var(--danger);
    text-decoration: underline;
}

button.ssh-key-delete:hover {
    color: #e05555;
}

.ssh-key-locked {
    color: var(--text-faint);
    font-size: 0.9em;
}

.totp-reset-cancel {
    margin-top: 0.5rem;
}

.scribe-post-meta {
    font-size: 0.85em;
    color: var(--text-faint);
    margin: 0.25em 0 0.5em 0;
}

.scribe-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manage-delete-link {
    margin-top: 1.5em;
}

.manage-delete-link .danger-link,
a.danger-link {
    color: var(--danger);
}

.manage-delete-link .danger-link:hover,
a.danger-link:hover {
    color: #e05555;
}

.scribe-delete-preview h2 {
    font-size: 1.2em;
    margin-bottom: 1em;
}

.coming-soon {
    font-size: 1.2em;
    color: var(--text-faint);
}

/* Scribe template selector */
.scribe-template-help {
    margin: 0.5em 0 1em 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

.scribe-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14em, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.scribe-template-option {
    display: block;
}

.scribe-template-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scribe-template-card {
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 0.75rem 0.9rem 0.9rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.scribe-template-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.scribe-template-name {
    font-weight: 500;
}

.scribe-template-tag {
    font-size: 0.8em;
    color: var(--text-muted);
}

.scribe-template-preview {
    margin: 0.4rem 0 0.5rem 0;
}

.scribe-template-preview svg {
    display: block;
    width: 100%;
    height: auto;
}

.scribe-template-description {
    margin: 0;
    font-size: 0.85em;
    color: #bbb;
}

.scribe-template-option input[type="radio"]:focus + .scribe-template-card,
.scribe-template-option input[type="radio"]:checked + .scribe-template-card {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

/* VM ordering: cards and layout */
.vm-splash {
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.vm-splash-title {
    margin-top: 0;
    font-size: 1.6em;
    font-weight: 500;
}

.vm-splash-text {
    margin: 0.75em 0;
    font-weight: 300;
}

.vm-splash-warning {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border: 1px solid #b04c48;
    background-color: #402020;
}

.vm-splash-warning h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.vm-splash-cta {
    margin-top: 1.5rem;
}

.vm-splash-note {
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.vm-step-intro {
    font-weight: 300;
    margin: 0.5em 0 1em 0;
}

.order-configure-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-configure-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.order-configure-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.order-checkout-cta {
    background-color: var(--accent);
    font-size: 1.15em;
    padding: 0.85em 2.25em;
    min-width: 12em;
}

.order-checkout-cta:hover {
    background-color: #7340a0;
}

.order-checkout-cta:active {
    background-color: #512c6d;
}

.order-review-summary {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: #2a2a2a;
    margin-bottom: 1.5rem;
}

.order-review-summary h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1em;
}

.order-basket {
    margin: 0.5rem 0 0;
}

.order-basket-row {
    padding: 0.65rem 0;
}

.order-basket-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.order-basket-label {
    font-weight: 600;
    color: #e8e8e8;
}

.order-basket-price {
    font-weight: 600;
    color: var(--ok);
    white-space: nowrap;
    text-align: right;
}

.order-basket-price-free {
    color: var(--text-muted);
    font-weight: 500;
}

.order-basket-price-credit {
    color: #83a598;
}

.order-basket-detail {
    margin-top: 0.2rem;
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
}

.order-basket-divider {
    border: 0;
    border-top: 1px solid var(--border-strong);
    margin: 0.5rem 0 0.25rem;
}

.order-basket-total-row {
    padding-top: 0.75rem;
}

.order-basket-total {
    font-size: 1.15em;
    font-weight: 700;
    color: #e8e8e8;
}

.order-basket-total-row .order-basket-price {
    color: #e8e8e8;
}

.order-review-balance {
    margin: 1rem 0 0;
    font-size: 0.95em;
    color: #ccc;
}

.order-review-note {
    margin: 0.5rem 0 0 0;
    font-size: 0.9em;
    color: var(--text-muted);
}

.order-review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.order-section {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 1.25rem 1.25rem;
    background-color: #252525;
}

.order-section-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.05em;
    font-weight: 600;
}

.order-nested-label {
    display: block;
    margin: 0.5rem 0 0.35rem;
    font-size: 0.9em;
    color: var(--text-muted);
}

.order-checkbox-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-checkbox-option {
    display: block;
    margin: 0.75rem 0;
}

.order-checkbox-label {
    display: block;
    font-weight: 500;
}

.order-pricing-info {
    font-weight: 300;
    line-height: 1.55;
}

.order-pricing-info p {
    margin: 0.5em 0;
}

.vm-card-nested {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    opacity: 0.45;
    transition: opacity 0.15s ease;
}

.vm-card:has(> input[type="radio"]:checked) .vm-card-nested {
    opacity: 1;
}

.vm-card-nested-prompt {
    margin: 0 0 0.65rem 0;
    font-size: 0.9em;
    font-weight: 400;
    color: #bbb;
}

.vm-card-nested-choices {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.vm-card-nested-item {
    display: block;
    margin: 0;
    padding: 0.65rem 0.75rem;
    background-color: #262626;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.vm-card-nested-item:hover:not(:has(> input[type="radio"]:checked)) {
    border-color: #666;
}

.vm-card-nested-item:has(> input[type="radio"]:focus-visible) {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.vm-card-nested-item:has(> input[type="radio"]:checked) {
    border-color: var(--accent);
    background-color: #352a40;
}

.vm-card-nested-item:has(> input[type="radio"]:checked) > .vm-card-title {
    font-weight: 600;
}

.vm-card-nested-deep {
    display: block;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--border);
    opacity: 0.45;
    transition: opacity 0.15s ease;
}

.vm-card-nested-item:has(> input[type="radio"]:checked) .vm-card-nested-deep {
    opacity: 1;
}

.vm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.vm-card {
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 0.9rem 1rem 1rem 1rem;
    cursor: pointer;
    position: relative;
    min-width: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease, background-color 0.15s ease;
    display: block;
}

.vm-card > input[type="radio"],
.vm-card-nested-item > input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.vm-card-header .vm-card-title {
    min-width: 0;
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 1.15em;
}

.vm-card-title {
    font-weight: 500;
}

.vm-card-meta {
    font-size: 0.85em;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.vm-card-class {
    font-weight: 300;
}

.vm-card-status {
    font-weight: 500;
}

.vm-card-status-available {
    color: var(--ok);
}

.vm-card-specs {
    margin-top: 0.4rem;
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--text-muted);
}

.vm-card-spec {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.vm-card-spec-icon {
    flex: 0 0 auto;
    color: var(--text-faint);
}

.vm-card-pricing {
    margin-top: 0.6rem;
}

.vm-card-header .vm-card-pricing {
    margin-top: 0;
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.vm-card-pricing-free {
    color: #a8a8a8;
    font-weight: 300;
    font-size: 0.9em;
}

.vm-card-price-main {
    font-size: 1.1em;
    font-weight: 500;
}

.vm-card-price-setup {
    font-size: 0.85em;
    color: var(--text-muted);
}

.vm-card-price-placeholder {
    visibility: hidden;
}

.vm-card-icons {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.8em;
}

.vm-icon {
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    border: 1px solid var(--border-strong);
}

.vm-icon-active {
    border-color: var(--accent);
    color: #e0d4f7;
}

.vm-icon-muted {
    opacity: 0.45;
}

.vm-card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #2a2a2a;
}

.vm-card-disabled .vm-card-status {
    color: #c45c5c;
    font-weight: 600;
}

.vm-card-disabled .vm-citadel-meter-level-0 { color: #c8c8c8; }
.vm-card-disabled .vm-citadel-meter-level-1 { color: #6a8aab; }
.vm-card-disabled .vm-citadel-meter-level-2 { color: #8a7aa8; }
.vm-card-disabled .vm-citadel-meter-level-3 { color: #b08968; }
.vm-card-disabled .vm-citadel-meter-level-4 { color: #a86a6a; }

.vm-card-at-capacity:hover {
    border-color: #c45c5c;
    background-color: #3a2222;
}

.vm-card:hover:not(.vm-card-disabled):not(:has(> input[type="radio"]:checked)) {
    border-color: #666;
}

.vm-card:has(> input[type="radio"]:focus-visible):not(.vm-card-disabled) {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.vm-card:has(> input[type="radio"]:checked):not(.vm-card-disabled) {
    border: 1px solid var(--accent);
    background-color: #352a40;
}

.vm-flag {
    width: 1.4em;
    height: 1em;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
    filter: grayscale(1);
    transition: filter 0.15s ease;
}

.vm-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

.vm-card:hover:not(.vm-card-disabled) .vm-flag {
    filter: none;
}

.vm-citadel-meters {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.55rem;
    min-height: 1.25rem;
}

.vm-citadel-meter {
    display: inline-flex;
    align-items: center;
}

.vm-citadel-meter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vm-citadel-meter-level-0 { color: #c8c8c8; }
.vm-citadel-meter-level-1 { color: #6a8aab; }
.vm-citadel-meter-level-2 { color: #8a7aa8; }
.vm-citadel-meter-level-3 { color: #b08968; }
.vm-citadel-meter-level-4 { color: #a86a6a; }

.vm-citadel-at-capacity .vm-citadel-meter {
    opacity: 0.35;
}

.vm-citadel-at-capacity-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #c45c5c;
    pointer-events: none;
}

.vm-byoo-warning {
    margin-top: 0.6rem;
}

.vm-byoo-textarea-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.9em;
}

.vm-byoo-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.55em 0.7em;
    background-color: #252525;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text);
    font: inherit;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vm-byoo-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.vm-byoo-file {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    padding: 0.35em 0;
    color: var(--text);
    font: inherit;
}

.vm-card-nested .vm-byoo-file {
    pointer-events: auto;
}

.vm-card-nested .order-input,
.vm-card-nested-deep .vm-byoo-textarea,
.vm-card-nested .vm-byoo-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.vm-ports-label {
    display: block;
    margin-top: 0.75rem;
}

.vm-ports-input {
    width: 100%;
    max-width: 24em;
    padding: 0.6em 0.8em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 1.02em;
}

.vm-ports-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.vm-ports-note {
    margin-top: 0.35rem;
    font-size: 0.85em;
    color: var(--text-muted);
}

.port-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .port-pills {
        grid-template-columns: 1fr;
    }
}

.port-pills-column {
    background-color: #2a2a2a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    padding: 0.85rem 1rem 1rem;
}

.port-pills-heading {
    margin: 0 0 0.75rem 0;
    font-size: 1em;
    font-weight: 500;
}

.port-pills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    min-height: 2.2em;
}

.port-pills-empty {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-faint);
}

.port-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35em 0.7em;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.2;
    box-sizing: border-box;
    position: relative;
}

.port-pill-safe {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.55);
    color: #bbf7d0;
}

.port-pill-unsafe {
    background: rgba(234, 145, 12, 0.18);
    border-color: rgba(176, 76, 72, 0.7);
    color: #f5c6a5;
}

button.port-pill-add {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 400;
    line-height: 1.2;
    color: inherit;
    box-sizing: border-box;
}

button.port-pill-add:hover,
button.port-pill-add:focus {
    filter: brightness(1.12);
    outline: none;
}

.port-pill-remove {
    display: none;
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 0 0.1em;
    margin: 0;
    opacity: 0.85;
}

.port-pill:hover .port-pill-remove,
.port-pill:focus-within .port-pill-remove {
    display: inline;
}

.port-pill-remove:hover,
.port-pill-remove:focus {
    opacity: 1;
    color: #fff;
}

.port-pills-custom {
    margin-top: 1.1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.port-pills-custom-heading {
    margin: 0 0 0.55rem 0;
    font-size: 0.9em;
    font-weight: 500;
    color: #bbb;
}

.port-pills-custom-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.port-pills-custom-input {
    width: 7em;
    box-sizing: border-box;
    padding: 12px 0.75em;
    font-size: 16px;
    line-height: 1.2;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    min-height: calc(12px + 12px + 1.2em);
}

.port-pills-custom-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.port-pills-custom-add {
    margin: 0;
}

.os-capacity-slider {
    max-width: 36rem;
}

.os-capacity-current {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0 0 1rem 0;
    font-size: 1.15em;
}

.os-capacity-range-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9em;
    color: var(--text-muted);
}

.os-capacity-range {
    width: 100%;
    accent-color: var(--accent);
}

.os-capacity-ticks {
    display: flex;
    justify-content: space-between;
    margin: 0.35rem 0 1rem 0;
    font-size: 0.8em;
    color: var(--text-faint);
}

.os-capacity-update {
    margin-bottom: 0.75rem;
}

.vm-summary-table {
    width: 100%;
    max-width: 40em;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem 0;
}

.vm-summary-table th,
.vm-summary-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.vm-summary-table th {
    font-weight: 500;
    color: var(--text-muted);
}

.vm-summary-detail {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.vm-summary-deduction td {
    font-style: italic;
    color: var(--text-muted);
}

.vm-summary-total td {
    font-weight: 600;
}

.vm-balance {
    margin-top: 0.5rem;
}

.vm-order-note {
    margin: 0.75rem 0 1rem 0;
    font-size: 0.95em;
}

/* Order: subdomain text input */
.order-input {
    width: 100%;
    max-width: 20em;
    box-sizing: border-box;
    padding: 0.5em 0.75em;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.order-input-note {
    margin-top: 0.25em;
    font-size: 0.85em;
    font-weight: 300;
    color: var(--text-muted);
}

/* Wallet: top-up amount and transactions */
.wallet-amount-form {
    margin: 1.5em 0;
    max-width: 40em;
}

.wallet-amount-label {
    font-weight: 600;
    margin: 0 0 0.75em 0;
}

.wallet-preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.wallet-preset-grid legend {
    flex-basis: 100%;
}

.wallet-preset-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.5em;
    padding: 0.7em 0.9em;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #ccc;
    user-select: none;
}

.wallet-preset-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.wallet-preset-card:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wallet-preset-card:has(input:checked) {
    background-color: var(--accent);
    border-color: var(--accent-bright);
    color: #fff;
}

.wallet-custom-wrap {
    display: none;
    margin: 0.5em 0 0 0;
}

.wallet-amount-form:has(#preset-custom:checked) .wallet-custom-wrap {
    display: block;
}

.wallet-custom-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4em;
}

.wallet-custom-amount {
    width: 100%;
    max-width: 12em;
    box-sizing: border-box;
    padding: 0.9em 1em;
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1.2;
    background-color: var(--surface);
    border: 2px solid var(--border-strong);
    border-radius: 6px;
    color: #eee;
}

.wallet-custom-amount:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.wallet-amount-actions {
    margin-top: 1.25em;
}

.wallet-transaction-id {
    font-family: monospace;
    font-size: 0.95em;
    word-break: break-all;
}

.wallet-transaction-address {
    font-family: monospace;
    word-break: break-all;
}

.wallet-cash-postal-address {
    white-space: pre-line;
}

.wallet-transactions-table {
    margin-top: 1em;
}

/* —— Products and Pricing landing (CSS-only; no JS) —— */

body.products-landing section.main.welcome {
    display: none;
}

body.hero-landing > header {
    display: none;
}

body.products-landing .page-main {
    width: 100%;
    flex: 1 0 auto;
}

body.products-landing {
    scroll-snap-type: y proximity;
}

.products-page {
    width: 100%;
}

.products-band {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    box-sizing: border-box;
    scroll-snap-align: start;
    overflow: hidden;
}

.products-band-inner {
    width: min(40rem, 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.products-band-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #181818;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.products-hero {
    min-height: calc(100vh - 5rem);
    padding: 0;
    align-items: stretch;
    background: #1a1a1a;
}

body.hero-landing .products-hero {
    min-height: 100vh;
}

.products-hero-visual {
    background-image:
        linear-gradient(105deg, rgba(32, 32, 32, 0.92) 0%, rgba(32, 32, 32, 0.55) 42%, rgba(32, 32, 32, 0.28) 100%),
        url("../images/products-hero.webp");
    background-position: center right;
    animation: products-ambient 28s ease-in-out infinite alternate;
}

.products-scribe .products-band-visual {
    background-image:
        linear-gradient(100deg, rgba(32, 32, 32, 0.94) 0%, rgba(32, 32, 32, 0.72) 48%, rgba(32, 32, 32, 0.45) 100%),
        url("../images/products-scribe.webp");
    background-position: center right;
}

.products-vm .products-band-visual {
    background-image:
        linear-gradient(100deg, rgba(32, 32, 32, 0.93) 0%, rgba(32, 32, 32, 0.7) 50%, rgba(32, 32, 32, 0.4) 100%),
        url("../images/products-vm.webp");
    background-position: center right;
}

.products-os .products-band-visual {
    background-image:
        linear-gradient(100deg, rgba(32, 32, 32, 0.93) 0%, rgba(32, 32, 32, 0.7) 50%, rgba(32, 32, 32, 0.4) 100%),
        url("../images/products-storage.webp");
    background-position: center right;
}

.products-billing .products-band-visual {
    background-image:
        linear-gradient(100deg, rgba(30, 30, 30, 0.94) 0%, rgba(30, 30, 30, 0.75) 55%, rgba(30, 30, 30, 0.5) 100%),
        url("../images/products-billing.webp");
    background-position: center right;
}

.products-closing .products-band-visual {
    background-image:
        linear-gradient(180deg, rgba(32, 32, 32, 0.9) 0%, rgba(42, 36, 48, 0.82) 100%),
        url("../images/products-closing.webp");
    background-position: center;
}

.products-hero-copy {
    position: relative;
    z-index: 1;
    width: min(36rem, 92%);
    margin: auto 0 auto clamp(1.5rem, 8vw, 6rem);
    padding: 3rem 0;
    animation: products-hero-in 0.9s ease-out both;
}

.products-brand-mark {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 200;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
    color: #e8e8e8;
}

.products-headline {
    font-size: clamp(1.35rem, 2.8vw, 1.85rem);
    font-weight: 400;
    margin: 0 0 0.85rem;
    color: #d4d4d4;
    line-height: 1.25;
}

.products-lede {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.55;
    margin: 0 0 1.75rem;
    max-width: 28rem;
    color: #b8b8b8;
}

.products-kicker {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    margin: 0 0 0.5rem;
}

.products-price {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 200;
    color: #c8c8c8;
    margin: 0 0 0.35rem;
    line-height: 1.1;
}

.products-price-unit {
    font-size: 0.4em;
    font-weight: 300;
    color: #a0a0a0;
    margin-left: 0.15em;
}

.products-section-title {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 400;
    margin: 0 0 0.85rem;
    color: #dedede;
}

.products-copy {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 1.25rem;
    color: #b0b0b0;
}

.products-copy-quiet {
    font-size: 0.95rem;
    color: #8e8e8e;
    margin-bottom: 0;
}

.products-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin: 1.5rem 0 0;
}

a.products-cta.submit-style {
    margin: 0;
}

.products-cta-secondary {
    font-weight: 300;
    color: #a8a8a8;
    text-decoration: none;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 0.1em;
}

.products-cta-secondary:hover,
.products-cta-secondary:focus {
    color: #dedede;
    border-bottom-color: var(--accent);
}

.products-scribe {
    background: var(--bg);
}

.products-vm {
    background: #242424;
}

.products-os {
    background: var(--bg);
}

.products-billing {
    background: #1e1e1e;
    min-height: 70vh;
}

.products-closing {
    background: var(--bg);
    min-height: 60vh;
}

@keyframes products-hero-in {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes products-ambient {
    from {
        transform: scale(1);
        filter: brightness(1);
    }
    to {
        transform: scale(1.04);
        filter: brightness(1.06);
    }
}

@supports (animation-timeline: view()) {
    .products-reveal {
        animation: products-section-in linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 35%;
    }

    @keyframes products-section-in {
        from {
            opacity: 0.35;
            transform: translateY(1.5rem);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 768px) {
    .products-band {
        min-height: auto;
        padding: 3.5rem 1.25rem;
    }

    .products-hero {
        min-height: 85vh;
    }

    .products-hero-visual {
        background-position: center center;
        background-image:
            linear-gradient(180deg, rgba(32, 32, 32, 0.9) 0%, rgba(32, 32, 32, 0.78) 55%, rgba(32, 32, 32, 0.9) 100%),
            url("../images/products-hero.webp");
    }

    .products-scribe .products-band-visual,
    .products-vm .products-band-visual,
    .products-os .products-band-visual,
    .products-billing .products-band-visual,
    .products-closing .products-band-visual {
        background-position: center center;
    }

    .products-scribe .products-band-visual {
        background-image:
            linear-gradient(180deg, rgba(32, 32, 32, 0.9) 0%, rgba(32, 32, 32, 0.82) 60%, rgba(32, 32, 32, 0.92) 100%),
            url("../images/products-scribe.webp");
    }

    .products-vm .products-band-visual {
        background-image:
            linear-gradient(180deg, rgba(32, 32, 32, 0.9) 0%, rgba(32, 32, 32, 0.82) 60%, rgba(32, 32, 32, 0.92) 100%),
            url("../images/products-vm.webp");
    }

    .products-os .products-band-visual {
        background-image:
            linear-gradient(180deg, rgba(32, 32, 32, 0.9) 0%, rgba(32, 32, 32, 0.82) 60%, rgba(32, 32, 32, 0.92) 100%),
            url("../images/products-storage.webp");
    }

    .products-billing .products-band-visual {
        background-image:
            linear-gradient(180deg, rgba(30, 30, 30, 0.9) 0%, rgba(30, 30, 30, 0.82) 60%, rgba(30, 30, 30, 0.92) 100%),
            url("../images/products-billing.webp");
    }

    .products-closing .products-band-visual {
        background-image:
            linear-gradient(180deg, rgba(32, 32, 32, 0.88) 0%, rgba(42, 36, 48, 0.88) 100%),
            url("../images/products-closing.webp");
    }

    .products-hero-copy {
        margin: auto 1.25rem;
        padding: 2.5rem 0;
    }

    .products-brand-mark {
        font-size: 1.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.products-landing {
        scroll-snap-type: none;
    }

    .products-hero-copy,
    .products-hero-visual,
    .products-reveal {
        animation: none !important;
    }
}


/* ==========================================================================
   Shared components (#45). Build new markup from these instead of one-off
   page classes. No JavaScript: state comes from :has(), <details> and forms.
   ========================================================================== */

/* Buttons: one hierarchy. Use .btn plus exactly one variant. */
.btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.6rem 1.1rem;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.2;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
a.btn:link, a.btn:visited { color: inherit; }
.btn-primary, a.btn-primary:link, a.btn-primary:visited { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary, a.btn-secondary:link, a.btn-secondary:visited { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); color: #fff; }
.btn-danger, a.btn-danger:link, a.btn-danger:visited { background: var(--danger-bg); color: #fff; }
.btn-danger:hover { background: #a83a3a; color: #fff; }
.btn-ghost-danger, a.btn-ghost-danger:link, a.btn-ghost-danger:visited { background: transparent; color: var(--danger-text); border-color: rgba(224, 102, 102, 0.45); }
.btn-ghost-danger:hover { background: var(--danger-soft); color: #ffb4b4; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:active { transform: scale(0.98); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0 0; }
.btn-row-end { justify-content: flex-end; }
.btn-row form { margin: 0; }

/* Status badges. Pick the variant with the stateBadge template func. */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	border: 1px solid currentColor;
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
	vertical-align: middle;
}
.badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: var(--ok-soft); }
.badge-warn { color: var(--warn); background: var(--warn-soft); }
.badge-danger { color: var(--danger-text); background: var(--danger-soft); }
.badge-info { color: var(--info); background: var(--info-soft); }
.badge-muted { color: var(--text-muted); background: transparent; }
.badge-busy::before { animation: badge-pulse 1.4s ease-in-out infinite; }
@keyframes badge-pulse { 50% { opacity: 0.25; } }

/* Alerts: banners with a severity, a message and optional actions. */
.alert {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem 1rem;
	align-items: center;
	padding: 1rem 1.25rem;
	margin: 0 0 var(--gap);
	border: 1px solid;
	border-left-width: 4px;
	border-radius: var(--radius);
}
.alert h2 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--text-strong); }
.alert p { margin: 0.2rem 0 0; }
.alert .btn-row { margin: 0; }
.alert ul { margin: 0.2rem 0 0; padding-left: 1.25rem; }
/* In the narrow VM sidebar the action goes under the message. */
.vm-sidebar .alert { grid-template-columns: 1fr; }
.alert-danger { border-color: var(--danger-text); background: var(--danger-soft); }
.alert-warn { border-color: var(--warn); background: var(--warn-soft); }
.alert-ok { border-color: var(--ok); background: var(--ok-soft); }
.alert-info { border-color: var(--info); background: var(--info-soft); }
@media (max-width: 640px) { .alert { grid-template-columns: 1fr; } }

/* Cards */
.card {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 1.25rem;
	min-width: 0;
}
.card > h2, .card-head h2 { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 500; color: var(--text-strong); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.card-head a { font-size: 0.9rem; }
.card-foot { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-muted { color: var(--text-muted); }
.card > :last-child { margin-bottom: 0; }
.danger-zone { border-color: rgba(224, 102, 102, 0.45); }
.danger-zone > h2 { color: var(--danger-text); }

/* Layout helpers */
.card-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: start; }
.span-all { grid-column: 1 / -1; }
.split { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: var(--gap); }

/* Key numbers */
.stat-row { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin-bottom: var(--gap); }
.stat { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.stat-value { font-size: 1.75rem; font-weight: 300; line-height: 1.25; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.88rem; color: var(--text-muted); }

/* Data tables. Add .stack-sm and data-label on each td to collapse into
   label/value rows on phones. */
.table-wrap { overflow-x: auto; scrollbar-color: var(--border-strong) transparent; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th {
	text-align: left;
	font-weight: 500;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--border-strong);
}
table.data td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; font-size: 0.83rem; color: var(--text-muted); }
@media (max-width: 640px) {
	table.data.stack-sm thead { display: none; }
	table.data.stack-sm tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--border-soft); }
	table.data.stack-sm tbody tr:last-child { border-bottom: 0; }
	table.data.stack-sm td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; border: 0; text-align: right; }
	table.data.stack-sm td::before { content: attr(data-label); color: var(--text-muted); font-size: 0.85rem; text-align: left; flex: none; font-family: overpass, sans-serif; word-break: normal; }
	table.data.stack-sm td > * { min-width: 0; }
}

/* Key/value lists */
/* Payment page QR (#125): a white quiet zone in both themes so phone
   wallets can read it. */
.payment-qr { margin: 1rem 0; }
.payment-qr img { display: block; max-width: 100%; height: auto; background: #fff; padding: 8px; border-radius: 6px; }
.payment-details { margin: 1rem 0; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; margin: 0; }
dl.kv dt { color: var(--text-muted); font-size: 0.92rem; }
dl.kv dd { margin: 0; color: var(--text-strong); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { dl.kv { grid-template-columns: 1fr; gap: 0.1rem; } dl.kv dd { margin-bottom: 0.6rem; } }

/* Receipt-style summary */
.summary { background: var(--surface-2); border-radius: var(--radius); padding: 0.75rem 1.25rem; margin: 1rem 0; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; font-variant-numeric: tabular-nums; }
.summary-row.total { border-top: 1px solid var(--border-strong); margin-top: 0.35rem; padding-top: 0.65rem; font-weight: 600; color: var(--text-strong); }
.credit { color: var(--ok); }

/* Values users copy (addresses, commands): one click selects the lot. */
.copyable {
	display: block;
	font-family: var(--mono);
	font-size: 0.92em;
	color: var(--text-strong);
	background: var(--sunken);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-sm);
	padding: 0.6rem 0.8rem;
	overflow-wrap: anywhere;
	user-select: all;
	-webkit-user-select: all;
	cursor: text;
}
.hint { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0 0; }

/* Feature on/off pills */
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.pill { font-size: 0.8rem; padding: 0.1rem 0.55rem; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); color: var(--text-muted); }
.pill::before { content: "– "; }
.pill-on { border-color: var(--ok); color: var(--ok); }
.pill-on::before { content: "✓ "; }

/* Step indicator for multi-page flows */
.steps { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.92rem; }
.steps li::before {
	content: counter(step);
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	display: inline-grid;
	place-items: center;
	border: 1px solid var(--border-strong);
	font-size: 0.8rem;
}
.steps li + li::after { content: ""; order: -1; width: 1.5rem; height: 1px; background: var(--border-strong); }
.steps li[aria-current="step"] { color: var(--text-strong); }
.steps li[aria-current="step"]::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps li.done::before { content: "✓"; background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* Spec tiles */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0.6rem; }
.spec { background: var(--surface-2); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; }
.spec-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.spec-value { font-size: 1.15rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }

/* Secondary detail behind a disclosure */
details.more { border-top: 1px solid var(--border-soft); margin-top: 1rem; padding-top: 0.75rem; }
details.more summary { cursor: pointer; color: var(--text-muted); font-size: 0.92rem; }
details.more summary:hover { color: var(--text-strong); }
details.more[open] summary { margin-bottom: 0.75rem; }

/* Flashes keep their markup (the e2e harness scrapes it) but use the alert look. */
.flash { text-align: left; border-left-width: 4px; max-width: 44rem; border-radius: var(--radius); color: var(--text-strong); }
.flash-error { background: var(--danger-soft); border-color: var(--danger-text); color: var(--text-strong); }

@media (prefers-reduced-motion: reduce) {
	.badge-busy::before { animation: none; }
	.btn:active { transform: none; }
}

/* —— VM detail (#48) —— */
.vm-connection-kv { margin-top: 1rem; }

/* —— Dashboard (#47) —— */
.dashboard { margin: 0 auto 2rem; }
/* Two columns: the storage table needs more than a third of the width. */
.dashboard .card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.dashboard-web-site + .dashboard-web-site { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-soft); }

/* —— Destructive confirmations (#50) —— */
.confirm { max-width: 44rem; margin-bottom: 2rem; }
.confirm .card ul { padding-left: 1.25rem; }
.confirm .card li + li { margin-top: 0.3rem; }
.confirm h3 { margin: 1.25rem 0 0.25rem; font-size: 1rem; font-weight: 600; color: var(--text-strong); }
