/*!
 * Kirtsy Core: order form, contact forms and customer dashboard.
 *
 * Self-contained: every colour has a fallback, so the forms look right on any theme
 * (they sit on their own dark panel). The Kirtsy Calibrations theme supplies the
 * --void / --steel / --redline / --boost tokens and the display font; other themes get
 * the fallbacks below.
 *
 * Contrast notes (WCAG 2.2 AA): body text on panels is >= 12:1, secondary text >= 8:1,
 * form-control borders >= 3.5:1 against the panel, error text >= 6:1, white on red >= 5:1.
 */

.kc-wizard,
.kc-simple,
.kc-dash {
	--kc-deep: var(--void, #0a0c0e);
	--kc-bg: var(--steel, #15191d);
	--kc-bg-2: var(--steel-2, #1b2126);
	--kc-line: var(--line, #2b3238);
	--kc-edge: #6b767f; /* borders of controls: 3.5:1 on the panel */
	--kc-text: var(--billet, #edeff1);
	--kc-dim: #b9bec2;
	--kc-red: var(--redline, #d81f2a);
	--kc-red-2: var(--redline-2, #a5141d);
	--kc-blue: var(--boost, #2e9bff);
	--kc-blue-2: var(--boost-2, #8fcbff);
	--kc-err: #ff7d84;
	--kc-ok: #5fd08a;
	--kc-warn: #ffcf6b;
	--kc-radius: var(--radius, 3px);
	--kc-display: 'Big Shoulders', 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
	--kc-body: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--kc-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	box-sizing: border-box;
	color: var(--kc-text);
	font-family: var(--kc-body);
	font-size: 1rem;
	line-height: 1.55;
	color-scheme: dark;
}

.kc-wizard *,
.kc-wizard *::before,
.kc-wizard *::after,
.kc-simple *,
.kc-simple *::before,
.kc-simple *::after,
.kc-dash *,
.kc-dash *::before,
.kc-dash *::after {
	box-sizing: border-box;
}

/* The hidden attribute must always win over our display rules. */
.kc-wizard [hidden],
.kc-simple [hidden],
.kc-dash [hidden] {
	display: none !important;
}

/* Panels: the two forms sit on their own dark card. */
.kc-wizard,
.kc-simple {
	background: var(--kc-bg);
	border: 1px solid var(--kc-line);
	border-top: 3px solid var(--kc-red);
	border-radius: var(--kc-radius);
	padding: clamp(18px, 3.2vw, 36px);
	max-width: 880px;
}

.kc-wizard p,
.kc-simple p,
.kc-dash p {
	margin: 0 0 0.9em;
}

.kc-wizard a,
.kc-simple a,
.kc-dash a {
	color: var(--kc-blue-2);
	text-underline-offset: 3px;
}

.kc-wizard a:hover,
.kc-simple a:hover,
.kc-dash a:hover {
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * Utilities
 * ------------------------------------------------------------------ */

.kc-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Honeypot: off-screen (not display:none, which some bots skip) and never focusable. */
.kc-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kc-wizard :focus-visible,
.kc-simple :focus-visible,
.kc-dash :focus-visible {
	outline: 3px solid var(--kc-blue-2);
	outline-offset: 2px;
}

.kc-req {
	color: var(--kc-err);
	font-weight: 700;
}

.kc-note {
	color: var(--kc-dim);
	font-size: 0.85rem;
}

/* Text-style button used for "Edit" and "Clear selection". */
.kc-link {
	display: inline-block;
	min-width: 24px;
	min-height: 24px;
	padding: 4px 6px;
	margin: 0;
	border: 0;
	background: none;
	color: var(--kc-blue-2);
	font: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.kc-link:hover {
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */

.kc-wizard .kc-btn,
.kc-simple .kc-btn,
.kc-dash .kc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--kc-radius);
	font-family: var(--kc-display);
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kc-wizard .kc-btn.kc-btn-primary,
.kc-simple .kc-btn.kc-btn-primary,
.kc-dash .kc-btn.kc-btn-primary {
	background: var(--kc-red);
	border-color: var(--kc-red);
	color: #fff;
}

.kc-wizard .kc-btn.kc-btn-primary:hover,
.kc-simple .kc-btn.kc-btn-primary:hover,
.kc-dash .kc-btn.kc-btn-primary:hover {
	background: var(--kc-red-2);
	border-color: var(--kc-red-2);
	color: #fff;
}

.kc-wizard .kc-btn.kc-btn-ghost,
.kc-simple .kc-btn.kc-btn-ghost,
.kc-dash .kc-btn.kc-btn-ghost {
	background: transparent;
	border-color: var(--kc-edge);
	color: var(--kc-text);
}

.kc-wizard .kc-btn.kc-btn-ghost:hover,
.kc-simple .kc-btn.kc-btn-ghost:hover,
.kc-dash .kc-btn.kc-btn-ghost:hover {
	border-color: var(--kc-text);
	color: #fff;
}

.kc-dash .kc-btn.kc-btn-sm {
	min-height: 40px;
	padding: 8px 16px;
	font-size: 0.95rem;
}

.kc-wizard .kc-btn[disabled],
.kc-simple .kc-btn[disabled],
.kc-dash .kc-btn[disabled],
.kc-wizard .kc-btn[aria-disabled='true'] {
	opacity: 0.65;
	cursor: wait;
}

/* ------------------------------------------------------------------ *
 * Progress indicator
 * ------------------------------------------------------------------ */

.kc-steps {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0 0 28px !important;
	padding: 0 !important;
	list-style: none !important;
}

.kc-steps li {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--kc-dim);
	font-size: 0.8rem;
	line-height: 1.2;
}

.kc-steps li:last-child {
	flex: 0 0 auto;
}

/* connecting line */
.kc-steps li:not(:last-child)::after {
	content: '';
	flex: 1 1 12px;
	min-width: 12px;
	height: 2px;
	margin: 0 6px 0 4px;
	background: var(--kc-line);
}

.kc-steps li.is-done:not(:last-child)::after {
	background: var(--kc-blue);
}

.kc-step-num {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 2px solid var(--kc-edge);
	border-radius: 50%;
	background: transparent;
	color: var(--kc-text);
	font-family: var(--kc-mono);
	font-size: 0.8rem;
	font-weight: 600;
}

.kc-steps li.is-done .kc-step-num {
	border-color: var(--kc-blue);
	background: var(--kc-blue);
	color: #04121f;
}

.kc-steps li.is-current .kc-step-num {
	border-color: var(--kc-red);
	background: var(--kc-red);
	color: #fff;
}

.kc-steps li.is-current {
	color: var(--kc-text);
	font-weight: 600;
}

.kc-step-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ *
 * Steps (fieldsets)
 * ------------------------------------------------------------------ */

/* Before the script runs show only step 1, so the page does not jump when it loads. */
.kc-wizard:not(.is-js) .kc-step:not([data-step='1']) {
	display: none;
}

.kc-step {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.kc-step-title {
	display: block;
	float: left; /* lets a <legend> take normal block styling */
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	color: var(--kc-text);
	font-family: var(--kc-display);
	font-size: clamp(1.5rem, 3.4vw, 2rem);
	font-weight: 800;
	letter-spacing: 0.01em;
	line-height: 1.1;
	text-transform: uppercase;
}

.kc-step > legend + * {
	clear: both;
}

.kc-step-intro {
	color: var(--kc-dim);
	font-size: 0.95rem;
}

.kc-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 0 18px;
}

/* ------------------------------------------------------------------ *
 * Fields
 * ------------------------------------------------------------------ */

.kc-field {
	min-width: 0;
	margin: 0 0 18px;
}

.kc-field > label,
.kc-group > legend {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: var(--kc-text);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.35;
}

.kc-group > legend {
	float: left;
	width: 100%;
}

.kc-group > legend + * {
	clear: both;
}

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

.kc-hint {
	margin: 6px 0 0 !important;
	color: var(--kc-dim);
	font-size: 0.82rem;
	line-height: 1.45;
}

.kc-err {
	margin: 6px 0 0 !important;
	color: var(--kc-err);
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.4;
}

.kc-err::before {
	content: '\26A0\00a0';
	content: '\26A0\00a0' / '';
}

.kc-form input[type='text'],
.kc-form input[type='email'],
.kc-form input[type='tel'],
.kc-form input[type='number'],
.kc-form input[type='url'],
.kc-form select,
.kc-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--kc-edge);
	border-radius: var(--kc-radius);
	background-color: var(--kc-deep);
	box-shadow: none;
	color: var(--kc-text);
	font: inherit;
	font-size: 1rem; /* 16px: stops iOS zooming in on focus */
	line-height: 1.3;
}

.kc-form textarea {
	min-height: 120px;
	resize: vertical;
	line-height: 1.5;
}

.kc-form select {
	padding-right: 42px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23edeff1' stroke-width='2'/%3E%3C/svg%3E");
	background-position: right 15px center;
	background-repeat: no-repeat;
	background-size: 12px 8px;
	-webkit-appearance: none;
	appearance: none;
}

.kc-form input::placeholder,
.kc-form textarea::placeholder {
	color: #98a0a6;
	opacity: 1;
}

.kc-form input:hover,
.kc-form select:hover,
.kc-form textarea:hover {
	border-color: #8b969e;
}

.kc-form input:focus,
.kc-form select:focus,
.kc-form textarea:focus {
	border-color: var(--kc-blue-2);
	outline: 3px solid var(--kc-blue-2);
	outline-offset: 1px;
}

.kc-field.has-error input,
.kc-field.has-error select,
.kc-field.has-error textarea {
	border-color: var(--kc-err);
	border-width: 2px;
}

.kc-field.has-error > label,
.kc-field.has-error .kc-group > legend {
	color: #ffd0d3;
}

/* Radio and checkbox cards */
.kc-options {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.kc-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--kc-line);
	border-radius: var(--kc-radius);
	background: var(--kc-deep);
	color: var(--kc-text);
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.4;
	cursor: pointer;
}

.kc-option:hover {
	border-color: var(--kc-edge);
}

.kc-option input[type='checkbox'],
.kc-option input[type='radio'] {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--kc-red);
	cursor: pointer;
}

.kc-option:has(input:checked) {
	border-color: var(--kc-blue);
	background: #0d1a27;
}

.kc-option:has(input:focus-visible) {
	outline: 3px solid var(--kc-blue-2);
	outline-offset: 2px;
}

.kc-option span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.kc-field.has-error .kc-option {
	border-color: var(--kc-err);
}

/* A lone checkbox (acknowledgement, "not sure"…) uses the full width. */
.kc-field > .kc-option {
	display: flex;
}

/* Files */
.kc-file input[type='file'] {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 10px;
	border: 1px dashed var(--kc-edge);
	border-radius: var(--kc-radius);
	background: var(--kc-deep);
	color: var(--kc-dim);
	font: inherit;
	font-size: 0.95rem;
	cursor: pointer;
}

.kc-file input[type='file']::file-selector-button {
	margin: 0 12px 0 0;
	padding: 9px 16px;
	border: 1px solid var(--kc-edge);
	border-radius: var(--kc-radius);
	background: var(--kc-bg-2);
	color: var(--kc-text);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.kc-file input[type='file']:hover::file-selector-button {
	border-color: var(--kc-text);
}

.kc-filelist {
	margin: 8px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
	font-size: 0.92rem;
}

.kc-filelist:empty {
	display: none;
}

.kc-filelist li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: 0 !important;
	padding: 6px 0 !important;
	border-bottom: 1px solid var(--kc-line);
	overflow-wrap: anywhere;
}

.kc-filelist li.kc-filelist-clear {
	border-bottom: 0;
}

/* ------------------------------------------------------------------ *
 * Actions, summaries, notices
 * ------------------------------------------------------------------ */

.kc-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 26px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid var(--kc-line);
}

.kc-actions .kc-btn-primary {
	margin-left: auto;
}

.kc-summary-err {
	margin: 0 0 22px;
	padding: 14px 18px;
	border: 1px solid var(--kc-err);
	border-left-width: 5px;
	border-radius: var(--kc-radius);
	background: #2a1317;
	color: #ffe3e5;
}

.kc-summary-err p {
	margin: 0 0 6px !important;
}

.kc-summary-err ul {
	margin: 0 !important;
	padding: 0 0 0 20px !important;
	list-style: disc !important;
}

.kc-summary-err li {
	margin: 4px 0 !important;
}

.kc-summary-err a {
	color: #fff;
	font-weight: 600;
}

.kc-notice {
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 1px solid var(--kc-line);
	border-left: 4px solid var(--kc-blue);
	border-radius: var(--kc-radius);
	background: var(--kc-bg-2);
	color: var(--kc-text);
	font-size: 0.92rem;
}

.kc-callout {
	margin: 0 0 20px;
	padding: 16px 20px;
	border: 1px solid var(--kc-line);
	border-left: 4px solid var(--kc-blue);
	border-radius: var(--kc-radius);
	background: var(--kc-bg-2);
	color: var(--kc-text);
}

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

.kc-callout.kc-legal {
	border-left-color: var(--kc-warn);
	font-size: 0.93rem;
}

.kc-callout.kc-pay {
	border-left-color: var(--kc-red);
	background: #1f1416;
}

.kc-ok {
	margin: 14px 0 0 !important;
	padding: 10px 14px;
	border: 1px solid var(--kc-ok);
	border-left-width: 4px;
	border-radius: var(--kc-radius);
	background: #0f1d16;
	color: #d6f5e1;
	font-weight: 600;
}

/* Success panel (after submit) */
.kc-success {
	padding: clamp(18px, 3vw, 30px);
	border: 1px solid var(--kc-ok);
	border-left-width: 5px;
	border-radius: var(--kc-radius);
	background: #0f1d16;
	color: #e5f7ec;
}

.kc-success:focus {
	outline: none;
}

.kc-success:focus-visible {
	outline: 3px solid var(--kc-blue-2);
	outline-offset: 3px;
}

.kc-success h2,
.kc-success h3 {
	margin: 0 0 10px;
	color: #fff;
	font-family: var(--kc-display);
	font-size: clamp(1.5rem, 3.4vw, 2rem);
	font-weight: 800;
	letter-spacing: 0.01em;
	line-height: 1.1;
	text-transform: uppercase;
}

.kc-success-ref {
	margin: 0 0 14px !important;
	color: #fff;
	font-family: var(--kc-mono);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ *
 * Review step
 * ------------------------------------------------------------------ */

.kc-review {
	margin: 0 0 22px;
}

.kc-review-group {
	margin: 0 0 14px;
	border: 1px solid var(--kc-line);
	border-radius: var(--kc-radius);
	background: var(--kc-deep);
}

.kc-review-group h3 {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	margin: 0;
	padding: 8px 8px 8px 16px;
	border-bottom: 1px solid var(--kc-line);
	color: var(--kc-text);
	font-family: var(--kc-mono);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.kc-review-group dl {
	display: grid;
	grid-template-columns: minmax(120px, 190px) 1fr;
	gap: 6px 18px;
	margin: 0;
	padding: 12px 16px;
}

.kc-review-group dt {
	color: var(--kc-dim);
	font-size: 0.88rem;
}

.kc-review-group dd {
	margin: 0;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

/* ------------------------------------------------------------------ *
 * Customer dashboard
 * ------------------------------------------------------------------ */

.kc-dash {
	max-width: 960px;
}

.kc-dash-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 22px;
	padding: 0 0 18px;
	border-bottom: 1px solid var(--kc-line);
}

.kc-dash-head p {
	margin: 0;
	color: var(--kc-dim);
}

.kc-dash-head strong {
	color: var(--kc-text);
}

.kc-dash-links {
	margin: 0 0 22px;
}

.kc-order {
	margin: 0 0 26px;
	padding: clamp(16px, 2.6vw, 28px);
	border: 1px solid var(--kc-line);
	border-top: 3px solid var(--kc-red);
	border-radius: var(--kc-radius);
	background: var(--kc-bg);
}

.kc-order-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin: 0 0 4px;
}

.kc-order-head h3 {
	margin: 0;
	color: var(--kc-text);
	font-family: var(--kc-display);
	font-size: clamp(1.3rem, 2.6vw, 1.7rem);
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.kc-order-meta {
	margin: 0 0 18px !important;
	color: var(--kc-dim);
	font-size: 0.88rem;
}

/* Status pills (customer dashboard) */
.kc-dash .kc-pill {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--kc-edge);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	color: #d5d9dc;
	font-family: var(--kc-mono);
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.kc-dash .kc-pill-new,
.kc-dash .kc-pill-review,
.kc-dash .kc-pill-building {
	border-color: var(--kc-blue);
	background: rgba(46, 155, 255, 0.16);
	color: var(--kc-blue-2);
}

.kc-dash .kc-pill-quoted,
.kc-dash .kc-pill-revision {
	border-color: #d9a21b;
	background: rgba(255, 190, 40, 0.14);
	color: var(--kc-warn);
}

.kc-dash .kc-pill-delivered {
	border-color: #3fae6b;
	background: rgba(63, 174, 107, 0.16);
	color: #8ee3ab;
}

.kc-dash .kc-pill-cancelled {
	border-color: var(--kc-red);
	background: rgba(216, 31, 42, 0.16);
	color: #ff9ca2;
}

/* Order progress */
.kc-order .kc-progress {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0;
	margin: 0 0 22px !important;
	padding: 0 !important;
	list-style: none !important;
	counter-reset: kc-p;
}

.kc-order .kc-progress li {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	padding: 0 4px !important;
	color: var(--kc-dim);
	font-size: 0.78rem;
	line-height: 1.25;
	text-align: center;
}

/* connector between dots */
.kc-order .kc-progress li:not(:first-child)::before {
	content: '';
	position: absolute;
	top: 9px;
	right: 50%;
	width: 100%;
	height: 2px;
	background: var(--kc-line);
	z-index: 0;
}

.kc-order .kc-progress li.is-done:not(:first-child)::before,
.kc-order .kc-progress li.is-current:not(:first-child)::before {
	background: var(--kc-blue);
}

.kc-progress-dot {
	position: relative;
	z-index: 1;
	display: block;
	width: 20px;
	height: 20px;
	border: 2px solid var(--kc-edge);
	border-radius: 50%;
	background: var(--kc-bg);
}

.kc-order .kc-progress li.is-done .kc-progress-dot {
	border-color: var(--kc-blue);
	background: var(--kc-blue);
}

.kc-order .kc-progress li.is-current .kc-progress-dot {
	border-color: var(--kc-red);
	background: var(--kc-red);
	box-shadow: 0 0 0 4px rgba(216, 31, 42, 0.25);
}

.kc-order .kc-progress li.is-current {
	color: var(--kc-text);
	font-weight: 700;
}

/* Blocks inside an order */
.kc-block {
	margin: 0 0 4px;
	padding: 14px 0;
	border-top: 1px solid var(--kc-line);
}

.kc-block h4 {
	margin: 0 0 10px;
	color: var(--kc-text);
	font-family: var(--kc-mono);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.kc-block > summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: -14px 0 0;
	padding: 14px 0 12px;
	color: var(--kc-text);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.kc-block > summary::-webkit-details-marker {
	display: none;
}

.kc-block > summary::before {
	content: '+';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	margin: 0 12px 0 0;
	border: 1px solid var(--kc-edge);
	border-radius: var(--kc-radius);
	color: var(--kc-blue-2);
	font-family: var(--kc-mono);
	font-weight: 600;
	line-height: 1;
}

.kc-block[open] > summary::before {
	content: '\2212';
}

.kc-block > summary:hover {
	color: #fff;
}

.kc-files {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.kc-files li {
	margin: 0 !important;
	padding: 12px 0 !important;
	border-bottom: 1px solid var(--kc-line);
	overflow-wrap: anywhere;
}

.kc-files li:last-child {
	border-bottom: 0;
}

.kc-files .kc-btn {
	margin-top: 8px;
}

.kc-files-plain li {
	padding: 6px 0 !important;
}

.kc-locked {
	display: inline-block;
	margin-top: 6px;
	color: var(--kc-warn);
	font-size: 0.92rem;
	font-weight: 600;
}

.kc-dl {
	display: grid;
	grid-template-columns: minmax(120px, 190px) 1fr;
	gap: 8px 18px;
	margin: 0 0 14px;
	padding: 0;
}

.kc-dl dt {
	color: var(--kc-dim);
	font-size: 0.88rem;
}

.kc-dl dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.kc-log {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	font-size: 0.93rem;
}

.kc-log li {
	margin: 0 !important;
	padding: 7px 0 !important;
	border-bottom: 1px solid var(--kc-line);
}

.kc-log li:last-child {
	border-bottom: 0;
}

.kc-revision .kc-form {
	margin-top: 4px;
}

/* Sign-in prompt */
.kc-login {
	max-width: 420px;
	margin: 0 0 18px;
	padding: 22px;
	border: 1px solid var(--kc-line);
	border-top: 3px solid var(--kc-red);
	border-radius: var(--kc-radius);
	background: var(--kc-bg);
}

.kc-login form p {
	margin: 0 0 14px;
}

.kc-login label {
	display: block;
	margin: 0 0 6px;
	font-size: 0.92rem;
	font-weight: 600;
}

.kc-login input[type='text'],
.kc-login input[type='password'],
.kc-login input[type='email'] {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--kc-edge);
	border-radius: var(--kc-radius);
	background: var(--kc-deep);
	color: var(--kc-text);
	font: inherit;
	font-size: 1rem;
}

.kc-login input:focus {
	border-color: var(--kc-blue-2);
	outline: 3px solid var(--kc-blue-2);
	outline-offset: 1px;
}

.kc-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 400;
}

.kc-login .login-remember input {
	width: 20px;
	height: 20px;
	accent-color: var(--kc-red);
}

.kc-login input[type='submit'] {
	min-height: 48px;
	padding: 12px 24px;
	border: 2px solid var(--kc-red);
	border-radius: var(--kc-radius);
	background: var(--kc-red);
	color: #fff;
	font-family: var(--kc-display);
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.kc-login input[type='submit']:hover {
	border-color: var(--kc-red-2);
	background: var(--kc-red-2);
}

/* ------------------------------------------------------------------ *
 * Small screens
 * ------------------------------------------------------------------ */

@media (max-width: 720px) {
	/* Numbers only, plus the current step's name. */
	.kc-step-name {
		display: none;
	}

	.kc-steps li.is-current .kc-step-name {
		display: inline;
		max-width: 9em;
	}

	.kc-steps li:not(:last-child)::after {
		flex-basis: 6px;
		min-width: 6px;
		margin: 0 3px;
	}

	.kc-steps li {
		gap: 6px;
	}

	.kc-step-num {
		width: 28px;
		height: 28px;
	}
}

@media (max-width: 560px) {
	.kc-wizard,
	.kc-simple {
		padding: 16px;
	}

	.kc-options {
		grid-template-columns: 1fr;
	}

	.kc-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.kc-actions .kc-btn {
		width: 100%;
		margin-left: 0;
	}

	.kc-review-group dl,
	.kc-dl {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.kc-review-group dd,
	.kc-dl dd {
		margin-bottom: 10px;
	}

	.kc-dash-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.kc-dash-head .kc-btn {
		width: 100%;
	}

	/* Five stages are too wide in a row: stack them. */
	.kc-order .kc-progress {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.kc-order .kc-progress li {
		flex-direction: row;
		align-items: center;
		gap: 12px;
		padding: 0 !important;
		text-align: left;
		font-size: 0.9rem;
	}

	.kc-order .kc-progress li:not(:first-child)::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kc-wizard .kc-btn,
	.kc-simple .kc-btn,
	.kc-dash .kc-btn {
		transition: none;
	}
}

@media (forced-colors: active) {
	.kc-step-num,
	.kc-progress-dot {
		border: 2px solid CanvasText;
	}

	.kc-steps li.is-current .kc-step-num,
	.kc-order .kc-progress li.is-current .kc-progress-dot {
		background: Highlight;
		border-color: Highlight;
	}

	.kc-option:has(input:checked) {
		outline: 2px solid Highlight;
	}
}
