/* CPR — Comp Paid Right — dashboard styles.
   Everything is scoped under .mc-app so no theme rule leaks in or out.
   No web fonts: the type stack is native, which keeps first paint instant. */

.mc-app {
	--mc-accent: #4f46e5;
	--mc-bg: #ffffff;
	--mc-surface: #f8f9fb;
	--mc-surface-2: #f1f3f7;
	--mc-ink: #14161a;
	--mc-ink-2: #5b616e;
	--mc-ink-3: #8b909c;
	--mc-line: #e4e7ec;
	--mc-line-2: #d3d7df;
	--mc-ok-bg: #e9f7ef;
	--mc-ok-fg: #0f6b46;
	--mc-warn-bg: #fdf3e2;
	--mc-warn-fg: #8a5a08;
	--mc-bad-bg: #fdecec;
	--mc-bad-fg: #a32626;
	--mc-info-bg: #eef0fe;
	--mc-info-fg: #3b34a3;
	--mc-radius: 12px;
	--mc-radius-sm: 8px;
	--mc-gutter: 0px;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	color: var(--mc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.mc-app *,
.mc-app *::before,
.mc-app *::after {
	box-sizing: inherit;
}

/* The hidden attribute must always win, even over display:flex/grid rules below. */
.mc-app [hidden],
.mc-busy[hidden],
.mc-alert[hidden] {
	display: none !important;
}



/* Money input ----------------------------------------------------------- */

.mc-money {
	position: relative;
}

.mc-money__sign {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 13.5px;
	line-height: 1;
	color: var(--mc-ink-2);
	pointer-events: none;
}

/* Specific enough to beat the base .mc-app input rule further down the file —
   an equal-specificity selector lost the tie and the digits ran over the sign. */
.mc-app .mc-money input[type="text"] {
	padding-left: 23px;
	font-variant-numeric: tabular-nums;
}

.mc-hint--wide {
	display: block;
	max-width: 78ch;
	margin: 8px 0 0;
	line-height: 1.5;
}

/* Security check --------------------------------------------------------- */

.mc-captcha {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mc-captcha__q {
	flex: none;
	min-width: 84px;
	padding: 10px 12px;
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	background: var(--mc-surface-2);
	color: var(--mc-ink);
	font-size: 16px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.06em;
	text-align: center;
	user-select: none;
}

.mc-captcha__eq {
	color: var(--mc-ink-3);
	font-size: 15px;
	flex: none;
}

.mc-app .mc-captcha input[type="text"] {
	flex: 1;
	min-width: 0;
	text-align: center;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	padding: 10px 12px;
}

.mc-captcha__new {
	appearance: none;
	flex: none;
	width: 38px;
	height: 38px;
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	background: var(--mc-bg);
	color: var(--mc-ink-2);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease;
}

.mc-captcha__new:hover {
	background: var(--mc-surface-2);
	color: var(--mc-ink);
}

.mc-captcha.is-loading .mc-captcha__q {
	color: var(--mc-ink-3);
}

/* Honeypot: kept in the layout and focusable-adjacent so scripted fillers
   still find it, but pushed out of sight and out of the tab order. */
.mc-trap {
	position: absolute !important;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Modal ------------------------------------------------------------------ */

.mc-linkbtn {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: inherit;
	color: var(--mc-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.mc-linkbtn:hover {
	color: var(--mc-ink);
}

.mc-disclaimer__sep {
	margin: 0 6px;
	color: var(--mc-ink-3);
}

.mc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.mc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 14, 20, 0.5);
}

.mc-modal__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 620px;
	max-height: 86vh;
	background: var(--mc-bg);
	color: var(--mc-ink);
	border-radius: var(--mc-radius);
	box-shadow: 0 20px 60px rgba(10, 12, 20, 0.32);
	overflow: hidden;
}

.mc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--mc-line);
	flex: none;
}

.mc-modal__x {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--mc-ink-2);
	font-size: 22px;
	line-height: 1;
	padding: 2px 6px;
	border-radius: 6px;
	cursor: pointer;
}

.mc-modal__x:hover {
	background: var(--mc-surface-2);
	color: var(--mc-ink);
}

.mc-modal__body {
	padding: 4px 20px 16px;
	overflow-y: auto;
	font-size: 13.5px;
	line-height: 1.6;
	-webkit-overflow-scrolling: touch;
}

.mc-modal__body h4 {
	margin: 18px 0 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--mc-ink-3);
}

.mc-modal__body p {
	margin: 0 0 8px;
	color: var(--mc-ink);
}

.mc-modal__body ul {
	margin: 0 0 8px;
	padding-left: 18px;
}

.mc-modal__body li {
	margin-bottom: 4px;
}

.mc-modal__note {
	margin-top: 18px !important;
	padding-top: 12px;
	border-top: 1px solid var(--mc-line);
	font-size: 12px;
	color: var(--mc-ink-3) !important;
}

.mc-modal__foot {
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px;
	border-top: 1px solid var(--mc-line);
	background: var(--mc-surface);
	flex: none;
}

@media (max-width: 782px) {
	.mc-modal {
		padding: 0;
	}

	.mc-modal__box {
		max-width: none;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
	}
}

/* Resilience ------------------------------------------------------------
   Sites often hide theme chrome with blanket rules like `header { display:none
   !important }`. The dashboard's own regions are plain divs so those selectors
   cannot reach them, but these rules make certain: an !important declaration is
   still beaten by one with higher specificity, and .mc-app scoping guarantees it. */

.mc-app .mc-topbar {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.mc-app .mc-topbar__row,
.mc-app .mc-results__head,
.mc-app .mc-results__foot {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}

.mc-app,
.mc-app .mc-card,
.mc-app .mc-view:not([hidden]) {
	visibility: visible !important;
	opacity: 1 !important;
}

/* Full bleed -------------------------------------------------------------
   width:100% only fills the theme's content column, which is why this kept
   looking centred. These negative margins pull the dashboard out to the full
   viewport regardless of the wrapper's max-width. Margins are used rather
   than 100vw so the value is measured against the parent, and the page-level
   CSS that turns this on also clips horizontal overflow, since 100vw would
   otherwise include the scrollbar and cause a stray sideways scroll. */

.mc-app--full {
	--mc-gutter: clamp(14px, 2.5vw, 44px);
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: var(--mc-gutter);
	padding-right: var(--mc-gutter);
}

/* The sign-in card stays a readable width even in full bleed. */
.mc-app--full .mc-gate__card {
	max-width: 400px;
}

/* Logo ------------------------------------------------------------------ */

.mc-logo {
	display: block;
	height: auto;
}

.mc-logo text {
	font-family: inherit;
}

.mc-logo__word {
	font-size: 76px;
	font-weight: 700;
	letter-spacing: -1.5px;
	fill: var(--mc-ink);
}

.mc-logo__tag {
	font-size: 27px;
	font-weight: 500;
	letter-spacing: 0.5px;
	fill: var(--mc-ink-2);
}

.mc-logo--gate {
	width: 250px;
	margin: 0 auto 4px;
}

.mc-logo--bar {
	width: 248px;
	margin-left: -7px;
}

/* Visible to screen readers only. */
.mc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Sign-in gate --------------------------------------------------------- */

.mc-gate {
	display: grid;
	place-items: center;
	padding: 48px 16px;
}

.mc-gate__card {
	width: 100%;
	max-width: 400px;
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: 16px;
	padding: 32px 28px 22px;
	text-align: center;
	box-shadow: 0 10px 34px rgba(12, 16, 28, 0.07);
}

.mc-gate__card .mc-sub {
	margin-top: 10px;
}

.mc-gate__step {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

.mc-gate__label {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--mc-ink-2);
}

.mc-gate__card input {
	text-align: left;
	padding: 11px 12px;
	font-size: 15px;
}

.mc-gate__code {
	text-align: center !important;
	font-size: 22px !important;
	letter-spacing: 0.4em;
	font-variant-numeric: tabular-nums;
}

.mc-gate__btn {
	padding: 11px 16px;
	font-size: 14px;
	position: relative;
}

.mc-gate__back {
	align-self: center;
	font-size: 12.5px;
	color: var(--mc-ink-2);
}

.mc-gate__alert {
	margin-top: 16px;
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-radius: var(--mc-radius-sm);
	padding: 9px 12px;
	font-size: 13px;
	text-align: left;
}

.mc-gate__alert.is-ok {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-gate__foot {
	margin: 20px 0 0;
	font-size: 11.5px;
	color: var(--mc-ink-3);
}

/* Inline button spinner */

.mc-btn__spin {
	width: 13px;
	height: 13px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mc-spin 0.7s linear infinite;
	flex: none;
}

.mc-btn:not(.mc-btn--primary) .mc-btn__spin {
	border-color: var(--mc-line-2);
	border-top-color: var(--mc-accent);
}

/* Topbar identity ------------------------------------------------------- */

.mc-who {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mc-who__name {
	font-size: 13px;
	font-weight: 500;
	color: var(--mc-ink-2);
}

/* Sign out sat in a ghost button that only appeared on hover; it now has a
   visible resting state with real contrast. */
.mc-signout {
	background: var(--mc-accent);
	border-color: var(--mc-accent);
	color: #fff;
	font-weight: 500;
}

.mc-signout:hover {
	background: color-mix(in srgb, var(--mc-accent) 86%, #000);
	border-color: color-mix(in srgb, var(--mc-accent) 86%, #000);
	color: #fff;
}

/* Email report panel ---------------------------------------------------- */

.mc-mailer {
	padding: 14px 18px;
	border-bottom: 1px solid var(--mc-line);
	background: var(--mc-surface);
}

.mc-mailer__grid {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.mc-mailer__grid .mc-field {
	min-width: 150px;
	flex: 0 1 auto;
}

.mc-mailer__grid .mc-field--grow {
	flex: 1 1 200px;
}

.mc-mailer__verify {
	margin-top: 10px;
}

.mc-sender {
	margin-top: 8px;
	max-width: 460px;
}

.mc-sender__row {
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.mc-sender__row input {
	flex: 1;
}

/* General tool disclaimer ------------------------------------------------ */

.mc-disclaimer {
	margin: 34px 2px 4px;
	padding-top: 16px;
	border-top: 1px solid var(--mc-line);
	font-size: 12px;
	color: var(--mc-ink-3);
	text-align: center;
}

/* Typography ---------------------------------------------------------- */

.mc-app .mc-h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--mc-ink);
}

.mc-app .mc-h2 {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 600;
	color: var(--mc-ink);
}

.mc-app .mc-sub {
	margin: 0;
	font-size: 13px;
	color: var(--mc-ink-2);
}

.mc-app .mc-hint {
	font-size: 12px;
	color: var(--mc-ink-3);
}

/* Layout -------------------------------------------------------------- */

/* Header: mark centred on top, navigation on the row beneath it with the
   signed-in person sitting at the right of that same row. The bar keeps the
   page background — no tinted strip — and is separated by a hairline only. */
.mc-topbar {
	display: block;
	margin: 0 0 6px;
	padding: 4px 0 12px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-topbar .mc-topbar__brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	/* The mark and the identity block share one line at every width. */
	flex-wrap: nowrap;
}

.mc-topbar__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	flex-wrap: wrap;
	min-height: 34px;
}

.mc-topbar .mc-who {
	flex: 0 0 auto;
	margin-left: auto;
}

/* The tab strip owns its row now that the identity sits with the mark. */
.mc-topbar__row {
	position: relative;
}

/* Matches the specificity of `.mc-app .mc-sub` above, which sets
   margin: 0 on this same element — a single-class rule here was being
   outranked and silently dropped. One value, so mobile and desktop stay
   identical. */
.mc-app .mc-context {
	margin: 0 0 28px;
}

.mc-tabs {
	display: flex;
	flex: none;
	gap: 4px;
	background: var(--mc-surface-2);
	padding: 3px;
	border-radius: 10px;
}

.mc-tab {
	appearance: none;
	white-space: nowrap;
	border: 0;
	background: transparent;
	color: var(--mc-ink-2);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	padding: 7px 14px;
	border-radius: 7px;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease;
}

.mc-tab:hover {
	color: var(--mc-ink);
}

.mc-tab.is-active {
	background: var(--mc-bg);
	color: var(--mc-ink);
	box-shadow: 0 1px 2px rgba(16, 20, 30, 0.08);
}

.mc-card {
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	overflow: hidden;
	margin-bottom: 18px;
}

.mc-card > h3,
.mc-card > .mc-sub {
	padding-left: 18px;
	padding-right: 18px;
}

.mc-card > h3 {
	padding-top: 16px;
}

.mc-card > .mc-sub {
	padding-bottom: 14px;
}

.mc-grid {
	display: grid;
	gap: 14px;
}

.mc-grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Steps --------------------------------------------------------------- */

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

.mc-steps li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--mc-ink-3);
	counter-increment: mc-step;
}

.mc-steps li::before {
	content: counter(mc-step);
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid var(--mc-line-2);
	font-size: 11px;
	font-weight: 600;
}

.mc-steps li + li::after {
	content: "";
}

.mc-steps li + li {
	margin-left: 4px;
	padding-left: 16px;
	border-left: 1px solid var(--mc-line);
}

.mc-steps li.is-current {
	color: var(--mc-ink);
	font-weight: 500;
}

.mc-steps li.is-current::before {
	background: var(--mc-accent);
	border-color: var(--mc-accent);
	color: #fff;
}

.mc-steps li.is-done::before {
	content: "\2713";
	background: var(--mc-ok-bg);
	border-color: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

/* Drop zones ---------------------------------------------------------- */

.mc-drop {
	position: relative;
	border: 1.5px dashed var(--mc-line-2);
	border-radius: var(--mc-radius);
	background: var(--mc-surface);
	padding: 26px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	min-height: 148px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mc-drop:hover,
.mc-drop:focus-visible {
	border-color: var(--mc-accent);
	background: var(--mc-surface-2);
	outline: none;
}

.mc-drop.is-over {
	border-color: var(--mc-accent);
	background: var(--mc-info-bg);
}

.mc-drop.is-loaded {
	border-style: solid;
	border-color: var(--mc-ok-fg);
	background: var(--mc-bg);
	cursor: default;
	text-align: left;
}

.mc-drop__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
}

.mc-drop.is-loaded .mc-drop__body {
	display: none;
}

.mc-drop__icon {
	width: 26px;
	height: 26px;
	margin-bottom: 4px;
	border: 1.5px solid var(--mc-ink-3);
	border-radius: 5px;
	position: relative;
}

.mc-drop__icon::before {
	content: "";
	position: absolute;
	inset: auto 6px 5px 6px;
	height: 2px;
	background: var(--mc-ink-3);
	box-shadow: 0 -5px 0 var(--mc-ink-3);
}

.mc-drop__title {
	font-weight: 600;
	font-size: 14px;
}

.mc-drop__hint {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	max-width: 30ch;
}

.mc-drop__state {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	text-align: left;
}

.mc-drop__name {
	font-weight: 600;
	font-size: 14px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}

.mc-drop__meta {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	white-space: nowrap;
}

.mc-drop__clear {
	appearance: none;
	border: 0;
	background: var(--mc-surface-2);
	color: var(--mc-ink-2);
	width: 24px;
	height: 24px;
	border-radius: 6px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	flex: none;
}

.mc-drop__clear:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-progress {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 10px;
	height: 3px;
	background: var(--mc-surface-2);
	border-radius: 3px;
	overflow: hidden;
}

.mc-progress i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--mc-accent);
	transition: width 0.2s ease;
}

/* Controls ------------------------------------------------------------ */

.mc-runbar {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 0 6px;
}

.mc-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 160px;
	flex: 1;
}

.mc-field--sm {
	max-width: 132px;
	flex: none;
}

.mc-field label {
	font-size: 12px;
	font-weight: 500;
	color: var(--mc-ink-2);
}

.mc-app input[type="text"],
.mc-app input[type="number"],
.mc-app input[type="search"],
.mc-app input[type="date"],
.mc-app select,
.mc-app textarea {
	appearance: none;
	width: 100%;
	font: inherit;
	font-size: 13.5px;
	color: var(--mc-ink);
	background: var(--mc-bg);
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	padding: 8px 10px;
	line-height: 1.35;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.mc-app select {
	background-image: linear-gradient(45deg, transparent 50%, var(--mc-ink-3) 50%), linear-gradient(135deg, var(--mc-ink-3) 50%, transparent 50%);
	background-position: calc(100% - 15px) 51%, calc(100% - 10px) 51%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 28px;
}

.mc-app input:focus,
.mc-app select:focus,
.mc-app textarea:focus {
	outline: none;
	border-color: var(--mc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc-accent) 18%, transparent);
}

.mc-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--mc-ink);
	background: var(--mc-bg);
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
	padding: 8px 14px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.14s ease, border-color 0.14s ease, transform 0.06s ease;
	white-space: nowrap;
}

.mc-btn:hover {
	background: var(--mc-surface-2);
	color: var(--mc-ink);
}

.mc-btn:active {
	transform: scale(0.985);
}

.mc-btn:disabled,
.mc-btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

.mc-btn--primary {
	background: var(--mc-accent);
	border-color: var(--mc-accent);
	color: #fff;
}

.mc-btn--primary:hover {
	background: color-mix(in srgb, var(--mc-accent) 88%, #000);
	color: #fff;
}

.mc-btn--warn {
	border-color: var(--mc-bad-fg);
	color: var(--mc-bad-fg);
}

.mc-btn--warn:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-btn--ghost {
	border-color: transparent;
	background: transparent;
	padding: 6px 10px;
}

.mc-btn--sm {
	font-size: 12.5px;
	padding: 5px 10px;
}

/* Alerts and busy ----------------------------------------------------- */

.mc-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-radius: var(--mc-radius-sm);
	padding: 10px 14px;
	font-size: 13.5px;
	margin-bottom: 14px;
}

.mc-alert--ok {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-alert__text {
	flex: 1;
}

.mc-alert__close {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.mc-busy {
	position: fixed;
	inset: 0;
	background: rgba(12, 14, 20, 0.42);
	display: grid;
	place-items: center;
	z-index: 99999;
}

.mc-busy__box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--mc-bg);
	color: var(--mc-ink);
	border-radius: var(--mc-radius);
	padding: 16px 22px;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 12px 40px rgba(10, 12, 20, 0.28);
}

.mc-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--mc-line-2);
	border-top-color: var(--mc-accent);
	border-radius: 50%;
	animation: mc-spin 0.7s linear infinite;
}

@keyframes mc-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mc-app *,
	.mc-app *::before,
	.mc-app *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Mapping ------------------------------------------------------------- */

.mc-mapping {
	margin-top: 18px;
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	overflow: hidden;
}

.mc-mapping__head {
	padding: 14px 18px;
	background: var(--mc-surface);
	border-bottom: 1px solid var(--mc-line);
}

.mc-mapgroup {
	padding: 14px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-mapgroup:last-child {
	border-bottom: 0;
}

.mc-mapgroup__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 10px;
}

.mc-req {
	color: var(--mc-bad-fg);
	font-size: 11px;
	margin-left: 4px;
}

/* Summary cards ------------------------------------------------------- */

.mc-results__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 15px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-results__actions {
	display: flex;
	gap: 8px;
}

.mc-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	padding: 16px 18px;
}

.mc-stat {
	background: var(--mc-surface);
	border-radius: var(--mc-radius-sm);
	padding: 12px 14px;
}

.mc-stat__label {
	display: block;
	font-size: 12px;
	color: var(--mc-ink-2);
	margin-bottom: 3px;
}

.mc-stat__value {
	display: block;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.mc-stat--bad {
	background: var(--mc-bad-bg);
}

.mc-stat--bad .mc-stat__label,
.mc-stat--bad .mc-stat__value {
	color: var(--mc-bad-fg);
}

.mc-stat--warn {
	background: var(--mc-warn-bg);
}

.mc-stat--warn .mc-stat__label,
.mc-stat--warn .mc-stat__value {
	color: var(--mc-warn-fg);
}

/* Filters ------------------------------------------------------------- */

.mc-filters {
	padding: 0 18px 12px;
}

.mc-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.mc-pill {
	appearance: none;
	font: inherit;
	font-size: 12.5px;
	border: 1px solid var(--mc-line-2);
	background: var(--mc-bg);
	color: var(--mc-ink-2);
	border-radius: 999px;
	padding: 5px 12px;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.mc-pill:hover {
	border-color: var(--mc-ink-3);
	color: var(--mc-ink);
}

.mc-pill.is-active {
	background: var(--mc-ink);
	border-color: var(--mc-ink);
	color: var(--mc-bg);
}

.mc-pill b {
	font-weight: 500;
	opacity: 0.7;
	margin-left: 4px;
}

.mc-filters__row {
	display: flex;
	gap: 10px;
}

.mc-filters__row input[type="search"] {
	flex: 1;
}

.mc-filters__row select {
	max-width: 200px;
}

/* Table --------------------------------------------------------------- */

.mc-table-wrap {
	overflow-x: auto;
	border-top: 1px solid var(--mc-line);
}

.mc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.mc-table th {
	text-align: left;
	font-weight: 500;
	font-size: 12px;
	color: var(--mc-ink-2);
	padding: 9px 10px;
	background: var(--mc-surface);
	border-bottom: 1px solid var(--mc-line);
	white-space: nowrap;
	position: sticky;
	top: 0;
	z-index: 1;
}

.mc-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--mc-line);
	vertical-align: middle;
}

.mc-table .mc-num,
.mc-table td.mc-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.mc-table .mc-col-order {
	width: 108px;
}

.mc-table .mc-col-cat {
	width: 150px;
}

.mc-table .mc-col-status {
	width: 128px;
}

.mc-row {
	cursor: pointer;
	transition: background 0.1s ease;
}

.mc-row:hover {
	background: var(--mc-surface);
}

.mc-row.is-open {
	background: var(--mc-surface);
}

.mc-mono {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 12.5px;
}

.mc-truncate {
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}

.mc-neg {
	color: var(--mc-bad-fg);
	font-weight: 600;
}

.mc-pos {
	color: var(--mc-ok-fg);
	font-weight: 600;
}

.mc-muted {
	color: var(--mc-ink-3);
}

.mc-tag {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 500;
	padding: 3px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

.mc-tag--paid {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-tag--underpaid,
.mc-tag--not_paid {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-tag--overpaid,
.mc-tag--chargeback {
	background: var(--mc-warn-bg);
	color: var(--mc-warn-fg);
}

.mc-tag--informational,
.mc-tag--payout_only {
	background: var(--mc-info-bg);
	color: var(--mc-info-fg);
}

.mc-tag--no_recon {
	background: var(--mc-surface-2);
	color: var(--mc-ink-2);
}

/* Row drawer ---------------------------------------------------------- */

.mc-drawer td {
	background: var(--mc-surface);
	padding: 0 10px 14px;
}

.mc-drawer__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	padding: 12px 8px 4px;
}

.mc-drawer h4 {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mc-ink-3);
}

.mc-kv {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 3px 10px;
	font-size: 12.5px;
}

.mc-kv dt {
	color: var(--mc-ink-2);
	white-space: nowrap;
}

.mc-kv dd {
	margin: 0;
	color: var(--mc-ink);
	word-break: break-word;
}

.mc-why {
	grid-column: 1 / -1;
	background: var(--mc-bg);
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius-sm);
	padding: 10px 12px;
	font-size: 13px;
	color: var(--mc-ink);
}

.mc-esc {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.mc-esc select {
	max-width: 150px;
}

.mc-esc input[type="text"] {
	flex: 1;
	min-width: 180px;
}

/* Footer -------------------------------------------------------------- */

.mc-results__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 11px 18px;
	border-top: 1px solid var(--mc-line);
	font-size: 12.5px;
	color: var(--mc-ink-2);
}

.mc-recap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mc-recap.is-ok {
	color: var(--mc-ok-fg);
}

.mc-recap.is-off {
	color: var(--mc-warn-fg);
}

.mc-pager {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* Informational ------------------------------------------------------- */

.mc-info__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 18px;
	border-top: 1px solid var(--mc-line);
	font-size: 13px;
}

.mc-info__row strong {
	font-weight: 600;
}

.mc-info__row p {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--mc-ink-2);
	max-width: 62ch;
}

.mc-info__amt {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}

/* History ------------------------------------------------------------- */

.mc-hist {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 13px 18px;
	border-top: 1px solid var(--mc-line);
	flex-wrap: wrap;
}

.mc-hist__main {
	flex: 1;
	min-width: 200px;
}

.mc-hist__title {
	font-weight: 600;
	font-size: 14px;
}

.mc-hist__meta {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	margin-top: 2px;
}

.mc-hist__nums {
	display: flex;
	gap: 18px;
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

.mc-hist__nums span b {
	display: block;
	font-size: 14px;
	font-weight: 600;
}

.mc-hist__actions {
	display: flex;
	gap: 6px;
}

/* Rates --------------------------------------------------------------- */

.mc-rates__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 16px 18px 14px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-rates__actions {
	display: flex;
	gap: 16px;
	align-items: center;
}

.mc-rates__actions select {
	min-width: 220px;
	/* Capped rather than left to grow, so it cannot fill the whole row and
	   crowd the button against it on a wide screen -- the gap above is
	   otherwise only as wide as whatever space happens to be left over. */
	flex: 1 1 420px;
	max-width: 520px;
}

.mc-rates__actions .mc-btn {
	/* Keeps its full label and the gap next to it, rather than being
	   compressed toward the select as the row's remaining space shrinks. */
	flex-shrink: 0;
}

/* No panel of its own -- same white as the rest of the card, separated by
   a single thin rule rather than a block of grey. A boxed-off area read as
   a distinct, separate thing sitting inside the step; this is still part
   of step 1, just organised into its own fields. */
.mc-schedule-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
	padding: 18px 0 4px;
	margin-top: 14px;
	border-top: 1px solid var(--mc-line);
}

.mc-ratedrop {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 18px;
	border-bottom: 1px solid var(--mc-line);
}

.mc-rules {
	padding: 4px 0;
}

.mc-rule {
	border-bottom: 1px solid var(--mc-line);
	padding: 12px 18px;
}

.mc-rule__top {
	display: grid;
	grid-template-columns: minmax(120px, 0.7fr) minmax(200px, 1.6fr) 130px 110px auto;
	gap: 8px;
	align-items: end;
}

.mc-rule__conds {
	margin-top: 10px;
	padding-left: 12px;
	border-left: 2px solid var(--mc-line-2);
}

.mc-cond {
	display: grid;
	grid-template-columns: 140px 150px 1fr auto;
	gap: 6px;
	margin-bottom: 6px;
	align-items: center;
}

.mc-rule__note {
	margin-top: 8px;
}

.mc-rules__foot {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 18px;
	background: var(--mc-surface);
}

.mc-x {
	appearance: none;
	border: 1px solid var(--mc-line-2);
	background: var(--mc-bg);
	color: var(--mc-ink-2);
	width: 30px;
	height: 32px;
	border-radius: var(--mc-radius-sm);
	cursor: pointer;
	font-size: 15px;
	line-height: 1;
}

.mc-x:hover {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
	border-color: var(--mc-bad-bg);
}

/* Empty and locked ---------------------------------------------------- */

.mc-empty {
	padding: 30px 18px;
	text-align: center;
	color: var(--mc-ink-3);
	font-size: 13.5px;
}

.mc-locked {
	padding: 26px 22px;
	text-align: center;
}

.mc-app--locked {
	max-width: 520px;
}

/* Mobile -------------------------------------------------------------- */

@media (max-width: 782px) {
	/* Header: one aligned row — compact mark on the left, the signed-in
	   person on the right, both on the same centreline. */
	.mc-topbar {
		padding-bottom: 8px;
	}

	.mc-topbar .mc-topbar__brand {
		margin-bottom: 10px;
		gap: 10px;
		flex-wrap: nowrap;
	}

	.mc-topbar .mc-topbar__brand .mc-who {
		width: auto;
		flex: 0 0 auto;
	}

	.mc-logo--bar {
		width: 176px;
		margin-left: -5px;
	}

	.mc-who {
		gap: 8px;
		min-width: 0;
	}

	.mc-who__name {
		font-size: 13px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 42vw;
	}

	.mc-signout {
		border-radius: 999px;
		padding: 8px 14px;
		white-space: nowrap;
	}

	/* Tabs: a single swipeable row of pills. The strip bleeds to the screen
	   edges so the first and last pill sit flush with the content margin,
	   and a fade on the right tells the thumb there is more to reach. */
	.mc-topbar__row {
		gap: 10px;
		margin: 0 -16px;
		padding: 0;
	}

	.mc-topbar .mc-topbar__row .mc-tabs {
		max-width: none;
		flex: 1 1 auto;
		gap: 8px;
		background: transparent;
		padding: 2px 16px 4px;
		border-radius: 0;
		/* Must not wrap: the row scrolls sideways instead. */
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
	}

	.mc-topbar .mc-topbar__row .mc-tabs::-webkit-scrollbar {
		display: none;
	}

	.mc-topbar .mc-topbar__row .mc-tab {
		flex: 0 0 auto;
		scroll-snap-align: start;
		background: var(--mc-surface-2);
		color: var(--mc-ink-2);
		/* Sized to sit level with the body text around them rather than
		   dominating the top of the screen. */
		font-size: 13px;
		font-weight: 600;
		padding: 8px 14px;
		border-radius: 999px;
		box-shadow: none;
		min-height: 36px;
	}

	.mc-topbar .mc-topbar__row .mc-tab.is-active {
		background: var(--mc-accent);
		color: #fff;
		box-shadow: 0 4px 12px rgba(83, 70, 232, 0.3);
	}

	.mc-topbar__row::after {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 36px;
		background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--mc-bg) 78%);
		pointer-events: none;
	}

	.mc-steps li + li {
		padding-left: 10px;
		margin-left: 0;
	}

	.mc-steps li span {
		display: none;
	}

	.mc-steps li.is-current span {
		display: inline;
	}

	.mc-rule__top,
	.mc-cond {
		grid-template-columns: 1fr;
	}

	.mc-table thead {
		display: none;
	}

	.mc-table,
	.mc-table tbody,
	.mc-table tr,
	.mc-table td {
		display: block;
		width: 100%;
	}

	.mc-table tr.mc-row {
		border-bottom: 1px solid var(--mc-line);
		padding: 10px 12px;
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 2px 10px;
	}

	.mc-table tr.mc-row td {
		border: 0;
		padding: 1px 0;
	}

	.mc-table td[data-c="order"] {
		grid-column: 1;
		font-weight: 600;
	}

	.mc-table td[data-c="customer"] {
		grid-column: 1;
	}

	.mc-table td[data-c="category"] {
		grid-column: 1;
		font-size: 12px;
		color: var(--mc-ink-2);
	}

	.mc-table td[data-c="expected"],
	.mc-table td[data-c="paid"] {
		display: none;
	}

	.mc-table td[data-c="variance"] {
		grid-column: 2;
		grid-row: 1;
		text-align: right;
	}

	.mc-table td[data-c="status"] {
		grid-column: 2;
		grid-row: 2;
		text-align: right;
	}

	.mc-drawer__inner {
		grid-template-columns: 1fr;
	}

	.mc-results__actions {
		width: 100%;
	}

	.mc-results__actions .mc-btn {
		flex: 1;
	}
}

/* Import paths ------------------------------------------------------------ */

.mc-paths {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.mc-path {
	position: relative;
	appearance: none;
	text-align: left;
	font: inherit;
	background: var(--mc-bg);
	border: 1.5px solid var(--mc-line-2);
	border-radius: var(--mc-radius);
	padding: 16px 18px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 5px;
	transition: border-color 0.14s ease, background 0.14s ease;
}

.mc-path:hover {
	border-color: var(--mc-ink-3);
}

.mc-path.is-active {
	border-color: var(--mc-accent);
	background: var(--mc-info-bg);
}

.mc-path__badge {
	position: absolute;
	top: 12px;
	right: 14px;
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--mc-ok-fg);
	background: var(--mc-ok-bg);
	padding: 2px 8px;
	border-radius: 999px;
}

.mc-path__title {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--mc-ink);
	padding-right: 90px;
}

.mc-path__body {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	line-height: 1.45;
}

.mc-tpl-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.mc-drop--wide {
	min-height: 130px;
}

/* Validation report ------------------------------------------------------- */

.mc-check {
	margin-top: 14px;
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	overflow: hidden;
}

.mc-check__head {
	padding: 11px 16px;
	font-size: 13.5px;
	font-weight: 500;
}

.mc-check__head.is-ok {
	background: var(--mc-ok-bg);
	color: var(--mc-ok-fg);
}

.mc-check__head.is-warn {
	background: var(--mc-warn-bg);
	color: var(--mc-warn-fg);
}

.mc-check__head.is-bad {
	background: var(--mc-bad-bg);
	color: var(--mc-bad-fg);
}

.mc-check__group {
	padding: 12px 16px;
	border-top: 1px solid var(--mc-line);
}

.mc-check__group h5 {
	margin: 0 0 6px;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mc-ink-3);
}

.mc-check__group ul {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: var(--mc-ink);
}

.mc-check__group li {
	margin-bottom: 3px;
}

.mc-check__group--bad h5 {
	color: var(--mc-bad-fg);
}

/* Compensation table ------------------------------------------------------ */

.mc-comp {
	border-bottom: 1px solid var(--mc-line);
	padding: 4px 18px;
}

.mc-comp__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 16px 18px 12px;
}

.mc-comp__title {
	margin: 0 0 2px;
	font-size: 15px;
	font-weight: 600;
	color: var(--mc-ink);
}

.mc-comp__group {
	padding: 4px 18px 12px;
}

.mc-comp__kind {
	margin: 10px 0 6px;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--mc-ink-3);
}

.mc-comprow {
	display: grid;
	grid-template-columns: 1fr 150px 160px;
	gap: 10px;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--mc-line);
}

.mc-comprow:last-child {
	border-bottom: 0;
}

.mc-comprow__label strong {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mc-ink);
}

.mc-comprow__label span {
	display: block;
	font-size: 12px;
	color: var(--mc-ink-2);
	margin-top: 1px;
}

.mc-comprow__pay {
	position: relative;
	display: flex;
	align-items: center;
}

.mc-comprow__sign,
.mc-comprow__pct {
	position: absolute;
	font-size: 13px;
	color: var(--mc-ink-2);
	pointer-events: none;
}

.mc-comprow__sign {
	left: 11px;
}

.mc-comprow__pct {
	right: 11px;
}

.mc-app .mc-comprow__pay input[type="text"] {
	padding-left: 23px;
	padding-right: 24px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.mc-adv {
	border-top: 1px solid var(--mc-line);
}

.mc-adv > summary {
	padding: 13px 18px;
	font-size: 13px;
	font-weight: 500;
	color: var(--mc-ink-2);
	cursor: pointer;
	list-style: none;
}

.mc-adv > summary::-webkit-details-marker {
	display: none;
}

.mc-adv > summary::before {
	content: "\203A";
	display: inline-block;
	margin-right: 8px;
	transition: transform 0.15s ease;
}

.mc-adv[open] > summary::before {
	transform: rotate(90deg);
}

.mc-adv > summary:hover {
	color: var(--mc-ink);
}

.mc-adv__note {
	padding: 0 18px 10px;
}

@media (max-width: 782px) {
	.mc-comprow {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.mc-path__title {
		padding-right: 0;
	}

	.mc-path__badge {
		position: static;
		align-self: flex-start;
		margin-bottom: 4px;
	}
}

/* Reconciliation-path mark + auto-filled rows ---------------------------- */

.mc-path__title {
	display: flex;
	align-items: center;
	gap: 7px;
}

.mc-recon {
	width: 17px;
	height: 17px;
	flex: none;
	fill: var(--mc-accent);
}

.mc-comp__csv {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 12px 18px 16px;
	border-top: 1px solid var(--mc-line);
}

/* One action row for the whole rate set, sitting under the table. */
.mc-comp__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 18px;
	flex-wrap: wrap;
	padding: 14px 18px;
	margin-top: 6px;
	border-top: 1px solid var(--mc-line);
	background: var(--mc-surface);
}

.mc-comp__foot-aside {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.mc-comp__foot-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-left: auto;
}

/* A row the parser just filled in, so review has somewhere to look. */
.mc-comprow.is-filled {
	background: var(--mc-info-bg);
	border-radius: var(--mc-radius-sm);
	box-shadow: 0 0 0 6px var(--mc-info-bg);
}

.mc-comprow.is-filled .mc-comprow__label strong::after {
	content: "\2713";
	margin-left: 6px;
	color: var(--mc-ok-fg);
	font-size: 12px;
}

/* Rate set setup gate ----------------------------------------------------- */

.mc-setup {
	padding: 18px;
	border-top: 1px solid var(--mc-line);
}

.mc-setup__title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
	color: var(--mc-ink);
}

.mc-setup__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 12px;
}

.mc-setup__card {
	position: relative;
	appearance: none;
	text-align: left;
	font: inherit;
	background: var(--mc-bg);
	border: 1.5px solid var(--mc-line-2);
	border-radius: var(--mc-radius);
	padding: 16px 18px 14px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: border-color 0.14s ease, background 0.14s ease;
}

.mc-setup__card:hover {
	border-color: var(--mc-ink-3);
}

.mc-setup__card.is-active {
	border-color: var(--mc-accent);
	background: var(--mc-info-bg);
}

.mc-setup__badge {
	position: absolute;
	top: 12px;
	right: 14px;
	font-size: 10.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--mc-ok-fg);
	background: var(--mc-ok-bg);
	padding: 2px 8px;
	border-radius: 999px;
}

.mc-setup__head {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mc-ink);
	padding-right: 66px;
	line-height: 1.35;
}

.mc-setup__body {
	font-size: 12.5px;
	color: var(--mc-ink-2);
	line-height: 1.45;
}

.mc-setup__go {
	margin-top: 2px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--mc-accent);
}

.mc-setup__go::after {
	content: " \2192";
}

/* The card itself is a div now, not a button — see the markup comment for
   why — so it needs .mc-setup__card's own look reapplied here, since a div
   carries none of a button's default styling to begin with. */
/* .mc-setup__card's own hover/active rules still apply — this only
   overrides padding, since the trigger button below supplies its own. */
.mc-setup__card--csv {
	padding: 0;
	overflow: hidden;
}

/* The clickable heading/description area. Reset to plain text rather than
   a button, since the card around it already supplies the border and
   background — a second border/background here would nest one card's
   look inside another. */
.mc-setup__cardtrigger {
	appearance: none;
	width: 100%;
	text-align: left;
	font: inherit;
	background: none;
	border: 0;
	padding: 16px 18px 14px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Revealed in place, below the trigger, inside the same card frame — not a
   separate card of its own, which is what this replaced. */
.mc-setup__csv {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 18px 16px;
}

.mc-comp__actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

@media (max-width: 782px) {
	.mc-setup__head {
		padding-right: 0;
	}

	.mc-setup__badge {
		position: static;
		align-self: flex-start;
	}
}

/* Adding a category ------------------------------------------------------- */

.mc-comprow__tail {
	display: flex;
	align-items: center;
	gap: 6px;
}

.mc-comprow__tail .mc-comprow__type {
	flex: 1;
}

.mc-newcat {
	padding: 12px 18px 4px;
}

.mc-newcat__form {
	margin-top: 10px;
	padding: 14px;
	background: var(--mc-surface);
	border-radius: var(--mc-radius-sm);
}

.mc-newcat__grid {
	display: flex;
	gap: 10px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.mc-newcat__grid .mc-field {
	min-width: 140px;
	flex: 0 1 auto;
}

.mc-newcat__grid .mc-field--grow {
	flex: 1 1 180px;
}

.mc-newcat__form .mc-hint {
	display: block;
	margin-top: 8px;
	max-width: 70ch;
}

/* Mobile safety net: native controls default to an intrinsic width that
   ignores narrow containers, which is how a select or button ends up half
   off the screen. Inside the dashboard nothing may exceed its parent. */

@media (max-width: 782px) {
	.mc-app select,
	.mc-app input,
	.mc-app textarea,
	.mc-app .mc-btn {
		max-width: 100%;
		box-sizing: border-box;
	}

	.mc-app .mc-card {
		max-width: 100%;
		overflow-wrap: break-word;
	}
}

/* Very narrow screens: the greeting yields, the Sign out control stays. */

@media (max-width: 400px) {
	.mc-who__name {
		display: none;
	}

	.mc-logo--bar {
		width: 158px;
	}
}

/* Rate-set toolbar on mobile ------------------------------------------- */

/* The picker carries a 220px minimum, which leaves no room for the button
   beside it on a phone — it was being clipped at the screen edge. Below
   the tablet breakpoint the two controls stack and each takes the full
   width, so both stay reachable. */

@media (max-width: 782px) {
	.mc-rates__head {
		gap: 12px;
		padding: 16px 16px 14px;
	}

	/* Let the heading and description shrink instead of forcing the row
	   wider than the card. */
	.mc-rates__head > div {
		min-width: 0;
	}

	.mc-rates__head > * {
		max-width: 100%;
	}

	/* A single-column grid rather than a wrapping flex row: whatever the
	   toolbar ends up holding — the picker, the New rate set button, or
	   anything added later — every child gets its own full-width line and
	   nothing can be pushed past the screen edge. */
	.mc-card .mc-rates__actions {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
		max-width: 100%;
		gap: 10px;
	}

	.mc-card .mc-rates__actions > * {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 44px;
		box-sizing: border-box;
	}

	.mc-card .mc-rates__actions .mc-btn {
		justify-content: center;
	}

	/* Native controls carry an intrinsic width that ignores the grid track
	   unless this is stated outright. */
	.mc-card .mc-rates__actions select {
		min-width: 0;
		max-width: 100%;
	}
}

.mc-cats {
	margin-top: 18px;
	border: 1px solid var(--mc-line, #e4e7ec);
	border-radius: var(--mc-radius, 12px);
	overflow: hidden;
}

.mc-cats:empty {
	display: none;
}

.mc-cats__head {
	padding: 11px 16px;
	background: var(--mc-surface, #f8f9fb);
	border-bottom: 1px solid var(--mc-line, #e4e7ec);
	font-weight: 700;
	font-size: 13.5px;
}

.mc-cats__un {
	padding: 12px 16px;
	background: #fdf3e2;
	border-top: 1px solid #f0dcb8;
}

.mc-cats__un h4 {
	font-size: 13px;
	color: #8a5a08;
	margin-bottom: 6px;
}

.mc-cats {
	margin-top: 0;
}

/* Sale type summary table + assign modal ------------------------------- */

.mc-cattable {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.mc-cattable th {
	text-align: left;
	font-size: 11.5px;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--mc-ink-3, #8b909c);
	padding: 10px 16px 8px;
	border-bottom: 1px solid var(--mc-line, #e4e7ec);
}

.mc-cattable td {
	padding: 9px 16px;
	border-bottom: 1px solid var(--mc-line, #e4e7ec);
}

.mc-cattable tr:last-child td {
	border-bottom: 0;
}

.mc-cattable td:last-child,
.mc-cattable th:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.mc-cattable tr.is-empty td {
	color: var(--mc-ink-3, #8b909c);
}

.mc-cattable__rate {
	font-size: 12px;
	color: var(--mc-ink-2, #5b616e);
	margin-left: 8px;
}

.mc-assign {
	position: fixed;
	inset: 0;
	background: rgba(16, 18, 23, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}

.mc-assign__box {
	background: #fff;
	border-radius: 14px;
	max-width: 620px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	padding: 22px 24px;
	box-shadow: 0 18px 50px rgba(16, 18, 23, 0.25);
}

.mc-assign__title {
	margin: 0 0 4px;
	font-size: 18px;
}

.mc-assign__list {
	margin: 14px 0;
	display: grid;
	gap: 10px;
}

.mc-assign__row {
	display: grid;
	grid-template-columns: 1fr 220px;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid var(--mc-line, #e4e7ec);
	border-radius: 10px;
}

.mc-assign__val {
	font-size: 13.5px;
	word-break: break-word;
}

.mc-assign__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 6px;
}

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


/* Per-file sale type summary ------------------------------------------ */

.mc-filecats {
	margin-top: 10px;
	border: 1px solid var(--mc-line, #e4e7ec);
	border-radius: var(--mc-radius, 12px);
	background: #fff;
	overflow: hidden;
}

.mc-filecats[hidden] {
	display: none;
}

/* Sale type picker on the payout structure ----------------------------- */

.mc-comp__empty {
	padding: 18px 4px;
}

.mc-comp__add {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--mc-line, #e4e7ec);
}

.mc-comp__add select {
	min-width: 260px;
	max-width: 100%;
	padding: 9px 12px;
	border: 1px solid #cfd3db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: var(--mc-ink, #16181d);
}

/* Always light ----------------------------------------------------------
   The dashboard is designed for light mode only. `color-scheme: light`
   tells the browser to render everything inside — native inputs, selects,
   scrollbars, date pickers — with light UI even when macOS or Windows has
   switched the OS (and the browser's prefers-color-scheme) to dark. The
   explicit ink and background pin the base so a dark WordPress theme
   cannot bleed through either. */

#mc-app,
.mc-app,
.mc-assign,
.mc-filecats {
	color-scheme: light only;
	background-color: #ffffff;
	color: #16181d;
}

#mc-app input,
#mc-app select,
#mc-app textarea,
.mc-assign input,
.mc-assign select,
.mc-assign textarea {
	color-scheme: light;
	background-color: #ffffff;
	color: #16181d;
}

/* Inactivity warning ---------------------------------------------------- */

.mc-idle {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(16, 18, 23, 0.6);
	backdrop-filter: blur(3px);
	animation: mc-idle-in 0.18s ease-out;
}

@keyframes mc-idle-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.mc-idle__box {
	background: #fff;
	border-radius: 18px;
	padding: 30px 30px 24px;
	width: 100%;
	max-width: 400px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(16, 18, 23, 0.3);
	animation: mc-idle-rise 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes mc-idle-rise {
	from { transform: translateY(12px) scale(0.98); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

.mc-idle__ring {
	position: relative;
	width: 108px;
	height: 108px;
	margin: 0 auto 18px;
}

.mc-idle__ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.mc-idle__track {
	fill: none;
	stroke: var(--mc-line, #e4e7ec);
	stroke-width: 8;
}

.mc-idle__bar {
	fill: none;
	stroke: var(--mc-accent, #4f46e5);
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.25s linear, stroke 0.3s ease;
}

.mc-idle__ring.is-urgent .mc-idle__bar {
	stroke: #d63638;
}

.mc-idle__num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--mc-ink, #16181d);
}

.mc-idle__ring.is-urgent .mc-idle__num {
	color: #d63638;
}

.mc-idle__title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: var(--mc-ink, #16181d);
}

.mc-idle__body {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--mc-ink-2, #5b616e);
}

.mc-idle__actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.mc-idle__actions .mc-btn {
	min-width: 132px;
}

@media (max-width: 420px) {
	.mc-idle__actions .mc-btn {
		width: 100%;
	}
}

/* Resend code button ----------------------------------------------------- */

.mc-gate__resend {
	width: 100%;
	margin-top: 8px;
	font-variant-numeric: tabular-nums;
}

.mc-gate__resend.is-waiting {
	opacity: 0.6;
	cursor: default;
}

.mc-gate__resend[disabled] {
	pointer-events: none;
}

/* Impersonation ---------------------------------------------------------- */

.mc-impbar {
	position: sticky;
	top: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 18px;
	background: #f0b429;
	color: #3d2c00;
	font-size: 14px;
	font-weight: 700;
	box-shadow: 0 2px 10px rgba(61, 44, 0, 0.22);
}

.mc-impbar__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #7a5c00;
	flex: 0 0 auto;
	animation: mc-imp-pulse 1.8s ease-in-out infinite;
}

@keyframes mc-imp-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
	.mc-impbar__dot { animation: none; }
}

.mc-impbar__text {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
}

.mc-impbar__stop {
	appearance: none;
	flex: 0 0 auto;
	border: 1px solid #7a5c00;
	background: rgba(255, 255, 255, 0.85);
	color: #3d2c00;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 14px;
	border-radius: 999px;
	cursor: pointer;
}

.mc-impbar__stop:hover {
	background: #fff;
}

.mc-impbar__stop[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* A tinted frame around the browser window itself, so the state stays
   visible no matter how far the page is scrolled.

   Drawn as a fixed-position overlay rather than an inset shadow on .mc-app,
   which is what this used to be: that version hugged the app container, so
   it ended wherever the content ended and scrolled away with it, rather than
   framing the window. pointer-events: none keeps it purely decorative --
   without it, a full-viewport overlay would swallow every click on the page
   underneath. Sits below .mc-impbar's own z-index so the bar stays on top. */
body.mc-impersonating::after {
	content: "";
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border: 9px solid #f0b429;
	pointer-events: none;
	z-index: 99998;
}

.mc-imp {
	/* Sits last in My Account, below the subscription panels, so it needs
	   clear separation from them and the same padding as its neighbours. */
	margin: 26px 0 8px;
	padding: 20px 22px 22px;
	clear: both;
}

.mc-imp[hidden] {
	display: none;
}

.mc-imp__row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 14px;
}

.mc-imp__select {
	flex: 1 1 260px;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #cfd3db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: var(--mc-ink, #16181d);
}

.mc-imp__help {
	margin: 0;
}

.mc-imp__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 700;
}

.mc-imp__row {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 12px;
}

.mc-imp__select {
	flex: 1 1 260px;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #cfd3db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: var(--mc-ink, #16181d);
}

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

	.mc-impbar__stop {
		width: 100%;
		text-align: center;
	}
}

/* Upload cell: the card with its sale-type summary folded underneath ---- */

.mc-upcell {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mc-catsfold {
	margin-top: 10px;
	border: 1px solid var(--mc-line, #e4e7ec);
	border-radius: var(--mc-radius, 12px);
	background: #fff;
	overflow: hidden;
}

.mc-catsfold[hidden] {
	display: none;
}

.mc-catsfold__toggle {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 11px 15px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mc-ink, #16181d);
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.mc-catsfold__toggle::-webkit-details-marker {
	display: none;
}

.mc-catsfold__toggle:hover {
	background: var(--mc-surface, #f8f9fb);
}

.mc-catsfold__toggle:focus-visible {
	outline: 2px solid var(--mc-accent, #4f46e5);
	outline-offset: -2px;
}

/* Chevron: down when closed, up when open. */
.mc-catsfold__chev {
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--mc-accent, #4f46e5);
	border-bottom: 2px solid var(--mc-accent, #4f46e5);
	transform: rotate(45deg);
	transition: transform 0.18s ease;
	flex: 0 0 auto;
	margin-top: -3px;
}

.mc-catsfold[open] .mc-catsfold__chev {
	transform: rotate(-135deg);
	margin-top: 3px;
}

.mc-catsfold .mc-filecats {
	border: 0;
	border-top: 1px solid var(--mc-line, #e4e7ec);
	border-radius: 0;
	margin: 0;
}

/* Numbered steps on the rates screen ------------------------------------ */

/* The circle and its heading are the ONLY two things in this row. Nothing
   below them — a paragraph, a form, a whole table — can pull them out of
   line with each other, because nothing below them is IN this row; it sits
   underneath as ordinary block content. This is deliberate: the previous
   version aligned the circle against a tall flex sibling that also held the
   paragraph and controls, and cross-axis alignment across items of very
   different heights is exactly the kind of thing that drifts by a pixel or
   two between browsers. A two-cell grid holding only the circle and the
   text cannot drift, because there is nothing else in it to disagree about. */
.mc-stephead {
	margin: 20px 0 8px;
}

/* Step 1's wrapper is the only one of the three sitting directly inside
   .mc-card, which carries no padding of its own — so it sat flush against
   the card's edge while everything else in this card, including the
   heading above it, is inset 18px. Steps 2 and 3 already get that inset
   from #mc-setup and .mc-comp__head; this gives step 1 the matching value
   without doubling it for the other two, since the selector only reaches a
   .mc-stephead that is a direct child of the card. */
.mc-card > .mc-stephead {
	padding: 0 18px;
}

.mc-stephead__row {
	/* Table-cell rather than grid or flex: this is the one layout mode with
	   universal, long-standing support for "a fixed box and a text box,
	   vertically centred against each other" — it predates both grid and
	   flexbox and behaves the same everywhere. */
	display: table;
	width: 100%;
	border-collapse: collapse;
}

.mc-stephead__row > * {
	display: table-cell;
	vertical-align: middle;
}

.mc-step__num {
	width: 28px;
	padding-right: 12px;
}

.mc-step__num span {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #4f46e5;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
}

.mc-stephead .mc-step__title,
.mc-stephead .mc-setup__title,
.mc-stephead .mc-comp__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

/* Everything that is NOT the number and the heading — the description, the
   picker, the form fields — sits in its own block below, indented to line
   up under the heading rather than under the circle. */
.mc-stephead + .mc-step__body,
.mc-step__body {
	margin-left: 40px;
}

/* Only step 3's description needs its own left margin: it sits as a direct
   sibling of the number+heading row, with nothing else providing an offset.
   Step 1's description is different — it lives inside .mc-step__body, which
   already carries the matching 40px margin for the whole block below the
   heading. A broad selector here previously matched both, so step 1's
   paragraph inherited 40px from its parent AND received a second 40px of
   its own, landing 80px in instead of 40px — visibly further right than
   the heading above it and the controls below it. Scoped to a direct
   child of step 3's row specifically, so it cannot reach into step 1's
   nested paragraph and double up again. */
.mc-comp__head.mc-stephead > .mc-sub {
	margin: 4px 0 0 40px;
}

/* .mc-comp__head is a space-between flex row elsewhere in the page. Step 3
   reuses that class for its background and padding, but its own content —
   the number-and-title row, then a paragraph — has to stack vertically like
   the other two steps, not spread to the row's far edges. */
.mc-comp__head.mc-stephead {
	display: block;
	padding: 16px 18px 4px;
}

@media ( max-width: 640px ) {
	.mc-stephead {
		margin: 16px 0 6px;
	}

	.mc-step__num {
		width: 24px;
		padding-right: 10px;
	}

	.mc-step__num span {
		width: 24px;
		height: 24px;
		font-size: 13px;
		line-height: 24px;
	}

	.mc-stephead .mc-step__title,
	.mc-stephead .mc-setup__title,
	.mc-stephead .mc-comp__title {
		font-size: 15px;
	}

	.mc-step__body {
		margin-left: 34px;
	}

	.mc-comp__head.mc-stephead > .mc-sub {
		margin-left: 34px;
	}
}

/* Sits at the very bottom of the whole card, outside every numbered step —
   a plain action row, not another step of its own. .mc-comp's own
   border-bottom above already separates it from the rows, so this needs
   none of its own. */
.mc-card__foot {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 16px 18px;
}

.mc-field__req {
	color: #b32d2e;
}

/* Documentation ------------------------------------------------------------ */

.mc-doc-toc {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 4px 0 18px;
}

.mc-doc-toc a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid var(--mc-line-2);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mc-accent);
	text-decoration: none;
}

.mc-doc-toc a:hover {
	background: var(--mc-surface);
}

.mc-doctopic {
	border: 1px solid var(--mc-line);
	border-radius: var(--mc-radius);
	margin-bottom: 12px;
	overflow: hidden;
}

.mc-doctopic__sum {
	cursor: pointer;
	list-style: none;
	padding: 15px 18px;
	font-size: 15.5px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mc-doctopic__sum::-webkit-details-marker {
	display: none;
}

.mc-doctopic__sum::after {
	content: "\25be";
	font-size: 12px;
	color: var(--mc-ink-3);
	flex: none;
}

.mc-doctopic[open] .mc-doctopic__sum::after {
	content: "\25b4";
}

.mc-doctopic__body {
	padding: 2px 18px 18px;
	border-top: 1px solid var(--mc-line);
}

/* Table-cell rather than grid or flex for the same reason as the numbered
   steps on the Carrier Payout Rates screen: the circle and its text need to
   line up reliably regardless of how many lines the text wraps to, and
   table-cell is the one layout mode that has never drifted across a render
   check in this plugin. */
.mc-docstep {
	display: table;
	width: 100%;
	margin: 16px 0;
}

.mc-docstep__num,
.mc-docstep__text {
	display: table-cell;
	vertical-align: top;
}

.mc-docstep__num {
	width: 28px;
	padding-right: 12px;
}

.mc-docstep__num span {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--mc-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 26px;
	text-align: center;
}

.mc-docstep__title {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: 14px;
}

.mc-docstep__body {
	margin: 0;
	color: var(--mc-ink-2);
	font-size: 13.5px;
	line-height: 1.55;
}

.mc-doc-shot {
	margin: 14px 0 4px;
	padding: 0;
}

.mc-doc-shot img {
	display: block;
	width: 100%;
	max-width: 480px;
	border: 1px solid var(--mc-line-2);
	border-radius: var(--mc-radius-sm);
}

.mc-doc-shot figcaption {
	margin-top: 6px;
	font-size: 12px;
	color: var(--mc-ink-3);
}

@media ( max-width: 640px ) {
	.mc-doc-toc a {
		padding: 6px 12px;
		font-size: 12.5px;
	}

	.mc-doctopic__sum {
		padding: 13px 14px;
		font-size: 14.5px;
	}

	.mc-doctopic__body {
		padding: 2px 14px 16px;
	}
}

.mc-doclist {
	margin: 8px 0 4px;
	padding-left: 18px;
}

.mc-doclist li {
	margin: 5px 0;
	color: var(--mc-ink-2);
	font-size: 13.5px;
	line-height: 1.5;
}

.mc-doclist strong {
	color: var(--mc-ink);
}

/* The per-sale-type description, on its own line under the row it belongs
   to. The row above is a three-column grid; this spans all of them so the
   field runs the full width rather than being squeezed into one column. */
.mc-comprow__note {
	grid-column: 1 / -1;
	margin-top: 6px;
}

.mc-comprow__note input {
	width: 100%;
	font-size: 12.5px;
	padding: 6px 9px;
	color: var(--mc-ink-2);
	border: 1px dashed var(--mc-line-2);
	background: transparent;
}

.mc-comprow__note input:focus {
	border-style: solid;
	color: var(--mc-ink);
	background: var(--mc-bg);
}

/* An extra row of a sale type already on the table. Indented and tinted so
   it reads as belonging to the row above rather than as a separate type. */
.mc-comprow--variant {
	border-left: 3px solid var(--mc-line-2);
	padding-left: 12px;
}

.mc-comprow--variant .mc-comprow__label strong {
	font-weight: 500;
	opacity: 0.75;
}

.mc-comprow--variant .mc-comprow__note input:placeholder-shown {
	border-color: var(--mc-warn-fg, #b45309);
}
