/*
 * ISPProtect sample submission portal
 *
 * Palette is taken straight from the ISPProtect logo:
 *   #ea4e52  signal red      (mascot, "PROTECT" wordmark)
 *   #7b3534  deep red        (shaded half of the mascot)
 *   #333c46  ink             ("ISP" wordmark, tagline)
 */

:root {
	color-scheme: light dark;

	--red: #ea4e52;
	--red-dark: #d13a3e;
	--red-deep: #7b3534;
	--ink: #333c46;
	--ink-soft: #4a5563;

	--bg: #f2f4f7;
	--bg-deep: #e7eaef;
	--surface: #ffffff;
	--surface-alt: #f8f9fb;
	--line: #dde1e8;
	--line-strong: #c6ccd6;
	--text: #232a33;
	--muted: #6b7580;

	--ok: #1e7a58;
	--ok-bg: #e9f6f0;
	--warn: #a05a00;
	--warn-bg: #fdf3e3;
	--err: #b3282d;
	--err-bg: #fdeeee;

	--radius: 14px;
	--radius-lg: 20px;
	--shadow-sm: 0 1px 2px rgba(35, 42, 51, .06), 0 2px 8px rgba(35, 42, 51, .05);
	--shadow-md: 0 2px 4px rgba(35, 42, 51, .05), 0 12px 32px rgba(35, 42, 51, .09);
	--focus: 0 0 0 3px rgba(234, 78, 82, .28);

	--font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #171b21;
		--bg-deep: #12151a;
		--surface: #1f242c;
		--surface-alt: #252b34;
		--line: #333b46;
		--line-strong: #414b58;
		--text: #e7eaef;
		--muted: #9aa4b1;

		--ok: #6ed6ae;
		--ok-bg: #17302a;
		--warn: #e8b563;
		--warn-bg: #33291a;
		--err: #ff8e91;
		--err-bg: #382223;

		--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
		--shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
	}
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--red-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
	a {
		color: var(--red);
	}
}

code,
kbd,
samp {
	font-family: var(--mono);
	font-size: .92em;
}

.shell {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------------------------------------------------------------- header */

/* the logo ships on an opaque white plate, so the masthead stays light in
   both themes - anything else puts a white box on a dark bar */
.masthead {
	background: #fff;
	border-bottom: 3px solid var(--red);
}

.masthead .shell {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 76px;
	padding-block: 14px;
}

.masthead__logo {
	display: block;
	height: 40px;
	width: auto;
}

.masthead__logo-link {
	display: inline-flex;
	border-radius: 6px;
	padding: 4px;
	margin: -4px;
}

.masthead__logo-link:focus-visible {
	outline: none;
	box-shadow: var(--focus);
}

.masthead__label {
	margin-left: auto;
	color: #6b7580;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-align: right;
}

/* ------------------------------------------------------------------ hero */

.hero {
	position: relative;
	overflow: hidden;
	padding: 56px 0 40px;
	background:
		radial-gradient(1100px 420px at 8% -30%, rgba(234, 78, 82, .16), transparent 65%),
		linear-gradient(180deg, var(--bg-deep), var(--bg));
	border-bottom: 1px solid var(--line);
}

.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 5px 12px 5px 8px;
	border-radius: 999px;
	background: rgba(234, 78, 82, .12);
	color: var(--red-deep);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
	.hero__eyebrow {
		color: #ffb3b5;
	}
}

.hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--red);
	box-shadow: 0 0 0 4px rgba(234, 78, 82, .2);
}

.hero h1 {
	margin: 0;
	max-width: 20ch;
	font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.03em;
}

.hero__lead {
	max-width: 62ch;
	margin: 16px 0 0;
	color: var(--muted);
	font-size: 1.05rem;
}

/* ------------------------------------------------------------------ body */

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 28px;
	padding: 36px 0 72px;
}

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

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 28px;
}

@media (max-width: 560px) {
	.card {
		padding: 20px;
		border-radius: var(--radius);
	}
}

.form {
	display: grid;
	gap: 26px;
}

.fieldset {
	display: grid;
	gap: 12px;
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.fieldset__legend {
	padding: 0;
	font-size: 1.02rem;
	font-weight: 700;
	letter-spacing: -.01em;
}

.fieldset__hint {
	margin: -4px 0 2px;
	color: var(--muted);
	font-size: .88rem;
}

/* ------------------------------------------------------ type switch */

.choice {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 560px) {
	.choice {
		grid-template-columns: minmax(0, 1fr);
	}
}

.choice__option {
	position: relative;
	display: block;
	cursor: pointer;
}

.choice__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.choice__body {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 12px;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--surface-alt);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.choice__body::before {
	content: "";
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 2px solid var(--line-strong);
	border-radius: 50%;
	background: var(--surface);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.choice__option:hover .choice__body {
	border-color: var(--red);
}

.choice__input:checked + .choice__body {
	border-color: var(--red);
	background: rgba(234, 78, 82, .07);
	box-shadow: inset 0 0 0 1px var(--red);
}

.choice__input:checked + .choice__body::before {
	border-color: var(--red);
	box-shadow: inset 0 0 0 4px var(--red);
}

.choice__input:focus-visible + .choice__body {
	outline: none;
	box-shadow: var(--focus);
}

.choice__title {
	display: block;
	font-weight: 700;
	line-height: 1.3;
}

.choice__desc {
	display: block;
	margin-top: 3px;
	color: var(--muted);
	font-size: .87rem;
	line-height: 1.45;
}

/* ---------------------------------------------------------- drop zone */

.dropzone {
	position: relative;
	display: grid;
	place-items: center;
	gap: 6px;
	padding: 34px 20px;
	border: 2px dashed var(--line-strong);
	border-radius: var(--radius);
	background: var(--surface-alt);
	text-align: center;
	transition: border-color .15s ease, background .15s ease;
}

.dropzone:hover,
.dropzone.is-hover {
	border-color: var(--red);
	background: rgba(234, 78, 82, .06);
}

.dropzone:focus-within {
	border-color: var(--red);
	box-shadow: var(--focus);
}

.dropzone__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.dropzone__icon {
	color: var(--red);
}

.dropzone__title {
	font-weight: 700;
}

.dropzone__meta {
	color: var(--muted);
	font-size: .87rem;
}

.filelist {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.filelist:empty {
	display: none;
}

.filelist__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface-alt);
	font-size: .9rem;
}

.filelist__item.is-invalid {
	border-color: var(--err);
	background: var(--err-bg);
	color: var(--err);
}

.filelist__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--mono);
}

.filelist__size {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.filelist__item.is-invalid .filelist__size {
	color: inherit;
}

.filelist__drop {
	border: 0;
	border-radius: 6px;
	padding: 2px 6px;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
}

.filelist__drop:hover {
	color: var(--err);
	background: var(--err-bg);
}

/* ------------------------------------------------------------- fields */

.grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

@media (max-width: 560px) {
	.grid-2 {
		grid-template-columns: minmax(0, 1fr);
	}
}

.field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.field__label {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	font-size: .9rem;
	font-weight: 600;
}

.field__optional {
	color: var(--muted);
	font-size: .8rem;
	font-weight: 400;
}

.field__hint {
	color: var(--muted);
	font-size: .82rem;
}

.field__hint:empty {
	display: none;
}

.field input[type="text"],
.field input[type="email"],
.field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea {
	resize: vertical;
	min-height: 96px;
}

.field input::placeholder,
.field textarea::placeholder {
	color: var(--muted);
	opacity: .8;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--red);
	box-shadow: var(--focus);
}

.field input[data-mono] {
	font-family: var(--mono);
	letter-spacing: .02em;
}

.honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------ actions */

.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding-top: 22px;
	border-top: 1px solid var(--line);
}

.button {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	border: 0;
	border-radius: 10px;
	padding: 13px 24px;
	background: var(--red);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(123, 53, 52, .3), 0 6px 16px rgba(234, 78, 82, .28);
	transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}

.button:hover {
	background: var(--red-dark);
}

.button:active {
	transform: translateY(1px);
	box-shadow: 0 1px 2px rgba(123, 53, 52, .3);
}

.button:focus-visible {
	outline: none;
	box-shadow: var(--focus), 0 6px 16px rgba(234, 78, 82, .28);
}

.button[disabled] {
	opacity: .55;
	cursor: not-allowed;
}

.actions__note {
	flex: 1 1 240px;
	margin: 0;
	color: var(--muted);
	font-size: .85rem;
}

/* ------------------------------------------------------------ status */

.status {
	display: grid;
	gap: 8px;
	margin: 0 0 22px;
	padding: 16px 18px;
	border: 1px solid transparent;
	border-left-width: 4px;
	border-radius: 12px;
}

.status__title {
	font-weight: 700;
}

.status ul {
	margin: 0;
	padding-left: 20px;
}

.status li + li {
	margin-top: 4px;
}

.status p {
	margin: 0;
}

.status--ok {
	border-color: var(--ok);
	background: var(--ok-bg);
	color: var(--ok);
}

.status--err {
	border-color: var(--err);
	background: var(--err-bg);
	color: var(--err);
}

.status--warn {
	border-color: var(--warn);
	background: var(--warn-bg);
	color: var(--warn);
}

.status code {
	word-break: break-all;
}

/* -------------------------------------------------------------- aside */

.aside {
	display: grid;
	gap: 20px;
	position: sticky;
	top: 24px;
}

@media (max-width: 900px) {
	.aside {
		position: static;
	}
}

.panel {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}

.panel h2 {
	margin: 0 0 14px;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--muted);
}

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

.steps li {
	position: relative;
	padding-left: 38px;
	font-size: .9rem;
	line-height: 1.5;
}

.steps li::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(234, 78, 82, .12);
	color: var(--red-deep);
	font-size: .8rem;
	font-weight: 700;
}

@media (prefers-color-scheme: dark) {
	.steps li::before {
		color: #ffb3b5;
	}
}

.steps strong {
	display: block;
}

.panel--quiet {
	background: var(--surface-alt);
}

.panel p {
	margin: 0 0 10px;
	font-size: .88rem;
	color: var(--muted);
}

.panel p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------- language switch */

/* sits on the permanently white masthead, so its colors are fixed too */
.langswitch {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border: 1px solid #dde1e8;
	border-radius: 999px;
	background: #f8f9fb;
}

.langswitch__item {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	color: #6b7580;
	font-size: .8rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.langswitch__item:hover {
	color: #333c46;
	background: #edeff3;
}

.langswitch__item.is-active {
	color: #fff;
	background: var(--red);
}

.langswitch__item:focus-visible {
	outline: none;
	box-shadow: var(--focus);
}

/* --------------------------------------------------------------- consent */

.consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--red);
	border-radius: var(--radius);
	background: var(--surface-alt);
	cursor: pointer;
}

.consent:hover {
	border-color: var(--line-strong);
	border-left-color: var(--red);
}

.consent__input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--red);
	cursor: pointer;
}

.consent__input:focus-visible {
	outline: none;
	box-shadow: var(--focus);
}

.consent__text {
	font-size: .88rem;
	line-height: 1.55;
	color: var(--text);
}

/* ------------------------------------------------------------ code block */

.code {
	margin: 0 0 10px;
	padding: 12px 14px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
	font-family: var(--mono);
	font-size: .78rem;
	line-height: 1.6;
	color: var(--text);
	white-space: pre;
	-webkit-overflow-scrolling: touch;
}

.code code {
	font: inherit;
	color: inherit;
	background: none;
	padding: 0;
}

@media (max-width: 560px) {
	.masthead .shell {
		flex-wrap: wrap;
	}

	.langswitch {
		order: 3;
	}
}

/* ------------------------------------------------------------- footer */

.footer {
	border-top: 1px solid var(--line);
	background: var(--bg-deep);
	padding: 26px 0;
}

.footer .shell {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	justify-content: space-between;
	color: var(--muted);
	font-size: .85rem;
}

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

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

@media (max-width: 460px) {
	.masthead__label {
		display: none;
	}

	.masthead__logo {
		height: 34px;
	}

	.button {
		flex: 1 1 100%;
		justify-content: center;
	}
}
