:root {
	--navy: #000080;
	--navy-dark: #00004d;
	--green: #008000;
	--green-dark: #006400;
	--ink: #1a1a2e;
	--muted: #4a4a5e;
	--bg: #ffffff;
	--bg-alt: #f2f4fb;
	--border: #767694;
	--error: #b00020;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(0, 0, 128, .12);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
	margin: 0;
	font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

a { color: var(--navy); text-underline-offset: .2em; }
a:hover { color: var(--green-dark); }

:focus-visible {
	outline: 3px solid var(--navy);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

main:focus { outline: none; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(780px, 100% - 2.5rem); }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

[hidden] { display: none !important; }

.skip-link {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	background: var(--navy); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; color: #fff; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
	border-bottom: 4px solid var(--green);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); }
.brand img { width: 84px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.brand-slogan { font-size: .9rem; color: var(--green-dark); font-weight: 600; }

.nav-list { list-style: none; display: flex; align-items: center; gap: .5rem 1.5rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a:not(.btn) { display: inline-block; padding: .6rem .25rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.nav-list a:not(.btn):hover, .nav-list a[aria-current="page"]:not(.btn) { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--green); }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: .7rem 1.6rem;
	font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	color: #fff; background: var(--green); border: 2px solid var(--green); border-radius: 999px;
	transition: background-color .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-small { min-height: 44px; padding: .5rem 1.2rem; }
.btn[disabled] { opacity: .65; cursor: not-allowed; transform: none; }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--navy); }
.hero :focus-visible { outline-color: #fff; box-shadow: 0 0 0 2px var(--navy); }

.link-button { background: none; border: 0; padding: .5rem; min-height: 44px; font: inherit; color: #fff; text-decoration: underline; cursor: pointer; }

/* Hero */
.hero {
	color: #fff;
	background: radial-gradient(1200px 500px at 85% 0%, rgba(0, 128, 0, .45), transparent 60%), linear-gradient(135deg, var(--navy-dark), var(--navy));
	padding-block: clamp(3rem, 8vw, 6rem);
}
.hero h1 { color: #fff; }
.hero-inner { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1.1fr .9fr; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .95rem; color: #fff; border-left: 5px solid #5fd35f; padding-left: .75rem; }
.lead { font-size: 1.25rem; max-width: 60ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-logo { margin: 0; text-align: center; }
.hero-logo img { width: 100%; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); background: #fff; }

.page-hero {
	color: #fff; padding-block: clamp(2.5rem, 6vw, 4.5rem);
	background: linear-gradient(135deg, var(--navy-dark), var(--navy));
}
.page-hero h1 { color: #fff; }
.page-hero .lead { margin-bottom: 1rem; }
.page-hero .btn { margin-top: .5rem; }
.page-hero :focus-visible { outline-color: #fff; box-shadow: 0 0 0 2px var(--navy); }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); max-width: 65ch; font-size: 1.15rem; }

.card-grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
	background: #fff; border: 1px solid #d5d8ec; border-top: 5px solid var(--green);
	border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
	display: flex; flex-direction: column; align-items: flex-start;
	transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0, 0, 128, .18); }
.card p { color: var(--muted); }
.card-icon { width: 48px; height: 48px; fill: var(--navy); margin-bottom: 1rem; }
.card-link { margin-top: auto; font-weight: 700; padding-block: .6rem; }
.price { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 1.25rem; }
.price-text { font-size: 1.5rem; }
.price-period { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card .btn { margin-top: auto; }

/* Forms */
.contact-grid { display: grid; gap: 3rem; grid-template-columns: 1fr 1.3fr; align-items: start; }
.form { background: #fff; border: 1px solid #d5d8ec; border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.form fieldset { border: 0; border-top: 2px solid var(--bg-alt); margin: 0 0 1.5rem; padding: 1rem 0 0; min-width: 0; }
.form fieldset:first-of-type { border-top: 0; }
.form legend { font-size: 1.25rem; font-weight: 800; color: var(--navy); padding: 0 .5rem 0 0; }
.form-note, .hint { font-size: .95rem; color: var(--muted); }
.field { margin-bottom: 1.1rem; flex: 1 1 0; min-width: 0; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row > .field { min-width: 180px; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea {
	width: 100%; min-height: 48px; padding: .65rem .85rem; font: inherit; color: var(--ink);
	background: #fff; border: 2px solid var(--border); border-radius: 10px;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-weight: 600; font-size: .95rem; margin: .35rem 0 0; }
.address-row { align-items: flex-end; flex-wrap: nowrap; }
.address-row .at { font-size: 1.5rem; font-weight: 700; padding-bottom: 1.2rem; }
.availability { min-height: 1.6em; margin-top: .75rem; font-weight: 600; }
.availability.ok { color: var(--green-dark); }
.availability.bad { color: var(--error); }

.plan-options { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.plan-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-option label {
	display: flex; flex-direction: column; gap: .2rem; margin: 0; height: 100%;
	padding: 1rem; cursor: pointer; border: 2px solid var(--border); border-radius: 12px; background: #fff;
}
.plan-option input:checked + label { border-color: var(--green); background: #eef8ee; box-shadow: inset 0 0 0 2px var(--green); }
.plan-option input:focus-visible + label { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.plan-name { font-weight: 800; color: var(--navy); }
.plan-price { color: var(--muted); font-weight: 500; }

.cf-turnstile { margin: 1rem 0; min-height: 65px; }
.form-status { margin-top: 1rem; font-weight: 600; }
.form-status.ok { color: var(--green-dark); }
.form-status.bad { color: var(--error); }

.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; border: 2px solid; font-weight: 600; }
.alert-success { background: #eef8ee; border-color: var(--green); color: #064006; }
.alert-error { background: #fdecef; border-color: var(--error); color: #7a0016; }
.alert ul { margin: .5rem 0 0; padding-left: 1.25rem; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #fff; padding-block: 2.5rem; border-top: 6px solid var(--green); }
.footer-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.footer-inner img { border-radius: 12px; background: #fff; width: 150px; height: auto; }
.footer-slogan { font-weight: 700; font-size: 1.25rem; margin-bottom: .25rem; }
.site-footer p { margin-bottom: .25rem; }

@media (max-width: 860px) {
	.hero-inner, .contact-grid { grid-template-columns: 1fr; }
	.hero-logo { order: -1; max-width: 420px; margin-inline: auto; }
	.address-row { flex-wrap: wrap; }
	.site-header { position: static; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
	.btn, .card, .form { border: 2px solid CanvasText; }
}

.site-card { max-width: 640px; align-items: stretch; margin-top: 1.5rem; }
.site-card:hover { transform: none; }
.site-list { margin: 0; padding-left: 1.25rem; }
.site-list li { padding-block: .25rem; }

.check { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.check input { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--navy); }
.check label { margin: 0; font-weight: 400; }
.pw-output { margin-top: 1.25rem; }
#pw-result { font-family: Consolas, monospace; }

.stepper { display: inline-flex; align-items: stretch; max-width: 100%; }
.stepper input[type="number"] { width: 6rem; text-align: center; border-radius: 0; border-inline: 0; -moz-appearance: textfield; appearance: textfield; }
.stepper input[type="number"]::-webkit-inner-spin-button, .stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-btn {
	min-width: 48px; min-height: 48px; font: inherit; font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer;
	color: var(--navy); background: var(--bg-alt); border: 2px solid var(--border);
}
.stepper-btn:first-child { border-radius: 10px 0 0 10px; }
.stepper-btn:last-child { border-radius: 0 10px 10px 0; }
.stepper-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.prose h2 { margin-top: 2rem; }

/* Identity pages (template markup): label above field, site-styled inputs */
.account-page .form-floating { display: flex; flex-direction: column; margin-bottom: 1.1rem; }
.account-page .form-floating > label { order: -1; }
.account-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]), .account-page select, .account-page textarea {
	width: 100%; min-height: 48px; padding: .65rem .85rem; font: inherit; color: var(--ink);
	background: #fff; border: 2px solid var(--border); border-radius: 10px;
}
.account-page input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-right: .5rem; vertical-align: middle; }
.account-page .text-danger, .account-page .validation-message { color: var(--error); font-weight: 600; }
.account-page button[type="submit"], .account-page .btn { margin-top: .25rem; }

/* Programmatic focus on the page heading after navigation should not draw a ring */
h1[tabindex="-1"]:focus { outline: none; }

/* Blazor unhandled-error banner */
#blazor-error-ui {
	display: none; position: fixed; inset: auto 0 0 0; z-index: 1000;
	padding: .75rem 1.25rem; background: #fff3cd; color: #1a1a1a; border-top: 3px solid #b58100;
}
#blazor-error-ui a { color: var(--navy); font-weight: 600; }
#blazor-error-ui .dismiss { position: absolute; right: .75rem; top: .4rem; min-width: 44px; min-height: 44px; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }

/* Invoices and payment */
.invoice-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 1.5rem; }
.invoice-grid .site-card { margin-top: 0; max-width: none; }
.site-card.wide { max-width: none; }
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.summary-list dt { font-weight: 700; }
.summary-list dd { margin: 0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .6rem .75rem; border-bottom: 1px solid #d5d8ec; text-align: left; vertical-align: top; }
.data-table thead th { background: var(--bg-alt); color: var(--navy); }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table tfoot th { text-align: right; }
.data-table tr.balance th, .data-table tr.balance td { font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.balance-line { font-size: 1.25rem; }
#dropin-container { min-height: 120px; margin-bottom: 1rem; }

/* Identity pages: replacements for the template's Bootstrap classes */
.alert-danger { background: #fdecef; border-color: var(--error); color: #7a0016; }
.alert-warning { background: #fff7e0; border-color: #8a5a00; color: #4d3200; }
.alert-info { background: #eef2fb; border-color: var(--navy); color: var(--navy); }
.alert p { margin: 0 0 .5rem; } .alert p:last-child { margin-bottom: 0; }
.account-page.wide { max-width: 1000px; }
.account-page form .btn[type="submit"]:not(.btn-small) { width: 100%; }
.account-page .checkbox label { display: flex; align-items: center; font-weight: 400; }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #7a0016; border-color: #7a0016; }
.alt-login { text-align: center; margin: 1rem 0; }
.alt-login p { margin: 0 0 .5rem; color: var(--muted); }
.manage-grid { display: grid; grid-template-columns: 14rem 1fr; gap: 2rem; align-items: start; }
.manage-nav { list-style: none; margin: 0; padding: 0; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; }
.manage-nav li + li { border-top: 1px solid var(--border); }
.manage-nav a { display: block; min-height: 44px; padding: .7rem 1rem; font-weight: 600; text-decoration: none; }
.manage-nav a:hover { background: var(--bg-alt); text-decoration: underline; }
.manage-nav a.active { background: var(--navy); color: #fff; }
.manage-content > h2:first-child { margin-top: 0; }
.manage-content form { max-width: 28rem; }
.manage-content .data-table form { max-width: none; display: inline; }
.manage-content ol > li { margin-bottom: 1rem; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; margin: 1rem 0; }
.recovery-code, kbd { font-family: Consolas, monospace; font-size: 1.05rem; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: .4rem .6rem; }
@media (max-width: 760px) { .manage-grid { grid-template-columns: 1fr; gap: 1rem; } }
.qr-code { width: 13rem; max-width: 100%; margin: .75rem 0; border: 2px solid var(--border); border-radius: 8px; background: #fff; }
.qr-code svg { display: block; width: 100%; height: auto; }
.help-note { margin-top: 2rem; }
