/**
 * Westphal Solutions: EPUB Metadata Editor (ws-epub)
 *
 * Owns everything under the `wsepub` prefix. Reads only brand tokens from
 * main.css, each with a fallback so the tool still paints if one is missing.
 *
 * One card on a paper band, the way the image optimizer sits. The card is
 * wider than the text column, so it breaks out of it. The band runs the
 * full width of the window without widening the page, which is what the
 * box-shadow and clip-path pair does.
 */

.wsepub {
	--wsepub-band: var(--ws-paper, #F5F6F2);
	--wsepub-soft: #FBFBF8;
	--wsepub-ok: var(--ws-success, #2C7A3F);
	--wsepub-ok-wash: var(--ws-success-wash, #E6F4E4);
	--wsepub-warn: var(--ws-warning, #8A6100);
	--wsepub-warn-wash: var(--ws-warning-wash, #FBF0CE);
	--wsepub-bad: var(--ws-error, #B01C1C);
	--wsepub-bad-wash: var(--ws-error-wash, #FBE4E2);
	--wsepub-pick: #EDF1F4;

	position: relative;
	margin: 0 0 40px;
	padding: 40px 0 32px;
	background: var(--wsepub-band);
	box-shadow: 0 0 0 100vmax var(--wsepub-band);
	clip-path: inset(0 -100vmax);
	font-family: var(--ws-font, 'Lato', Arial, sans-serif);
	color: var(--ws-text, #000000);
}
[data-theme="dark"] .wsepub {
	--wsepub-band: #18181A;
	--wsepub-soft: #2B2B30;
	--wsepub-ok: var(--ws-success, #6FD68C);
	--wsepub-ok-wash: var(--ws-success-wash, #1B3324);
	--wsepub-warn: var(--ws-warning, #F0B429);
	--wsepub-warn-wash: var(--ws-warning-wash, #3A2E12);
	--wsepub-bad: var(--ws-error, #F08A85);
	--wsepub-bad-wash: var(--ws-error-wash, #3D1B1A);
	--wsepub-pick: #2A3540;
}

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

/* A class with a display value outranks the browser rule for [hidden]. */
.wsepub [hidden] { display: none !important; }

/* Shield controls from theme button styles. */
.wsepub :where(button) {
	margin: 0;
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	-webkit-appearance: none;
	appearance: none;
}

/* main.css pads every list for prose. These are controls. */
.wsepub ul,
.wsepub ol { list-style: none; margin: 0; padding: 0; }

/* === Card === */
.wsepub__card {
	position: relative;
	width: min(1040px, calc(100vw - 32px));
	margin-left: 50%;
	transform: translateX(-50%);
	background: var(--ws-surface, #FFFFFF);
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
	box-shadow: 0 6px 24px rgba(82, 88, 91, 0.08);
	transition: border-color 0.2s var(--ws-ease, ease), box-shadow 0.2s var(--ws-ease, ease);
}
.wsepub__card.is-drag {
	border-color: var(--ws-accent, #C3DD22);
	box-shadow: 0 0 0 3px var(--ws-accent, #C3DD22);
}

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

/* === Step bar === */
.wsepub__steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	border-bottom: 1px solid var(--ws-border, #E5E5EA);
}
.wsepub__step { border-bottom: 3px solid transparent; margin-bottom: -1px; }
.wsepub__step.is-now { border-bottom-color: var(--ws-accent, #C3DD22); }
.wsepub__step-btn {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 22px;
	border: 0;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
}
.wsepub__step-btn:disabled { cursor: default; }
.wsepub__step-btn:not(:disabled):hover .wsepub__step-name { text-decoration: underline; text-decoration-color: var(--ws-accent, #C3DD22); text-underline-offset: 3px; }
.wsepub__step-btn:focus-visible { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: -2px; }
.wsepub__step-dot {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ws-grey, #A2AAAD);
	background: var(--ws-surface, #FFFFFF);
	color: var(--ws-heading, #000000);
	font-size: 14px;
	font-weight: 900;
}
.wsepub__step.is-now .wsepub__step-dot,
.wsepub__step.is-done .wsepub__step-dot {
	border-color: var(--ws-accent, #C3DD22);
	background: var(--ws-accent, #C3DD22);
	color: var(--ws-black, #000000);
}
.wsepub__step-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wsepub__step-name { font-size: 15px; font-weight: 900; color: var(--ws-muted, #52585B); }
.wsepub__step.is-now .wsepub__step-name,
.wsepub__step.is-done .wsepub__step-name { color: var(--ws-heading, #000000); }
.wsepub__step-sub { font-size: 12px; color: var(--ws-muted, #52585B); }

.wsepub__carry {
	margin: 0;
	padding: 11px 32px;
	border-bottom: 1px solid var(--ws-border, #E5E5EA);
	background: var(--wsepub-soft);
	font-size: 13px;
	color: var(--ws-muted, #52585B);
}

/* === Panels === */
.wsepub__panel { padding: 28px 32px 8px; }
.wsepub__intro { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.wsepub__h2 {
	margin: 0;
	font-size: 30px;
	font-weight: 900;
	line-height: 1.15;
	color: var(--ws-heading, #000000);
}
.wsepub__lede { margin: 0; max-width: 66ch; font-size: 16px; line-height: 1.5; color: var(--ws-muted, #52585B); }
.wsepub__sec { margin-top: 28px; }
.wsepub__sec:first-of-type { margin-top: 8px; }
.wsepub__sec-head {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}
.wsepub__h3 {
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--ws-accent, #C3DD22);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--ws-heading, #000000);
}
.wsepub__sec-note { font-size: 13px; color: var(--ws-muted, #52585B); }
.wsepub__mono { font-family: var(--ws-code, ui-monospace, Menlo, monospace); font-size: 0.86em; word-break: break-word; }

/* === Drop zone === */
.wsepub__drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 64px 24px;
	margin-bottom: 20px;
	border: 1.5px dashed var(--ws-grey, #A2AAAD);
	border-radius: var(--ws-radius, 3px);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s var(--ws-ease, ease), background-color 0.2s var(--ws-ease, ease);
}
.wsepub__drop:hover,
.wsepub__drop:focus-within { border-color: var(--ws-accent, #C3DD22); }
.wsepub__drop-ico { display: inline-flex; color: var(--ws-muted, #52585B); }
.wsepub__drop-ico svg { width: 52px; height: 52px; stroke-width: 1.4; }
.wsepub__drop-title { font-size: 22px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__drop-hint { font-size: 15px; color: var(--ws-muted, #52585B); }

/* With books in, it shrinks to a strip. Adding more is a small act. */
.wsepub__drop.is-small {
	flex-direction: row;
	justify-content: center;
	padding: 14px 18px;
	gap: 14px;
	text-align: left;
}
.wsepub__drop.is-small .wsepub__drop-ico svg { width: 22px; height: 22px; }
.wsepub__drop.is-small .wsepub__drop-title { font-size: 15px; }
.wsepub__drop.is-small .wsepub__drop-hint { display: none; }
.wsepub__drop.is-small .wsepub__btn { padding: 9px 14px; font-size: 11px; letter-spacing: 1.5px; }

/* === Book list, step 1 === */
.wsepub__list,
.wsepub__box,
.wsepub__acc,
.wsepub__files {
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
}
.wsepub__row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--ws-border, #E5E5EA);
}
.wsepub__row:last-child { border-bottom: 0; }
.wsepub__row-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wsepub__row-title { font-size: 16px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__row-sub { font-size: 13px; color: var(--ws-muted, #52585B); }
.wsepub__row-warn { font-size: 13px; font-weight: 700; color: var(--wsepub-warn); }
.wsepub__row-meta { flex: 0 0 auto; color: var(--ws-muted, #52585B); white-space: nowrap; }
.wsepub__listfoot { display: flex; justify-content: flex-start; padding: 14px 0 6px; }

.wsepub__thumb {
	flex: 0 0 auto;
	display: block;
	width: 30px;
	height: 45px;
	border-radius: var(--ws-radius-sm, 2px);
	object-fit: cover;
	background: var(--ws-border, #E5E5EA);
}
.wsepub__thumb--lg { width: 84px; height: 126px; }
.wsepub__thumb--none {
	background: repeating-linear-gradient(135deg, var(--ws-border, #E5E5EA) 0 6px, transparent 6px 12px);
	border: 1px solid var(--ws-border, #E5E5EA);
}

/* === Clean options === */
.wsepub__opt {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 14px 16px;
	border-bottom: 1px solid var(--ws-border, #E5E5EA);
}
.wsepub__opt:last-child { border-bottom: 0; }
.wsepub__opt--soft { background: var(--wsepub-soft); }
.wsepub__opt-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wsepub__opt-name { font-size: 15px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__opt-why { font-size: 13px; color: var(--ws-muted, #52585B); }
.wsepub__opt-count { flex: 0 0 auto; font-size: 13px; color: var(--ws-muted, #52585B); white-space: nowrap; }

/* Reads as a state at a glance, which a checkbox does not. */
.wsepub__switch { flex: 0 0 auto; position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.wsepub__switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wsepub__switch-track {
	position: relative;
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: var(--ws-border, #E5E5EA);
	transition: background-color 0.2s var(--ws-ease, ease);
}
.wsepub__switch-knob {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #FFFFFF;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
	transition: transform 0.2s var(--ws-ease, ease);
}
.wsepub__switch input:checked + .wsepub__switch-track { background: var(--ws-accent, #C3DD22); }
.wsepub__switch input:checked + .wsepub__switch-track .wsepub__switch-knob { transform: translateX(20px); }
.wsepub__switch input:focus-visible + .wsepub__switch-track { outline: 2px solid var(--ws-slate, #496D89); outline-offset: 2px; }

.wsepub__found { margin-top: 12px; font-size: 14px; }
.wsepub__found > summary {
	display: inline-block;
	padding: 4px 0;
	color: var(--ws-muted, #52585B);
	cursor: pointer;
	text-decoration: underline;
	text-decoration-color: var(--ws-accent, #C3DD22);
	text-underline-offset: 3px;
}
.wsepub__found-book { margin-top: 14px; padding: 12px 16px; background: var(--wsepub-soft); border-radius: var(--ws-radius, 3px); }
.wsepub__found-h { margin: 0 0 6px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__found-book li { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 4px 0; }
.wsepub__found-k { flex: 0 0 240px; font-size: 13px; }
.wsepub__found-v { flex: 1 1 260px; min-width: 0; color: var(--ws-muted, #52585B); }

/* === Fields === */
.wsepub__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px 20px;
}
.wsepub__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wsepub__field--wide { grid-column: 1 / -1; }
.wsepub__label { font-size: 13px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__hint { font-size: 12px; color: var(--ws-muted, #52585B); }
.wsepub__input {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
	background: var(--ws-bg, #FFFFFF);
	color: var(--ws-text, #000000);
	font-family: inherit;
	font-size: 15px;
}
.wsepub__input:focus-visible {
	outline: 0;
	border-color: var(--ws-accent, #C3DD22);
	box-shadow: 0 0 0 1px var(--ws-accent, #C3DD22);
}
.wsepub__input--area { resize: vertical; line-height: 1.5; }
.wsepub__input.is-mixed { border-style: dashed; border-color: var(--ws-grey, #A2AAAD); }
.wsepub__input.is-mixed::placeholder { font-style: italic; }
.wsepub__inline { display: flex; gap: 8px; }

.wsepub__authors { display: flex; flex-direction: column; gap: 8px; }
.wsepub__author { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 8px; }
.wsepub__mixed {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 10px 12px;
	border: 1px dashed var(--ws-grey, #A2AAAD);
	border-radius: var(--ws-radius, 3px);
	font-size: 14px;
	color: var(--ws-muted, #52585B);
}

/* === Accordion, step 3 === */
.wsepub__acc-item { border-bottom: 1px solid var(--ws-border, #E5E5EA); }
.wsepub__acc-item:last-child { border-bottom: 0; }
.wsepub__acc-head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	border: 0;
	background: var(--ws-surface, #FFFFFF);
	color: inherit;
	text-align: left;
	cursor: pointer;
}
.wsepub__acc-item.is-open .wsepub__acc-head { background: var(--wsepub-soft); }
.wsepub__acc-head:focus-visible { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: -2px; }
.wsepub__acc-num { flex: 0 0 36px; color: var(--ws-muted, #52585B); }
.wsepub__acc-title { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wsepub__tag {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--wsepub-warn-wash);
	color: var(--wsepub-warn);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}
.wsepub__chev { flex: 0 0 auto; display: inline-flex; color: var(--ws-muted, #52585B); transition: transform 0.2s var(--ws-ease, ease); }
.wsepub__acc-item.is-open .wsepub__chev { transform: rotate(180deg); }
.wsepub__acc-body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 6px 16px 20px 80px;
	background: var(--wsepub-soft);
}
.wsepub__acc-body .wsepub__input { background: var(--ws-surface, #FFFFFF); }
.wsepub__acc-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.wsepub__saves { color: var(--ws-heading, #000000); }

.wsepub__cover {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: flex-start;
	padding: 16px;
	background: var(--ws-surface, #FFFFFF);
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
}
.wsepub__cover.is-warn { border-color: var(--wsepub-warn); }
.wsepub__cover-txt { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.wsepub__cover-h { font-size: 15px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__cover-p { font-size: 14px; color: var(--ws-muted, #52585B); }
.wsepub__cover-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.wsepub__cover-msg { font-size: 13px; color: var(--ws-text, #000000); }
.wsepub__cover-msg.is-error { color: var(--wsepub-bad); font-weight: 700; }

.wsepub__batchcover {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	align-items: center;
	margin-bottom: 12px;
	padding: 12px 14px;
	background: var(--wsepub-warn-wash);
	border-radius: var(--ws-radius, 3px);
	font-size: 14px;
}
.wsepub__batchcover > span { flex: 1 1 320px; }

/* === Step 4 === */
.wsepub__fixes {
	margin-bottom: 24px;
	border: 1px solid var(--wsepub-warn);
	border-radius: var(--ws-radius, 3px);
	background: var(--wsepub-warn-wash);
}
.wsepub__fixes > .wsepub__opt-why,
.wsepub__fixes-h { margin: 0; padding: 0 16px; }
.wsepub__fixes-h { padding-top: 14px; font-size: 15px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__fixes > .wsepub__opt-why { padding-bottom: 6px; }
.wsepub__fixes .wsepub__opt { border-bottom: 0; border-top: 1px solid rgba(138, 97, 0, 0.25); }

.wsepub__recap {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	align-items: baseline;
	padding: 13px 16px;
	border-bottom: 1px solid var(--ws-border, #E5E5EA);
}
.wsepub__recap:last-child { border-bottom: 0; }
.wsepub__recap-k { flex: 0 0 140px; font-size: 14px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__recap-v { flex: 1 1 360px; min-width: 0; font-size: 14px; color: var(--ws-muted, #52585B); }

.wsepub__file-row { padding: 11px 16px; border-bottom: 1px solid var(--ws-border, #E5E5EA); }
.wsepub__file-row:last-child { border-bottom: 0; }
.wsepub__file-top { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.wsepub__file-name { flex: 1 1 420px; min-width: 0; font-size: 13px; }
.wsepub__state { font-size: 13px; font-weight: 700; }
.wsepub__state.is-ok { color: var(--wsepub-ok); }
.wsepub__state.is-note { color: var(--wsepub-warn); }
.wsepub__state.is-bad { color: var(--wsepub-bad); }
.wsepub__problem {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	margin-top: 10px;
	padding: 10px 12px;
	border-left: 3px solid var(--wsepub-bad);
	background: var(--wsepub-bad-wash);
}
.wsepub__problem-h { font-size: 14px; font-weight: 700; color: var(--ws-heading, #000000); }
.wsepub__problem-p { font-size: 13px; color: var(--ws-text, #000000); }
.wsepub__where { font-size: 12px; color: var(--ws-muted, #52585B); }
.wsepub__where summary { cursor: pointer; }
.wsepub__where ul { margin-top: 4px; padding-left: 1em; }
.wsepub__where li { padding: 2px 0; word-break: break-word; }
.wsepub__ec { margin-top: 8px; font-size: 13px; color: var(--ws-muted, #52585B); }
.wsepub__ec.is-bad { color: var(--wsepub-bad); }

.wsepub__second {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	align-items: center;
	margin-top: 20px;
	padding: 16px;
	border: 1px dashed var(--ws-grey, #A2AAAD);
	border-radius: var(--ws-radius, 3px);
}

.wsepub__dl {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 24px 0 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.wsepub__dl-h {
	float: left;
	margin-right: 6px;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--ws-muted, #52585B);
}
.wsepub__dl-opt { position: relative; cursor: pointer; }
.wsepub__dl-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wsepub__dl-opt span {
	display: block;
	padding: 10px 16px;
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
	font-size: 14px;
	font-weight: 700;
	color: var(--ws-muted, #52585B);
}
.wsepub__dl-opt input:checked + span {
	border-color: var(--ws-slate, #496D89);
	background: var(--wsepub-pick);
	color: var(--ws-heading, #000000);
}
.wsepub__dl-opt input:focus-visible + span { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: 2px; }
.wsepub__savenote { display: block; margin: 12px 0 0; }

.wsepub__saved {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin-bottom: 24px;
	padding: 16px 18px;
	border-radius: var(--ws-radius, 3px);
	background: var(--wsepub-ok-wash);
}
.wsepub__saved-ico {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ws-accent, #C3DD22);
	color: var(--ws-black, #000000);
}
.wsepub__saved-txt { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.wsepub__saved-h { font-size: 16px; font-weight: 900; color: var(--ws-heading, #000000); }
.wsepub__saved-p { font-size: 13px; color: var(--ws-muted, #52585B); font-family: var(--ws-code, monospace); word-break: break-word; }

/* === Status and footer === */
.wsepub__status {
	margin: 0;
	padding: 0 32px 4px;
	font-size: 14px;
	color: var(--ws-muted, #52585B);
	white-space: pre-line;
}
.wsepub__status.is-error { color: var(--wsepub-bad); font-weight: 700; }

.wsepub__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 16px;
	align-items: center;
	padding: 20px 32px 24px;
	border-top: 1px solid var(--ws-border, #E5E5EA);
	margin-top: 24px;
}
.wsepub__foot-note { font-size: 14px; color: var(--ws-muted, #52585B); }
.wsepub__spacer { flex: 1 1 auto; }

.wsepub__private {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
	margin: 16px 0 0;
	font-size: 14px;
	color: var(--ws-muted, #52585B);
}
.wsepub__private svg { width: 14px; height: 14px; }

/* === Buttons === */
.wsepub__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 22px;
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
	background: var(--ws-surface, #FFFFFF);
	color: var(--ws-heading, #000000);
	font-family: inherit;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 2px;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s var(--ws-ease, ease), border-color 0.2s var(--ws-ease, ease), color 0.2s var(--ws-ease, ease);
}
.wsepub__btn svg,
.wsepub__btn .wsepub__ico svg { width: 16px; height: 16px; }
.wsepub__btn--primary {
	border-color: var(--ws-accent, #C3DD22);
	background: var(--ws-accent, #C3DD22);
	color: var(--ws-black, #000000);
	letter-spacing: 2.5px;
}
.wsepub__btn--primary:hover:not(:disabled) {
	background: var(--ws-heading, #000000);
	border-color: var(--ws-heading, #000000);
	color: var(--ws-bg, #FFFFFF);
}
.wsepub__btn--ghost:hover:not(:disabled) { border-color: var(--ws-heading, #000000); }
.wsepub__btn--strong { border-color: var(--ws-heading, #000000); }
.wsepub__btn.is-save svg { display: none; }
.wsepub__btn--sm { padding: 9px 14px; font-size: 11px; letter-spacing: 1.2px; }
.wsepub__btn:disabled { opacity: 0.45; cursor: not-allowed; }
.wsepub__btn:focus-visible { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: 2px; }
/* An anchor dressed as a button. main.css underlines bare links. */
a.wsepub__btn { text-decoration: none; background-image: none; }

.wsepub__ico { display: inline-flex; }
.wsepub__ico svg { width: 16px; height: 16px; }

.wsepub__iconbtn {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ws-border, #E5E5EA);
	border-radius: var(--ws-radius, 3px);
	background: var(--ws-surface, #FFFFFF);
	color: var(--ws-muted, #52585B);
	cursor: pointer;
}
.wsepub__iconbtn:hover { border-color: var(--ws-heading, #000000); color: var(--ws-heading, #000000); }
.wsepub__iconbtn:focus-visible { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: 2px; }

.wsepub__linkbtn {
	align-self: flex-start;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--ws-muted, #52585B);
	font-family: inherit;
	font-size: 14px;
	text-decoration: underline;
	text-decoration-color: var(--ws-accent, #C3DD22);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	cursor: pointer;
}
.wsepub__linkbtn:hover { color: var(--ws-heading, #000000); }
.wsepub__linkbtn:focus-visible { outline: 2px solid var(--ws-accent, #C3DD22); outline-offset: 2px; }

/* === Phone === */
@media (max-width: 640px) {
	.wsepub { padding-top: 24px; }
	.wsepub__panel { padding: 22px 18px 4px; }
	.wsepub__carry,
	.wsepub__status { padding-left: 18px; padding-right: 18px; }
	.wsepub__foot { padding: 18px; }
	.wsepub__foot .wsepub__btn--primary { width: 100%; }
	.wsepub__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wsepub__step-btn { padding: 12px 14px; gap: 10px; }
	.wsepub__step-sub { display: none; }
	.wsepub__h2 { font-size: 24px; }
	.wsepub__drop { padding: 40px 18px; }
	.wsepub__drop.is-small { flex-wrap: wrap; }
	.wsepub__row { flex-wrap: wrap; gap: 10px 14px; }
	.wsepub__row-meta { order: 3; flex-basis: 100%; padding-left: 44px; }
	.wsepub__acc-body { padding: 6px 14px 18px; }
	.wsepub__acc-num { flex-basis: 28px; }
	.wsepub__acc-head { flex-wrap: wrap; row-gap: 6px; }
	.wsepub__tags { order: 5; flex-basis: 100%; justify-content: flex-start; padding-left: 86px; }
	.wsepub__author { grid-template-columns: 1fr 40px; }
	.wsepub__author > .wsepub__input:first-child { grid-column: 1 / -1; }
	.wsepub__opt { flex-wrap: wrap; }
	.wsepub__opt-txt { flex-basis: calc(100% - 64px); }
	.wsepub__opt-count { order: 3; flex-basis: 100%; }
}

/* Motion is decoration here. Nothing depends on it. */
@media (prefers-reduced-motion: reduce) {
	.wsepub__switch-knob,
	.wsepub__switch-track,
	.wsepub__chev,
	.wsepub__card { transition: none; }
}
